:root {
    --bg: #f4f6fa;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #172033;
    --muted: #697386;
    --line: #e5e9f0;
    --primary: #315bea;
    --primary-dark: #2448c8;
    --primary-soft: #eef2ff;
    --green: #16a66b;
    --green-soft: #eaf9f2;
    --orange: #e88427;
    --orange-soft: #fff5e8;
    --violet: #7c4dff;
    --violet-soft: #f2edff;
    --red: #d14343;
    --red-soft: #fff0f0;
    --sidebar: #111827;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 30px rgba(15, 23, 42, .04);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.55; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 24px; letter-spacing: -.03em; }
h2 { margin-bottom: 6px; font-size: 18px; letter-spacing: -.02em; }
h3 { margin-bottom: 6px; font-size: 16px; }
p { color: var(--muted); }

.admin-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; width: 264px; display: flex; flex-direction: column; color: #d6dbea; background: var(--sidebar); transition: transform .25s ease; }
.sidebar-brand { min-height: 82px; padding: 18px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand strong { display: block; color: white; font-size: 16px; }
.sidebar-brand small { display: block; color: #8e99ae; font-size: 11px; }
.brand-mark { width: 40px; height: 40px; flex: 0 0 40px; display: inline-grid; place-items: center; color: #fff; background: linear-gradient(135deg, #5578ff, #315bea 58%, #7638e8); border-radius: 12px; font-weight: 800; letter-spacing: -.05em; box-shadow: 0 8px 18px rgba(49,91,234,.28); }
.brand-mark-large { width: 54px; height: 54px; font-size: 18px; border-radius: 16px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.nav-label { display: block; margin: 18px 10px 7px; color: #6f7c93; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav-label:first-child { margin-top: 2px; }
.nav-link { margin: 3px 0; padding: 10px 12px; display: flex; align-items: center; gap: 11px; color: #aeb8cb; border-radius: 10px; font-size: 13px; font-weight: 500; transition: .15s ease; }
.nav-link span { width: 20px; color: #7e8ba4; text-align: center; font-size: 16px; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-link.is-active { color: #fff; background: #263247; box-shadow: inset 3px 0 0 #6684ff; }
.nav-link.is-active span { color: #8fa4ff; }
.sidebar-footer { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-footer form { margin-top: 8px; }
.sidebar-logout { width: 100%; padding: 8px; color: #8e99ae; border: 0; background: none; cursor: pointer; }
.sidebar-logout:hover { color: #fff; }

.admin-main { min-height: 100vh; margin-left: 264px; }
.topbar { position: sticky; top: 0; z-index: 40; min-height: 82px; padding: 13px 32px; display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.topbar > div:nth-child(2) { flex: 1; }
.eyebrow { margin-bottom: 3px; color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.topbar .eyebrow { color: var(--muted); }
.user-chip { display: flex; align-items: center; gap: 9px; }
.user-chip strong, .user-chip small { display: block; line-height: 1.25; }
.user-chip strong { max-width: 160px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-chip small { color: var(--muted); font-size: 10px; }
.user-avatar { width: 36px; height: 36px; flex: 0 0 36px; display: inline-grid; place-items: center; color: var(--primary); background: var(--primary-soft); border: 1px solid #dce3ff; border-radius: 50%; font-weight: 800; }
.plan-badge, .tag { display: inline-flex; align-items: center; padding: 5px 9px; color: #4d5c75; background: #f0f3f8; border-radius: 999px; font-size: 10px; font-weight: 700; }
.menu-toggle { display: none; width: 40px; height: 40px; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 50; background: rgba(9,14,25,.55); }
.content { width: 100%; max-width: 1500px; margin: 0 auto; padding: 28px 32px 48px; }

.page-actions { margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.page-actions h2 { margin-bottom: 2px; font-size: 21px; }
.page-actions p { margin-bottom: 0; }
.button { min-height: 40px; padding: 9px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; font-size: 12px; line-height: 1.2; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .62; }
.button-primary { color: #fff; background: var(--primary); box-shadow: 0 6px 14px rgba(49,91,234,.18); }
.button-primary:hover:not(:disabled) { background: var(--primary-dark); }
.button-secondary { color: #334155; background: #fff; border-color: #dbe1e9; }
.button-secondary:hover:not(:disabled) { border-color: #b9c3d1; }
.button-ghost { color: var(--muted); background: transparent; border-color: var(--line); }
.sidebar .button-ghost { color: #c6cede; border-color: rgba(255,255,255,.14); }
.button-light { color: var(--primary); background: #fff; }
.button-danger-text { color: var(--red); background: transparent; border: 0; cursor: pointer; }
.button-large { min-height: 46px; padding: 12px 18px; }
.button-small { min-height: 33px; padding: 7px 10px; }
.button-block { width: 100%; }
.text-link { color: var(--primary); font-size: 12px; font-weight: 700; }
.icon-button { display: inline-flex; align-items: center; padding: 5px 8px; color: var(--primary); background: transparent; border: 0; border-radius: 7px; font-size: 11px; font-weight: 700; cursor: pointer; }
.icon-button:hover { background: var(--primary-soft); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-header h2 { margin-bottom: 2px; }
.card-header p { margin-bottom: 0; font-size: 12px; }
.stats-grid { margin-bottom: 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.stat-card { min-width: 0; padding: 18px; display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
a.stat-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(15,23,42,.08); }
.stat-card > div { min-width: 0; }
.stat-card small, .stat-card strong, .stat-card div > span { display: block; }
.stat-card small { color: var(--muted); font-size: 11px; font-weight: 600; }
.stat-card strong { margin: 2px 0; color: var(--text); font-size: 25px; line-height: 1.2; }
.stat-card div > span { color: #8993a4; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-icon { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 12px; font-size: 18px; font-weight: 800; }
.stat-icon.blue, .result-icon.blue { color: var(--primary); background: var(--primary-soft); }
.stat-icon.violet, .result-icon.violet { color: var(--violet); background: var(--violet-soft); }
.stat-icon.green, .result-icon.green { color: var(--green); background: var(--green-soft); }
.stat-icon.orange, .result-icon.orange { color: var(--orange); background: var(--orange-soft); }

.welcome-panel { margin-bottom: 20px; padding: 25px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #fff; background: linear-gradient(112deg, #244cce, #4268e9 60%, #7d4ce5); border-radius: 18px; box-shadow: 0 15px 35px rgba(49,91,234,.2); overflow: hidden; position: relative; }
.welcome-panel::after { content: ""; position: absolute; width: 230px; height: 230px; right: 12%; top: -160px; border: 35px solid rgba(255,255,255,.07); border-radius: 50%; }
.welcome-panel > * { position: relative; z-index: 1; }
.welcome-panel .eyebrow, .welcome-panel p { color: rgba(255,255,255,.78); }
.welcome-panel h2 { margin-bottom: 5px; font-size: 22px; }
.welcome-panel p { margin-bottom: 0; }
.dashboard-grid { margin-bottom: 22px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.dashboard-grid > .card, .content > .card { padding: 22px; }
.progress-number { color: var(--primary); font-size: 22px; font-weight: 800; }
.progress-track { height: 7px; margin: -4px 0 17px; overflow: hidden; background: #edf0f5; border-radius: 99px; }
.progress-track span { height: 100%; display: block; background: linear-gradient(90deg, var(--primary), #7c4dff); border-radius: inherit; }
.checklist a { padding: 10px 0; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; border-top: 1px solid var(--line); font-size: 12px; }
.checklist a:last-child { padding-bottom: 0; }
.checklist a > span:last-child { color: #a3adbc; }
.check { width: 20px; height: 20px; display: grid; place-items: center; color: #fff; border: 1px solid #cbd3df; border-radius: 50%; font-size: 10px; }
.check.done { background: var(--green); border-color: var(--green); }
.quick-actions { display: grid; gap: 8px; }
.quick-actions a { padding: 10px; display: flex; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 10px; transition: .15s ease; }
.quick-actions a:hover { background: var(--surface-soft); border-color: var(--line); }
.quick-actions > a > span { width: 35px; height: 35px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 9px; font-weight: 800; }
.quick-actions strong, .quick-actions small { display: block; }
.quick-actions strong { font-size: 12px; }
.quick-actions small { color: var(--muted); font-size: 10px; }
.list-rows > a { padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); }
.list-rows strong, .list-rows small { display: block; }
.list-rows strong { font-size: 12px; }
.list-rows small { color: var(--muted); font-size: 10px; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 11px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: #8690a0; background: #fafbfd; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
td { font-size: 12px; }
td strong, td small { display: block; }
td small { margin-top: 2px; color: var(--muted); font-size: 10px; }
tbody tr:last-child td { border-bottom: 0; }
.table-actions { display: flex; justify-content: flex-end; gap: 2px; }
.status { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.status-active, .status-ready, .status-connected { color: #08734a; background: var(--green-soft); }
.status-trial, .status-draft, .status-pending { color: #9b570f; background: var(--orange-soft); }
.status-suspended, .status-archived, .status-error { color: #9f3535; background: var(--red-soft); }
.filter-card { margin-bottom: 17px; padding: 13px; }
.filter-form { display: flex; align-items: center; gap: 9px; }
.filter-form select { min-width: 165px; }
.search-field { min-width: 240px; flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.search-field span { color: #9aa4b2; font-size: 20px; }
.search-field input { min-height: 40px; flex: 1; border: 0; outline: 0; }

.alert { margin-bottom: 15px; padding: 12px 14px; border: 1px solid; border-radius: 11px; font-size: 12px; font-weight: 600; }
.alert-success { color: #096a47; background: var(--green-soft); border-color: #c8eddd; }
.alert-error { color: #a53737; background: var(--red-soft); border-color: #f2cece; }
.alert-warning { color: #99570f; background: var(--orange-soft); border-color: #f5ddb9; }
.empty-state { padding: 55px 25px !important; text-align: center; }
.empty-state.compact { padding: 28px 20px !important; }
.empty-state h2 { margin-bottom: 5px; }
.empty-state p { max-width: 500px; margin: 0 auto 16px; }
.empty-icon { width: 52px; height: 52px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 15px; font-size: 22px; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 18px; }
.narrow-layout { max-width: 1100px; }
.form-main { min-width: 0; display: grid; gap: 18px; }
.form-card { padding: 22px; }
.form-card > h2 { margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { min-width: 0; display: grid; align-content: start; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field > span, .color-field > span { color: #445066; font-size: 11px; font-weight: 700; }
.field small { color: #8a94a5; font-size: 10px; }
.field input, .field textarea, .field select, .filter-form select { width: 100%; min-height: 42px; padding: 10px 11px; color: var(--text); background: #fff; border: 1px solid #dce2ea; border-radius: 9px; outline: 0; transition: border-color .15s ease, box-shadow .15s ease; }
.field textarea { resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus, .filter-form select:focus { border-color: #8098ef; box-shadow: 0 0 0 3px rgba(49,91,234,.1); }
.input-prefix { display: flex; align-items: center; overflow: hidden; background: #fff; border: 1px solid #dce2ea; border-radius: 9px; }
.input-prefix:focus-within { border-color: #8098ef; box-shadow: 0 0 0 3px rgba(49,91,234,.1); }
.input-prefix > span { padding: 0 10px; color: #8490a1; background: #f6f8fb; border-right: 1px solid #e2e7ee; font-size: 11px; line-height: 40px; }
.input-prefix input { border: 0 !important; border-radius: 0; box-shadow: none !important; }
.form-aside { min-width: 0; }
.sticky-card { position: sticky; top: 102px; display: grid; gap: 15px; }
.form-note { padding: 13px; color: #59667a; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
.form-note strong { display: block; margin-bottom: 3px; color: var(--text); font-size: 11px; }
.form-note p { margin: 0; font-size: 10px; }
.form-section-title { margin: 10px 0 4px; display: flex; align-items: center; gap: 9px; color: #2a3548; font-size: 12px; font-weight: 800; }
.form-section-title span { width: 24px; height: 24px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 50%; font-size: 10px; }
.stack-form { display: grid; gap: 15px; }
.sticky-save { position: sticky; bottom: 15px; z-index: 20; margin-top: 18px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 15px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 12px 35px rgba(15,23,42,.12); backdrop-filter: blur(10px); }
.sticky-save span { color: var(--muted); font-size: 11px; }
.color-field { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 10px; }
.color-field span { grid-column: 1 / -1; }
.color-field input { width: 50px; height: 38px; padding: 2px; background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.color-field code { color: var(--muted); font-size: 10px; }
.service-pricing-row { display: grid; grid-template-columns: minmax(140px, .55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.service-price-editor { min-width: 0; }
.service-price-line { display: grid; grid-template-columns: minmax(0, 1fr) 48px 70px; gap: 8px; align-items: end; }
.service-price-color > span { font-size: 10px; text-align: center; white-space: nowrap; }
.service-price-color input[type="color"] { width: 42px; height: 42px; min-height: 42px; margin-inline: auto; padding: 3px; cursor: pointer; }
.service-price-help { margin-top: 7px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 8px; }
.service-price-help small { color: var(--muted); font-size: 10px; }
.service-price-reset { padding: 2px 0; color: var(--primary); background: none; border: 0; font-size: 10px; text-decoration: underline; cursor: pointer; }
.service-price-reset:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.about-content-options { margin-top: 4px; padding: 18px; display: grid; gap: 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 11px; }
.about-content-options > div > strong { font-size: 13px; }
.about-content-options p, .about-content-options > small { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.about-image-upload { background: #fff; }
.about-image-upload .upload-preview { width: 90px; height: 72px; flex-basis: 90px; }
.about-image-remove { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; cursor: pointer; }
.about-image-remove input { width: 17px; height: 17px; flex: 0 0 17px; }
.about-highlights-editor { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.service-price.has-price-background { width: fit-content; max-width: 100%; padding: 7px 11px; border-radius: 8px; overflow-wrap: anywhere; }
.switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch > span { width: 36px; height: 20px; display: block; padding: 2px; background: #c8d0dc; border-radius: 999px; transition: .18s ease; }
.switch > span::after { content: ""; width: 16px; height: 16px; display: block; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: .18s ease; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch b { color: var(--muted); font-size: 10px; }
.switch-row { padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.switch-row > span strong, .switch-row > span small { display: block; }
.switch-row > span strong { font-size: 11px; }
.switch-row > span small { color: var(--muted); font-size: 9px; }
.switch-row .switch { flex: 0 0 auto; }

.tabs { margin-bottom: 18px; padding: 4px; display: inline-flex; gap: 3px; background: #e9edf3; border-radius: 10px; }
.tabs a { padding: 8px 13px; color: var(--muted); border-radius: 7px; font-size: 11px; font-weight: 700; }
.tabs a.is-active { color: var(--text); background: #fff; box-shadow: 0 1px 4px rgba(15,23,42,.1); }
.brand-upload-grid { margin-bottom: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.upload-card { min-width: 0; padding: 13px; display: flex; align-items: center; gap: 12px; border: 1px dashed #cbd3df; border-radius: 11px; cursor: pointer; }
.upload-card:hover { border-color: var(--primary); background: #fbfcff; }
.upload-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-preview { width: 62px; height: 54px; flex: 0 0 62px; display: grid; place-items: center; overflow: hidden; color: var(--primary); background: var(--primary-soft); border-radius: 9px; font-size: 11px; text-align: center; }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-card > span:last-of-type { min-width: 0; }
.upload-card strong, .upload-card small { display: block; }
.upload-card strong { font-size: 11px; }
.upload-card small { color: var(--muted); font-size: 9px; }
.site-mini-preview { min-height: 160px; padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; background: linear-gradient(140deg, var(--preview-dark), color-mix(in srgb, var(--preview-primary) 55%, var(--preview-dark))); border-radius: 11px; text-align: center; overflow: hidden; position: relative; }
.site-mini-preview > * { position: relative; z-index: 1; }
.site-mini-preview > span { position: absolute; width: 100px; height: 100px; top: -45px; right: -40px; background: var(--preview-primary); border-radius: 50%; opacity: .45; }
.site-mini-preview strong { font-size: 14px; }
.site-mini-preview small { max-width: 180px; color: rgba(255,255,255,.7); font-size: 9px; }
.site-mini-preview i { width: 70px; height: 7px; margin-top: 14px; background: var(--preview-primary); border-radius: 99px; }
.section-editor-list { display: grid; gap: 13px; }
.section-editor { padding: 18px; }
.section-editor-heading { margin-bottom: 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.section-editor-heading > div { display: flex; align-items: center; gap: 10px; }
.section-editor-heading strong, .section-editor-heading small { display: block; }
.section-editor-heading small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.drag-handle { color: #b0b8c5; font-size: 18px; }

.service-admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.service-admin-card { overflow: hidden; transition: .15s ease; }
.service-admin-card.is-muted, .testimonial-admin-card.is-muted { opacity: .62; }
.service-admin-image { height: 145px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, #edf2ff, #f6f3ff); position: relative; }
.service-admin-image img { width: 100%; height: 100%; object-fit: cover; }
.service-admin-image > span:not(.status) { color: var(--primary); font-size: 44px; font-weight: 800; }
.service-admin-image .status { position: absolute; top: 10px; right: 10px; }
.service-admin-content { padding: 16px; }
.service-admin-content > div:first-child { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.service-admin-content p { min-height: 42px; margin-bottom: 8px; font-size: 11px; }
.service-price { display: block; margin-bottom: 12px; color: var(--primary); font-size: 13px; }
.card-actions { padding-top: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; border-top: 1px solid var(--line); }
.card-actions form { margin: 0; }
.current-image { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.current-image img { width: 90px; height: 60px; object-fit: cover; border-radius: 8px; }

.gallery-upload-card { margin-bottom: 20px; }
.dropzone { min-height: 180px; padding: 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #bdc8d7; border-radius: 13px; background: #fbfcfe; text-align: center; cursor: pointer; }
.dropzone:hover { border-color: var(--primary); background: #f8faff; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone-icon { width: 42px; height: 42px; margin-bottom: 10px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 50%; font-size: 22px; }
.dropzone strong, .dropzone small, .dropzone em { display: block; }
.dropzone small { margin-bottom: 12px; color: var(--muted); font-size: 10px; }
.dropzone em { margin-top: 8px; color: #8b95a5; font-size: 9px; font-style: normal; }
.upload-options { margin-top: 13px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; }
.gallery-admin-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.gallery-admin-item { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.gallery-admin-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-admin-item > div { padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gallery-admin-item > div > span { min-width: 0; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-admin-item button { width: 26px; height: 26px; color: var(--red); background: var(--red-soft); border: 0; border-radius: 7px; cursor: pointer; }

.two-column-grid { display: grid; grid-template-columns: minmax(300px, .75fr) minmax(0, 1.25fr); align-items: start; gap: 18px; }
.testimonial-list { display: grid; gap: 12px; }
.testimonial-admin-card { padding: 18px; }
.stars { color: #f5a524; letter-spacing: 2px; }
.testimonial-admin-card blockquote { margin: 9px 0 14px; color: #465268; font-size: 12px; line-height: 1.7; }
.testimonial-author { margin-bottom: 12px; display: flex; align-items: center; gap: 9px; }
.testimonial-author > span { width: 34px; height: 34px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 50%; font-weight: 800; }
.testimonial-author strong, .testimonial-author small { display: block; }
.testimonial-author strong { font-size: 11px; }
.testimonial-author small { color: var(--muted); font-size: 9px; }
.inline-actions { display: flex; gap: 8px; }

.generator-card { margin-bottom: 22px; padding: 18px; }
.generator-form { display: grid; grid-template-columns: 1.2fr 1fr 1fr .8fr auto; align-items: end; gap: 12px; }
.upgrade-card { min-height: 210px; padding: 28px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; background: linear-gradient(135deg, #fff, #f5f7ff); }
.upgrade-card > span { width: 58px; height: 58px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 16px; font-size: 25px; }
.upgrade-card h2 { font-size: 21px; }
.upgrade-card p:last-child { max-width: 670px; margin-bottom: 0; }
.result-heading { margin: 27px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.result-heading h2 { margin-bottom: 0; }
.copy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.copy-card { min-width: 0; padding: 17px; }
.copy-card-wide { grid-column: span 3; }
.copy-card-heading { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.copy-card-heading > div { display: flex; align-items: center; gap: 9px; }
.copy-card-heading h3 { margin: 0; font-size: 13px; }
.copy-card-heading button { padding: 5px 8px; color: var(--primary); background: var(--primary-soft); border: 0; border-radius: 7px; font-size: 9px; font-weight: 800; cursor: pointer; }
.result-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-size: 11px; font-weight: 800; }
.copy-card pre { min-height: 120px; margin: 0; padding: 13px; color: #4b5669; background: #f8fafc; border: 1px solid #edf0f4; border-radius: 10px; font-family: Inter, sans-serif; font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-card-wide pre { min-height: 150px; }
.info-banner { margin: 17px 0; padding: 13px 15px; display: flex; align-items: flex-start; gap: 10px; color: #4d617f; background: #eff5ff; border: 1px solid #d9e6ff; border-radius: 11px; }
.info-banner span { color: var(--primary); font-weight: 800; }
.info-banner p { margin: 0; color: inherit; font-size: 11px; }

.filter-pills { margin-bottom: 15px; display: flex; flex-wrap: wrap; gap: 6px; }
.filter-pills a { padding: 7px 11px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 700; }
.filter-pills a.is-active { color: #fff; background: var(--primary); border-color: var(--primary); }
.campaign-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.campaign-card { padding: 18px; }
.campaign-card-top { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; }
.platform-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; font-weight: 800; }
.platform-meta { color: #315bea; background: #eef2ff; }
.platform-google { color: #14825d; background: #eaf9f2; }
.platform-general { color: #7742dd; background: #f2edff; }
.campaign-card h3 { margin-bottom: 4px; }
.campaign-card > p { min-height: 36px; margin-bottom: 14px; font-size: 10px; }
.campaign-meta { margin-bottom: 14px; padding: 11px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--surface-soft); border-radius: 9px; }
.campaign-meta span + span { padding-left: 10px; border-left: 1px solid var(--line); }
.campaign-meta small, .campaign-meta strong { display: block; }
.campaign-meta small { color: var(--muted); font-size: 8px; }
.campaign-meta strong { font-size: 11px; }

.connection-grid { margin: 18px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.connection-card { padding: 20px; display: flex; flex-direction: column; }
.connection-actions { display: grid; gap: 10px; }
.connection-actions form { margin: 0; }
.connection-actions .button { white-space: normal; overflow-wrap: anywhere; }
.meta-ads-account, .meta-ad-card { min-width: 0; overflow-wrap: anywhere; }
.meta-ad-card .campaign-card-top { gap: 10px; align-items: flex-start; }
.meta-ad-card .tag { white-space: normal; max-width: calc(100% - 44px); text-align: right; }
.connection-icon { width: 46px; height: 46px; margin-bottom: 15px; display: grid; place-items: center; color: #fff; border-radius: 13px; font-size: 20px; font-weight: 800; }
.connection-icon.instagram { background: linear-gradient(135deg, #7939b8, #e9417d, #f2a143); }
.connection-icon.meta { background: #1f6fea; }
.connection-icon.google { color: #2c68d6; background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 15px rgba(15,23,42,.08); }
.connection-content { flex: 1; }
.connection-content > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.connection-content h2 { margin: 0; }
.connection-content p { min-height: 55px; font-size: 11px; }
.connection-status { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; font-weight: 700; white-space: nowrap; }
.connection-status i { width: 6px; height: 6px; background: #aeb7c4; border-radius: 50%; }
.connection-status.is-connected { color: var(--green); }
.connection-status.is-connected i { background: var(--green); }
.roadmap-card { padding: 24px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; }
.roadmap-card > div p:last-child { margin-bottom: 0; }
.roadmap-card ol { margin: 0; padding: 0; display: grid; gap: 10px; list-style: none; }
.roadmap-card li { display: flex; align-items: center; gap: 10px; }
.roadmap-card li > span { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 50%; font-size: 10px; font-weight: 800; }
.roadmap-card li strong, .roadmap-card li small { display: block; }
.roadmap-card li strong { font-size: 11px; }
.roadmap-card li small { color: var(--muted); font-size: 9px; }

.team-grid { grid-template-columns: minmax(280px, .6fr) minmax(0, 1.4fr); }
.team-grid > .card:last-child { padding: 20px; }
.team-list article { padding: 11px 0; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.team-list article:first-child { border-top: 0; }
.team-list strong, .team-list small { display: block; }
.team-list strong { font-size: 11px; }
.team-list small { color: var(--muted); font-size: 9px; }
.row-menu { display: flex; align-items: center; gap: 2px; }
.row-menu form { margin: 0; }
.row-menu button { font-size: 9px; }

.auth-body { min-height: 100vh; background: #eef2f8; }
.login-wrap, .install-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.1fr); }
.auth-intro { padding: clamp(45px, 8vw, 110px); display: flex; flex-direction: column; justify-content: center; color: #fff; background: radial-gradient(circle at 20% 20%, rgba(107,132,255,.55), transparent 30%), radial-gradient(circle at 85% 78%, rgba(133,64,232,.38), transparent 28%), #111b32; overflow: hidden; }
.auth-intro .brand-mark { margin-bottom: 45px; }
.auth-intro .eyebrow { color: #96a9ff; }
.auth-intro h1 { max-width: 560px; margin-bottom: 18px; color: #fff; font-size: clamp(32px, 4vw, 53px); line-height: 1.08; }
.auth-intro > p:not(.eyebrow) { max-width: 530px; color: #aebad0; font-size: 15px; }
.feature-list { margin: 25px 0 0; padding: 0; display: grid; gap: 9px; color: #d5dcec; list-style: none; }
.feature-list li::before { content: "✓"; margin-right: 9px; color: #73e1ae; font-weight: 800; }
.auth-card { width: min(460px, calc(100% - 42px)); margin: auto; padding: 34px; background: #fff; border: 1px solid #e0e5ed; border-radius: 20px; box-shadow: 0 25px 70px rgba(29,42,70,.12); }
.install-card { width: min(700px, calc(100% - 42px)); margin: 40px auto; }
.auth-card-heading { margin-bottom: 25px; }
.auth-card-heading h2 { margin-bottom: 6px; font-size: 25px; }
.auth-card-heading p:last-child { margin: 0; }
.auth-help { margin: 20px 0 0; color: #8a94a5; font-size: 10px; text-align: center; }

@media (max-width: 1180px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .service-admin-grid, .campaign-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gallery-admin-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .generator-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .generator-form .button { grid-column: 1 / -1; }
    .connection-grid { grid-template-columns: 1fr; }
    .connection-content p { min-height: 0; }
}

@media (max-width: 980px) {
    .sidebar { transform: translateX(-100%); }
    .admin-main { margin-left: 0; }
    .menu-toggle { display: grid; place-items: center; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; }
    .form-layout { grid-template-columns: 1fr; }
    .form-aside { order: -1; }
    .sticky-card { position: static; }
    .dashboard-grid, .two-column-grid, .roadmap-card { grid-template-columns: 1fr; }
    .form-aside .sticky-card { grid-template-columns: 1fr 1fr; align-items: end; }
    .form-aside .sticky-card > h2 { grid-column: 1 / -1; }
    .form-aside .site-mini-preview, .form-aside .form-note { grid-row: span 2; }
    .copy-grid { grid-template-columns: 1fr 1fr; }
    .copy-card-wide { grid-column: span 2; }
    .login-wrap, .install-wrap { grid-template-columns: 1fr; }
    .auth-intro { min-height: 360px; padding: 50px clamp(25px, 8vw, 80px); }
    .auth-intro .brand-mark { margin-bottom: 25px; }
    .auth-card { margin: 35px auto; }
}

@media (max-width: 700px) {
    .topbar { min-height: 68px; padding: 10px 15px; }
    .topbar h1 { font-size: 18px; }
    .topbar .eyebrow { display: none; }
    .user-chip > div, .plan-badge { display: none; }
    .content { padding: 20px 14px 40px; }
    .page-actions { align-items: flex-start; }
    .page-actions > .button { flex: 0 0 auto; }
    .page-actions h2 { font-size: 18px; }
    .page-actions p { font-size: 11px; }
    .stats-grid { gap: 10px; }
    .stat-card { padding: 13px; gap: 9px; }
    .stat-icon { width: 36px; height: 36px; flex-basis: 36px; }
    .stat-card strong { font-size: 20px; }
    .welcome-panel { padding: 20px; align-items: flex-start; flex-direction: column; }
    .welcome-panel h2 { font-size: 18px; }
    .form-grid, .brand-upload-grid, .generator-form, .upload-options, .service-pricing-row, .about-highlights-editor { grid-template-columns: 1fr; }
    .about-content-options { padding: 12px; }
    .about-image-upload { align-items: flex-start; }
    .about-image-upload .upload-preview { width: 62px; height: 54px; flex-basis: 62px; }
    .field-full { grid-column: auto; }
    .form-card, .content > .card, .dashboard-grid > .card { padding: 17px; }
    .form-aside .sticky-card { grid-template-columns: 1fr; }
    .form-aside .sticky-card > h2, .form-aside .site-mini-preview, .form-aside .form-note { grid-column: auto; grid-row: auto; }
    .service-admin-grid, .campaign-grid, .copy-grid { grid-template-columns: 1fr; }
    .copy-card-wide { grid-column: auto; }
    .gallery-admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-form { align-items: stretch; flex-direction: column; }
    .search-field { min-width: 0; }
    .filter-form select { width: 100%; }
    .upgrade-card { grid-template-columns: 1fr; }
    .upgrade-card > span { width: 48px; height: 48px; }
    .result-heading { align-items: flex-start; flex-direction: column; }
    .sticky-save { align-items: stretch; flex-direction: column; }
    .sticky-save span { display: none; }
    .team-list article { grid-template-columns: auto 1fr auto; }
    .team-list .row-menu { grid-column: 2 / -1; }
    .auth-intro { min-height: 300px; }
    .auth-intro h1 { font-size: 32px; }
    .auth-intro > p:not(.eyebrow), .feature-list { font-size: 12px; }
    .auth-card, .install-card { width: calc(100% - 24px); padding: 23px; }
}

@media (max-width: 430px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card div > span { white-space: normal; }
    .page-actions { flex-direction: column; }
    .page-actions > .button { width: 100%; }
    .gallery-admin-grid { grid-template-columns: 1fr; }
    .tabs { width: 100%; }
    .tabs a { flex: 1; text-align: center; }
    .section-editor-heading { align-items: flex-start; }
    .campaign-meta { grid-template-columns: 1fr; }
    .campaign-meta span + span { padding: 8px 0 0; border: 0; border-top: 1px solid var(--line); }
}
/* Google Ads: keep native radio sizing and wrap API review payloads on phones. */
.google-account-option { display:flex; align-items:flex-start; gap:12px; padding:16px; border:1px solid #dce3ef; border-radius:12px; }
.google-account-option input[type="radio"] { flex:0 0 auto; width:18px; height:18px; margin:3px 0 0; }
.google-ads-section { margin-top:20px; }
.google-ads-json { white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; max-height:500px; overflow:auto; }
