@layer auth-overrides {
  :root {
    --auth-brand: var(--surface-accent);
    --auth-brand-strong: var(--surface-accent-strong);
    --auth-ring: rgba(22, 58, 91, 0.22);
  }

  .form-floating > .form-control {
    height: calc(3.5rem + 2px);
    padding: 1rem 0.875rem;
    border: 1px solid rgba(24, 33, 44, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--surface-text);
  }

  .form-floating > label {
    color: #7e8a97;
  }

  .form-control,
  .form-select {
    font-size: 1rem;
  }

  .form-control:focus,
  .form-select:focus {
    border-color: var(--auth-brand);
    box-shadow: 0 0 0 0.25rem var(--auth-ring);
  }

  .toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    padding: 6px 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    transform: translateY(calc(-50% - 2px));
  }

  .toggle-password:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem var(--auth-ring);
  }

  .toggle-password .eye {
    display: inline-block;
    width: 22px;
    height: 22px;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.75' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.64 0 8.577 3.01 9.964 7.183.07.207.07.432 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.64 0-8.577-3.01-9.964-7.178z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
    background: #7e8a97;
  }

  .toggle-password.visible .eye,
  .toggle-password.revealed .eye {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.75' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3.98 8.223C5.817 6.08 8.733 4.5 12 4.5c4.64 0 8.577 3.01 9.964 7.183.07.207.07.432 0 .639-.64 1.9-1.792 3.558-3.28 4.83M9.88 9.88a3 3 0 104.24 4.24M3 3l18 18'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
    background: var(--auth-brand-strong);
  }

  .auth-page .btn-primary {
    border: none;
    border-radius: 14px;
    padding: 1.05rem 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    background: linear-gradient(180deg, var(--auth-brand), var(--auth-brand-strong));
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  }

  .auth-page .btn-primary:hover {
    filter: brightness(1.02);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(22, 58, 91, 0.22);
  }

  .auth-page .btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
  }

  .link-muted,
  .auth-footer a {
    color: var(--surface-muted);
    text-decoration: none;
  }

  .link-muted:hover,
  .auth-footer a:hover {
    color: var(--auth-brand);
    text-decoration: underline;
  }

  .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem var(--auth-ring);
    border-color: var(--auth-brand);
  }

  .form-check-input:checked {
    background-color: var(--auth-brand);
    border-color: var(--auth-brand);
  }

  .toast-container {
    z-index: 2000;
  }

  .toast {
    border-radius: 12px;
    box-shadow: var(--surface-shadow);
  }

  .toast .toast-body {
    font-weight: 500;
  }

  .text-bg-info {
    background-color: #e7f3ff !important;
    color: #0b5ed7 !important;
  }

  .text-bg-warning {
    background-color: #fff7e6 !important;
    color: #a16207 !important;
  }

  .text-bg-success {
    background-color: #22c55e !important;
    color: #fff !important;
  }

  .text-bg-danger {
    background-color: #ef4444 !important;
    color: #fff !important;
  }
}
