/* PrestServ intranet styles. Direction "Flux" (Robi, 28.10.2026; canvas "PrestServ redesign", board "Varianta aleasă"):
   navy night with blue, cyan and a little coal-amber light behind frosted glass; Chakra Petch for headings and
   figures, Figtree for text; the data shown like mockup 1 (big figure, a bar per mine). A light version for daytime.
   The phone gets the module menu as a bottom tab bar; the desktop keeps it on top.
   One block per pattern: font, tokens, base, layout, top menu, page title, panel, table, form, button, status,
   message, then the HR pages and the shift schedule.
   Colour meanings stay: doubles orange (--dbl), the night's 8 red (--night), errors red, warnings amber, weekends marked. */

/* ---- Fonts, self-hosted (SIL OFL: static/fonts/OFL-*.txt); latin + latin-ext cover Romanian ---- */
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/figtree-latin-ext.eca8d8b337ff.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/figtree-latin.202cfb54d4e6.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; }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/chakra-petch-600-latin-ext.a30168238959.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/chakra-petch-600-latin.27489a499469.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; }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/chakra-petch-700-latin-ext.94f475bda643.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/chakra-petch-700-latin.56706b63a0f0.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; }

/* ---- Tokens: dark is the default look (Robi, 21.10.2026); light via the theme switch ---- */
:root {
  --font: "Figtree", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-display: "Chakra Petch", "Figtree", system-ui, sans-serif;
  --radius: 14px; --radius-lg: 22px; --radius-sm: 10px;
  --bg: #e6effc; --surface: rgba(255, 255, 255, 0.62); --surface-alt: rgba(255, 255, 255, 0.85); --field: #ffffff;
  --text: #0b2a5b; --muted: #3e5c89; --border: rgba(11, 42, 91, 0.12); --edge: rgba(255, 255, 255, 0.95);
  --accent: #1d6fe0; --accent-2: #2f86f0; --on-accent: #ffffff; --accent-soft: rgba(29, 111, 224, 0.1);
  --ok: #12805a; --ok-soft: rgba(18, 128, 90, 0.1); --bad: #c0302b; --bad-soft: rgba(192, 48, 43, 0.09);
  --warn: #8f5f00; --warn-soft: rgba(148, 98, 0, 0.1);
  --night: #c8323f; --dbl: #b85d00; --leave: #4b52c9; --off: rgba(29, 111, 224, 0.05); --hole: #f3f7fd;
  --glow-1: rgba(29, 111, 224, 0.32); --glow-2: rgba(0, 190, 255, 0.28); --glow-3: rgba(245, 165, 36, 0.16);
  --bar: rgba(255, 255, 255, 0.88); --data-glow: transparent;
  --shadow: 0 1px 0 var(--edge) inset, 0 1px 2px rgba(11, 42, 91, 0.06), 0 18px 40px -18px rgba(11, 42, 91, 0.35);
  --shadow-sm: 0 1px 2px rgba(11, 42, 91, 0.12), 0 4px 12px -4px rgba(11, 42, 91, 0.22);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
      --bg: #08132e; --surface: rgba(255, 255, 255, 0.065); --surface-alt: rgba(255, 255, 255, 0.09); --field: #0f1d3f;
      --text: #e8f0ff; --muted: #9db2d6; --border: rgba(255, 255, 255, 0.1); --edge: rgba(255, 255, 255, 0.16);
      --accent: #6fd3ff; --accent-2: #2f7fdb; --on-accent: #06142e; --accent-soft: rgba(111, 211, 255, 0.12);
      --ok: #45e0a8; --ok-soft: rgba(69, 224, 168, 0.12); --bad: #ff8178; --bad-soft: rgba(255, 129, 120, 0.12);
      --warn: #f5a524; --warn-soft: rgba(245, 165, 36, 0.14);
      --night: #ff8a92; --dbl: #ffad60; --leave: #a7adff; --off: rgba(111, 211, 255, 0.06); --hole: #0f1d3f;
      --glow-1: rgba(29, 111, 224, 0.55); --glow-2: rgba(0, 200, 255, 0.26); --glow-3: rgba(245, 165, 36, 0.16);
      --bar: rgba(10, 22, 52, 0.86); --data-glow: rgba(111, 211, 255, 0.45);
      --shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 30px 60px -30px rgba(0, 0, 0, 0.75);
      --shadow-sm: 0 2px 10px -2px rgba(0, 0, 0, 0.5);
      color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #08132e; --surface: rgba(255, 255, 255, 0.065); --surface-alt: rgba(255, 255, 255, 0.09); --field: #0f1d3f;
    --text: #e8f0ff; --muted: #9db2d6; --border: rgba(255, 255, 255, 0.1); --edge: rgba(255, 255, 255, 0.16);
    --accent: #6fd3ff; --accent-2: #2f7fdb; --on-accent: #06142e; --accent-soft: rgba(111, 211, 255, 0.12);
    --ok: #45e0a8; --ok-soft: rgba(69, 224, 168, 0.12); --bad: #ff8178; --bad-soft: rgba(255, 129, 120, 0.12);
    --warn: #f5a524; --warn-soft: rgba(245, 165, 36, 0.14);
    --night: #ff8a92; --dbl: #ffad60; --leave: #a7adff; --off: rgba(111, 211, 255, 0.06); --hole: #0f1d3f;
    --glow-1: rgba(29, 111, 224, 0.55); --glow-2: rgba(0, 200, 255, 0.26); --glow-3: rgba(245, 165, 36, 0.16);
    --bar: rgba(10, 22, 52, 0.86); --data-glow: rgba(111, 211, 255, 0.45);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 30px 60px -30px rgba(0, 0, 0, 0.75);
    --shadow-sm: 0 2px 10px -2px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); font-weight: 400; }
/* The lights behind the glass: blue, cyan and a little coal amber, fixed so the page scrolls over them */
body::before { content: ""; position: fixed; inset: -10%; z-index: -1; pointer-events: none; filter: blur(10px);
  background:
    radial-gradient(38% 45% at 12% 38%, var(--glow-1), transparent 70%),
    radial-gradient(34% 40% at 92% 78%, var(--glow-2), transparent 70%),
    radial-gradient(26% 30% at 88% 6%, var(--glow-3), transparent 70%); }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2 { margin: 0; line-height: 1.2; font-weight: 600; }
h1 { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; }
h2 { font-size: 1rem; }
svg.icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Glass: every tile, the top menu and dialogs share it */
.panel, .topnav, .card-stat, dialog, .cards {
  background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
}

/* ---- Layout: the top menu, then the page ---- */
.layout { min-height: 100vh; padding: 14px 14px 48px; }
.content { width: min(1560px, 100%); margin: 18px auto 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
.content--narrow { max-width: 440px; width: 100%; margin: 4rem auto; padding: 0; }

/* ---- Top menu: brand, the sections with icons, search, theme, user (Robi, 26.10.2026) ---- */
.topnav { position: sticky; top: 14px; z-index: 20; width: min(1560px, 100%); margin: 0 auto; min-height: 64px; border-radius: var(--radius-lg);
  display: flex; align-items: center; gap: 1rem; padding: 8px 10px 8px 12px; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; white-space: nowrap; }
.brand__mark { display: block; width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 6px 16px -6px rgba(29, 111, 224, 0.8); }
.topnav__menu { display: flex; gap: 2px; padding: 4px; margin: 0 auto; border-radius: 16px; background: var(--accent-soft); scrollbar-width: none; }
.topnav__menu a, .topnav__menu .is-soon { display: flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.8rem; border-radius: 12px; color: var(--muted);
  text-decoration: none; font-size: 0.87rem; white-space: nowrap; transition: background .2s, color .2s; }
.topnav__menu a:hover { color: var(--text); }
.topnav__menu a[aria-current="page"] { color: #fff; background: linear-gradient(180deg, #2f7fdb, #1d5fc0); font-weight: 600; box-shadow: 0 6px 16px -6px rgba(47, 127, 219, 0.9); }
.topnav__menu .is-soon { opacity: 0.55; cursor: default; }
.topnav__end { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.layout--plain .brand__text { display: inline !important; }
.topnav__end form { margin: 0; }
.topbar__search { display: flex; align-items: center; gap: 0.4rem; height: 40px; padding: 0 0.8rem; border-radius: 12px; background: var(--surface-alt); color: var(--muted); }
.topbar__search input { width: 10rem; border: 0; outline: 0; background: none; font: inherit; font-size: 0.9rem; color: var(--text); }
.topbar__search input::placeholder { color: var(--muted); }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: var(--surface-alt);
  color: var(--muted); cursor: pointer; text-decoration: none; }
.icon-btn:hover { color: var(--text); }
/* Setări: the gear next to the exit (Robi, 26.10.2026); it opens the four settings pages */
.settings-btn { list-style: none; }
.settings-btn::-webkit-details-marker { display: none; }
.settings-btn svg.icon { width: 21px; height: 21px; }
.settings-btn:hover, .settings-menu[open] .settings-btn { color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.settings-btn.is-current { color: var(--accent); background: var(--accent-soft); }
.more__menu a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 500; }

/* Settings pages: a second row of pills under the page title */
.subnav { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 16px; background: var(--accent-soft); justify-self: start; }
.subnav a { padding: 0.4rem 0.9rem; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 0.88rem; }
.subnav a[aria-current="page"] { color: var(--text); background: var(--surface-alt); box-shadow: var(--shadow-sm); }

/* ---- Page title ---- */
.page-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem 1.25rem; padding: 0.4rem 0.3rem 0.2rem; }
.muted { color: var(--muted); }
.page-title .muted { margin: 0.35rem 0 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 -0.4rem; padding: 0 0.3rem; list-style: none; font-size: 0.84rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 0.35rem; opacity: 0.5; }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---- Panel (a glass tile) ---- */
.panel { border-radius: var(--radius-lg); padding: 1.25rem 1.4rem; min-width: 0; }
.panel--table { padding: 0.4rem 0.5rem 0.5rem; overflow-x: auto; }
.panel + h2, .content > h2 { margin-top: 0.5rem; padding: 0 0.3rem; }
.panel > h2 { margin-bottom: 0.85rem; }

/* ---- Table ---- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.65rem 0.85rem; text-align: left; vertical-align: top; }
.table thead th { color: var(--muted); font-size: 0.82em; font-weight: 500; white-space: nowrap; }
.table tbody td, .table tbody th { border-top: 1px solid var(--border); }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover > * { background: var(--accent-soft); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
@media (max-width: 1000px) { .hide-narrow { display: none; } }

/* ---- Compact table: months grid, rows grouped per person ---- */
.table--compact th, .table--compact td { padding: 0.38rem 0.5rem; }
.table--compact tbody.group > tr:first-child > * { border-top: 2px solid var(--border); }
.table--compact tbody th[scope="rowgroup"] { vertical-align: top; text-align: left; font-weight: 500; }
.table--compact .row--taken td { background: var(--off); }
.table tfoot th, .table tfoot td { border-top: 2px solid var(--border); font-weight: 500; }

/* ---- Facts list (label: value) ---- */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1.5rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* ---- Start page: the figures as one strip of glass ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border-radius: var(--radius-lg); overflow: hidden; }
.cards .card-stat { background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-left: 1px solid var(--border); border-radius: 0; }
.cards .card-stat:first-child { border-left: 0; }
.card-stat { display: flex; flex-direction: column; gap: 0.15rem; color: inherit; text-decoration: none; padding: 1.1rem 1.4rem; border-radius: var(--radius-lg); transition: background .15s; }
.card-stat:hover { background: var(--surface-alt); }
.card-stat__value { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; line-height: 1.05; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.card-stat__label { color: var(--muted); font-size: 0.88em; }
.two-columns { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; align-items: start; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.55rem 0; border-top: 1px solid var(--border); }
.list li:first-child { border-top: 0; padding-top: 0.1rem; }
.list strong { font-weight: 500; font-size: 1.08em; }
.stack { display: grid; gap: 16px; }
.spaced { margin-top: 1.25rem; }

/* ---- Form ---- */
.field { margin-bottom: 0.95rem; }
.field label { display: block; margin-bottom: 0.3rem; font-weight: 500; font-size: 0.9em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.55rem 0.75rem; font: inherit; color: var(--text);
  background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 1px 2px rgba(30, 60, 70, 0.06) inset;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--accent); outline-offset: 0; }
.field--checks div { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.field--checks label { font-weight: 400; display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; }
.field--checks input { width: auto; }
.field--check label { display: flex; align-items: center; gap: 0.55rem; font-weight: 400; }
.field--check input { width: auto; box-shadow: none; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; }
.month-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 0.6rem; }
.month-grid .field { margin-bottom: 0.5rem; }
.field__error { margin: 0.25rem 0 0; color: var(--bad); font-size: 0.9em; }
.panel--form { max-width: 560px; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* ---- Button ---- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 40px; padding: 0 1.1rem;
  font: inherit; font-size: 0.9em; font-weight: 500; line-height: 1.2; color: #fff; text-decoration: none; white-space: nowrap; cursor: pointer;
  background: linear-gradient(180deg, #2f7fdb, #1d5fc0); border: 0; border-radius: 13px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 10px 22px -10px rgba(47, 127, 219, 0.9);
}
.button:hover { filter: brightness(1.06); }
.button--plain { color: var(--text); background: var(--surface-alt); box-shadow: 0 0 0 1px var(--border) inset; font-weight: 500; }
.button--plain:hover { filter: none; box-shadow: 0 0 0 1px var(--accent) inset; }
.button--block { display: flex; width: 100%; min-height: 46px; }
.passkey-login { margin-top: 0.7rem; }
.button[disabled] { opacity: 0.45; cursor: not-allowed; filter: none; }
.button--danger { color: var(--bad); background: var(--bad-soft); box-shadow: 0 0 0 1px var(--bad) inset; }
.button--danger:hover { filter: none; background: rgba(192, 48, 43, 0.16); }
.link-btn { font: inherit; font-size: 0.88em; color: var(--accent); background: none; border: 0; cursor: pointer; padding: 0.1rem 0.3rem; }
.link-btn:hover { text-decoration: underline; }

/* ---- Status chip ---- */
.status { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.7rem; border-radius: 999px; font-size: 0.8em; font-weight: 500; white-space: nowrap; }
.status--ok { color: var(--ok); background: var(--ok-soft); }
.status--off { color: var(--muted); background: var(--surface-alt); box-shadow: 0 0 0 1px var(--border) inset; }
.status--bad { color: var(--bad); background: var(--bad-soft); }
.status--warn { color: var(--warn); background: var(--warn-soft); }
.status--info { color: var(--accent); background: var(--accent-soft); }
.chip { display: inline-block; font-size: 0.78em; padding: 0.12rem 0.6rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 500; }

/* ---- Message ---- */
.message { margin: 0; padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm);
  border: 1px solid var(--edge); border-left: 4px solid var(--accent); }
.message--error { color: var(--bad); background: var(--bad-soft); border-color: transparent; border-left-color: var(--bad); }
.message--warning { color: var(--warn); background: var(--warn-soft); border-color: transparent; border-left-color: var(--warn); }

/* ==== HR pages ==== */
.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.toolbar select, .toolbar input { min-height: 40px; padding: 0 0.75rem; font: inherit; font-size: 0.9em; color: var(--text); background: var(--field);
  border: 1px solid var(--border); border-radius: var(--radius-sm); }

.person { display: flex; gap: 1rem; align-items: center; }
.avatar { flex: none; display: inline-grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 16px; color: #fff; font-weight: 600;
  background: linear-gradient(145deg, #2f86f0, #1450b4); box-shadow: 0 8px 18px -8px rgba(29, 111, 224, 0.8), 0 1px 0 rgba(255, 255, 255, 0.35) inset; }
.avatar--sm { width: 2rem; height: 2rem; font-size: 0.8em; border-radius: 10px; }
.person h1 { margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }

.tabs { display: flex; gap: 2px; padding: 4px; border-radius: 16px; background: var(--accent-soft); overflow-x: auto; justify-self: start; max-width: 100%; scrollbar-width: none; }
.tabs button { padding: 0.45rem 1rem; font: inherit; font-size: 0.9rem; color: var(--muted); background: none; border: 0; border-radius: 12px; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); background: var(--surface-alt); box-shadow: var(--shadow-sm); font-weight: 500; }
.tab-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tab-panel > h2 { margin-top: 0.4rem; padding: 0 0.3rem; }
.tab-panel[hidden] { display: none; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.stat { padding: 0.7rem 0.9rem; background: var(--surface-alt); border-radius: var(--radius); box-shadow: 0 0 0 1px var(--border) inset; }
.stat b { display: block; font-size: 1.5rem; font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 0.84em; }

/* Plan grid (Programare concedii) */
.plan { border-collapse: collapse; width: 100%; font-size: 0.87em; font-variant-numeric: tabular-nums; }
.plan th, .plan td { border: 1px solid var(--border); padding: 0.38rem 0.4rem; text-align: center; min-width: 2.8em; }
.plan .now { background: var(--accent-soft); }
.plan thead th.now { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.plan thead th { color: var(--muted); font-size: 0.88em; font-weight: 500; }
.plan .who { text-align: left; min-width: 10em; white-space: nowrap; vertical-align: top; background: var(--hole); position: sticky; left: 0; z-index: 1; font-weight: 500; }
.plan .line { text-align: left; color: var(--muted); white-space: nowrap; min-width: 6.5em; font-weight: 400; }
.plan tr.row-plan td { color: var(--muted); }
.plan tr.row-force td { font-weight: 600; }
.plan tr.row-taken td { background: var(--off); }
.plan tbody + tbody tr:first-child > * { border-top: 3px solid var(--border); }
.plan td.cell-move { cursor: pointer; }
.plan td.cell-move:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.plan .sum { font-weight: 600; }
.plan .warn { color: var(--warn); }
/* Phone (Robi, 28.10.2026): the name and the row label narrow, so the months are what fills the screen */
@media (max-width: 760px) {
  .plan th, .plan td { min-width: 2.1em; padding: 0.3rem 0.25rem; }
  .plan .who { min-width: 0; width: 5.6rem; max-width: 5.6rem; white-space: normal; font-size: 0.8rem; line-height: 1.3; }
  .plan .line { min-width: 0; font-size: 0.74rem; white-space: normal; line-height: 1.2; }
  .plan .line .link-btn, .plan .line .status { display: block; padding: 0; margin-top: 0.1rem; }
}
.move-in, .move-out { display: block; font-size: 0.9em; line-height: 1.2; padding: 1px 4px; border-radius: 4px; white-space: nowrap; }
.move-out { background: transparent !important; border: 1px dashed currentColor; }
.o1 { background: #fde2e2; color: #8a1c1c; } .o2 { background: #fde9cf; color: #7a4a05; }
.o3 { background: #e5f4d8; color: #2f5a10; } .o4 { background: #d9f0ec; color: #0c564a; }
.o5 { background: #dde8fb; color: #163f7d; } .o6 { background: #ebe2fb; color: #4b2a8a; }
:root[data-theme="dark"] .o1 { background: rgba(248, 113, 113, .18); color: #fca5a5; }
:root[data-theme="dark"] .o2 { background: rgba(251, 191, 36, .16); color: #fcd34d; }
:root[data-theme="dark"] .o3 { background: rgba(132, 204, 22, .16); color: #bef264; }
:root[data-theme="dark"] .o4 { background: rgba(45, 212, 191, .16); color: #5eead4; }
:root[data-theme="dark"] .o5 { background: rgba(96, 165, 250, .18); color: #93c5fd; }
:root[data-theme="dark"] .o6 { background: rgba(167, 139, 250, .18); color: #c4b5fd; }
.legend { display: flex; flex-wrap: wrap; gap: 0.45rem 1.2rem; font-size: 0.84em; color: var(--muted); align-items: center; }

/* Dialog */
dialog { width: min(440px, calc(100vw - 2rem)); padding: 0; color: var(--text); border-radius: var(--radius-lg); background: var(--surface-alt); }
:root[data-theme="dark"] dialog { background: rgba(26, 38, 43, 0.92); }
dialog::backdrop { background: rgba(18, 27, 31, 0.35); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dialog__head { padding: 1.1rem 1.35rem 0.4rem; }
.dialog__head h2 { margin: 0; font-size: 1.1rem; }
.dialog__body { padding: 0.8rem 1.35rem; }
.dialog__foot { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.8rem 1.35rem 1.2rem; }

/* Structure tree */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 1.4rem; border-left: 1px solid var(--border); padding-left: 0.8rem; }
.node-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem;
  border-radius: var(--radius); background: var(--surface-alt); box-shadow: 0 0 0 1px var(--border) inset; margin: 0.4rem 0; }
.node-row .kind { color: var(--muted); font-size: 0.82em; }
.node-row .grow { flex: 1; min-width: 8rem; }
.node-row.closed { opacity: 0.6; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 0.6rem 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 9rem 1fr; gap: 0.75rem; }
.timeline li:first-child { border-top: 0; }

/* ==== Shift schedule (SPEC §6): deck, month grid, by-day list, year view ==== */
.small { font-size: 0.85em; }
.panel--bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.8rem 1rem; }
.panel--bar p { margin: 0; flex-basis: 100%; }
.panel--bar form { margin: 0; }
.tabs--plain { display: inline-flex; gap: 2px; padding: 4px; border-radius: 16px; background: var(--accent-soft); }
.tabs--plain .tab { padding: 0.42rem 0.9rem; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.tabs--plain .tab.is-on { color: var(--text); background: var(--surface-alt); box-shadow: var(--shadow-sm); font-weight: 500; }
.seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 4px; border-radius: 14px; background: var(--accent-soft); }
.seg a { padding: 0.4rem 0.9rem; border-radius: 10px; font-size: 0.88em; color: var(--muted); text-decoration: none; white-space: nowrap; }
.seg a:hover { color: var(--text); }
.seg a[aria-current="true"] { color: var(--text); background: var(--surface-alt); box-shadow: var(--shadow-sm); }
.versions { display: inline-flex; gap: 0.25rem; }
.versions a { padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.8em; text-decoration: none; color: var(--muted); box-shadow: 0 0 0 1px var(--border) inset; }
.versions a[aria-current="true"] { color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.problems { display: grid; gap: 0.4rem; padding: 0.9rem 1.1rem; }
.problems h2, .problems summary { font-size: 0.95rem; font-weight: 500; margin: 0; cursor: default; }
.problems summary { cursor: pointer; }
.problems ul { margin: 0.3rem 0 0; padding: 0 0 0 1.1rem; display: grid; gap: 0.15rem; font-size: 0.9em; }
.problems p { margin: 0; }
.problems .ok, .ok { color: var(--ok); }
.wrap { white-space: normal; border-radius: var(--radius-sm); }
.danger { border-top: 1px solid var(--border); }
.check-title { display: inline-flex; gap: 0.45rem; align-items: center; cursor: pointer; }
.import-month details summary { cursor: pointer; font-weight: 500; }
.import-month ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }

/* Deck: three low tiles above the table (Robi, 26.10.2026: everything stays, but compact) */
.deck { position: relative; z-index: 5; display: grid; grid-template-columns: 11fr 8fr 7fr; gap: 16px; align-items: stretch; }  /* menus open over the table */
.deck .panel { margin: 0; padding: 1rem 1.2rem; }
.deck-title { display: grid; align-content: start; gap: 0.6rem; }
.kicker { margin: 0; color: var(--accent); font-size: 0.8rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; }
.month-nav { display: flex; align-items: center; gap: 0.4rem; }
.month-nav h1 { font-size: 1.6rem; line-height: 1.05; white-space: nowrap; }
.month-nav .icon-btn { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 1px var(--border) inset; font-size: 1.05rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.chips .status, .chip-plain { font-size: 0.76rem; }
.chip-plain { padding: 0.15rem 0.65rem; border-radius: 999px; background: var(--surface-alt); color: var(--muted); box-shadow: 0 0 0 1px var(--border) inset; white-space: nowrap; }

/* Problems: one row of tags; each opens its list over the page */
.flags { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.pop { position: relative; }
.pop > summary { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.22rem 0.7rem 0.22rem 0.3rem; border-radius: 999px; cursor: pointer;
  list-style: none; font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
.pop > summary::-webkit-details-marker { display: none; }
.pop > summary::after { content: "▾"; opacity: 0.6; font-size: 0.7rem; }
.pop--bad > summary { color: var(--bad); background: var(--bad-soft); box-shadow: 0 0 0 1px rgba(192, 48, 43, 0.2) inset; }
.pop--warn > summary { color: var(--warn); background: var(--warn-soft); box-shadow: 0 0 0 1px rgba(148, 98, 0, 0.2) inset; }
.pop--info > summary { color: var(--accent); background: var(--accent-soft); }
.pop__list { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(30rem, 80vw); max-height: 50vh; overflow-y: auto; padding: 0.6rem 0.8rem;
  border-radius: var(--radius); background: var(--field); border: 1px solid var(--border); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.35); }
.pop__list ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.25rem; font-size: 0.85rem; }
.pop__list a { color: inherit; }
.count { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 0.3rem; border-radius: 999px; color: #fff; background: var(--bad); font-size: 0.72rem; font-weight: 600; }
.pop--warn .count { background: var(--warn); }
.pop--info .count { background: var(--accent); }
:root[data-theme="dark"] .count { color: #1b1410; }
.deck-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.deck-actions form { margin: 0; }
.deck-actions .button { min-height: 36px; padding: 0 0.9rem; }
.deck-actions .seg a { padding: 0.32rem 0.75rem; }
.more { position: relative; }
.more > summary { list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more__menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 15rem; display: grid; gap: 2px; padding: 6px; border-radius: var(--radius);
  background: var(--field); border: 1px solid var(--border); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.35); }
.more__menu a, .more__menu button { display: block; width: 100%; padding: 0.55rem 0.75rem; border: 0; border-radius: 9px; background: none; text-align: left;
  font: inherit; font-size: 0.9rem; color: var(--text); text-decoration: none; cursor: pointer; }
.more__menu a:hover, .more__menu button:hover { background: var(--accent-soft); }
.more__menu form { margin: 0; }
.more .more__menu--right { left: auto; right: 0; }

/* The person card (from mockup 2): changes when a name in the table is clicked */
.deck-person { display: grid; align-content: start; gap: 0.75rem; }
.who-card { display: flex; align-items: center; gap: 0.7rem; }
.who-card h2 { margin: 0; font-size: 1rem; }
.who-card p { margin: 0; color: var(--muted); font-size: 0.76rem; }
.meter-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; margin: 0; }
.meter-list div { display: grid; grid-template-columns: 1fr; gap: 0.15rem; }
.meter-list div[hidden] { display: none; }
.meter-list dt { color: var(--muted); font-size: 0.74rem; white-space: nowrap; }
.meter-list dd { margin: 0; color: var(--muted); font-size: 0.76rem; white-space: nowrap; }
.meter-list dd b { color: var(--text); font-size: 1.15rem; font-weight: 500; }
.meter-list meter { width: 100%; height: 6px; border-radius: 6px; background: var(--accent-soft); }
.meter-list meter::-webkit-meter-bar { background: var(--accent-soft); border: 0; border-radius: 6px; height: 6px; }
.meter-list meter::-webkit-meter-optimum-value { background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 6px; }
.meter-list meter::-moz-meter-bar { background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 6px; }
.next { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.next li { display: flex; align-items: baseline; gap: 0.35rem; padding: 0.3rem 0.55rem; border-radius: 10px; background: var(--surface-alt); font-size: 0.72rem;
  line-height: 1.3; box-shadow: 0 0 0 1px var(--border) inset; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next li.next--none { grid-column: 1 / -1; color: var(--muted); }
.next b { font-size: 0.95rem; font-weight: 500; color: var(--accent); }

/* Today on 24 hours and the team, in the right tile */
.deck-stats { display: grid; align-content: start; gap: 0.8rem; }
.day24 { display: grid; gap: 0.2rem; }
.day24__label { margin: 0; color: var(--muted); font-size: 0.8rem; }
.day24__label b { color: var(--text); font-weight: 600; margin-right: 0.3rem; }
.day24__track { position: relative; height: 44px; margin-top: 14px; border-radius: 14px; background: var(--surface-alt); box-shadow: 0 0 0 1px var(--border) inset; }
.seg24 { position: absolute; top: 5px; bottom: 16px; left: calc(var(--from) / 24 * 100% + 3px); width: calc((var(--to) - var(--from)) / 24 * 100% - 6px);
  display: flex; align-items: center; padding: 0 0.45rem; overflow: hidden; border-radius: 9px; font-size: 0.7rem; font-weight: 500; white-space: nowrap; }
.seg24 span { overflow: hidden; text-overflow: ellipsis; }
.seg24--day { color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px rgba(29, 111, 224, 0.25) inset; }
.seg24--night { color: var(--night); background: rgba(200, 50, 63, 0.09); box-shadow: 0 0 0 1px rgba(200, 50, 63, 0.2) inset; }
.seg24--empty { color: var(--bad); background: none; box-shadow: none; border: 1.5px dashed var(--bad); }
.now-line { position: absolute; top: -6px; bottom: 12px; left: calc(var(--at) / 24 * 100%); width: 2px; border-radius: 2px; background: var(--text); }
.now-line i { position: absolute; top: -18px; left: -16px; padding: 0 4px; border-radius: 6px; font-style: normal; font-size: 0.66rem; font-weight: 600; color: var(--bg); background: var(--text); }
.hours { position: absolute; left: 0; right: 0; bottom: 1px; display: flex; justify-content: space-between; padding: 0 6px; font-size: 0.6rem; color: var(--muted); }
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.team__item { display: grid; justify-items: center; align-content: end; gap: 0.25rem; padding: 0.4rem 0.3rem; border-radius: 12px; background: var(--surface-alt);
  box-shadow: 0 0 0 1px var(--border) inset; text-align: center; }
.team__item span { color: var(--muted); font-size: 0.72rem; }
.ring { --deg: calc(var(--v) * 3.6deg); position: relative; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: conic-gradient(var(--accent) 0 var(--deg), var(--accent-soft) var(--deg)); }
.ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--hole); }
.ring b { position: relative; font-size: 0.66rem; font-weight: 600; }
.spark { display: flex; align-items: flex-end; gap: 2px; width: 100%; max-width: 4.5rem; height: 2.6rem; }
.spark i { flex: 1; height: calc(var(--h) * 1% + 3px); border-radius: 2px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); opacity: 0.85; }
.big-num { font-size: 2rem; font-weight: 500; line-height: 2.6rem; letter-spacing: -0.04em; color: var(--leave); }

/* Month grid: the whole month fits a laptop without scrolling sideways (Robi, 26.10.2026) */
.sched { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 0.84em; font-variant-numeric: tabular-nums; }
.sched th, .sched td { border-top: 1px solid var(--border); text-align: center; padding: 0; }
.sched thead th { border-top: 0; color: var(--muted); font-weight: 500; padding: 0.4rem 0 0.45rem; font-size: 0.86em; line-height: 1.15; }
.sched thead th small { display: block; font-weight: 400; font-size: 0.82em; opacity: 0.8; }
.sched thead th.off { color: var(--accent); }
.sched .who { position: sticky; left: 0; z-index: 2; width: 10.5rem; background: var(--hole); text-align: left; padding: 0.35rem 0.6rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.sched .who button, .sched .who a { padding: 0; border: 0; background: none; font: inherit; color: var(--text); text-decoration: none; cursor: pointer; text-align: left; }
.sched .who button:hover, .sched .who a:hover { color: var(--accent); }
.sched tbody tr.is-picked .who { box-shadow: inset 3px 0 0 var(--accent); }
.sched tbody tr.is-picked .who button { color: var(--accent); }
.sched thead .who, .sched tfoot .who { z-index: 3; color: var(--muted); font-weight: 500; }
.sched td { height: 2.75rem; position: relative; }
.sched .off { background: var(--off); }
/* Today's column (Robi, 26.10.2026): the day number filled, the column tinted */
.sched thead th.today { color: var(--on-accent); background: var(--accent); border-radius: 8px 8px 0 0; }
.sched td.today { background: var(--accent-soft); }
.sched td.is-error { box-shadow: inset 0 0 0 2px var(--bad); border-radius: 8px; }
.sched td.is-warning { box-shadow: inset 0 0 0 2px var(--warn); border-radius: 8px; }
.sched td:target { box-shadow: inset 0 0 0 3px var(--accent); border-radius: 8px; }
.sched td.req::after { content: ""; position: absolute; inset: 4px 2px; border: 1px dashed var(--muted); border-radius: 7px; pointer-events: none; }
.sched .tot { width: 3.1rem; padding: 0.3rem 0.15rem; white-space: nowrap; }
.sched thead .tot { white-space: normal; font-size: 0.74em; line-height: 1.1; }
.sched .first { border-left: 1px solid var(--border); }
.sched td.good { color: var(--ok); font-weight: 600; }
.sched td.bad, .plan td.bad { color: var(--bad); background: var(--bad-soft); font-weight: 600; }
.sched thead th.bad { color: var(--bad); background: var(--bad-soft); box-shadow: inset 0 -3px 0 var(--bad); border-radius: 8px 8px 0 0; }
.sched thead th.today.bad { color: var(--on-accent); background: var(--accent); }  /* today stays marked; the red line shows the error */
.sched tfoot td, .sched tfoot th { color: var(--muted); padding: 0.35rem 0.1rem; font-weight: 500; height: auto; }
.cell { display: block; width: 100%; height: 100%; min-height: 2.75rem; padding: 0; font: inherit; color: inherit; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.cell:hover { background: var(--surface-alt); box-shadow: var(--shadow-sm); }
.code-v { display: block; line-height: 1.1; font-weight: 500; }
.code-v small { display: block; margin: 1px 4px 0; font-size: 1em; font-weight: inherit; color: var(--night); }  /* the night's 8: as big as the 4, red (Robi, 23.10.2026) */
.code-v--abs { color: var(--leave); }
.code-v--topup { color: var(--dbl); }
.code-v.is-pending { text-decoration: underline dotted; opacity: 0.75; }
.code { display: inline-block; min-width: 1.7rem; padding: 0 0.35rem; text-align: center; border-radius: 8px; color: var(--text); background: var(--surface-alt);
  box-shadow: 0 0 0 1px var(--border) inset; line-height: 1.55; font-weight: 500; }
.code small { display: block; font-size: 0.75em; line-height: 1; color: var(--muted); font-weight: 400; }
.code--night small { font-size: 1em; color: var(--night); font-weight: inherit; }  /* the legend matches the cells */
.code--abs { color: var(--leave); }
.code--topup { color: var(--dbl); }
.code--req { box-shadow: none; border: 1px dashed var(--muted); color: var(--muted); }
.codes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; margin-bottom: 0.6rem; }
.codes button { padding: 0.55rem 0.25rem; font: inherit; font-weight: 500; color: var(--text); background: var(--field);
  border: 0; border-radius: 12px; box-shadow: 0 0 0 1px var(--border) inset; cursor: pointer; line-height: 1.15; }
.codes button:hover { box-shadow: 0 0 0 1.5px var(--accent) inset; background: var(--accent-soft); }
.codes button small { display: block; font-weight: 400; font-size: 0.7em; color: var(--muted); }

.days { display: grid; gap: 8px; }
.dayrow { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); gap: 0.75rem; padding: 0.7rem 0.95rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--shadow-sm); }
.dayrow.is-off { background: var(--off); }
.dayrow.is-error { box-shadow: inset 4px 0 0 var(--bad), var(--shadow-sm); }
.dayrow.is-warning { box-shadow: inset 4px 0 0 var(--warn), var(--shadow-sm); }
.dayrow__date b { display: block; font-size: 1.6rem; font-weight: 500; line-height: 1.05; letter-spacing: -0.03em; }
.dayrow__date span { color: var(--muted); font-size: 0.85em; }
.dayrow__lines { display: grid; gap: 0.3rem; justify-items: start; }
.dayrow__line { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; font-size: 0.9em; }
.dayrow__line > span:first-child { min-width: 4.3rem; }
.pill { font: inherit; font-size: 0.92em; padding: 0.18rem 0.65rem; border-radius: 999px; border: 0; background: var(--field); color: var(--text);
  box-shadow: 0 0 0 1px var(--border) inset; cursor: pointer; }
.pill:hover { box-shadow: 0 0 0 1.5px var(--accent) inset; }
.pill--abs { color: var(--leave); }
.pill--req { box-shadow: none; border: 1px dashed var(--muted); }
.pill.is-error { box-shadow: 0 0 0 1.5px var(--bad) inset; }
.pill.is-warning { box-shadow: 0 0 0 1.5px var(--warn) inset; }

.bars { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
.bar { display: grid; grid-template-columns: 8rem minmax(0, 1fr) 2.5rem; gap: 0.6rem; align-items: center; font-size: 0.9em; }
.bar b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.bar__track { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 8px; background: var(--accent-soft); overflow: hidden; }
.bar__track::-webkit-progress-bar { background: var(--accent-soft); border-radius: 8px; }
.bar__track::-webkit-progress-value { background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 8px; }
.bar__track::-moz-progress-bar { background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 8px; }

/* ---- Narrower laptop: menu names under the icons; deck in two rows; the month grid may scroll ---- */
.topnav__menu { min-width: 0; overflow-x: auto; }
@media (max-width: 1520px) {
  .brand__text { display: none; }
  .topbar__search input { width: 9.5rem; }
}
@media (max-width: 1300px) {
  .topnav__menu a, .topnav__menu .is-soon { flex-direction: column; gap: 2px; padding: 0.35rem 0.6rem; font-size: 0.72rem; }
  .topbar__search input { width: 8.5rem; }
}
@media (max-width: 1250px) {
  .deck { grid-template-columns: 1fr 1fr; }
  .deck-title { grid-column: 1 / -1; }
  .sched { table-layout: auto; width: auto; min-width: 100%; }
  .sched td { min-width: 2rem; }
}

/* ---- Phone ---- */
@media (max-width: 760px) {
  .layout { padding: 8px 8px calc(100px + env(safe-area-inset-bottom)); }
  /* No backdrop filter on the bar here: it would trap the fixed tab bar inside it */
  .topnav { top: 8px; padding: 8px; gap: 0.6rem; background: var(--bar); backdrop-filter: none; -webkit-backdrop-filter: none; }
  /* The module menu becomes a tab bar at the bottom of the screen (Robi, 28.10.2026); the desktop keeps it on top */
  .topnav__menu { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); margin: 0; padding: 6px;
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); overflow: visible; border-radius: 22px;
    background: var(--bar); border: 1px solid var(--edge); box-shadow: var(--shadow);
    backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); }
  .topnav__menu a, .topnav__menu .is-soon { flex-direction: column; gap: 2px; padding: 0.45rem 0.1rem; font-size: 0.68rem; min-width: 0; border-radius: 16px; }
  .topnav__menu a span, .topnav__menu .is-soon span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .topnav__menu svg.icon { width: 22px; height: 22px; }
  .topbar__search { display: none; }
  .topnav__end { margin-left: auto; }
  .content { margin-top: 12px; gap: 12px; }
  h1, .month-nav h1 { font-size: 1.7rem; }
  .panel { padding: 1rem 1.05rem; border-radius: 18px; }
  .deck { grid-template-columns: minmax(0, 1fr); }
  .card-stat__value { font-size: 2rem; }
  .cards .card-stat:nth-child(odd) { border-left: 0; }
  .cards .card-stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .hide-phone { display: none; }
  .two-columns { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: 1fr; gap: 0.1rem; }
  .sched .who { width: auto; max-width: 7.5rem; padding: 0.3rem 0.45rem; }
  .codes { grid-template-columns: repeat(3, 1fr); }
  .bar { grid-template-columns: 6rem minmax(0, 1fr) 2rem; }
  .seg24 span { display: none; }
}

/* ---- Modules: the Resurse Umane second row and the module cards on Acasă (Robi, 27.10.2026) ---- */
.subnav--module a { display: flex; align-items: center; gap: 0.4rem; }
.subnav--module svg.icon { width: 16px; height: 16px; }
.module-card { display: grid; gap: 1rem; }
.module-card__head { display: flex; align-items: center; gap: 0.8rem; }
.module-card__head h2 { margin: 0; }
.module-card__head p { margin: 0; font-size: 0.85rem; }
.module-card__head > :last-child { margin-left: auto; }
.module-card__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); flex: none; }
.module-card__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.module-card__stats a { display: grid; padding: 0.7rem 0.9rem; border-radius: var(--radius); background: var(--surface-alt); color: inherit; text-decoration: none; }
.module-card__stats a:hover { box-shadow: 0 0 0 1px var(--accent) inset; }
.module-card__stats strong { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.module-card__stats span { font-size: 0.8rem; color: var(--muted); }
.module-card--soon { opacity: 0.7; }
/* De făcut: an open form in red until Rezolvat, then a green tick (Robi, 27.10.2026) */
.todo > span:first-child { display: flex; align-items: center; gap: 0.55rem; }
.todo__mark { display: grid; place-items: center; flex: none; width: 1.15rem; height: 1.15rem; border-radius: 50%; font-size: 0.75rem; font-weight: 700; }
.todo--open > span:first-child { color: var(--bad); }
.todo--open .todo__mark { border: 2px solid var(--bad); }
.todo--done > span:first-child { color: var(--ok); }
.todo--done .todo__mark { background: var(--ok); color: var(--bg); }

/* Bon page: details and state on the left, the printed form in miniature on the right (Robi, 27.10.2026) */
.form-page { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
/* "Tipărește" prints from a hidden frame at A4 width, out of sight */
.print-frame { position: fixed; left: -10000px; top: 0; width: 794px; height: 1123px; border: 0; }
/* aspect-ratio: a height even before app.js scales it (an old cached app.js left the box at 0 px) */
.form-preview__frame { position: relative; overflow: hidden; aspect-ratio: 794 / 560; border-radius: var(--radius-sm); background: #e9ecef; }
.form-preview__frame iframe { position: absolute; top: 0; left: 0; width: 794px; height: 560px; border: 0; transform-origin: 0 0; pointer-events: none; }

/* Acasă: three equal columns, one card each (the module cards' size); Prezență (yesterday, today highlighted,
   tomorrow) first, De făcut beside it over the other two columns */
.greeting, .home-grid { width: 100%; max-width: 52rem; margin-inline: auto; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.home-grid__todo { display: grid; order: -1; }
.home-grid__todo:not(:has(*)) { display: none; }
/* Acasă in the Flux look: the greeting, the Cărbune figure and a bar per mine (Robi, 28.10.2026) */
.greeting h1 { font-size: 2.6rem; }
.coal-hero { display: grid; gap: 0.2rem; align-content: start; }
.coal-hero__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.coal-hero__head h2 { color: var(--muted); font-weight: 500; }
.coal-hero__head a { font-weight: 600; text-decoration: none; font-size: 0.92rem; }
.coal-hero__figure { display: flex; align-items: baseline; gap: 0.4rem; margin: 0.2rem 0 0; }
.coal-hero__figure strong { font-family: var(--font-display); font-weight: 700; font-size: 4rem; line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 28px var(--data-glow); }
.coal-hero__figure span { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; color: var(--accent); }
.coal-hero__sub { margin: 0 0 0.8rem; }
/* Introducere and Lipește: one slim row next to the greeting, across the page under it on the phone (Robi, 29.10.2026) */
.coal-quick { flex: 0 1 24rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }
.coal-quick .button { position: relative; overflow: hidden; justify-content: center; min-height: 50px; border: 0; border-radius: var(--radius);
  font-weight: 600; color: #fff; transition: transform 0.15s, box-shadow 0.15s; }
.coal-quick .button .icon { stroke: currentColor; }
.coal-quick .coal-hero__entry { background: linear-gradient(135deg, #2f86f0, #1d5fc0); box-shadow: 0 10px 22px -12px rgba(47, 127, 219, 0.95); }
.coal-quick .coal-hero__paste { background: linear-gradient(135deg, #f5a524, #e2632b); box-shadow: 0 10px 22px -12px rgba(226, 99, 43, 0.95); }
.coal-quick .button::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%); pointer-events: none; }
.coal-quick .button:hover { transform: translateY(-1px); }
.coal-quick .button:active { transform: scale(0.97); }
@media (prefers-reduced-motion: no-preference) {
  .coal-quick .button::after { animation: quick-shine 5s ease-in-out 1s infinite; }
  .coal-quick .coal-hero__paste::after { animation-delay: 1.4s; }
}
@keyframes quick-shine { 0%, 70% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.coal-hero__paste { padding: 0.45rem 0.8rem; font-size: 0.9rem; white-space: nowrap; }
#paste-dialog textarea { width: 100%; padding: 0.6rem; font: inherit; color: var(--text); background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm); }
#paste-dialog .dialog__body { display: grid; gap: 0.6rem; }
.coal-hero__entry { justify-content: flex-start; gap: 0.45rem; min-width: 0; padding: 0.45rem 0.8rem; font-size: 0.9rem; }
.coal-hero__entry span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Raportul de dimineață: one bilet per sheet, swiped sideways, newest first */
.morning__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.morning__track::-webkit-scrollbar { display: none; }
.morning__page { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; display: grid; gap: 12px; align-content: start; padding-right: 2px; }
.morning__date { margin: 0.2rem 0 0; font-family: var(--font-display); font-size: 1.8rem; line-height: 1.05; }
.morning__date small { display: block; margin-top: 0.15rem; font-family: var(--font); font-size: 0.92rem; font-weight: 500; color: var(--muted); }
.morning__sec { display: grid; gap: 0.6rem; padding: 0.9rem; border-radius: var(--radius); background: var(--surface-alt); border: 1px solid var(--border); min-width: 0; }
.morning__sec h4 { margin: 0; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.morning__big { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0.4rem; margin: 0; }
.morning__big strong { font-family: var(--font-display); font-size: 3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.morning__big em { font-style: normal; font-family: var(--font-display); font-size: 1.25rem; color: var(--accent); }
.morning__big .mark { width: 28px; height: 28px; align-self: center; }
.morning__big--small strong { font-size: 2.1rem; }
.morning__big--small em { font-size: 1rem; }
.morning__pair { display: grid; justify-items: center; gap: 0.3rem; }
.morning__sub { margin: 0; font-size: 0.86rem; color: var(--muted); text-align: center; }
.morning__sub b { font-weight: 600; }
.morning__rows { list-style: none; margin: 0; padding: 0; display: grid; }
.morning__rows li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-top: 1px solid var(--border); }
.morning__rows .mark { width: 24px; height: 24px; }
.morning__big .icon { width: 28px; height: 28px; align-self: center; color: var(--accent); }
.morning__rows .icon { width: 22px; height: 22px; color: var(--accent); }
.morning__rows li > span { color: var(--muted); }
.morning__rows b { font-family: var(--font-display); font-size: 1.2rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.morning__rows b small { font-family: var(--font); font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.morning__bars { list-style: none; margin: 0; padding: 0; display: grid; }
.morning__bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0.5rem; padding: 0.55rem 0;
  border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }  /* lines between the mines, as in the other sections */
/* the mine: its headframe in blue like the truck, right before the name (Robi, 28.10.2026) */
.morning__mine { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; font-weight: 600; }
.morning__bars .morning__mine .mark--mine { width: 22px; height: 22px; flex: none; color: var(--accent); }
.morning__bars b { display: inline-flex; align-items: center; gap: 0.2rem; font-family: var(--font-display); font-weight: 600; white-space: nowrap; }
.morning__bars .mark { width: 16px; height: 16px; flex: none; }
.mark--coal, .mark--pile { color: var(--text); opacity: 0.8; }
.mark--mine { color: var(--accent); }
.mark--flame { color: #f0602b; }
.mark--bolt { color: #e0a100; }
.mark--truck { color: var(--accent); }
.mark--moon { color: var(--leave); }
.mark--sun { color: #e0a100; }
.mark--note { color: var(--accent); }
.trend { display: inline-block; width: 0.8em; margin-left: 0.15rem; font-size: 1.1em; line-height: 1; text-align: center; }  /* same width either way, so the figures line up */
.trend--same { color: var(--muted); }
.trend--up { color: var(--ok); }
.trend--down { color: var(--bad); }
.morning__state { display: flex; align-items: center; gap: 0.5rem; margin: 0; color: var(--muted); }
.morning__state i { width: 11px; height: 11px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.morning__timeline { list-style: none; margin: 0; padding: 0 0 0 0.2rem; display: grid; }
.morning__timeline li { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; padding: 0.4rem 0; }
.morning__timeline li + li::before { content: ""; position: absolute; left: 5px; top: -0.45rem; height: 0.9rem; border-left: 2px solid var(--border); }
.morning__timeline i { width: 12px; height: 12px; border-radius: 50%; }
.morning__timeline b { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.morning__timeline .is-oprit i { background: var(--bad); } .morning__timeline .is-oprit span { color: var(--bad); }
.morning__timeline .is-aprins i { background: var(--dbl); } .morning__timeline .is-aprins span { color: var(--dbl); }
.morning__timeline .is-sincronizat i { background: var(--ok); } .morning__timeline .is-sincronizat span { color: var(--ok); }
.morning__shifts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.morning__shift { display: grid; gap: 0.4rem; align-content: start; padding: 0.7rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.morning__shift p { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.4rem; margin: 0; }
.morning__shift .mark { width: 18px; height: 18px; flex: none; }
.morning__shift small { flex-basis: 100%; color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.morning__shift ul { list-style: none; margin: 0; padding: 0; display: grid; }
.morning__shift li { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; padding: 0.3rem 0; font-weight: 600; font-size: 0.92rem; border-top: 1px solid var(--border); }
.morning__shift em { font-style: normal; font-weight: 500; font-size: 0.75rem; padding: 0 0.4rem; border-radius: 6px; color: var(--dbl); background: var(--warn-soft); }
.morning__note { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0.6rem; margin: 0; padding: 0.8rem; border-radius: var(--radius); border: 1px dashed var(--accent); }
.morning__note .mark { width: 22px; height: 22px; }
.morning__nav { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.4rem; }
.morning__where { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; text-align: center; }
.morning__nav .button:disabled { opacity: 0.35; }
/* Grupul IV on Acasă: stop red, fire orange, synchronised green (Robi, 28.10.2026) */
.plant-card { display: grid; gap: 0.6rem; align-content: start; }
.plant-card__state { margin: 0; font-weight: 600; }
.plant-card__state--oprit { color: var(--bad); }
.plant-card__state--aprins { color: var(--dbl); }
.plant-card__state--sincronizat { color: var(--ok); }
.plant-card__power { display: flex; align-items: baseline; gap: 0.35rem; margin: 0; }
.plant-card__power strong { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.plant-card__power span { font-family: var(--font-display); font-weight: 600; color: var(--accent); }
.plant-card__note { margin: 0; font-size: 0.86rem; }
.plant-card__events { display: grid; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.plant-card__events li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0 0.6rem; padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm); border-left: 4px solid; font-variant-numeric: tabular-nums; }
.plant-card__events small { grid-column: 2; color: var(--muted); }
.plant-card__events .is-stop { border-color: var(--bad); background: var(--bad-soft); }
.plant-card__events .is-stop span { color: var(--bad); }
.plant-card__events .is-fire { border-color: var(--dbl); background: var(--warn-soft); }
.plant-card__events .is-fire span { color: var(--dbl); }
.plant-card__events .is-sync { border-color: var(--ok); background: var(--ok-soft); }
.plant-card__events .is-sync span { color: var(--ok); }
.mine-bars { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.55rem; }
.mine-bars li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 4.5rem; gap: 0.8rem; align-items: center; }
.mine-bars strong { text-align: right; font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; }
.mine-bars .bar__track { height: 9px; box-shadow: 0 0 12px -2px var(--data-glow); }
.presence__day.is-today .presence__date { color: inherit; }
.presence h2 .muted { font-weight: 400; font-size: 0.85em; }
.presence__days { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 12px) / 3); gap: 6px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; padding-bottom: 2px; }
.presence__days::-webkit-scrollbar { display: none; }
@media (min-width: 761px) { .presence__days { grid-auto-columns: calc((100% - 24px) / 5); } }
.presence__day { scroll-snap-align: start; }
.presence__day { display: grid; gap: 0.45rem; align-content: start; padding: 0.55rem 0.6rem; border-radius: var(--radius); background: var(--surface-alt);
  color: inherit; text-decoration: none; border: 1px solid transparent; }
.presence__day:hover { border-color: var(--border); }
.presence__day.is-today { color: #fff; background: linear-gradient(180deg, #2f7fdb, #1d5fc0); border-color: transparent; box-shadow: 0 8px 20px -8px rgba(47, 127, 219, 0.9); }
.presence__day.is-today small, .presence__day.is-today .muted { color: rgba(255, 255, 255, 0.78); }
.presence__day.is-today .presence__row > span + span { border-top-color: rgba(255, 255, 255, 0.2); }
.presence__date { font-size: 0.9rem; font-weight: 600; }
.is-today .presence__date { color: inherit; }
/* One person per line, a subtle line between people; a top-up's hours on the same line, at the right */
.presence__row { display: grid; font-size: 0.8rem; }
.presence__row small { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 0.1rem; }
.presence__row > span { padding: 0.18rem 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.presence__row > span + span { border-top: 1px solid var(--border); }
/* A diffuse line between Zi, Compl. and Noapte */
.presence__row + .presence__row { padding-top: 0.45rem; background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent) top / 100% 1px no-repeat; }
.presence__row--topup > span { display: flex; justify-content: space-between; align-items: baseline; gap: 0.3rem; color: var(--dbl); font-weight: 500; }
.presence__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.presence__row--topup em { flex: none; font-style: normal; font-weight: 400; font-size: 0.85em; padding: 0 0.3em; border-radius: 5px; background: var(--warn-soft); }
.presence__row--night > span:not(.muted) { color: var(--night); font-weight: 500; }
.is-today .presence__row--night > span:not(.muted) { color: #ffd3d7; }
.is-today .presence__row--topup > span { color: #ffd9a8; }
.tag { padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; background: var(--surface-alt); color: var(--muted); white-space: nowrap; }
@media (max-width: 1000px) {
  .form-page { grid-template-columns: minmax(0, 1fr); }
  .greeting h1 { font-size: 2.2rem; }
  .coal-hero__figure strong { font-size: 3.3rem; }
  .mine-bars li { grid-template-columns: 5rem minmax(0, 1fr) 4rem; gap: 0.6rem; }
}
@media (max-width: 760px) {
  .subnav--module { justify-self: stretch; }
  .subnav--module a { padding: 0.35rem 0.6rem; font-size: 0.8rem; }
  .coal-quick { flex-basis: 100%; }
}

/* ==== Cărbune (PLAN_Carbune.md): the day screen, the registers, Grupul IV ==== */
form.inline { display: inline; }
.date-pick { padding: 0.45rem 0.6rem; font: inherit; color: var(--text); background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm); }
/* Introducere: the seven days, then the three steps in one column; the step due is outlined, a done one folds */
.coal-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 760px; margin-bottom: 16px; }
.coal-strip__day { display: grid; justify-items: center; padding: 0.35rem 0 0.45rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.coal-strip__day b { font-size: 1rem; }
.coal-strip__day span { color: var(--muted); }
.coal-strip__day i { width: 9px; height: 9px; margin-top: 0.25rem; border-radius: 50%; border: 1.5px solid var(--muted); }
.coal-strip__day--complet i { background: var(--ok); border-color: var(--ok); }
.coal-strip__day--productie i { background: var(--warn); border-color: var(--warn); }
.coal-strip__day.is-current { border: 2px solid var(--accent); }
.coal-steps { display: grid; gap: 14px; max-width: 760px; }
.coal-step > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; cursor: pointer; list-style: none; }
.coal-step > summary::-webkit-details-marker { display: none; }
.coal-step h2 { display: flex; align-items: center; gap: 0.6rem; margin: 0; }
.coal-step__n { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; flex: none; border-radius: 50%; font-size: 0.85rem;
  background: var(--accent-soft); color: var(--accent); }
.coal-step--done .coal-step__n { background: var(--ok-soft); color: var(--ok); }
.coal-step--now { border: 2px solid var(--accent); }
.coal-step--later:not([open]) { opacity: 0.6; }
.coal-step__sum { color: var(--muted); font-variant-numeric: tabular-nums; }
.coal-step__edit { margin-left: auto; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.coal-step[open] .coal-step__edit { display: none; }
.coal-step > form { display: grid; gap: 0.8rem; margin-top: 0.9rem; }
.coal-step > h2 + * { margin-top: 0.9rem; }
.coal-step__save { justify-self: start; }
.coal-message { display: grid; gap: 0.7rem; border: 2px solid var(--accent); }
.coal-message h2, .coal-message p { margin: 0; }
.coal-message h2 .muted { font-weight: 400; font-size: 0.85em; }
.coal-message__changes li { font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.coal-message__event { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.35rem; }
.coal-message__event select { padding: 0.4rem 0.5rem; font: inherit; color: var(--text); background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.coal-message__move { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.coal-paste > summary { cursor: pointer; font-weight: 600; }
.coal-paste form { display: grid; gap: 0.6rem; margin-top: 0.8rem; }
.coal-paste textarea { width: 100%; padding: 0.6rem; font: inherit; color: var(--text); background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.coal-paste .button { justify-self: start; }
.coal-check { margin: 0; padding: 0.5rem 0.7rem; border-radius: var(--radius-sm); background: var(--surface-alt); font-size: 0.92rem; }
.coal-check.is-ok { background: var(--ok-soft); color: var(--ok); }
.coal-check.is-off { background: var(--warn-soft); color: var(--warn); }
.coal-inputs input { width: 100%; min-width: 5rem; padding: 0.45rem 0.6rem; font: inherit; text-align: right; font-variant-numeric: tabular-nums;
  color: var(--text); background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.coal-inputs input:focus-visible { border-color: var(--accent); outline-offset: 0; }
.coal-inputs th[scope="row"] { vertical-align: middle; }
.coal-inputs .errorlist { margin: 0.2rem 0 0; padding: 0; list-style: none; color: var(--bad); font-size: 0.8rem; }
.coal-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.coal-fields input { text-align: right; }
.coal-shifts { margin-bottom: 0.5rem; }
.coal-shifts summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.coal-shifts .muted { font-size: 0.85rem; }
.coal-warnings li { justify-content: flex-start; }
.coal-state--oprit { color: var(--muted); }
.coal-state--sincronizat { color: var(--ok); }
.coal-state--aprins { color: var(--warn); }
.coal-recent a { color: inherit; }
/* Running hours per day: one bar per day, 24 h = full height */
@media (max-width: 760px) {
  .coal-step__save { justify-self: stretch; }
  .coal-inputs th, .coal-inputs td { padding: 0.3rem 0.25rem; }
  .coal-inputs input { min-width: 0; padding: 0.45rem 0.4rem; }
}.coal-inputs .num, .coal-recent .num { text-align: right; }.coal-register th, .coal-register td { white-space: nowrap; }
.coal-register .num { text-align: right; }
.table thead .coal-register__mine { text-align: center; border-left: 1px solid var(--border); }
.coal-register .is-weekend > * { background: var(--off); }
.coal-register a { color: inherit; }
/* Groups: a line before each mine, the mines' total and Paroșeni; Paroșeni on its own tint (Robi, 28.10.2026) */
.coal-register .grp-start { border-left: 1px solid var(--border); }
/* Every column on the phone too (Robi, 28.10.2026): the table scrolls sideways, the date stays in view */
.coal-register tbody th, .coal-register thead tr:first-child th:first-child, .coal-register tfoot th { position: sticky; left: 0; z-index: 1; background: var(--field); }
.coal-register .is-weekend > th { background: var(--field); box-shadow: inset 0 0 0 999px var(--off); }  /* solid under the tint */
.panel--table.coal-register-box { padding-left: 0; }  /* nothing scrolls past the fixed date column */
@media (max-width: 760px) {
  .coal-register { font-size: 0.82rem; }
  .coal-register th, .coal-register td { padding: 0.32rem 0.45rem; }
}
.coal-register .coal-register__total { background: var(--accent-soft); }
.coal-register .coal-register__plant { background: rgba(245, 165, 36, 0.09); }
.table thead .coal-register__plant { color: var(--warn); }
.table thead .coal-register__total { color: var(--accent); }
/* Cărbune charts (§2 C6): SVG from the server. Series follow the mine (Lonea, Livezeni, Vulcan, Lupeni = slots
   1–4 of the validated default categorical palette); single-series charts use the accent. */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #c98500; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #eda100; } }
:root[data-theme="dark"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #eda100; }
.coal-charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }  /* one per row: the SVG text stays legible */
.coal-chart { margin: 0; }
.coal-chart figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.3rem 1rem; margin-bottom: 0.5rem; }
.coal-chart h2 { margin: 0; }
.coal-chart figcaption p { margin: 0; font-size: 0.82rem; }
.coal-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.coal-chart .grid { stroke: var(--border); stroke-width: 1; }
.coal-chart .axis { fill: var(--muted); font-size: 11px; }
.coal-chart .value { fill: var(--text); font-size: 12px; font-weight: 600; }
.coal-chart .value--small { font-size: 10.5px; font-weight: 500; fill: var(--muted); }
.coal-chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.coal-chart .dot { fill: var(--accent); stroke: var(--field); stroke-width: 2; }
.coal-chart .bar.s0 { fill: var(--accent); }
.coal-chart .s1, .coal-legend .s1 { fill: var(--s1); background: var(--s1); }
.coal-chart .s2, .coal-legend .s2 { fill: var(--s2); background: var(--s2); }
.coal-chart .s3, .coal-legend .s3 { fill: var(--s3); background: var(--s3); }
.coal-chart .s4, .coal-legend .s4 { fill: var(--s4); background: var(--s4); }
.coal-chart .hit { fill: transparent; }
.coal-chart .hit:hover { fill: var(--accent-soft); }
.coal-chart .bar:hover { opacity: 0.8; }
/* ---- Panels (Cărbune, Resurse Inumane): headline figures with a trend line, mine cards (Robi, 28.10.2026) ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.kpi { display: grid; align-content: start; gap: 0.15rem; padding: 1rem 1.15rem 0.9rem; color: inherit; text-decoration: none; overflow: hidden; }
.kpi:hover { box-shadow: var(--shadow), 0 0 0 1px var(--accent) inset; }
.kpi__label { color: var(--muted); font-size: 0.85rem; }
.kpi__value { font-family: var(--font-display); font-weight: 700; font-size: 2.3rem; line-height: 1.05; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 24px var(--data-glow); }
.kpi__value small { font-size: 0.5em; font-weight: 600; color: var(--accent); margin-left: 0.25rem; text-shadow: none; }
.kpi__delta { font-size: 0.8rem; color: var(--muted); }
.is-up { color: var(--ok); }
.is-down { color: var(--warn); }
.spark { display: block; width: 100%; height: 34px; margin-top: 0.45rem; overflow: visible; }
.spark__line { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark__area { fill: var(--accent-soft); }
.spark__dot { fill: var(--accent); }
.coal-overview { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: start; }
.coal-periods h2 { padding: 0.8rem 0.85rem 0.2rem; }
.coal-periods tbody th { font-weight: 500; color: var(--muted); }
.coal-periods strong { font-family: var(--font-display); font-size: 1.1rem; }
.mine-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.mine-card { display: grid; gap: 0.4rem; align-content: start; }
.mine-card__head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.mine-card__head h2 { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-size: 1.15rem; }
.mine-card__figure { margin: 0; color: var(--muted); }
.mine-card__figure strong { font-family: var(--font-display); font-size: 2rem; color: var(--text); font-variant-numeric: tabular-nums; }
.mine-card__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.8rem; margin: 0.2rem 0 0.3rem; font-size: 0.85rem; }
.mine-card__facts dt { color: var(--muted); font-size: 0.78rem; }
.mine-card__facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.coal-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.coal-dot.s1 { background: var(--s1); } .coal-dot.s2 { background: var(--s2); } .coal-dot.s3 { background: var(--s3); } .coal-dot.s4 { background: var(--s4); }
.coal-chart .dot--s1 { fill: var(--s1); } .coal-chart .dot--s2 { fill: var(--s2); } .coal-chart .dot--s3 { fill: var(--s3); } .coal-chart .dot--s4 { fill: var(--s4); }
.coal-chart .line--s1 { stroke: var(--s1); } .coal-chart .line--s2 { stroke: var(--s2); } .coal-chart .line--s3 { stroke: var(--s3); } .coal-chart .line--s4 { stroke: var(--s4); }
.kpi__bar { margin-top: 0.5rem; }
.table .bar__track { min-width: 6rem; vertical-align: middle; }
.panel--table > .panel__title { padding: 0.8rem 0.85rem 0.3rem; }
.form-counts { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.form-counts .chip { text-decoration: none; font-size: 0.85rem; padding: 0.25rem 0.75rem; }
@media (max-width: 1250px) { .coal-overview { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 0.8rem 0.85rem; }
  .kpi__value { font-size: 1.75rem; }
}
.coal-legend { display: flex; gap: 0.9rem; margin: 0; padding: 0; list-style: none; font-size: 0.82rem; color: var(--muted); }
.coal-legend li { display: flex; align-items: center; gap: 0.35rem; }
.coal-legend i { width: 10px; height: 10px; border-radius: 3px; }
.coal-wrap h1 { white-space: normal; }
@media (max-width: 760px) { .coal-wrap h1 { font-size: 1.35rem; } }
/* Grupul IV in figures (Robi, 29.10.2026): the last run and the month side by side, the chart under them */
.plant-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plant-sum__box { display: grid; gap: 0.35rem; align-content: start; padding: 0.8rem 0.9rem; border-radius: var(--radius);
  background: var(--surface-alt); border: 1px solid var(--border); min-width: 0; }
.plant-sum h3 { display: flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.plant-sum__dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.plant-sum__when { margin: 0; font-size: 0.86rem; }
.plant-sum__figures { display: grid; gap: 0.25rem; margin: 0.2rem 0 0; }
.plant-sum__figures div { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.plant-sum__figures dt { color: var(--muted); font-size: 0.85rem; }
.plant-sum__figures dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.plant-sum__figures b { font-family: var(--font-display); font-size: 1.15rem; }
.plant-sum__note { margin: 0; color: var(--muted); font-size: 0.78rem; }
.plant-sum__chart { grid-column: 1 / -1; padding-top: 0.3rem; }
.plant-sum__strip { fill: var(--surface-alt); stroke: var(--border); }
.coal-chart .bar.is-unlogged { opacity: 0.35; }
/* where there is room (Uzina, the panel on the desktop) the two boxes stack on the left of the chart */
.plant-sum-wrap { container-type: inline-size; }
@container (min-width: 1000px) {
  .plant-sum { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); }
  .plant-sum__chart { grid-column: 2; grid-row: 1 / span 2; padding-top: 0; }
}
@media (max-width: 460px) {
  .plant-sum { grid-template-columns: minmax(0, 1fr); }
  .plant-sum__chart .axis { font-size: 20px; }  /* the 720-wide drawing shrinks to under half on the phone */
}
/* Uzina: the form while an event is being changed, so it does not pass for a new one (Robi, 29.10.2026) */
.panel--form.is-editing { box-shadow: var(--shadow), 0 0 0 2px var(--accent) inset; scroll-margin-top: 90px; }

/* ---- Carburant (PLAN_Carburant.md): the tank's day, the locomotives, the wagons (Robi, 02.11.2026) ---- */
.fuel-day { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.fuel-paste { display: grid; gap: 0.6rem; }
.fuel-paste textarea { width: 100%; padding: 0.6rem; font: inherit; color: var(--text); background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.fuel-issues input { width: 6.5rem; padding: 0.35rem 0.5rem; font: inherit; text-align: right; color: var(--text); background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.fuel-issues .fuel-issues__kind { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); padding-top: 0.9rem; }
.fuel-issues tbody th[scope="row"] { font-weight: 500; }
.fuel-issues .is-closed { opacity: 0.6; }
.fuel-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 0.8rem; }
.fuel-hint { margin: 0 0 0.8rem; font-size: 0.82rem; }
.fuel-stock .figure { font-size: 3rem; }
.fuel-month { font-family: var(--font-display); font-size: 1.4rem; white-space: nowrap; }
.loco-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.loco-card { display: grid; gap: 0.8rem; align-content: start; color: inherit; text-decoration: none; }
a.loco-card:hover { box-shadow: var(--shadow), 0 0 0 1px var(--accent) inset; }
.loco-card--off { opacity: 0.6; }
.loco-card__head { display: flex; align-items: center; gap: 0.8rem; }
.loco-card__head h2 { margin: 0; font-family: var(--font-display); font-size: 1.15rem; }
.loco-card__head p { margin: 0; font-size: 0.85rem; }
.loco-card__head > .status { margin-left: auto; }
.loco-days { display: grid; gap: 16px; }
.loco-day { display: grid; gap: 0.8rem; max-width: 720px; }
.loco-day.is-saved { box-shadow: var(--shadow), 0 0 0 1px var(--ok) inset; }
.loco-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem 0.7rem; align-items: center; }
.loco-grid input { width: 100%; padding: 0.5rem 0.65rem; font: inherit; text-align: right; color: var(--text); background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.loco-day__more summary { cursor: pointer; color: var(--accent); font-size: 0.9rem; }
.loco-day__more[open] summary { margin-bottom: 0.6rem; }
.loco-day__result { margin: 0; }
.fuel-loco th[scope="colgroup"] { text-align: center; }
.table--sticky tbody th[scope="row"] { white-space: nowrap; }
.wagons input { width: 4.5rem; padding: 0.3rem 0.5rem; font: inherit; text-align: right; color: var(--text); background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.wagons input[aria-invalid="true"] { border-color: var(--bad); }
@media (max-width: 1000px) { .fuel-day { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .fuel-issues input { width: 5rem; }
  .loco-grid { grid-template-columns: 6.5rem minmax(0, 1fr) minmax(0, 1fr); }
}
