*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background: #f8fafc; color: #0f172a; line-height: 1.55; }
img, svg { max-width: 100%; height: auto; }
code { background: #e2e8f0; padding: 2px 6px; border-radius: 6px; font-size: .9em; word-break: break-word; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.container.narrow { max-width: 680px; }
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }
.mb-16 { margin-bottom: 16px; }
.muted { color: #475569; }
.small { font-size: .875rem; }
.small-note { font-size: .875rem; color: #475569; margin-top: 10px; }
.divider { border: 0; border-top: 1px solid #e2e8f0; margin: 24px 0; }

/* Header & Nav */
.site-header { background: #ffffff; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 30; }
.header-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #0f172a; font-weight: 800; font-size: 1.1rem; }
.brand-badge { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: #2563eb; color: #fff; font-weight: 800; }
.main-nav { display: flex; align-items: center; gap: 16px; }
.main-nav a:not(.btn) { color: #334155; text-decoration: none; font-weight: 600; }
.inline-form { display: inline; margin: 0; }
.nav-toggle { display: none; background: transparent; border: 1px solid #cbd5e1; border-radius: 8px; padding: 6px 10px; font-size: 1.2rem; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 18px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: .95rem; transition: opacity .15s ease; }
.btn:hover { opacity: .92; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-outline { background: #fff; border-color: #cbd5e1; color: #0f172a; }
.btn-wa { background: #16a34a; color: #fff; }
.btn-ig { background: #db2777; color: #fff; }
.btn-danger { background: #dc2626; color: #fff; }

/* Sections & Cards */
.hero { padding: 48px 0; background: linear-gradient(135deg, #0f172a, #1e3a8a); color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: start; }
.hero h1 { font-size: clamp(1.85rem, 4vw, 2.8rem); line-height: 1.15; margin: 14px 0; }
.hero .lead { color: #e2e8f0; font-size: 1.05rem; margin-bottom: 20px; }
.accent { color: #60a5fa; }
.pill { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.15); font-size: .82rem; font-weight: 700; }
.section { padding: 42px 0; }
.section-title { margin-top: 0; font-size: 1.6rem; }
.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 22px; box-shadow: 0 4px 18px rgba(15,23,42,.04); }
.checkout-card { color: #0f172a; }
.price { font-size: 2rem; font-weight: 800; color: #2563eb; margin: 4px 0 12px; }
.price span { font-size: .95rem; color: #64748b; font-weight: 500; }
.check-list { padding-left: 18px; margin: 0 0 16px; color: #334155; }
.check-list li { margin-bottom: 6px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.panel-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; align-items: start; }
.panel-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }

/* Forms */
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.stack-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .9rem; color: #1e293b; }
.stack-form input[type="text"],
.stack-form input[type="email"],
.stack-form input[type="password"],
.stack-form input[type="tel"],
.stack-form input[type="url"],
.stack-form input[type="number"],
.stack-form select,
.stack-form textarea { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 9px; font-size: .95rem; font-family: inherit; background: #fff; }
.stack-form input[type="color"] { width: 100%; height: 42px; padding: 4px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; cursor: pointer; }
.checkbox-row { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; cursor: pointer; }
.fieldset { border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px; margin: 0; }
.fieldset legend { font-weight: 700; font-size: .9rem; padding: 0 6px; color: #334155; }
.slug-input-wrap { display: flex; align-items: center; border: 1px solid #cbd5e1; border-radius: 9px; overflow: hidden; background: #fff; }
.slug-prefix { background: #f1f5f9; padding: 10px; font-size: .85rem; color: #475569; white-space: nowrap; border-right: 1px solid #cbd5e1; }
.slug-input-wrap input { border: 0 !important; border-radius: 0 !important; outline: none; }
.form-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: .9rem; }
.google-box { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #cbd5e1; }

/* Alerts & Status */
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-size: .92rem; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.form-feedback { font-size: .9rem; min-height: 20px; }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: uppercase; background: #e2e8f0; color: #334155; }
.status-active, .status-published { background: #dcfce7; color: #166534; }
.status-pending, .status-generating { background: #fef3c7; color: #92400e; }
.status-suspended, .status-error { background: #fee2e2; color: #991b1b; }
.danger-title { color: #b91c1c; }

/* Progress & Sites list */
.progress-box { background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 10px; padding: 14px; }
.progress-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: .9rem; }
.progress-track { width: 100%; height: 10px; background: #cbd5e1; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: #2563eb; transition: width .25s ease; }
.sites-list { display: flex; flex-direction: column; gap: 12px; }
.site-item { border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px; background: #f8fafc; }
.site-item-top { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.small-url { font-size: .82rem; color: #475569; margin-top: 2px; word-break: break-all; }

/* Table & Modal */
.table-wrap { overflow-x: auto; max-width: 100%; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th, .data-table td { text-align: left; padding: 10px; border-bottom: 1px solid #e2e8f0; }
.audit-list { padding-left: 18px; font-size: .88rem; color: #334155; }
.modal-dialog { border: 0; border-radius: 14px; padding: 22px; width: min(500px, 92vw); box-shadow: 0 20px 50px rgba(0,0,0,.25); }

/* Footer & Floating WA */
.site-footer { background: #fff; border-top: 1px solid #e2e8f0; padding: 24px 0; margin-top: 32px; }
.footer-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.muted-link { color: #475569; text-decoration: none; font-size: .9rem; }
.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 40; background: #16a34a; color: #fff; padding: 11px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; box-shadow: 0 10px 25px rgba(22,163,74,.3); }

@media (max-width: 900px) {
  .hero-grid, .panel-grid, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid #e2e8f0; flex-direction: column; align-items: stretch; padding: 14px 18px; }
  .main-nav.open { display: flex; }
}
