:root {
  --ink: #182230;
  --muted: #6f7b8c;
  --line: #e6eaf0;
  --surface: #ffffff;
  --canvas: #f6f8fb;
  --violet: #6559e8;
  --violet-dark: #4d42c8;
  --green: #1b9a68;
  --amber: #b27a09;
  --shadow: 0 18px 45px rgba(27, 39, 64, .08);
}

* { box-sizing: border-box; }
*[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
.topbar { height: 74px; padding: 0 clamp(20px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(14px); }
.brand { font-weight: 850; letter-spacing: -.06em; font-size: 22px; }
.brand span { color: var(--violet); }
.nav { display: flex; align-items: center; gap: 22px; color: var(--muted); font-weight: 650; }
.nav a:hover { color: var(--ink); }
.inline-form { display: inline; }
.button { display: inline-flex; justify-content: center; align-items: center; border: 0; border-radius: 10px; padding: 12px 18px; background: var(--violet); color: white; font-weight: 750; cursor: pointer; box-shadow: 0 8px 18px rgba(101,89,232,.22); }
.button:hover { background: var(--violet-dark); transform: translateY(-1px); }
.button-small { padding: 8px 14px; }
.button-ghost { background: transparent; color: var(--muted); box-shadow: none; padding: 0; }
.page-shell { max-width: 1220px; margin: 0 auto; padding: 64px 24px 80px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.compact-hero h1 { margin: 0 0 10px; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.055em; }
.eyebrow { margin: 0 0 10px; color: var(--violet); font-size: 11px; font-weight: 850; letter-spacing: .16em; }
.lede { margin: 0; color: var(--muted); max-width: 620px; font-size: 17px; }
.status-strip { display: flex; flex-wrap: wrap; gap: 24px; padding: 14px 18px; margin-bottom: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.status-strip strong { color: var(--ink); }
.status-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; margin-right: 7px; background: var(--amber); }
.dot-success { background: var(--green); }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.metric-card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.metric-card { padding: 20px; }
.metric-card span, .metric-card small { color: var(--muted); display: block; }
.metric-card strong { display: block; margin: 8px 0 2px; font-size: 32px; letter-spacing: -.06em; }
.metric-card-alert strong { color: #c26444; }
.two-column { display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; }
.panel { padding: 26px; }
.panel-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.panel h2 { margin: 0 0 18px; letter-spacing: -.035em; }
.icon-box { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #f0efff; color: var(--violet); font-size: 20px; }
.integration-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.integration-row div { flex: 1; }
.integration-row strong, .integration-row small { display: block; }
.integration-row small { color: var(--muted); margin-top: 2px; }
.integration-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; font-weight: 850; }
.meta-icon { background: #e9edff; color: #4459c9; }.drive-icon { background: #e8f8ee; color: #2d9b5f; }.cloud-icon { background: #fff1e8; color: #cc6f31; }
.status-pill { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 100px; background: #f1f3f6; color: var(--muted); font-size: 12px; font-weight: 750; white-space: nowrap; }
.status-success { background: #e7f7ef; color: var(--green); }
.panel-dark { background: #20263a; color: white; border-color: #20263a; }.panel-dark .eyebrow { color: #a9a2ff; }.panel-dark p:not(.eyebrow) { color: #c7cada; }.text-link { color: #bcb6ff; font-weight: 750; }
.notice { padding: 13px 16px; margin-bottom: 20px; border-radius: 10px; font-weight: 650; }.notice-success { color: #156845; background: #e8f8ef; }.notice-error { color: #a33f37; background: #fff0ee; }
.auth-shell { min-height: 62vh; display: grid; place-items: center; }.auth-card { width: min(100%, 460px); padding: 34px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }.auth-card-wide { width: min(100%, 520px); }.auth-card h1 { margin: 0 0 7px; letter-spacing: -.05em; }.muted { color: var(--muted); }.form-stack { display: grid; gap: 16px; margin-top: 25px; }.form-stack label { display: grid; gap: 7px; font-weight: 700; }.form-stack input { width: 100%; padding: 12px 13px; border: 1px solid #d8dee8; border-radius: 9px; font: inherit; }.form-stack input:focus { outline: 3px solid #e9e7ff; border-color: var(--violet); }.label-help { color: var(--muted); font-size: 12px; font-weight: 500; }.form-footnote { color: var(--muted); text-align: center; }.form-footnote a { color: var(--violet); font-weight: 750; }
.footer { padding: 24px; text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 24px; }
.button-secondary { background: #eef0ff; color: var(--violet-dark); box-shadow: none; }
.button-secondary:hover { background: #e3e5ff; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.upload-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 22px; }
.dropzone { display: grid; justify-items: center; gap: 7px; padding: 32px 20px; border: 1px dashed #b9bfe0; border-radius: 14px; background: #fafaff; text-align: center; cursor: pointer; }
.dropzone:hover { border-color: var(--violet); background: #f6f5ff; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #eceaff; color: var(--violet); font-size: 24px; font-weight: 800; }
.dropzone small, .file-summary { color: var(--muted); font-size: 12px; }
.file-summary { font-weight: 700; }
.media-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.media-item { min-width: 0; display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.media-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; background: #edf0f5; }
.media-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setup-list { display: grid; gap: 10px; margin: 24px 0; }
.setup-row { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.setup-row strong, .setup-row small { display: block; }.setup-row small { color: var(--muted); margin-top: 2px; }
.setup-check { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }.setup-ok { background: var(--green); }
.code-block { display: grid; gap: 8px; padding: 14px; margin: 18px 0; background: #20263a; color: white; border-radius: 10px; overflow-wrap: anywhere; }.code-block code { color: #c9c4ff; }
.space-layout { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: 22px; align-items: start; }
.space-create-panel { position: sticky; top: 96px; }
.form-stack select { width: 100%; padding: 12px 13px; border: 1px solid #d8dee8; border-radius: 9px; background: white; font: inherit; color: var(--ink); }
.checkbox-line { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; font-weight: 650 !important; }
.checkbox-line input { width: auto !important; }
.space-list { display: grid; gap: 10px; }
.space-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fcfdff; }
.space-card-paused { opacity: .72; }
.space-card-title { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.space-status-dot { width: 9px; height: 9px; border-radius: 50%; background: #b8bec8; }
.space-status-active { background: var(--green); box-shadow: 0 0 0 4px #e7f7ef; }
.space-account, .space-meta, .space-next-run { color: var(--muted); font-size: 12px; }
.space-account { display: block; margin: 3px 0 8px 17px; }
.space-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-left: 17px; }
.space-meta span { padding: 3px 7px; background: #f0f2f6; border-radius: 6px; }
.space-card-actions { display: flex; align-items: flex-start; gap: 7px; }
.space-card-actions form { margin: 0; }
.space-next-run { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--line); }
.button-pause { background: #fff0ee; color: #a34b3f; box-shadow: none; }
.button-pause:hover { background: #ffe4e0; }
.account-manager { padding: 22px; }
.search-field { display: grid; gap: 7px; margin: 4px 0 14px; color: var(--muted); font-weight: 700; }
.search-field input { width: 100%; padding: 12px 13px; border: 1px solid #d8dee8; border-radius: 9px; font: inherit; }
.account-list { display: grid; max-height: 640px; overflow-y: auto; border-top: 1px solid var(--line); }
.account-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.account-row[hidden] { display: none; }
.account-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #eef0ff; }
.account-avatar-fallback { display: grid; place-items: center; color: var(--violet); font-weight: 800; }
.account-identity { min-width: 0; }
.account-identity strong, .account-identity small, .account-space-state small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-identity small, .account-space-state small { color: var(--muted); font-size: 12px; }
.account-space-state { min-width: 110px; text-align: right; }
.account-space-state .status-pill { margin-bottom: 3px; }
.empty-state { color: var(--muted); padding: 14px 0; }
.empty-panel { padding: 28px; }
.space-selector-bar { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 16px 18px; margin-bottom: 22px; }
.space-selector-bar label { display: grid; gap: 6px; min-width: min(100%, 480px); font-weight: 700; }
.space-selector-bar select { padding: 11px 12px; border: 1px solid #d8dee8; border-radius: 9px; background: white; font: inherit; }
.media-item small { color: var(--muted); font-size: 11px; }
.form-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.step-badge { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--violet); background: #eeecff; font-weight: 850; }
.account-picker { display: grid; gap: 7px; position: relative; }
.account-search-box { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid #d8dee8; border-radius: 9px; background: white; }
.account-search-box:focus-within { outline: 3px solid #e9e7ff; border-color: var(--violet); }
.account-search-box input { min-width: 0; padding: 12px 0; border: 0; outline: 0; }
.picker-search-icon { color: var(--muted); font-size: 22px; line-height: 1; }
.account-picker-options { display: none; position: absolute; z-index: 4; top: 77px; left: 0; right: 0; max-height: 270px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 18px 40px rgba(27, 39, 64, .16); }
.account-picker-options.is-open { display: grid; gap: 2px; }
.account-picker-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 8px; background: white; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.account-picker-option:hover, .account-picker-option.is-selected { background: #f2f1ff; }
.account-picker-option[hidden] { display: none; }
.account-picker-avatar, .selected-account-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #eef0ff; }
.account-picker-copy { min-width: 0; }
.account-picker-copy strong, .account-picker-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-picker-copy small, .selected-account-card small { color: var(--muted); font-size: 12px; }
.account-picker-check { color: var(--violet); opacity: 0; font-weight: 850; }
.account-picker-option.is-selected .account-picker-check { opacity: 1; }
.picker-empty { padding: 10px; margin: 0; color: var(--muted); font-size: 13px; }
.selected-account-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #cfcaff; border-radius: 9px; background: #f8f7ff; }
.selected-account-card strong, .selected-account-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.change-account-button { border: 0; background: transparent; color: var(--violet-dark); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.field-hint { color: var(--muted); font-size: 12px; }
.cadence-fieldset { display: grid; gap: 9px; min-width: 0; padding: 0; border: 0; }
.cadence-fieldset legend { padding: 0; font-weight: 700; }
.cadence-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.cadence-option { min-height: 48px; padding: 8px 5px; border: 1px solid #d8dee8; border-radius: 9px; background: white; color: var(--ink); cursor: pointer; font: inherit; font-size: 12px; }
.cadence-option strong, .cadence-option small { display: block; }
.cadence-option small { color: var(--muted); font-size: 10px; }
.cadence-option:hover, .cadence-option.is-selected { border-color: var(--violet); background: #f2f1ff; color: var(--violet-dark); box-shadow: 0 0 0 2px #e9e7ff; }
.automation-toggle { display: grid !important; grid-template-columns: auto minmax(0, 1fr) !important; align-items: center; gap: 10px !important; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.automation-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.automation-toggle strong, .automation-toggle small { display: block; }
.automation-toggle small { color: var(--muted); font-size: 12px; font-weight: 500; }
.toggle-track { display: flex; align-items: center; width: 38px; height: 22px; padding: 3px; border-radius: 99px; background: #c8ced8; transition: background .15s ease; }
.toggle-track span { width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .15s ease; }
.automation-toggle input:checked + .toggle-track { background: var(--green); }
.automation-toggle input:checked + .toggle-track span { transform: translateX(16px); }
.button-submit { width: 100%; }
.dashboard-spaces { padding: 22px; margin-top: 22px; }
.dashboard-space-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dashboard-space-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; }
.dashboard-space-item:hover { border-color: #c9c5ff; background: #fcfbff; }
.dashboard-space-item strong, .dashboard-space-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-space-item small { color: var(--muted); font-size: 12px; margin-top: 2px; }
@media (max-width: 920px) { .space-layout { grid-template-columns: 1fr; }.space-create-panel { position: static; } .account-row { grid-template-columns: auto minmax(0, 1fr) auto; }.account-space-state { display: none; } }
@media (max-width: 820px) { .card-grid { grid-template-columns: repeat(2, 1fr); }.two-column { grid-template-columns: 1fr; }.hero { align-items: flex-start; flex-direction: column; }.menu-toggle { display: block; }.nav { display: none; position: absolute; left: 20px; right: 20px; top: 64px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }.nav.is-open { display: flex; } }
@media (max-width: 820px) { .upload-layout { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .page-shell { padding: 40px 16px 60px; }.card-grid { grid-template-columns: 1fr; }.status-strip { display: block; }.status-strip div + div { margin-top: 8px; }.auth-card { padding: 24px; }.media-grid { grid-template-columns: repeat(3, 1fr); }.space-card { grid-template-columns: 1fr; }.space-card-actions { flex-wrap: wrap; }.space-selector-bar { align-items: stretch; flex-direction: column; }.account-row { grid-template-columns: auto minmax(0, 1fr); }.account-row .button { grid-column: 2; justify-self: start; }.dashboard-space-grid { grid-template-columns: 1fr; }.dashboard-space-item { grid-template-columns: auto minmax(0, 1fr); }.dashboard-space-item .status-pill { grid-column: 2; justify-self: start; }.cadence-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }.selected-account-card { grid-template-columns: auto minmax(0, 1fr); }.change-account-button { grid-column: 2; justify-self: start; } }
