:root {
    color-scheme: light;
    --bg: #f5f6f8; --surface: #fff; --ink: #202e32; --muted: #68757c;
    --line: #e5e9eb; --accent: #2b735e; --accent-hover: #215b4a;
    --accent-soft: #edf5ef; --nav: #142c2b; --nav-muted: #a6bcb7;
    --lime: #c4efb6; --danger: #a33232; --danger-bg: #fff2f1;
    --warning: #80521c; --warning-bg: #fff8e9;
    --chart-grid: #edf0f2; --chart-secondary: #91baa5; --chart-fill: #2b735e18;
    --shadow: 0 3px 12px #152d2b03; --radius: 14px;
    --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --motion: 160ms ease;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: not-allowed; opacity: .48; }
input, select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); padding: 10px 12px; transition: border-color var(--motion), box-shadow var(--motion); }
input::placeholder { color: var(--muted); opacity: .85; }
input:hover, select:hover { border-color: var(--nav-muted); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.sidebar :focus-visible { outline-color: var(--lime); }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset:disabled { opacity: .5; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon.small { width: 16px; height: 16px; }
.skip-link { position: fixed; left: 16px; top: -100px; padding: 12px 20px; background: var(--surface); z-index: 10; border-radius: 8px; }
.skip-link:focus { top: 16px; }
.app-shell { min-height: 100vh; }
.sidebar { background: var(--nav); color: var(--surface); padding: 28px 18px 20px; display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; font-size: 20px; font-weight: 700; letter-spacing: -.7px; padding: 0 10px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--lime); color: var(--nav); }
.brand-mark .icon { width: 26px; height: 26px; stroke-width: 2; }
.brand-light { font-weight: 400; }
.brand small { display: block; font-size: 8px; font-weight: 500; letter-spacing: 1.6px; color: var(--nav-muted); margin-top: 2px; }
.workspace-label { color: var(--nav-muted); font-size: 10px; font-weight: 600; letter-spacing: 1.7px; margin: 44px 14px 13px; }
.navigation { display: flex; flex-direction: column; gap: 7px; }
.nav-link { display: flex; gap: 12px; align-items: center; border: 0; background: none; padding: 13px 14px; min-height: 46px; text-align: left; width: 100%; border-radius: 7px; color: var(--nav-muted); font-size: 13px; transition: background var(--motion), color var(--motion); }
.nav-link:hover { background: #ffffff09; color: var(--surface); }
.nav-link.active { background: #c4efb612; color: var(--lime); }
.nav-dot { width: 6px; height: 6px; background: var(--lime); border-radius: 50%; margin-left: auto; }
.sidebar-note { margin: auto 4px 30px; padding: 23px 16px; border: 1px solid #ffffff15; border-radius: 12px; background: linear-gradient(140deg,#ffffff07,transparent); }
.note-icon { display: block; color: var(--lime); margin-bottom: 14px; }
.sidebar-note h2 { font-size: 16px; font-weight: 500; line-height: 1.5; letter-spacing: -.2px; }
.sidebar-note p { font-size: 12px; line-height: 1.8; color: var(--nav-muted); margin: 12px 0 16px; }
.sidebar-demo { display: flex; gap: 16px; justify-content: space-between; align-items: center; width: 100%; background: transparent; color: var(--lime); border: 0; border-top: 1px solid #ffffff15; padding: 15px 0 0; font-size: 12px; min-height: 44px; }
.sidebar-footer { display: flex; align-items: center; gap: 7px; color: var(--nav-muted); font-size: 10px; padding: 0 9px; }
.version { margin-left: auto; opacity: .65; }
.status-dot { display: inline-block; width: 6px; height: 6px; background: var(--muted); border-radius: 50%; flex-shrink: 0; }
.sidebar-footer .status-dot { background: var(--lime); }
.topbar { height: 68px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 24px; display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.breadcrumb { color: var(--muted); font-size: 12px; }
.breadcrumb span { margin: 0 12px; color: var(--line); }
.breadcrumb strong { color: var(--ink); font-weight: 500; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 11px; white-space: nowrap; color: var(--muted); }
.badge.connected { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge.connected .status-dot, .status-dot.ready { background: var(--accent); }
.badge.demo { background: var(--warning-bg); color: var(--warning); border-color: transparent; }
.badge.demo .status-dot { background: var(--warning); }
main { max-width: 1590px; margin: 0 auto; padding: 32px 24px; }
.page-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 28px; }
.eyebrow { font-size: 9px; letter-spacing: 1.8px; font-weight: 650; color: var(--muted); }
.page-heading .eyebrow { color: var(--accent); margin-bottom: 7px; }
h1 { font-size: clamp(28px, 2.5vw, 38px); line-height: 1.25; font-weight: 600; letter-spacing: -1.5px; }
h1 > span { color: var(--accent); }
.page-description { color: var(--muted); margin-top: 9px; font-size: 13px; }
.button { border: 1px solid transparent; border-radius: 7px; min-height: 44px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; padding: 11px 16px; font-size: 12px; font-weight: 550; line-height: 1.4; transition: background var(--motion), border-color var(--motion), transform var(--motion); }
.button:not(:disabled):active { transform: translateY(1px); }
.button-primary { background: var(--accent); color: var(--surface); }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); }
.button-secondary { background: var(--accent-soft); border-color: #dbe9de; color: var(--accent); }
.button-secondary:hover:not(:disabled) { background: #e0eee3; }
.button-white { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow); }
.button-white:hover:not(:disabled) { background: var(--bg); border-color: var(--nav-muted); }
.button-compact { padding: 8px 12px; font-size: 11px; }
.full-width { width: 100%; }
.workflow { list-style: none; padding: 0; margin: 0 0 24px; display: flex; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.workflow li { flex: 1; display: flex; align-items: center; justify-content: center; gap: 11px; padding: 14px 8px; color: var(--muted); font-size: 12px; border-right: 1px solid var(--line); }
.workflow li:last-child { border-right: 0; }
.workflow .step-number { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--bg); font-size: 10px; font-weight: 650; }
.workflow li.current { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.workflow li.current .step-number { background: var(--accent); color: var(--surface); }
.workflow li.done { color: var(--accent); }
.workflow li.done .step-number { background: var(--accent-soft); }
.workflow .icon { display: none; width: 14px; height: 14px; }
.workflow li.done .icon { display: block; }
.studio-grid { display: grid; gap: 24px; align-items: start; }
.config-stack, .result-stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.config-panel { padding: 22px; scroll-margin-top: 24px; }
.panel-heading { display: flex; gap: 10px; align-items: center; margin-bottom: 21px; }
.section-icon { width: 32px; height: 34px; display: grid; place-items: center; color: var(--accent); border: 1px solid var(--line); border-radius: 7px; flex-shrink: 0; }
.section-icon .icon { width: 17px; height: 17px; }
.panel-heading h2 { font-size: 14px; line-height: 1.5; font-weight: 600; letter-spacing: -.2px; }
.panel-heading p { color: var(--muted); font-size: 10px; margin-top: 2px; }
.section-index { font-size: 11px; color: var(--muted); opacity: .65; margin-left: auto; align-self: flex-start; }
.field { margin-bottom: 15px; min-width: 0; }
.field label, .field-label { display: block; font-size: 11px; font-weight: 550; margin-bottom: 6px; }
.field input, .field select { font-size: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.password-field { position: relative; }
.password-field input { padding-right: 40px; }
.icon-button { border: 0; background: transparent; display: grid; place-items: center; width: 40px; height: 44px; color: var(--muted); }
.password-field .icon-button { position: absolute; right: 1px; top: 0; }
.icon-button .icon { width: 16px; height: 16px; }
.api-settings { margin: -2px 0 16px; }
.api-settings summary { font-size: 10px; color: var(--muted); cursor: pointer; padding: 9px 0; min-height: 34px; }
.api-settings[open] summary { color: var(--accent); margin-bottom: 8px; }
.field-hint { font-size: 10px; line-height: 1.7; margin-top: 10px; color: var(--muted); overflow-wrap: anywhere; }
.connection-result { margin-top: 12px; font-size: 10px; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.connection-result.success { color: var(--accent); }
.connection-result.error { color: var(--danger); }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: -7px; }
.label-row label { margin-bottom: 0; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 5px 0; min-height: 36px; border: 0; background: transparent; color: var(--accent); font-size: 10px; }
.text-button:hover:not(:disabled) { text-decoration: underline; }
.text-button.muted { color: var(--muted); }
.label-detail { color: var(--muted); font-weight: 400; }
.chart-types { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.chart-type { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 11px 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 10px; }
.chart-type.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.visualization-header { padding: 26px 26px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.visualization-header .eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.visualization-header h2 { font-size: 20px; font-weight: 550; letter-spacing: -.6px; margin-top: 8px; overflow-wrap: anywhere; }
.visualization-header p { color: var(--muted); font-size: 11px; margin-top: 5px; }
.demo-badge { color: var(--warning); background: var(--warning-bg); padding: 2px 5px; border-radius: 4px; font-size: 8px; letter-spacing: .6px; }
.preview-toolbar { border-bottom: 1px solid var(--line); padding: 0 26px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.tabs { display: flex; gap: 23px; }
.tab { display: flex; align-items: center; gap: 6px; min-height: 47px; padding: 0 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 11px; white-space: nowrap; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.count { padding: 1px 5px; border-radius: 4px; background: var(--bg); color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.chart-panel { min-height: 422px; display: flex; align-items: center; }
.empty-state { text-align: center; width: 100%; padding: 45px 20px 36px; }
.empty-art { display: flex; align-items: flex-end; gap: 9px; justify-content: center; width: 190px; height: 103px; position: relative; margin: 0 auto 26px; border-bottom: 1px solid var(--line); padding: 0 16px 8px; }
.empty-art::before, .empty-art::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--bg); z-index: 0; }
.empty-art::before { top: 26px; }.empty-art::after { top: 58px; }
.empty-art span { width: 24px; border-radius: 5px 5px 2px 2px; background: #d9e8df; z-index: 1; }
.empty-art span:nth-child(1) { height: 28%; }.empty-art span:nth-child(2) { height: 55%; }.empty-art span:nth-child(3) { height: 43%; background: #a9c7b6; }.empty-art span:nth-child(4) { height: 83%; background: var(--accent); }.empty-art span:nth-child(5) { height: 65%; background: #bad7c5; }
.empty-art i { position: absolute; top: 1px; right: -1px; width: 24px; height: 24px; border-radius: 50%; background: var(--lime); border: 5px solid var(--surface); }
.empty-kicker { font-size: 8px; letter-spacing: 1.8px; color: var(--muted); font-weight: 600; }
.empty-state h3 { font-size: 23px; font-weight: 550; letter-spacing: -.7px; margin: 8px 0; }
.empty-state p { font-size: 12px; line-height: 1.8; color: var(--muted); margin-bottom: 22px; }
.empty-state small { display: block; margin-top: 12px; font-size: 9px; color: var(--muted); }
.chart-canvas-wrap { height: 422px; min-width: 0; width: 100%; padding: 30px 24px 20px; }
.chart-footer { border-top: 1px solid var(--line); padding: 15px 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; color: var(--muted); }
.chart-footer > span:first-child { display: flex; align-items: center; gap: 7px; }
.stats-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.stat-card { padding: 19px 20px; }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: var(--muted); font-size: 8px; letter-spacing: .9px; font-weight: 600; }
.stat-label .icon { width: 15px; height: 15px; }
.stat-card strong { display: block; font-size: clamp(22px,2.2vw,30px); font-weight: 550; letter-spacing: -.8px; margin: 13px 0 5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-card:last-child strong { color: var(--accent); }
.stat-card > span:last-child { display: block; font-size: 10px; color: var(--muted); overflow-wrap: anywhere; }
.tip-card { display: flex; align-items: flex-start; gap: 14px; padding: 20px 22px; border: 1px solid #e0e9df; border-radius: 10px; background: #eff3ec; }
.tip-icon { display: grid; place-items: center; width: 31px; height: 31px; background: var(--surface); color: var(--accent); border: 1px solid #dfe6db; border-radius: 7px; flex-shrink: 0; }
.tip-icon .icon { width: 17px; height: 17px; }
.tip-card h3 { font-size: 12px; font-weight: 600; margin-bottom: 5px; }
.tip-card p { font-size: 11px; line-height: 1.8; color: var(--muted); max-width: 590px; }
.workspace-footer { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 9px; padding: 8px 2px; }
.workspace-footer span span { color: var(--nav-muted); margin: 0 8px; }
.notice { margin-bottom: 20px; padding: 13px 16px; border: 1px solid #dbe9de; border-radius: 8px; color: var(--accent); background: var(--accent-soft); font-size: 12px; overflow-wrap: anywhere; }
.notice.error { color: var(--danger); background: var(--danger-bg); border-color: #f4d5d2; }
.notice.warning { color: var(--warning); background: var(--warning-bg); border-color: #f1e4c9; }
.table-panel { min-height: 422px; }
.table-tools { padding: 20px 24px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.table-tools input { max-width: 240px; font-size: 12px; }
.table-scroll { overflow: auto; max-height: 370px; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: 12px; }
th { background: var(--bg); color: var(--muted); font-size: 10px; font-weight: 550; position: sticky; top: 0; z-index: 1; }
th, td { padding: 12px 24px; border-bottom: 1px solid var(--line); max-width: 350px; overflow: hidden; text-overflow: ellipsis; }
td.numeric, th.numeric { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--accent-soft); }
.table-empty { text-align: center; color: var(--muted); white-space: normal; padding: 50px 24px; }
.table-pagination { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 24px; font-size: 10px; color: var(--muted); }
.table-pagination > div { display: flex; gap: 6px; }
.table-pagination button { min-width: 44px; }
.busy::before { content: ""; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 1050px) {
    .app-shell { display: grid; grid-template-columns: 226px minmax(0,1fr); }
    .sidebar { position: sticky; top: 0; height: 100vh; }
    .studio-grid { grid-template-columns: 316px minmax(0,1fr); }
}
@media (min-width: 1400px) {
    main { padding: 36px 38px; }.topbar { padding: 0 38px; }
    .studio-grid { grid-template-columns: 336px minmax(0,1fr); gap: 28px; }
    .config-panel { padding: 24px; }.chart-canvas-wrap { height: 448px; }.chart-panel { min-height: 448px; }
}
@media (max-width: 1049px) {
    .sidebar { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; }
    .workspace-label, .sidebar-note, .sidebar-footer { display: none; }
    .navigation { flex-direction: row; gap: 8px; }.nav-link { width: auto; font-size: 11px; padding: 10px; gap: 7px; }.nav-dot { display: none; }
    .brand { padding: 0; font-size: 18px; }.studio-grid { grid-template-columns: 300px minmax(0,1fr); gap: 18px; }
    .config-panel { padding: 18px; }main { padding: 26px 20px; }.stat-card { padding: 16px 12px; }.stat-label { font-size: 7px; letter-spacing: .4px; }
    .visualization-header { padding: 22px 18px; flex-wrap: wrap; }.preview-toolbar { padding: 0 18px; }.tabs { gap: 14px; }.chart-footer { padding: 14px 18px; }
}
@media (max-width: 760px) {
    .sidebar { flex-wrap: wrap; gap: 16px; padding: 18px 16px 8px; }.navigation { width: 100%; justify-content: space-between; gap: 4px; }
    .nav-link { font-size: 10px; padding: 9px 7px; min-height: 44px; }.nav-link .icon { width: 16px; height: 16px; }
    .topbar { height: 54px; padding: 0 16px; }.breadcrumb { font-size: 10px; }.breadcrumb span { margin: 0 6px; }.badge { font-size: 9px; padding: 5px 7px; gap: 5px; }
    main { padding: 26px 16px; }.page-heading { gap: 18px; margin-bottom: 22px; }.page-heading .eyebrow { font-size: 8px; }h1 { letter-spacing: -1px; font-size: 32px; }.page-description { font-size: 12px; }
    .workflow { margin-bottom: 18px; }.workflow li { flex-direction: column; gap: 6px; padding: 12px 5px; font-size: 9px; text-align: center; }.workflow .icon { display: none !important; }
    .studio-grid { grid-template-columns: minmax(0,1fr); }.config-stack, .result-stack { gap: 16px; }
    .config-panel { padding: 22px; }.panel-heading p { font-size: 11px; }.field label,.field-label { font-size: 12px; }.field input,.field select { font-size: 16px; }
    .field-hint,.connection-result { font-size: 11px; }.api-settings summary { font-size: 11px; min-height: 44px; }.chart-type { font-size: 12px; }.text-button { min-height: 44px; font-size: 11px; }
    .visualization-header { padding: 22px; gap: 16px; }.visualization-header h2 { font-size: 20px; }
    .preview-toolbar { padding: 0 18px; }.tab { padding-bottom: 0; min-height: 48px; font-size: 11px; }.tabs { gap: 15px; }.preview-toolbar .text-button { font-size: 9px; }
    .chart-panel { min-height: 370px; }.chart-canvas-wrap { height: 370px; padding: 24px 12px 16px; }
    .empty-state { padding: 36px 16px; }.empty-state h3 { font-size: 22px; }.empty-state p { font-size: 11px; }
    .stats-grid { gap: 8px; }.stat-card { padding: 15px 10px; }.stat-label { font-size: 7px; letter-spacing: .3px; }.stat-label .icon { display: none; }.stat-card strong { font-size: 22px; }.stat-card > span:last-child { font-size: 9px; }
    .tip-card { padding: 18px; gap: 12px; }.workspace-footer { font-size: 8px; gap: 6px; }
    .table-tools { padding: 16px; }.table-tools input { max-width: 180px; width: 55%; font-size: 16px; }.table-pagination { padding: 14px 16px; }th,td { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }*, *::before, *::after { animation: none !important; transition: none !important; }
}
