/*
 * Ordelya Faz 33 tasarım sistemi
 *
 * Bu dosya site.css'ten sonra yüklenir. Önceki fazlardaki ekran sınıflarını korur,
 * fakat renk, ölçü, yüzey ve responsive davranışı tek bir son katmanda birleştirir.
 */

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-raised: #ffffff;
    --surface-strong: #102e2b;
    --ink: #12231f;
    --text: #12231f;
    --muted: #667a74;
    --line: #dce5e2;
    --line-strong: #cbd9d5;
    --brand: #0f8f7f;
    --brand-strong: #08695f;
    --brand-soft: #e2f5f1;
    --accent: #f0b84b;
    --danger: #dc5b58;
    --success: #14866d;
    --info: #4c6fff;
    --purple: #7c68d7;
    --shadow-xs: 0 1px 2px rgba(15, 42, 37, .04);
    --shadow-sm: 0 8px 24px rgba(20, 48, 43, .07);
    --shadow-md: 0 18px 48px rgba(20, 48, 43, .11);
    --shadow-lg: 0 30px 80px rgba(13, 35, 31, .16);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --sidebar-width: 272px;
    --sidebar-collapsed-width: 82px;
    --topbar-height: 72px;
    --content-width: 1560px;
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #0b1214;
    --surface: #121c1d;
    --surface-soft: #172324;
    --surface-raised: #192627;
    --surface-strong: #e2f5f1;
    --ink: #edf6f3;
    --text: #edf6f3;
    --muted: #9badA7;
    --line: #293839;
    --line-strong: #384a4b;
    --brand: #4bc5b2;
    --brand-strong: #7cdbcc;
    --brand-soft: #173c38;
    --accent: #f3c766;
    --danger: #ff8580;
    --success: #5bd0aa;
    --info: #8ba2ff;
    --purple: #aa9cf0;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .22);
    --shadow-sm: 0 10px 28px rgba(0, 0, 0, .25);
    --shadow-md: 0 20px 56px rgba(0, 0, 0, .32);
    --shadow-lg: 0 34px 90px rgba(0, 0, 0, .42);
    color-scheme: dark;
}

html {
    background: var(--bg);
    text-rendering: optimizeLegibility;
}

body {
    min-width: 320px;
    background:
        radial-gradient(circle at 88% -8%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 32rem),
        var(--bg);
    color: var(--ink);
    font-family: Inter, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    letter-spacing: -.006em;
}

h1, h2, h3, h4, .brand strong {
    font-family: Inter, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
    letter-spacing: -.035em;
}

/* Uygulama kabuğu */
.sidebar {
    width: var(--sidebar-width);
    padding: 1.2rem .9rem 1rem;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 16% -4%, rgba(94, 213, 190, .2), transparent 14rem),
        linear-gradient(180deg, #0b2928 0%, #0b2322 52%, #081c1d 100%);
    border-right: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 18px 0 48px rgba(4, 19, 18, .08);
    transition: width .22s ease, padding .22s ease, translate .22s ease;
}

.brand {
    min-height: 46px;
    padding: 0 .45rem;
}

.brand-mark {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 14px;
    background: linear-gradient(145deg, #ffd981, #e3a834 72%);
    color: #11312d;
    box-shadow: 0 10px 24px rgba(226, 168, 52, .2), inset 0 1px rgba(255, 255, 255, .6);
}

.brand-mark::after {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(17, 49, 45, .18);
    border-radius: 50%;
    content: "";
}

.brand strong { font-size: 1.08rem; letter-spacing: -.025em; }
.brand small { margin-top: .08rem; color: #84a39e; font-size: .68rem; }

.primary-nav { gap: .25rem; margin-top: 1.4rem; }
.nav-eyebrow { margin: 1.05rem .72rem .38rem; color: #6f938d; font-size: .65rem; letter-spacing: .14em; }

.nav-item,
.nav-more summary,
.nav-more > div a {
    min-height: 43px;
    gap: .72rem;
    padding: .62rem .72rem;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #b9ceca;
    font-size: .82rem;
    font-weight: 620;
    transition: color .15s ease, background .15s ease, border-color .15s ease, translate .15s ease;
}

.nav-item:hover,
.nav-more summary:hover,
.nav-more > div a:hover {
    background: rgba(255, 255, 255, .065);
    color: #fff;
    translate: 2px 0;
}

.nav-item > span:first-child,
.nav-more summary > span:first-child,
.nav-more > div a > span:first-child {
    display: grid;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 8px;
    background: rgba(255, 255, 255, .035);
    color: #88aaa4;
    font-size: .88rem;
}

.nav-item.active {
    border-color: rgba(103, 220, 198, .14);
    background: linear-gradient(90deg, rgba(63, 192, 168, .18), rgba(255, 255, 255, .055));
    color: #fff;
    box-shadow: inset 3px 0 #58cfb9, 0 8px 22px rgba(0, 0, 0, .1);
}

.nav-item.active > span:first-child {
    border-color: rgba(104, 224, 201, .2);
    background: rgba(63, 192, 168, .15);
    color: #78dec9;
}

.sidebar-collapse {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: .68rem;
    margin: auto .35rem .75rem;
    padding: .5rem .65rem;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 10px;
    background: rgba(255, 255, 255, .035);
    color: #8ea9a4;
    cursor: pointer;
    font-size: .7rem;
    font-weight: 700;
}

.sidebar-collapse:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar-collapse > span:first-child { width: 20px; color: #69cdbb; font-size: 1rem; }
.sidebar-footer { margin-top: 0; }

.app-stage {
    margin-left: var(--sidebar-width);
    transition: margin-left .22s ease;
}

.topbar {
    height: var(--topbar-height);
    padding: 0 clamp(1.1rem, 2.4vw, 2.3rem);
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .3);
    backdrop-filter: blur(22px) saturate(145%);
}

.topbar.is-scrolled { box-shadow: var(--shadow-sm); }
.workspace-switcher strong { max-width: 260px; overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.workspace-avatar { background: linear-gradient(145deg, var(--brand-soft), color-mix(in srgb, var(--brand) 15%, var(--surface))); }

.icon-button,
.notification-button,
.topbar-search,
.topbar-create,
.account-menu-summary {
    border-color: var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow-xs);
}

.icon-button:hover,
.notification-button:hover,
.topbar-search:hover,
.topbar-create:hover,
.account-menu-summary:hover {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.main-content {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: clamp(1.25rem, 2.7vw, 2.65rem);
}

/* Kullanıcı isterse menüyü simge görünümüne indirir. */
@media (min-width: 981px) {
    [data-sidebar="collapsed"] .sidebar { width: var(--sidebar-collapsed-width); padding-inline: .68rem; }
    [data-sidebar="collapsed"] .app-stage { margin-left: var(--sidebar-collapsed-width); }
    [data-sidebar="collapsed"] .brand { justify-content: center; padding: 0; }
    [data-sidebar="collapsed"] .brand > span:last-child,
    [data-sidebar="collapsed"] .nav-eyebrow,
    [data-sidebar="collapsed"] .nav-item:not(.active)::after,
    [data-sidebar="collapsed"] .nav-more summary strong,
    [data-sidebar="collapsed"] .nav-more summary small,
    [data-sidebar="collapsed"] .sidebar-collapse-copy,
    [data-sidebar="collapsed"] .sidebar-footer span:not(.status-dot) { display: none; }
    [data-sidebar="collapsed"] .nav-item,
    [data-sidebar="collapsed"] .nav-more summary,
    [data-sidebar="collapsed"] .nav-more > div a {
        justify-content: center;
        padding-inline: .4rem;
        overflow: hidden;
        color: transparent;
        font-size: 0;
    }
    [data-sidebar="collapsed"] .nav-item > span:first-child,
    [data-sidebar="collapsed"] .nav-more summary > span:first-child,
    [data-sidebar="collapsed"] .nav-more > div a > span:first-child { margin: 0; color: #9cb8b3; font-size: .88rem; }
    [data-sidebar="collapsed"] .nav-item.active > span:first-child { color: #78dec9; }
    [data-sidebar="collapsed"] .nav-more > div { position: static; }
    [data-sidebar="collapsed"] .sidebar-collapse { justify-content: center; margin-inline: 0; padding-inline: .3rem; }
    [data-sidebar="collapsed"] .sidebar-collapse > span:first-child { rotate: 180deg; }
    [data-sidebar="collapsed"] .sidebar-footer { justify-content: center; padding-inline: 0; }
}

/* Başlık, kart, buton ve form dili bütün modüllerde aynıdır. */
.page-heading {
    align-items: flex-end;
    margin-bottom: 1.15rem;
}

.page-heading > div:first-child { max-width: 780px; }
.page-heading h1 { max-width: 820px; color: var(--ink); font-size: clamp(1.65rem, 2.8vw, 2.65rem); line-height: 1.08; }
.page-heading > div:first-child > p:not(.eyebrow) { max-width: 720px; margin-top: .55rem; color: var(--muted); font-size: .87rem; line-height: 1.65; }
.eyebrow { color: var(--brand-strong); font-size: .66rem; font-weight: 850; letter-spacing: .14em; }

.panel,
.metric-card,
.task-metric,
.finance-metric,
.billing-metric {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.app-page .panel::before { display: none; }
.panel { padding: clamp(1rem, 1.6vw, 1.35rem); }
.panel-header { min-height: 42px; }
.panel-header h2 { font-size: 1.04rem; }

@media (hover: hover) {
    .app-page .panel:hover { border-color: color-mix(in srgb, var(--brand) 20%, var(--line)); box-shadow: var(--shadow-md); transform: none; }
}

.primary-button,
.secondary-button,
.ghost-button,
button.primary-button,
button.secondary-button {
    min-height: 40px;
    border-radius: 10px;
    font-size: .75rem;
    font-weight: 760;
    letter-spacing: -.005em;
}

.primary-button {
    border-color: transparent;
    background: linear-gradient(135deg, #109b89, #087367);
    color: #fff;
    box-shadow: 0 9px 22px rgba(8, 115, 103, .2);
}

.primary-button:hover { background: linear-gradient(135deg, #0d8879, #075e56); box-shadow: 0 12px 28px rgba(8, 115, 103, .27); }
.secondary-button { border-color: var(--line-strong); background: var(--surface); }
.secondary-button:hover { border-color: color-mix(in srgb, var(--brand) 44%, var(--line)); background: var(--brand-soft); color: var(--brand-strong); }

label { color: color-mix(in srgb, var(--ink) 76%, var(--muted)); font-weight: 700; }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
select,
textarea {
    min-height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: inset 0 1px 2px rgba(12, 37, 33, .025);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

textarea { min-height: 110px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus,
select:focus,
textarea:focus {
    border-color: color-mix(in srgb, var(--brand) 72%, var(--line));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent);
    outline: none;
}

/* Metrikler modern dashboard yoğunluğunda ve sayı odaklıdır. */
.metric-grid,
.finance-metrics { gap: .8rem; }
.metric-card,
.finance-metric { min-height: 112px; padding: 1rem 1.05rem; }
.metric-value,
.finance-metric strong { font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.metric-card.featured { background: linear-gradient(145deg, #0d8678, #0a5e57); color: #fff; }
.metric-card.featured :is(.metric-label, p, .report-change) { color: rgba(255, 255, 255, .78); }

/* Ortak DataTable bileşeni: büyük listeler sayfayı uzatmak yerine kendi içinde akar. */
.data-table-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
}

.data-table-toolbar {
    display: flex;
    min-height: 58px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    padding: .65rem .75rem;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-soft) 76%, var(--surface));
}

.data-table-search {
    position: relative;
    display: flex;
    min-width: min(100%, 260px);
    flex: 1 1 260px;
    align-items: center;
}

.data-table-search > span {
    position: absolute;
    left: .72rem;
    z-index: 1;
    color: var(--muted);
    pointer-events: none;
}

.data-table-search input { width: 100%; min-height: 36px !important; padding: .45rem .7rem .45rem 2rem !important; font-size: .7rem !important; }
.data-table-tools { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .64rem; }
.data-table-tools label { display: flex; align-items: center; gap: .38rem; margin: 0; color: var(--muted); font-size: .62rem; white-space: nowrap; }
.data-table-tools select { width: auto; min-height: 34px !important; padding: .3rem 1.8rem .3rem .5rem !important; font-size: .66rem !important; }
.data-table-density { min-height: 34px; padding: .35rem .55rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: .62rem; font-weight: 750; }

.data-table-frame {
    max-height: min(62vh, 620px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-color: color-mix(in srgb, var(--brand) 30%, var(--line)) transparent;
    scrollbar-width: thin;
}

.data-table-frame table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; }
.data-table-frame thead { position: sticky; top: 0; z-index: 3; }
.data-table-frame thead th {
    border-bottom: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--surface-soft) 94%, var(--surface));
    box-shadow: 0 1px 0 var(--line);
}

.data-table-frame th,
.data-table-frame td { padding: .72rem .7rem; }
.data-table-frame tbody tr:last-child > * { border-bottom: 0; }
.data-table-frame tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.data-table-frame [data-grid-sort] { display: inline-flex; align-items: center; gap: .35rem; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; font-weight: inherit; text-transform: inherit; }
.data-table-frame [data-grid-sort]::after { color: var(--muted); content: "↕"; font-size: .62rem; opacity: .55; }
.data-table-frame th[aria-sort="ascending"] [data-grid-sort]::after { color: var(--brand); content: "↑"; opacity: 1; }
.data-table-frame th[aria-sort="descending"] [data-grid-sort]::after { color: var(--brand); content: "↓"; opacity: 1; }

.data-table-shell.is-compact .data-table-frame th,
.data-table-shell.is-compact .data-table-frame td { padding-block: .43rem; }
.data-table-shell [hidden] { display: none !important; }

.data-table-empty { padding: 2rem 1rem; color: var(--muted); text-align: center; }
.data-table-footer { display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .75rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .63rem; }
.data-table-pagination { display: flex; gap: .4rem; }
.data-table-pagination button { min-width: 34px; min-height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
.data-table-pagination button:disabled { cursor: default; opacity: .4; }

/* Rapor merkezi */
.report-filter-panel { position: sticky; top: calc(var(--topbar-height) + .65rem); z-index: 8; margin-bottom: 1rem; box-shadow: var(--shadow-md); }
.report-context-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem; margin: .2rem 0 1rem; }
.report-period-caption,
.report-rate-caption { margin: 0; }
.report-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr); gap: .8rem; margin-bottom: .8rem; }
.report-dashboard-grid > .wide { grid-row: span 2; }
.report-chart-wrap { position: relative; min-width: 0; margin-top: .7rem; }
.report-chart { display: block; width: 100%; height: 330px; }
.report-chart.compact { height: 215px; }
.analytics-tooltip {
    position: absolute;
    z-index: 6;
    max-width: 270px;
    padding: .58rem .7rem;
    border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: var(--shadow-md);
    pointer-events: none;
}
.analytics-tooltip strong,
.analytics-tooltip span { display: block; }
.analytics-tooltip strong { font-size: .7rem; }
.analytics-tooltip span { margin-top: .15rem; color: var(--muted); font-size: .6rem; line-height: 1.45; }
.chart-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .42rem; color: var(--muted); font-size: .6rem; }
.chart-legend i { width: 8px; height: 8px; border-radius: 99px; }
.chart-legend .income-dot { background: var(--success); }
.chart-legend .expense-dot { background: var(--danger); }
.report-insight-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin: 0 0 .8rem; }
.report-insight-strip > article { display: flex; min-width: 0; align-items: center; gap: .7rem; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-xs); }
.report-insight-strip i { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand-strong); font-style: normal; font-weight: 850; }
.report-insight-strip span,
.report-insight-strip strong,
.report-insight-strip small { display: block; min-width: 0; }
.report-insight-strip span { color: var(--muted); font-size: .55rem; font-weight: 750; text-transform: uppercase; }
.report-insight-strip strong { margin-top: .1rem; overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.report-insight-strip small { margin-top: .08rem; color: var(--muted); font-size: .55rem; }
.report-table-section { margin-bottom: .8rem; }
.report-table-section .report-monthly-table { min-width: 680px; }
.report-category-dot { display: inline-block; width: 9px; height: 9px; margin-right: .38rem; border-radius: 99px; }
.report-type-badge { display: inline-flex; padding: .25rem .42rem; border-radius: 999px; font-size: .55rem; font-weight: 800; }
.report-type-badge.income { background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); }
.report-type-badge.expense { background: color-mix(in srgb, var(--danger) 11%, var(--surface)); color: var(--danger); }
.report-donut-layout { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: .7rem; align-items: center; }
.report-donut { display: block; width: 170px; height: 170px; }
.report-donut-legend { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.report-donut-legend li { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; gap: .4rem; align-items: center; color: var(--muted); font-size: .58rem; }
.report-donut-legend i { width: 8px; height: 8px; border-radius: 50%; }
.report-donut-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-donut-legend b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Finans merkezi */
.finance-filter { position: relative; margin-bottom: .75rem; border-radius: 14px; }
.finance-visual-grid,
.finance-data-grid { gap: .8rem; }
.finance-chart-panel { overflow: hidden; }
.finance-chart { height: 310px; }
.finance-chart-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .6rem; }
.chart-segmented { display: inline-flex; gap: .18rem; padding: .2rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.chart-segmented button { min-height: 28px; padding: .28rem .5rem; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: .57rem; font-weight: 780; }
.chart-segmented button.active { background: var(--surface); color: var(--brand-strong); box-shadow: var(--shadow-xs); }
.finance-table-frame { max-height: min(64vh, 680px); }
.finance-data-table .finance-table { min-width: 920px; }
.transaction-panel { overflow: hidden; }
.transaction-panel > .data-table-shell { margin-top: .8rem; }

/* Giriş/kayıt ekranları da uygulamadaki yüzey sistemini kullanır. */
.auth-shell { background: radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 28rem), var(--bg); }
.auth-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: var(--shadow-lg); backdrop-filter: blur(18px); }

/* Vitrin son katmanı */
.vitrin-header { background: color-mix(in srgb, var(--surface) 84%, transparent); border-bottom-color: var(--line); backdrop-filter: blur(22px) saturate(145%); }
.vitrin-page .brand-mark { color: #11312d; }
.vitrin-main .vitrin-hero h1 { letter-spacing: -.055em; }

@media (min-width: 1800px) {
    :root { --content-width: 1780px; }
    .main-content { padding-inline: 3rem; }
    .report-chart { height: 370px; }
}

@media (max-width: 1180px) {
    .report-dashboard-grid { grid-template-columns: 1fr 1fr; }
    .report-dashboard-grid > .wide { grid-column: 1 / -1; grid-row: auto; }
    .report-filter-panel { position: relative; top: auto; }
}

@media (max-width: 980px) {
    .sidebar { width: min(310px, calc(100vw - 42px)); }
    .app-stage { margin-left: 0; }
    .sidebar-collapse { display: none; }
    .main-content { padding: 1rem; }
    .page-heading { align-items: flex-start; }
    .page-heading h1 { font-size: clamp(1.5rem, 6vw, 2.1rem); }
}

@media (max-width: 760px) {
    .topbar { padding-inline: .8rem; }
    .workspace-switcher small { display: none; }
    .workspace-switcher strong { max-width: 150px; }
    .report-dashboard-grid,
    .report-insight-strip { grid-template-columns: 1fr; }
    .report-dashboard-grid > .wide { grid-column: auto; }
    .report-donut-layout { grid-template-columns: 1fr; justify-items: center; }
    .report-donut-legend { width: 100%; }
    .report-chart { height: 280px; }
    .data-table-toolbar { align-items: stretch; }
    .data-table-tools { width: 100%; justify-content: space-between; }
    .data-table-frame { max-height: 68vh; }
    .page-actions { width: 100%; }
}

@media (max-width: 520px) {
    .main-content { padding: .8rem; }
    .panel { padding: .85rem; }
    .topbar-search-label,
    .topbar-search kbd,
    .workspace-avatar,
    .user-copy { display: none; }
    .report-custom-range > div,
    .report-custom-range > button { width: 100%; }
    .report-custom-range input,
    .report-custom-range select { width: 100%; }
    .data-table-footer { align-items: flex-start; flex-direction: column; }
    .finance-chart { height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .app-stage,
    .nav-item,
    .nav-more summary,
    .nav-more > div a { transition: none; }
}
