@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
    --ink: #17171f;
    --ink-soft: #353542;
    --muted: #777786;
    --muted-2: #a2a2ae;
    --line: #e8e8ef;
    --line-strong: #ddddE7;
    --canvas: #f7f7fa;
    --card: #ffffff;
    --purple: #6657e8;
    --purple-dark: #5143d3;
    --purple-soft: #efedff;
    --blue: #4169e1;
    --green: #1f9d69;
    --green-soft: #eaf8f1;
    --amber: #d98b19;
    --amber-soft: #fff6e4;
    --danger: #c44242;
    --danger-soft: #fff0f0;
    --shadow-sm: 0 1px 2px rgba(21, 21, 31, .03), 0 6px 20px rgba(21, 21, 31, .035);
    --shadow-md: 0 18px 50px rgba(40, 34, 94, .09);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, strong, .brand-mark { font-family: Manrope, "DM Sans", sans-serif; }
a { color: var(--purple); text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Application shell */
.app-layout { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.app-sidebar { position: fixed; inset: 0 auto 0 0; width: 252px; z-index: 60; display: flex; flex-direction: column; padding: 20px 16px; color: #4f4f5f; background: rgba(255,255,255,.96); border-right: 1px solid var(--line); backdrop-filter: blur(20px); }
.sidebar-brand { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 7px; }
.brand-mark { display: flex; align-items: center; gap: 11px; color: var(--ink); letter-spacing: -.025em; }
.brand-mark > span:last-child { display: grid; }
.brand-mark strong { font-size: 16px; line-height: 1.1; }
.brand-mark small { margin-top: 3px; color: var(--muted-2); font: 500 9px/1 "DM Sans", sans-serif; letter-spacing: .04em; }
.brand-symbol { width: 35px; height: 35px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #2b2b36 10%, #6b59eb 100%); border-radius: 11px; box-shadow: 0 9px 20px rgba(97,82,220,.24); font: 800 15px/1 Manrope, sans-serif; }
.sidebar-close { display: none; border: 0; background: transparent; font-size: 26px; color: var(--muted); cursor: pointer; }
.workspace-card { display: grid; grid-template-columns: 34px minmax(0,1fr) 8px; gap: 10px; align-items: center; margin: 22px 0 18px; padding: 11px; background: #f8f8fb; border: 1px solid var(--line); border-radius: 13px; }
.workspace-card > span:nth-child(2) { min-width: 0; display: grid; }
.workspace-card small { color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.workspace-card strong { overflow: hidden; color: var(--ink-soft); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.workspace-avatar { width: 34px; height: 34px; display: grid; place-items: center; color: #5544d0; background: linear-gradient(145deg,#eeeaff,#dcd7ff); border-radius: 10px; font-weight: 800; }
.workspace-avatar.admin { color: #fff; background: #262630; }
.workspace-status { width: 7px; height: 7px; background: #42bd83; border: 2px solid #dff7eb; border-radius: 50%; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { margin: 17px 11px 7px; color: #b1b1bc; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; }
.sidebar-nav a { min-height: 42px; display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; padding: 0 12px; color: #71717f; border: 1px solid transparent; border-radius: 11px; font-size: 13px; font-weight: 600; transition: .2s ease; }
.sidebar-nav a svg { width: 18px; height: 18px; }
.sidebar-nav a:hover { color: #353541; background: #f7f7fa; }
.sidebar-nav a.active { color: #322b87; background: var(--purple-soft); border-color: #e4e0ff; box-shadow: inset 3px 0 0 #6957ea; }
.sidebar-nav a.active svg { color: var(--purple); }
.sidebar-nav a em { min-width: 21px; padding: 2px 6px; color: var(--muted); background: #eeeeF3; border-radius: 8px; font-size: 9px; font-style: normal; text-align: center; }
.sidebar-foot { margin-top: auto; }
.system-health { display: flex; gap: 9px; align-items: center; margin-bottom: 13px; padding: 12px; background: #fbfbfd; border: 1px solid var(--line); border-radius: 12px; }
.system-health > span { width: 8px; height: 8px; background: #36b87b; border-radius: 50%; box-shadow: 0 0 0 4px #e8f8f0; }
.system-health div { display: grid; }
.system-health strong { color: #454552; font-size: 10px; }
.system-health small { color: var(--muted-2); font-size: 9px; }
.sidebar-logout { width: 100%; display: flex; gap: 10px; align-items: center; padding: 11px 12px; color: #8a8996; background: transparent; border: 0; border-radius: 10px; font-size: 12px; cursor: pointer; }
.sidebar-logout:hover { color: var(--danger); background: var(--danger-soft); }
.sidebar-logout svg { width: 17px; }
.sidebar-overlay { display: none; }
.app-workspace { min-width: 0; grid-column: 2; }
.app-topbar { height: 72px; position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; background: rgba(247,247,250,.88); border-bottom: 1px solid rgba(224,224,233,.8); backdrop-filter: blur(16px); }
.topbar-context { display: flex; gap: 12px; align-items: center; }
.topbar-context > div { display: grid; }
.topbar-context small { color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.topbar-context strong { color: #353540; font-size: 13px; }
.mobile-menu { display: none; width: 38px; height: 38px; place-items: center; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.live-pill { display: inline-flex; gap: 7px; align-items: center; padding: 7px 10px; color: #347c59; background: #eef9f3; border: 1px solid #d9f0e4; border-radius: 999px; font-size: 10px; font-weight: 700; }
.live-pill i { width: 6px; height: 6px; background: #36b87b; border-radius: 50%; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; color: #777784; background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.icon-button svg { width: 16px; }
.user-chip { display: flex; gap: 9px; align-items: center; padding-left: 5px; }
.user-chip > span { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg,#2e2e3b,#6c5ce7); border-radius: 10px; font: 700 11px Manrope; }
.user-chip div { display: grid; }
.user-chip strong { font-size: 10px; }
.user-chip small { color: var(--muted-2); font-size: 9px; }
.app-content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 34px clamp(22px, 3.2vw, 52px) 80px; }

/* Shared UI */
.page-head { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 25px; }
.page-head h1 { margin: 5px 0 7px; font-size: clamp(28px,3vw,38px); line-height: 1.1; letter-spacing: -.045em; }
.page-head p, .section-head p { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { color: var(--purple); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .17em; }
.head-actions { display: flex; gap: 10px; align-items: center; }
.button { min-height: 40px; display: inline-flex; gap: 8px; align-items: center; justify-content: center; padding: 0 16px; color: #fff; background: #24242e; border: 1px solid #24242e; border-radius: 11px; box-shadow: 0 6px 16px rgba(27,27,35,.12); font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { color: #fff; background: #393946; transform: translateY(-1px); box-shadow: 0 9px 22px rgba(27,27,35,.16); }
.button.primary { background: var(--purple); border-color: var(--purple); box-shadow: 0 8px 20px rgba(101,87,232,.22); }
.button.primary:hover { background: var(--purple-dark); }
.button.ghost { color: #535360; background: #fff; border-color: var(--line-strong); box-shadow: none; }
.button.ghost:hover { color: var(--ink); background: #fafafd; }
.button.full, .button.wide { width: 100%; }
.button svg { width: 16px; height: 16px; }
.panel { margin-bottom: 20px; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel.flush { padding: 0; overflow: hidden; }
.panel.soft { background: linear-gradient(145deg,#fbfaff,#f7f6ff); border-color: #e6e2ff; }
.section-head { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { margin: 0 0 2px; font-size: 15px; letter-spacing: -.02em; }
.section-head a { font-size: 11px; font-weight: 700; }
.section-kicker { color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.grid.two { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; }
.grid.asymmetric { grid-template-columns: minmax(0,1.4fr) minmax(320px,.6fr); }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 20px; }
.metric-card { position: relative; min-height: 132px; overflow: hidden; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); }
.metric-card:after { content: ''; position: absolute; width: 75px; height: 75px; right: -25px; bottom: -28px; background: var(--metric-soft,#f3f2ff); border-radius: 50%; }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-icon { width: 31px; height: 31px; display: grid; place-items: center; color: var(--metric,#6757e8); background: var(--metric-soft,#efedff); border-radius: 9px; }
.metric-icon svg { width: 15px; }
.metric-trend { color: var(--green); font-size: 9px; font-weight: 700; }
.metric-card > span { display: block; margin-top: 14px; color: var(--muted); font-size: 10px; }
.metric-card > strong { display: block; margin-top: 2px; font-size: 27px; letter-spacing: -.045em; }
.metric-card.purple { --metric:#6757e8; --metric-soft:#efedff; }
.metric-card.blue { --metric:#3976dc; --metric-soft:#ecf3ff; }
.metric-card.green { --metric:#22986a; --metric-soft:#eaf8f1; }
.metric-card.amber { --metric:#c88118; --metric-soft:#fff5df; }
.badge { display: inline-flex; gap: 5px; align-items: center; padding: 4px 8px; border: 1px solid transparent; border-radius: 999px; font-size: 9px; font-weight: 800; text-transform: capitalize; white-space: nowrap; }
.badge:before { content: ''; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.badge.active, .badge.healthy { color: #26845e; background: var(--green-soft); border-color: #d7f0e4; }
.badge.suspended, .badge.archived, .badge.error { color: #ae4141; background: var(--danger-soft); border-color: #f5dada; }
.badge.pending { color: #a76b14; background: var(--amber-soft); border-color: #f3e1bd; }
.notice { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 20px; padding: 13px 15px; border: 1px solid; border-radius: 12px; font-size: 12px; }
.notice svg { width: 17px; flex: 0 0 auto; }
.notice.success { color: #277553; background: #effaf4; border-color: #d7f0e3; }
.notice.error { display: block; color: #9c3c3c; background: #fff2f2; border-color: #f5d6d6; }
.notice ul { margin: 6px 0 0; }
.key-notice { display: block; color: #755311; background: #fff9e9; border-color: #f0dfae; }
.key-notice label { display: block; margin-top: 12px; }
.code-shell { position: relative; }
.key-notice code, .code-block { display: block; overflow: auto; margin-top: 7px; padding: 14px 15px; color: #dcd8ff; background: #1e1d2b; border: 1px solid #343247; border-radius: 11px; font: 500 10px/1.7 ui-monospace,SFMono-Regular,Menlo,monospace; white-space: pre-wrap; word-break: break-all; }
.copy-button { position: absolute; top: 9px; right: 9px; min-height: 28px; padding: 0 9px; color: #cac6e8; background: #302e42; border: 1px solid #48455d; border-radius: 7px; font-size: 9px; cursor: pointer; }

/* Tables and lists */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 12px 16px; color: #9a99a7; background: #fbfbfd; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 800; text-align: left; text-transform: uppercase; letter-spacing: .09em; }
td { padding: 14px 16px; color: #575765; border-bottom: 1px solid #eeeeF3; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .18s; }
tbody tr:hover { background: #fbfbfe; }
td strong { display: block; color: #343440; font-size: 11px; }
td small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9px; }
td code { color: #5142c8; background: #f2f0ff; padding: 4px 7px; border-radius: 6px; font-size: 10px; }
.table-product { display: flex; gap: 10px; align-items: center; min-width: 210px; }
.table-product img, .table-product .fallback { width: 38px; height: 38px; flex: 0 0 auto; object-fit: cover; background: #eeecff; border-radius: 9px; }
.table-product .fallback { display: grid; place-items: center; color: var(--purple); font-weight: 800; }
.empty { color: var(--muted) !important; padding: 38px !important; text-align: center !important; }
.product-list article { display: flex; gap: 11px; align-items: center; padding: 11px 0; border-bottom: 1px solid #eeeeF3; }
.product-list article:last-child { border: 0; }
.product-list article .badge { margin-left: auto; }
.product-thumb { width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; overflow: hidden; color: var(--purple); background: var(--purple-soft); border-radius: 10px; font-weight: 800; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-list small { display: block; color: var(--muted-2); font-size: 9px; }
.source-list > div { display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 8px 0; border-bottom: 1px solid #eeeeF3; }
.source-list > div:last-child { border: 0; }
.source-list strong { color: #464652; font-size: 11px; }
.source-list small { margin-left: auto; color: var(--muted-2); font-size: 9px; }
.source-list form { margin-left: auto; }
.link-button { padding: 0; color: var(--purple); background: transparent; border: 0; font-size: 10px; font-weight: 700; cursor: pointer; }
.link-button.danger { color: var(--danger); }

/* Forms */
label { display: block; color: #565663; font-size: 10px; font-weight: 700; }
label small { display: block; margin-top: 5px; color: var(--muted-2); font-weight: 400; }
input, textarea, select { width: 100%; min-height: 41px; display: block; margin-top: 7px; padding: 10px 11px; color: #33333f; background: #fff; border: 1px solid #ddddE6; border-radius: 10px; outline: none; font-size: 11px; transition: .18s; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #b4b3bd; }
input:hover, textarea:hover, select:hover { border-color: #cac9d5; }
input:focus, textarea:focus, select:focus { border-color: #8b7eee; box-shadow: 0 0 0 3px rgba(105,87,232,.11); }
input[type=color] { height: 42px; padding: 4px; }
.check { display: flex; gap: 8px; align-items: center; min-height: 40px; }
.check input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--purple); }
.compact-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; align-items: end; }
.compact-form .wide { grid-column: span 2; }
.form-grid { max-width: 900px; }
.form-section { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 15px; margin-bottom: 22px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.form-section > span { width: 34px; height: 34px; display: grid; place-items: center; color: var(--purple); background: var(--purple-soft); border-radius: 10px; font-size: 10px; font-weight: 800; }
.form-section > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.form-section h2 { grid-column: 1/-1; margin: 6px 0 5px; font-size: 15px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; }
.inline-form { display: flex; gap: 8px; margin-top: 14px; }
.inline-form input, .inline-form select { margin: 0; }
.inline-form .button { flex: 0 0 auto; }
.create-box summary { display: flex; align-items: center; justify-content: space-between; color: #444450; cursor: pointer; font: 700 13px Manrope; list-style: none; }
.create-box summary:after { content: '+'; width: 25px; height: 25px; display: grid; place-items: center; color: var(--purple); background: var(--purple-soft); border-radius: 8px; }
.create-box[open] summary { margin-bottom: 20px; }
.create-box[open] summary:after { content: '−'; }

/* Dashboard */
.chart-panel { min-height: 320px; }
.chart-legend { display: flex; gap: 14px; color: var(--muted); font-size: 9px; }
.chart-legend span { display: inline-flex; gap: 5px; align-items: center; }
.chart-legend i { width: 7px; height: 7px; background: var(--purple); border-radius: 2px; }
.chart-legend span:last-child i { background: #d8d4fb; }
.bars { height: 225px; display: flex; gap: 7px; align-items: flex-end; justify-content: space-between; padding: 18px 0 23px; background-image: linear-gradient(to bottom, transparent 24%,#f0f0f5 25%,transparent 25%,transparent 49%,#f0f0f5 50%,transparent 50%,transparent 74%,#f0f0f5 75%,transparent 75%); border-bottom: 1px solid var(--line); }
.bars > div { width: 100%; max-width: 27px; height: 100%; flex: 1; display: flex; position: relative; align-items: flex-end; }
.bars > div:only-child { margin: 0 auto; }
.bars span { width: 100%; min-height: 3px; background: linear-gradient(180deg,#8275ef,#6252dd); border-radius: 4px 4px 1px 1px; transition: height .3s; }
.bars i { position: absolute; bottom: -20px; color: var(--muted-2); font-size: 8px; font-style: normal; }
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { position: relative; min-height: 43px; display: flex; align-items: center; padding: 8px 0 8px 39px; color: #6e6e7b; border-bottom: 1px solid #eeeeF3; font-size: 11px; }
.checklist li:before { content: ''; position: absolute; left: 0; width: 25px; height: 25px; background: #f6f6f9; border: 1px solid #e2e1e9; border-radius: 8px; }
.checklist li.done { color: #3f3f4a; font-weight: 600; }
.checklist li.done:before { content: '✓'; display: grid; place-items: center; color: #fff; background: #33aa73; border-color: #33aa73; font-weight: 800; }
.setup-complete { margin-top: 14px; padding: 12px; color: #5a509d; background: #f5f3ff; border: 1px solid #e7e2ff; border-radius: 10px; font-size: 10px; }
.integration-card { position: relative; overflow: hidden; }
.integration-card:after { content: ''; position: absolute; width: 130px; height: 130px; right: -65px; top: -65px; background: radial-gradient(circle,#e4dfff,transparent 70%); }
.integration-health { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 15px; }
.integration-health div { padding: 10px; background: #fafafd; border: 1px solid var(--line); border-radius: 10px; }
.integration-health span { display: block; color: var(--muted-2); font-size: 8px; }
.integration-health strong { font-size: 11px; }

/* Widget editor */
.widget-grid { grid-template-columns: minmax(0,.9fr) minmax(420px,1.1fr) !important; align-items: start; }
.widget-settings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.widget-settings .settings-title { grid-column: 1/-1; margin: 8px 0 -3px; padding-top: 15px; color: var(--muted-2); border-top: 1px solid var(--line); font-size: 9px; text-transform: uppercase; letter-spacing: .11em; }
.widget-settings .settings-title:first-of-type { padding-top: 0; border: 0; }
.widget-settings .wide { grid-column: 1/-1; }
.preview { position: sticky; top: 94px; }
.preview-stage { min-height: 520px; position: relative; display: grid; place-items: center; overflow: hidden; padding: 35px; background-color: #f2f1f8; background-image: linear-gradient(#e8e7ef 1px,transparent 1px),linear-gradient(90deg,#e8e7ef 1px,transparent 1px); background-size: 42px 42px; border: 1px solid #e4e3eb; border-radius: 15px; }
.preview-browser { width: 100%; height: 100%; min-height: 420px; position: relative; padding: 18px; background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9); border-radius: 16px; box-shadow: 0 20px 60px rgba(65,57,105,.12); }
.preview-browser-top { display: flex; gap: 5px; margin-bottom: 34px; }
.preview-browser-top i { width: 6px; height: 6px; background: #d2d1db; border-radius: 50%; }
.preview-lines { display: grid; gap: 10px; }
.preview-lines i { width: 65%; height: 8px; background: #e9e8ef; border-radius: 5px; }
.preview-lines i:nth-child(2) { width: 92%; }
.preview-lines i:nth-child(3) { width: 45%; }
.widget-preview-card { --preview-bg:#fff; --preview-text:#17212b; --preview-button:#0f766e; --preview-primary:#0f766e; --preview-radius:18px; width: calc(100% - 34px); position: absolute; left: 17px; bottom: 17px; display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 13px; color: var(--preview-text); background: var(--preview-bg); border: 1px solid rgba(20,20,30,.1); border-radius: var(--preview-radius); box-shadow: 0 16px 45px rgba(30,29,45,.18); }
.widget-preview-card .demo-image { width: 54px; height: 54px; display: grid; place-items: center; color: var(--preview-primary); background: color-mix(in srgb,var(--preview-primary) 12%,#fff); border-radius: 11px; }
.widget-preview-card strong { display: block; font-size: 12px; }
.widget-preview-card p { margin: 3px 0 0; opacity: .65; font-size: 9px; }
.widget-preview-card b { display: block; margin-top: 4px; color: var(--preview-primary); font-size: 11px; }
.widget-preview-card button { padding: 9px 12px; color: #fff; background: var(--preview-button); border: 0; border-radius: 9px; font-size: 10px; font-weight: 800; }

/* Public marketing */
.public-body { background: #fbfbfd; }
.public-main { min-height: 100vh; overflow: hidden; }
.public-container { width: min(1180px,calc(100% - 40px)); margin: 0 auto; }
.marketing-nav { height: 80px; display: flex; align-items: center; justify-content: space-between; }
.marketing-nav .brand-mark small { display: none; }
.marketing-links { display: flex; gap: 30px; align-items: center; }
.marketing-links > a { color: #70707c; font-size: 11px; font-weight: 600; }
.marketing-links > a:hover { color: var(--ink); }
.nav-cta { padding: 9px 14px !important; color: #fff !important; background: #202029; border-radius: 9px; }
.marketing-hero { position: relative; min-height: 720px; padding: 85px 0 55px; text-align: center; }
.marketing-hero:before { content: ''; position: absolute; inset: 0 50% auto; width: 1100px; height: 650px; transform: translateX(-50%); pointer-events: none; background-image: linear-gradient(rgba(104,87,232,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(104,87,232,.055) 1px,transparent 1px); background-size: 76px 76px; mask-image: radial-gradient(ellipse at center,#000,transparent 70%); }
.marketing-hero:after { content: ''; position: absolute; width: 600px; height: 430px; left: 50%; top: -150px; transform: translateX(-50%); background: radial-gradient(circle,rgba(110,92,238,.18),rgba(110,92,238,0) 68%); filter: blur(20px); pointer-events: none; }
.hero-copy { position: relative; z-index: 2; }
.hero-pill { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px; color: #5b4cd2; background: rgba(246,244,255,.9); border: 1px solid #ded9ff; border-radius: 999px; font-size: 9px; font-weight: 700; }
.hero-pill i { width: 6px; height: 6px; background: #6a58e8; border-radius: 50%; box-shadow: 0 0 0 4px #e7e2ff; }
.marketing-hero h1 { max-width: 820px; margin: 25px auto 20px; font-size: clamp(46px,7vw,82px); line-height: .98; letter-spacing: -.065em; }
.marketing-hero h1 span { color: transparent; background: linear-gradient(90deg,#6b57e8,#4777dc); background-clip: text; -webkit-background-clip: text; }
.marketing-hero .lead { max-width: 590px; margin: 0 auto; color: #777582; font-size: 15px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; margin-top: 28px; }
.hero-note { display: block; margin-top: 12px; color: #aaa9b3; font-size: 9px; }
.product-window { width: min(940px,94%); position: relative; z-index: 3; margin: 65px auto 0; padding: 9px; background: rgba(255,255,255,.66); border: 1px solid rgba(255,255,255,.9); border-radius: 22px; box-shadow: 0 35px 100px rgba(65,54,130,.17); backdrop-filter: blur(16px); text-align: left; }
.window-inner { min-height: 355px; display: grid; grid-template-columns: 150px 1fr; overflow: hidden; background: #fbfbfd; border: 1px solid #e9e8ef; border-radius: 15px; }
.window-sidebar { padding: 17px 13px; background: #fff; border-right: 1px solid #ecebf1; }
.window-brand { width: 25px; height: 25px; display: grid; place-items: center; margin-bottom: 26px; color: #fff; background: #5f50dc; border-radius: 8px; font-size: 9px; font-weight: 800; }
.window-nav-line { height: 25px; margin-bottom: 5px; background: #f5f4f8; border-radius: 7px; }
.window-nav-line.active { background: #ece9ff; }
.window-content { padding: 23px; }
.window-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.window-head strong { font-size: 18px; }
.window-head span { padding: 6px 10px; color: #fff; background: #25252f; border-radius: 7px; font-size: 8px; }
.window-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.window-metrics div { height: 78px; padding: 12px; background: #fff; border: 1px solid #e9e8ef; border-radius: 11px; }
.window-metrics small { display: block; color: #aaa9b2; font-size: 7px; }
.window-metrics b { display: block; margin-top: 8px; font-size: 18px; }
.window-bottom { display: grid; grid-template-columns: 1fr .7fr; gap: 9px; margin-top: 9px; }
.mini-chart, .mini-widget { height: 150px; position: relative; overflow: hidden; padding: 13px; background: #fff; border: 1px solid #e9e8ef; border-radius: 11px; }
.mini-chart:after { content: ''; position: absolute; inset: 45px 13px 17px; background: linear-gradient(135deg,transparent 42%,#6b59e8 43%,#6b59e8 46%,transparent 47%),linear-gradient(25deg,transparent 49%,#6b59e8 50%,#6b59e8 53%,transparent 54%); opacity: .75; }
.mini-widget { display: grid; place-items: end center; background: linear-gradient(145deg,#f0eefb,#e7e5f2); }
.mini-widget-card { width: 100%; padding: 11px; color: #fff; background: #282735; border-radius: 10px; font-size: 8px; box-shadow: 0 12px 25px rgba(30,29,45,.2); }
.logo-strip { display: flex; gap: 45px; align-items: center; justify-content: center; padding: 42px 0; color: #aaa9b2; border-bottom: 1px solid var(--line); font: 700 11px Manrope; letter-spacing: .04em; }
.marketing-section { padding: 105px 0; }
.section-intro { max-width: 650px; margin-bottom: 43px; }
.section-intro.center { margin-right: auto; margin-left: auto; text-align: center; }
.section-intro h2 { margin: 12px 0; font-size: clamp(34px,5vw,54px); line-height: 1.02; letter-spacing: -.055em; }
.section-intro p { color: var(--muted); font-size: 14px; }
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.feature-card { min-height: 250px; position: relative; overflow: hidden; padding: 25px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.feature-card.large { grid-column: span 2; }
.feature-card .feature-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--purple); background: var(--purple-soft); border-radius: 11px; }
.feature-card h3 { margin: 65px 0 8px; font-size: 18px; }
.feature-card p { max-width: 360px; margin: 0; color: var(--muted); font-size: 11px; }
.feature-orbit { position: absolute; width: 220px; height: 220px; right: -30px; bottom: -105px; border: 1px solid #e8e4ff; border-radius: 50%; box-shadow: 0 0 0 28px #faf9ff,0 0 0 29px #eeebff; }
.process-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 18px; }
.process-grid article { min-height: 220px; padding: 25px; background: #fff; }
.process-number { width: 29px; height: 29px; display: grid; place-items: center; color: var(--purple); background: var(--purple-soft); border-radius: 9px; font-size: 9px; font-weight: 800; }
.process-grid h3 { margin: 60px 0 8px; font-size: 16px; }
.process-grid p { margin: 0; color: var(--muted); font-size: 11px; }
.cta-section { padding: 90px 30px; position: relative; overflow: hidden; color: #fff; background: #20202a; border-radius: 24px; text-align: center; }
.cta-section:before { content: ''; position: absolute; width: 450px; height: 450px; left: 50%; top: -270px; transform: translateX(-50%); background: #6957e8; border-radius: 50%; filter: blur(90px); opacity: .45; }
.cta-section > * { position: relative; }
.cta-section h2 { max-width: 680px; margin: 0 auto 14px; font-size: clamp(32px,5vw,54px); line-height: 1.05; letter-spacing: -.05em; }
.cta-section p { color: #b8b7c3; }
.cta-section .button { color: #272631; background: #fff; border-color: #fff; }
.marketing-footer { display: flex; justify-content: space-between; padding: 35px 0; color: var(--muted); font-size: 10px; }

/* Authentication */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; }
.auth-visual { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; margin: 14px; padding: 34px; color: #fff; background: #24232e; border-radius: 22px; }
.auth-visual:before { content: ''; position: absolute; width: 520px; height: 520px; left: 50%; top: 45%; transform: translate(-50%,-50%); background: radial-gradient(circle,#7564f0 0,#4b3eba 25%,transparent 67%); filter: blur(28px); opacity: .8; }
.auth-visual:after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px); background-size: 65px 65px; mask-image: radial-gradient(circle,#000,transparent 75%); }
.auth-visual .brand-mark, .auth-visual-copy, .auth-quote { position: relative; z-index: 2; }
.auth-visual .brand-mark { color: #fff; }
.auth-visual-copy { max-width: 520px; margin: auto 0; }
.auth-visual-copy span { color: #c9c2ff; font-size: 10px; text-transform: uppercase; letter-spacing: .15em; }
.auth-visual-copy h2 { margin: 16px 0; font-size: clamp(40px,5vw,68px); line-height: .98; letter-spacing: -.06em; }
.auth-visual-copy p { max-width: 450px; color: #bbb9c9; font-size: 13px; }
.auth-quote { display: flex; gap: 12px; align-items: center; color: #b9b7c5; font-size: 10px; }
.auth-quote i { width: 35px; height: 1px; background: #807c96; }
.auth-form-side { display: grid; place-items: center; padding: 50px; }
.auth-card { width: min(390px,100%); }
.auth-card .mobile-brand { display: none; margin-bottom: 45px; }
.auth-card h1 { margin: 0 0 8px; font-size: 31px; letter-spacing: -.045em; }
.auth-card > p { margin: 0 0 30px; color: var(--muted); font-size: 12px; }
.auth-card label { margin: 16px 0; }
.auth-card .check { margin: 17px 0; }
.auth-card .back { display: block; margin-top: 22px; color: var(--muted); font-size: 10px; text-align: center; }
.public-notice { width: min(500px,calc(100% - 30px)); position: fixed; top: 18px; left: 50%; z-index: 100; transform: translateX(-50%); }

/* Pagination */
nav[role=navigation] { margin-top: 18px; }
nav[role=navigation] > div:first-child { font-size: 10px; }

@media (max-width: 1100px) {
    .metrics { grid-template-columns: repeat(2,1fr); }
    .grid.asymmetric { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: repeat(2,1fr); }
    .feature-card.large { grid-column: auto; }
    .process-grid { grid-template-columns: repeat(2,1fr); }
    .widget-grid { grid-template-columns: 1fr !important; }
    .preview { position: static; }
}

@media (max-width: 850px) {
    .app-layout { display: block; }
    .app-sidebar { transform: translateX(-105%); box-shadow: 20px 0 60px rgba(25,24,40,.14); transition: transform .25s ease; }
    .sidebar-open .app-sidebar { transform: none; }
    .sidebar-open .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(24,23,34,.38); backdrop-filter: blur(3px); }
    .sidebar-close, .mobile-menu { display: grid; }
    .app-workspace { min-height: 100vh; }
    .app-topbar { padding: 0 18px; }
    .app-content { padding: 26px 18px 65px; }
    .user-chip div, .live-pill { display: none; }
    .grid.two { grid-template-columns: 1fr; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-form-side { min-height: 100vh; padding: 28px; }
    .auth-card .mobile-brand { display: flex; }
    .window-inner { grid-template-columns: 110px 1fr; }
    .marketing-hero { padding-top: 60px; }
}

@media (max-width: 620px) {
    .page-head { align-items: flex-start; flex-direction: column; }
    .head-actions { width: 100%; }
    .head-actions .button { flex: 1; }
    .metrics { grid-template-columns: 1fr 1fr; }
    .metric-card { min-height: 118px; padding: 15px; }
    .metric-card > strong { font-size: 23px; }
    .compact-form, .form-section > div, .widget-settings { grid-template-columns: 1fr; }
    .compact-form .wide, .widget-settings .wide, .widget-settings .settings-title { grid-column: auto; }
    .form-section { grid-template-columns: 1fr; }
    .form-actions, .inline-form { flex-direction: column; }
    .source-list > div { align-items: flex-start; flex-wrap: wrap; }
    .source-list small, .source-list form { margin-left: 0; }
    .marketing-links > a:not(.nav-cta) { display: none; }
    .marketing-hero h1 { font-size: 48px; }
    .hero-actions { flex-direction: column; align-items: stretch; padding: 0 30px; }
    .product-window { width: 100%; transform: scale(.9); transform-origin: center top; }
    .window-inner { grid-template-columns: 1fr; }
    .window-sidebar { display: none; }
    .window-content { padding: 15px; }
    .window-metrics { grid-template-columns: 1fr 1fr; }
    .window-metrics div:last-child { display: none; }
    .window-bottom { grid-template-columns: 1fr; }
    .mini-widget { display: none; }
    .logo-strip { gap: 18px; flex-wrap: wrap; }
    .feature-grid, .process-grid { grid-template-columns: 1fr; }
    .marketing-section { padding: 70px 0; }
    .marketing-footer { gap: 12px; flex-direction: column; }
    .preview-stage { min-height: 430px; padding: 15px; }
    .widget-preview-card { grid-template-columns: 45px 1fr; }
    .widget-preview-card button { grid-column: 1/-1; }
}
