/**
 * client/assets/css/auth.css
 *
 * Phase 4 — Shared Authentication. Styles specific to the one shared
 * login page (UI/UX §3.1) and the session-expired reauth form (whose
 * markup already ships from Phase 3's components/ui/modal.php). This
 * is a new file, included only by login.php and pages that render
 * the session-expired modal — theme.css and components.css from
 * Phase 3 are never edited (Rule 6), only referenced by variable name.
 */

.ant-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding: var(--space-5);
}

/* Soft radial glows on the hero backdrop so the flat gradient feels
   dimensional (UI Redesign). */
.ant-auth-page::before {
  content: '';
  position: absolute;
  top: -12%;
  right: -8%;
  width: 45vw;
  height: 45vw;
  max-width: 560px;
  max-height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 160, 245, 0.35), transparent 62%);
  pointer-events: none;
}
.ant-auth-page::after {
  content: '';
  position: absolute;
  bottom: -14%;
  left: -6%;
  width: 40vw;
  height: 40vw;
  max-width: 520px;
  max-height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 126, 0.18), transparent 60%);
  pointer-events: none;
}

/* Subtle abstract curved-line motif (brand-neutral, no company logo —
   UI/UX §3.1: "this page has no company context yet"). */
.ant-auth-page__motif {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  z-index: 0;
}

.ant-auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-3);
  padding: var(--space-7) var(--space-6);
  overflow: hidden;
}
/* Slim brand ribbon along the card's top edge. */
.ant-auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-card-accent);
}

.ant-auth-card__mark {
  width: 60px;
  height: 60px;
  margin: var(--space-2) auto var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--gradient-card-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-neutral-white);
  font-size: 24px;
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.35);
}

/* Global Business Profile brand block — business logo + name from the
   super-admin-owned ant_tbl_business_settings, shown on the shared
   login page (branding.php no longer forces a neutral placeholder). */
.ant-auth-card__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  text-align: center;
}
.ant-auth-card__logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.25);
  background: var(--color-bg-surface);
}
.ant-auth-card__business {
  font-family: var(--font-heading);
  font-size: var(--font-size-h4);
  font-weight: 700;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.ant-auth-card__title {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: var(--font-size-h2);
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
  letter-spacing: -0.01em;
}

.ant-auth-card__subtitle {
  text-align: center;
  font-size: var(--font-size-caption);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.ant-auth-card.is-shake {
  animation: ant-auth-shake 0.4s ease;
}

@keyframes ant-auth-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.ant-auth-banner {
  display: none;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-error-100);
  color: var(--color-error-500);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-caption);
  margin-bottom: var(--space-4);
}

.ant-auth-banner.is-visible {
  display: flex;
}

.ant-auth-banner--locked {
  background: var(--color-warning-100);
  color: var(--color-warning-500);
}

.ant-field--password {
  position: relative;
}

.ant-field--password input {
  padding-right: 44px;
}

.ant-field__toggle-visibility {
  position: absolute;
  right: var(--space-3);
  top: 38px;
  background: none;
  border: none;
  color: var(--color-text-placeholder);
  cursor: pointer;
  font-size: var(--icon-size-inline);
  padding: var(--space-1);
  border-radius: var(--radius-sm);
}

.ant-field__toggle-visibility:hover {
  color: var(--color-neutral-700);
}

.ant-auth-forgot {
  display: block;
  text-align: right;
  font-size: var(--font-size-caption);
  color: var(--color-primary-500);
  margin: calc(var(--space-2) * -1) 0 var(--space-5);
  text-decoration: none;
}

.ant-auth-forgot:hover {
  text-decoration: underline;
}

.ant-auth-submit {
  width: 100%;
  justify-content: center;
  padding-block: 12px;
  box-shadow: 0 10px 22px rgba(30, 58, 138, 0.28);
}

.ant-auth-submit .ant-spinner {
  display: none;
}

.ant-auth-submit.is-loading .ant-spinner {
  display: inline-flex;
}

.ant-auth-submit.is-loading .ant-auth-submit__label {
  opacity: 0.7;
}

.ant-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--color-neutral-white);
  animation: ant-spin 0.6s linear infinite;
  margin-right: var(--space-2);
}

@keyframes ant-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 639px) {
  .ant-auth-page {
    padding: var(--space-5) var(--space-5);
    align-items: flex-start;
    padding-top: var(--space-8);
  }
  .ant-auth-card {
    max-width: none;
    padding: var(--space-6) var(--space-5);
  }
}
