:root {
    color-scheme: dark;
    --bg: #071018;
    --panel: #0d1823;
    --panel-2: #111f2d;
    --line: #23364a;
    --line-soft: rgba(139, 163, 190, .16);
    --text: #f6f8fb;
    --muted: #a6b4c6;
    --soft: #728197;
    --profit: #4fdb85;
    --loss: #ff6657;
    --breakeven: #a9b7c8;
    --none: #3d4d64;
    --accent: #6f62ff;
    --accent-2: #39d0bf;
    --gold: #f5c76b;
    --shadow: 0 18px 45px rgba(0, 0, 0, .32);
    font-family: 'Outfit', Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
}

body.theme-light {
    color-scheme: light;
    --bg: #f0f4f8;
    --panel: #ffffff;
    --panel-2: #f7fafc;
    --line: #cbd5e0;
    --line-soft: rgba(100, 130, 170, .18);
    --text: #1a202c;
    --muted: #4a5568;
    --soft: #718096;
    --profit: #1a7f4b;
    --loss: #c53030;
    --breakeven: #6b7280;
    --none: #b0bec5;
    --accent: #5a50e0;
    --accent-2: #0ea5a0;
    --gold: #d97706;
    --shadow: 0 4px 24px rgba(0, 0, 0, .10);
}

body.theme-light {
    background:
        linear-gradient(180deg, rgba(10, 165, 160, .06), transparent 22rem),
        radial-gradient(circle at 18% 8%, rgba(90, 80, 224, .07), transparent 32rem),
        radial-gradient(circle at 86% 18%, rgba(26, 127, 75, .05), transparent 28rem),
        linear-gradient(135deg, #e8edf5, #f0f4f8 48%, #eaf0f8);
    color: var(--text);
}

body.theme-light .topbar {
    background: linear-gradient(135deg, rgba(255, 255, 255, .97), rgba(245, 248, 252, .98));
}

body.theme-light .shell {
    background: linear-gradient(180deg, rgba(255, 255, 255, .6), transparent), rgba(255, 255, 255, .85);
}

body.theme-light .metric {
    background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(240, 244, 248, .8));
}

body.theme-light .metric span {
    color: #4a5568;
}

body.theme-light button {
    background: linear-gradient(180deg, #ffffff, #f0f4f8);
    border-color: #cbd5e0;
    color: #1a202c;
}

body.theme-light .segmented button {
    background: #e8edf5;
    color: #1a202c;
}

body.theme-light .segmented button.active {
    background: linear-gradient(135deg, var(--accent-2), #5342cc);
    color: #fff;
}

body.theme-light .month {
    background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(240, 244, 248, .8));
    border-color: rgba(100, 130, 170, .2);
}

body.theme-light .side-card,
body.theme-light .bottom-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(245, 248, 252, .9));
    border-color: #cbd5e0;
}

body.theme-light .bar-track {
    background: #e2e8f0;
}

body.theme-light input,
body.theme-light select,
body.theme-light textarea {
    background: #ffffff;
    border-color: #cbd5e0;
    color: #1a202c;
}

body.theme-light #monthFilter,
body.theme-light #themeSelect {
    background-color: #ffffff;
    color: #1a202c;
}

body.theme-light .editor {
    background: #ffffff;
}

body.theme-light .year-label {
    background: #f7fafc;
    color: #1a202c;
    border-color: #cbd5e0;
}

body.theme-light .summary-row,
body.theme-light .bar-row {
    color: #2d3748;
}

body.theme-light .month-footer {
    color: #4a5568;
}

body.theme-light .weekdays {
    color: #4a5568;
}

body.theme-light .year-table th {
    background: #edf2f7;
    color: #4a5568;
}

body.theme-light .brand p {
    color: #4a5568;
}

body.theme-light .week-card {
    background: rgba(255, 255, 255, .9);
}

body.theme-emerald {
    --accent: #36c28a;
    --accent-2: #39d0bf;
    --line: #23483e;
    --line-soft: rgba(87, 190, 152, .18);
}

body.theme-sapphire {
    --accent: #4d8dff;
    --accent-2: #5fd0ff;
    --line: #263f63;
    --line-soft: rgba(95, 158, 255, .18);
}

body.theme-violet {
    --accent: #7c6cff;
    --accent-2: #b18cff;
    --line: #3b3266;
    --line-soft: rgba(177, 140, 255, .18);
}

body.theme-graphite {
    --accent: #d1dae6;
    --accent-2: #8da2b8;
    --line: #344255;
    --line-soft: rgba(180, 195, 214, .16);
}

body.theme-gold {
    --accent: #d9a94f;
    --accent-2: #f5c76b;
    --line: #4d3f27;
    --line-soft: rgba(245, 199, 107, .18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(57, 208, 191, .06), transparent 22rem),
        radial-gradient(circle at 18% 8%, rgba(111, 98, 255, .14), transparent 32rem),
        radial-gradient(circle at 86% 18%, rgba(79, 219, 133, .08), transparent 28rem),
        linear-gradient(135deg, #050b12, var(--bg) 48%, #0b1520);
    color: var(--text);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
    color: var(--text);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #101b28, #0c1520);
    border-radius: 7px;
    transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

button:hover {
    border-color: rgba(57, 208, 191, .5);
    transform: translateY(-1px);
}

.public-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 18px 0 48px;
}

body.signed-in .public-shell {
    display: none;
}

.app {
    display: none;
}

body.signed-in .app {
    display: flex;
}

.public-nav {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
}

.public-brand,
.public-actions,
.hero-actions,
.trust-row {
    display: flex;
    align-items: center;
}

.public-brand {
    gap: 12px;
    font-size: 20px;
}

.public-actions,
.hero-actions {
    gap: 10px;
}

.public-actions button,
.hero-actions button {
    padding: 12px 18px;
    font-weight: 800;
}

.primary-action {
    border-color: rgba(57, 208, 191, .42);
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #fff;
}

.public-hero {
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .75fr);
    gap: 34px;
    align-items: center;
    padding: 34px 0 26px;
}

.hero-copy h1 {
    max-width: 760px;
    margin: 16px 0 16px;
    font-size: clamp(46px, 7vw, 84px);
    line-height: .98;
    letter-spacing: 0;
}

.hero-copy p {
    max-width: 640px;
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.5;
}

.trial-pill {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border: 1px solid rgba(57, 208, 191, .36);
    border-radius: 999px;
    color: var(--accent-2);
    background: rgba(57, 208, 191, .08);
    font-weight: 800;
}

.trust-row {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.trust-row span {
    padding: 7px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(13, 24, 35, .55);
    font-size: 13px;
    font-weight: 800;
}

.hero-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(17, 31, 45, .92), rgba(7, 16, 24, .96));
    box-shadow: var(--shadow);
}

.preview-card,
.public-grid article,
.quote-row blockquote {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: rgba(13, 24, 35, .72);
}

.preview-card {
    padding: 18px;
    display: grid;
    gap: 6px;
}

.preview-card span,
.preview-card small {
    color: var(--muted);
}

.preview-card strong {
    font-size: 30px;
    line-height: 1.1;
}

.public-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.public-grid article {
    padding: 20px;
}

.public-grid h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.public-grid p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.quote-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.quote-row blockquote {
    margin: 0;
    padding: 18px;
}

.quote-row p {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.4;
}

.quote-row cite {
    color: var(--muted);
    font-style: normal;
    font-weight: 800;
}

.app {
    width: min(1920px, 100%);
    margin: 0 auto;
    padding: 10px;
    flex-direction: column;
    gap: 10px;
}

.topbar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(16, 29, 43, .96), rgba(9, 19, 30, .98));
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);

}

.topbar-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(8, minmax(105px, 1fr));
    gap: 12px;
}

.mobile-brand {
    display: none;
}

.brand {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
}

.brand-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    border: none;
    background: transparent;
    flex: 0 0 auto;
}

.brand h1 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.05;
    letter-spacing: 1px;
    font-weight: 600;
}

.brand p {
    margin: 5px 0 0;
    color: #b9c5d4;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.metric {
    min-height: 78px;
    padding: 12px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .035), transparent),
        rgba(10, 19, 30, .78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.metric span {
    display: block;
    color: #b4c0cf;
    font-size: 13px;
    margin-bottom: 8px;
}

.metric strong {
    display: block;
    font-size: clamp(21px, 1.55vw, 30px);
    line-height: 1.05;
    white-space: nowrap;
    font-weight: 900;
}

.profit-text {
    color: var(--profit);
}

.loss-text {
    color: var(--loss);
}

.shell {
    margin-top: 0;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .025), transparent),
        rgba(10, 19, 30, .86);
    padding: 14px 16px 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.controls {
    display: grid;
    grid-template-columns: auto 1fr 250px;
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
}

.year-control {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-btn {
    height: 40px;
    width: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 16px;
    transform: none !important;
}

#monthFilter,
#themeSelect,
#colorSelect,
#currencySelect,
#marketSelect {
    position: relative;
    z-index: 2;
}

.year-label {
    height: 40px;
    width: 72px;
    flex: 0 0 72px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #0a1420;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0;
}

.this-year,
.primary {
    background: linear-gradient(135deg, var(--accent), #4d42c9);
    border-color: rgba(111, 98, 255, .88);
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(111, 98, 255, .2);
}

.legend-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 28px;
    color: var(--text);
    font-size: 14px;
}

select,
input,
textarea {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

#monthFilter {
    height: 40px;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 7px;
    border: 1px solid rgba(139, 163, 190, .22);
    background: #091522;
    color: #eef5fb;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    width: 130px;
}

#monthFilter:hover {
    border-color: rgba(57, 208, 191, .55);
}

#themeSelect {
    height: 40px;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 7px;
    border: 1px solid rgba(139, 163, 190, .22);
    background: #091522;
    color: #eef5fb;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    width: 130px;
}

#colorSelect {
    height: 40px;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 7px;
    border: 1px solid rgba(139, 163, 190, .22);
    background: #091522;
    color: #eef5fb;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    width: 125px;
}

#colorSelect:hover {
    border-color: color-mix(in srgb, var(--accent-2), white 15%);
}

#currencySelect {
    height: 40px;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 7px;
    border: 1px solid rgba(139, 163, 190, .22);
    background: #091522;
    color: #eef5fb;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    width: 140px;
}

#currencySelect:hover {
    border-color: color-mix(in srgb, var(--accent-2), white 15%);
}

body.theme-light #currencySelect {
    background: #ffffff;
    color: #1a202c;
    border-color: #cbd5e0;
}

body.theme-light #colorSelect {
    background: #ffffff;
    color: #1a202c;
    border-color: #cbd5e0;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
    margin-right: 8px;
    vertical-align: -1px;
}

.segmented {
    justify-self: end;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--line);
    border-radius: 7px;
    overflow: hidden;
    width: 250px;
}

.segmented button {
    border: 0;
    border-radius: 0;
    height: 40px;
    background: #101926;
    font-size: 14px;
}

.segmented button.active {
    background: linear-gradient(135deg, var(--accent-2), #5342cc);
    font-weight: 800;
}

.content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
}

.months {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}

.months.single-month {
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 18px;
    align-items: stretch;
}

.month {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .024), transparent),
        rgba(8, 18, 29, .82);
    padding: 10px;
    min-height: 330px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .028);
}

.single-month .month {
    min-height: 720px;
    padding: 14px;
}

.month.current {
    border-color: rgba(111, 98, 255, .8);
    box-shadow: inset 0 0 0 1px rgba(111, 98, 255, .34), 0 0 0 1px rgba(111, 98, 255, .12);
}

.month h2 {
    margin: 0 0 12px;
    text-align: center;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 850;
    letter-spacing: 0;
}

.month-head {
    display: grid;
    grid-template-columns: 42px 1fr 42px auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.month-head h2 {
    margin: 0;
    text-align: left;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
}

.month-stats-pill {
    justify-self: end;
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.month-stats-pill strong {
    color: var(--profit);
    font-size: 16px;
}

.weekdays,
.days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    column-gap: 6px;
    row-gap: 5px;
}

.weekdays {
    color: #c7d2df;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.single-month .weekdays,
.single-month .days {
    column-gap: 8px;
    row-gap: 8px;
}

.single-month .weekdays {
    font-size: 13px;
    font-weight: 800;
}

.single-month .weekdays span {
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(17, 26, 38, .8);
    padding: 11px 6px;
}

.day {
    aspect-ratio: 1 / .82;
    min-height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    border: 1px solid #223449;
    border-radius: 5px;
    background: #0e1926;
    color: var(--muted);
    padding: 3px;
    overflow: hidden;
}

.single-month .day {
    aspect-ratio: auto;
    min-height: 104px;
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
    gap: 4px;
    border-radius: 7px;
}

.day.empty {
    visibility: hidden;
}

.single-month .day.empty {
    visibility: visible;
    opacity: .35;
    pointer-events: none;
}

.day .num {
    font-size: 10px;
    line-height: 1;
    color: #ffffff;
    font-weight: 750;
}

.single-month .day .num {
    align-self: flex-end;
    margin-bottom: auto;
    font-size: 13px;
}

.day .val {
    font-size: 12px;
    line-height: 1.1;
    font-weight: 850;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.single-month .day .val {
    font-size: 18px;
    line-height: 1.12;
    font-weight: 850;
}

.day-meta {
    display: none;
}

.single-month .day-meta {
    display: block;
    color: #9fb0c3;
    font-size: 12px;
    line-height: 1.25;
    text-align: right;
}

.day.profit {
    background: #166534;
    border-color: #22c55e;
    color: #bbf7d0;
}

.day.profit .num {
    color: #86efac;
}

.day.profit .val {
    color: #4ade80;
}

.day.loss {
    background: #7f1d1d;
    border-color: #ef4444;
    color: #fecaca;
}

.day.loss .num {
    color: #fca5a5;
}

.day.loss .val {
    color: #f87171;
}

.day.breakeven {
    background: #1e3a5f;
    border-color: #60a5fa;
    color: #bfdbfe;
}

.day.breakeven .num {
    color: #93c5fd;
}

.day.breakeven .val {
    color: #60a5fa;
}

.day.none {
    background: #1e2533;
    border-color: #374151;
    color: #6b7280;
}

body.theme-light .day.profit {
    background: #dcfce7;
    border-color: #16a34a;
    color: #14532d;
}

body.theme-light .day.profit .num {
    color: #166534;
}

body.theme-light .day.profit .val {
    color: #15803d;
}

body.theme-light .day.loss {
    background: #fee2e2;
    border-color: #dc2626;
    color: #7f1d1d;
}

body.theme-light .day.loss .num {
    color: #991b1b;
}

body.theme-light .day.loss .val {
    color: #dc2626;
}

body.theme-light .day.breakeven {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e3a8a;
}

body.theme-light .day.breakeven .num {
    color: #1d4ed8;
}

body.theme-light .day.breakeven .val {
    color: #2563eb;
}

body.theme-light .day.none {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #9ca3af;
}

body.theme-light .day {
    background: #f1f5f9;
    border-color: #cbd5e0;
    color: #4a5568;
}

body.theme-light .day .num {
    color: #1a202c;
}

body.theme-light .single-month .weekdays span {
    background: #e2e8f0;
    border-color: #cbd5e0;
    color: #374151;
}

.month-footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
    color: #cad5e3;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.month-footer b.profit-text,
.day .val.profit-text {
    color: var(--profit);
}

.month-footer b.loss-text,
.day .val.loss-text {
    color: var(--loss);
}

.weekly-panel {
    display: grid;
    gap: 8px;
}

.week-card {
    min-height: 104px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .028), transparent),
        rgba(8, 18, 29, .82);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.week-card span {
    color: var(--accent-2);
    font-size: 13px;
    font-weight: 750;
}

.week-card strong {
    font-size: 22px;
    line-height: 1;
    font-weight: 900;
}

.week-card small {
    align-self: flex-start;
    color: var(--text);
    background: rgba(57, 208, 191, .12);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 750;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.side-card,
.bottom-card {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .026), transparent),
        rgba(8, 18, 29, .82);
    padding: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.side-card h2,
.bottom-card h2 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 850;
}

.summary-row,
.bar-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    margin: 12px 0;
    color: var(--text);
}

.divider {
    height: 1px;
    background: var(--line-soft);
    margin: 14px 0;
}

.bar-row {
    grid-template-columns: 44px 1fr 78px;
    margin: 8px 0;
    font-size: 14px;
}

.bar-track {
    height: 9px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

.bar-fill {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--profit), var(--accent-2));
}

.legend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    color: var(--text);
}

.capital-box {
    display: grid;
    gap: 12px;
}

.capital-box input {
    font-size: 20px;
    font-weight: 800;
}

.bottom {
    display: grid;
    grid-template-columns: 1.1fr .82fr .36fr;
    gap: 12px;
    margin-top: 12px;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}

.overview-item {
    min-width: 0;
    padding: 0 14px;
    border-right: 1px solid var(--line);
}

.overview-item:first-child {
    padding-left: 0;
}

.overview-item:last-child {
    border-right: 0;
}

.overview-item strong {
    display: block;
    font-size: 17px;
    line-height: 1.2;
    white-space: nowrap;
}

.overview-item span {
    color: var(--muted);
    font-size: 12px;
}

.chart {
    height: 96px;
    width: 100%;
    display: block;
    background: linear-gradient(180deg, rgba(86, 212, 117, .06), transparent);
}

.bestworst {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    font-size: 12px;
    align-items: center;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(3, 8, 13, .72);
    z-index: 10;
}

.modal.open {
    display: flex;
}

.editor {
    width: min(700px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.form-section-label {
    grid-column: 1 / -1;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-top: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line-soft);
}

.chip-group {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 2px;
}

.chip-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    min-height: auto;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: rgba(10, 19, 30, .6);
    transition: border-color .15s, background .15s, color .15s;
}

.chip-group input[type="checkbox"],
.chip-group input[type="radio"] {
    width: 14px;
    height: 14px;
    min-height: unset;
    accent-color: var(--accent-2);
    cursor: pointer;
}

.chip-group label:has(input:checked) {
    border-color: var(--accent-2);
    background: rgba(57, 208, 191, .12);
    color: var(--accent-2);
}

.checkin-box {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: auto;
    padding: 10px 12px;
    border: 1px solid rgba(57, 208, 191, .28);
    border-radius: 7px;
    background: rgba(57, 208, 191, .08);
    color: var(--text);
    font-weight: 700;
}

.checkin-box input {
    order: 0;
    width: 16px;
    height: 16px;
    min-height: unset;
    accent-color: var(--accent-2);
}

#notesInput {
    grid-column: 1 / -1;
}

.modal {
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.editor {
    width: min(700px, calc(100vw - 36px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: #0d1824;
    box-shadow: var(--shadow);
    padding: 20px 22px;
}

.editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.editor-head h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
}

.editor-head .icon-btn {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.checkin-box,
.form-section-label,
.chip-group,
#notesInput {
    grid-column: 1 / -1;
}

#notesInput {
    min-height: 100px;
}

.editor-actions {
    display: flex;
    gap: 14px;
    margin-top: 18px;
}

.editor-actions button {
    min-height: 54px;
    font-weight: 800;
}

label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-size: 13px;
}

input,
select,
textarea {
    width: 100%;
    color: var(--text);
    background: #08131f;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
    min-height: 42px;
}

input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: rgba(57, 208, 191, .78);
    box-shadow: 0 0 0 3px rgba(57, 208, 191, .12);
}

textarea {
    grid-column: 1 / -1;
    min-height: 100px;
    resize: vertical;
}

.editor-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.editor-actions button {
    flex: 1;
    padding: 12px;
}

.danger {
    border-color: rgba(255, 98, 77, .45);
    color: var(--loss);
}

.wide-year {
    display: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.year-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.year-table th,
.year-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    text-align: right;
}

.year-table th:first-child,
.year-table td:first-child {
    text-align: left;
}

.year-table th {
    color: var(--muted);
    background: #101926;
    font-weight: 700;
}

.year-cards {
    display: none;
}

.import-export {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

@media (max-width: 680px) {
    .wide-year {
        border: none;
        border-radius: 0;
        overflow: visible;
    }

    .year-table {
        display: none;
    }

    .year-cards {
        display: grid;
    }

    .year-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .year-card {
        background: #0d1823;
        border: 1px solid var(--line-soft);
        border-radius: 10px;
        padding: 12px;
    }

    body.theme-light .year-card {
        background: #ffffff;
        border-color: #cbd5e0;
    }

    .year-card .yc-month {
        font-size: 13px;
        font-weight: 800;
        color: var(--muted);
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .year-card .yc-pnl {
        font-size: 20px;
        font-weight: 900;
        line-height: 1;
        margin-bottom: 8px;
    }

    .year-card .yc-stats {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .year-card .yc-row {
        display: flex;
        justify-content: space-between;
        font-size: 11px;
        color: var(--muted);
    }

    .year-card .yc-row span:last-child {
        font-weight: 700;
        color: var(--text);
    }

    body.theme-light .year-card .yc-row span:last-child {
        color: #1a202c;
    }
}




@media (max-width: 1400px) {

    .months {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .content {
        grid-template-columns: minmax(0, 1fr) 310px;
    }

    .overview-grid {
        grid-template-columns: repeat(4, 1fr);
        row-gap: 14px;
    }
}

@media (max-width: 1200px) {
    .content {
        grid-template-columns: 1fr;
    }

    .months {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .controls {
        grid-template-columns: 1fr;
    }

    .year-control {
        flex-wrap: wrap;
    }

    .legend-row {
        justify-content: flex-start;
    }

    .controls-right {
        justify-self: stretch;
    }

    .segmented {
        width: 100%;
    }
}

@media (max-width: 1200px) {
    .content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .controls {
        grid-template-columns: 1fr;
    }

    .year-control {
        flex-wrap: wrap;
    }

    .legend-row {
        justify-content: flex-start;
    }

    .controls-right {
        justify-self: stretch;
    }

    .segmented {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .metrics-row {
        grid-template-columns: repeat(4, minmax(120px, 1fr));
    }
}

@media (max-width: 680px) {
    .months {
        grid-template-columns: 1fr;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .metrics-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .topbar-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-topbar {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        margin-left: 0;
        padding-left: 0;
    }

    .metrics-row {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 680px) {
    .app {
        padding: 6px;
        gap: 8px;
    }

    .topbar {
        order: 2;
        margin-top: 0;
    }



    .mobile-brand {
        display: flex;
        gap: 14px;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: linear-gradient(135deg, rgba(16, 29, 43, .98), rgba(9, 19, 30, .99));
        border-bottom: 1px solid var(--line-soft);
        padding: 10px 14px;
        backdrop-filter: blur(10px);
    }

    .mobile-brand .brand-icon {
        width: 42px;
        height: 42px;
        border-radius: 8px;
        display: grid;
        place-items: center;
        flex: 0 0 42px;
        border: none;
        background: transparent;
    }

    .mobile-brand h1 {
        margin: 0;
        font-family: 'Outfit', sans-serif;
        font-size: 18px;
        font-weight: 600;
        line-height: 1.1;
        letter-spacing: 1px;
        color: #f6f8fb;
    }

    .mobile-brand p {
        margin: 3px 0 0;
        color: #b9c5d4;
        font-size: 12px;
    }

    body.theme-light .mobile-brand {
        background: linear-gradient(135deg, rgba(255, 255, 255, .97), rgba(245, 248, 252, .98));
        border-bottom-color: #cbd5e0;
    }

    body.theme-light .mobile-brand h1 {
        color: #1a202c;
    }

    body.theme-light .mobile-brand p {
        color: #4a5568;
    }

    .shell {
        order: 1;
    }

    .topbar,
    .shell {
        padding: 10px;
        gap: 10px;
    }


    .brand {
        grid-column: 1 / -1;
    }

    .metric {
        min-height: 60px;
        padding: 10px 12px;
    }

    .metric strong {
        font-size: 18px;
    }

    .metric span {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .months {
        grid-template-columns: 1fr;
    }

    .controls {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .year-control {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .year-control .icon-btn {
        width: 40px;
        flex: 0 0 40px;
    }

    .year-control .year-label {
        width: 68px;
        flex: 0 0 68px;
    }

    .year-control .this-year {
        flex: 1;
        min-width: 80px;
    }

    #monthFilter,
    #themeSelect,
    #colorSelect,
    #currencySelect {
        width: 100% !important;
        flex: 1 1 calc(50% - 5px);
        min-width: 120px;
    }

    .legend-row {
        justify-content: flex-start;
        gap: 12px;
        font-size: 13px;
    }

    .segmented {
        width: 100%;
    }

    .month {
        min-height: auto;
        overflow: hidden;
    }

    .month-footer {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .overview-grid {
        grid-template-columns: 1fr 1fr;
        row-gap: 12px;
    }

    .overview-item {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 9px 0;
    }

    .overview-item:nth-child(odd) {
        border-right: 1px solid var(--line);
        padding-right: 12px;
    }

    .overview-item:last-child,
    .overview-item:nth-last-child(2):nth-child(odd) {
        border-bottom: 0;
    }

    .months.single-month {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .single-month .month {
        min-height: auto;
        padding: 10px;
    }

    .single-month .day {
        min-height: 52px !important;
        aspect-ratio: auto !important;
        padding: 4px 3px !important;
        gap: 2px !important;
        border-radius: 5px !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .single-month .day .num {
        font-size: 11px !important;
        margin-bottom: 0 !important;
        align-self: auto !important;
    }

    .single-month .day .val {
        font-size: 11px !important;
        font-weight: 800 !important;
    }

    .single-month .day-meta {
        display: none !important;
    }

    .single-month .weekdays span {
        padding: 5px 2px !important;
        font-size: 10px !important;
        border-radius: 4px !important;
    }

    .single-month .weekdays,
    .single-month .days {
        column-gap: 6px !important;
        row-gap: 4px !important;
    }

    .month-head {
        grid-template-columns: 36px 1fr 36px !important;
        gap: 8px !important;
    }

    .month-head h2 {
        font-size: 17px !important;
    }

    .month-stats-pill {
        display: none !important;
    }

    .weekly-panel {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }

    .week-card {
        min-height: auto !important;
        padding: 10px 8px !important;
        gap: 3px !important;
    }

    .week-card span {
        font-size: 11px !important;
    }

    .week-card strong {
        font-size: 15px !important;
    }

    .week-card small {
        font-size: 10px !important;
        padding: 2px 7px !important;
    }

    .brand h1 {
        font-size: 22px;
    }

    .bottom {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .content {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .sidebar {
        gap: 10px;
    }

    .day .val {
        font-size: 10px;
    }

    .editor {
        padding: 14px;
    }


    .editor-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .editor-actions div {
        justify-content: flex-end;
    }

    .import-export {
        gap: 8px;
    }

    .import-export button {
        flex: 1;
        padding: 10px 8px;
        font-size: 13px;
    }

    .week-card {
        padding: 12px;
    }

    canvas.chart {
        height: 80px;
    }

    /* Year view table scroll on mobile */
    .wide-year {
        overflow-x: auto;
    }

    .year-table {
        min-width: 500px;
    }

    /* Year cards grid compress */
    .year-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 400px) {


    .metric {
        min-height: auto;
    }

    .year-cards {
        grid-template-columns: 1fr !important;
    }

    .weekdays span,
    .day {
        font-size: 9px;
    }
}

.auth-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.auth-actions span {
    color: var(--muted);
    font-size: 13px;
}

.auth-actions .trialStatus,
.auth-topbar .trialStatus {
    color: var(--accent-2);
    opacity: 1;
    font-weight: 800;
}

.auth-actions button {
    padding: 7px 10px;
    font-size: 13px;
}

.auth-helper-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.auth-helper-actions button {
    border: 0;
    background: transparent;
    color: var(--accent-2);
    padding: 0;
    font-size: 13px;
    font-weight: 800;
}

.auth-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
    margin-left: auto;
    padding-left: 10px;
    flex: 0 0 auto;
    min-width: max-content;
}

.auth-topbar span {
    font-size: 12px;
    opacity: .8;
    white-space: nowrap;
}

.authStatus.sync-error {
    color: var(--loss);
    opacity: 1;
}

.trial-banner {
    display: none;
    padding: 10px 12px;
    border: 1px solid rgba(57, 208, 191, .24);
    border-radius: 8px;
    background: rgba(57, 208, 191, .08);
    color: var(--muted);
    font-weight: 800;
}

.trial-banner.show {
    display: block;
}

.trial-banner.expired {
    border-color: rgba(255, 102, 87, .36);
    background: rgba(255, 102, 87, .09);
    color: var(--loss);
}



.auth-topbar button {
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.auth-topbar {
    position: relative;
    z-index: 20;
}

.auth-topbar button {
    position: relative;
    z-index: 21;
    pointer-events: auto;
}

@media (max-width: 680px) {
    .public-shell {
        width: min(100% - 22px, 560px);
        padding-bottom: 30px;
    }

    .public-nav,
    .public-actions,
    .hero-actions {
        align-items: stretch;
    }

    .public-nav {
        flex-direction: column;
    }

    .public-actions,
    .hero-actions {
        width: 100%;
        flex-direction: column;
    }

    .public-actions button,
    .hero-actions button {
        width: 100%;
    }

    .public-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding-top: 22px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .hero-copy p {
        font-size: 17px;
    }

    .public-grid,
    .quote-row {
        grid-template-columns: 1fr;
    }

    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .editor {
        width: 100%;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
        padding: 14px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .editor-actions {
        flex-direction: column-reverse;
    }
}

.score-empty {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.score-main {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.score-main strong {
    font-size: 36px;
    line-height: 1;
}

.score-label {
    margin: 6px 0 10px;
    font-weight: 800;
}

.setup-row {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 4px 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
}

.setup-row:last-child {
    border-bottom: 0;
}

.setup-row strong {
    font-size: 18px;
}

.setup-row span {
    justify-self: end;
    font-weight: 850;
}

.setup-row small {
    grid-column: 2;
    color: var(--muted);
    font-size: 12px;
}

.insight-item {
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    background: rgba(10, 19, 30, .62);
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
}

.insight-item:last-child {
    margin-bottom: 0;
}

.insight-item strong {
    color: var(--accent-2);
}

.habit-grid,
.mvm-report {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.habit-stat,
.mvm-card {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: rgba(10, 19, 30, .62);
    padding: 12px;
}

.habit-stat strong {
    display: block;
    font-size: 30px;
    line-height: 1;
    color: var(--accent-2);
}

.habit-stat span,
.mvm-card h3,
.audit-month,
.mini-heading {
    color: var(--muted);
    font-size: 12px;
}

.week-audit-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
}

.week-audit-row:last-child {
    border-bottom: 0;
}

.week-audit-row span {
    color: var(--muted);
    font-size: 12px;
}

.week-audit-row strong:nth-child(3),
.week-audit-row strong:last-child {
    justify-self: end;
}

.mvm-card h3,
.mini-heading {
    margin: 0 0 8px;
    font-weight: 850;
    text-transform: uppercase;
}

.mvm-card strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    margin-bottom: 5px;
}

.mvm-card.bad strong {
    color: var(--loss);
}

.mvm-card.good strong {
    color: var(--profit);
}

.mvm-card span {
    font-size: 14px;
    font-weight: 800;
}

.mvm-insight-bar {
    margin: 10px 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--accent-2);
    border-radius: 7px;
    background: rgba(57, 208, 191, .08);
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
}

.mvm-insight-bar strong {
    color: var(--accent-2);
}

.emotion-bar-row {
    display: grid;
    grid-template-columns: minmax(82px, 1fr) minmax(70px, 1.3fr) auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 7px;
    font-size: 12px;
}

.emotion-bar-row .ebar-track {
    height: 7px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

.emotion-bar-row .ebar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--accent-2);
}

.emotion-bar-row.negative .ebar-fill {
    background: var(--loss);
}

.emotion-bar-row.positive .ebar-fill {
    background: var(--profit);
}

.emotion-bar-row strong {
    font-size: 12px;
}

body.theme-light .habit-stat,
body.theme-light .mvm-card {
    background: rgba(255, 255, 255, .9);
    border-color: #cbd5e0;
}

body.theme-light .mvm-insight-bar {
    background: rgba(0, 160, 150, .08);
}

.single-month-strip {
    display: none;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.single-month-strip.visible {
    display: grid;
}

.strip-card,
.ytb-card,
.dash-card {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .026), transparent),
        rgba(8, 18, 29, .82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.strip-card {
    min-width: 0;
    padding: 10px 12px;
}

.strip-card span,
.ytb-card span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 4px;
}

.strip-card strong,
.ytb-card strong {
    display: block;
    font-size: 16px;
    line-height: 1.15;
}

.strip-card input,
.ytb-capital input {
    width: 100%;
    min-height: 28px;
    padding: 2px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    font-weight: 800;
}

.single-month-content {
    grid-template-columns: 1fr;
}

.single-month-content .sidebar {
    display: none;
}

.year-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    margin-top: 12px;
}

.year-toolbar.hidden {
    display: none;
}

.ytb-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 118px;
    padding: 10px 14px;
}

.ytb-bars {
    flex: 1 1 320px;
}

.ytb-bars-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
    align-items: end;
    height: 44px;
}

.ytb-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    height: 100%;
}

.ytb-bar-col span {
    margin: 0;
    font-size: 9px;
}

.ytb-bar-fill {
    width: 100%;
    min-height: 2px;
    border-radius: 3px 3px 0 0;
}

.ytb-actions {
    gap: 6px;
}

.ytb-actions button {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
}

#ytbBackupReminder {
    align-self: center;
    max-width: 240px;
    font-size: 11px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.dash-card {
    min-width: 0;
    padding: 16px;
}

.dash-card h2 {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 850;
}

.dash-overview {
    grid-column: span 6;
}

.dash-equity {
    grid-column: span 4;
}

.dash-bestworst {
    grid-column: span 2;
}

.dash-streak,
.dash-weekly,
.dash-discipline,
.dash-setup {
    grid-column: span 3;
}

.dash-coaching {
    grid-column: span 4;
}

.dash-mvm {
    grid-column: span 8;
}

.bottom {
    display: none;
}

.editor-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.editor-mode-tabs button {
    height: 38px;
    border: 0;
    border-radius: 0;
    background: rgba(10, 19, 30, .8);
    font-size: 13px;
    font-weight: 800;
}

.editor-mode-tabs button.active {
    background: linear-gradient(135deg, var(--accent-2), #5342cc);
    color: #fff;
}

.advanced-fields {
    display: none;
    grid-column: 1 / -1;
}

.advanced-fields.show {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.advanced-fields.show .form-section-label,
.advanced-fields.show .chip-group,
.advanced-fields.show .risk-row,
.advanced-fields.show textarea {
    grid-column: 1 / -1;
}

.risk-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.backup-reminder {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(245, 199, 107, .28);
    border-radius: 7px;
    background: rgba(245, 199, 107, .08);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.backup-reminder strong {
    color: var(--gold);
}

.backup-reminder.ok {
    border-color: rgba(79, 219, 133, .25);
    background: rgba(79, 219, 133, .06);
}

.backup-reminder.ok strong {
    color: var(--profit);
}

body.theme-light .strip-card,
body.theme-light .ytb-card,
body.theme-light .dash-card {
    background: #fff;
    border-color: #cbd5e0;
}

@media (max-width: 1400px) {
    .dash-overview,
    .dash-equity,
    .dash-bestworst,
    .dash-coaching,
    .dash-mvm {
        grid-column: span 6;
    }
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .dash-overview,
    .dash-equity,
    .dash-bestworst,
    .dash-coaching,
    .dash-mvm {
        grid-column: span 4;
    }

    .dash-streak,
    .dash-weekly,
    .dash-discipline,
    .dash-setup {
        grid-column: span 2;
    }

    .single-month-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .dashboard-grid,
    .single-month-strip {
        grid-template-columns: 1fr;
    }

    .dash-card,
    .dash-streak,
    .dash-weekly,
    .dash-discipline,
    .dash-setup,
    .dash-overview,
    .dash-equity,
    .dash-bestworst,
    .dash-coaching,
    .dash-mvm {
        grid-column: span 1;
    }

    .advanced-fields.show,
    .risk-row {
        grid-template-columns: 1fr;
    }
}
