html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ---------- Identity pages ---------- */
.identity-page {
  --id-primary: #2563eb;
  --id-primary-hover: #1d4ed8;
  --id-radius: 0.875rem;
  max-width: 960px;
  margin: 2.5rem auto;
}

.identity-page h1 {
  font-weight: 700;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  text-align: center;
}

.identity-page h2,
.identity-page h3,
.identity-page h4 {
  font-weight: 600;
  font-size: 1.1rem;
  color: #334155;
  margin-bottom: 1rem;
}

.identity-page hr {
  opacity: 0.08;
  margin: 1.25rem 0;
}

.identity-page > .row {
  justify-content: center;
  gap: 1.5rem 0;
}

.identity-page > .row > [class*="col-md-"] {
  flex: 1 1 100%;
  max-width: 440px;
  margin-left: 0;
}

.identity-page > .row > [class*="col-md-"] > section,
.identity-page > .row > [class*="col-md-"] > form,
.identity-page .identity-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--id-radius);
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  padding: 2rem;
  height: 100%;
}

@media (min-width: 992px) {
  .identity-page > .row > [class*="col-md-"] {
    flex: 1 1 0;
  }
}

.identity-page .form-control,
.identity-page .form-select {
  border-radius: 0.6rem;
  border-color: #cbd5e1;
  background-color: #f8fafc;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.identity-page .form-control:focus,
.identity-page .form-select:focus {
  background-color: #fff;
  border-color: var(--id-primary);
  box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.15);
}

.identity-page .form-floating > label {
  color: #64748b;
}

.identity-page .form-check-input:checked {
  background-color: var(--id-primary);
  border-color: var(--id-primary);
}

.identity-page .btn {
  border-radius: 0.6rem;
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  transition: transform .1s ease, background-color .15s ease, box-shadow .15s ease;
}

.identity-page .btn-primary {
  background-color: var(--id-primary);
  border-color: var(--id-primary);
  box-shadow: 0 4px 14px -4px rgba(37, 99, 235, 0.55);
}

.identity-page .btn-primary:hover,
.identity-page .btn-primary:focus {
  background-color: var(--id-primary-hover);
  border-color: var(--id-primary-hover);
}

.identity-page .btn:active {
  transform: translateY(1px);
}

.identity-page a:not(.btn):not(.nav-link) {
  color: var(--id-primary);
  text-decoration: none;
  font-weight: 500;
}

.identity-page a:not(.btn):not(.nav-link):hover {
  text-decoration: underline;
}

.identity-page form p {
  margin-bottom: 0.5rem;
  font-size: 0.925rem;
}

.identity-page .text-danger {
  font-size: 0.85rem;
}

.identity-page .validation-summary-errors ul {
  list-style: none;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  border-radius: 0.6rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.identity-page .alert {
  border-radius: 0.6rem;
}

/* Manage account area */
.identity-page .nav-pills {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--id-radius);
  padding: 0.5rem;
  gap: 0.25rem;
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.12);
}

.identity-page .nav-pills .nav-link {
  border-radius: 0.5rem;
  color: #334155;
  font-weight: 500;
}

.identity-page .nav-pills .nav-link:hover {
  background: #f1f5f9;
}

.identity-page .nav-pills .nav-link.active {
  background: var(--id-primary);
  color: #fff;
}

.identity-page .row:has(> .col-md-3 > .nav-pills) {
  justify-content: flex-start;
}

.identity-page .row:has(> .col-md-3 > .nav-pills) > .col-md-3,
.identity-page .row:has(> .col-md-3 > .nav-pills) > .col-md-9 {
  max-width: none;
}

.identity-page .row:has(> .col-md-3 > .nav-pills) > .col-md-3 {
  flex: 0 0 25%;
}

.identity-page .row:has(> .col-md-3 > .nav-pills) > .col-md-9 {
  flex: 0 0 75%;
}

.identity-page .col-md-9 > .row > [class*="col-md-"] {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--id-radius);
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.12);
  padding: 2rem;
  flex: 1 1 100%;
  max-width: 560px;
}

@media (max-width: 767.98px) {
  .identity-page .row:has(> .col-md-3 > .nav-pills) > .col-md-3,
  .identity-page .row:has(> .col-md-3 > .nav-pills) > .col-md-9 {
    flex: 0 0 100%;
  }
}