/*
 * OperX desktop design (Claude Design prototype, October 2026).
 * New components are unscoped so restructured screens also render on a phone.
 * Restyling of the older classes is scoped to the desktop width, so the phone
 * layout from styles.css stays as it is.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext.01ba6c2a184b.woff2") format("woff2");
  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;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.65850a373e25.woff2") format("woff2");
  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;
}

:root {
  --blue-dark: #0b3a63;
  --nav-active: #1d6fa8;
  --accent-hover: #17b6be;
  --accent-ink: #08343a;
  --ok: #1f7f49;
  --ok-hover: #18683b;
  --danger: #d64545;
  --line-soft: #edf1f5;
  --field-line: #cbd5e1;
  --head-bg: #f8fafc;
  --row-hover: #f8fbfe;
  --row-selected: #eef6fc;
}

/* ---------- Components (all widths) ---------- */

.topbar-title { flex: 1; min-width: 0; }
.topbar-title p { margin: 0.2rem 0 0; color: var(--muted); }

.wordmark { display: inline-flex; align-items: center; gap: 2px; line-height: 1; }
.wordmark svg { display: block; }

.mu { color: var(--muted); }
.sm { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.up { color: #17683a; font-weight: 600; }
.down { color: #a12c2c; font-weight: 600; }
.warn { color: #7a5200; font-weight: 600; }

.page { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ph h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.ph p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; min-width: 0; }
.box.flush { padding: 0; }
.ch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.ch h2 { margin: 0; font-size: 16.5px; font-weight: 650; color: var(--text); }
.ch a { font-size: 13.5px; font-weight: 600; }
.box.flush > .ch { padding: 16px 18px 0; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kpi { display: block; color: inherit; }
a.kpi:hover { text-decoration: none; border-color: #b2cce3; }
.kpi .l { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.kpi .v { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.15; color: var(--text); }
.kpi .v small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.kpi .d { font-size: 13px; margin-top: 6px; color: var(--muted); }

.two { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.two.top { align-items: flex-start; }
.two > .wide { flex: 2 1 560px; min-width: 0; }
.two > .narrow { flex: 1 1 320px; min-width: 0; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }

.scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 10px 12px;
  background: var(--head-bg);
  border-top: 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 11px 12px; border-top: 0; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--row-hover); }
.tbl tr.sel td { background: var(--row-selected); }
.tbl tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--turquoise); }
.tbl .num { text-align: right; }
.tbl a.rb { font-weight: 600; color: var(--text); }
.tbl a.rb:hover { color: var(--blue); }

.bd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.35;
}
.t-blue { background: #e7f0f7; color: #0f4c81; }
.t-teal { background: #e5f8fa; color: #0b6e74; }
.t-amber { background: #fff3d6; color: #7a5200; }
.t-green { background: #e3f4ea; color: #17683a; }
.t-red { background: #fbe7e7; color: #a12c2c; }
.t-crit { background: #a12c2c; color: #fff; }
.t-gray { background: #eceff3; color: #4a5867; }
.t-purple { background: #efeaf8; color: #5a3a9a; }

.av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: #e7f0f7;
  color: #0f4c81;
  flex: none;
  object-fit: cover;
}
.avs { display: flex; }
.avs > * { border: 2px solid #fff; margin-left: -8px; }
.avs > *:first-child { margin-left: 0; }
.who { display: flex; align-items: center; gap: 10px; }
.logo-tile {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--sidebar);
  color: #fff;
  flex: none;
}

.meter { height: 8px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--turquoise); }
.meter.is-short { width: 90px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-filter {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #4a5867;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.chip-filter:hover { text-decoration: none; border-color: #b2cce3; }
.chip-filter span { font-size: 12px; opacity: 0.8; }
.chip-filter.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar form { display: contents; }
.fsearch {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  flex: 1 1 240px;
  max-width: 380px;
  margin: 0;
}
.fsearch input { border: 0; background: none; font: inherit; font-size: 14.5px; color: var(--text); outline: none; width: 100%; max-width: none; padding: 0; min-height: 0; height: auto; }
.toolbar select { width: auto; max-width: 16rem; height: 38px; padding: 0 10px; font-size: 14px; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); color: inherit; }
.li:last-child { border-bottom: 0; }
a.li:hover { text-decoration: none; }
a.li:hover .t { color: var(--blue); }
.li .t { font-weight: 600; font-size: 14.5px; }
.li .s { font-size: 13px; color: var(--muted); }
.box > .empty, .box .empty { padding: 4px 0; }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 9px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 500; }

.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.is-on { color: var(--blue); border-bottom-color: var(--turquoise); }
.tabs a .mu { font-weight: 500; }

.steps { display: flex; gap: 4px; margin: 4px 0 2px; }
.step { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); min-width: 0; }
.step i { display: block; height: 6px; border-radius: 99px; background: var(--line); }
.step.done i { background: var(--turquoise); }
.step.done { color: #0b6e74; }
.step.cur i { background: var(--blue); }
.step.cur { color: var(--blue); }

.split { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.split > .split-list { flex: 3 1 600px; min-width: 0; padding: 0; overflow: hidden; }
.split > .split-detail { flex: 2 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.detail-title { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.detail-title h2 { margin: 4px 0 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }

.timeline { display: flex; flex-direction: column; }
.tli { display: flex; gap: 12px; padding: 0 0 16px; position: relative; }
.tli::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: var(--line-soft); }
.tli:last-child::before { display: none; }
.tli i { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex: none; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--field-line); background: var(--blue); }
.tli .t { font-size: 14px; font-weight: 600; }
.tli .s { font-size: 13px; color: var(--muted); }

.legend { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.legend b { margin-left: auto; font-variant-numeric: tabular-nums; }

.hbar { display: grid; grid-template-columns: minmax(130px, 220px) 1fr 110px; gap: 8px 14px; align-items: center; font-size: 14px; }
.hbar .tr { height: 22px; border-radius: 5px; background: #f5f7fa; overflow: hidden; }
.hbar .tr i { display: block; height: 100%; background: var(--blue); border-radius: 5px; }
.hbar.is-teal .tr i { background: var(--turquoise); }
.hbar.is-red .tr i { background: var(--danger); }
.hbar .n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 220px; border-bottom: 1px solid var(--line); padding-top: 8px; background-image: linear-gradient(var(--line-soft) 1px, transparent 1px); background-size: 100% 55px; }
.bars a, .bars span { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.bars i { display: block; width: 100%; border-radius: 6px 6px 0 0; background: #b8d3ea; }
.bars .hot i { background: var(--blue); }
.bars-x { display: flex; gap: 10px; margin-top: 8px; }
.bars-x span { flex: 1; text-align: center; font-size: 12px; color: var(--muted); }

.donut { width: 168px; height: 168px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.donut > div { width: 112px; height: 112px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut b { font-size: 30px; line-height: 1; }

.avatar-md { width: 30px; height: 30px; font-size: 12px; }
.avs .avatar { border: 2px solid #fff; }
.range-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0; }
.range-form label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; font-weight: 600; color: var(--muted); margin: 0; }
.range-form input { height: 38px; padding: 0 10px; width: auto; }
.dash-crew .access-list { margin: 0 -2px; }
.dash-crew .access-row { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.dash-crew .access-row:first-child { border-top: 0; }
.dash-crew .crew-map-wrap { margin: 0 0 12px; }
.dash-crew .avatar { width: 30px; height: 30px; font-size: 12px; background: #e7f0f7; color: #0f4c81; }
.dash-crew img.avatar { background: none; }

.searchhits { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Desktop restyle of the shell and the older classes ---------- */

@media (min-width: 861px) {
  body { font-family: Inter, Arial, sans-serif; font-size: 15px; line-height: 1.45; }
  a:hover { color: var(--blue-dark); text-decoration: none; }
  button, .button { font: 600 14px/1 Inter, Arial, sans-serif; height: 38px; padding: 0 14px; white-space: nowrap; }
  button:hover, .button:hover { filter: none; background: var(--accent-hover); color: var(--accent-ink); }
  .button-quiet { background: #fff; color: var(--blue); border: 1px solid var(--line); }
  .button-quiet:hover { background: #f5f7fa; color: var(--blue); }
  .button.is-ok { background: var(--ok); color: #fff; }
  .button.is-ok:hover { background: var(--ok-hover); color: #fff; }
  .button.is-sm, button.is-sm { height: 32px; padding: 0 11px; font-size: 13px; }
  .button[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
  input, select, textarea { border-color: var(--field-line); }
  input:focus, select:focus, textarea:focus { outline: 2px solid var(--turquoise); outline-offset: 1px; border-color: var(--turquoise); }

  /* Sidebar */
  .sidebar { padding: 18px 12px 14px; gap: 2px; }
  .brand { padding: 6px 12px 20px; }
  .wordmark { font-size: 24px; letter-spacing: 0.04em; }
  .sidebar nav { gap: 2px; }
  .sidebar nav a { gap: 12px; padding: 9px 12px; font-size: 15px; font-weight: 500; }
  .sidebar nav a img { width: 20px; height: 20px; opacity: 0.9; }
  .sidebar nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
  .sidebar nav a.is-active { background: var(--nav-active); color: #fff; }
  .nav-count { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--turquoise); color: var(--accent-ink); border-radius: 999px; padding: 1px 8px; line-height: 1.5; }
  .sidebar nav a.is-active .nav-count { background: #fff; color: var(--blue); }
  .sidebar-user { padding: 14px 10px 4px; border-top: 1px solid rgba(255, 255, 255, 0.1); align-items: center; font-size: 12.5px; }
  .sidebar-user strong { font-size: 14px; font-weight: 600; }

  /* App bar */
  .appbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 28px; background: #fff; border-bottom: 1px solid var(--line); }
  .crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); min-width: 0; }
  .crumbs b { color: var(--text); font-weight: 600; }
  .appbar-search { margin: 0 0 0 auto; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #f5f7fa; color: var(--muted); min-width: min(100%, 300px); }
  .appbar-search input { border: 0; background: none; font: inherit; font-size: 14px; color: var(--text); outline: none; width: 100%; min-width: 0; max-width: none; padding: 0; height: auto; min-height: 0; }
  .appbar-search:focus-within { border-color: var(--turquoise); background: #fff; }
  .icon-button { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); position: relative; }
  .icon-button:hover { background: #f5f7fa; color: var(--text); }
  .icon-button .pip { position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }

  /* Section tabs under the app bar */
  .section-nav.desktop-only { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 28px; margin: 0; background: #fff; border-bottom: 1px solid var(--line); }
  .section-nav.desktop-only a { padding: 11px 12px; font-size: 14px; font-weight: 600; color: var(--muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -1px; background: none; }
  .section-nav.desktop-only a:hover { color: var(--text); text-decoration: none; }
  .section-nav.desktop-only a.is-active { color: var(--blue); border-bottom-color: var(--turquoise); background: none; }

  /* Page header (former top bar) */
  .topbar { background: none; border: 0; padding: 24px 28px 0; align-items: flex-end; flex-wrap: wrap; gap: 16px; max-width: 1560px; }
  .topbar h1 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
  .topbar-title p { font-size: 15px; margin-top: 4px; }
  .topbar-actions { gap: 8px; align-items: center; }
  main { padding: 20px 28px 48px; max-width: 1560px; }
  .messages { padding: 16px 28px 0; max-width: 1560px; }
  .messages li { border-radius: 10px; font-size: 14px; }
  .support-banner { margin: 16px 28px 0; }
  .storage-banner { margin: 4px 28px 0; max-width: 1504px; }
  .legal-footer { padding: 0 28px 24px; }

  /* Cards, panels, tables */
  .card { border-radius: 12px; padding: 18px 20px; }
  .card h2, .panel h2 { font-size: 13.5px; font-weight: 500; }
  .metric { font-size: 30px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .panel-head h2, .qual-title h2 { font-size: 16.5px; font-weight: 650; color: var(--text); }
  .panel-head { padding: 16px 18px 0; }
  table:not(.tbl) th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; background: var(--head-bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 12px; white-space: nowrap; }
  table:not(.tbl) td { padding: 11px 12px; border-top: 1px solid var(--line-soft); font-size: 14px; }
  table:not(.tbl) thead + tbody tr:first-child td { border-top: 0; }
  .panel table:not(.tbl) tbody tr:hover td { background: var(--row-hover); }

  /* Badges keep their names, the colours follow the prototype tags */
  .badge { border-radius: 999px; padding: 3px 9px; font-size: 12.5px; font-weight: 600; }
  .badge-planned { background: #e5f8fa; color: #0b6e74; }
  .badge-progress { background: #fff3d6; color: #7a5200; }
  .badge-done { background: #e3f4ea; color: #17683a; }
  .badge-open { background: #e7f0f7; color: #0f4c81; }
  .badge-critical { background: #fbe7e7; color: #a12c2c; }
  .badge-muted { background: #eceff3; color: #4a5867; }

  .filters a { border-radius: 999px; height: 34px; display: inline-flex; align-items: center; padding: 0 13px; font-size: 13.5px; font-weight: 600; }
  .qual-bar { background: var(--head-bg); }
}

.stars { color: #b07800; font-weight: 700; }
.pg { display: flex; gap: 4px; }
.pg a { font-size: 13.5px; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text); display: inline-flex; align-items: center; justify-content: center; }
.pg a.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.toolbar .chip-filter { height: 34px; padding: 0 13px; background: #fff; color: #4a5867; border: 1px solid var(--line); font-size: 13.5px; }
.toolbar .chip-filter:hover { background: #fff; color: var(--text); border-color: #b2cce3; }
.toolbar .chip-filter.is-on, .toolbar .chip-filter.is-on:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Detail pages */
.detail-id { display: flex; gap: 16px; align-items: center; min-width: 0; flex: 1; }
.logo-tile.is-lg { width: 60px; height: 60px; border-radius: 14px; font-size: 22px; font-weight: 800; }
.mini-head { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ct { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; position: relative; }
.ct .n { display: flex; align-items: center; gap: 10px; }
.ct .n b { display: block; font-size: 15px; }
.ct .n span:not(.av) { font-size: 13px; color: var(--muted); }
.ct .av { width: 36px; height: 36px; font-size: 13px; }
.ct-remove { position: absolute; top: 10px; right: 12px; margin: 0; }
.link-button, .link-button:hover { background: none; border: 0; padding: 0; height: auto; color: var(--muted); font: 600 12.5px/1 Inter, Arial, sans-serif; cursor: pointer; }
.link-button:hover { color: #a12c2c; background: none; }
.inline-add { margin-top: 14px; }
.inline-add > summary { list-style: none; display: inline-flex; cursor: pointer; }
.inline-add > summary::-webkit-details-marker { display: none; }
.inline-add[open] > summary { margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; margin: 0; }
.form-grid.is-single { grid-template-columns: 1fr; }
.form-grid .field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; margin: 0; }
.form-grid .field input, .form-grid .field select, .form-grid .field textarea { max-width: none; width: 100%; font-weight: 400; }
.form-grid .check-line { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; margin: 0; }
.form-grid .check-line input { width: 16px; height: 16px; }
.form-grid-actions { grid-column: 1 / -1; }
.timeline .tli i.is-ticket { background: var(--danger); }
.timeline .tli i.is-rapport { background: #2eaf62; }
.timeline .tli i.is-auftrag { background: var(--blue); }
.doc-row .doc-ico { width: 36px; height: 36px; border-radius: 8px; background: #fbe7e7; color: #a12c2c; font-style: normal; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }

@media (min-width: 861px) {
  .topbar.detail-head { align-items: flex-start; }
}
.tab-count { font-weight: 500; color: var(--muted); margin-left: 4px; }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.att { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; color: var(--text); margin-top: 8px; }
.att:hover { border-color: #b2cce3; color: var(--text); }
.sig { border: 1px dashed var(--field-line); border-radius: 10px; padding: 10px 14px; background: #fafbfc; }
.sig img { display: block; max-width: 100%; max-height: 90px; margin: 0 auto; }
.split-detail form { margin: 0; }

/* Older cards and rows, restyled to the prototype on desktop */
@media (min-width: 861px) {
  .task-customer, .panel { border-radius: 12px; }
  .task-customer-head { background: #fff; border-bottom: 0; padding: 16px 20px 8px; }
  .task-customer-head h2, .qual-title h2 { font-size: 16.5px; font-weight: 650; }
  .qual-title { padding: 16px 20px 6px; }
  .task-counts span { background: var(--head-bg); border-color: var(--line); font-size: 12.5px; }
  .access-row { padding: 11px 20px; border-top-color: var(--line-soft); }
  .access-row:first-child { border-top: 0; }
  .portal-list { padding: 0 20px 8px; }
  .portal-entry { padding: 11px 0; border-top-color: var(--line-soft); }
  .check-row { padding: 11px 20px; border-top-color: var(--line-soft); }
  .empty { font-size: 14px; }
  .task-customer > .empty, .panel > .empty { padding: 4px 20px 16px; }
  .detail, .form-panel { padding: 18px 20px; }
  .panel.detail dl { grid-template-columns: 150px 1fr; column-gap: 14px; }
  .panel.detail dl > div { display: contents; }
  .panel.detail dt { font-size: 14px; }
  .panel.detail dd { font-weight: 500; font-size: 14px; }
  .stack { gap: 16px; }
  .task-customer + .task-customer, .panel + .task-customer, .panel + .panel { margin-top: 16px; }
  .stack > .task-customer + .task-customer, .stack > .panel + .task-customer, .stack > .panel + .panel { margin-top: 0; }
  .qual-bar { border-top-color: var(--line-soft); padding: 14px 20px 16px; }
  .qual-bar label { font-size: 13px; }
  .user-main strong { font-weight: 600; }
  .task-meta { font-size: 13px; }
  label { font-size: 14px; }
  input, select, textarea { border-radius: 8px; font: 400 14.5px/1.4 Inter, Arial, sans-serif; }
  .status-log li { padding: 11px 20px; }
}

/* Ticket communication */
.msgs { display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 10px; }
.msg .bub { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.5; background: #fff; min-width: 0; }
.msg.cust .bub { background: #f5f7fa; }
.msg.int .bub { background: #fffbef; border-color: #f2d388; }
.msg .hd { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.msg .hd b { color: var(--text); font-size: 13.5px; }
.compose { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0; }
.compose textarea { font: inherit; font-size: 14.5px; border: 1px solid var(--field-line); border-radius: 10px; padding: 10px 12px; min-height: 80px; resize: vertical; max-width: none; width: 100%; }

/* Object page */
.obj-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.obj-tree { flex: 1 1 260px; max-width: 100%; padding: 14px; }
.obj-body { flex: 999 1 620px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.obj { display: flex; flex-direction: column; gap: 1px; padding: 9px 10px; border-radius: 8px; font-size: 14px; color: var(--text); }
.obj:hover { background: #f5f7fa; color: var(--text); }
.obj span { font-size: 12.5px; color: var(--muted); }
.obj.is-on { background: #e7f0f7; }
.bld { margin: 8px 0 2px 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fl { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 7px 10px 7px 24px; border-radius: 8px; color: var(--text); }
.fl:hover { background: #f5f7fa; color: var(--text); }
.fl.is-on { background: var(--blue); color: #fff; }
.fl b { margin-left: auto; font-size: 12px; font-weight: 600; opacity: 0.75; }
.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.area-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.area-card b { font-size: 14.5px; }
.area-remove { position: absolute; top: 10px; right: 12px; margin: 0; }
.qr-box { width: 168px; height: 168px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.qr-box svg { width: 100%; height: 100%; }
.qr-box.is-empty { background: repeating-linear-gradient(135deg, #f5f7fa 0 8px, #eef1f5 8px 16px); }
.ins { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; counter-reset: n; }
.ins li { display: flex; gap: 12px; font-size: 14.5px; line-height: 1.5; align-items: flex-start; }
.ins li::before { counter-increment: n; content: counter(n); flex: none; width: 26px; height: 26px; border-radius: 50%; background: #e5f8fa; color: #0b6e74; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ins form { margin: 0; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo { margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.photo img { width: 100%; height: 104px; object-fit: cover; display: block; }
.photo figcaption { padding: 8px 10px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.photo figcaption b { display: block; font-size: 13px; color: var(--text); }
.inline-add.is-right { margin-top: 0; }
.inline-add.is-right[open] { flex-basis: 100%; }

/* Quality */
.tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tpl { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.tpl b { font-size: 15.5px; }
.tpl.is-off { opacity: 0.7; }
.tpl.is-new { border-style: dashed; }
.grp { margin-top: 18px; }
.grp:first-of-type { margin-top: 4px; }
.grp h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.item { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.item > span:first-child { flex: 1 1 240px; font-size: 14.5px; }
.item form { margin: 0; }
.item-note { flex: 1 1 100%; max-width: none; height: 34px; font-size: 13.5px; }
.pf { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pf label { margin: 0; display: block; cursor: pointer; }
.pf input { position: absolute; opacity: 0; pointer-events: none; }
.pf span { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; font-size: 13px; font-weight: 600; color: #4a5867; background: #fff; border-right: 1px solid var(--line); }
.pf label:last-child span { border-right: 0; }
.pf input:focus-visible + span { outline: 2px solid var(--turquoise); outline-offset: -2px; }
.pf .pf-yes input:checked + span { background: var(--ok); color: #fff; }
.pf .pf-no input:checked + span { background: var(--danger); color: #fff; }
.pf .pf-na input:checked + span { background: var(--muted); color: #fff; }
.pf input:disabled + span { cursor: default; }
.ring { width: 150px; height: 150px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.ring > div { width: 118px; height: 118px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .score { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }

/* Generic forms (form_page.html) in two columns on desktop */
@media (min-width: 1100px) {
  form.form-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 24px; align-items: start; }
  form.form-panel > * { grid-column: 1 / -1; }
  form.form-panel > p { grid-column: auto; }
  form.form-panel > p:has(textarea), form.form-panel > p:has(ul), form.form-panel > p:has(#id_reports) { grid-column: 1 / -1; }
  form.form-panel > p input, form.form-panel > p select, form.form-panel > p textarea { max-width: none; width: 100%; }
}
@media (min-width: 861px) {
  form.form-panel input[type="checkbox"], form.form-panel input[type="radio"] { width: 18px; height: 18px; max-width: none; accent-color: var(--blue); }
  form.form-panel label { font-size: 13.5px; }
  form.form-panel .hint { display: block; font-size: 12.5px; margin-top: 4px; }
}

/* Planning week board */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg a, .seg button { font: 600 13.5px/1 Inter, Arial, sans-serif; height: 36px; padding: 0 14px; border: 0; border-right: 1px solid var(--line); background: #fff; color: #4a5867; display: inline-flex; align-items: center; border-radius: 0; }
.seg a:last-child, .seg button:last-child { border-right: 0; }
.seg a:hover { background: #f5f7fa; color: var(--text); }
.seg .is-on { background: #e7f0f7; color: var(--blue); }
.board { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.board-grid { display: grid; grid-auto-flow: column; grid-template-rows: auto repeat(var(--rows), minmax(96px, auto)); grid-template-columns: 220px repeat(var(--days), minmax(140px, 1fr)); min-width: 1100px; }
.board .hcell { padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--head-bg); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line-soft); }
.board .hcell.today { color: var(--blue); background: #e7f0f7; }
.board .emp { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line); }
.board .emp b { display: block; font-size: 14px; }
.board .emp .sm { display: block; }
.board .hrs { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.board .hb { width: 56px; height: 5px; border-radius: 9px; background: var(--line-soft); overflow: hidden; }
.board .hb i { display: block; height: 100%; background: var(--turquoise); }
.board .cell { padding: 6px; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.board .cell.today { background: #f7fbfe; }
.board .cell.abs { background: repeating-linear-gradient(135deg, #f5f7fa 0 8px, #eef1f5 8px 16px); }
.board .cell.over { outline: 2px dashed var(--turquoise); outline-offset: -3px; background: #f0fbfc; }
.job { display: block; text-align: left; font-size: 12.5px; line-height: 1.3; padding: 7px 8px; border-radius: 7px; border: 1px solid hsl(var(--order-hue, 198) 50% 78%); background: hsl(var(--order-hue, 198) 60% 95%); color: hsl(var(--order-hue, 198) 60% 20%); cursor: grab; }
.job:hover { color: hsl(var(--order-hue, 198) 60% 15%); border-color: hsl(var(--order-hue, 198) 50% 60%); }
.job b { display: block; font-size: 12.5px; }
.job .badge { margin-top: 4px; font-size: 11px; padding: 1px 7px; }
.job.is-conflict, .job.is-overlap { border-color: #d64545; }
.job.is-dragging { opacity: 0.5; }
.absl { font-size: 12.5px; font-weight: 600; color: #4a5867; padding: 2px 4px; }
.absl.is-requested { font-style: italic; }
.queue { display: flex; flex-wrap: wrap; gap: 10px; }
.queue .job { width: 220px; }
.tbl.is-compact th { font-size: 11.5px; padding: 8px; }
.tbl.is-compact td { padding: 9px 8px; font-size: 13.5px; }
.tbl .ok { color: #17683a; font-weight: 700; }
.tbl .exp { color: #7a5200; font-weight: 600; font-size: 12px; }
.tbl .no { color: #a9b4c0; }
.cols.is-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.vbars { display: flex; align-items: flex-end; gap: 16px; height: 150px; border-bottom: 1px solid var(--line); padding: 0 8px; }
.vbars div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; font-size: 13px; font-weight: 700; }
.vbars i { display: block; width: 100%; max-width: 56px; border-radius: 6px 6px 0 0; background: var(--blue); min-height: 2px; }
.day-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.crew-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -2px 0 8px; }
.crew-head .sm { font-size: 12px; }

/* Settings with a side menu */
.settings-layout { display: block; }
@media (min-width: 861px) {
  .settings-layout { display: flex; gap: 20px; align-items: flex-start; }
  .settings-menu { flex: 0 0 220px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; }
  .settings-menu .sec { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); padding: 12px 12px 4px; }
  .settings-menu .sec:first-child { padding-top: 0; }
  .settings-menu a { font-size: 14.5px; font-weight: 500; padding: 9px 12px; border-radius: 8px; color: var(--text); }
  .settings-menu a:hover { background: #eceff3; color: var(--text); }
  .settings-menu a.is-on { background: #fff; color: var(--blue); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
  .settings-panel { flex: 1; min-width: 0; }
}

/* Login */
.login { display: flex; flex-wrap: wrap; min-height: 100vh; padding: 0; max-width: none; background: #f5f7fa; font-family: Inter, Arial, sans-serif; }
.login-brand { flex: 1 1 520px; background: var(--sidebar); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; gap: 44px; min-width: 0; }
.login-mark .wordmark { color: #fff; font-size: 30px; font-weight: 800; letter-spacing: 0.04em; }
.login-mark .wordmark svg { width: 26px; height: 26px; }
.login-claim { display: flex; flex-direction: column; gap: 18px; max-width: 560px; }
.login-pill { align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: rgba(29, 202, 211, 0.14); color: #7fe6ec; font-size: 13.5px; font-weight: 600; }
.login-claim h1 { margin: 0; font-size: 44px; line-height: 1.12; font-weight: 800; letter-spacing: -0.025em; }
.login-claim p { margin: 0; font-size: 18px; line-height: 1.55; color: #c5d2e1; }
.login-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; max-width: 520px; }
.login-points li { display: flex; gap: 14px; align-items: flex-start; }
.login-points i { flex: none; width: 36px; height: 36px; border-radius: 10px; background: rgba(29, 202, 211, 0.14); color: var(--turquoise); display: flex; align-items: center; justify-content: center; }
.login-points b { display: block; font-size: 16px; font-weight: 600; }
.login-points span { color: #afc0d3; font-size: 14.5px; }
.login-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 12px; color: #8fa3ba; font-size: 13.5px; }
.login-form-wrap { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; min-width: 0; }
.login-form { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px; margin: 0; }
.login-icon { display: none; border-radius: 14px; }
.login-form h2 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.login-form p.mu { margin: 6px 0 0; font-size: 16px; }
.login-form .field { display: flex; flex-direction: column; gap: 7px; font-size: 14px; font-weight: 600; color: var(--text); margin: 0; }
.login-form .field-row { display: flex; justify-content: space-between; align-items: center; margin: 0; font-size: 14px; }
.login-form .field-row a { font-size: 13.5px; font-weight: 600; }
.login-form input { font: 400 16px Inter, Arial, sans-serif; height: 48px; padding: 0 14px; border: 1px solid var(--field-line); border-radius: 10px; background: #fff; width: 100%; max-width: none; }
.login-form .pw { position: relative; }
.login-form .pw input { padding-right: 96px; }
.pw-toggle, .pw-toggle:hover { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 10px; border: 0; background: none; color: var(--blue); font: 600 13px Inter, Arial, sans-serif; border-radius: 8px; }
.pw-toggle:hover { background: #f0f4f8; }
.login-go { height: 50px; border-radius: 10px; font-size: 16px; font-weight: 700; display: flex; justify-content: center; gap: 8px; }
.login-qr { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
.login-qr-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.login-qr p { margin: 0; font-size: 14.5px; line-height: 1.45; font-weight: 400; color: var(--muted); }
.login-qr img { width: 196px; height: 196px; border-radius: 12px; background: #fff; border: 1px solid #e2e8f0; }
.login-qr-refresh { height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid #c5d0dc; background: #fff; color: var(--text); font: 600 14px Inter, Arial, sans-serif; cursor: pointer; }
.login-alt { margin: 4px 0 0; font-size: 14.5px; color: var(--muted); text-align: center; }
.login-legal { display: flex; justify-content: center; gap: 16px; margin: 0; font-size: 13px; }
.login-legal a { color: var(--muted); }
.login .messages { padding: 0; }
@media (max-width: 860px) {
  .login-brand { display: none; }
  .login-icon { display: block; }
  .login-form-wrap { padding: 32px 20px; }
}

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; }
  .topbar-title { flex: 1 1 100%; }
  .topbar-actions { flex: 1 1 100%; }
  .range-form label { flex: 1 1 40%; }
  .range-form input { width: 100%; max-width: none; }
  .split > .split-list, .split > .split-detail, .two > .wide, .two > .narrow { flex-basis: 100%; }
}

/* Notification settings */
.notice-settings { display: flex; flex-direction: column; gap: 16px; margin: 0; max-width: 900px; }
.notice-head, .notice-row { display: grid; grid-template-columns: 1fr repeat(3, 72px); gap: 12px; align-items: center; }
.notice-head { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.notice-head span { text-align: center; }
.notice-row { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.notice-row:last-child { border-bottom: 0; }
.notice-row b { display: block; font-size: 14.5px; }
.switch { position: relative; display: inline-flex; justify-content: center; margin: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 44px; height: 26px; border-radius: 99px; background: #b8c3cf; position: relative; transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { left: 21px; }
.switch input:focus-visible + span { outline: 2px solid var(--turquoise); outline-offset: 2px; }
.switch em { display: none; }
.quiet-grid { grid-template-columns: repeat(2, minmax(0, 160px)); }
@media (max-width: 600px) {
  .notice-head { display: none; }
  .notice-row { grid-template-columns: repeat(3, auto); justify-content: start; gap: 10px 18px; }
  .notice-row > div { grid-column: 1 / -1; }
  .switch { gap: 6px; align-items: center; }
  .switch em { display: inline; font-style: normal; font-size: 13px; font-weight: 600; }
}
.tbl .no { color: #a9b4c0; }
.stat-val { display: inline-block; min-width: 28px; padding: 2px 8px; border-radius: 999px; font-weight: 600; text-align: center; }
a.stat-val:hover { text-decoration: none; filter: brightness(0.96); }
.stat-val.badge-open { background: #e7f0f7; color: #0f4c81; }
.stat-val.badge-planned { background: #e5f8fa; color: #0b6e74; }
.stat-val.badge-progress { background: #fff3d6; color: #7a5200; }
.stat-val.badge-done { background: #e3f4ea; color: #17683a; }
.stat-val.badge-critical { background: #fbe7e7; color: #a12c2c; }
.stat-val.badge-muted { background: #eceff3; color: #4a5867; }
.hints { display: flex; flex-direction: column; gap: 8px; }
.hint-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 14px; border: 1px solid #f2d388; background: #fffbef; border-radius: 10px; font-size: 14px; }
.hint-row a { font-weight: 600; white-space: nowrap; }
.trend { display: flex; gap: 6px; overflow-x: auto; }
.trend-col { flex: 1 0 34px; display: flex; flex-direction: column; min-width: 34px; }
.trend-bars { height: 180px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line); background-image: linear-gradient(var(--line-soft) 1px, transparent 1px); background-size: 100% 45px; }
.trend-bars i { display: block; width: 100%; max-width: 18px; border-radius: 4px 4px 0 0; }
.trend-col span { font-size: 11px; color: var(--muted); text-align: center; padding-top: 6px; white-space: nowrap; }

/* Documents */
.upload-box > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.upload-box > summary::-webkit-details-marker { display: none; }
.upload-box > summary h2 { margin: 0; font-size: 16.5px; font-weight: 650; }
.upload-box[open] > summary { margin-bottom: 16px; }
.upload-box:not([open]) { display: none; }
.dropzone { grid-column: 1 / -1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 2px dashed var(--field-line); border-radius: 12px; background: #fafbfc; text-align: center; cursor: pointer; margin: 0; font-weight: 400; }
.dropzone:hover, .dropzone.is-over { border-color: var(--turquoise); background: #f0fbfc; }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; max-width: none; }
.dz-icon { color: var(--blue); }
.doc-ico { width: 36px; height: 36px; border-radius: 8px; background: #e7f0f7; color: #0f4c81; font-style: normal; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.doc-ico.is-pdf { background: #fbe7e7; color: #a12c2c; }
.doc-ico.is-image { background: #e3f4ea; color: #17683a; }
.versions { margin-top: 2px; }
.versions summary { cursor: pointer; }
.versions a { display: block; padding: 2px 0; }
.icon-link { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; color: var(--blue); }
.icon-link:hover { background: #f5f7fa; }
.doc-table form { margin: 0; }
.preview { width: min(1000px, 94vw); height: min(86vh, 900px); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 20px 60px rgba(16, 32, 51, 0.35); }
.preview::backdrop { background: rgba(16, 32, 51, 0.55); }
.preview[open] { display: flex; flex-direction: column; }
.preview-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.preview-body { flex: 1; min-height: 0; background: #f5f7fa; display: flex; align-items: center; justify-content: center; }
.preview-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.preview-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
button.icon-link, button.icon-link:hover { background: #fff; padding: 0; height: 32px; width: 32px; color: var(--blue); }
button.icon-link:hover { background: #f5f7fa; }

/* Reminders */
.plan-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.plan-row:last-child { border-bottom: 0; }
.plan-row b { font-size: 15px; }
.plan-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.plan-step { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #fff3d6; color: #7a5200; }
.plan-step.is-due { background: #e7f0f7; color: #0f4c81; }
.plan-arrow { color: var(--muted); font-size: 13px; }
.plan-row .inline-add[open] { flex-basis: 100%; }
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--head-bg); }
#bulk { margin: 0; }
.toolbar input[type="date"] { width: auto; height: 38px; padding: 0 10px; max-width: 11rem; }
.tbl input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); }
.split > .split-detail.is-narrow { flex: 1 1 340px; max-width: 420px; }
@media (max-width: 860px) { .split > .split-detail.is-narrow { max-width: none; } }
.qty-input { width: 72px; height: 32px; padding: 0 8px; text-align: right; }
.material-add, .photo-add { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.reject > summary { list-style: none; width: 100%; justify-content: center; display: flex; cursor: pointer; }
.reject > summary::-webkit-details-marker { display: none; }
.signature-pad { width: 100%; max-width: none; }
.check-item { cursor: pointer; margin: 0; font-weight: 500; }
.check-item input { width: 18px; height: 18px; accent-color: var(--blue); flex: none; }
.check-item > span:first-of-type { flex: 1 1 auto; }
.status-other > summary { cursor: pointer; }
.status-other form { margin: 0; }

/* Rollen */
.role-table th.role-col, .role-table td.role-col { text-align: center; width: 96px; }
.role-table th.role-col { cursor: help; white-space: nowrap; }
.role-table th.role-col .sm { font-weight: 500; }
.role-table td { vertical-align: middle; }
.role-user { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.role-user .avatar { width: 36px; height: 36px; flex: none; }
.switch.is-locked { cursor: not-allowed; opacity: 0.6; }
.role-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.role-legend-item { border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px; background: var(--head-bg); }
.role-legend-item p { margin: 6px 0 0; }
.fl-add { padding: 2px 10px 6px 24px; }
.fl-add summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--nav-active); list-style: none; padding: 4px 0; }
.fl-add summary::-webkit-details-marker { display: none; }
.fl-add[open] summary { margin-bottom: 6px; }
.fl-add .form-grid { gap: 8px; }

/* Kundenportal */
.form-grid .field.is-wide { grid-column: 1 / -1; }
.portal-obj { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; margin-bottom: 8px; }
.portal-obj:hover { border-color: var(--nav-active); background: var(--row-hover); }
.portal-obj b { font-size: 14.5px; }
.portal-obj-link { font-size: 13px; font-weight: 600; color: var(--nav-active); margin-top: 4px; }
details.box > summary.portal-summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
details.box > summary.portal-summary::-webkit-details-marker { display: none; }
.portal-summary h2 { margin: 0; }
.portal-summary h2::before { content: "+ "; color: var(--nav-active); }
details[open] > .portal-summary h2::before { content: "– "; }
.portal-quote { display: flex; flex-wrap: wrap; gap: 14px 24px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.portal-quote .grow { flex: 1 1 360px; min-width: 0; }
.portal-quote-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.portal-amount { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Plattform */
.platform-h { margin: 8px 0 -4px; font-size: 18px; }
details.box > summary.platform-summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
details.box > summary.platform-summary::-webkit-details-marker { display: none; }
.platform-summary h2 { margin: 0; }
.platform-summary h2::before { content: "+ "; color: var(--nav-active); }
details[open] > .platform-summary h2::before { content: "– "; }
details.health-quiet > summary { cursor: pointer; list-style: none; }
details.health-quiet > summary::-webkit-details-marker { display: none; }
details.health-quiet > summary b::before { content: "+ "; color: var(--nav-active); }
details.health-quiet[open] > summary b::before { content: "– "; }
