@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #08080b;
  --bg-elevated: #131318;
  --bg-soft: #1a1a21;
  --card: rgba(255,255,255,0.045);
  --card-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --text: #f3f1ea;
  --muted: #8c8a94;
  --muted-2: #605e68;
  --gold: #f0b429;
  --gold-light: #ffd76a;
  --gold-dark: #b8860b;
  --gradient-gold: linear-gradient(135deg, #ffe29a 0%, #f5b942 45%, #d9862a 100%);
  --gradient-bg: radial-gradient(circle at 15% 0%, rgba(240,180,41,0.16), transparent 45%),
                 radial-gradient(circle at 90% 20%, rgba(120,80,220,0.10), transparent 40%),
                 var(--bg);
  --green: #4ade80;
  --red: #fb7185;
  --shadow-glow: 0 8px 30px rgba(240,180,41,0.22);
  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  background: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--text);
  padding-bottom: 48px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: #1a1200; }

a { color: var(--gold-light); }

/* ---------- Site header (global branding + nav) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(8,8,11,0.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: 1000px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
}
.site-logo {
  font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: 0.85rem; font-weight: 600;
  padding: 8px 14px; border-radius: 100px; transition: all .15s ease;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--text); background: var(--card); }
.site-nav a.nav-btn {
  background: var(--gradient-gold); color: #241703; padding: 8px 16px;
}
.site-nav a.nav-btn:hover { background: var(--gradient-gold); opacity: 0.92; }

@media (max-width: 560px) {
  .site-header-inner { justify-content: center; padding: 12px 16px; gap: 8px; }
  .site-logo { font-size: 0.95rem; }
  .site-nav { width: 100%; justify-content: center; gap: 4px; }
  .site-nav a { padding: 7px 11px; font-size: 0.78rem; }
}

/* ---------- Site footer ---------- */
.site-footer { margin-top: 56px; border-top: 1px solid var(--border); padding: 28px 20px; }
.site-footer-inner {
  max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column;
  align-items: center; gap: 14px; text-align: center;
}
.site-footer .footer-brand { font-weight: 800; color: var(--text); font-size: 1rem; }
.site-footer .footer-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.site-footer .footer-links a { color: var(--muted); text-decoration: none; font-size: 0.82rem; font-weight: 600; }
.site-footer .footer-links a:hover { color: var(--gold-light); }
.site-footer .footer-copy { color: var(--muted-2); font-size: 0.76rem; }

/* ---------- Header ---------- */
header.top {
  background: linear-gradient(180deg, rgba(19,19,24,0.9), rgba(19,19,24,0.5) 80%, transparent);
  color: var(--text);
  padding: 26px 20px 22px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--border);
}
header.top h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
header.top p {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
header.top .top-actions { position: absolute; right: 16px; top: 24px; }
header.top .top-actions a {
  color: var(--text); font-size: 0.8rem; text-decoration: none; font-weight: 600;
  background: var(--card); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 100px; transition: all .15s ease;
}
header.top .top-actions a:hover { background: var(--card-hover); border-color: var(--border-strong); }

/* ---------- Layout ---------- */
.wrap { max-width: 640px; margin: 0 auto; padding: 20px 16px; }
.wrap.narrow { max-width: 440px; }
.wrap.wide { max-width: 1000px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 20px 40px -20px rgba(0,0,0,0.6);
}
.card h2 { font-weight: 700; letter-spacing: -0.01em; }
.card h3 { font-weight: 700; }

/* ---------- Form fields ---------- */
label { display: block; font-size: 0.82rem; margin-bottom: 6px; color: var(--muted); font-weight: 600; }
.field { margin-bottom: 16px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=file], select, textarea {
  width: 100%; padding: 13px 14px; font-size: 0.98rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-soft); color: var(--text);
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240,180,41,0.18);
}
input[type=file] { padding: 10px 12px; color: var(--muted); }
input[type=checkbox] { accent-color: var(--gold); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Buttons ---------- */
.btn {
  border: none; border-radius: 100px; padding: 13px 20px;
  font-size: 0.95rem; cursor: pointer; font-weight: 700; display: inline-block; text-decoration: none;
  text-align: center; transition: transform .12s ease, box-shadow .15s ease, opacity .15s ease;
  font-family: inherit;
}
.btn-primary {
  background: var(--gradient-gold); color: #241703;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 34px rgba(240,180,41,0.32); }
.btn-secondary {
  background: var(--card); color: var(--text); border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--card-hover); }
.btn-danger { background: rgba(251,113,133,0.12); color: var(--red); border: 1px solid rgba(251,113,133,0.3); }
.btn-danger:hover { background: rgba(251,113,133,0.2); }
.btn-block { width: 100%; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn-sm { padding: 8px 14px; font-size: 0.78rem; border-radius: 100px; }

/* ---------- Segmented tab control ---------- */
.seg { display: flex; border: 1px solid var(--border); border-radius: 100px; overflow: hidden; background: var(--bg-soft); padding: 3px; }
.seg button {
  flex: 1; padding: 9px 6px; border: none; background: transparent; color: var(--muted);
  font-size: 0.83rem; cursor: pointer; border-radius: 100px; font-family: inherit; font-weight: 600;
  transition: all .15s ease; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--gradient-gold); color: #241703; font-weight: 700; }

/* Wider tab bars (4+ buttons, e.g. account page tabs) need to shrink sooner than a plain 2-way toggle. */
.seg-wide button { font-size: 0.78rem; padding: 8px 6px; }
@media (max-width: 480px) {
  .seg-wide button { font-size: 0.72rem; padding: 7px 4px; }
}

/* ---------- Alerts ---------- */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 16px; border: 1px solid transparent; line-height: 1.5; }
.alert-success { background: rgba(74,222,128,0.1); color: var(--green); border-color: rgba(74,222,128,0.25); }
.alert-error { background: rgba(251,113,133,0.1); color: var(--red); border-color: rgba(251,113,133,0.25); }
.alert-warn { background: rgba(240,180,41,0.1); border-color: rgba(240,180,41,0.28); color: var(--gold-light); }
.alert-info { background: rgba(139,157,247,0.1); border-color: rgba(139,157,247,0.28); color: #a9b8f7; }

.hint { font-size: 0.76rem; color: var(--muted-2); margin-top: 6px; line-height: 1.5; }
.center { text-align: center; }
.links-row { text-align: center; margin-top: 16px; font-size: 0.86rem; color: var(--muted); }
.links-row a { color: var(--gold-light); text-decoration: none; font-weight: 600; }
.links-row a:hover { text-decoration: underline; }

/* ---------- Tables (admin) ---------- */
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table th, table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--border); }
table th { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
table tr:hover td { background: rgba(255,255,255,0.02); }
code { background: var(--bg-soft); padding: 3px 7px; border-radius: 6px; font-size: 0.82em; border: 1px solid var(--border); }

.badge { display: inline-block; padding: 4px 10px; border-radius: 100px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.03em; }
.badge-active { background: rgba(74,222,128,0.12); color: var(--green); }
.badge-pending { background: rgba(240,180,41,0.12); color: var(--gold-light); }
.badge-suspended { background: rgba(251,113,133,0.12); color: var(--red); }
.badge-expired { background: rgba(255,255,255,0.08); color: var(--muted); }

/* ---------- Shop branding on calculator ---------- */
.shop-brand { display: flex; align-items: center; gap: 12px; justify-content: center; }
.shop-brand img { height: 48px; width: 48px; object-fit: cover; border-radius: 12px; background: #fff; border: 1px solid var(--border); }
.shop-brand .names { text-align: left; }
.shop-brand .names .sname { font-weight: 800; font-size: 2rem; letter-spacing: -0.01em; }
.shop-brand .names .saddr { font-size: 0.75rem; color: var(--muted);     text-align: center; }
.shop-brand .names .saddr + .saddr {
    display: none;
}
/* ---------- Landing hero ---------- */
.hero {
  max-width: 720px; margin: 0 auto; padding: 64px 20px 20px; text-align: center;
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border);
  padding: 7px 16px; border-radius: 100px; font-size: 0.78rem; color: var(--gold-light);
  font-weight: 600; margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em;
  margin: 0 0 18px;
}
.hero h1 .grad {
  background: var(--gradient-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub {
  font-size: 1.05rem; color: var(--muted); max-width: 480px; margin: 0 auto 34px; line-height: 1.6;
}
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.hero .cta-row .btn { padding: 15px 30px; font-size: 1rem; }

.features {
  max-width: 960px; margin: 56px auto 0; padding: 0 20px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 20px; backdrop-filter: blur(20px);
}
.feature-card .icon {
  width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; background: var(--gradient-gold); margin-bottom: 16px;
}
.feature-card h3 { margin: 0 0 6px; font-size: 1rem; }
.feature-card p { margin: 0; font-size: 0.85rem; color: var(--muted); line-height: 1.55; }

/* ---------- Auth pages ---------- */
.auth-icon {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
  background: var(--gradient-gold);
}
.auth-header { text-align: center; margin-bottom: 6px; }
.auth-header h1 { font-size: 1.4rem; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.01em; }
.auth-header p { color: var(--muted); font-size: 0.88rem; margin: 0 0 24px; }

@media print {
  header.top, .rate-card, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .result-card { border: 1px solid #000; background: #fff; }
}
