:root {
    --bg: #0b0e12;
    --surface: #11161d;
    --surface-raised: #151b23;
    --surface-hover: #19212b;
    --border: #252d38;
    --border-strong: #354151;
    --text: #edf2f7;
    --text-muted: #8793a2;
    --text-faint: #5f6b79;
    --accent: #27b7c7;
    --accent-hover: #35c7d6;
    --accent-soft: rgba(39, 183, 199, 0.12);
    --positive: #2ecb8f;
    --positive-soft: rgba(46, 203, 143, 0.11);
    --negative: #f06464;
    --negative-soft: rgba(240, 100, 100, 0.11);
    --warning: #e7b34e;
    --warning-soft: rgba(231, 179, 78, 0.12);
    --sidebar-width: 220px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg); }

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    letter-spacing: 0;
}

button, input { font: inherit; letter-spacing: 0; }
button { color: inherit; }
svg { width: 18px; height: 18px; stroke-width: 1.8; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    background: #0d1117;
    border-right: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 8px;
    margin-bottom: 28px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 7px;
    background: var(--accent);
    color: #071013;
    font-size: 12px;
    font-weight: 800;
}

.brand strong, .brand span { display: block; }
.brand strong { font-size: 14px; }
.brand span { margin-top: 3px; color: var(--text-muted); font-size: 10px; }

.sidebar nav { display: grid; gap: 4px; }

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 150ms ease, background 150ms ease;
}

.nav-item:hover { color: var(--text); background: var(--surface-hover); }
.nav-item.active { color: var(--accent); background: var(--accent-soft); }
.nav-item.active::before {
    content: "";
    position: absolute;
    left: -14px;
    width: 3px;
    height: 22px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
}

.system-state {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid var(--border);
}
.account-state { display: grid; grid-template-columns: 32px minmax(0, 1fr) 30px; align-items: center; gap: 9px; margin-top: auto; padding: 14px 8px 2px; border-top: 1px solid var(--border); }
.sidebar-ai-model { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 8px; margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--border); }
.sidebar-ai-model + .account-state { margin-top: 10px; }
.sidebar-ai-model svg { width: 15px; color: var(--accent); }
.sidebar-ai-model select { min-width: 0; height: 32px; padding: 0 8px; font-size: 10px; }
.account-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
.account-state strong, .account-state div > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-state strong { font-size: 11px; }
.account-state div > span { margin-top: 3px; color: var(--text-faint); font-size: 9px; }
.account-logout { width: 30px; height: 30px; display: grid; place-items: center; background: transparent; border: 0; border-radius: 5px; color: var(--text-muted); cursor: pointer; }
.account-logout:hover { background: var(--surface-hover); color: var(--text); }
.account-logout svg { width: 15px; }
body:not(.role-admin) .admin-only { display: none !important; }

.system-state strong, .system-state span { display: block; }
.system-state strong { font-size: 11px; font-weight: 600; }
.system-state div > span { margin-top: 3px; color: var(--text-faint); font-size: 10px; }
.live-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--positive); box-shadow: 0 0 0 4px var(--positive-soft); }

.main-content {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    padding: 30px 34px 48px;
}

.view { display: none; max-width: 1480px; margin: 0 auto; }
.view.active { display: block; animation: view-in 180ms ease-out; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
    margin-bottom: 24px;
}

.eyebrow { display: block; margin-bottom: 7px; color: var(--accent); font-size: 10px; font-weight: 700; }
h1 { margin: 0 0 5px; font-size: 25px; line-height: 1.2; font-weight: 650; }
h2 { font-size: 14px; line-height: 1.3; font-weight: 600; }
.page-header p, .panel-heading span { color: var(--text-muted); font-size: 12px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.sync-state { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 11px; white-space: nowrap; }

.metric-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.metric-item { min-width: 0; padding: 17px 20px; border-right: 1px solid var(--border); }
.metric-item:last-child { border-right: 0; }
.metric-item span, .metric-item small { display: block; color: var(--text-muted); font-size: 10px; }
.metric-item strong { display: block; margin: 7px 0 5px; font-size: 21px; font-weight: 650; font-variant-numeric: tabular-nums; }
.metric-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.panel {
    margin-bottom: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 59px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.panel-heading h2 { margin-bottom: 4px; }
.panel-count, .result-count { color: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.table-container { width: 100%; overflow-x: auto; }
.tall-table { max-height: calc(100vh - 220px); overflow-y: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { height: 46px; padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #121820;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}
td { color: #cdd5df; font-size: 12px; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-hover); }
.empty-state { height: 94px; color: var(--text-faint); text-align: center; }
.empty-block { padding: 22px 10px; color: var(--text-faint); text-align: center; font-size: 12px; }
.symbol-cell strong { display: block; color: var(--text); font-size: 12px; }
.symbol-cell span { display: block; margin-top: 2px; color: var(--text-faint); font-size: 9px; }
.positive-val { color: var(--positive); font-weight: 600; }
.negative-val { color: var(--negative); font-weight: 600; }
.highlight { color: var(--accent); font-weight: 600; }
.direction-tag { display: inline-flex; padding: 4px 7px; border: 1px solid var(--border-strong); border-radius: 4px; color: #b8c2ce; font-size: 10px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn-primary { background: var(--accent); color: #061114; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface-raised); border-color: var(--border); color: #cbd4df; }
.btn-secondary:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--border-strong); color: var(--text); }
.btn-danger { background: var(--negative-soft); border-color: rgba(240, 100, 100, 0.25); color: var(--negative); }
.btn-icon { width: 36px; padding: 0; }
.btn-icon svg { width: 15px; height: 15px; }
.full-width { width: 100%; }
.spin { animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    margin-bottom: 12px;
}
.search-box { position: relative; width: min(280px, 100%); }
.search-box svg { position: absolute; left: 11px; top: 50%; width: 15px; color: var(--text-faint); transform: translateY(-50%); pointer-events: none; }
.search-box input { padding-left: 34px; }

.segmented { display: inline-flex; align-items: center; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.segmented button { min-height: 28px; padding: 0 10px; background: transparent; border: 0; border-radius: 4px; color: var(--text-muted); cursor: pointer; font-size: 11px; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--surface-hover); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.segmented.compact button { min-height: 26px; padding: 0 8px; }
.result-count { margin-left: auto; }
.pagination-controls { display: inline-flex; align-items: center; gap: 7px; }
.pagination-controls .btn { width: 30px; min-height: 30px; }
.pagination-controls > span { min-width: 42px; color: var(--text-muted); text-align: center; font-size: 10px; font-variant-numeric: tabular-nums; }

input[type="text"], input[type="search"], input[type="password"], input[type="number"], input[type="datetime-local"], select, textarea {
    width: 100%;
    height: 38px;
    padding: 0 11px;
    background: #0d1218;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
textarea { height: auto; min-height: 96px; padding: 10px 11px; resize: vertical; line-height: 1.5; font-family: inherit; }
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: var(--text-faint); }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="datetime-local"] { color-scheme: dark; }
select { min-width: 125px; }
.form-group { position: relative; margin-bottom: 17px; }
.form-group label, .field-label { display: block; margin-bottom: 7px; color: var(--text-muted); font-size: 11px; font-weight: 500; }
.form-section { margin-bottom: 17px; }

.collector-grid, .connection-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr); gap: 18px; align-items: start; }
.collector-panel { padding-bottom: 18px; }
.collector-panel > :not(.panel-heading) { margin-left: 16px; margin-right: 16px; }
.collector-panel > .panel-heading { margin-bottom: 17px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 7px; }
.choice-grid { display: grid; grid-template-columns: repeat(6, minmax(50px, 1fr)); gap: 7px; }
.check-control { position: relative; display: block; cursor: pointer; }
.check-control input { position: absolute; opacity: 0; pointer-events: none; }
.check-control span {
    display: grid;
    place-items: center;
    min-width: 78px;
    min-height: 34px;
    padding: 0 10px;
    background: #0d1218;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-muted);
    font-size: 11px;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}
.check-control:hover span { border-color: var(--border-strong); color: var(--text); }
.check-control input:checked + span { background: var(--accent-soft); border-color: rgba(39, 183, 199, 0.45); color: var(--accent); }
.check-control input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.choice-grid .check-control span { min-width: 0; }
.range-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.range-toolbar > span { color: var(--text-muted); font-size: 11px; }
.collector-time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.collector-secondary-action { margin-top: 8px; }
.collector-symbol-scope { margin-bottom: 8px; }
.collector-symbol-scope button { min-width: 88px; }
#collectorSymbolGroup.all-symbols-mode #collectorSymbols { display: none; }

.schedule-list { display: grid; gap: 8px; margin-top: 14px; }
.schedule-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; background: #0e1319; border: 1px solid var(--border); border-radius: 6px; }
.schedule-item strong, .schedule-item span { display: block; }
.schedule-item strong { font-size: 11px; }
.schedule-item span { max-width: 260px; margin-top: 4px; overflow: hidden; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-item .btn { min-height: 30px; }

.status-badge, .exchange-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    min-height: 24px;
    padding: 0 7px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
}
.status-badge.success { background: var(--positive-soft); color: var(--positive); }
.status-badge.info { background: var(--accent-soft); color: var(--accent); }
.status-badge.warn { background: var(--warning-soft); color: var(--warning); }
.status-badge.danger { background: var(--negative-soft); color: var(--negative); }
.exchange-binance { background: var(--warning-soft); color: var(--warning); }
.exchange-okx { background: rgba(237, 242, 247, 0.08); color: #d9e1ea; }
.collector-files { min-width: 220px; color: var(--text-muted); line-height: 1.5; }
.collector-errors { margin-top: 5px; color: var(--negative); white-space: normal; }
.collector-errors summary { width: fit-content; cursor: pointer; font-size: 10px; }
.collector-errors ul { display: grid; gap: 4px; max-width: 460px; margin: 7px 0 2px; padding-left: 15px; }
.collector-errors li { line-height: 1.35; }
#backtestSymbolCounts { max-width: 760px; white-space: normal; line-height: 1.45; }
.progress-wrap { display: flex; align-items: center; gap: 8px; }
.progress-track { width: 58px; height: 4px; overflow: hidden; background: var(--border); border-radius: 2px; }
.progress-track span { display: block; height: 100%; background: var(--accent); }

.rate-high-positive { color: #f09b58; font-weight: 600; }
.rate-positive { color: var(--positive); font-weight: 600; }
.rate-neutral { color: var(--text-muted); }
.rate-negative, .rate-high-negative { color: var(--negative); font-weight: 600; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover, th.active-sort { color: var(--accent); }
.rank-badge { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; color: var(--text-muted); font-size: 9px; }
.rank-top3 { background: var(--warning-soft); color: var(--warning); }
.rank-top10 { background: var(--accent-soft); color: var(--accent); }
.rank-default { background: rgba(255,255,255,0.03); }
.annual-bar-container { display: flex; align-items: center; gap: 8px; }
.annual-bar-container > span { min-width: 64px; }
.annual-bar { width: 58px; height: 4px; overflow: hidden; background: var(--border); border-radius: 2px; }
.annual-bar-fill { height: 100%; }
.annual-bar-fill.positive { background: var(--positive); }
.annual-bar-fill.negative { background: var(--negative); }

.symbol-link { display: inline-flex; padding: 0; background: transparent; border: 0; color: var(--text); cursor: pointer; font-weight: 600; }
.symbol-link:hover { color: var(--accent); }
.database-state { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 11px; }
.database-state.error .live-dot { background: var(--negative); box-shadow: 0 0 0 4px var(--negative-soft); }
.explorer-filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.explorer-search { flex: 1; min-width: 220px; max-width: 360px; }
.explorer-filter-bar select { flex: none; width: 150px; min-width: 0; }
.explorer-filter-bar .result-count { flex: none; white-space: nowrap; }
.data-explorer-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.series-panel, .chart-panel { margin-bottom: 0; }
.series-list { max-height: 650px; overflow-y: auto; }
.series-item { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 14px; background: transparent; border: 0; border-bottom: 1px solid var(--border); color: inherit; cursor: pointer; text-align: left; }
.series-item:last-child { border-bottom: 0; }
.series-item:hover { background: var(--surface-hover); }
.series-item.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.series-item strong, .series-item span { display: block; }
.series-item strong { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.series-item span { margin-top: 4px; color: var(--text-muted); font-size: 9px; }
.series-item-meta { text-align: right; }
.series-item-meta strong { color: #cbd4df; font-variant-numeric: tabular-nums; }
.series-item-meta span { white-space: nowrap; }
.chart-heading { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chart-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 5px; }
.chart-heading > div > span, .chart-price span { color: var(--text-muted); font-size: 10px; }
.market-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 7px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-size: 9px; font-weight: 600; }
.chart-price { text-align: right; }
.chart-price strong, .chart-price span { display: block; }
.chart-price strong { margin-bottom: 4px; font-size: 17px; font-variant-numeric: tabular-nums; }
.chart-query-bar { display: flex; align-items: flex-end; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.chart-query-bar > div { flex: 1; min-width: 150px; }
.chart-query-bar label { display: block; margin-bottom: 5px; color: var(--text-muted); font-size: 9px; }
.chart-query-bar select { width: 105px; min-width: 105px; }
.kline-chart { position: relative; width: 100%; height: 500px; background: #0e1319; }
.chart-empty { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--text-faint); font-size: 11px; }
.chart-empty svg { width: 26px; height: 26px; }
.chart-empty.hidden { display: none; }

.decision-log-panel { overflow: hidden; }
.decision-log-filters { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)) auto; align-items: end; gap: 10px; padding: 16px; border-bottom: 1px solid var(--border); }
.decision-log-filters label { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 10px; }
.decision-log-filters input, .decision-log-filters select { width: 100%; min-width: 0; }
.decision-log-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.decision-log-summary span { color: var(--text); font-size: 11px; font-weight: 600; }
.decision-log-summary small { font-size: 9px; }
.decision-log-table-wrap { max-height: 660px; }
#strategyLogsTable td { vertical-align: top; }
.decision-event { display: inline-flex; align-items: center; min-height: 24px; padding: 0 7px; border-radius: 4px; background: rgba(255,255,255,0.05); color: var(--text-muted); font-size: 9px; white-space: nowrap; }
.decision-event.success { background: var(--positive-soft); color: var(--positive); }
.decision-event.warning { background: var(--warning-soft); color: var(--warning); }
.decision-summary { min-width: 260px; max-width: 520px; white-space: normal; line-height: 1.55; }
.decision-context summary { cursor: pointer; color: var(--accent); font-size: 10px; white-space: nowrap; }
.decision-context pre { min-width: 320px; max-width: 560px; margin-top: 8px; padding: 10px; overflow: auto; border: 1px solid var(--border); border-radius: 5px; background: #0b1016; color: #b7c2cf; font: 10px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }

.strategy-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.strategy-catalog { margin-bottom: 0; }
.strategy-list-item { width: 100%; padding: 14px; background: transparent; border: 0; border-bottom: 1px solid var(--border); color: inherit; cursor: pointer; text-align: left; }
.strategy-list-item:last-child { border-bottom: 0; }
.strategy-list-item:hover { background: var(--surface-hover); }
.strategy-list-item.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.strategy-list-item > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.strategy-list-item strong { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.strategy-list-item p { margin-bottom: 9px; color: var(--text-muted); font-size: 10px; line-height: 1.55; }
.strategy-list-item small { color: var(--text-faint); font-size: 9px; }
.strategy-workspace { min-width: 0; }
.strategy-summary { min-height: 108px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 18px 20px; margin-bottom: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.strategy-title-row { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.strategy-title-row h2 { margin-bottom: 4px; font-size: 16px; }
.strategy-title-row div > span, .strategy-summary p { color: var(--text-muted); font-size: 10px; }
.strategy-summary p { max-width: 720px; line-height: 1.6; }
.strategy-summary-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.strategy-mark { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 7px; background: var(--accent-soft); color: var(--accent); }
.strategy-mark svg { width: 18px; height: 18px; }
.strategy-tabs { margin-bottom: 12px; }
.strategy-tabs button { min-width: 112px; }
.strategy-tab { display: none; }
.strategy-tab.active { display: block; }
.strategy-form-panel { padding-bottom: 18px; }
.strategy-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; padding: 18px 18px 0; }
.strategy-form-grid .span-2 { grid-column: span 2; }
.hidden-field { display: none; }
.rule-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; margin: 2px 18px 0; padding: 15px; background: #0e1319; border: 1px solid var(--border); border-radius: 6px; }
.rule-flow > div { min-width: 0; }
.rule-flow > div > span { display: block; margin-bottom: 8px; color: var(--accent); font-size: 9px; font-weight: 700; }
.rule-flow strong, .rule-flow small { display: block; }
.rule-flow strong { margin-bottom: 4px; font-size: 11px; }
.rule-flow small { color: var(--text-muted); font-size: 9px; line-height: 1.4; }
.rule-flow > svg { width: 14px; color: var(--text-faint); }
.backtest-toolbar { display: flex; align-items: flex-end; gap: 12px; padding: 14px 16px; }
.backtest-toolbar > div { flex: 1; }
.backtest-toolbar label { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 10px; }
.backtest-toolbar select { min-width: 0; }
.backtest-toolbar .btn { flex: none; }
.strategy-metrics { margin-bottom: 18px; }
.equity-chart { position: relative; width: 100%; height: 280px; padding: 16px; background: #0e1319; }
.equity-chart svg { width: 100%; height: 100%; overflow: visible; }
.equity-chart .grid-line { stroke: var(--border); stroke-width: 1; }
.equity-chart .equity-area { fill: rgba(39,183,199,0.09); }
.equity-chart .equity-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.equity-chart text { fill: var(--text-faint); font: 9px Inter, sans-serif; }
.runtime-command-bar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 16px; margin-bottom: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.runtime-command-bar strong, .runtime-command-bar span { display: block; }
.runtime-command-bar strong { margin-bottom: 5px; font-size: 12px; }
.runtime-command-bar span { color: var(--text-muted); font-size: 10px; }
.runtime-command-bar > div:last-child { display: flex; gap: 8px; }
.deployment-mode-control { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.deployment-mode-control input { width: 170px; }
.runtime-grid { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(360px, 1.25fr); gap: 12px; }
.runtime-trades-panel { margin-top: 12px; }
.runtime-details { padding: 4px 16px 12px; }
.runtime-details > div { display: grid; grid-template-columns: 100px 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.runtime-details > div:last-child { border-bottom: 0; }
.runtime-details dt { color: var(--text-muted); font-size: 10px; }
.runtime-details dd { overflow: hidden; color: var(--text); font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.runtime-log { max-height: 360px; overflow-y: auto; }
.runtime-log-item { display: grid; grid-template-columns: 8px 70px 1fr; align-items: start; gap: 9px; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.runtime-log-item:last-child { border-bottom: 0; }
.runtime-log-item > i { width: 7px; height: 7px; margin-top: 3px; border-radius: 50%; background: var(--text-faint); }
.runtime-log-item.success > i { background: var(--positive); }
.runtime-log-item.warning > i { background: var(--warning); }
.runtime-log-item span { color: var(--text-faint); font-size: 9px; font-variant-numeric: tabular-nums; }
.runtime-log-item p { color: #cbd4df; font-size: 10px; line-height: 1.45; }

.connection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.connection-panel { padding: 18px; }
.exchange-heading { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; margin-bottom: 24px; }
.exchange-heading h2 { margin-bottom: 3px; font-size: 14px; }
.exchange-heading div > span { color: var(--text-muted); font-size: 9px; }
.exchange-logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 7px; font-weight: 800; }
.binance-logo { background: var(--warning-soft); color: var(--warning); }
.okx-logo { background: rgba(255,255,255,0.08); color: var(--text); }
.connection-status { padding: 4px 7px; border-radius: 4px; background: rgba(255,255,255,0.04); color: var(--text-faint); font-size: 9px; }
.connection-status.configured { background: var(--positive-soft); color: var(--positive); }
.password-field input { padding-right: 42px; }
.password-toggle { position: absolute; right: 3px; bottom: 3px; width: 32px; height: 32px; display: grid; place-items: center; background: transparent; border: 0; color: var(--text-faint); cursor: pointer; }
.password-toggle:hover { color: var(--text); }
.password-toggle svg { width: 15px; height: 15px; }

.trading-settings-panel { margin-top: 18px; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; padding: 18px 18px 2px; }
.switch-control { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.switch-control > input { position: absolute; opacity: 0; pointer-events: none; }
.switch-control > span { position: relative; width: 38px; height: 21px; flex: none; border-radius: 11px; background: var(--border-strong); transition: background 150ms ease; }
.switch-control > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #d5dce5; transition: transform 150ms ease; }
.switch-control > input:checked + span { background: var(--negative); }
.switch-control > input:checked + span::after { transform: translateX(17px); }
.switch-control strong, .switch-control small { display: block; }
.switch-control strong { font-size: 11px; }
.switch-control small { margin-top: 3px; color: var(--text-muted); font-size: 9px; }
.live-trading-switch { margin: 0 18px 18px; padding: 14px; border: 1px solid rgba(240, 100, 100, 0.24); border-radius: 6px; background: var(--negative-soft); }

.trading-metrics strong { font-size: 19px; }

.ai-model-editor { display: grid; grid-template-columns: .7fr 1fr 1.4fr 1fr 1.2fr auto; align-items: end; gap: 12px; padding: 16px; }
.ai-model-editor .form-group { margin-bottom: 0; }
.ai-model-editor .btn { margin-bottom: 1px; }
.ai-workspace-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ai-action-panel { display: flex; min-height: 330px; flex-direction: column; }
.ai-action-panel .panel-heading > svg { width: 18px; color: var(--accent); }
.ai-panel-body { display: flex; flex: 1; flex-direction: column; padding: 16px; }
.ai-panel-body > .btn { margin-top: auto; }
.ai-inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ai-result { min-height: 160px; padding: 18px; }
.ai-result .empty-block { padding: 45px 10px; }
.ai-result-summary > strong { display: block; margin-bottom: 6px; font-size: 15px; }
.ai-result-summary > p, .ai-summary-text { color: var(--text-muted); font-size: 11px; line-height: 1.6; }
.ai-result-summary dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 16px 0; border: 1px solid var(--border); border-radius: 6px; }
.ai-result-summary dl > div { padding: 12px; border-right: 1px solid var(--border); }
.ai-result-summary dl > div:last-child { border-right: 0; }
.ai-result-summary dt { color: var(--text-muted); font-size: 9px; }
.ai-result-summary dd { margin-top: 5px; color: var(--text); font-size: 13px; }
.ai-result pre, .ai-analysis pre { overflow-x: auto; margin: 12px 0; padding: 12px; background: #0d1218; border: 1px solid var(--border); border-radius: 6px; color: #cbd4df; font-size: 10px; line-height: 1.5; }
.ai-analysis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ai-analysis .ai-summary-text { grid-column: 1 / -1; margin: 0; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.ai-analysis h3 { margin-bottom: 8px; font-size: 11px; }
.ai-analysis ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 10px; line-height: 1.7; }
.module-ai-bar { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(320px, 1.8fr) auto; align-items: center; gap: 14px; padding: 14px 16px; }
.module-ai-heading { display: flex; align-items: center; gap: 10px; }
.module-ai-heading > svg { width: 18px; flex: none; color: var(--accent); }
.module-ai-heading h2 { margin-bottom: 4px; }
.module-ai-heading span { display: block; color: var(--text-muted); font-size: 9px; line-height: 1.4; }
.module-ai-model { display: none; }
.module-ai-bar textarea { min-height: 58px; }
.trade-ai-bar { grid-template-columns: minmax(210px, 1fr) 180px minmax(240px, 1.4fr) auto; }
.compact-ai-result .ai-result { min-height: 86px; }
.compact-ai-result .ai-result .empty-block { padding: 20px 10px; }
.compact-ai-result.is-empty { display: none; }
.ai-result-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.ai-result-state { color: var(--text-muted); font-size: 10px; }
.ai-result-delete { flex: none; }
.ai-result-details { margin-top: 8px; border-top: 1px solid var(--border); }
.ai-result-details summary { display: flex; align-items: center; gap: 7px; padding: 11px 2px 5px; cursor: pointer; color: var(--accent); font-size: 10px; list-style: none; }
.ai-result-details summary::-webkit-details-marker { display: none; }
.ai-result-details summary svg { width: 14px; height: 14px; transition: transform 150ms ease; }
.ai-result-details[open] summary svg { transform: rotate(180deg); }
.ai-result-content { padding-top: 8px; }
.ai-optimize-goal { min-width: 190px; }
.ai-runtime-control { margin-top: 12px; }
.ai-auto-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 16px 16px 0; }
.ai-auto-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 16px 16px; }
#aiAutoHistory { border-top: 1px solid var(--border); }
.trade-id { color: var(--text-faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.hedge-leg { display: inline-flex; flex-direction: column; gap: 2px; min-width: 132px; }
.hedge-leg strong { color: var(--text); font-size: 11px; font-weight: 600; }
.hedge-leg small { color: var(--text-faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; white-space: nowrap; }
.trade-mode { display: inline-flex; margin-top: 3px; padding: 2px 5px; border-radius: 3px; background: rgba(255,255,255,.05); color: var(--text-muted); font-size: 8px; }
.trade-mode.live { background: var(--negative-soft); color: var(--negative); }
.status-badge.neutral { background: rgba(255,255,255,.05); color: var(--text-muted); }

.user-management-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
#usersTable { min-width: 680px; }
.compact-form { padding: 18px; }
.user-identity strong, .user-identity span { display: block; }
.user-identity strong { color: var(--text); font-size: 12px; }
.user-identity span { margin-top: 3px; color: var(--text-faint); font-size: 9px; }
.role-select { width: 108px; height: 30px; }
.table-actions { display: flex; align-items: center; gap: 6px; }
.table-actions .btn { min-height: 30px; padding: 0 9px; }

.auth-page { min-height: 100vh; background: #0b0e12; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-panel { width: min(400px, 100%); padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 22px 60px rgba(0,0,0,.28); }
.auth-brand { display: flex; align-items: center; gap: 11px; padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.auth-brand strong, .auth-brand div > span { display: block; }
.auth-brand strong { font-size: 14px; }
.auth-brand div > span { margin-top: 3px; color: var(--text-muted); font-size: 9px; }
.auth-panel header { margin-bottom: 24px; }
.auth-panel header p { color: var(--text-muted); font-size: 11px; }
.auth-panel .form-group { margin-bottom: 15px; }
.auth-error { min-height: 18px; margin: -2px 0 10px; color: var(--negative); font-size: 10px; line-height: 1.5; }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; min-width: 250px; max-width: 360px; padding: 11px 13px; background: #18202a; border: 1px solid var(--border-strong); border-radius: 6px; box-shadow: 0 12px 30px rgba(0,0,0,0.28); color: var(--text); font-size: 11px; animation: toast-in 180ms ease-out; }
.toast.success { border-left: 3px solid var(--positive); }
.toast.error { border-left: 3px solid var(--negative); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

.ai-assistant { position: fixed; inset: 0; z-index: 45; pointer-events: none; }
.ai-assistant-fab {
    position: fixed; right: 22px; bottom: 22px; display: flex; align-items: center; justify-content: center; gap: 5px;
    width: 54px; height: 54px; border: 1px solid rgba(53,199,214,.5); border-radius: 50%;
    background: #14252c; box-shadow: 0 12px 32px rgba(0,0,0,.38); color: var(--accent-hover);
    cursor: grab; pointer-events: auto; touch-action: none; user-select: none;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.ai-assistant-fab:hover { border-color: var(--accent); background: #173039; box-shadow: 0 14px 34px rgba(0,0,0,.45); }
.ai-assistant-fab:active, .ai-assistant-fab.dragging { cursor: grabbing; }
.ai-assistant-fab svg { width: 20px; height: 20px; }
.ai-assistant-fab-label { font-size: 9px; font-weight: 700; }
.ai-assistant-panel {
    position: fixed; right: 22px; bottom: 88px; width: min(420px, calc(100vw - 24px)); height: min(620px, calc(100vh - 116px));
    grid-template-rows: auto auto minmax(0, 1fr) auto auto; overflow: hidden; background: #10161d;
    border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.5);
    pointer-events: auto; transform-origin: bottom right; animation: ai-assistant-open 160ms ease-out;
}
.ai-assistant-panel:not([hidden]) { display: grid; }
@keyframes ai-assistant-open { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.ai-assistant-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--border); }
.ai-assistant-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ai-assistant-title strong, .ai-assistant-title div > span { display: block; }
.ai-assistant-title strong { font-size: 12px; }
.ai-assistant-title div > span { margin-top: 3px; color: var(--text-muted); font-size: 9px; }
.ai-assistant-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 7px; background: var(--accent-soft); color: var(--accent); }
.ai-assistant-mark svg { width: 17px; }
.ai-assistant-header-actions { display: flex; gap: 4px; }
.ai-assistant-header-actions .btn { width: 32px; height: 32px; min-height: 32px; padding: 0; border: 0; }
.ai-assistant-context { display: flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 14px; background: rgba(46,203,143,.05); border-bottom: 1px solid rgba(46,203,143,.12); color: #84c9ad; font-size: 9px; }
.ai-assistant-context svg { width: 13px; height: 13px; }
.ai-assistant-messages { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding: 16px 14px; overscroll-behavior: contain; }
.ai-assistant-message { display: flex; max-width: 88%; }
.ai-assistant-message.user { align-self: flex-end; justify-content: flex-end; }
.ai-assistant-message.assistant { align-self: flex-start; }
.ai-assistant-bubble { padding: 10px 12px; border-radius: 7px; color: var(--text); font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-assistant-message.assistant .ai-assistant-bubble { background: #17202a; border: 1px solid var(--border); }
.ai-assistant-message.user .ai-assistant-bubble { background: #16404a; border: 1px solid rgba(53,199,214,.28); }
.ai-assistant-message.pending .ai-assistant-bubble { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.ai-assistant-message.pending svg { width: 14px; height: 14px; }
.ai-assistant-sources { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.ai-assistant-sources span { padding: 3px 6px; border-radius: 3px; background: var(--accent-soft); color: var(--accent); font-size: 8px; }
.ai-assistant-suggestions { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px 10px; scrollbar-width: none; }
.ai-assistant-suggestions::-webkit-scrollbar { display: none; }
.ai-assistant-suggestions button { flex: none; min-height: 28px; padding: 0 9px; border: 1px solid var(--border); border-radius: 5px; background: transparent; color: var(--text-muted); font-size: 9px; cursor: pointer; }
.ai-assistant-suggestions button:hover { border-color: var(--border-strong); color: var(--text); }
.ai-assistant-composer { display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: end; gap: 8px; margin: 0 12px 12px; padding: 8px; border: 1px solid var(--border-strong); border-radius: 7px; background: #0c1117; }
.ai-assistant-composer:focus-within { border-color: rgba(39,183,199,.65); }
.ai-assistant-composer textarea { width: 100%; max-height: 120px; min-height: 34px; resize: none; overflow-y: auto; padding: 8px 7px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 11px; line-height: 1.5; }
.ai-assistant-send { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 6px; background: var(--accent); color: #071013; cursor: pointer; }
.ai-assistant-send:disabled { background: var(--border-strong); color: var(--text-faint); cursor: not-allowed; }
.ai-assistant-send svg { width: 16px; height: 16px; }

@media (max-width: 1060px) {
    .main-content { padding: 24px 22px 44px; }
    .metric-strip { grid-template-columns: repeat(2, 1fr); }
    .metric-item:nth-child(2) { border-right: 0; }
    .metric-item:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
    .collector-grid { grid-template-columns: 1fr; }
    .filter-bar { flex-wrap: wrap; }
    .explorer-filter-bar { flex-wrap: wrap; }
    .data-explorer-layout { grid-template-columns: 250px minmax(0, 1fr); }
    .strategy-layout { grid-template-columns: 220px minmax(0, 1fr); }
    .rule-flow { grid-template-columns: repeat(2, 1fr); }
    .rule-flow > svg { display: none; }
    .runtime-grid { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .user-management-layout { grid-template-columns: 240px minmax(0, 1fr); }
    .ai-model-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-workspace-grid { grid-template-columns: 1fr; }
    .ai-action-panel { min-height: 0; }
    .module-ai-bar, .trade-ai-bar { grid-template-columns: 1fr 1fr; }
    .module-ai-heading { grid-column: 1 / -1; }
    .module-ai-bar textarea { grid-column: 1 / -1; }
    .ai-auto-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .result-count { margin-left: 0; }
    .decision-log-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .decision-log-filters .btn { width: 100%; }
}

@media (max-width: 760px) {
    :root { --sidebar-width: 0px; }
    body { padding-bottom: 66px; }
    .decision-log-filters { grid-template-columns: 1fr; }
    .decision-log-summary { align-items: flex-start; flex-direction: column; padding: 10px 16px; }
    .sidebar { inset: auto 0 0; width: 100%; height: 62px; padding: 7px 8px; border-top: 1px solid var(--border); border-right: 0; }
    .brand, .system-state, .account-state, .sidebar-ai-model { display: none; }
    .sidebar { overflow-x: auto; }
    .sidebar nav { display: flex; min-width: 650px; gap: 4px; }
    .sidebar nav .nav-item { flex: 1; }
    .nav-item { flex-direction: column; justify-content: center; gap: 3px; min-height: 48px; padding: 4px; font-size: 9px; }
    .nav-item svg { width: 17px; height: 17px; }
    .nav-item.active::before { display: none; }
    .main-content { margin-left: 0; padding: 18px 12px 28px; }
    .page-header { align-items: flex-start; min-height: 0; margin-bottom: 18px; }
    .page-header p { max-width: 220px; line-height: 1.5; }
    h1 { font-size: 21px; }
    .header-actions .sync-state { display: none; }
    .metric-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .metric-item { padding: 13px; }
    .metric-item strong { font-size: 17px; }
    .filter-bar { align-items: stretch; }
    .search-box { width: 100%; }
    .explorer-filter-bar select { width: calc(50% - 5px); }
    .explorer-filter-bar .result-count { width: 100%; }
    .segmented { max-width: 100%; overflow-x: auto; }
    .segmented button { white-space: nowrap; }
    .collector-time-grid, .connection-grid { grid-template-columns: 1fr; }
    .data-explorer-layout { grid-template-columns: 1fr; }
    .strategy-layout { grid-template-columns: 1fr; }
    .strategy-catalog { max-height: 170px; overflow-y: auto; }
    .strategy-form-grid { grid-template-columns: 1fr; }
    .strategy-form-grid .span-2 { grid-column: auto; }
    .backtest-toolbar { align-items: stretch; flex-wrap: wrap; }
    .backtest-toolbar > div { min-width: calc(50% - 6px); }
    .backtest-toolbar .btn { width: 100%; }
    .runtime-command-bar { align-items: flex-start; flex-direction: column; }
    .runtime-command-bar > div:last-child { width: 100%; }
    .runtime-command-bar .btn { flex: 1; }
    .deployment-mode-control { width: 100%; margin-left: 0; }
    .deployment-mode-control input { flex: 1; min-width: 130px; }
    .settings-grid, .user-management-layout { grid-template-columns: 1fr; }
    .ai-model-editor, .ai-auto-grid, .ai-analysis { grid-template-columns: 1fr; }
    .module-ai-bar, .trade-ai-bar { grid-template-columns: 1fr; }
    .module-ai-heading, .module-ai-bar textarea { grid-column: auto; }
    .module-ai-model { display: block; }
    .module-ai-bar .btn { width: 100%; }
    .ai-result-summary dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-result-summary dl > div:nth-child(2) { border-right: 0; }
    .ai-result-summary dl > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
    .ai-auto-actions { align-items: stretch; flex-direction: column; }
    .ai-auto-actions .btn { width: 100%; }
    .series-list { max-height: 260px; }
    .chart-query-bar { align-items: stretch; flex-wrap: wrap; }
    .chart-query-bar > div { min-width: calc(50% - 5px); }
    .chart-query-bar select { flex: 1; width: auto; }
    .kline-chart { height: 420px; }
    .choice-grid { grid-template-columns: repeat(3, 1fr); }
    .range-toolbar { align-items: flex-start; flex-direction: column; }
    .panel-heading { align-items: flex-start; }
    .toast-region { right: 12px; bottom: 76px; left: 12px; }
    .toast { min-width: 0; max-width: none; }
    .ai-assistant-fab { right: 14px; bottom: 76px; width: 50px; height: 50px; }
    .ai-assistant-panel { inset: 10px 10px 74px; width: auto; height: auto; max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
