:root {
    --bg-main: #0c1220;
    --sidebar-bg: #101826;
    --card-bg: #172033;
    --card-border: rgba(148, 163, 184, 0.14);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --accent-2: #34d399;
}

* { box-sizing: border-box; }

body {
    background: var(--bg-main);
    color: var(--text-primary);
    font-family: "Segoe UI", "Plus Jakarta Sans", sans-serif;
    font-size: 0.86rem;
    min-height: 100vh;
    margin: 0;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

.sidebar {
    width: 188px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 40;
}

.sidebar-brand { padding: 14px 12px 12px; border-bottom: 1px solid var(--card-border); }
.brand-mark {
    width: 32px; height: 32px; border-radius: 9px;
    background: #0ea5e9; color: #fff;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
    font-size: 0.85rem;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; background: #0b1220; }
.brand-text { min-width: 0; }
.brand-title { font-size: 0.78rem; line-height: 1.2; word-break: break-word; }
.brand-sub { font-size: 0.62rem; display: block; }

.app-footer {
    text-align: center;
    font-size: 0.68rem;
    color: var(--text-secondary);
    padding: 12px 16px 16px;
    margin-top: auto;
    border-top: 1px solid var(--card-border);
    line-height: 1.4;
}
.app-footer strong { color: #cbd5e1; font-weight: 600; }
.brand-preview {
    width: 48px; height: 48px; border-radius: 10px; overflow: hidden;
    background: #0f172a; border: 1px solid var(--card-border);
    display: flex; align-items: center; justify-content: center;
}
.brand-preview img { width: 100%; height: 100%; object-fit: contain; }

.nav-menu { list-style: none; margin: 0; padding: 10px 8px; flex: 1; }
.nav-link-custom {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; color: var(--text-secondary);
    border-radius: 10px; text-decoration: none; font-weight: 600; margin-bottom: 3px;
    font-size: 0.78rem;
}
.nav-link-custom i { width: 16px; text-align: center; font-size: 0.9rem; }
.nav-link-custom:hover, .nav-link-custom.active {
    background: rgba(14, 165, 233, 0.14);
    color: #7dd3fc;
}

.main-wrapper {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.main-wrapper > .navbar-custom { flex-shrink: 0; }
.main-wrapper > .container-fluid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}
.main-wrapper > .container-fluid.layout-compact {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.main-wrapper > .container-fluid.layout-compact > .app-footer {
    flex-shrink: 0;
}
#filterBar {
    flex-shrink: 0;
}
#moduleContentArea {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
#moduleContentArea > .module-report-view {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
}
.navbar-custom {
    background: rgba(16, 24, 38, 0.92);
    border-bottom: 1px solid var(--card-border);
    padding: 7px 12px;
    position: sticky; top: 0; z-index: 20;
}
.user-chip {
    background: #0f172a; border: 1px solid var(--card-border);
    border-radius: 999px; padding: 6px 12px; color: #e2e8f0;
    max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.card-compact, .kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
}
.card-compact { padding: 10px 12px; }
.kpi-card { padding: 9px 11px; height: 100%; }
.kpi-title { font-size: 0.68rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px; }
.kpi-value { font-size: 1.15rem; font-weight: 700; margin-top: 4px; word-break: keep-all; overflow-wrap: normal; white-space: nowrap; }

.form-control-sm-custom, .form-select-sm-custom {
    background: #0f172a; border: 1px solid var(--card-border); color: var(--text-primary);
    border-radius: 8px; font-size: 0.8rem;
}
.form-control-sm-custom:focus, .form-select-sm-custom:focus {
    background: #0f172a; color: var(--text-primary); border-color: var(--accent); box-shadow: none;
}

.table-compact {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    font-size: 0.74rem;
    margin-bottom: 0;
}
.table-compact > :not(caption) > * > * {
    padding: 0.2rem 0.34rem;
}
.table-compact th {
    color: var(--text-secondary);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--card-border);
    padding: 0.22rem 0.34rem;
    white-space: nowrap;
    vertical-align: bottom;
    line-height: 1.12;
}
.table-compact td {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    padding: 0.18rem 0.34rem;
    vertical-align: middle;
    line-height: 1.15;
}
.table-compact td.text-end,
.table-compact th.text-end {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.table-compact .col-narrow { width: 1%; white-space: nowrap; }
.table-compact .col-code {
    max-width: 7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.table-compact .col-wrap {
    max-width: 9.5rem;
    white-space: normal;
    word-break: break-word;
    font-size: 0.7rem;
    line-height: 1.2;
}
.table-compact .col-num { font-size: 0.72rem; }

.chart-container { position: relative; width: 100%; height: 220px; }
.currency-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.currency-pill {
    background: rgba(255,255,255,0.05); border: 1px solid var(--card-border);
    border-radius: 6px; padding: 2px 6px; font-size: 0.68rem; font-weight: 600;
}

.sidebar-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(2, 6, 23, 0.55); z-index: 35;
}
.btn-menu {
    display: none; border: 1px solid var(--card-border); background: #0f172a; color: #fff;
    width: 38px; height: 38px; border-radius: 10px;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0;
        transform: translateX(-105%); transition: transform 0.2s ease;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop.show { display: block; }
    .btn-menu { display: inline-flex; align-items: center; justify-content: center; }
    .kpi-value { font-size: 1.02rem; }
    .chart-container { height: 200px; }
    .user-chip { max-width: 140px; font-size: 0.72rem; padding: 5px 8px; }
}

.mod-check {
    display: flex; align-items: center; gap: 8px;
    background: #0f172a; border: 1px solid var(--card-border);
    border-radius: 8px; padding: 8px 10px; color: #cbd5e1;
}

.hint { color: var(--text-secondary); font-size: 0.75rem; line-height: 1.35; margin: 4px 0 0; }
.kpi-help { color: #64748b; font-size: 0.68rem; margin-top: 4px; line-height: 1.3; }
.empty-state {
    text-align: center; padding: 28px 16px; color: var(--text-secondary);
    border: 1px dashed var(--card-border); border-radius: 12px; background: rgba(15, 23, 42, 0.4);
}

.kpi-click { cursor: pointer; transition: border-color .15s, transform .15s; }
.kpi-click:hover { border-color: var(--accent); transform: translateY(-1px); }
.row-click { cursor: pointer; }
.row-click:hover td { background: rgba(56, 189, 248, 0.08); }
.period-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    border: 1px solid var(--card-border); background: #0f172a; color: var(--text-secondary);
    border-radius: 999px; padding: 4px 10px; font-size: 0.72rem; font-weight: 600;
}
.chip:hover, .chip.active { border-color: var(--accent); color: var(--accent); }
.theme-select { width: auto; max-width: 150px; padding: 4px 8px; }
.theme-draggable { cursor: grab; position: relative; }
.theme-draggable:active { cursor: grabbing; }
.theme-dragging { opacity: 0.55; }
.theme-drop-target { outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: 12px; }
.theme-drag-handle {
  position: absolute; top: 8px; right: 8px; color: #94a3b8; font-size: 12px; z-index: 2;
  padding: 2px 4px; border-radius: 4px; background: rgba(148,163,184,.15);
}
.theme-layout-toolbar {
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--card-border);
  background: rgba(15,23,42,.2);
}
html[data-theme="pro"] .theme-layout-toolbar { background: #f1f5f9; }
.theme-edit-row { padding: 8px; border: 1px solid var(--card-border); border-radius: 10px; background: rgba(15,23,42,.25); }
html[data-theme="pro"] .theme-edit-row { background: #f8fafc; }

.kod-aciklama-panel,
#kodAciklamaPanel {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.kod-aciklama-baslik {
  display: none !important;
}
.kod-aciklama-id {
  display: none !important;
}
.kod-aciklama-govde p { margin: 0 0 8px; }
.kod-aciklama-govde strong { color: #94a3b8; font-size: 10px; text-transform: uppercase; }
html[data-theme="pro"] .kod-aciklama-panel {
  display: none !important;
}
html[data-theme="pro"] .kod-aciklama-id { display: none !important; }
.delta-up { color: #34d399; }
.delta-down { color: #f87171; }

.drill-overlay {
    position: fixed; inset: 0; background: rgba(2, 6, 23, 0.55);
    z-index: 2000; display: none; justify-content: flex-end;
    align-items: stretch;
    padding: 0;
}
.drill-overlay.is-open { display: flex !important; }
.drill-panel {
    width: min(68vw, 1180px);
    max-width: 100vw;
    height: 100%;
    max-height: 100vh;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-right: 0;
    border-radius: 14px 0 0 14px;
    display: flex;
    flex-direction: column;
    box-shadow: -16px 0 50px rgba(0, 0, 0, 0.45);
}
.drill-head {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--card-border);
    flex-shrink: 0;
}
.drill-head h6 { font-size: 0.86rem; line-height: 1.25; }
.drill-body {
    overflow: auto;
    padding: 8px 10px 12px;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}
.drill-body .table-compact { font-size: 0.7rem; }
.drill-body .table-compact th { font-size: 0.58rem; }

/* Rapor / liste alanları */
.report-table-shell {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}
.report-table-shell.card-compact {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}
.report-scroll {
    width: 100%;
    max-width: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: rgba(15, 23, 42, 0.35);
    max-height: min(48vh, 520px);
}
.report-hscroll-top {
    flex-shrink: 0;
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    height: 16px;
    max-height: 18px;
    min-height: 14px;
    margin-bottom: 6px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 6px;
    border: 1px solid var(--card-border);
}
.report-hscroll-top-inner {
    height: 1px;
    display: block;
}
#moduleContentArea .report-table-shell {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    max-height: min(calc(100vh - 13rem), 86vh);
    overflow: hidden;
}
#moduleContentArea .report-table-shell > :not(.report-scroll):not(.report-hscroll-top) {
    flex-shrink: 0;
}
#moduleContentArea .report-table-shell .report-scroll,
#drillBody .report-table-shell .report-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
}
.report-scroll .table-compact thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--card-bg);
    box-shadow: 0 1px 0 var(--card-border);
}
#moduleContentArea .table-responsive,
#drillBody .table-responsive,
#moduleContentArea .report-scroll,
#drillBody .report-scroll {
    margin: 0;
    width: 100%;
    max-width: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: rgba(15, 23, 42, 0.35);
}
#drillBody .report-scroll,
#drillBody .table-responsive.report-scroll {
    max-height: min(calc(100vh - 10.5rem), 80vh);
}
#drillBody .report-table-shell {
    display: flex;
    flex-direction: column;
    max-height: min(calc(100vh - 10.5rem), 82vh);
    min-height: 12rem;
    overflow: hidden;
}
#drillBody .report-table-shell > :not(.report-scroll):not(.report-hscroll-top) {
    flex-shrink: 0;
}
#drillBody .report-table-shell .report-scroll {
    flex: 1 1 auto;
    min-height: 8rem;
    max-height: none;
}
#moduleContentArea .table-responsive > .table-compact,
#moduleContentArea .report-scroll > .table-compact {
    width: max-content;
    min-width: 100%;
}
#drillBody .table-responsive > .table-compact:not(.drill-detail-table),
#drillBody .report-scroll > .table-compact:not(.drill-detail-table) {
    width: max-content;
    min-width: 100%;
}
.table-col-resize.drill-detail-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}
.table-col-resize.drill-detail-table th,
.table-col-resize.drill-detail-table td {
    overflow: visible;
    text-overflow: clip;
    vertical-align: top;
}
.table-col-resize .col-wrap,
.table-col-resize .col-code {
    max-width: none !important;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.28;
}
.table-col-resize th.col-wrap,
.table-col-resize th.col-code {
    white-space: normal;
    vertical-align: bottom;
}
.table-col-resize thead th {
    position: sticky;
    top: 0;
    z-index: 6;
    overflow: visible;
    vertical-align: top;
    background: var(--card-bg);
    box-shadow: 0 1px 0 var(--card-border);
}
.table-col-resize .col-resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 7px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 12;
    touch-action: none;
}
.table-col-resize .col-resize-handle:hover,
.table-col-resize .col-resize-handle.active {
    background: rgba(56, 189, 248, 0.45);
}
body.col-resize-active {
    cursor: col-resize !important;
    user-select: none !important;
}
.table-col-resize tbody td.col-sticky {
    position: sticky;
    z-index: 3;
    background: var(--card-bg);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.08);
}
.table-col-resize thead th.col-sticky {
    position: sticky;
    top: 0;
    z-index: 14;
    background: var(--card-bg);
    box-shadow: 1px 0 0 var(--card-border), 0 1px 0 var(--card-border);
}
.table-col-resize tbody tr:hover td.col-sticky,
.table-col-resize tbody tr.row-click:hover td.col-sticky {
    background: rgba(56, 189, 248, 0.08);
}
.table-col-resize .col-num {
    min-width: 4.5rem;
}
#moduleContentArea .report-scroll > .table-col-resize,
#drillBody .report-scroll > .table-col-resize {
    width: auto;
    min-width: 0;
    max-width: none;
    table-layout: fixed;
}
html[data-theme="pro"] .table-col-resize .col-sticky,
html[data-theme="pro"] .table-col-resize thead th.col-sticky,
html[data-theme="pro"] .table-col-resize tbody td.col-sticky {
    background: #fff;
}
html[data-theme="pro"] .table-col-resize tbody tr:hover td.col-sticky {
    background: #eff6ff;
}
html[data-theme="light"] .table-col-resize .col-sticky,
html[data-theme="light"] .table-col-resize thead th.col-sticky,
html[data-theme="light"] .table-col-resize tbody td.col-sticky {
    background: #fff;
}
html[data-theme="light"] .table-col-resize tbody tr:hover td.col-sticky {
    background: #f0f9ff;
}
@media (max-width: 991.98px) {
    .drill-panel {
        width: min(92vw, 100%);
        border-radius: 12px 0 0 12px;
    }
}
#moduleContentArea .table-responsive .table-compact thead th,
#drillBody .table-responsive .table-compact thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--card-bg);
    box-shadow: 0 1px 0 var(--card-border);
}
html[data-theme="pro"] #moduleContentArea .table-responsive,
html[data-theme="pro"] #drillBody .table-responsive {
    background: #fff;
}
html[data-theme="pro"] .table-responsive .table-compact thead th { background: #fff; }
#moduleContentArea > .d-flex { margin-bottom: 0.35rem !important; gap: 0.4rem; }
#moduleContentArea > .d-flex h6 { font-size: 0.92rem; }
#moduleContentArea .card-compact.mb-2.p-2 {
    padding: 0.45rem 0.55rem !important;
    margin-bottom: 0.35rem !important;
}
#moduleContentArea .row.g-2 { --bs-gutter-y: 0.35rem; --bs-gutter-x: 0.35rem; }
#moduleContentArea .kpi-title { margin-bottom: 0.15rem; }

#moduleContentArea,
#drillBody {
    max-width: 100%;
    overflow-x: visible;
}
/* Liste: üst araç çubuğu sabit, sadece tablo gövdesi kayar */
.module-report-view {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    min-height: 180px;
    max-height: min(calc(100dvh - 8.5rem), calc(100vh - 8.5rem), 960px);
}
#moduleContentArea .module-report-view .report-table-shell {
    max-height: none;
    min-height: 0;
}
.module-report-view > .d-flex,
.module-report-view > .muhasebe-filter-bar,
.module-report-view > .text-secondary,
.module-report-view > .hint {
    flex-shrink: 0;
}
.module-report-view .report-table-shell {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
}
.module-report-view .report-scroll,
.module-report-view .report-split-body {
    flex: 1 1 auto;
    min-height: 14rem;
    max-height: none;
    overflow: auto;
    touch-action: pan-x pan-y;
}
.muhasebe-filter-bar {
    position: relative;
    z-index: 4;
    flex-shrink: 0;
}
/* Mizan / Hesap planı: başlık+filtre sabit, sadece gövde kayar */
.report-split-scroll {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    overflow: visible;
}
.report-split-scroll .report-split-head {
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--card-border);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background: var(--card-bg);
    z-index: 5;
    padding-right: var(--split-vscroll-gutter, 0px);
    box-sizing: border-box;
}
.report-split-scroll .report-split-head-scroll {
    overflow: hidden;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    box-sizing: border-box;
}
.report-split-scroll .report-split-head-scroll::-webkit-scrollbar {
    display: none;
    height: 0;
}
.report-split-scroll .report-split-head table {
    margin-bottom: 0;
}
.report-split-scroll .report-split-head thead th {
    position: static;
    top: auto;
    left: auto;
    box-shadow: none;
}
.report-split-scroll .report-split-body {
    flex: 1 1 auto;
    min-height: 10rem;
    border-radius: 0 0 10px 10px;
    border-top: 1px solid var(--card-border);
    max-height: none;
    overflow: auto;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}
.report-split-scroll .report-split-hscroll-top {
    flex-shrink: 0;
    border-radius: 0;
    margin-bottom: 4px;
    border: none;
    border-left: 1px solid var(--card-border);
    border-right: 1px solid var(--card-border);
}
.report-split-scroll .report-split-body thead {
    display: none;
}
#moduleContentArea .report-table-shell.report-split-scroll {
    overflow: visible;
}
#muhasebeReportHeadTable,
#muhasebeReportBodyTable {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}
#muhasebeReportHeadTable thead th {
    white-space: normal;
    box-sizing: border-box;
    vertical-align: top;
}
.report-split-scroll #muhasebeReportHeadTable .report-th-label {
    display: block;
    white-space: normal;
    word-break: break-word;
}
#muhasebeReportBodyTable tbody td {
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}
.report-split-scroll .report-split-body {
    scrollbar-gutter: stable;
}
.report-scroll .table-compact {
    border-collapse: separate;
    border-spacing: 0;
}
#drillBody.drill-has-report {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#drillBody.drill-has-report > .report-table-shell,
#drillBody.drill-has-report > div > .report-table-shell {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
#drillBody.drill-has-report .report-scroll {
    flex: 1 1 auto;
    min-height: 8rem;
    touch-action: pan-x pan-y;
}
#moduleContentArea .card-compact,
#drillBody .card-compact {
    padding: 0.5rem 0.6rem;
}
#moduleContentArea .card-compact.table-responsive,
#drillBody .card-compact.table-responsive {
    padding: 0.45rem 0.5rem;
}
#moduleContentArea .card-compact h6.fw-bold,
#drillBody .card-compact h6.fw-bold {
    font-size: 0.86rem;
    line-height: 1.25;
    margin-bottom: 0.35rem !important;
}
#moduleContentArea .card-compact.mb-3,
#drillBody .card-compact.mb-3 { margin-bottom: 0.45rem !important; }
#moduleContentArea .text-secondary.small,
#drillBody .text-secondary.small { margin-bottom: 0.35rem !important; }
#moduleContentArea .muhasebe-filter-bar .kpi-title,
#moduleContentArea .card-compact .kpi-title { margin-bottom: 0.12rem; }

.report-th-label {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    font-size: 0.58rem;
    line-height: 1.15;
    margin-bottom: 2px;
}
.report-th-filter-row {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    margin-top: 0.12rem;
}
.report-th-filter-row .report-col-filter {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    max-width: none !important;
    margin-top: 0 !important;
}
.report-th-filter-row .report-sort-grp {
    flex-shrink: 0;
    display: inline-flex;
    gap: 2px;
    align-items: center;
}
.report-sort-grp { display: inline-flex; gap: 2px; }
.report-sort-btn {
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 0.58rem;
    line-height: 1;
    padding: 1px 4px;
    cursor: pointer;
}
.report-sort-btn.active,
.report-sort-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.report-col-filter {
    font-size: 0.65rem !important;
    padding: 0.15rem 0.3rem !important;
    min-height: 1.4rem;
}
#muhasebeReportHeadTable thead th,
.report-scroll .table-col-resize thead th {
    vertical-align: top;
    padding-bottom: 0.35rem;
    background: var(--card-bg) !important;
    background-clip: padding-box;
}
#muhasebeReportHeadTable thead tr {
    box-shadow: 0 1px 0 var(--card-border);
}
#muhasebeReportHeadTable thead th .report-col-filter {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
#moduleContentArea .card-compact .hint,
#drillBody .card-compact .hint,
#moduleContentArea .hint.mb-2 { margin-bottom: 0.35rem !important; font-size: 0.76rem; line-height: 1.3; }
#moduleContentArea .row.g-2.mb-3,
#moduleContentArea .row.g-3.mb-3 { margin-bottom: 0.65rem !important; }

.row-click td { min-height: 28px; }
#moduleContentArea .row.g-2 {
    --bs-gutter-y: 0.28rem;
    --bs-gutter-x: 0.32rem;
}
.row-click:active td { background: rgba(56, 189, 248, 0.12); }

@media (max-width: 991.98px) {
    .drill-panel { width: min(100vw, 100%); }
    .table-compact { font-size: 0.72rem; }
    .table-compact .col-wrap { max-width: 7.5rem; }
    .container-fluid.px-3 { padding-left: 0.65rem !important; padding-right: 0.65rem !important; }
    .module-report-view {
        max-height: min(calc(100dvh - 11rem), calc(100vh - 11rem));
    }
    .module-report-view .report-scroll {
        min-height: 14rem;
    }
    .report-sort-btn {
        min-width: 2.1rem;
        min-height: 2.1rem;
        padding: 0.35rem 0.45rem;
        font-size: 0.72rem;
    }
    .report-col-filter {
        min-height: 2.75rem !important;
        padding: 0.45rem 0.5rem !important;
        font-size: 1rem !important;
    }
    .table-col-resize .col-resize-handle {
        width: 14px;
    }
    .period-chips .chip,
    .btn-sm, .form-select-sm-custom, .form-control-sm-custom {
        min-height: 2.75rem;
    }
    #filterBar .btn {
        min-height: 2.85rem;
        font-size: 0.95rem;
    }
}
@media (max-width: 575.98px) {
    .drill-overlay.is-open { align-items: flex-end; }
    .drill-panel {
        width: 100%;
        height: min(92vh, 100%);
        max-height: 92vh;
        border-left: 0;
        border-top: 1px solid var(--card-border);
        border-radius: 14px 14px 0 0;
    }
    .drill-head { padding: 10px 12px; }
    .drill-head .btn { min-height: 2.75rem; padding: 0.45rem 0.75rem; }
    .drill-body { padding: 8px 8px 14px; }
    .table-compact > :not(caption) > * > * { padding: 0.38rem 0.4rem; }
    .row-click td { min-height: 44px; }
    .module-report-view {
        max-height: min(calc(100dvh - 12rem), 90vh);
    }
    .btn-close-drill { width: 44px; height: 44px; }
}
.btn-close-drill {
    border: 0; background: transparent; color: var(--text-primary);
    font-size: 1.4rem; line-height: 1; width: 36px; height: 36px;
}

/* Kompakt yerlesim: ust alan dar, rapor gorunurlugu yuksek */
.layout-compact.filter-form-compact .kpi-title,
#filterBar .kpi-title {
    margin-bottom: 0.1rem;
    font-size: 0.62rem;
    line-height: 1.1;
}
#filterBar.filter-bar-compact {
    padding: 0.4rem 0.55rem;
    margin-bottom: 0.4rem !important;
    border-radius: 10px;
}
#filterBar .period-chips {
    gap: 4px;
    margin-bottom: 0.3rem !important;
}
#filterBar .chip {
    padding: 2px 7px;
    font-size: 0.67rem;
    line-height: 1.35;
}
#filterBar.filter-form-compact,
#filterBar .filter-form-compact {
    --bs-gutter-y: 0.22rem;
    --bs-gutter-x: 0.38rem;
}
#filterBar .form-control-sm-custom,
#filterBar .form-select-sm-custom,
#filterBar .input-group-sm > .form-control {
    padding: 0.14rem 0.34rem;
    font-size: 0.71rem;
    min-height: 1.62rem;
    line-height: 1.2;
}
#filterBar .btn-sm {
    padding: 0.16rem 0.4rem;
    min-height: 1.62rem;
    font-size: 0.71rem;
}
.module-report-view .report-page-toolbar {
    gap: 0.45rem;
    margin-bottom: 0.1rem !important;
    padding: 0.1rem 0;
    min-height: 0;
}
.module-report-view .report-page-toolbar h6 {
    font-size: 0.86rem;
    line-height: 1.2;
}
.module-report-view .report-page-toolbar .btn-sm {
    padding: 0.18rem 0.42rem;
    font-size: 0.71rem;
    line-height: 1.2;
}
.muhasebe-filter-bar.filter-inline-compact {
    padding: 0.32rem 0.42rem !important;
    margin-bottom: 0.2rem !important;
    border-radius: 9px;
}
.muhasebe-filter-bar.filter-inline-compact .row {
    --bs-gutter-y: 0.18rem;
    --bs-gutter-x: 0.32rem;
}
.muhasebe-filter-bar .kpi-title {
    margin-bottom: 0.06rem !important;
}
.muhasebe-filter-bar .form-control-sm-custom,
.muhasebe-filter-bar .form-select-sm-custom {
    min-height: 1.55rem;
    padding: 0.12rem 0.32rem;
    font-size: 0.69rem;
}
.muhasebe-filter-bar .btn {
    min-height: 1.55rem;
    padding: 0.14rem 0.38rem;
    font-size: 0.69rem;
}
#muhasebeReportSubtitle {
    margin-bottom: 0.12rem !important;
    font-size: 0.7rem;
    line-height: 1.2;
}
.report-split-scroll #muhasebeReportHeadTable thead th {
    min-height: 3.1rem;
    padding: 0.24rem 0.36rem 0.28rem;
}
.report-split-scroll #muhasebeReportHeadTable .report-th-label {
    min-height: 0.95rem;
    margin-bottom: 0.06rem;
    font-size: 0.55rem;
}
#muhasebeReportHeadTable .report-col-filter {
    min-height: 1.22rem !important;
    padding: 0.08rem 0.24rem !important;
    font-size: 0.61rem !important;
}
#muhasebeReportHeadTable .report-sort-btn {
    min-width: 1.05rem;
    min-height: 1.05rem;
    padding: 0 2px;
    font-size: 0.52rem;
}
.app-footer {
    padding: 6px 10px 8px;
    font-size: 0.62rem;
}
#licenseBanner.mb-2 {
    font-size: 0.78rem;
}


