/* Beckhoff Türkiye Servis — one stylesheet, phone first, desktop adds the sidebar and grid. */

@font-face {
  font-family: "Noto Sans"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62.5% 100%;
  src: url("../fonts/noto-sans-latin-wdth-normal.d843c03aab7d.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62.5% 100%;
  src: url("../fonts/noto-sans-latin-ext-wdth-normal.0ef1bf648fd5.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --brand: #EF0000;          /* wordmark only */
  --red: #E00000;            /* buttons, links: AA on white */
  --red-dark: #B80000;
  --red-soft: #FDECEC;
  --ink: #212529;
  --ink-2: #5D6469;
  --line: #E5E9EC;
  --line-2: #C8CED2;
  --bg: #F5F7F7;
  --card: #FFFFFF;
  --blue-grey: #8C99AC;
  --ok: #18794E; --ok-soft: #E6F4EC;
  --warn: #8A4B00; --warn-soft: #FFF1E0;
  --danger: #B42318; --danger-soft: #FDECEC;
  --info: #1D4E89; --info-soft: #E8F0FA;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(33, 37, 41, .06), 0 4px 16px rgba(33, 37, 41, .06);
  --sidebar: 232px;
  --tabbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Noto Sans", Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.45;
}
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
h1, h2, h3 { font-stretch: 87.5%; line-height: 1.2; margin: 0; }
h1 { font-size: 24px; font-weight: 750; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ layout --- */

.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; background: var(--card); border-bottom: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px; display: flex; align-items: center; gap: 10px;
}
.topbar .back { width: 40px; height: 40px; margin-left: -8px; display: grid; place-items: center; color: var(--ink); }
.topbar-title { flex: 1; min-width: 0; font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wordmark { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.wordmark img { height: 16px; width: auto; display: block; }
.wordmark span { font-size: 12px; color: var(--ink-2); font-weight: 600; letter-spacing: .02em; }
.content { flex: 1; padding: 16px 16px calc(var(--tabbar) + var(--safe-b) + 24px); max-width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head p { margin: 2px 0 0; }

.sidebar { display: none; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: var(--safe-b); backdrop-filter: blur(8px);
}
.tabbar a {
  height: var(--tabbar); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--ink-2); font-size: 11px; font-weight: 600;
}
.tabbar a.active { color: var(--red); }
.tabbar a.plus span.circle {
  width: 46px; height: 46px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(224, 0, 0, .3); margin-top: -10px;
}
.tabbar a.plus { color: var(--ink); }

@media (min-width: 1000px) {
  :root { --sidebar: 252px; }
  .app { flex-direction: row; }
  .sidebar {
    display: flex; flex-direction: column; width: var(--sidebar); flex-shrink: 0; position: sticky; top: 0; height: 100vh;
    background: var(--card); border-right: 1px solid var(--line); padding: 20px 14px 14px;
  }
  .brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 22px; color: var(--ink); }
  .brand img { height: 19px; width: auto; display: block; }
  .brand span { padding-left: 12px; border-left: 1px solid var(--line-2); font-size: 11px; line-height: 1.25; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); max-width: 84px; }
  .side-new { height: 42px; margin-bottom: 8px; }
  .nav-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
  .nav-group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-grey); padding: 16px 10px 6px; }
  .sidebar a.nav {
    display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 10px; color: var(--ink);
    font-weight: 600; font-size: 14px; white-space: nowrap;
  }
  .sidebar a.nav .icon { color: var(--ink-2); }
  .sidebar a.nav > span:not(.count) { flex: 1; overflow: hidden; text-overflow: ellipsis; }
  .sidebar a.nav:hover { background: var(--bg); }
  .sidebar a.nav.active { background: var(--red-soft); color: var(--red); }
  .sidebar a.nav.active .icon { color: var(--red); }
  .sidebar a.nav .count { font-size: 11px; font-weight: 700; background: var(--red); color: #fff; border-radius: 99px; padding: 1px 7px; line-height: 16px; }
  .side-foot { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; display: flex; flex-direction: column; gap: 10px; }
  .side-foot .me { display: flex; align-items: center; gap: 10px; color: var(--ink); padding: 2px 4px; border-radius: 10px; }
  .side-foot .me:hover { background: var(--bg); }
  .side-foot .me b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-foot .me small { display: block; font-size: 12px; color: var(--ink-2); }
  .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
  .lang { display: inline-flex; background: var(--bg); border-radius: 9px; padding: 3px; gap: 2px; }
  .lang button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 7px; font-weight: 700; font-size: 12px; color: var(--ink-2); cursor: pointer; }
  .lang button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
  .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .topbar { padding: 12px 28px; min-height: 60px; }
  .topbar .wordmark, .topbar .back { display: none; }
  .tabbar { display: none; }
  .content { padding: 24px 28px 40px; }
  .only-mobile { display: none !important; }
}
@media (max-width: 999px) { .only-desktop { display: none !important; } }

/* ------------------------------------------------------------- parts --- */

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.card + .card, .stack > * + * { margin-top: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.grid { display: grid; gap: 12px; }
.grid > *, .stack > * { min-width: 0; }
html, body { overflow-x: hidden; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { justify-content: space-between; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-weight: 600;
  font-size: 15px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--ink-2); color: var(--ink); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.big { height: 52px; font-size: 16px; font-weight: 700; }
.btn[aria-pressed="true"] { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon { width: 18px; height: 18px; flex-shrink: 0; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 99px;
  font-size: 12px; font-weight: 700; background: var(--bg); color: var(--ink-2); white-space: nowrap;
}
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.dark { background: var(--ink); color: #fff; }
.place { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-size: 12px; font-weight: 800; background: var(--bg); color: var(--ink-2); }
.place.H { background: var(--ink); color: #fff; }

.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.alert.warn { background: var(--warn-soft); color: #5C3300; }
.alert.danger, .alert.error { background: var(--danger-soft); color: #7A1A12; }
.alert.ok, .alert.success { background: var(--ok-soft); color: #0E4D31; }
.alert.info { background: var(--info-soft); color: #14365F; }
.messages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--ink); display: block; }
.stat .n { font-size: 26px; font-weight: 750; font-stretch: 87.5%; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.stat.accent .n { color: var(--red); }
a.stat:hover { border-color: var(--line-2); color: var(--ink); }

/* list of cases (cards) */
.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; color: var(--ink);
}
.item:hover { color: var(--ink); border-color: var(--line-2); }
.item .t { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; max-width: 48%; }
.item .meta .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.item > .grow { min-width: 0; }
.item.warn { border-left: 4px solid #E8A33D; }
.item.danger { border-left: 4px solid var(--danger); }
.age { font-size: 12px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.age.warn { color: var(--warn); }
.age.danger { color: var(--danger); }

.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; height: 34px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line-2);
  background: var(--card); display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink);
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (min-width: 1000px) { .chips { margin: 0; padding: 0; flex-wrap: wrap; } }

.search { position: relative; }
.search input[type], .search input { padding-left: 40px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }

/* forms */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label, .label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field .help { font-size: 12px; color: var(--ink-2); }
.field .err, .errorlist { color: var(--danger); font-size: 13px; margin: 0; padding: 0; list-style: none; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search],
input[type=tel], input:not([type]), select, textarea {
  width: 100%; min-height: 44px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff;
  padding: 9px 12px; font-size: 16px; /* 16px keeps iOS from zooming */
}
textarea { min-height: 80px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235D6469' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(93, 100, 105, .15); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--red); }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 600; font-size: 15px; }
.form-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .full { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.sticky-actions { position: sticky; bottom: calc(var(--tabbar) + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); padding: 14px 0 6px; z-index: 5; }
@media (min-width: 1000px) { .sticky-actions { bottom: 0; } }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; font-size: 16px; margin-bottom: 8px; padding: 0; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg); border-radius: 12px; padding: 4px; gap: 4px; }
.segmented label, .segmented button { height: 40px; border-radius: 9px; display: grid; place-items: center; font-weight: 650; font-size: 14px; cursor: pointer; border: 0; background: transparent; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + span, .segmented button.on { background: #fff; box-shadow: var(--shadow); }
.segmented label span { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 9px; }

/* photo slots */
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .slots { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.slot {
  position: relative; aspect-ratio: 1; border: 2px dashed var(--line-2); border-radius: var(--radius); background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 10px; cursor: pointer; overflow: hidden; color: var(--ink-2);
}
.slot input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.slot .name { font-weight: 700; color: var(--ink); font-size: 14px; }
.slot.required .req { color: var(--red); font-size: 12px; font-weight: 700; }
.slot.done { border-style: solid; border-color: var(--ok); }
.slot img.preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .tag { position: absolute; left: 8px; bottom: 8px; z-index: 2; }
.slot.missing { border-color: var(--red); }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .cap { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); color: #fff; font-size: 11px; font-weight: 600; padding: 14px 6px 4px; }
.thumb.file { display: grid; place-items: center; text-align: center; font-size: 12px; padding: 6px; color: var(--ink); word-break: break-all; }

/* details */
dl.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; font-size: 14px; }
dl.facts dt { font-size: 12px; color: var(--ink-2); font-weight: 600; }
dl.facts dd { margin: 0; font-weight: 600; word-break: break-word; }
@media (min-width: 1000px) { dl.facts.wide { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 12px; min-height: 34px; }
.steps .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; margin-top: 4px; flex-shrink: 0; position: relative; }
.steps li:not(:last-child) .dot::after { content: ""; position: absolute; left: 3px; top: 12px; width: 2px; height: 24px; background: var(--line); }
.steps li.done .dot { background: var(--ok); border-color: var(--ok); }
.steps li.done:not(:last-child) .dot::after { background: var(--ok); }
.steps li.now .dot { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.steps li.now .lbl { font-weight: 700; }
.steps .lbl { flex: 1; font-size: 14px; }
.steps .when { font-size: 12px; color: var(--ink-2); }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.timeline li { display: flex; gap: 10px; font-size: 14px; }
.timeline .ico { width: 28px; height: 28px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; flex-shrink: 0; color: var(--ink-2); }
.timeline .who { font-size: 12px; color: var(--ink-2); }
.timeline .chg { font-size: 12px; color: var(--ink-2); }

/* tables */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; color: var(--ink-2); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #FAFBFB; white-space: nowrap; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: #FAFBFB; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t tfoot td { font-weight: 700; background: #FAFBFB; }

/* Excel-like grid (desktop) */
.grid-shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.grid-shell.with-panel { grid-template-columns: minmax(0, 1fr) 400px; }
.grid-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.grid-tools select, .grid-tools input { width: auto; min-height: 36px; padding: 5px 10px; font-size: 14px; }
.grid-tools select { padding-right: 30px; }
.grid-tools .search input { width: 260px; padding-left: 36px; }
.months { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.months button { height: 32px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 650; cursor: pointer; }
.months button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.months button .c { color: var(--ink-2); font-weight: 500; margin-left: 4px; }
.months button.on .c { color: #C8CED2; }
.xl { overflow: auto; max-height: calc(100vh - 230px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.xl-t { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
table.xl-t th {
  position: sticky; top: 0; z-index: 2; background: #F0F2F3; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line);
  padding: 7px 8px; font-size: 12px; font-weight: 700; text-align: left; white-space: nowrap; cursor: pointer; user-select: none;
}
table.xl-t th .ar { color: var(--red); margin-left: 3px; }
table.xl-t th.filter-row { top: 31px; padding: 4px; background: #F7F8F8; cursor: default; }
table.xl-t th.filter-row input, table.xl-t th.filter-row select { min-height: 28px; height: 28px; padding: 2px 6px; font-size: 12px; border-radius: 6px; min-width: 60px; }
table.xl-t td { border-bottom: 1px solid var(--line); border-right: 1px solid #EEF0F1; padding: 6px 8px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
table.xl-t td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.xl-t tbody tr { cursor: pointer; }
table.xl-t tbody tr:hover td { background: #F7F8F8; }
table.xl-t tbody tr.sel td { background: var(--red-soft); }
table.xl-t tbody tr.warn td:first-child { box-shadow: inset 4px 0 0 #E8A33D; }
table.xl-t tbody tr.danger td:first-child { box-shadow: inset 4px 0 0 var(--danger); }
table.xl-t tbody tr.closed td { color: var(--ink-2); }
table.xl-t td .rep { color: var(--red); font-weight: 800; margin-left: 4px; }
table.xl-t tfoot td { position: sticky; bottom: 0; background: #F0F2F3; font-weight: 700; border-top: 1px solid var(--line-2); }
.panel { position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.cols-menu { position: absolute; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; max-height: 360px; overflow: auto; }
.cols-menu label { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 4px 6px; }

/* settings */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 16px; scrollbar-width: none; }
.tabs a { padding: 10px 12px; font-weight: 650; font-size: 14px; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--red); border-color: var(--red); }
.formset td { padding: 6px; }
.formset input[type=text], .formset input:not([type]) { min-height: 36px; padding: 5px 8px; font-size: 14px; }
.picker { display: flex; gap: 8px; }
.picker input { flex: 1; }
dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(33, 37, 41, .45); }
dialog .dh { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
dialog .db { padding: 12px 16px; max-height: 60vh; overflow: auto; }
dialog .df { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.folder-list { list-style: none; margin: 0; padding: 0; }
.folder-list li button { width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 8px; border-radius: 8px; display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: 14px; }
.folder-list li button:hover { background: var(--bg); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(180deg, #fff 0, var(--bg) 100%); }
.login .box { width: 100%; max-width: 380px; }
.login .wordmark { justify-content: center; margin-bottom: 26px; flex-direction: column; gap: 6px; }
.login .wordmark img { height: 30px; }

/* charts */
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 320px; }
.kpi-delta { font-size: 12px; font-weight: 700; }
.bar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bar-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; font-size: 13px; }
.bar-list .bar { grid-column: 1 / -1; height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.bar-list .bar span { display: block; height: 100%; background: var(--red); border-radius: 99px; }

@media print {
  .sidebar, .tabbar, .topbar, .no-print { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; }
  .card { break-inside: avoid; border-color: #ccc; }
}
