/* Ellinor Insights – app styles. Colours: ink #2B2A28, muted #6F6B64, line #E6E2DA, accent #2F4A5A */
:root {
    --ink: #2B2A28; --muted: #6F6B64; --line: #E6E2DA; --bg: #F7F5F1; --card: #fff;
    --accent: #2F4A5A; --accent-soft: #E8EDEF; --good: #3F6E50; --bad: #A8452F; --warn: #A7712A;
    --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; font-family: "Segoe UI", Inter, system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 14px; }
a { color: #253C4A; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 0 0 12px; }
h3 { font-size: 13px; margin: 12px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 20px; }
.right { justify-content: flex-end; }
.bad { color: var(--bad); }

/* ---------- layout ---------- */
.topbar { height: 56px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 16px; position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--ink); }
.brand.big { font-size: 22px; color: #fff; }
.logo { background: var(--accent); color: #fff; border-radius: 6px; padding: 2px 6px; font-size: 12px; letter-spacing: -2px; }
.spacer { flex: 1; }
.who { color: var(--muted); font-size: 13px; }
.shell { display: flex; min-height: calc(100vh - 56px); }
.sidebar { width: 220px; flex: none; background: #fff; border-right: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar a { padding: 9px 12px; border-radius: 8px; color: #4A4740; }
.sidebar a:hover { background: #EFEBE4; text-decoration: none; }
.sidebar a.active { background: var(--accent-soft); color: #253C4A; font-weight: 600; }
.nav-section { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; padding: 16px 12px 6px; }
.content { flex: 1; min-width: 0; }
.menu-btn { display: none; }
.page { padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; max-width: 1600px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.split { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.split > * { flex: 1 1 340px; min-width: 0; }
.split.wide-left > :first-child { flex: 3 1 640px; }
.split.wide-left > :last-child { flex: 1 1 300px; max-width: 380px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.three-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

/* ---------- elements ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid #DCD6CC; background: #fff; border-radius: 8px;
       font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { background: #F2EFE9; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.small { height: 30px; padding: 0 10px; font-size: 12px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #253C4A; }
.btn.excel { background: var(--good); border-color: var(--good); color: #fff; }
.btn.wide { width: 100%; height: 44px; }
.icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 14px; padding: 4px 6px; border-radius: 6px; color: var(--muted); }
.icon-btn:hover { background: #EFEBE4; }
.icon-btn.danger:hover { color: var(--bad); }
.input { height: 36px; border: 1px solid #D3CCC0; border-radius: 8px; padding: 0 10px; font: inherit; color: var(--ink); background: #fff; width: 100%; min-width: 0; }
textarea.input { height: auto; padding: 8px 10px; }
.input.code { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; line-height: 1.5; }
.input.narrow { width: 80px; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #4A4740; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; color: var(--ink); }
label.check.indent { padding-left: 26px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.hint code, p code { background: #F0EDE7; padding: 1px 4px; border-radius: 4px; font-size: 12px; }
.alert { padding: 10px 14px; border-radius: 8px; background: #F7E9E4; color: #7A2E1E; border: 1px solid #E8C6BC; }
.alert.warn { background: #F8F0E1; color: #6B4A1C; border-color: #E6D3B0; }
.alert.ok { background: #E7EFE8; color: #2F5540; border-color: #C9DBCC; }
.alert.small { font-size: 12px; padding: 6px 10px; }
.loading { color: var(--muted); padding: 8px 0; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-3 { grid-column: 1 / -1; }
.inline-form { flex-direction: row; flex-wrap: wrap; align-items: center; }
.inline-form .input { width: auto; flex: 1 1 160px; }
.inline-row { display: flex; gap: 6px; align-items: center; }
.chip { border: 1px solid #DCD6CC; background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12px; cursor: pointer; color: var(--ink); }
.chip.on { background: var(--accent-soft); border-color: #A3B4BF; color: #253C4A; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.colorbox { display: inline-flex; gap: 4px; align-items: center; }
.colorbox input[type=color] { width: 30px; height: 30px; border: 1px solid #D3CCC0; border-radius: 6px; padding: 0; background: none; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: #4A4740; background: #FAF8F4; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid #EFEBE4; vertical-align: middle; }
.tbl.edit td { padding: 4px 6px; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #F2EFE9; }
.tbl tr.sel td { background: var(--accent-soft); }
.tbl tr.bad td { color: var(--bad); }
.small-table { max-height: 320px; overflow: auto; }
.clip { max-width: 520px; max-height: 60px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- home tree ---------- */
.tree details { margin-left: 0; }
.tree details details { margin-left: 16px; }
.tree summary { cursor: pointer; padding: 8px 10px; border-radius: 6px; font-weight: 600; display: flex; justify-content: space-between; }
.tree summary:hover { background: #EFEBE4; }
.cnt { font-size: 12px; font-weight: 500; color: var(--muted); }
.tree-item { display: block; padding: 7px 10px 7px 26px; border-radius: 6px; color: #4A4740; }
.tree-item:hover { background: #EFEBE4; text-decoration: none; }
.tree-item.sel { background: var(--accent-soft); color: #253C4A; font-weight: 600; }
.kind { color: var(--muted); margin-right: 4px; }
.details h2 { font-size: 18px; margin: 0; }

/* ---------- report viewer ---------- */
.param.run { flex: 0 0 auto; }
.param-check { align-self: center; }
.req { color: var(--bad); }
.result { padding: 0; gap: 0; }
.tabs { display: flex; gap: 4px; align-items: center; border-bottom: 1px solid var(--line); padding: 0 12px; flex-wrap: wrap; }
.tab { border: 0; background: none; padding: 12px; font: inherit; color: #4A4740; cursor: pointer; border-bottom: 2px solid transparent; }
.tab.on { color: #253C4A; font-weight: 600; border-bottom-color: var(--accent); }
.tabs .info { margin-left: auto; }
.grid-tools, .chart-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.chart-tools .input { width: auto; }
.chart-tools label { flex-direction: row; align-items: center; }
.cell.num { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.cell .val, .cell a, .cell .icon { position: relative; z-index: 1; }
.tip { padding: 6px 8px; }
.inline-form { gap: 8px; }

/* ---------- mobile cards ---------- */
.totals-card { background: #2F4A5A; color: #fff; border-radius: var(--radius); padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.totals-card span { display: block; font-size: 12px; color: #D7DEE2; }
.totals-card b { font-size: 18px; }
.cards { display: flex; flex-direction: column; gap: 10px; }
.row-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kv span { display: block; font-size: 11px; color: var(--muted); }
.kv b { font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- dashboards ---------- */
.cross-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.span-1 { grid-column: span 1; } .span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; } .span-10 { grid-column: span 10; } .span-11 { grid-column: span 11; } .span-12 { grid-column: span 12; }
.tile-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.kpi { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.barlist { display: flex; flex-direction: column; gap: 6px; }
.barlist-row { display: grid; grid-template-columns: minmax(80px, 160px) 1fr 80px; gap: 10px; align-items: center; border: 0; background: none; padding: 4px; border-radius: 6px; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.barlist-row:hover { background: #F2EFE9; }
.barlist-row .track { height: 12px; background: #F0EDE7; border-radius: 3px; overflow: hidden; }
.barlist-row .fill { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.barlist-row .v { text-align: right; font-variant-numeric: tabular-nums; }
.barlist-row.dim .fill { background: #CBD5DB; }
.barlist-row.dim .lbl { color: var(--muted); }
.barlist-row.sel { font-weight: 700; }
.barlist-row.sel .fill { outline: 2px solid #1B2D38; outline-offset: 1px; }

/* ---------- admin ---------- */
.list { gap: 4px; }
.list-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 8px; font: inherit; cursor: pointer; color: var(--ink); }
.list-item:hover { background: #EFEBE4; }
.list-item.sel { background: var(--accent-soft); }
.scope summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 4px 0; }
.version { border-top: 1px solid #EFEBE4; padding-top: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.query-box, .filter-box { border: 1px solid #EFEBE4; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.days { display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* ---------- ask ai ---------- */
.ask { max-width: 1100px; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; }
.q { align-self: flex-end; background: var(--accent); color: #fff; padding: 10px 14px; border-radius: 14px 14px 2px 14px; max-width: 80%; }
.answer { margin: 0; font-size: 15px; line-height: 1.5; }
.row-actions { display: flex; justify-content: space-between; align-items: center; }
.sql pre { background: #2B2A28; color: #EDE9E2; padding: 12px; border-radius: 8px; overflow-x: auto; font-size: 12px; }
.ask-box { position: sticky; bottom: 0; display: flex; gap: 8px; background: var(--bg); padding: 12px 0; }
.ask-box .input { height: 44px; font-size: 15px; }

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login-side { flex: 1 1 420px; background: #2F4A5A; color: #fff; padding: 56px; display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.login-side h1 { font-size: 36px; line-height: 1.15; }
.login-side p { color: #D7DEE2; font-size: 16px; }
.login-form-wrap { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.login-card { width: 100%; max-width: 380px; padding: 32px; gap: 14px; }
.login-card input:not([type=checkbox]) { height: 44px; border: 1px solid #D3CCC0; border-radius: 8px; padding: 0 12px; font: inherit; }

/* ---------- phones ---------- */
@media (max-width: 900px) {
    .three-cols, .form-grid { grid-template-columns: 1fr; }
    .tiles { grid-template-columns: 1fr; }
    .tiles .tile { grid-column: auto; }
}
@media (max-width: 768px) {
    .menu-btn { display: inline-block; font-size: 20px; }
    .who { display: none; }
    .sidebar { display: none; position: fixed; top: 56px; left: 0; bottom: 0; z-index: 20; box-shadow: 4px 0 24px rgba(0,0,0,.15); }
    .sidebar.open { display: flex; }
    .page { padding: 14px; }
    .param { max-width: none; flex: 1 1 140px; }
    .login-side { padding: 28px; flex-basis: 100%; }
    .login-side h1 { font-size: 26px; }
    .split.wide-left > :last-child { max-width: none; }
}


/* =====================================================================
   Polish (v2): consistent sizes, professional grid, better phone layout
   ===================================================================== */
:root { --ctl-h: 34px; --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif; }
html, body { font-family: var(--font); font-size: 13.5px; -webkit-font-smoothing: antialiased; }
.dxbl-grid, .dxbl-text-edit, .dxbl-tag-box, .dxbl-pivot-table, .dxbl-pager, .dxbl-chart { font-family: var(--font) !important; }

/* top bar + menu */
.topbar { height: 52px; box-shadow: 0 1px 0 rgba(16,24,40,.04); }
.sidebar { width: 210px; padding: 14px 10px; }
.sidebar a { font-size: 13.5px; padding: 8px 12px; }
.page { padding: 20px 24px; gap: 14px; }
.page-head h1 { font-size: 21px; font-weight: 650; letter-spacing: -.2px; }
.card { border-radius: 10px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }

/* form controls: one height everywhere, no clipped text */
.input, .btn { height: var(--ctl-h); }
.input { font-size: 13.5px; line-height: normal; padding: 0 10px; }
select.input { padding-right: 28px; text-overflow: ellipsis; }
input[type=date].input, input[type=time].input { padding-right: 6px; }
.actions .input { width: auto; }
.views-select { min-width: 190px; max-width: 260px; }
label { line-height: 1.3; }

/* parameter bar as a tidy grid */
.params { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 14px; align-items: end; }
.param { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.param > label { display: block; font-size: 12px; font-weight: 600; color: #4A4740; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.param .req { margin-left: 2px; }
.param.run { flex-direction: row; gap: 8px; }
.param.run .btn { min-width: 90px; }
.param-check { height: var(--ctl-h); align-self: end; white-space: nowrap; }
.params dxbl-tag-box, .params .dxbl-tag-box { width: 100%; min-height: var(--ctl-h); border-radius: 8px; }
.params .dxbl-tag-box .dxbl-text-edit-input, .params .dxbl-tag-box input { font-size: 13.5px; }

/* result card */
.result { padding: 0; gap: 0; overflow: hidden; }
.result-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tabs { padding: 0 8px; background: #FBFAF7; }
.tab { padding: 11px 14px; font-size: 13.5px; }
.grid-tools { gap: 6px; }
.grid-tools .btn, .chart-tools .btn { height: 30px; font-size: 12.5px; background: #fff; }

/* the grid */
.bi-grid { width: 100%; height: calc(100vh - 300px); min-height: 460px; font-size: 13px;
           border: 1px solid var(--line) !important; border-radius: 8px; overflow: hidden; }
.bi-grid th, .bi-grid td { white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
.bi-grid thead th, .bi-grid .dxbl-grid-header { background: #F3F0EA !important; color: #4A4740; font-weight: 600; font-size: 12.5px; }
.bi-grid tbody td { padding-top: 7px !important; padding-bottom: 7px !important; border-color: #EFEBE4 !important; }
.bi-grid tbody tr:nth-child(even) > td { background-color: #FBFAF7; }
.bi-grid tbody tr:hover > td { background-color: #F2EFE9; }
.bi-grid tfoot td, .bi-grid .dxbl-grid-footer-row td { background: #F3F0EA !important; font-weight: 700; }
.bi-grid .dxbl-grid-group-panel-container, .bi-grid .dxbl-grid-top-panel { background: #FBFAF7; }

/* cell content: icon + value + data bar */
.cell { position: relative; display: flex; align-items: center; gap: 5px; width: 100%; min-height: 20px; }
.cell.num { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.cell .bar { position: absolute; right: -2px; top: -1px; bottom: -1px; border-radius: 3px; z-index: 0; opacity: .9; }
.cell .icon { font-size: 11px; line-height: 1; }
.cell .val, .cell a { overflow: hidden; text-overflow: ellipsis; }
.bi-grid td[style*="background"] { font-weight: 600; }

/* mobile cards */
.kv b { white-space: nowrap; }
.filters-toggle { justify-content: space-between; background: #fff; font-weight: 600; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.params-card.hidden { display: none; }

/* phones */
@media (max-width: 768px) {
    html, body { font-size: 14px; }
    .content { overflow-x: hidden; }
    .page { padding: 12px; gap: 10px; }
    .page-head { gap: 8px; }
    .page-head h1 { font-size: 19px; }
    .page-head .muted { margin: 0; font-size: 12.5px; }
    .page-head .actions { width: 100%; }
    .page-head .actions .views-select { flex: 1 1 100%; max-width: none; }
    .params { grid-template-columns: 1fr 1fr; gap: 10px; }
    .param.run, .param-check { grid-column: 1 / -1; }
    .param.run .btn { flex: 1; height: 42px; }
    .input, .btn { --ctl-h: 40px; }
    .tabs { overflow-x: auto; flex-wrap: nowrap; }
    .tabs .info { display: none; }
    .result-body { padding: 10px; }
    .kv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tile { padding: 12px; }
    .kpi { font-size: 24px; }
    .barlist-row { grid-template-columns: minmax(70px, 120px) 1fr 70px; }
}


/* =====================================================================
   v3: collapsible menu + filters, DevExpress editors in the filter bar
   ===================================================================== */
.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; font-size: 18px; color: #4A4740; }
@media (min-width: 769px) {
    .sidebar.collapsed { display: none; }
}

/* collapsed filter line above the results */
.filter-bar { display: flex; gap: 8px; align-items: center; }
.filter-summary { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px;
                  background: #fff; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--ink);
                  cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filter-summary:hover { border-color: #A3B4BF; }
.filter-summary .lbl { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.filter-summary .chev { margin-left: auto; color: var(--muted); }
.filter-bar .btn { height: 34px; }

/* DevExpress editors fill their cell and line up with buttons */
.params .dxbl-text-edit, .params dxbl-date-edit, .params dxbl-combo-box, .params dxbl-spin-edit, .params dxbl-text-box, .params dxbl-tag-box { width: 100%; }
.params .dxbl-text-edit { min-height: var(--ctl-h); border-radius: 8px; }
.param-check { display: flex; align-items: center; height: var(--ctl-h); }
.param-check .dxbl-checkbox, .param-check dxbl-checkbox { white-space: nowrap; }
.param.run { display: flex; align-items: flex-end; }

@media (max-width: 768px) {
    .filter-summary { height: 40px; }
    .filter-bar .btn { height: 40px; }
}


/* =====================================================================
   v4: compact report page – header on one line, grid fills the screen
   ===================================================================== */
.report-page { height: calc(100vh - 52px); max-width: none; padding: 10px 16px 12px; gap: 8px; overflow: hidden; }
.report-page .page-head { align-items: center; flex-wrap: nowrap; }
.report-page .page-head > div:first-child { display: flex; align-items: baseline; gap: 10px; min-width: 0; overflow: hidden; }
.report-page .page-head > div:first-child > .muted.small { display: none; }         /* breadcrumb */
.report-page .page-head h1 { font-size: 17px; margin: 0; white-space: nowrap; }
.report-page .page-head p.muted { margin: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-page .page-head .actions { flex: none; gap: 6px; }
.report-page .page-head .btn, .report-page .page-head .input { height: 30px; font-size: 12.5px; }
.report-page .page-head .views-select { min-width: 150px; }
.report-page .alert { padding: 5px 10px; font-size: 12.5px; }
.report-page .params-card { padding: 10px 12px; }
.report-page .result { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.report-page .tabs { padding: 0 6px; }
.report-page .tab { padding: 7px 12px; }
.report-page .result-body { flex: 1; min-height: 0; padding: 8px 10px 10px; gap: 6px; overflow: auto; }
.report-page .grid-tools .btn { height: 26px; padding: 0 8px; font-size: 12px; }
.report-page .bi-grid { flex: 1; min-height: 240px; height: auto; }
.report-page .dxbl-grid-group-panel-container, .report-page .dxbl-grid-top-panel { padding-top: 4px !important; padding-bottom: 4px !important; }

@media (max-width: 768px) {
    .report-page { height: auto; overflow: visible; padding: 10px; }
    .report-page .page-head { flex-wrap: wrap; }
    .report-page .page-head > div:first-child { flex-direction: column; align-items: flex-start; gap: 2px; }
    .report-page .page-head p.muted { white-space: normal; }
    .report-page .page-head .actions { width: 100%; }
    .report-page .page-head .btn, .report-page .page-head .input { height: 36px; }
    .report-page .result-body { overflow: visible; }
}

/* grid buttons sit in the group-panel row (left of the search box) on wide screens */
@media (min-width: 1100px) {
    .report-page .result-body { position: relative; }
    .report-page .grid-tools { position: absolute; top: 15px; right: 230px; z-index: 2; }
}


/* =====================================================================
   v5: dashboards – compact header, folded filters, tidy tiles, phones
   ===================================================================== */
.dash-page { padding: 12px 16px 20px; gap: 10px; max-width: none; }
.dash-page .page-head { align-items: center; }
.dash-page .page-head > div:first-child { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.dash-page .page-head > div:first-child > .muted.small { display: none; }
.dash-page .page-head h1 { font-size: 18px; margin: 0; }
.dash-page .page-head p.muted { margin: 0; font-size: 12.5px; }
.dash-page .page-head .btn { height: 30px; font-size: 12.5px; }
.tiles { gap: 12px; }
.tile { padding: 12px 14px; gap: 8px; }
.tile-head { font-size: 13.5px; }
.tile-head .small { font-weight: 400; }
.kpi { font-size: 26px; line-height: 1.1; }
.tile .table-wrap { max-height: 380px; overflow: auto; border: 1px solid #EFEBE4; border-radius: 6px; }
.tile .tbl th { position: sticky; top: 0; z-index: 1; }
.tile .tbl th, .tile .tbl td { white-space: nowrap; padding: 6px 10px; }
.tile .tbl th.num { text-align: right; }
.barlist-row .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 768px) {
    .dash-page { padding: 10px; gap: 8px; }
    .dash-page .page-head p.muted { display: none; }
    .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
    .tiles .tile { grid-column: 1 / -1; }
    .tiles .tile.tile-kpi { grid-column: span 1; }
    .tile.tile-kpi { padding: 10px 12px; gap: 2px; }
    .tile.tile-kpi .tile-head { font-size: 12px; font-weight: 500; color: var(--muted); }
    .tile.tile-kpi .kpi { font-size: 20px; }
    .tile .table-wrap { max-height: 300px; }
    .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
    .chip { flex: none; }
    .cross-bar { flex-wrap: nowrap; overflow-x: auto; }
}

/* icon inside a mobile card value stays on the same line */
.kv b span { display: inline; font-size: inherit; color: inherit; }


/* =====================================================================
   Theme "Nordic Linen" – minimal Scandinavian
   paper #F7F5F1 · charcoal #2B2A28 · fjord #2F4A5A · sage #7A8C74 · sand #B9A27E
   ===================================================================== */
:root { --bg: #F7F5F1; --ink: #2B2A28; --muted: #6F6B64; --line: #E6E2DA; --accent: #2F4A5A; --accent-soft: #E8EDEF;
        --good: #3F6E50; --bad: #A8452F; --warn: #A7712A; --radius: 8px; }
body { letter-spacing: .05px; }
.topbar { background: #FFFFFF; border-bottom: 1px solid var(--line); box-shadow: none; }
.logo { background: var(--accent); }
.sidebar { background: #FBFAF7; border-right: 1px solid var(--line); }
.sidebar a { color: #4A4740; }
.sidebar a.active { background: #ECEFEF; color: var(--accent); }
.nav-section { color: #8A857C; }
.card, .tile, .row-card { box-shadow: none; border-color: var(--line); }
.page-head h1, h1, h2 { color: var(--ink); font-weight: 600; }
.btn { border-color: #DCD6CC; border-radius: 6px; }
.btn:hover { background: #F2EFE9; }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: #253C4A; }
.btn.excel { background: #3F6E50; border-color: #3F6E50; }
.btn.excel:hover { background: #355D44; }
.chip { border-color: #DCD6CC; }
.chip.on { background: #E8EDEF; border-color: #A3B4BF; color: var(--accent); }
.totals-card { background: var(--accent); }
.barlist-row .fill { background: var(--accent); }
.q { background: var(--accent); }
.login-side { background: #2F4A5A; }
.tabs { background: #FBFAF7; }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.bi-grid thead th, .bi-grid .dxbl-grid-header { background: #F3F0EA !important; color: #4A4740; }
.bi-grid tbody tr:nth-child(even) > td { background-color: #FBFAF7; }
.bi-grid tbody tr:hover > td { background-color: #F2EFE9; }
.bi-grid tfoot td, .bi-grid .dxbl-grid-footer-row td { background: #F3F0EA !important; }
.alert.warn { background: #F8F0E1; color: #6B4A1C; border-color: #E6D3B0; }

/* bar list: give the bars more room */
.barlist-row { grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 12px; }
.barlist-row .track { height: 10px; }
.barlist-row .v { min-width: 64px; }

/* column filter menu (checkbox list) button in headers */
.bi-grid .dxbl-grid-header .dxbl-btn { opacity: .55; }
.bi-grid .dxbl-grid-header:hover .dxbl-btn, .bi-grid .dxbl-grid-header .dxbl-btn.dxbl-active { opacity: 1; }

.filter-info { align-self: center; font-size: 12.5px; font-weight: 600; color: #2F4A5A; background: #E8EDEF; padding: 4px 10px; border-radius: 999px; }
form.inline { display: inline; margin: 0; }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; padding: 10px 16px;
                   background: #F7E9E4; color: #7A2E1E; border-top: 1px solid #E8C6BC; box-shadow: 0 -2px 8px rgba(0,0,0,.06); }
#blazor-error-ui .reload { font-weight: 600; margin-left: 6px; }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

.login-side h1, .login-side .brand { color: #FFFFFF; }
.login-side p { color: #D7DEE2; }

/* login page */
.login-side { justify-content: space-between; gap: 40px; padding: 48px 56px; }
.login-side .brand.big { font-size: 18px; color: #FFFFFF; }
.login-side .brand.big .logo { background: rgba(255,255,255,.16); }
.login-hero { display: flex; flex-direction: column; gap: 16px; max-width: 480px; }
.login-hero h1 { font-size: 44px; line-height: 1.08; font-weight: 600; letter-spacing: -0.8px; color: #FFFFFF; margin: 0; }
.login-hero p { font-size: 16px; line-height: 1.55; color: #D7DEE2; margin: 0; }
.login-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: #C3CED4; }
.login-points li::before { content: "—"; margin-right: 8px; color: #8FA3B0; }
.login-card h2 { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
@media (max-width: 768px) {
    .login-side { padding: 28px 24px; gap: 20px; }
    .login-hero h1 { font-size: 30px; }
    .login-points { display: none; }
}
