/* Διαχείριση παραγωγής — design system (light / dark, src/theme.js sets html[data-theme]).
   Neutral zinc base, Vlachos Bros red as the only accent. Inter + JetBrains Mono (codes/times). */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --side-w: 256px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #f6f6f7; --surface: #ffffff; --surface-2: #f2f2f4; --surface-3: #ebebee;
  --border: #e6e6ea; --border-strong: #d4d4d8;
  --text: #17171a; --text-2: #52525b; --muted: #84848d;
  --accent: #dc1f2b; --accent-hover: #c01824; --accent-soft: #fde8ea; --accent-text: #b4141f;
  --ok: #15803d; --ok-soft: #e7f6ec; --warn: #b45309; --warn-soft: #fdf1e1; --off: #a1a1aa;
  --header: rgba(255, 255, 255, .8);
  --shadow: 0 1px 2px rgba(16, 16, 20, .04), 0 4px 16px rgba(16, 16, 20, .05);
  --shadow-lg: 0 24px 60px rgba(16, 16, 20, .22);
  --track: #ececef; --shift: #dcebe1;
  --scrim: rgba(10, 10, 12, .4);
  --on-accent: #ffffff;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0c; --surface: #131316; --surface-2: #1b1b1f; --surface-3: #232328;
  --border: #26262b; --border-strong: #34343a;
  --text: #f4f4f5; --text-2: #b4b4bc; --muted: #80808a;
  --accent: #f0444e; --accent-hover: #ff5a63; --accent-soft: rgba(240, 68, 78, .14); --accent-text: #ff7a82;
  --ok: #4ade80; --ok-soft: rgba(74, 222, 128, .12); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12); --off: #5b5b63;
  --header: rgba(10, 10, 12, .74);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
  --track: #222227; --shift: #1c2e23;
  --scrim: rgba(0, 0, 0, .6);
}
/* app-shell dialog + toast follow the theme */
.as-dialog { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.as-dialog-header { background: transparent; color: var(--text); border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 650; padding: 14px 16px; }
.as-dialog-body label { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }
.as-dialog-body input { background: var(--bg); color: var(--text); border: 1px solid var(--border-strong); border-radius: 10px; height: 42px; }
.as-dialog-body input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.as-dialog-footer { border-top: 1px solid var(--border); }
.as-btn { border-radius: 10px; height: 40px; padding: 0 16px; font-weight: 600; }
.as-btn-cancel { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.as-btn-confirm { background: var(--accent); color: var(--on-accent); }
.as-hint { color: var(--muted); font-style: normal; }
.as-error { color: var(--accent-text); }
.as-backdrop { background: var(--scrim); backdrop-filter: blur(2px); }
.as-toast { background: var(--text); color: var(--bg); border-radius: 10px; font-weight: 500; box-shadow: var(--shadow-lg); bottom: calc(20px + env(safe-area-inset-bottom)); }
.as-toast.success { background: var(--ok); color: #fff; }
.as-toast.error { background: var(--accent); color: #fff; }

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum' 1, 'cv11' 1; -webkit-text-size-adjust: 100%; min-height: 100vh; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.grow { flex: 1; min-width: 0; }
.code { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: -.01em; }
.muted { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.col { min-width: 0; display: flex; flex-direction: column; }
.side { position: fixed; z-index: 100; top: 0; bottom: 0; left: 0; width: min(86vw, var(--side-w)); display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border); padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
  padding-top: max(14px, env(safe-area-inset-top)); overflow-y: auto; transform: translateX(-104%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
.side.open { transform: none; }
.scrim { position: fixed; inset: 0; z-index: 90; background: var(--scrim); backdrop-filter: blur(2px); }
@media (min-width: 1024px) {
  .app { grid-template-columns: var(--side-w) 1fr; }
  .side { position: sticky; height: 100vh; width: auto; transform: none; box-shadow: none; transition: none; }
  .only-mobile, .scrim { display: none !important; }
}

/* Sidebar */
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 16px; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 0 0 1px var(--border); }
.brand-text { flex: 1; min-width: 0; }
.brand-name { font-weight: 650; letter-spacing: -.015em; font-size: 15px; }
.brand-sub { font-size: 11.5px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 18px 10px 6px; }
.nav-item, .side .as-menu-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; min-height: 40px; border-radius: var(--r-sm); color: var(--text-2);
  text-decoration: none; font-weight: 500; font-size: 14px; border: 0; background: none; width: 100%; text-align: left; cursor: pointer; position: relative; }
.nav-item:hover, .side .as-menu-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-item .count { margin-left: auto; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.nav-item .count.alert { color: var(--accent-text); }
.side .as-menu-item .as-icon { width: auto; display: inline-flex; }
.side .as-menu-item .as-icon svg { width: 18px; height: 18px; }
.side-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.user { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--r); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 650; font-size: 12px; color: var(--text-2); flex-shrink: 0; }
.user-text { min-width: 0; }
.user-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-sub { font-size: 11.5px; color: var(--muted); }

/* Header */
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top)); background: var(--header); backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--border); }
.top h1 { font-size: 17px; font-weight: 650; letter-spacing: -.02em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top h1, .top-sub { max-width: 100%; }
.top-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; }
.top-progress::after { content: ''; position: absolute; top: 0; bottom: 0; width: 30%; background: var(--accent); border-radius: 2px; animation: indet 1.1s var(--ease) infinite; }
@keyframes indet { from { left: -30%; } to { left: 100%; } }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  display: inline-grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.ghost { border-color: transparent; background: transparent; }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--text-2); padding: 0 11px; height: 30px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex-shrink: 0; animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
@media (max-width: 420px) { .live { display: none !important; } }
.banner { background: var(--warn-soft); color: var(--warn); text-align: center; font-size: 12px; font-weight: 500; padding: 6px; border-bottom: 1px solid var(--border); }

/* Main */
main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); outline: none; }
@media (min-width: 1024px) { main { padding: 24px 28px 40px; } }
.view { animation: fadein .2s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; }

/* Controls */
.btn { height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn.primary:hover { opacity: .88; }
.btn.brand { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.brand:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.input { height: 42px; width: 100%; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-date { width: 124px; text-align: center; font-family: var(--mono); font-size: 13.5px; }
.input.date-bad { border-color: var(--accent); }
.select { width: auto; min-width: 180px; padding-right: 30px; }
textarea.input { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.search { position: relative; display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.search > svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 38px; }
.date-nav { display: inline-flex; align-items: center; gap: 6px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; padding: 0 12px; height: 32px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--border); }
.seg-block { display: flex; }
.seg-block button { flex: 1; padding: 0 6px; font-size: 12.5px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi-l { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.kpi-v { font-size: 26px; font-weight: 650; letter-spacing: -.03em; margin-top: 4px; line-height: 1.15; }
.kpi-v small { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 2px; }
.kpi.alert .kpi-v { color: var(--accent-text); }
.kpi-dot { width: 7px; height: 7px; border-radius: 50%; }

/* Sections + grid */
.sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.sec-head h2, .group-h h3 { font-size: 12px; font-weight: 600; margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.group { margin-bottom: 22px; }
.group-h { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.group-h .n { font-size: 12px; color: var(--muted); }
.group-h .line { flex: 1; height: 1px; background: var(--border); }
.group-h .sum { font-size: 12px; color: var(--text-2); font-weight: 500; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1360px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow);
  text-align: left; width: 100%; color: inherit; font: inherit; display: block; }
button.card { cursor: pointer; transition: border-color .15s, transform .15s; }
button.card:hover { border-color: var(--border-strong); }
button.card:active { transform: scale(.995); }
.card-h { display: flex; align-items: center; gap: 11px; }
.m-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex-shrink: 0; }
.m-ico svg { width: 19px; height: 19px; }
.c-title { font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.run { background: var(--ok-soft); color: var(--ok); }
.pill.setup { background: var(--warn-soft); color: var(--warn); }
.pill.idle { background: var(--accent-soft); color: var(--accent-text); }
.pill.off, .pill.done { background: var(--surface-2); color: var(--muted); }
.job { display: block; width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid transparent;
  text-align: left; color: inherit; font: inherit; cursor: pointer; transition: border-color .15s; }
.job:hover { border-color: var(--border-strong); }
.job-top { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.job-item { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-cust { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.bar { flex: 1; height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--ok); transition: width .4s var(--ease); }
.bar.warn > i { background: var(--warn); }
.pct { font-weight: 650; font-size: 13px; min-width: 38px; text-align: right; }
.meta { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; }
.meta > div { font-size: 11.5px; color: var(--muted); min-width: 0; }
.meta b { display: block; color: var(--text); font-size: 13.5px; font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); background: var(--surface-2); border-radius: 7px; padding: 3px 8px; max-width: 100%; }
.chip svg { width: 13px; height: 13px; }
.idle-note { margin-top: 12px; display: flex; gap: 12px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.big { font-size: 24px; font-weight: 650; letter-spacing: -.03em; color: var(--accent-text); white-space: nowrap; }
.big.ok { color: var(--ok); }
.big.dim { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; grid-column: 1 / -1; }
.empty svg { width: 28px; height: 28px; display: block; margin: 0 auto 8px; opacity: .6; }
.error { background: var(--accent-soft); color: var(--accent-text); border-radius: var(--r); padding: 12px 14px; grid-column: 1 / -1; font-weight: 500; }
.more { grid-column: 1 / -1; text-align: center; font-size: 12px; color: var(--muted); padding: 6px; }

/* Idle timeline */
.tl { position: relative; height: 10px; border-radius: 999px; background: var(--track); margin-top: 14px; overflow: hidden; }
.tl .s { position: absolute; top: 0; bottom: 0; background: var(--shift); }
.tl .i { position: absolute; top: 0; bottom: 0; background: var(--accent); opacity: .9; }
.tl .r { position: absolute; top: 2px; bottom: 2px; width: 1.5px; background: var(--text-2); opacity: .55; }
.tl .n { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); }
.tl-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 5px; font-family: var(--mono); }
.gaps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gap { font-family: var(--mono); font-size: 11.5px; padding: 3px 8px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-text); }

/* Machine rows (Μηχανές) */
.m-vals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.m-vals > div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 11.5px; color: var(--muted); }
.m-vals b { display: block; font-size: 15px; color: var(--text); font-weight: 650; letter-spacing: -.01em; }
.m-vals small { font-size: 11px; color: var(--muted); font-weight: 500; }

/* Bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim); backdrop-filter: blur(2px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--surface); width: 100%; max-width: 680px; max-height: 90vh; border-radius: 20px 20px 0 0; border: 1px solid var(--border); border-bottom: 0;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); animation: up .25s var(--ease); }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
@media (min-width: 760px) { .sheet-backdrop { align-items: center; padding: 24px; } .sheet { border-radius: 20px; border-bottom: 1px solid var(--border); } .grab { display: none; } }
.grab { width: 36px; height: 4px; border-radius: 99px; background: var(--border-strong); margin: 8px auto 0; flex-shrink: 0; }
.sheet-h { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--border); }
.sheet-title { font-size: 16px; font-weight: 650; letter-spacing: -.015em; }
.sheet-sub { font-size: 12px; color: var(--muted); }
.sheet-b { overflow-y: auto; padding: 16px 18px 20px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.sheet-sec { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 20px 0 10px; display: flex; gap: 8px; align-items: baseline; }
.sheet-sec span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.table th { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.table td.num, .table th.num { text-align: right; }
.table td.mono { font-family: var(--mono); font-size: 12px; }

/* Form */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.unit { position: relative; }
.unit .input { padding-right: 64px; font-weight: 500; }
.unit span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); pointer-events: none; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; height: 42px; font-weight: 500; }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(18px); }
.form-error { grid-column: 1 / -1; color: var(--accent-text); font-size: 13px; min-height: 18px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 420px) { .form { grid-template-columns: 1fr; } .form-actions .btn { flex: 1; justify-content: center; } }
@media (max-width: 360px) { .input-date { width: 108px; } .date-nav { gap: 4px; } .date-nav .btn { padding: 0 12px; } }
.field label.switch { display: inline-flex; margin: 0; font-size: 14px; color: var(--text); }

/* ── v0.8 stage events ─────────────────────────────────────────────────── */
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 759px) { .kpi.wide { grid-column: 1 / -1; } }
.state-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.state-row > svg { width: 15px; height: 15px; color: var(--muted); }
.state-row b { font-weight: 650; color: var(--text); }
.state-row .chip { margin-left: auto; }
.tl .s { background: var(--surface-3); }
[data-theme="dark"] .tl .s { background: #2c2c33; }
.tl .g { position: absolute; top: 0; bottom: 0; }
.tl .g.run { background: var(--ok); }
.tl .g.setup { background: var(--warn); }
.tl .g.stop { background: var(--accent); }
.gap.run { background: var(--ok-soft); color: var(--ok); }
.gap.setup { background: var(--warn-soft); color: var(--warn); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 14px; height: 8px; border-radius: 3px; display: inline-block; }
.lg.run { background: var(--ok); } .lg.setup { background: var(--warn); } .lg.stop { background: var(--accent); }
.lg.shift { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.sdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: var(--off); }
.sdot.run { background: var(--ok); } .sdot.setup { background: var(--warn); } .sdot.stop { background: var(--accent); }
.pill.off::before { background: var(--off); }

/* ── Πρόγραμμα ημέρας ───────────────────────────────────────────────────── */
.sch-list { display: flex; flex-direction: column; gap: 8px; }
.sch-row { display: flex; align-items: stretch; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px; box-shadow: var(--shadow); }
.sch-row.locked { background: var(--surface-2); box-shadow: none; }
.sch-pos { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; font-weight: 650; font-size: 13px; flex-shrink: 0; align-self: center; }
.sch-row.locked .sch-pos { background: var(--surface-3); }
.sch-main { flex: 1; min-width: 0; position: relative; text-align: left; background: none; border: 0; padding: 0 0 0 2px; color: inherit; font: inherit; cursor: pointer; }
.sch-time { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 3px; display: flex; gap: 8px; align-items: baseline; }
.sch-time span { font-family: var(--font); font-size: 11.5px; color: var(--muted); }
.sch-lock { position: absolute; top: 0; right: 0; margin: 0; font-size: 11px; padding: 2px 8px; }
.sch-btns { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.sch-btns .icon-btn { width: 44px; height: 38px; }
.sch-btns .icon-btn:disabled { opacity: .3; cursor: default; }
.sch-btns .icon-btn:not(:disabled):hover { border-color: var(--accent); color: var(--accent); }
.late { color: var(--accent-text); font-weight: 600; }
[data-theme="dark"] .as-toast.success { color: #052e16; }
