.ab-shell { --ab-blue:#1a73e8;--ab-blue-soft:#e8f0fe;--ab-green:#188038;--ab-red:#d93025;--ab-amber:#f9ab00;--ab-ink:#202124;--ab-muted:#5f6368;--ab-line:#dadce0;--ab-surface:#fff;--ab-bg:#f8fafd;display:grid;gap:16px;color:var(--ab-ink);font-size:13px; }
.ab-header,.ab-card { border:1px solid var(--ab-line);border-radius:16px;background:var(--ab-surface);box-shadow:0 1px 2px rgba(60,64,67,.08); }
.ab-header { display:flex;justify-content:space-between;gap:20px;padding:22px 24px; }
.ab-header>div:first-child>span,.ab-card header>div>span { color:var(--ab-blue);font-size:10px;font-weight:800;letter-spacing:.12em; }
.ab-header h2 { margin:4px 0 6px;font-size:24px; }
.ab-header p,.ab-card header p { margin:0;color:var(--ab-muted);line-height:1.6; }
.ab-header-actions { display:flex;align-items:flex-end;justify-content:flex-end;gap:8px;flex-wrap:wrap; }
.ab-plan-picker { display:grid;gap:5px;min-width:190px; }
.ab-plan-picker span { color:var(--ab-muted);font-size:10px;font-weight:700; }
.ab-plan-picker select,.ab-card-actions input,.ab-settings-grid input,.ab-settings-grid select,.ab-settings-grid textarea { min-height:36px;border:1px solid var(--ab-line);border-radius:9px;background:#fff;padding:7px 10px;color:var(--ab-ink);font:inherit; }
.ab-button { min-height:36px;border:1px solid transparent;border-radius:999px;padding:8px 15px;font:inherit;font-weight:700;cursor:pointer; }
.ab-button.primary { background:var(--ab-blue);color:#fff; }
.ab-button.secondary { border-color:var(--ab-line);background:#fff;color:var(--ab-blue); }
.ab-button:hover { filter:brightness(.97); }
.ab-notice { border:1px solid #aecbfa;border-radius:12px;background:var(--ab-blue-soft);padding:10px 14px;color:#174ea6; }
.ab-tabs { display:flex;gap:6px;overflow:auto;padding:4px;border-bottom:1px solid var(--ab-line); }
.ab-tabs button { border:0;border-radius:999px;background:transparent;padding:9px 16px;color:var(--ab-muted);font:inherit;font-weight:700;white-space:nowrap;cursor:pointer; }
.ab-tabs button.is-active { background:var(--ab-blue-soft);color:#174ea6; }
.ab-main { display:grid;gap:16px; }
.ab-kpi-grid { display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px; }
.ab-kpi { min-width:0;border:1px solid var(--ab-line);border-radius:14px;background:#fff;padding:16px; }
.ab-kpi span,.ab-kpi small { display:block;color:var(--ab-muted); }
.ab-kpi span { font-size:11px;font-weight:700; }
.ab-kpi strong { display:block;margin:8px 0 5px;font-size:20px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.ab-kpi small { font-size:10px; }
.ab-kpi.is-risk { border-color:#f6aea8;background:#fce8e6; }
.ab-kpi.is-risk strong { color:var(--ab-red); }
.ab-overview-grid { display:grid;grid-template-columns:minmax(0,1.8fr) minmax(290px,1fr);gap:16px; }
.ab-overview-grid.lower { grid-template-columns:repeat(2,minmax(0,1fr)); }
.ab-card { min-width:0;overflow:hidden; }
.ab-card>header { display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid var(--ab-line); }
.ab-card header h3 { margin:4px 0 3px;font-size:16px; }
.ab-card header>small { color:var(--ab-muted); }
.ab-monthly-card { min-height:320px; }
.ab-monthly-chart { display:grid;grid-template-columns:repeat(12,minmax(34px,1fr));gap:10px;height:220px;padding:22px 20px 8px;align-items:end; }
.ab-monthly-chart article { display:grid;grid-template-rows:1fr auto auto;gap:5px;height:100%;text-align:center;color:var(--ab-muted);font-size:10px; }
.ab-bars { display:flex;align-items:end;justify-content:center;gap:3px;height:170px;border-bottom:1px solid var(--ab-line); }
.ab-bars i,.ab-bars b { display:block;width:10px;min-height:3px;border-radius:4px 4px 0 0; }
.ab-bars i { background:var(--ab-blue); }
.ab-bars b { background:var(--ab-green); }
.ab-bars b.is-negative { background:var(--ab-red); }
.ab-monthly-card footer { display:flex;gap:16px;padding:0 20px 16px;color:var(--ab-muted);font-size:10px; }
.ab-monthly-card footer span { display:flex;align-items:center;gap:5px; }
.ab-monthly-card footer i,.ab-monthly-card footer b { width:10px;height:10px;border-radius:3px;background:var(--ab-blue); }
.ab-monthly-card footer b { background:var(--ab-green); }
.ab-alerts,.ab-ranking { display:grid;gap:10px;padding:16px 20px; }
.ab-alerts article { border-left:3px solid var(--ab-amber);border-radius:0 10px 10px 0;background:#fef7e0;padding:10px 12px; }
.ab-alerts strong { color:#7a4d00; }
.ab-alerts p { margin:4px 0 0;color:var(--ab-muted);line-height:1.55; }
.ab-ranking article { display:grid;gap:5px; }
.ab-ranking article>div { display:flex;justify-content:space-between;gap:12px; }
.ab-ranking article>i { height:6px;border-radius:999px;background:#edf2f7;overflow:hidden; }
.ab-ranking article>i>b { display:block;height:100%;border-radius:inherit;background:var(--ab-blue); }
.ab-ranking small { color:var(--ab-muted); }
.ab-summary-list { margin:0;padding:12px 20px 18px; }
.ab-summary-list div { display:flex;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid #edf0f2; }
.ab-summary-list dt { color:var(--ab-muted); }
.ab-summary-list dd { margin:0;font-weight:800; }
.ab-table-wrap { overflow:auto; }
.ab-table { width:100%;min-width:1100px;border-collapse:separate;border-spacing:0;font-size:11px; }
.ab-table th,.ab-table td { border-right:1px solid var(--ab-line);border-bottom:1px solid var(--ab-line);padding:9px 10px;text-align:right;white-space:nowrap; }
.ab-table th:first-child,.ab-table td:first-child { border-left:0; }
.ab-table thead th { position:sticky;top:0;z-index:2;background:#f1f3f4;color:#3c4043;text-align:center;font-weight:800; }
.ab-table tbody th,.ab-table tbody td:first-child { text-align:left; }
.ab-table tbody tr:hover td,.ab-table tbody tr:hover th { background:#f8fbff; }
.ab-table tfoot th,.ab-table tfoot td,.ab-table tr.is-derived th,.ab-table tr.is-derived td,.ab-table td.is-derived { background:#e8f0fe;font-weight:800; }
.ab-table .is-negative { color:var(--ab-red); }
.ab-channel-summary { min-width:1880px; }
.ab-channel-summary tr { cursor:pointer; }
.ab-channel-summary tr.is-selected td { background:#e8f0fe; }
.ab-channel-summary tr.is-disabled:not(.is-editing) { opacity:.62; }
.ab-channel-summary tr.is-editing td { background:#fef7e0; }
.ab-channel-summary tr.is-editing td.is-derived { background:#e8f0fe; }
.ab-channel-summary td small { display:block;margin-top:2px;color:var(--ab-muted);font-size:9px; }
.ab-channel-summary button { border:0;background:none;padding:0;color:var(--ab-blue);font:inherit;font-weight:800;cursor:pointer; }
.ab-channel-summary .ab-channel-operation-cell { position:sticky;right:0;z-index:1;background:#fff;box-shadow:-1px 0 0 var(--ab-line);text-align:center; }
.ab-channel-summary thead .ab-channel-operation-cell { z-index:3;background:#f1f3f4; }
.ab-channel-summary tr.is-selected .ab-channel-operation-cell { background:#e8f0fe; }
.ab-channel-summary tr.is-editing .ab-channel-operation-cell { background:#fef7e0; }
.ab-channel-actions { display:flex;align-items:center;justify-content:center;gap:12px; }
.ab-channel-inline-input { width:112px;min-width:112px; }
.ab-channel-inline-select { min-width:86px;border:1px solid #f6c453;border-radius:6px;background:#fff8dc;padding:6px 8px;color:var(--ab-ink);font:inherit; }
.ab-channel-summary tr.is-editing td:nth-child(2) .ab-channel-inline-select { min-width:170px; }
.ab-channel-summary tr.is-editing td:nth-child(3) .ab-channel-inline-select { min-width:150px; }
.ab-channel-inline-stack { display:grid;gap:6px; }
.ab-channel-summary tr.is-editing .ab-text-input { border-color:#f6c453; }
.ab-edit-lock { display:inline-flex;align-items:center;border-radius:999px;background:#f1f3f4;padding:6px 10px;color:#5f6368;font-size:10px;font-weight:800;white-space:nowrap; }
.ab-edit-lock.is-editing { background:#fef7e0;color:#7a4d00; }
.ab-channel-status { display:inline-flex;border-radius:999px;background:#e6f4ea;padding:3px 8px;color:#137333;font-size:10px;font-weight:800; }
.ab-channel-status.is-off { background:#f1f3f4;color:#5f6368; }
.ab-profile-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:18px 20px; }
.ab-profile-grid label { display:grid;gap:6px; }
.ab-profile-grid label>span,.ab-inline-setting>span { color:var(--ab-muted);font-size:10px;font-weight:700; }
.ab-profile-grid input,.ab-profile-grid select,.ab-inline-setting input,.ab-table select { min-height:34px;border:1px solid var(--ab-line);border-radius:7px;background:#fff;padding:6px 8px;color:var(--ab-ink);font:inherit; }
.ab-channel-profile input:disabled,.ab-channel-profile select:disabled { border-color:#edf0f2;background:#f8fafd;color:#5f6368;cursor:not-allowed; }
.ab-editor-card>header { align-items:center; }
.ab-mini-kpis { display:flex;gap:18px;color:var(--ab-muted); }
.ab-mini-kpis strong { display:block;margin-top:3px;color:var(--ab-ink); }
.ab-month-table { min-width:1450px; }
.ab-month-table th:first-child { position:sticky;left:0;z-index:3;background:#f1f3f4;text-align:left; }
.ab-money-input { width:78px;border:1px solid transparent;border-radius:6px;background:#fff8dc;padding:6px;text-align:right;color:#3c4043;font:inherit; }
.ab-money-input:focus { outline:2px solid #aecbfa;border-color:var(--ab-blue);background:#fff; }
.ab-money-input:disabled { background:transparent;color:inherit; }
.ab-text-input { min-width:130px;border:1px solid transparent;border-radius:6px;background:#fff8dc;padding:6px 8px;color:#3c4043;font:inherit; }
.ab-text-input.compact { min-width:100px;width:110px; }
.ab-text-input:focus { outline:2px solid #aecbfa;border-color:var(--ab-blue);background:#fff; }
.ab-text-input:disabled { background:transparent;color:inherit; }
.ab-expense-table { min-width:2850px; }
.ab-card-actions { display:flex;gap:8px;align-items:center; }
.ab-section-edit-actions { display:flex;align-items:center;gap:8px; }
.ab-card.is-section-readonly .ab-money-input:disabled,.ab-card.is-section-readonly .ab-text-input:disabled,.ab-card.is-section-readonly select:disabled { border-color:transparent;background:transparent;color:inherit;opacity:1;cursor:default;-webkit-text-fill-color:currentColor; }
.ab-card.is-section-editing { box-shadow:0 0 0 2px rgba(26,115,232,.12),0 1px 2px rgba(60,64,67,.08); }
.ab-card-actions input { width:200px; }
.ab-link { border:0;background:none;color:var(--ab-blue);font:inherit;cursor:pointer; }
.ab-link.danger { color:var(--ab-red); }
.ab-flow { display:inline-flex;border-radius:999px;padding:3px 8px;font-size:10px;font-weight:800; }
.ab-flow.inflow { background:#e6f4ea;color:#137333; }
.ab-flow.outflow { background:#fce8e6;color:#a50e0e; }
.ab-segment { display:flex;border:1px solid var(--ab-line);border-radius:999px;padding:2px; }
.ab-segment button { border:0;border-radius:999px;background:transparent;padding:7px 12px;color:var(--ab-muted);font:inherit;font-weight:700;cursor:pointer; }
.ab-segment button.is-active { background:var(--ab-blue-soft);color:#174ea6; }
.ab-channel-segment,.ab-expense-segment,.ab-cash-segment { width:max-content;max-width:calc(100% - 40px);margin:14px 20px;overflow:auto; }
.ab-derived-value { display:inline-block;min-width:78px;padding:6px;text-align:right;font-weight:700; }
.ab-inline-setting { display:grid;gap:5px; }
.ab-settings-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:20px; }
.ab-settings-grid label { display:grid;gap:6px; }
.ab-settings-grid label>span { color:var(--ab-muted);font-size:11px;font-weight:700; }
.ab-settings-grid label.wide { grid-column:1/-1; }
.ab-status { border-radius:999px;background:var(--ab-blue-soft);padding:5px 10px;color:#174ea6;font-weight:800; }
.ab-source-note { margin:0 20px 20px;border-radius:12px;background:#f8fafd;padding:16px; }
.ab-source-note p { color:var(--ab-muted);line-height:1.65; }
.ab-source-note span { color:var(--ab-blue);font-size:11px; }
.ab-empty { padding:24px;text-align:center;color:var(--ab-muted); }
body[data-theme="dark"] .ab-shell,body[data-palette="midnight"] .ab-shell { --ab-ink:#e8eaed;--ab-muted:#9aa0a6;--ab-line:#3c4043;--ab-surface:#202124;--ab-bg:#171717; }
body[data-theme="dark"] .ab-plan-picker select,body[data-theme="dark"] .ab-button.secondary,body[data-theme="dark"] .ab-card-actions input,body[data-theme="dark"] .ab-settings-grid input,body[data-theme="dark"] .ab-settings-grid select,body[data-theme="dark"] .ab-settings-grid textarea,body[data-theme="dark"] .ab-profile-grid input,body[data-theme="dark"] .ab-profile-grid select,body[data-theme="dark"] .ab-table select,body[data-palette="midnight"] .ab-plan-picker select,body[data-palette="midnight"] .ab-button.secondary { background:#292a2d;color:#e8eaed; }
body[data-theme="dark"] .ab-table thead th,body[data-palette="midnight"] .ab-table thead th { background:#292a2d;color:#e8eaed; }
body[data-theme="dark"] .ab-table tfoot th,body[data-theme="dark"] .ab-table tfoot td,body[data-theme="dark"] .ab-table tr.is-derived th,body[data-theme="dark"] .ab-table tr.is-derived td,body[data-theme="dark"] .ab-table td.is-derived { background:#263653; }
@media (max-width:1400px) { .ab-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }.ab-header { align-items:flex-start;flex-direction:column; }.ab-header-actions { justify-content:flex-start; }.ab-overview-grid { grid-template-columns:1fr; } }
@media (max-width:1000px) { .ab-profile-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) { .ab-kpi-grid,.ab-overview-grid.lower,.ab-settings-grid,.ab-profile-grid { grid-template-columns:1fr; }.ab-monthly-chart { min-width:720px; }.ab-monthly-card { overflow:auto; }.ab-card>header { flex-direction:column; }.ab-card-actions { width:100%;flex-wrap:wrap; }.ab-card-actions input { width:100%; }.ab-section-edit-actions { width:100%;flex-wrap:wrap; }.ab-header-actions { align-items:stretch;width:100%; }.ab-header-actions>* { flex:1 1 auto; } }
