/* 1ADS — UI theme on top of Bootstrap 5 */
:root {
    --brand: #1d4ed8;
    --brand-600: #1e40af;
    --brand-50: #eef3ff;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e5e9f2;
    --bg: #f4f6fb;
    --accent: #c6f432;
    --radius: 12px;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-link-color: var(--brand);
    --bs-link-color-rgb: 29, 78, 216;
    --bs-link-hover-color: var(--brand-600);
    --bs-border-color: var(--line);
}
body { font-family: var(--bs-body-font-family); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
.fs-7 { font-size: .65rem; }
.bg-brand { background: var(--brand) !important; }

/* Buttons */
.btn { border-radius: 9px; font-weight: 500; }
.btn-brand { background: var(--brand); color: #fff; border: 1px solid var(--brand); }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.btn-light { background: #fff; border: 1px solid var(--line); }
.btn-light:hover { background: #f1f4f9; border-color: #d6dce8; }
.btn-google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 500; }
.btn-google:hover { background: #f8fafd; border-color: #c6cbd3; color: #1f1f1f; }
.form-control, .form-select { border-radius: 9px; border-color: #d9dfea; }
.form-control:focus, .form-select:focus { border-color: #93b0f5; box-shadow: 0 0 0 .2rem rgba(29, 78, 216, .12); }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; color: #fff; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--ink); font-weight: 800; margin-right: 6px; font-size: 1.05rem; }
.brand-lg { font-size: 1.6rem; }

/* App shell */
.app-body { background: var(--bg); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 252px; flex-shrink: 0; background: var(--ink); color: #cbd5e1; padding: 22px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; z-index: 1040; }
.sidebar .brand { margin: 0 6px 22px; }
.sidebar .nav-link { color: #aab6c8; border-radius: 9px; padding: 9px 12px; display: flex; align-items: center; gap: 11px; font-size: .925rem; margin-bottom: 2px; }
.sidebar .nav-link i { font-size: 1.05rem; width: 18px; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.sidebar .nav-link.active { color: #fff; background: rgba(255, 255, 255, .1); }
.sidebar-admin { background: #111827; }
.sidebar-foot { margin-top: auto; color: #6b7a90; padding: 16px 8px 0; line-height: 1.4; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1030; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: rgba(244, 246, 251, .85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-title { font-weight: 600; color: var(--ink-2); }
.user-btn { display: flex; align-items: center; gap: 8px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; }
.content { padding: 28px; max-width: 1360px; width: 100%; }
@media (max-width: 991.98px) {
    .sidebar { position: fixed; left: -260px; transition: left .2s; }
    .sidebar.open { left: 0; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
    .content { padding: 18px 16px; }
    .topbar { padding: 0 16px; }
}

/* Cards */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); font-weight: 600; padding: 14px 18px; border-radius: var(--radius) var(--radius) 0 0 !important; }
.card-soft { background: linear-gradient(135deg, #fff 0%, #f6f9ff 100%); }
.table { --bs-table-hover-bg: #f8faff; margin-bottom: 0; }
.table > thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #fafbfd; border-bottom-width: 1px; padding-top: 10px; padding-bottom: 10px; white-space: nowrap; }
.table td, .table th { padding-left: 18px; padding-right: 18px; }

/* KPI */
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; height: 100%; position: relative; }
.kpi-label { color: var(--muted); font-size: .82rem; font-weight: 500; }
.kpi-value { font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.kpi-sub { color: var(--muted); font-size: .8rem; }
.kpi-delta { position: absolute; top: 16px; right: 16px; font-size: .78rem; font-weight: 600; border-radius: 20px; padding: 2px 8px 2px 4px; }
.kpi-delta.up { background: #e8f8ee; color: #15803d; }
.kpi-delta.down { background: #fdecec; color: #b91c1c; }

/* Badges */
.badge { font-weight: 600; border-radius: 6px; padding: .38em .6em; }
.badge-soft-success { background: #e6f6ec; color: #15803d; }
.badge-soft-warning { background: #fff4dc; color: #a16207; }
.badge-soft-danger { background: #fdecec; color: #b91c1c; }
.badge-soft-info { background: #e6f3fb; color: #0369a1; }
.badge-soft-primary { background: var(--brand-50); color: var(--brand); }
.badge-soft-secondary { background: #eef0f4; color: #475569; }
.badge-soft-dark { background: #e5e7eb; color: #111827; }

/* Setup checklist */
.setup-step { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; height: 100%; }
.setup-step .step-num { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-weight: 700; font-size: .8rem; }
.setup-step.done { opacity: .65; }
.setup-step.done .step-num { background: #16a34a; color: #fff; }
.stat-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); font-size: .875rem; }
.stat-chip span { font-weight: 700; color: var(--ink); }
.stat-chip:hover { border-color: #c3cde0; background: #fafbff; }
.empty-state { text-align: center; color: var(--muted); padding: 40px 12px; }
.empty-state i { font-size: 2rem; display: block; margin-bottom: 8px; color: #b5c0d3; }
.tabs-pills .nav-link { color: var(--ink-2); border-radius: 9px; padding: 7px 14px; font-weight: 500; }
.tabs-pills .nav-link .count { color: var(--muted); font-size: .8rem; margin-left: 4px; }
.tabs-pills .nav-link.active { background: var(--ink); color: #fff; }
.tabs-pills .nav-link.active .count { color: #9fb0c8; }
.connect-illus { font-size: 2.2rem; display: inline-flex; align-items: center; }
.connect-illus .brand-mark { width: 44px; height: 44px; font-size: 1.4rem; border-radius: 12px; }
.callout { display: flex; gap: 10px; background: #f6f8fc; border: 1px dashed #cfd7e6; border-radius: 10px; padding: 12px 14px; color: var(--ink-2); }
.callout i { font-size: 1.2rem; color: var(--brand); }

/* Wizard */
.wizard-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 20px; overflow-x: auto; }
.wizard-steps li { flex: 1; min-width: 92px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: .85rem; font-weight: 500; white-space: nowrap; }
.wizard-steps .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #eef1f6; font-size: .75rem; font-weight: 700; flex-shrink: 0; }
.wizard-steps li.active { border-color: var(--brand); color: var(--ink); box-shadow: 0 0 0 3px rgba(29, 78, 216, .1); }
.wizard-steps li.active .dot { background: var(--brand); color: #fff; }
.wizard-steps li.done { color: var(--ink-2); cursor: pointer; }
.wizard-steps li.done .dot { background: #16a34a; color: #fff; }
.wstep { display: none; }
.wstep.active { display: block; animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.choice-card { display: block; cursor: pointer; margin: 0; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card .choice-body { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; height: 100%; }
.choice-card.compact .choice-body { padding: 12px 14px; }
.choice-card .choice-body > i { font-size: 1.4rem; color: var(--brand); }
.choice-card:hover .choice-body { border-color: #b9c6e0; }
.choice-card input:checked + .choice-body { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 78, 216, .1); background: #fbfcff; }
.choice-card.disabled { opacity: .5; cursor: not-allowed; }
.group-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fbfcfe; }
.counted-input { position: relative; }
.counted-input .form-control { padding-right: 86px; }
.counted-input .counter { position: absolute; right: 38px; top: 9px; font-size: .75rem; color: var(--muted); }
.counted-input .remove-x { position: absolute; right: 4px; top: 4px; }
.counted-input textarea + .counter { top: 9px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-50); color: var(--brand-600); border-radius: 20px; padding: 4px 6px 4px 10px; font-size: .85rem; font-weight: 500; }
.chip button { border: 0; background: transparent; color: inherit; padding: 0 2px; line-height: 1; }
.loc-results { position: absolute; left: calc(var(--bs-gutter-x) * .5); right: calc(var(--bs-gutter-x) * .5); top: 100%; z-index: 20; max-height: 300px; overflow-y: auto; margin-top: 4px; border-radius: 10px; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px 12px; }
.schedule-grid { display: grid; gap: 6px; }
.sched-row { display: grid; grid-template-columns: 90px 1fr auto 1fr; gap: 10px; align-items: center; max-width: 520px; }
.review-row { display: grid; grid-template-columns: 140px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.review-row .btn-link { padding: 0; }
.review-total { display: flex; justify-content: space-between; padding: 14px 16px; background: var(--brand-50); border-radius: 10px; margin-top: 14px; }
@media (max-width: 575.98px) { .review-row { grid-template-columns: 1fr auto; } .review-row > div:first-child { grid-column: 1 / -1; } }

/* Google ad preview */
.ad-preview { font-family: Arial, sans-serif; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ap-sponsored { font-weight: 700; font-size: 12px; color: #202124; }
.ap-url { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #202124; margin: 6px 0 4px; word-break: break-all; }
.ap-fav { width: 22px; height: 22px; border-radius: 50%; background: #e8eaed; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.ap-headline { color: #1a0dab; font-size: 18px; line-height: 1.3; margin-bottom: 4px; }
.ap-desc { color: #4d5156; font-size: 14px; line-height: 1.5; }

/* Auth */
.auth-body { background: #fff; }
.auth-wrap { display: flex; min-height: 100vh; }
.auth-side { width: 44%; max-width: 560px; background: radial-gradient(circle at 20% 10%, #1e3a8a 0%, var(--ink) 55%); color: #e2e8f0; padding: 44px; flex-direction: column; justify-content: space-between; }
.auth-side-title { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; color: #fff; margin-bottom: 24px; line-height: 1.15; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-size: 1.02rem; }
.auth-points i { color: var(--accent); margin-right: 10px; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 480px; }
.auth-card .brand { color: var(--ink); }

/* Public site */
.public-body { background: #fff; }
.public-nav { padding: 18px 0; }
.public-nav .nav-link { color: var(--ink-2); font-weight: 500; }
.hero { padding: 72px 0 56px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.hero .lead { color: var(--ink-2); font-size: 1.2rem; max-width: 560px; }
.hero-mark { background: linear-gradient(transparent 62%, var(--accent) 62%); }
.hero-card { background: var(--ink); color: #cbd5e1; border-radius: 18px; padding: 22px; box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .45); }
.hero-card .hk { background: rgba(255, 255, 255, .06); border-radius: 12px; padding: 14px; }
.hero-card .hk b { color: #fff; font-size: 1.35rem; display: block; }
.section { padding: 72px 0; }
.section-alt { background: var(--bg); }
.feature { padding: 22px; border: 1px solid var(--line); border-radius: 14px; height: 100%; background: #fff; }
.feature i { font-size: 1.5rem; color: var(--brand); }
.how-num { width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--accent); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }
.price-card { border: 1px solid var(--line); border-radius: 16px; padding: 26px; height: 100%; background: #fff; display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--brand); box-shadow: 0 20px 40px -24px rgba(29, 78, 216, .5); }
.price-card .price { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 8px; color: var(--ink-2); }
.price-card ul i { color: #16a34a; margin-right: 6px; }
.public-foot { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; }
.public-foot a { color: var(--muted); }
.legal { max-width: 820px; }
.legal h2 { font-size: 1.2rem; font-weight: 700; margin-top: 28px; }

/* Misc */
.log-pre { background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 10px; font-size: .8rem; max-height: 480px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: .875rem; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.timeline li.failed::before { background: #dc2626; }
.timeline li::after { content: ''; position: absolute; left: 8.5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }

/* Logo */
.brand-logo { height: 42px; width: auto; display: block; }
.brand-lg .brand-logo { height: 56px; }
.public-nav .brand-logo { height: 48px; }
.sidebar .brand { margin-left: 8px; }
