/* ===================================================================
   AUTH PAGES (Login, Register, Forgot Password, etc.)
   Restyles the default Identity/Bootstrap markup to match the brand.
   =================================================================== */
.auth-body {
  margin: 0; min-height: 100vh;
  font-family: "Karla", system-ui, sans-serif;
  background: var(--cream);
}

.auth-split { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
@media (max-width: 860px){ .auth-split { grid-template-columns: 1fr; } }

/* ---------- left brand panel ---------- */
.auth-brand {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(216,179,90,0.16), transparent),
    linear-gradient(160deg, #0b3d2e 0%, #06241b 100%);
  color: var(--cream);
  display: flex; align-items: center; padding: 56px clamp(36px, 5vw, 76px);
}
@media (max-width: 860px){
  .auth-brand { padding: 40px 32px; min-height: 320px; }
}
.auth-brand-inner { position: relative; z-index: 2; max-width: 460px; }
.auth-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 44px; }
.auth-logo img { width: 48px; height: 48px; }
.auth-logo .brand-text { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.6rem; color: var(--cream); }
.auth-logo .brand-text span { color: var(--gold); }

.auth-tagline {
  font-family: "Fraunces", Georgia, serif; font-weight: 500;
  font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.04; margin: 0 0 20px;
}
.auth-tagline em { font-style: italic; color: var(--gold); }
.auth-blurb { font-size: 1.05rem; color: #d7e2da; line-height: 1.6; margin: 0 0 28px; max-width: 40ch; }
.auth-points { list-style: none; padding: 0; margin: 0; }
.auth-points li {
  position: relative; padding-left: 28px; margin-bottom: 12px; color: #e6ede7; font-size: .98rem;
}
.auth-points li::before {
  content: "✦"; position: absolute; left: 0; color: var(--gold); font-size: .9rem;
}
.auth-brand-glow {
  position: absolute; bottom: -120px; right: -120px; width: 380px; height: 380px;
  border-radius: 50%; z-index: 1;
  background: radial-gradient(circle, rgba(216,179,90,0.18), transparent 70%);
}

/* ---------- right form panel ---------- */
.auth-form-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px clamp(24px, 5vw, 64px); background: var(--cream);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--white); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 60px rgba(11,61,46,0.10); padding: 40px;
}
.auth-foot { margin-top: 22px; font-size: .8rem; color: var(--muted); }

/* ---------- headings the Identity pages emit ---------- */
.auth-card h1, .auth-card h2 {
  font-family: "Fraunces", Georgia, serif; color: var(--emerald-900);
  font-size: 1.8rem; margin: 0 0 6px;
}
.auth-card h1 + p, .auth-card h2 + p { color: var(--muted); margin-top: 0; }
.auth-card hr { display: none; }
.auth-card h3, .auth-card h4 { color: var(--emerald-700); font-family: "Fraunces", serif; }

/* Identity often wraps the form in a section/col, neutralize Bootstrap grid */
.auth-card .row, .auth-card .col-md-4, .auth-card .col-md-6,
.auth-card .col-lg-4, .auth-card .col-lg-6 { width: 100%; max-width: 100%; flex: none; padding: 0; margin: 0; }

/* ---------- form fields ---------- */
.auth-card .form-floating { position: relative; margin-bottom: 16px; }
.auth-card .form-group { margin-bottom: 16px; }

.auth-card label { display: block; font-size: .85rem; font-weight: 700; color: var(--emerald-700); margin-bottom: 6px; }
/* floating-label variant: the placeholder already labels the field, so hide the
   floating <label> that would otherwise sit awkwardly below the input */
.auth-card .form-floating > label { display: none; }

.auth-card .form-control,
.auth-card input[type=email],
.auth-card input[type=password],
.auth-card input[type=text],
.auth-card input[type=tel] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; font: inherit; background: #fcfbf7; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.auth-card .form-control:focus,
.auth-card input:focus {
  outline: none; border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(34,138,103,0.15); background: #fff;
}

/* checkbox row (Remember me) */
.auth-card .checkbox, .auth-card .form-check {
  display: flex; align-items: center; gap: 8px; margin: 4px 0 18px; font-size: .92rem; color: var(--ink);
}
.auth-card .form-check-input, .auth-card input[type=checkbox] {
  width: 18px; height: 18px; accent-color: var(--emerald-600); margin: 0;
}
.auth-card .form-check label, .auth-card .checkbox label { margin: 0; font-weight: 500; color: var(--ink); }

/* ---------- buttons ---------- */
.auth-card .btn,
.auth-card button[type=submit] {
  display: inline-block; width: 100%; cursor: pointer; border: none;
  font: inherit; font-weight: 700; font-size: 1rem;
  padding: 13px 24px; border-radius: 10px;
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-900));
  color: var(--cream); transition: transform .2s, box-shadow .2s;
}
.auth-card .btn:hover,
.auth-card button[type=submit]:hover {
  transform: translateY(-1px); box-shadow: 0 10px 28px rgba(11,61,46,0.22);
}
.auth-card .btn-primary { background: linear-gradient(135deg, var(--emerald-700), var(--emerald-900)); }
/* secondary / external-login buttons */
.auth-card .btn-outline-primary, .auth-card .btn-secondary {
  background: transparent; color: var(--emerald-700);
  border: 1px solid var(--line);
}
.auth-card .btn-outline-primary:hover, .auth-card .btn-secondary:hover {
  border-color: var(--emerald-500); background: #f3f7f4; color: var(--emerald-900);
  box-shadow: none;
}

/* ---------- links ---------- */
.auth-card a { color: var(--emerald-600); text-decoration: none; font-weight: 500; }
.auth-card a:hover { color: var(--emerald-900); text-decoration: underline; }
.auth-card p { font-size: .95rem; }

/* ---------- validation ---------- */
.auth-card .text-danger, .auth-card .validation-summary-errors {
  color: var(--danger); font-size: .85rem;
}
.auth-card .validation-summary-errors ul { margin: 0 0 14px; padding-left: 18px; }
.auth-card .field-validation-error { display: block; margin-top: 5px; }
.auth-card .alert {
  border-radius: 10px; padding: 12px 14px; font-size: .9rem; margin-bottom: 16px;
}
.auth-card .alert-danger { background: #fbeae9; color: var(--danger); border: 1px solid #f1c9c6; }
.auth-card .alert-success { background: #eaf5ef; color: var(--emerald-700); border: 1px solid #c5e6d4; }

/* spacing for the external-login divider area Identity emits */
.auth-card .col-md-6:last-child:not(:only-child) { margin-top: 24px; }

/* ============ scaffolded account pages ============ */
.auth-content { width: 100%; }
.auth-h2 { font-family: "Fraunces", serif; color: var(--emerald-900, #0b3d2e); font-size: 1.6rem; margin: 0 0 4px; }
.auth-sub { color: var(--muted, #6b7a72); font-size: .92rem; margin: 0 0 20px; line-height: 1.45; }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: .82rem; font-weight: 700; color: var(--emerald-700, #14543f); margin-bottom: 5px; }
.auth-input { width: 100%; padding: 11px 13px; border: 1px solid var(--line, #e2ddd0); border-radius: 10px; font: inherit; background: #fcfbf7; }
.auth-input:focus { outline: none; border-color: var(--emerald-500, #2e7d5b); box-shadow: 0 0 0 3px rgba(20,84,63,.1); }
.auth-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.auth-remember { display: flex; align-items: center; gap: 7px; font-size: .85rem; color: var(--ink, #1d2420); cursor: pointer; }
.auth-remember input { width: 15px; height: 15px; }
.auth-submit { width: 100%; }
.auth-validation { color: #b3261e; font-size: .85rem; margin-bottom: 10px; }
.auth-validation:empty { display: none; }
.field-error { color: #b3261e; font-size: .78rem; }

/* icon bar with hover tooltips */
.auth-iconbar { display: flex !important; justify-content: center; align-items: center; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line, #e2ddd0); }
.auth-iconbar .auth-icon { position: relative; width: 44px !important; height: 44px !important; min-width: 44px; border-radius: 10px; border: 1px solid var(--line, #e2ddd0); display: inline-flex !important; align-items: center; justify-content: center; color: var(--emerald-700, #14543f); background: #fff; transition: background .18s, color .18s, border-color .18s, transform .18s; text-decoration: none; }
.auth-iconbar .auth-icon:hover { background: var(--emerald-700, #14543f); color: #fff; border-color: var(--emerald-700, #14543f); transform: translateY(-2px); }
.auth-iconbar .auth-icon::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(4px); white-space: nowrap; background: var(--emerald-900, #0b3d2e); color: #fff; font-size: .74rem; font-weight: 600; padding: 6px 10px; border-radius: 7px; box-shadow: 0 6px 18px rgba(11,61,46,.28); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 40; }
.auth-iconbar .auth-icon::before { content: ""; position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--emerald-900, #0b3d2e); opacity: 0; transition: opacity .18s; }
.auth-iconbar .auth-icon:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.auth-iconbar .auth-icon:hover::before { opacity: 1; }

.auth-foot { text-align: center; font-size: .88rem; color: var(--muted, #6b7a72); margin: 18px 0 0; }
.auth-foot a { color: var(--emerald-700, #14543f); font-weight: 700; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

/* centered confirmation pages */
.auth-centered { text-align: center; }
.auth-illus { width: 88px; height: 88px; margin: 0 auto 16px; border-radius: 50%; background: #f0f5f2; color: var(--emerald-700, #14543f); display: flex; align-items: center; justify-content: center; }
.auth-illus.success { background: #e3f3ea; color: #1a6b50; }
.auth-illus.warn { background: #fbe7e6; color: #b3261e; }
.auth-hint { font-size: .82rem; color: var(--muted, #6b7a72); background: #f7f4ed; border-radius: 8px; padding: 10px 12px; margin: 4px 0 18px; }
.auth-actions-center { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.auth-actions-center .btn { width: 100%; text-align: center; }
.btn-line-sm { background: transparent; border: 1px solid var(--line, #e2ddd0); color: var(--emerald-700, #14543f); padding: 9px 18px; border-radius: 9px; text-decoration: none; font-size: .9rem; }
.btn-line-sm:hover { border-color: var(--emerald-500, #2e7d5b); }

/* ensure the auth right pane never needs vertical scroll on normal screens */
.auth-split { min-height: 100vh; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }

/* ---- Phones: prioritise the form; trim the brand panel ---- */
@media (max-width: 560px) {
  .auth-brand { min-height: auto; padding: 28px 24px; }
  .auth-tagline { font-size: 1.9rem; }
  .auth-blurb { font-size: .98rem; }
  /* On the tightest screens, hide the long marketing bullet list to keep the form above the fold */
  .auth-points { display: none; }
  .auth-form-wrap, .auth-card { padding: 28px 22px; }
  input, select, textarea, button { font-size: 16px; }  /* no iOS zoom-on-focus */
}

/* ---------- Mobile login polish ---------- */
/* Password field with show/hide toggle */
.auth-pass-wrap { position: relative; }
.auth-pass-wrap .auth-input { padding-right: 46px; }
.auth-pass-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border: none; background: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted, #6b7a72); border-radius: 8px; padding: 0;
}
.auth-pass-toggle:hover { color: var(--emerald-700, #14543f); }
.auth-pass-toggle.is-on { color: var(--emerald-700, #14543f); }

/* clearer links replacing the cryptic icon bar */
.auth-link-sm { font-size: .85rem; color: var(--emerald-600, #1a6b50); text-decoration: none; }
.auth-link-sm:hover { text-decoration: underline; }
.auth-foot { text-align: center; font-size: .92rem; color: var(--muted, #6b7a72); margin: 20px 0 0; }
.auth-link-strong { color: var(--emerald-700, #14543f); font-weight: 700; text-decoration: none; }
.auth-link-strong:hover { text-decoration: underline; }
.auth-foot-sm { text-align: center; font-size: .82rem; margin: 8px 0 0; }
.auth-foot-sm a { color: var(--muted, #6b7a72); text-decoration: underline; }

/* MOBILE: 16px inputs prevent iOS auto-zoom; bigger tap targets */
@media (max-width: 560px) {
    .auth-input {
        font-size: 16px;            /* prevents iOS zoom-on-focus */
        padding: 13px 14px;
        border-radius: 11px;
    }
    .auth-pass-wrap .auth-input { padding-right: 48px; }
    .auth-pass-toggle { width: 42px; height: 42px; }   /* easy thumb target */
    .auth-submit { padding: 15px; font-size: 1.05rem; }  /* big, easy to tap */
    .auth-field label { font-size: .9rem; }
    .auth-remember { font-size: .9rem; }
    .auth-remember input { width: 18px; height: 18px; }  /* easier checkbox */
    .auth-row { margin-bottom: 18px; }
    .auth-foot { font-size: 1rem; margin-top: 22px; }
}
