/* ==========================================================================
   Gloss & Tips — Staff Login
   Split composition: dark atmospheric brand panel + warm cream form panel.
   Shares the owner portal's palette, radii, gold hover and shimmer vocabulary
   so login and portal read as one product.
   ========================================================================== */

:root {
  --g-black: #14110f;
  --g-charcoal: #1a1a1a;
  --g-ink: #232020;
  --g-cream: #fbf7f0;
  --g-cream-soft: #f6f0e6;
  --g-blush: #f7d6de;
  --g-gold: #c9a66b;
  --g-gold-light: #e0b45b;
  --g-rose: #b4514f;
  --g-line: #e4e4e7;
  --g-muted: #7a7a7a;
  --g-serif: Georgia, "Times New Roman", serif;
  --g-r-sm: 8px;
  --g-r-md: 12px;
  --g-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Shimmer (ported from the public site so login can reuse it) --------- */

.shimmer {
  --shimmer-base: var(--g-cream);
  --shimmer-hi: var(--g-gold-light);
  --shimmer-spread: 12%;
  --shimmer-cycle: 3.6s;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .shimmer {
    background-image: linear-gradient(
      100deg,
      var(--shimmer-base) 0,
      var(--shimmer-base) calc(50% - var(--shimmer-spread)),
      var(--shimmer-hi) 50%,
      var(--shimmer-base) calc(50% + var(--shimmer-spread)),
      var(--shimmer-base) 100%
    );
    background-size: 300% 100%;
    background-repeat: no-repeat;
    background-position: 0% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer-sweep var(--shimmer-cycle) linear infinite;
  }
}
@keyframes shimmer-sweep {
  0% { background-position: 0% 0; }
  44% { background-position: 100% 0; }   /* ~1.6s sweep */
  100% { background-position: 100% 0; }  /* ~2.0s pause */
}

/* ---- Page ---------------------------------------------------------------- */

/* Base kept for professional/dashboard.html, which also loads this file. */
body {
  background: #f4f4f5;
  color: #1a1a1a;
}

body.auth {
  margin: 0;
  background: var(--g-cream);
  color: var(--g-charcoal);
}

.auth-split {
  display: grid;
  grid-template-columns: 55fr 45fr;
  min-height: 100vh;
  min-height: 100svh;
}

/* ---- Brand panel --------------------------------------------------------- */

.auth-brand {
  position: relative;
  overflow: hidden;
  background: var(--g-black);
  color: var(--g-cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vw, 72px);
  isolation: isolate;
}

/* Depth: two soft radial pools, one champagne, one deep warm brown. */
.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(58% 44% at 22% 26%, rgba(201, 166, 107, 0.20), transparent 70%),
    radial-gradient(52% 46% at 82% 82%, rgba(120, 82, 44, 0.28), transparent 72%);
}

/* Editorial dashed gold slashes, pinned to the lower-right corner. Same
   construction as the public site's final-CTA accents: strokes painted by a
   repeating gradient, cut into dashes by a mask across them. */
.auth-brand::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: clamp(120px, 18vw, 230px);
  height: clamp(90px, 13vw, 160px);
  z-index: -1;
  opacity: 0.30;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    32deg,
    var(--g-gold) 0 1.5px,
    transparent 1.5px 22px
  );
  -webkit-mask-image: repeating-linear-gradient(122deg, #000 0 26px, transparent 26px 44px);
  mask-image: repeating-linear-gradient(122deg, #000 0 26px, transparent 26px 44px);
}

.auth-brand-inner {
  position: relative;
  max-width: 30rem;
}

/* Blurred champagne pool behind the wordmark. */
.auth-logo {
  position: relative;
  display: inline-block;
  margin-bottom: clamp(24px, 4vw, 44px);
}
.auth-logo::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 260px;
  height: 260px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 166, 107, 0.26), transparent 68%);
  filter: blur(26px);
  pointer-events: none;
}
/* Same crop geometry as the public navbar's dark-background wordmark. */
.auth-logo-frame {
  position: relative;
  display: block;
  width: clamp(180px, 22vw, 240px);
  aspect-ratio: 712.8 / 260.7;
  overflow: hidden;
}
.auth-logo-frame img {
  position: absolute;
  width: 127.52%;
  max-width: none;
  height: auto;
  left: -17.62%;
  top: -110.82%;
  display: block;
}

.auth-tagline {
  font-family: var(--g-serif);
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.12;
  margin: 0 0 clamp(20px, 3vw, 32px);
  color: var(--g-cream);
  max-width: 15ch;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--g-gold);
}
.auth-eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--g-gold);
}

/* ---- Form panel ---------------------------------------------------------- */

.auth-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4vw, 64px);
  background: var(--g-cream);
}

.auth-form-wrap {
  width: 100%;
  max-width: 25rem;
}

.auth-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--g-muted);
  margin: 0 0 0.55rem;
}

.auth-heading {
  font-family: var(--g-serif);
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 0.5rem;
  color: var(--g-charcoal);
}

.auth-sub {
  margin: 0 0 2rem;
  color: #6b6b6b;
  font-size: 0.94rem;
}

/* Back to the public site. */
.auth-close {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  text-decoration: none;
  color: var(--g-muted);
  border: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.auth-close:hover,
.auth-close:focus-visible {
  color: var(--g-charcoal);
  border-color: var(--g-gold);
  background: #fff;
}

/* ---- Fields -------------------------------------------------------------- */

.field {
  margin-bottom: 1.05rem;
}

.field label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--g-muted);
  margin-bottom: 0.4rem;
  transition: color 0.25s ease;
}
.field:focus-within label {
  color: var(--g-charcoal);
}

.field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 0.95rem;
  border: 1px solid #ded8cd;
  border-radius: var(--g-r-sm);
  background: #fffdf9;
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--g-charcoal);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.field input::placeholder {
  color: #b3aca2;
}
.field input:hover {
  border-color: #cdc4b5;
}
.field input:focus {
  outline: none;
  border-color: var(--g-gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(201, 166, 107, 0.18);
}
/* Keyboard users still get an unmistakable ring. */
.field input:focus-visible {
  box-shadow: 0 0 0 3px rgba(201, 166, 107, 0.32);
}

.password-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}
.password-row input {
  flex: 1;
  min-width: 0;
}
.password-row button {
  flex-shrink: 0;
  padding: 0 0.95rem;
  border: 1px solid #ded8cd;
  border-radius: var(--g-r-sm);
  background: #fffdf9;
  color: var(--g-muted);
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.password-row button:hover,
.password-row button:focus-visible {
  color: var(--g-charcoal);
  border-color: var(--g-gold);
  background: #fff;
}

/* ---- Submit -------------------------------------------------------------- */

button[type="submit"] {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--g-charcoal);
  border-radius: var(--g-r-sm);
  background: var(--g-charcoal);
  color: var(--g-cream);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.25s var(--g-ease), border-color 0.25s ease,
              box-shadow 0.25s ease, background 0.25s ease;
}
/* Gold light sweeps across; the dark surface stays dominant. */
button[type="submit"]::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(224, 180, 91, 0.34) 45%,
    rgba(224, 180, 91, 0.55) 50%,
    rgba(224, 180, 91, 0.34) 55%,
    transparent 100%
  );
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: var(--g-gold);
    box-shadow: 0 0 0 1px rgba(201, 166, 107, 0.35), 0 12px 28px -18px rgba(20, 17, 15, 0.7);
  }
  button[type="submit"]:hover:not(:disabled)::after {
    animation: auth-sweep 0.9s var(--g-ease);
  }
}
button[type="submit"]:focus-visible {
  outline: 2px solid var(--g-gold);
  outline-offset: 3px;
}
@keyframes auth-sweep {
  to { transform: translateX(120%); }
}

button[type="submit"]:disabled {
  cursor: default;
  opacity: 0.75;
}

/* Loading: the label is swapped by the existing JS. The spinner is appended
   by CSS so the button keeps its exact width — no reflow on submit. */
button[type="submit"].is-loading {
  color: rgba(251, 247, 240, 0.8);
}
button[type="submit"].is-loading::before {
  content: "";
  display: inline-block;
  width: 0.82em;
  height: 0.82em;
  margin-inline-end: 0.6em;
  vertical-align: -0.08em;
  border: 2px solid rgba(251, 247, 240, 0.35);
  border-top-color: var(--g-gold);
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}
@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

/* ---- Error --------------------------------------------------------------- */

.error-message {
  color: var(--g-rose);
  font-size: 0.85rem;
  margin: 0 0 1rem;
  min-height: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.error-message:not(:empty)::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--g-rose);
  flex-shrink: 0;
}

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .auth-split {
    grid-template-columns: 1fr;
    min-height: 100svh;
  }
  /* Branding is reduced, never removed — a compact dark header keeps identity
     while the form stays reachable without scrolling. */
  .auth-brand {
    padding: 28px 22px 26px;
    justify-content: flex-start;
  }
  .auth-brand::after {
    width: 130px;
    height: 84px;
    opacity: 0.24;
  }
  .auth-logo {
    margin-bottom: 16px;
  }
  .auth-logo::before {
    width: 190px;
    height: 190px;
  }
  .auth-logo-frame {
    width: 168px;
  }
  .auth-tagline {
    font-size: 1.5rem;
    margin-bottom: 14px;
    max-width: none;
  }
  .auth-panel {
    padding: 30px 22px 44px;
  }
  .auth-form-wrap {
    max-width: none;
  }
  .auth-close {
    top: 14px;
    right: 14px;
  }
}

@media (max-width: 400px) {
  .auth-brand {
    padding: 22px 18px 22px;
  }
  .auth-tagline {
    font-size: 1.35rem;
  }
  .auth-panel {
    padding: 26px 18px 40px;
  }
}

/* ---- Motion ------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .shimmer {
    animation: none !important;
    background-image: none;
    -webkit-text-fill-color: var(--shimmer-base);
    color: var(--shimmer-base);
  }
  button[type="submit"],
  button[type="submit"]::after,
  .field input,
  .auth-close {
    transition: none;
  }
  button[type="submit"]:hover:not(:disabled) {
    transform: none;
  }
  button[type="submit"]:hover:not(:disabled)::after {
    animation: none;
  }
  button[type="submit"].is-loading::before {
    animation: none;
  }
}

/* ==========================================================================
   Professional dashboard shell — unchanged, still consumed by
   professional/dashboard.html. Left as-is deliberately; that page is outside
   the scope of this pass.
   ========================================================================== */

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.25rem;
}

.dashboard-shell {
  max-width: 40rem;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.dashboard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.dashboard-nav button {
  padding: 0.5rem 0.875rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fafafa;
  color: #888;
  cursor: default;
}

.logout-button {
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fafafa;
  cursor: pointer;
}
