/* Globe Wanderer Portal — Static styles
   Dark neo-technical, turquoise primary, coral/gold accents.
*/
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --bg: #0A0C10;
  --bg-2: #0f1218;
  --card: #16191f;
  --card-2: #1b1f27;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text: #e7ecf3;
  --text-dim: #9aa3b2;
  --text-mute: #6b7280;
  --brand: #00c2a8;
  --brand-2: #00e0c2;
  --brand-glow: rgba(0,194,168,0.18);
  --coral: #ff6b57;
  --gold: #f5c451;
  --danger: #ff5865;
  --success: #33d69f;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 8px 30px rgba(0,0,0,0.35);
  --sidebar-w: 260px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: 'Manrope', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4 { font-family: 'Sora', system-ui, sans-serif; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Auth layout ---------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(0,194,168,0.15), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(255,107,87,0.12), transparent 60%),
    var(--bg);
}
@media (min-width: 960px) { .auth-shell { grid-template-columns: 1.05fr 1fr; } }
.auth-hero { display: none; padding: 48px; position: relative; overflow: hidden; }
@media (min-width: 960px) { .auth-hero { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-hero .badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,0.03); color: var(--text-dim); font-size: 12px; }
.auth-hero h1 { font-size: 44px; line-height: 1.05; margin-top: 24px; }
.auth-hero p { color: var(--text-dim); max-width: 460px; margin-top: 16px; font-size: 16px; }
.auth-hero .globe { position: absolute; inset: auto -80px -120px auto; width: 520px; height: 520px; border-radius: 50%;
  background: conic-gradient(from 180deg at 50% 50%, rgba(0,194,168,0.35), rgba(255,107,87,0.25), rgba(245,196,81,0.25), rgba(0,194,168,0.35));
  filter: blur(2px); opacity: 0.35; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); animation: fadeUp .5s ease both; }
.auth-card h2 { font-size: 24px; }
.auth-card .subtitle { color: var(--text-dim); margin-top: 6px; font-size: 14px; }

/* ---------- Forms ---------- */
.field { display: block; margin-top: 16px; }
.field label { display:block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; letter-spacing: 0.02em; text-transform: uppercase; }
.input, .select, .textarea {
  width: 100%; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-glow); }
.row { display: flex; gap: 12px; }
.row .field { flex: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 14px;
  transition: transform .05s, background .15s, border-color .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #052722; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: rgba(255,255,255,0.04); }
.btn-danger { background: rgba(255,88,101,0.12); color: var(--danger); border-color: rgba(255,88,101,0.35); }
.btn-full { width: 100%; }

.helper { color: var(--text-dim); font-size: 13px; margin-top: 12px; }
.helper a { color: var(--brand); }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(0,194,168,0.05), transparent 40%), var(--bg-2);
  padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 20px; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--coral)); display: grid; place-items: center; color: #052722; font-family: 'Sora'; font-weight: 800; }
.brand-name { font-family: 'Sora'; font-weight: 700; letter-spacing: -0.01em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text-dim); font-size: 14px; }
.nav a:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.nav a.active { background: var(--brand-glow); color: var(--text); border: 1px solid rgba(0,194,168,0.35); }
.nav .section-label { color: var(--text-mute); font-size: 11px; padding: 14px 12px 6px; text-transform: uppercase; letter-spacing: 0.08em; }

.tier-card { margin-top: 20px; padding: 14px; border-radius: 14px; border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(0,194,168,0.15), rgba(255,107,87,0.12)); }
.tier-card h4 { font-size: 14px; }
.tier-card p { color: var(--text-dim); font-size: 12px; margin: 4px 0 10px; }
.progress { height: 6px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--gold)); }

.main { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 24px; border-bottom: 1px solid var(--border); background: rgba(10,12,16,0.7); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.topbar .search { flex: 1; max-width: 420px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--coral)); display: grid; place-items: center; color: #052722; font-weight: 700; }

.content { padding: 24px; max-width: 1280px; margin: 0 auto; }
.page-header { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; margin-bottom: 20px; }
.page-header h1 { font-size: 26px; }
.page-header p { color: var(--text-dim); margin-top: 4px; font-size: 14px; }

/* Cards & grid */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card h3 { font-size: 16px; }
.card .muted { color: var(--text-dim); font-size: 13px; }
.card.plan-card {
  background: radial-gradient(600px 200px at 0% 0%, rgba(0,194,168,0.15), transparent 60%), var(--card);
  border-color: rgba(0,194,168,0.25);
}

.stat { display:flex; flex-direction: column; gap: 6px; }
.stat .label { color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.stat .value { font-family: 'Sora'; font-size: 26px; font-weight: 700; }
.stat .delta { color: var(--success); font-size: 12px; }
.stat .delta.negative { color: var(--danger); }

/* Ring */
.ring { display: grid; place-items: center; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-track { stroke: rgba(255,255,255,0.08); }
.ring .ring-progress { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring .ring-center { position: absolute; text-align: center; }
.ring .ring-center .num { font-family: 'Sora'; font-size: 22px; font-weight: 700; }
.ring .ring-center .lbl { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.table th { color: var(--text-dim); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; background: rgba(255,255,255,0.02); }
.table tr:hover td { background: rgba(255,255,255,0.02); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border); }
.badge.brand { background: var(--brand-glow); color: var(--brand-2); border-color: rgba(0,194,168,0.35); }
.badge.gold { background: rgba(245,196,81,0.12); color: var(--gold); border-color: rgba(245,196,81,0.3); }
.badge.coral { background: rgba(255,107,87,0.12); color: var(--coral); border-color: rgba(255,107,87,0.3); }
.badge.mute { color: var(--text-dim); }

/* Chart */
.chart { width: 100%; height: 220px; }

/* QR card */
.qr-card { display: grid; gap: 16px; grid-template-columns: 180px 1fr; align-items: center; }
.qr-box { padding: 14px; background: #fff; border-radius: 12px; display: grid; place-items: center; }
@media (max-width: 620px) { .qr-card { grid-template-columns: 1fr; } .qr-box { justify-self: center; } }

/* Mobile sidebar */
.mobile-nav-btn { display: none; background: transparent; border: 1px solid var(--border-strong); color: var(--text); border-radius: 10px; padding: 8px 10px; }
.backdrop { display:none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; width: 280px; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .backdrop.open { display:block; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 30; }
  .mobile-nav-btn { display: inline-flex; }
  .content { padding: 16px; }
  .page-header { grid-template-columns: 1fr; }
}

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .5s ease both; }
.fade-up.delay-1 { animation-delay: .08s; }
.fade-up.delay-2 { animation-delay: .16s; }
.fade-up.delay-3 { animation-delay: .24s; }

/* Utility */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.text-dim { color: var(--text-dim); }
.text-brand { color: var(--brand-2); }
.text-right { text-align: right; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr { height: 1px; background: var(--border); margin: 16px 0; border: 0; }
.pill-input { display: flex; gap: 8px; align-items: center; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 6px 8px 6px 12px; }
.pill-input input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 14px; }
