/* ─── SMOOV DESIGN SYSTEM — matches cowork exactly ─────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  /* ── exact cowork tokens ── */
  --ink:        #0c100c;   /* near-black / primary dark bg & text */
  --sage:       #34573a;   /* deep forest green / brand accent */
  --sage-mid:   #4a7a52;   /* medium sage */
  --sage-pale:  #eef3ee;   /* very pale sage */
  --gold:       #b8904a;   /* warm gold / Elite tier */
  --gold-pale:  #f5edda;   /* pale gold */
  --cream:      #faf8f3;   /* body background */
  --stone:      #f1ece3;   /* right-panel / section background */
  --mist:       #d4e0d2;   /* pale grey-green */
  --text:       #0c100c;   /* primary text */
  --text-2:     #546054;   /* secondary text — muted sage */
  --text-3:     #8fa08f;   /* tertiary / placeholder */
  --border:     rgba(12,16,12,0.09);
  --border-2:   rgba(12,16,12,0.15);
  --border-light: rgba(255,255,255,0.07); /* on dark surfaces */

  --display: 'Cormorant Garamond', serif;
  --body:    'DM Sans', sans-serif;

  font-family: var(--body);
  background: var(--cream);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

body { background: var(--cream); color: var(--text); }
body.dark { background: var(--ink); color: var(--cream); }

/* ─── LOGO ─── */
.logo-img {
  height: 28px;
  width: auto;
  display: block;
}
/* On dark background — invert to white */
.logo-img.on-dark { filter: brightness(0) invert(1); }
/* On light background — keep natural lime color */
.logo-img.on-light { }

/* ─── TYPOGRAPHY ─── */
h1,h2,h3,h4 { font-family: var(--display); font-weight: 300; line-height: 1.1; }
p, span, a, button, input, label { font-family: var(--body); }

/* ─── NUMPAD / PIN ─── */
.pin-screen {
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2rem; padding: 2rem;
  background: var(--ink);
}
.pin-dots {
  display: flex; gap: 0.75rem; justify-content: center; margin: 0.5rem 0;
}
.pin-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.15s;
}
.pin-dot.filled { background: var(--sage); }

.numpad {
  display: grid; grid-template-columns: repeat(3, 72px);
  gap: 10px;
}
.numpad-key {
  width: 72px; height: 72px; border-radius: 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  color: #faf8f3; font-family: var(--body);
  font-size: 1.375rem; font-weight: 400;
  cursor: pointer; transition: background 0.12s, transform 0.08s;
  display: flex; align-items: center; justify-content: center;
}
.numpad-key:active { background: rgba(52,87,58,0.3); transform: scale(0.94); }
.numpad-key.empty { pointer-events: none; background: transparent; border-color: transparent; }

/* ─── BADGES ─── */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.65rem; border-radius: 99px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  font-family: var(--body);
}
.badge-core  { background: rgba(52,87,58,0.10);  color: var(--sage); }
.badge-rise  { background: rgba(52,87,58,0.12);  color: var(--sage-mid); }
.badge-elite { background: rgba(184,144,74,0.15); color: var(--gold); }
.badge-active   { background: rgba(52,87,58,0.10); color: var(--sage); }
.badge-inactive { background: rgba(84,96,84,0.12); color: var(--text-2); }
.badge-popular  { background: var(--sage); color: #fff; font-size: 0.65rem; padding: 0.2rem 0.55rem; }
.badge-entry    { background: rgba(84,96,84,0.10); color: var(--text-2); }
.badge-premium  { background: rgba(184,144,74,0.12); color: var(--gold); }
.badge-founding { background: var(--gold-pale); color: var(--gold); border: 1px solid rgba(184,144,74,0.2); }

/* ─── CARDS ─── */
/* On dark (ink) surface */
.card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 1.5rem;
}
/* On light (cream/stone) surface */
.card-light {
  background: #fff;
  border: 0.5px solid var(--border-2);
  border-radius: 8px;
  padding: 1.5rem;
}
.card-stone {
  background: var(--stone);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

/* ─── BUTTONS ─── */
/* Primary on dark bg (sage green) */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--sage); color: #fff;
  font-family: var(--body); font-weight: 500;
  font-size: 0.875rem; letter-spacing: 0.03em;
  padding: 0.875rem 2rem; border-radius: 4px;
  border: none; cursor: pointer; text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: var(--sage-mid); }
.btn-primary:active { transform: scale(0.98); }

/* Primary on light bg (ink) */
.btn-ink {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff;
  font-family: var(--body); font-weight: 500;
  font-size: 0.875rem; letter-spacing: 0.03em;
  padding: 0.875rem 2rem; border-radius: 4px;
  border: none; cursor: pointer; text-decoration: none;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-ink:hover { opacity: 0.85; }
.btn-ink:active { transform: scale(0.98); }

/* White button (on dark surfaces) */
.btn-white {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--ink);
  font-family: var(--body); font-weight: 500;
  font-size: 0.875rem; letter-spacing: 0.03em;
  padding: 0.875rem 2rem; border-radius: 4px;
  border: none; cursor: pointer; text-decoration: none;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-white:hover { opacity: 0.9; }
.btn-white:active { transform: scale(0.98); }

/* Gold button (Elite) */
.btn-gold {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: #fff;
  font-family: var(--body); font-weight: 500;
  font-size: 0.875rem; letter-spacing: 0.03em;
  padding: 0.875rem 2rem; border-radius: 4px;
  border: none; cursor: pointer; text-decoration: none;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-gold:hover { opacity: 0.9; }
.btn-gold:active { transform: scale(0.98); }

/* Secondary / ghost */
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-2);
  font-family: var(--body); font-weight: 400;
  font-size: 0.875rem; padding: 0.875rem 1.5rem; border-radius: 4px;
  border: none; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.btn-secondary:hover { color: var(--text); }

.btn-ghost-light {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: rgba(250,248,243,0.55);
  font-family: var(--body); font-weight: 400;
  font-size: 0.875rem; padding: 0.875rem 2rem; border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.12); cursor: pointer; text-decoration: none;
  transition: background 0.2s;
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.06); }

/* ─── NAV ─── */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem clamp(1.5rem,5vw,2.5rem);
  background: rgba(250,248,243,0.9); backdrop-filter: blur(16px);
  transition: box-shadow 0.3s;
}
.top-nav.scrolled {
  box-shadow: 0 1px 0 var(--border);
}

/* Nav on dark page */
.top-nav-dark {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem clamp(1.5rem,5vw,2.5rem);
  background: rgba(12,16,12,0.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ─── REVEAL ANIMATIONS ─── */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }
.reveal { opacity:0; transform:translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity:1; transform:none; }
.animate-in { animation: fadeUp 0.65s cubic-bezier(0.16,1,0.3,1) forwards; }

/* ─── TABS ─── */
.tab-bar {
  display: flex; gap: 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.tab-btn {
  flex: 1; padding: 1rem 0.5rem;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: rgba(250,248,243,0.35); font-family: var(--body); font-size: 0.75rem;
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500;
  cursor: pointer; transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
}
.tab-btn.active { color: var(--mist); border-bottom-color: var(--mist); }

/* Tabs on light bg */
.tab-bar-light {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
}
.tab-btn-light {
  flex: 1; padding: 0.875rem 0.5rem;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-3); font-family: var(--body); font-size: 0.75rem;
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500;
  cursor: pointer; transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
}
.tab-btn-light.active { color: var(--sage); border-bottom-color: var(--sage); }

/* ─── TABLES ─── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
  text-align: left; padding: 0.75rem 1rem;
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); border-bottom: 1px solid var(--border); font-weight: 500;
  font-family: var(--body);
}
.data-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-family: var(--body);
}
.data-table tr:hover td { background: var(--sage-pale); }

/* ─── QR OVERLAY ─── */
.qr-wrap {
  position: relative; display: inline-block;
  padding: 1.25rem; background: white; border-radius: 12px;
}
.qr-corner {
  position: absolute; width: 16px; height: 16px;
  border-color: var(--sage); border-style: solid; border-width: 0;
}
.qr-corner.tl { top:6px; left:6px; border-top-width:2px; border-left-width:2px; }
.qr-corner.tr { top:6px; right:6px; border-top-width:2px; border-right-width:2px; }
.qr-corner.bl { bottom:6px; left:6px; border-bottom-width:2px; border-left-width:2px; }
.qr-corner.br { bottom:6px; right:6px; border-bottom-width:2px; border-right-width:2px; }
.qr-scan-line {
  position: absolute; left: 10%; right: 10%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--sage-mid), transparent);
  animation: scanLine 2.5s ease-in-out infinite;
}
@keyframes scanLine { 0%,100%{top:12%} 50%{top:82%} }

/* ─── PROGRESS BARS ─── */
.progress-track {
  height: 5px; background: var(--border); border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.16,1,0.3,1);
}

/* ─── INPUTS ─── */
/* On dark */
.field-input {
  width: 100%; padding: 0.875rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 6px; color: #faf8f3;
  font-family: var(--body); font-size: 0.9375rem;
  outline: none; transition: border-color 0.2s;
}
.field-input:focus { border-color: var(--sage-mid); }
.field-input::placeholder { color: rgba(250,248,243,0.25); }

/* On light */
.field-input-light {
  width: 100%; padding: 0.875rem 1rem;
  background: white;
  border: 0.5px solid var(--border-2);
  border-radius: 6px; color: var(--ink);
  font-family: var(--body); font-size: 0.9375rem;
  outline: none; transition: border-color 0.2s;
}
.field-input-light:focus { border-color: var(--sage); }
.field-input-light::placeholder { color: var(--text-3); }
