:root {
  --bg: #f5f5f7;
  --bg-2: #fbfbfd;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: rgba(0,0,0,.08);
  --line-2: rgba(0,0,0,.12);
  --accent: #0071e3;
  --accent-2: #2997ff;
  --ok: #1d7a46;
  --ok-bg: #e8f6ee;
  --err: #b3261e;
  --err-bg: #fdecea;
  --warn: #9a6700;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.06);
  --nav-h: 52px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: 16px; }
h1,h2,h3,h4 { letter-spacing: -.022em; }

.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.container-n { width: min(980px, calc(100% - 40px)); margin: 0 auto; }

/* Nav */
.m-nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(251,251,253,.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.m-nav .inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 600; font-size: 15px; letter-spacing: -.01em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img { height: 22px; width: auto; display: block; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--text); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.m-links { display: flex; align-items: center; gap: 22px; }
.m-links a { color: var(--text); font-size: 12px; opacity: .88; text-decoration: none; }
.m-links a:hover { opacity: 1; text-decoration: none; }
.nav-cta { display: flex; gap: 8px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer;
  border-radius: 980px;
  padding: 11px 20px;
  font-size: 14px; font-weight: 500;
  letter-spacing: -.01em;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
}
.btn:hover { text-decoration: none; transform: scale(1.015); }
.btn:active { transform: scale(.985); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-blue { background: var(--accent); color: #fff; }
.btn-blue:hover { background: #0077ed; color: #fff; }
.btn-ghost { background: transparent; color: var(--accent); padding-inline: 12px; }
.btn-line { background: #fff; color: var(--text); border: 1px solid var(--line-2); }
.btn-line:hover { background: #f5f5f7; color: var(--text); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-danger { background: var(--err); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* Hero */
.hero {
  padding: 88px 0 64px;
  text-align: center;
  background:
    radial-gradient(1200px 400px at 50% -40px, rgba(0,113,227,.08), transparent 60%),
    var(--bg-2);
}
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 16px;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05; font-weight: 600; margin: 0 auto 18px;
  max-width: 16ch;
}
.hero .lead, .lead {
  color: var(--muted); font-size: 21px; line-height: 1.4; margin: 0 auto 28px; max-width: 36ch;
}
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--faint); }

/* Sections */
.section { padding: 72px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 10px; font-weight: 600; }
.section-head p { margin: 0 auto; color: var(--muted); max-width: 46ch; }

.pack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}
.pack {
  background: var(--card);
  border-radius: 22px;
  padding: 32px 28px 28px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  border: 1px solid transparent;
}
.pack.featured {
  background: var(--text);
  color: #fff;
}
.pack.featured .muted, .pack.featured .feat-list { color: rgba(255,255,255,.72); }
.pack .price {
  font-size: 40px; font-weight: 600; letter-spacing: -.03em; margin: 14px 0 4px;
}
.pack .price span { font-size: 15px; font-weight: 500; opacity: .7; }
.pack h3 { margin: 0; font-size: 24px; }
.pack .tag { margin: 8px 0 0; color: var(--muted); }
.pack.featured .tag { color: rgba(255,255,255,.7); }
.feat-list { list-style: none; padding: 0; margin: 22px 0 28px; flex: 1; }
.feat-list li {
  padding: 8px 0 8px 22px; position: relative; font-size: 14px; color: var(--muted);
}
.feat-list li:before {
  content: ""; position: absolute; left: 0; top: 14px;
  width: 10px; height: 5px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); opacity: .7;
}
.feat-list li.off { opacity: .35; text-decoration: line-through; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
  background: var(--card); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow);
}
.tile h3 { margin: 0 0 8px; font-size: 19px; }
.tile p { margin: 0; color: var(--muted); font-size: 15px; }

.cta-band {
  margin: 24px auto 80px;
  background: var(--text); color: #fff;
  border-radius: 28px; padding: 56px 32px; text-align: center;
}
.cta-band h2 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 40px); }
.cta-band p { color: rgba(255,255,255,.7); margin: 0 0 22px; }

/* Footer */
.m-footer {
  background: #f5f5f7; border-top: 1px solid var(--line);
  padding: 48px 0 28px; color: var(--muted); font-size: 13px;
}
.f-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 36px; }
.m-footer h4 { color: var(--text); font-size: 12px; margin: 0 0 12px; letter-spacing: .04em; text-transform: uppercase; }
.m-footer a { color: var(--muted); display: block; padding: 4px 0; text-decoration: none; }
.m-footer a:hover { color: var(--text); }
.f-bottom { border-top: 1px solid var(--line); padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Auth */
.auth-shell {
  min-height: 100vh; display: grid; place-items: center; padding: 40px 16px;
  background:
    radial-gradient(800px 280px at 50% 0, rgba(0,113,227,.07), transparent 55%),
    var(--bg-2);
}
.auth-card {
  width: min(480px, 100%);
  background: #fff; border-radius: 24px; padding: 40px 36px;
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 32px; margin: 0 0 8px; }
.auth-card .lead { font-size: 16px; margin-bottom: 24px; }
.wide-card { width: min(720px, 100%); }

/* Forms */
.stack { display: grid; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field span, .label {
  font-size: 12px; font-weight: 500; color: var(--muted);
}
.field input, .field select, .field textarea, .input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  outline: none;
  transition: border .15s, box-shadow .15s;
}
.field textarea, .textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,113,227,.15);
}
.field input[type="file"] {
  padding: 10px;
  background: #fafafa;
}
.h-sm { font-size: 15px; margin: 8px 0 0; }

.chk {
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer; font-size: 14px; color: var(--muted); line-height: 1.45;
  user-select: none;
}
.chk input {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; margin: 0; flex: 0 0 22px;
  border: 1.5px solid #d2d2d7; border-radius: 6px; background: #fff;
  display: grid; place-items: center; cursor: pointer;
  transition: background .15s, border .15s, transform .15s;
}
.chk input:hover { border-color: #86868b; }
.chk input:checked {
  background: var(--text); border-color: var(--text);
}
.chk input:checked::after {
  content: ""; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.chk input:focus-visible { box-shadow: 0 0 0 4px rgba(0,113,227,.18); }
.chk a { color: var(--text); text-decoration: underline; }

.alert {
  border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px;
}
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-err { background: var(--err-bg); color: var(--err); }
.alert-warn { background: #fff6e0; color: var(--warn); }

/* App shell */
.app {
  min-height: 100vh; display: grid;
  grid-template-columns: 248px 1fr;
}
.side {
  background: #1d1d1f; color: #fff;
  padding: 22px 14px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}
.side .brand { color: #fff; padding: 6px 10px 18px; }
.side nav { display: grid; gap: 2px; }
.side a {
  color: rgba(255,255,255,.72); text-decoration: none;
  padding: 9px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
}
.side a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.side a.active { background: rgba(255,255,255,.12); color: #fff; }
.side .grow { flex: 1; }
.side .who { padding: 12px 12px 4px; font-size: 12px; color: rgba(255,255,255,.5); }
.main { padding: 28px 32px 64px; min-width: 0; }
.page-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.page-h h1 { margin: 0; font-size: 32px; }
.page-h p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat {
  background: #fff; border-radius: 16px; padding: 18px 18px 16px; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 26px; letter-spacing: -.03em; }
.stat span { color: var(--faint); font-size: 12px; }

.card {
  background: #fff; border-radius: 18px; padding: 22px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card h2 { margin: 0 0 16px; font-size: 18px; }

.table-wrap { overflow: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line);
}
table.data td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: #f0f0f2; color: var(--text);
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: #fff6e0; color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-blue { background: #e8f1fc; color: #0a5ec2; }

.switch {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px;
}
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 26px; margin: 0;
  background: #d2d2d7; border-radius: 999px; position: relative; cursor: pointer; transition: .2s; }
.switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked { background: var(--text); }
.switch input:checked::after { left: 19px; }

.matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.matrix th, .matrix td { padding: 10px; border-bottom: 1px solid var(--line); text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }

.legal-content { background: #fff; border-radius: 22px; padding: 40px; box-shadow: var(--shadow); }
.legal-content h1 { margin-top: 0; }
.legal-content h2 { font-size: 22px; margin-top: 28px; }
.legal-wrap { padding: 48px 0 80px; }

/* Public digital */
.pub { min-height: 100vh; }
.pub.light { background: #fbfbfd; color: #1d1d1f; }
.pub.dark { background: #000; color: #f5f5f7; }
.pub-wrap { width: min(760px, calc(100% - 28px)); margin: 0 auto; padding: 20px 0 88px; }
.pub-photo {
  margin: 0 0 32px; border-radius: 32px; overflow: hidden; background: #ececec;
  box-shadow: 0 24px 60px rgba(0,0,0,.12);
}
.pub-photo img { display: block; width: 100%; height: min(72vw, 520px); object-fit: cover; }
.pub-photo-fallback {
  height: min(52vw, 380px); display: grid; place-items: center;
  background: linear-gradient(165deg, #2c2c2e, #1d1d1f);
  color: #fff; font-size: 88px; font-weight: 600;
}
.pub-hero { padding: 4px 8px 4px; text-align: center; }
.pub-hero h1 { font-size: clamp(34px, 6vw, 52px); margin: 0 0 12px; letter-spacing: -.03em; }
.pub-hero p { color: inherit; opacity: .7; max-width: 42ch; margin: 0 auto; font-size: 17px; }
.pub-actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin: 28px 0 36px;
}
.pub-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 20px; border-radius: 980px; font-size: 15px; font-weight: 500;
  text-decoration: none; min-width: 210px;
}
.pub-btn:hover { text-decoration: none; transform: scale(1.02); }
.pub-btn-wa { background: #1d1d1f; color: #fff; }
.pub.dark .pub-btn-wa { background: #fff; color: #1d1d1f; }
.pub-btn-line { background: #fff; color: #1d1d1f; border: 1px solid rgba(0,0,0,.12); }
.pub.dark .pub-btn-line { background: transparent; color: #f5f5f7; border-color: rgba(255,255,255,.2); }
.pub-body { margin-bottom: 20px; }
.pub-catalog { margin: 8px 0 28px; }
.pub-catalog h2 { font-size: 28px; margin: 0 0 16px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.product-card {
  background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
}
.pub.dark .product-card { background: #111; }
.product-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.product-card-body { padding: 16px; }
.product-card-body h3 { margin: 0 0 8px; font-size: 17px; }
.product-card-body p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.pub-contact { margin-top: 8px; }
.pub-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; padding-bottom: 80px; }
.pub .card { background: rgba(255,255,255,.9); }
.pub.dark .card { background: #111; color: #f5f5f7; box-shadow: none; }
.seo-article { max-width: 720px; margin: 0 auto; padding: 64px 20px 96px; }
.seo-article h1 { font-size: 40px; }
.seo-article .meta { color: var(--muted); margin-bottom: 28px; }
.prose h2 { font-size: 26px; margin-top: 28px; }
.prose p { color: var(--muted); }

.chart-box { height: 280px; }

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.searchbar { display: flex; gap: 8px; margin-bottom: 16px; }
.searchbar input { flex: 1; }

.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 13px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

.mobile-only { display: none; }

@media (max-width: 980px) {
  .pack-grid, .grid-3, .stats, .pub-grid, .f-grid { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .side { position: relative; height: auto; }
  .grid-2 { grid-template-columns: 1fr; }
  .main { padding: 20px 16px 48px; }
  .hero { padding: 56px 0 40px; }
}

table.data select {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
  max-width: 160px;
}
.flash-toast { transition: opacity .4s ease; }

@media (max-width: 640px) {
  .m-links { display: none; }
  .mobile-only { display: initial; }
}
