/* Classic desktop-app look, modelled on the VisionFlow Time/Expenses screen. */
:root {
  --bg: #f0f0f0;
  --panel: #ffffff;
  --panel-head: linear-gradient(#fafafa, #e9e9e9);
  --border: #c9c9c9;
  --border-soft: #e2e2e2;
  --text: #1e1e1e;
  --muted: #6d6d6d;
  --link: #365F91;
  --group: #DCE6F1;
  --stripe: #f5f8fb;
  --hover: #e6eef7;
  --primary: #00609C;
  --primary-hover: #004f80;
  --tl-blue: #00609C;
  --tl-grey: #B1B1B1;
  --tl-heading: #365F91;
  --tl-accent: #4F81BD;
  --danger: #d0342c;
  --danger-soft: #fdecea;
  --success: #2e8b57;
  --green: #3aa655;
  --red: #d84b3a;
  --pencil: #2f7d32;
  --today: #fff7d6;
  --radius: 3px;
  font-family: Tahoma, "Segoe UI", Verdana, Arial, sans-serif;
  font-size: 12px;
  color: var(--text);
}

:root[data-theme="dark"] {
    --bg: #1e1f22;
    --panel: #26282c;
    --panel-head: linear-gradient(#34363b, #2a2c30);
    --border: #45484e;
    --border-soft: #34363b;
    --text: #e6e6e6;
    --muted: #a0a4ab;
    --link: #8fb4e6;
    --group: #263447;
    --stripe: #2a2c31;
    --hover: #2f3b52;
    --primary: #2f8fd0;
    --primary-hover: #4aa3e0;
    --danger: #ff6b61;
    --danger-soft: #45231f;
    --today: #3a3520;
    --tl-heading: #9dc1ea;
    --tl-blue: #2f8fd0;
  }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e1f22;
    --panel: #26282c;
    --panel-head: linear-gradient(#34363b, #2a2c30);
    --border: #45484e;
    --border-soft: #34363b;
    --text: #e6e6e6;
    --muted: #a0a4ab;
    --link: #8fb4e6;
    --group: #263447;
    --stripe: #2a2c31;
    --hover: #2f3b52;
    --primary: #2f8fd0;
    --primary-hover: #4aa3e0;
    --danger: #ff6b61;
    --danger-soft: #45231f;
    --today: #3a3520;
    --tl-heading: #9dc1ea;
    --tl-blue: #2f8fd0;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); height: 100%; }
body { padding: 0 8px 8px; display: flex; flex-direction: column; overflow: hidden; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-weight: normal; }
b { font-weight: 700; }

/* ---------- header ---------- */
.apphead {
  display: flex; align-items: center; gap: 22px; margin: 0 -8px; padding: 10px 20px 9px;
  background: var(--panel); border-bottom: 1px solid var(--border);
}
.apphead .logo { display: inline-flex; align-items: center; flex: none; padding: 4px 8px; background: #fff; border-radius: 4px; }
.apphead .logo img { height: 34px; width: auto; display: block; }
.apptitle { display: flex; flex-direction: column; justify-content: center; border-left: 1px solid var(--border); padding-left: 22px; min-height: 40px; }
.apptitle h1 { margin: 0; font: 600 20px/1.1 "Segoe UI", Tahoma, Verdana, sans-serif; color: var(--tl-heading); letter-spacing: .2px; }
.apptitle h1 .sep { color: var(--tl-grey); font-weight: 300; margin: 0 4px; }
.apptitle .subtitle { color: var(--muted); font-size: 11px; margin-top: 3px; }
.headright { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.headtotal { font: 600 16px/1 "Segoe UI", Tahoma, sans-serif; color: var(--tl-blue); font-variant-numeric: tabular-nums; }
.headtotal small { font-size: 11px; font-weight: normal; color: var(--muted); margin-left: 5px; }
.user { display: inline-flex; align-items: center; gap: 8px; color: var(--text); padding: 4px 10px 4px 4px; border: 1px solid var(--border); border-radius: 20px; background: var(--stripe); }
.user img { width: 24px; height: 24px; border-radius: 50%; }
.user .uname { font-weight: 600; }
.user .usite { color: var(--muted); font-size: 11px; }
.accentbar { height: 4px; margin: 0 -8px 10px; background: linear-gradient(90deg, var(--tl-blue) 0 55%, var(--tl-grey) 55% 100%); }
:root[data-theme="dark"] .apptitle h1 { color: #9dc1ea; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .apptitle h1 { color: #9dc1ea; }
}

/* ---------- panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.ptitle { background: var(--group); border-bottom: 1px solid var(--border); padding: 5px 8px; font-weight: 700; color: var(--tl-heading); }
.banner { background: var(--hover); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; line-height: 1.5; }
.banner.error { background: var(--danger-soft); }
.banner code { background: rgba(0,0,0,.07); padding: 1px 4px; border-radius: 3px; }

/* ---------- filter panel ---------- */
.filters { display: flex; gap: 18px; padding: 10px 12px 12px; flex-wrap: wrap; }
.fcol { display: flex; flex-direction: column; gap: 4px; min-width: 200px; }
.fcol.grow { flex: 1; min-width: 260px; }
.fcol > label { font-size: 11px; color: var(--muted); margin-top: 6px; }
.fcol > label:first-child { margin-top: 0; }
select, input[type=date], input[type=time], input[type=text], textarea {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 3px 5px; width: 100%;
}
select[multiple] { height: 190px; padding: 2px; }
select[multiple] option { padding: 2px 4px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text) !important; margin-top: 2px !important; }
.check input { width: auto; }
.periodnav { display: flex; gap: 4px; margin-top: 6px; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.seg { font: inherit; padding: 4px 10px; border: 0; background: var(--panel); color: var(--text); cursor: pointer; }
.seg + .seg { border-left: 1px solid var(--border); }
.seg.active { background: var(--primary); color: #fff; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 12px;
  background: linear-gradient(#fdfdfd, #e6e6e6); color: var(--text); cursor: pointer;
}
:root[data-theme="dark"] .btn { background: linear-gradient(#3a3d43, #2c2e33); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn { background: linear-gradient(#3a3d43, #2c2e33); }
}
.btn:hover { filter: brightness(.96); }
.btn.small { padding: 3px 8px; flex: 1; }
.btn.wide { padding: 6px 8px; font-weight: 600; flex: 1; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.actionrow { display: flex; gap: 6px; margin-top: 8px; }
.ico.plus-w { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M7 2.5v9M2.5 7h9' stroke='white' stroke-width='2.2' stroke-linecap='round'/></svg>"); width: 12px; height: 12px; }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-hover); filter: none; }
.btn.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn.icon { width: 26px; padding: 2px 0; font-size: 16px; line-height: 1; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- links row ---------- */
.links { display: flex; gap: 18px; padding: 6px 4px; }
.plus-link { display: inline-flex; align-items: center; gap: 5px; }
.ico { display: inline-block; width: 14px; height: 14px; background-repeat: no-repeat; background-size: contain; vertical-align: middle; }
.ico.plus    { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><rect x='1' y='1' width='12' height='12' rx='2' fill='%233aa655'/><path d='M7 3.5v7M3.5 7h7' stroke='white' stroke-width='2' stroke-linecap='round'/></svg>"); }
.ico.pencil  { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M2 12l.8-3.2L9.6 2l2.4 2.4-6.8 6.8z' fill='%23f5c542' stroke='%232f7d32' stroke-width='1'/><path d='M8.6 3l2.4 2.4' stroke='%232f7d32' stroke-width='1'/></svg>"); }
.ico.cross   { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M3 3l8 8M11 3l-8 8' stroke='%23d84b3a' stroke-width='2.6' stroke-linecap='round'/></svg>"); }
.ico.link    { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M5.5 8.5l3-3M6 4.5l1.5-1.5a2.1 2.1 0 013 3L9 7.5M8 9.5l-1.5 1.5a2.1 2.1 0 01-3-3L5 6.5' fill='none' stroke='%231a3ec8' stroke-width='1.5' stroke-linecap='round'/></svg>"); }
.ico.refresh { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M11 7a4 4 0 11-1.2-2.8' fill='none' stroke='%233aa655' stroke-width='1.8'/><path d='M11 2v3H8' fill='none' stroke='%233aa655' stroke-width='1.8'/></svg>"); }
.ico.minus   { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><rect x='1.5' y='1.5' width='11' height='11' fill='white' stroke='%23888'/><path d='M4 7h6' stroke='%23333' stroke-width='1.5'/></svg>"); }
.ico.plusbox { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><rect x='1.5' y='1.5' width='11' height='11' fill='white' stroke='%23888'/><path d='M4 7h6M7 4v6' stroke='%23333' stroke-width='1.5'/></svg>"); }

/* ---------- results table ---------- */
.results { margin-top: 2px; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sheet { flex: 1; min-height: 0; overflow: auto; }
.filters, .apphead, .accentbar, .banner { flex: none; }
.results { margin-top: 8px; }
.empty { color: var(--muted); padding: 30px; text-align: center; }
table.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-weight: 600; padding: 5px 8px; background: var(--group); color: var(--tl-heading); border-bottom: 1px solid var(--border); border-right: 1px solid var(--border-soft); white-space: nowrap; position: sticky; top: 0; }
.list th:last-child { border-right: 0; }
.list td { padding: 4px 8px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.list tbody tr.wl:nth-child(even) td { background: var(--stripe); }
.list tbody tr.wl:hover td { background: var(--hover); }
.list td.num, .list th.num { text-align: right; font-variant-numeric: tabular-nums; }
.list td.key { white-space: nowrap; font-weight: 600; }
.list td.key img { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.list td.title { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list td.comment { color: var(--muted); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list td.date { white-space: nowrap; }
.list td.actions { white-space: nowrap; text-align: center; }
.list td.actions .ico { cursor: pointer; margin: 0 3px; }
.list td.actions .ico:hover { transform: scale(1.15); }
.list tr.group td { background: var(--stripe); font-weight: 700; padding: 6px 8px; border-top: 1px solid var(--border); border-left: 3px solid var(--tl-blue); }
.list tr.group.today td { background: var(--today); }
.list tr.group .toggle { cursor: pointer; margin-right: 4px; }
.list tr.group .ginfo { font-weight: 700; }
.list tr.group .glinks { font-weight: normal; margin-left: 14px; }
.list tr.group .glinks a { margin-right: 14px; display: inline-flex; align-items: center; gap: 4px; }
.list tr.group .gtotal { float: right; font-weight: 700; }
.list tr.group .gempty { color: var(--muted); font-weight: normal; margin-left: 8px; }
.list tr.subtotal td { padding: 4px 8px 8px; font-weight: 700; }
.list tr.subtotal td.label { color: var(--muted); }
.list tr.subtotal td.hours { text-align: right; }
.list tr.collapsed-hidden { display: none; }
.dow { color: var(--muted); font-weight: normal; margin-left: 4px; }

.sumbar { flex: none; display: flex; flex-wrap: wrap; gap: 12px; padding: 6px 8px; border-top: 1px solid var(--border); background: var(--group); font-weight: 600; color: var(--tl-heading); }
.sumbar .sep { border-left: 1px solid var(--border); }

/* ---------- weekly grid (alternate view) ---------- */
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: 900px; }
.grid th, .grid td { border-bottom: 1px solid var(--border-soft); border-right: 1px solid var(--border-soft); vertical-align: top; }
.grid thead th { background: var(--panel-head); padding: 6px 8px; text-align: center; font-weight: 600; }
.grid thead th.issuecol { text-align: left; }
.grid th .dowl { display: block; font-size: 11px; color: var(--muted); }
.grid th.today, .grid td.today { background: var(--today); }
.grid th.weekend, .grid td.weekend { background: var(--stripe); }
.issuecol { width: 300px; }
.grid td.issue { padding: 6px 8px; }
.grid .issue .k { font-weight: 600; }
.grid .issue .summary { display: block; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid .issue .rowtotal { display: block; color: var(--muted); font-size: 11px; }
.grid td.cell { padding: 3px; cursor: pointer; min-height: 40px; }
.grid td.cell:hover { background: var(--hover); }
.chip { display: block; background: #e3fcef; color: #006644; border-radius: 3px; padding: 2px 5px; margin: 2px 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root[data-theme="dark"] .chip { background: #1c3329; color: #7ee2b8; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip { background: #1c3329; color: #7ee2b8; }
}
.chip .dur { font-weight: 700; }
.chip .cmt { color: var(--muted); margin-left: 5px; }
.grid tfoot td { background: var(--panel-head); padding: 6px 8px; text-align: center; font-weight: 700; }
.grid tfoot td.issue { text-align: left; }

/* ---------- dialog ---------- */
.dlg { border: 1px solid var(--border); border-radius: 4px; padding: 0; width: 560px; max-width: calc(100vw - 32px); background: var(--panel); color: var(--text); box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.dlg::backdrop { background: rgba(0, 0, 0, .45); }
.dlg form { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 14px; }
.dlg header { display: flex; align-items: center; justify-content: space-between; margin: 0 -16px 2px; padding: 8px 12px 8px 16px; background: var(--panel-head); border-bottom: 1px solid var(--border); }
.dlg h2 { margin: 0; font-size: 13px; font-weight: 700; }
.dlg footer { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.spacer { flex: 1; }
.field { display: flex; flex-direction: column; gap: 3px; }
.field label { font-size: 11px; color: var(--muted); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
textarea { resize: vertical; }
.hint { color: var(--muted); font-size: 11px; }
.error { background: var(--danger-soft); color: var(--danger); padding: 6px 8px; border-radius: var(--radius); }

.picker { position: relative; }
.results.hidden { display: none; }
.picker .results {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 10; max-height: 260px; overflow: auto;
  background: var(--panel); border: 1px solid var(--border); box-shadow: 0 4px 12px rgba(0,0,0,.2); margin: 0;
}
.picker .group { padding: 5px 8px 2px; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.picker .item { padding: 5px 8px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.picker .item:hover, .picker .item.active { background: var(--hover); }
.picker .item img { width: 14px; height: 14px; flex: none; }
.picker .item .k { font-weight: 600; flex: none; }
.picker .item .s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker .none { padding: 8px; color: var(--muted); }
.selected { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 6px 8px; background: var(--hover); border-radius: var(--radius); }
.selected img { width: 14px; height: 14px; }
.selected .k { font-weight: 700; }
.selected .s { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected .change { color: var(--link); cursor: pointer; background: none; border: 0; font: inherit; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 50; }
.toast { background: #333; color: #fff; padding: 8px 12px; border-radius: 3px; max-width: 380px; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

@media (max-width: 800px) {
  .apptitle { display: none; }
  .filters { flex-direction: column; }
  .row { grid-template-columns: 1fr 1fr; }
}

/* ---------- users filter ---------- */
.userlinks { display: flex; gap: 12px; margin-top: 2px; }
.peruser { margin-left: auto; font-weight: normal; color: var(--muted); }
.peruser b { color: var(--text); }
.list td.usercol { white-space: nowrap; }
.list tr.wl.other td { color: var(--muted); }
.list tr.wl.other td.key a, .list tr.wl.other td.title { color: var(--text); }
.list td.actions .ico.disabled { opacity: .25; cursor: default; pointer-events: none; }

/* ---------- context menu ---------- */
.ctx {
  position: fixed; z-index: 60; min-width: 230px; padding: 3px; background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: 3px; box-shadow: 0 4px 14px rgba(0,0,0,.28);
}
.ctx .mi { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 8px; cursor: pointer; border-radius: 2px; color: var(--link); white-space: nowrap; }
.ctx .mi:hover, .ctx .mi:focus { background: var(--hover); outline: none; }
.ctx .mi.disabled { color: var(--muted); cursor: default; }
.ctx .mi.disabled:hover { background: none; }
.ctx .mi .ico { flex: none; }
.ctx .sepline { border-top: 1px solid var(--border-soft); margin: 3px 4px; }
.ctx .mhead { padding: 4px 8px 2px; font-size: 11px; color: var(--muted); }
.ico.open   { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><rect x='1.5' y='2.5' width='11' height='9' rx='1' fill='white' stroke='%23555'/><path d='M1.5 4.5h11' stroke='%23555'/><path d='M4 8.5l2-2 1.5 1.5 2.5-2.5' fill='none' stroke='%232f7d32' stroke-width='1.3'/></svg>"); }
.ico.copy   { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><rect x='4' y='4' width='8' height='9' rx='1' fill='white' stroke='%23555'/><rect x='2' y='1.5' width='8' height='9' rx='1' fill='%23e9eef7' stroke='%23555'/></svg>"); }
.ico.pencilm{ background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M2 12l.8-3.2L9.6 2l2.4 2.4-6.8 6.8z' fill='%23f5c542' stroke='%232f7d32' stroke-width='1'/></svg>"); }
.ico.del    { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><circle cx='7' cy='7' r='6' fill='%23d84b3a'/><path d='M4.5 4.5l5 5M9.5 4.5l-5 5' stroke='white' stroke-width='1.8' stroke-linecap='round'/></svg>"); }

.chip.other { background: var(--stripe); color: var(--muted); border: 1px dashed var(--border); }


/* ---------- header toggles ---------- */
.headright { flex-direction: column; align-items: flex-end; gap: 6px; }
.toggles { display: flex; gap: 6px; }
.segmented.tiny .seg { padding: 2px 8px; font-size: 11px; }
.titlebar { display: flex; align-items: center; gap: 10px; padding-top: 4px; padding-bottom: 4px; }
.titlebar > span { flex: 1; }
.titlebar .btn.exportbtn { flex: 0 0 auto !important; width: auto; margin-left: auto; }
.ico.export { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M7 1.5v7.5M4 6.5l3 3 3-3' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/><path d='M2 10v2.5h10V10' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'/></svg>"); width: 12px; height: 12px; }
.dlg .field select[multiple] { height: 120px; }
.dlg .check { margin-top: 0 !important; color: var(--text) !important; }
.dlg .check input { width: auto; }

/* ============================================================================
   MODERN skin - same layout, softer surfaces, larger type, no gradients
   ========================================================================== */
:root[data-skin="modern"] {
  --bg: #f3f5f9;
  --panel: #ffffff;
  --panel-head: #ffffff;
  --border: #e3e7ee;
  --border-soft: #edf0f5;
  --group: #eef3fb;
  --stripe: #f8fafd;
  --hover: #eaf1fb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 14px rgba(16, 24, 40, .06);
  font-family: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, Roboto, sans-serif;
  font-size: 13px;
}
:root[data-skin="modern"][data-theme="dark"] {
  --bg: #15181d;
  --panel: #1e2229;
  --panel-head: #1e2229;
  --border: #2c323b;
  --border-soft: #262c34;
  --group: #232c3a;
  --stripe: #21262e;
  --hover: #283546;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
}
@media (prefers-color-scheme: dark) {
  :root[data-skin="modern"]:not([data-theme="light"]) {
    --bg: #15181d; --panel: #1e2229; --panel-head: #1e2229; --border: #2c323b; --border-soft: #262c34;
    --group: #232c3a; --stripe: #21262e; --hover: #283546; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
  }
}
:root[data-skin="modern"] body { padding: 0 20px 16px; }
:root[data-skin="modern"] .apphead { margin: 0 -20px; padding: 14px 28px; border-bottom: 0; background: var(--panel); gap: 26px; }
:root[data-skin="modern"] .apphead .logo { padding: 6px 10px; border-radius: 10px; }
:root[data-skin="modern"] .apptitle { border-left-color: var(--border); }
:root[data-skin="modern"] .apptitle h1 { font-size: 22px; font-weight: 600; letter-spacing: -.2px; }
:root[data-skin="modern"] .accentbar { height: 3px; margin: 0 -20px 16px; background: linear-gradient(90deg, var(--tl-blue), var(--tl-accent) 55%, var(--tl-grey)); }
:root[data-skin="modern"] .user { border-radius: 999px; padding: 4px 12px 4px 4px; background: var(--group); border-color: transparent; }
:root[data-skin="modern"] .panel { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
:root[data-skin="modern"] .filters { padding: 16px 18px 18px; gap: 24px; }
:root[data-skin="modern"] .fcol > label:not(.check) { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
:root[data-skin="modern"] select, :root[data-skin="modern"] input[type=date], :root[data-skin="modern"] input[type=time],
:root[data-skin="modern"] input[type=text], :root[data-skin="modern"] textarea { border-radius: 8px; padding: 6px 9px; background: var(--stripe); }
:root[data-skin="modern"] select[multiple] { background: var(--panel); }
:root[data-skin="modern"] select[multiple] option { padding: 4px 6px; border-radius: 6px; }
:root[data-skin="modern"] .btn { background: var(--panel); border-radius: 8px; padding: 6px 14px; box-shadow: 0 1px 1px rgba(16,24,40,.04); }
:root[data-skin="modern"] .btn:hover { background: var(--hover); filter: none; }
:root[data-skin="modern"] .btn.primary { background: var(--primary); box-shadow: 0 2px 6px rgba(0, 96, 156, .25); }
:root[data-skin="modern"] .btn.primary:hover { background: var(--primary-hover); }
:root[data-skin="modern"] .btn.small { padding: 5px 10px; }
:root[data-skin="modern"] .segmented { border-radius: 999px; padding: 2px; background: var(--stripe); border-color: var(--border); }
:root[data-skin="modern"] .seg { border-radius: 999px; background: transparent; padding: 4px 12px; }
:root[data-skin="modern"] .seg + .seg { border-left: 0; }
:root[data-skin="modern"] .seg.active { background: var(--primary); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
:root[data-skin="modern"] .segmented.tiny .seg { padding: 2px 10px; }
:root[data-skin="modern"] .ptitle { background: var(--panel); border-bottom: 1px solid var(--border-soft); padding: 12px 16px; font-size: 14px; border-radius: var(--radius) var(--radius) 0 0; }
:root[data-skin="modern"] .results { margin-top: 14px; }
:root[data-skin="modern"] .list th { background: var(--panel); color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; border-right: 0; padding: 8px 12px; border-bottom: 1px solid var(--border); }
:root[data-skin="modern"] .list td { padding: 8px 12px; border-bottom: 1px solid var(--border-soft); }
:root[data-skin="modern"] .list tbody tr.wl:nth-child(even) td { background: transparent; }
:root[data-skin="modern"] .list tbody tr.wl:hover td { background: var(--hover); }
:root[data-skin="modern"] .list tr.group td { background: var(--group); border-left: 0; border-top: 0; padding: 9px 12px; }
:root[data-skin="modern"] .list tr.group .ginfo { color: var(--tl-heading); }
:root[data-skin="modern"] .list tr.group.today td { background: var(--today); }
:root[data-skin="modern"] .list tr.subtotal td { padding: 6px 12px 12px; }
:root[data-skin="modern"] .list td.key a { background: var(--group); color: var(--tl-heading); padding: 2px 8px; border-radius: 6px; font-weight: 600; }
:root[data-skin="modern"] .list td.num { font-weight: 600; }
:root[data-skin="modern"] .list td.actions .ico { margin: 0 4px; opacity: .55; transition: opacity .1s; }
:root[data-skin="modern"] .list tr.wl:hover td.actions .ico { opacity: 1; }
:root[data-skin="modern"] .sumbar { background: var(--panel); border-top: 1px solid var(--border); padding: 10px 16px; border-radius: 0 0 var(--radius) var(--radius); }
:root[data-skin="modern"] .dlg { border-radius: 14px; border: 0; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
:root[data-skin="modern"] .dlg header { background: var(--panel); border-bottom: 1px solid var(--border-soft); padding: 14px 16px 12px 20px; margin: 0 -20px 0; }
:root[data-skin="modern"] .dlg form { padding: 0 20px 18px; gap: 14px; }
:root[data-skin="modern"] .dlg h2 { font-size: 15px; }
:root[data-skin="modern"] .chip { border-radius: 6px; padding: 3px 7px; }
:root[data-skin="modern"] .grid thead th { background: var(--panel); color: var(--muted); }
:root[data-skin="modern"] .ctx, :root[data-skin="modern"] .picker .results { border-radius: 10px; box-shadow: var(--shadow), 0 10px 30px rgba(0,0,0,.18); padding: 5px; }
:root[data-skin="modern"] .ctx .mi { border-radius: 6px; }
:root[data-skin="modern"] .toast { border-radius: 8px; }
:root[data-skin="modern"] .selected { border-radius: 8px; }

/* ---------- account links in header ---------- */
.acctlinks { font-size: 11px; color: var(--muted); align-self: center; margin-left: 4px; }
