/* GigLedger site + admin styles. One small dependency-free stylesheet. */
:root {
  --bg: #0f1419;
  --surface: #171e26;
  --surface-2: #1e2833;
  --ink: #e8edf2;
  --muted: #9aa7b4;
  --brand: #34d399;
  --brand-ink: #06281c;
  --accent: #60a5fa;
  --danger: #f87171;
  --warn-bg: #3a2a1e;
  --ok-bg: #123326;
  --err-bg: #3a1d20;
  --border: #26313d;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.centered { text-align: center; }

/* Buttons */
.btn {
  display: inline-block; border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 16px; background: var(--surface-2); color: var(--ink);
  font-weight: 600; cursor: pointer; font-size: .95rem; text-decoration: none;
}
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-lg { padding: 13px 24px; font-size: 1.05rem; }
.btn-small { padding: 5px 10px; font-size: .85rem; }

/* ---------- Public site ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; max-width: 1180px; margin: 0 auto;
}
.site-header nav a { color: var(--ink); margin-left: 20px; font-weight: 500; }
.brand { font-weight: 800; font-size: 1.25rem; color: var(--ink); letter-spacing: -.02em; }
.brand span { color: var(--brand); }
.site-header .brand:hover { text-decoration: none; }

.hero {
  max-width: 1180px; margin: 24px auto 0; padding: 40px 24px 56px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center;
}
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -.03em; }
.hero h1 em { color: var(--brand); font-style: normal; }
.lead { font-size: 1.15rem; color: var(--muted); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 10px; }

.phone {
  background: linear-gradient(160deg, #1c2632, #131a22);
  border: 1px solid var(--border); border-radius: 28px; padding: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.phone-head { display: flex; gap: 6px; margin-bottom: 18px; }
.phone-head span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.phone-label { color: var(--muted); font-size: .75rem; letter-spacing: .12em; }
.phone-figure { font-size: 3rem; font-weight: 800; color: var(--brand); margin-bottom: 14px; }
.phone-row { display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px dashed var(--border); }
.phone-total { border-bottom: none; color: var(--muted); }

.section { max-width: 1180px; margin: 0 auto; padding: 56px 24px; }
.section-alt { background: var(--surface); max-width: none; }
.section-alt > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.section h2 { font-size: 1.9rem; text-align: center; margin-bottom: 28px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; }
.feature h3 { font-size: 1.1rem; color: var(--brand); }
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 32px; align-items: stretch; }
.price-card { position: relative; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; }
.price-card ul { padding-left: 18px; color: var(--muted); flex: 1; }
.price-card .btn { margin-top: 14px; text-align: center; }
.price-card-featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.price-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: var(--brand-ink); font-size: .72rem; font-weight: 800;
  padding: 3px 10px; border-radius: 99px; letter-spacing: .08em; }
.price { font-size: 1.7rem; font-weight: 800; margin-bottom: 10px; }
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 18px; }

.site-footer { border-top: 1px solid var(--border); margin-top: 40px;
  padding: 28px 24px; text-align: center; display: grid; gap: 8px; }
.site-footer nav a { margin: 0 10px; }

.legal { max-width: 860px; }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.25rem; margin-top: 1.8em; text-align: left; }
.legal h3 { font-size: 1.02rem; margin-top: 1.2em; }
.narrow { max-width: 680px; }

.contact-form { display: grid; gap: 14px; margin-top: 22px; }
label { display: grid; gap: 6px; font-weight: 600; }
input, select, textarea {
  background: var(--surface); border: 1px solid var(--border); color: var(--ink);
  border-radius: 9px; padding: 10px 12px; font: inherit; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); }
label.inline { display: flex; flex-direction: row; align-items: center; gap: 9px;
  font-weight: 500; margin: 10px 0; }
label.inline input { width: auto; }
.hp { position: absolute; left: -9999px; height: 1px; width: 1px; }

.alert { padding: 11px 15px; border-radius: 9px; margin: 12px 0; font-size: .95rem; }
.alert-ok { background: var(--ok-bg); border: 1px solid #1f5c42; }
.alert-err { background: var(--err-bg); border: 1px solid #6e2a2f; color: #fecaca; }

/* ---------- Admin ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; }
.login-card { width: min(380px, 92vw); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
  display: grid; gap: 14px; }
.login-card h1 { font-size: 1.4rem; }
.login-card h1 span { color: var(--brand); }

.admin-topbar { display: flex; align-items: center; gap: 22px;
  padding: 12px 22px; background: var(--surface); border-bottom: 1px solid var(--border); }
.admin-topbar nav { display: flex; gap: 4px; flex: 1; }
.nav-link { color: var(--muted); padding: 7px 12px; border-radius: 8px; font-weight: 600; }
.nav-link:hover { color: var(--ink); text-decoration: none; background: var(--surface-2); }
.nav-link.active { color: var(--brand); background: var(--surface-2); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.admin-main { max-width: 1200px; margin: 0 auto; padding: 24px 22px 60px; }
.admin-footer { border-top: 1px solid var(--border); color: var(--muted);
  padding: 18px 22px; text-align: center; font-size: .85rem; }
.page-head { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 1.5rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.kpi { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; }
.kpi-value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
.kpi-label { color: var(--muted); font-size: .88rem; }
.kpi-sub { font-size: .78rem; margin-top: 2px; }

.card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.card h2 { font-size: 1.1rem; margin-top: 0; }
.grid-two { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; align-items: start; }
.stack { display: grid; gap: 0; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.btn-row { display: flex; gap: 10px; }
.json-preview { background: var(--bg); border: 1px solid var(--border);
  border-radius: 9px; padding: 12px; overflow: auto; font-size: .78rem; max-height: 340px; }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 9px 10px;
  border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .05em; }
.row-done { opacity: .5; }
.message-cell { max-width: 420px; }
.pill { display: inline-block; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 99px; padding: 2px 10px; font-size: .78rem; }
.pill-ok { background: var(--ok-bg); border-color: #1f5c42; }
.pill-err { background: var(--err-bg); border-color: #6e2a2f; }

.range-toggle { display: flex; gap: 6px; }

/* CSS bar chart */
.chart { margin: 8px 0 12px; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem;
  color: var(--muted); margin-bottom: 10px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.dot-installs { background: var(--accent); }
.dot-views { background: #a78bfa; }
.dot-checkouts { background: #fbbf24; }
.dot-purchases { background: var(--brand); }
.chart-bars { display: flex; align-items: flex-end; gap: 2px; height: 170px;
  border-bottom: 1px solid var(--border); }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
  height: 100%; }
.bar-stack { flex: 1; display: flex; align-items: flex-end; gap: 1px; padding: 0 2px; }
.bar { width: 25%; min-height: 1px; border-radius: 2px 2px 0 0; }
.bar-label { text-align: center; font-size: .62rem; color: var(--muted); padding-top: 4px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .feature-grid, .pricing-grid, .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-two { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .feature-grid, .pricing-grid, .kpi-grid { grid-template-columns: 1fr; }
  .site-header { flex-wrap: wrap; gap: 8px; }
  .row-3 { grid-template-columns: 1fr; }
  .admin-topbar { flex-wrap: wrap; }
}
