/* ═══════════════════════════════════════════════════════════════════════
   Hintonn Customer Portal — shared stylesheet
   Matches the main site: yellow/amber on warm off-white, Satoshi headings,
   Inter body, floating header, 16px card radius.
   Used by: login.html, onboarding.html, dashboard.html, admin.html
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --yellow: #F8C537;
  --yellow-hover: #e5b22e;
  --amber: #FFB800;
  --orange: #FF8A00;
  --rich-black: #111111;
  --white: #ffffff;
  --bg-warm: #fdf9f8;
  --soft-gray: rgba(0,0,0,0.06);
  --text-gray: rgba(0,0,0,0.45);
  --text-body: rgba(0,0,0,0.72);
  --dark-gray: #2A2A2A;
  --border-light: rgba(0,0,0,0.09);
  --success: #10B981;
  --danger: #DC2626;
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.07);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.09);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-heading: 'Satoshi', 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --container: 1200px;
  --transition: 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--rich-black);
  background: var(--bg-warm);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-family: var(--font-heading); }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ── Floating header (mirrors the main site) ───────────────────────────── */
/* body is `display:flex; flex-direction:column`, and auto cross-axis
   margins switch off flex stretch — so without an explicit width the
   header shrink-wraps to its content (~694px) and the bar behind it ends
   up a stub in the middle of the screen. width:100% + max-width + auto
   margins is what gives the full container-width pill the site uses. */
.site-header {
  position: sticky; top: 14px; z-index: 1000;
  width: 100%;
  max-width: var(--container);
  margin: 14px auto 0;
  padding: 0.7rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border-radius: 14px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.logo-wrap { display: flex; align-items: center; gap: 9px; flex: none; }
.logo-wrap img { height: 30px; width: auto; display: block; }
.logo-fallback {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem;
  color: var(--rich-black);
}
.nav-center-links { display: flex; align-items: center; gap: 26px; flex: 1; justify-content: center; }
.nav-center-links a {
  font-size: 0.87rem; font-weight: 500; color: var(--text-body);
  transition: color .25s;
}
.nav-center-links a:hover { color: var(--rich-black); }
.nav-right-section { display: flex; align-items: center; gap: 12px; flex: none; }

.nav-login-link {
  background: var(--yellow); color: var(--rich-black) !important;
  padding: 9px 20px; border-radius: 999px;
  font-size: 0.83rem; font-weight: 700; white-space: nowrap;
  transition: background .25s, transform .25s;
}
.nav-login-link:hover { background: var(--yellow-hover); transform: translateY(-1px); }

.nav-hamburger {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; flex-direction: column; gap: 5px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px; background: var(--rich-black);
  border-radius: 2px; transition: transform .25s ease, opacity .2s ease;
}
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ── Sign out (header) ─────────────────────────────────────────────────
   .nav-login-link is a filled yellow pill, so a second one beside it
   would look like a pair of competing buttons. Plain text action instead. */
.site-header .nav-right-section a.nav-logout {
  font-size: 0.84rem; font-weight: 600; color: rgba(0,0,0,0.6);
  padding: 9px 12px; border-radius: 8px; transition: background .2s, color .2s;
}
.site-header .nav-right-section a.nav-logout:hover {
  color: var(--danger); background: rgba(220,38,38,0.07);
}

/* ── Mobile menu ─────────────────────────────────────────────────────────
   The portal pages shipped a hamburger with no menu behind it. Once
   .nav-center-links is hidden at 980px that left mobile users with no
   navigation at all, so this is the menu the hamburger opens. */
.mobile-menu {
  position: fixed; top: 0; right: -100%;
  width: 100%; height: 100vh;
  background: var(--rich-black);
  z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.5rem;
  transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-menu.open { right: 0; }
.mobile-menu a {
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700;
  color: var(--white); text-align: center;
  transition: color .2s;
}
.mobile-menu a:hover { color: var(--yellow); }
.mobile-menu a.btn {
  font-size: 0.95rem; padding: 0.8rem 1.7rem; border-radius: 999px;
  background: var(--yellow); color: var(--rich-black) !important;
  margin-top: 0.5rem;
}
.mobile-menu a.btn:hover { background: var(--yellow-hover); }

/* ── Page shell ────────────────────────────────────────────────────────── */
.portal-main { flex: 1; width: 100%; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 2rem; }
.container.narrow { max-width: 880px; }
.portal-wrap { padding: 44px 0 84px; }

.page-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.78rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--orange); margin-bottom: 10px;
}
.page-title {
  font-weight: 800;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.15;
  color: var(--rich-black); margin-bottom: 10px;
}
.page-sub { font-size: 1rem; color: var(--text-body); max-width: 62ch; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--white); border: 1px solid var(--soft-gray);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 28px; margin-bottom: 22px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.card-title { font-weight: 700; font-size: 1.1rem; color: var(--rich-black); }
.card-hint { font-size: 0.83rem; color: var(--text-gray); }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.field { display: block; margin-bottom: 18px; }
.field-label { display: block; font-size: 0.83rem; font-weight: 600; color: var(--dark-gray); margin-bottom: 7px; }
.field-label .req { color: var(--danger); }
.field-input {
  width: 100%; padding: 13px 15px; background: var(--white);
  border: 1.5px solid var(--border-light); border-radius: var(--radius-md);
  font-size: 0.95rem; color: var(--dark-gray); outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.field-input::placeholder { color: var(--text-gray); }
.field-input:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(248,197,55,0.18); }
.field-input:disabled { background: var(--bg-warm); cursor: not-allowed; }
.field-help { display: block; margin-top: 6px; font-size: 0.75rem; color: var(--text-gray); }
.field-error { display: block; margin-top: 6px; font-size: 0.75rem; color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border: none; border-radius: 999px;
  font-family: var(--font-heading); font-size: 0.92rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: transform .25s, box-shadow .25s, background .25s, opacity .25s;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

.btn-primary { background: var(--yellow); color: var(--rich-black);
  box-shadow: 0 6px 20px rgba(248,197,55,0.35); }
.btn-primary:hover:not(:disabled) { background: var(--yellow-hover); transform: translateY(-2px); }

.btn-yellow { background: var(--yellow); color: var(--rich-black); box-shadow: 0 6px 20px rgba(248,197,55,0.35); }
.btn-yellow:hover:not(:disabled) { background: var(--yellow-hover); transform: translateY(-2px); }

.btn-dark { background: var(--rich-black); color: var(--white); }
.btn-dark:hover:not(:disabled) { background: var(--dark-gray); transform: translateY(-2px); }

.btn-ghost { background: var(--white); color: var(--rich-black); border: 1.5px solid var(--border-light); }
.btn-ghost:hover:not(:disabled) { border-color: var(--yellow); background: var(--white); }

.btn-google {
  background: var(--white); color: var(--rich-black);
  border: 1.5px solid var(--border-light); width: 100%;
}
.btn-google:hover:not(:disabled) { border-color: var(--yellow); box-shadow: var(--shadow-sm); }
.btn-google svg { width: 19px; height: 19px; }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 17px; font-size: 0.82rem; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: var(--white);
  animation: hn-spin .7s linear infinite;
}
.btn-yellow .spinner, .btn-ghost .spinner, .btn-dark .spinner { border-color: rgba(0,0,0,0.2); border-top-color: currentColor; }
@keyframes hn-spin { to { transform: rotate(360deg); } }

/* ── Alerts ────────────────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 16px; border-radius: var(--radius-md);
  font-size: 0.86rem; margin-bottom: 18px; line-height: 1.55;
}
.alert svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.alert-error   { background: rgba(220,38,38,0.06); border: 1px solid rgba(220,38,38,0.18); color: #B91C1C; }
.alert-success { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.22); color: #047857; }
.alert-info    { background: rgba(248,197,55,0.14); border: 1px solid rgba(248,197,55,0.4); color: var(--dark-gray); }
.alert-warn    { background: rgba(255,184,0,0.1); border: 1px solid rgba(255,184,0,0.35); color: #8a5a00; }
.alert[hidden] { display: none; }

/* ── Login page ────────────────────────────────────────────────────────── */
.auth-shell { flex: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: calc(100vh - 70px); }
.auth-brand {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 500px at 10% 0%, rgba(248,197,55,0.28), transparent 60%),
              linear-gradient(155deg, var(--rich-black) 0%, #1c1c1c 60%, #23201a 100%);
  color: var(--white); padding: 64px 60px;
  display: flex; flex-direction: column; justify-content: center;
}
.auth-brand::before {
  content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  top: -200px; right: -180px; pointer-events: none;
  background: radial-gradient(circle, rgba(248,197,55,0.22), transparent 68%);
}
.auth-brand-inner { position: relative; z-index: 1; max-width: 470px; }
.auth-brand h1 { font-weight: 800; font-size: clamp(1.85rem, 3.2vw, 2.6rem); line-height: 1.13; margin-bottom: 18px; }
.auth-brand h1 em { font-style: normal; color: var(--yellow); }
.auth-brand p { font-size: 1rem; color: rgba(255,255,255,0.7); margin-bottom: 32px; max-width: 44ch; }
.auth-points { list-style: none; display: flex; flex-direction: column; gap: 17px; }
.auth-points li { display: flex; align-items: flex-start; gap: 13px; font-size: 0.92rem; color: rgba(255,255,255,0.86); }
.auth-points .tick {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  background: var(--yellow); display: flex; align-items: center; justify-content: center;
}
.auth-points .tick svg { width: 13px; height: 13px; stroke: var(--rich-black); }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 48px 32px; background: var(--bg-warm); }
.auth-card {
  width: 100%; max-width: 430px; background: var(--white);
  border: 1px solid var(--soft-gray); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); padding: 36px;
}
.auth-card h2 { font-weight: 800; font-size: 1.5rem; margin-bottom: 6px; }
.auth-card .auth-lead { font-size: 0.89rem; color: var(--text-body); margin-bottom: 26px; }
.auth-divider {
  display: flex; align-items: center; gap: 14px; margin: 22px 0;
  color: var(--text-gray); font-size: 0.76rem;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }
.auth-switch { text-align: center; margin-top: 22px; font-size: 0.86rem; color: var(--text-body); }
.auth-switch a { font-weight: 700; color: var(--rich-black); text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.auth-forgot { text-align: right; margin: -8px 0 18px; }
.auth-forgot a { font-size: 0.8rem; color: var(--text-body); }

/* ── Status pill ───────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-live       { background: rgba(16,185,129,0.12); color: #047857; }
.pill-progress   { background: rgba(248,197,55,0.28); color: #8a5a00; }
.pill-testing    { background: rgba(255,138,0,0.16); color: #a34d00; }
.pill-onboarding { background: rgba(0,0,0,0.07); color: var(--text-body); }

/* ── Footer ────────────────────────────────────────────────────────────── */
.portal-footer {
  border-top: 1px solid var(--soft-gray); background: var(--white);
  padding: 24px 32px; text-align: center;
  font-size: 0.8rem; color: var(--text-gray);
}
.portal-footer a { color: var(--text-body); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; min-height: auto; }
  .auth-brand { padding: 44px 32px; }
  .auth-brand-inner { max-width: 100%; }
  .nav-center-links { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 768px) {
  .site-header { padding: 0.55rem 1rem; border-radius: 12px; }
  .container { padding: 0 1.5rem; }
  .card { padding: 22px 18px; }
  .auth-card { padding: 28px 22px; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-login-link { padding: 8px 16px; font-size: 0.79rem; }
}
@media (max-width: 480px) {
  .mobile-menu a { font-size: 1.25rem; }
  .site-header { top: 8px; margin-top: 8px; }
  .container { padding: 0 1.2rem; }
  .portal-wrap { padding: 30px 0 60px; }
  .auth-brand { padding: 34px 20px; }
  .auth-card { padding: 24px 18px; border-radius: var(--radius-lg); }
  .card { padding: 20px 16px; border-radius: var(--radius-md); }
  .btn-row .btn { flex: 1 1 100%; }
}

/* ── Header padding by breakpoint (mirrors the main site) ───────────────
   These are last on purpose: at exactly 768px both this and the
   max-width:768px rule match, so source order decides the winner. */
@media (min-width: 768px)  { .site-header { padding: 0.7rem 2rem;   border-radius: 14px; } }
@media (min-width: 1024px) { .site-header { padding: 0.7rem 2.2rem; } }
