/* ============================================================
   Rhoe Web — Futuristic dark UI ("command center")
   Glassmorphism + neon glow + aurora background
   Ported από SkepsisOMS.Web, rebranded στο Rhoe accent (#6E4DEF).
   ============================================================ */

:root {
    color-scheme: dark;

    /* palette */
    --accent: #6E4DEF;
    --accent-2: #A78BFA;
    --accent-deep: #3E1FBA;
    --cyan: #22D3EE;
    --bg: #05070F;
    --bg-2: #0A0F1F;
    --surface: rgba(148, 163, 218, 0.055);
    --surface-2: rgba(148, 163, 218, 0.10);
    --surface-solid: #0D1224;
    --line: rgba(148, 163, 218, 0.14);
    --line-soft: rgba(148, 163, 218, 0.08);
    --line-strong: rgba(167, 139, 250, 0.45);
    /* διαχωριστικά γραμμών λίστας/πίνακα + zebra εναλλάξ φόντο */
    --row-line: rgba(148, 163, 218, 0.20);
    --row-alt: rgba(148, 163, 218, 0.045);
    --text: #E8ECF8;
    --text-muted: #8A93AC;
    --success: #34D399;
    --warning: #FBBF24;
    --error: #F87171;
    --danger: #F87171;

    /* fx */
    --glow: 0 0 28px rgba(124, 58, 237, 0.35);
    --glow-cyan: 0 0 22px rgba(34, 211, 238, 0.25);
    --radius: 16px;
    --radius-sm: 12px;
    --blur: saturate(160%) blur(18px);

    /* type */
    /* Γραμματοσειρά συστήματος, όπως το desktop (Segoe UI): πλήρη ελληνικά σε
       Windows, Android (Roboto) και iPad (SF) χωρίς download. Η Inter (variable)
       χάλαγε ελληνικά σε μικρά μεγέθη στα Windows (π.χ. το «ω»). */
    --font: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, Roboto, 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
    --mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
}

/* ---------- Light theme (toggle στο topbar, persisted σε localStorage) ---------- */
html[data-theme="light"] {
    color-scheme: light;

    --accent: #6E4DEF;
    --accent-2: #6D28D9;
    --accent-deep: #3E1FBA;
    --cyan: #0891B2;
    --bg: #F3F4FB;
    --bg-2: #E9EBF8;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-2: rgba(124, 58, 237, 0.07);
    --surface-solid: #FFFFFF;
    --line: rgba(82, 88, 130, 0.18);
    --line-soft: rgba(82, 88, 130, 0.10);
    --line-strong: rgba(124, 58, 237, 0.45);
    --row-line: rgba(82, 88, 130, 0.22);
    --row-alt: rgba(82, 88, 130, 0.05);
    --text: #1B1E2E;
    --text-muted: #666D85;
    --success: #059669;
    --warning: #B45309;
    --error: #DC2626;
    --danger: #DC2626;

    --glow: 0 6px 24px rgba(124, 58, 237, 0.16);
    --glow-cyan: 0 6px 20px rgba(8, 145, 178, 0.14);
}

/* Επιμέρους overrides όπου τα σκούρα χρώματα είναι hardcoded */
html[data-theme="light"] .topbar { background: rgba(255, 255, 255, 0.72); }
html[data-theme="light"] .dock {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 14px 40px rgba(27, 30, 46, 0.16);
}
html[data-theme="light"] .fx-aurora.a1 { opacity: .28; }
html[data-theme="light"] .fx-aurora.a2 { opacity: .22; }
html[data-theme="light"] .fx-aurora.a3 { opacity: .18; }
html[data-theme="light"] .fx-grid {
    background-image:
        linear-gradient(rgba(82, 88, 130, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(82, 88, 130, .07) 1px, transparent 1px);
}
html[data-theme="light"] .login-card { box-shadow: 0 24px 60px rgba(27, 30, 46, 0.14), var(--glow); }
html[data-theme="light"] .bg-toast.success { background: rgba(236, 253, 245, .95); }
html[data-theme="light"] .bg-toast.error { background: rgba(254, 242, 242, .95); }
html[data-theme="light"] .bg-toast.info { background: rgba(245, 243, 255, .95); }
html[data-theme="light"] .bg-toast { box-shadow: 0 14px 40px rgba(27, 30, 46, 0.20); }
html[data-theme="light"] #blazor-error-ui { background: rgba(254, 242, 242, .96); }
html[data-theme="light"] .active-elapsed,
html[data-theme="light"] .st-hero .st-clock { text-shadow: none; }
html[data-theme="light"] .confirm-banner strong { color: #92400E; }

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: rgba(124, 58, 237, 0.45); color: #fff; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 218, 0.18); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(167, 139, 250, 0.45); }

/* ---------- animated background ---------- */
.fx-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, var(--bg-2) 0%, var(--bg) 60%); }
.fx-aurora { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .5; will-change: transform; }
.fx-aurora.a1 { top: -28vmax; left: -12vmax; background: radial-gradient(circle, rgba(124,58,237,.38) 0%, transparent 65%); animation: drift1 26s ease-in-out infinite alternate; }
.fx-aurora.a2 { bottom: -30vmax; right: -16vmax; background: radial-gradient(circle, rgba(34,211,238,.20) 0%, transparent 65%); animation: drift2 32s ease-in-out infinite alternate; }
.fx-aurora.a3 { top: 30%; left: 55%; width: 36vmax; height: 36vmax; background: radial-gradient(circle, rgba(167,139,250,.16) 0%, transparent 65%); animation: drift3 22s ease-in-out infinite alternate; }
.fx-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(148,163,218,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148,163,218,.05) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(80% 60% at 50% 0%, #000 0%, transparent 90%);
    mask-image: radial-gradient(80% 60% at 50% 0%, #000 0%, transparent 90%);
}
@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(9vmax, 6vmax) scale(1.15); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1.1); } to { transform: translate(-8vmax, -5vmax) scale(0.95); } }
@keyframes drift3 { from { transform: translate(0,0); } to { transform: translate(-10vmax, 8vmax); } }

/* ---------- app shell ---------- */
.app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

.topbar {
    background: rgba(8, 11, 24, 0.66);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--line-soft);
    padding: 12px 20px;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 100;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo {
    height: 26px; width: auto; flex: 0 0 auto; display: block;
}
/* Wordmark theme-swap: white reverse on dark (default), gradient on light. */
.brand-logo--pos { display: none; }
html[data-theme="light"] .brand-logo--rev { display: none; }
html[data-theme="light"] .brand-logo--pos { display: block; }
.brand-text {
    font-weight: 800; font-size: 17px; letter-spacing: .4px; color: var(--text);
}

.nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav a {
    color: var(--text-muted); text-decoration: none; padding: 7px 13px; border-radius: 999px;
    font-size: 13px; font-weight: 500; border: 1px solid transparent;
    transition: color .2s, background .2s, border-color .2s, box-shadow .2s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active {
    background: linear-gradient(135deg, rgba(124,58,237,.22), rgba(34,211,238,.10));
    border-color: var(--line-strong);
    color: var(--accent-2); font-weight: 600;
    box-shadow: 0 0 16px rgba(124,58,237,.22);
}

.topbar-user { display: flex; gap: 8px; align-items: center; margin-left: auto; }

.theme-toggle {
    width: 36px; height: 36px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 50%;
    background: var(--surface); color: var(--text-muted); cursor: pointer;
    transition: color .2s, border-color .2s, box-shadow .2s, transform .3s;
}
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle:hover {
    color: var(--accent-2); border-color: var(--line-strong);
    box-shadow: 0 0 14px rgba(124,58,237,.25); transform: rotate(18deg);
}
.user-chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--surface); border: 1px solid var(--line);
    padding: 5px 12px; border-radius: 999px; font-size: 12px; color: var(--text);
}
.user-chip::before {
    content: ""; width: 7px; height: 7px; border-radius: 50%;
    background: var(--success); box-shadow: 0 0 8px rgba(52,211,153,.8);
    animation: pulseDot 2.2s ease-in-out infinite;
}
.logout {
    border: 1px solid transparent; background: transparent; color: var(--text-muted);
    cursor: pointer; font-size: 12px; padding: 6px 10px; border-radius: 999px; font-family: var(--font);
    transition: color .2s, border-color .2s;
}
.logout:hover { color: var(--error); border-color: rgba(248,113,113,.35); }

.shell { display: flex; flex: 1; width: 100%; align-items: stretch; }
.shell .content { flex: 1; min-width: 0; }

.content { padding: 22px 16px 32px; max-width: 960px; margin: 0 auto; width: 100%; }

/* ---------- sidebar (desktop) ---------- */
.sidebar { display: none; }

@media (min-width: 1100px) {
    .desktop-nav { display: none; }
    .sidebar {
        display: block; flex: 0 0 234px; width: 234px;
        position: sticky; top: 61px; align-self: flex-start;
        height: calc(100vh - 61px); height: calc(100dvh - 61px);
        overflow-y: auto; overscroll-behavior: contain;
        padding: 16px 12px 26px;
        border-right: 1px solid var(--line-soft);
        background: rgba(8, 11, 24, 0.35);
        -webkit-backdrop-filter: var(--blur);
        backdrop-filter: var(--blur);
    }
}
html[data-theme="light"] .sidebar { background: rgba(255, 255, 255, 0.5); }

.sb-group { margin-bottom: 16px; }
.sb-group:last-child { margin-bottom: 0; }
.sb-head {
    font-size: 10.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.2px; color: var(--text-muted);
    padding: 0 10px; margin: 0 0 6px; opacity: .75;
}
.sb-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; margin-bottom: 2px;
    border-radius: 12px; border: 1px solid transparent;
    text-decoration: none; color: var(--text-muted);
    font-size: 13px; font-weight: 500;
    transition: color .2s, background .2s, border-color .2s, box-shadow .2s;
}
.sb-link:hover { background: var(--surface-2); color: var(--text); }
.sb-link.active {
    background: linear-gradient(135deg, rgba(124,58,237,.22), rgba(34,211,238,.10));
    border-color: var(--line-strong);
    color: var(--accent-2); font-weight: 600;
    box-shadow: 0 0 16px rgba(124,58,237,.18);
}
.sb-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; flex: 0 0 auto;
}
.sb-ico svg { width: 100%; height: 100%; }
.sb-link.active .sb-ico svg { filter: drop-shadow(0 0 7px rgba(167,139,250,.8)); }

/* inline icon — κλιμακώνεται με το κείμενο */
.ico { width: 1.05em; height: 1.05em; flex: 0 0 auto; vertical-align: -0.15em; }
.sb-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-badge {
    flex: 0 0 auto; min-width: 21px; text-align: center;
    font-size: 10.5px; font-weight: 700; font-family: var(--mono);
    padding: 2px 6px; border-radius: 999px;
    background: rgba(124,58,237,.16); color: var(--accent-2);
    border: 1px solid rgba(167,139,250,.3);
}
.sb-link.active .sb-badge { background: rgba(124,58,237,.32); border-color: rgba(167,139,250,.5); }
.sb-badge.hot { background: color-mix(in srgb, var(--error) 22%, transparent); color: var(--error); border-color: color-mix(in srgb, var(--error) 55%, transparent); }

/* Νέα κλήση σταθμού: ειδοποίηση πάνω δεξιά (κάτω στο κινητό, πάνω από το dock). */
.call-toast {
    position: fixed; top: 76px; right: 18px; z-index: 60; max-width: min(380px, calc(100vw - 32px));
    display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px;
    background: var(--surface); border: 1px solid color-mix(in srgb, var(--warning) 60%, transparent);
    color: var(--text); text-decoration: none; box-shadow: 0 14px 40px rgba(0,0,0,.35);
    animation: call-in .25s ease-out;
}
.call-toast.stop { border-color: color-mix(in srgb, var(--error) 60%, transparent); }
.call-toast > span:first-child { font-size: 24px; }
.call-toast small { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
@keyframes call-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 768px) { .call-toast { top: auto; bottom: 92px; right: 16px; left: 16px; max-width: none; } }

/* Board: κλήσεις σταθμών */
.board-calls { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.board-call {
    display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 2fr) auto auto; align-items: center; gap: 16px;
    padding: 14px 20px; border-radius: 16px; font-size: 22px;
    border: 2px solid var(--warning); background: color-mix(in srgb, var(--warning) 10%, transparent);
}
.board-call.stop { border-color: var(--error); background: color-mix(in srgb, var(--error) 10%, transparent); }
.board-call.taken { border-color: var(--success); background: color-mix(in srgb, var(--success) 8%, transparent); }
.bc-icon { font-size: 28px; }
.bc-station { font-weight: 800; }
.bc-reason { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-time { font-weight: 700; }
.bc-who { color: var(--text-muted); font-size: 18px; }
@media (max-width: 768px) { .board-call { grid-template-columns: auto 1fr; font-size: 17px; } .bc-reason, .bc-time, .bc-who { grid-column: 2; } }

/* Ιστορικό παραγγελίας */
.tl { padding: 6px 0; }
.tl-row {
    display: grid; grid-template-columns: 92px minmax(90px, 140px) minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline;
    padding: 9px 16px; border-bottom: 1px solid var(--line-soft); border-left: 3px solid transparent; font-size: 14px;
}
.tl-row:last-of-type { border-bottom: 0; }
.tl-done { border-left-color: var(--success); }
.tl-stop { border-left-color: var(--error); }
.tl-start { border-left-color: var(--cyan); }
.tl-call { border-left-color: var(--warning); }
.tl-time { color: var(--text-muted); font-size: 12.5px; }
.tl-where { font-weight: 700; }
.tl-who { font-size: 12.5px; white-space: nowrap; }
.tl-more { margin: 10px 16px 6px; }
@media (max-width: 640px) {
    .tl-row { grid-template-columns: auto minmax(0, 1fr); }
    .tl-text { grid-column: 1 / -1; }
    .tl-who { grid-column: 1 / -1; }
}

/* Απόδοση */
.grid .num, .grid th.num { text-align: right; }
.stats-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 16px; }
.stats-bars { padding: 10px 16px; display: flex; flex-direction: column; gap: 10px; }
.stats-bar { display: grid; grid-template-columns: minmax(90px, 40%) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.stats-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-bar-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.stats-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent-2); }
.stats-bar-value { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.stats-note { margin-top: 14px; font-size: 13px; line-height: 1.5; }

/* Επιτήρηση */
.att-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.att-pill {
    padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
    color: var(--text-muted); text-decoration: none; font-size: 14px;
}
.att-pill b { color: var(--text); font-family: var(--mono); margin-right: 4px; }
.att-pill.hot { border-color: color-mix(in srgb, var(--error) 55%, transparent); color: var(--error); }
.att-pill.hot b { color: var(--error); }
.att-pill.warn { border-color: color-mix(in srgb, var(--warning) 55%, transparent); color: var(--warning); }
.att-pill.warn b { color: var(--warning); }
.att-call { border-left: 3px solid var(--warning); }
.att-call.stop { border-left-color: var(--error); }
.att-call.taken { border-left-color: var(--success); }
.att-notes { display: block; margin-top: 3px; font-size: 14px; }
.att-hint { font-size: 12px; }
.status-chip.att-chip-hot { color: var(--error); border-color: var(--error); }
.status-chip.att-chip-warn { color: var(--warning); border-color: var(--warning); }
.sb-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px rgba(34,211,238,.6); }

/* page entrance */
.content > * { animation: pageIn .42s cubic-bezier(.2, .8, .25, 1) both; }
.content > *:nth-child(2) { animation-delay: .04s; }
.content > *:nth-child(3) { animation-delay: .08s; }
.content > *:nth-child(4) { animation-delay: .12s; }
.content > *:nth-child(5) { animation-delay: .16s; }
.content > *:nth-child(6) { animation-delay: .20s; }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- typography ---------- */
h2 { font-size: 24px; font-weight: 800; letter-spacing: -.3px; margin: 4px 0 18px; }
h2.page-title { color: var(--text); }
.page-sub { color: var(--text-muted); font-size: 13px; margin: -12px 0 18px; }
.count-line { color: var(--text-muted); font-size: 12px; margin: -4px 0 10px; font-family: var(--mono); letter-spacing: .3px; }
.count-line .today-progress { color: var(--success); font-weight: 700; }

h3.section-h {
    display: flex; align-items: center; gap: 10px;
    font-size: 12px; text-transform: uppercase; color: var(--text-muted);
    letter-spacing: 1.4px; margin: 26px 0 12px; font-weight: 700; font-family: var(--mono);
}
h3.section-h::before {
    content: ""; width: 18px; height: 2px; border-radius: 2px; flex: 0 0 auto;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    box-shadow: 0 0 8px rgba(124,58,237,.7);
}

.muted { color: var(--text-muted); font-size: 12px; }
.danger-text { color: var(--danger); }
.title-lg { font-size: 18px; }
.ta-r { text-align: right; }
.u-mt-8 { margin-top: 8px; }
.u-mt-10 { margin-top: 10px; }
.u-mt-14 { margin-top: 14px; }
.u-ml-10 { margin-left: 10px; }
.u-mb-16 { margin-bottom: 16px; }

/* ---------- KPI cards ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi-card {
    position: relative; overflow: hidden;
    background: var(--surface);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px;
    transition: transform .25s cubic-bezier(.2,.8,.25,1), box-shadow .25s, border-color .25s;
}
.kpi-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167,139,250,.7), transparent);
}
.kpi-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--glow); }
.kpi-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi-label { color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; font-family: var(--mono); }
.kpi-icon {
    width: 30px; height: 30px; border-radius: 10px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(124,58,237,.30), rgba(34,211,238,.14));
    border: 1px solid var(--line); color: var(--accent-2);
}
.kpi-icon svg { width: 16px; height: 16px; }
.kpi-value {
    font-size: 32px; font-weight: 800; margin-top: 8px; line-height: 1.1;
    font-family: var(--mono); font-variant-numeric: tabular-nums;
    color: var(--text);
}

/* ---------- cards / list rows ---------- */
.card {
    background: var(--surface);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 13px 16px; border-bottom: 1px solid var(--row-line); gap: 12px;
}
.row:last-child { border-bottom: none; }
.card > :where(.row:nth-child(even)) { background: var(--row-alt); }
.row.link { text-decoration: none; color: inherit; cursor: pointer; position: relative; transition: background .18s; }
.row.link::after {
    content: "›"; color: var(--text-muted); font-size: 18px; line-height: 1;
    transition: transform .2s, color .2s;
}
.row.link:hover { background: var(--surface-2); }
.row.link:hover::after { transform: translateX(3px); color: var(--accent-2); }
.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-main strong { letter-spacing: .2px; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; margin-left: auto; }

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(52,211,153,.12); color: var(--success);
    border: 1px solid rgba(52,211,153,.35);
    font-size: 10px; padding: 3px 9px; border-radius: 999px; font-weight: 700;
    letter-spacing: .8px; font-family: var(--mono);
    box-shadow: 0 0 12px rgba(52,211,153,.18);
}
.badge::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--success); box-shadow: 0 0 7px rgba(52,211,153,.9);
    animation: pulseDot 1.6s ease-in-out infinite;
}
@keyframes pulseDot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.78); } }

.empty, .loading { color: var(--text-muted); padding: 22px 16px; text-align: center; }
.loading { animation: loadingPulse 1.4s ease-in-out infinite; }
@keyframes loadingPulse { 0%, 100% { opacity: .9; } 50% { opacity: .45; } }

/* ---------- inputs ---------- */
.search-bar { margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.input {
    width: 100%; padding: 11px 15px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    font-size: 14px; font-family: var(--font); outline: none;
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: rgba(138, 147, 172, 0.75); }
.input:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(124,58,237,.18), 0 0 18px rgba(124,58,237,.25);
    background: var(--surface-2);
}
select.input {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23A78BFA' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
    padding-right: 38px;
}
select.input option { background: var(--surface-solid); color: var(--text); }

/* ---------- login ---------- */
.login-card {
    position: relative; max-width: 380px; margin: 9vh auto 0;
    background: var(--surface);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--line); border-radius: 22px; padding: 32px 28px;
    box-shadow: 0 24px 60px rgba(0,0,0,.45), var(--glow);
}
.login-card::before {
    content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167,139,250,.8), rgba(34,211,238,.6), transparent);
}
.login-logo {
    display: block;
    height: 54px; width: auto; max-width: 82%; margin: 0 auto 18px;
    animation: floaty 5s ease-in-out infinite;
}
.login-logo--pos { display: none; }
html[data-theme="light"] .login-logo--rev { display: none; }
html[data-theme="light"] .login-logo--pos { display: block; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.login-card h2 { margin: 0 0 4px; text-align: center; }
.login-card .hint { color: var(--text-muted); font-size: 12px; margin: 0 0 22px; text-align: center; }
.form-row { margin-bottom: 14px; }
.form-row label {
    display: block; font-size: 10px; color: var(--text-muted); margin-bottom: 7px;
    text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; font-family: var(--mono);
}

/* ---------- buttons ---------- */
.btn-primary {
    position: relative; overflow: hidden;
    width: 100%; padding: 12px;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9 55%, var(--accent-deep));
    color: #fff; border: none; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 700; font-family: var(--font); cursor: pointer;
    letter-spacing: .3px;
    box-shadow: 0 6px 22px rgba(124,58,237,.40);
    transition: transform .2s, box-shadow .2s, filter .2s;
}
.btn-primary::before {
    content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
    transform: translateX(-160%) skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.30), transparent);
    transition: transform .55s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(124,58,237,.55); }
.btn-primary:hover::before { transform: translateX(320%) skewX(-18deg); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.error { color: var(--error); font-size: 12px; margin-bottom: 12px; text-align: center; }

.back {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--accent-2); text-decoration: none; font-size: 13px; margin-bottom: 14px;
    padding: 6px 12px; border-radius: 999px; border: 1px solid transparent;
    transition: border-color .2s, background .2s;
}
.back:hover { border-color: var(--line-strong); background: var(--surface); }

/* ---------- tables ---------- */
.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--line); border-radius: var(--radius);
}
.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.grid th {
    background: rgba(148,163,218,.07); padding: 11px 12px; text-align: left;
    font-weight: 700; color: var(--text-muted); font-size: 10px;
    text-transform: uppercase; letter-spacing: 1.1px; font-family: var(--mono);
    border-bottom: 1px solid var(--line);
}
.grid td { padding: 11px 12px; border-bottom: 1px solid var(--row-line); font-variant-numeric: tabular-nums; }
.grid tr:last-child td { border-bottom: none; }
.grid th + th, .grid td + td { border-left: 1px solid var(--line-soft); }
.grid tbody :where(tr:nth-child(even)) { background: var(--row-alt); }
.grid tbody tr { transition: background .15s; }
.grid tbody tr:hover { background: var(--surface-2); }

/* ---------- Παραγωγή (ουρές διεργασιών) ---------- */
.proc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.proc-card {
    position: relative; overflow: hidden; display: block; text-decoration: none; color: inherit;
    background: var(--surface);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
    transition: transform .25s cubic-bezier(.2,.8,.25,1), box-shadow .25s, border-color .25s;
}
.proc-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167,139,250,.7), transparent);
}
.proc-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--glow); }
.proc-counts { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.proc-num { font-size: 26px; font-weight: 800; font-family: var(--mono); }
.proc-done { color: var(--text-muted); font-size: 11px; }
.proc-line { font-size: 12px; margin-top: 6px; }
.proc-active { color: var(--cyan); display: flex; align-items: center; gap: 6px; }

.live-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
    background: var(--cyan); box-shadow: 0 0 10px rgba(34,211,238,.9);
    animation: pulseDot 1.4s ease-in-out infinite;
}

.active-card {
    position: relative;
    background: linear-gradient(135deg, rgba(34,211,238,.10), rgba(124,58,237,.10));
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid rgba(34,211,238,.45); border-radius: var(--radius); padding: 16px;
    box-shadow: var(--glow-cyan);
    margin-bottom: 4px;
}
.active-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.active-elapsed {
    margin-left: auto; font-family: var(--mono); font-weight: 700; color: var(--cyan);
    font-size: 16px; text-shadow: 0 0 12px rgba(34,211,238,.6);
}

.queue-row { align-items: flex-start; }
.queue-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.queue-active { background: rgba(34,211,238,.06); }
.done-row { opacity: .6; }
.done-row strong { text-decoration: line-through; text-decoration-color: rgba(138,147,172,.6); }
.attention-text { color: var(--warning); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.queue-row.ready-row { box-shadow: inset 3px 0 0 var(--success); background: rgba(52,211,153,.05); }
.queue-row.blocked-row { box-shadow: inset 3px 0 0 var(--error); background: rgba(248,113,113,.04); }
html[data-theme="light"] .queue-row.ready-row { background: rgba(5,150,105,.06); }
html[data-theme="light"] .queue-row.blocked-row { background: rgba(220,38,38,.05); }

.badge.blocked {
    background: rgba(248,113,113,.12); color: var(--error);
    border-color: rgba(248,113,113,.40);
}
.badge.blocked::before { background: var(--error); box-shadow: 0 0 7px rgba(248,113,113,.9); }

.badge.rush {
    background: rgba(248,113,113,.12); color: var(--error);
    border-color: rgba(248,113,113,.40);
    box-shadow: 0 0 12px rgba(248,113,113,.22);
}
.badge.rush::before { background: var(--error); box-shadow: 0 0 7px rgba(248,113,113,.9); }
.badge.warn {
    background: rgba(251,191,36,.10); color: var(--warning);
    border-color: rgba(251,191,36,.40);
    box-shadow: 0 0 12px rgba(251,191,36,.18);
}
.badge.warn::before { background: var(--warning); box-shadow: 0 0 7px rgba(251,191,36,.9); }
.badge.neutral {
    background: var(--surface-2); color: var(--text-muted);
    border-color: var(--line); box-shadow: none;
}
.badge.neutral::before { display: none; }
.badge.accent {
    background: rgba(124,58,237,.14); color: var(--accent-2);
    border-color: rgba(167,139,250,.4); box-shadow: 0 0 12px rgba(124,58,237,.18);
}
.badge.accent::before { background: var(--accent-2); box-shadow: 0 0 7px rgba(167,139,250,.9); }

.row-actions { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.btn-mini {
    border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
    border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600;
    font-family: var(--font); cursor: pointer; white-space: nowrap;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.btn-mini:hover:not(:disabled) { border-color: var(--line-strong); box-shadow: 0 0 12px rgba(124,58,237,.2); }
.btn-mini.primary {
    border-color: var(--line-strong);
    background: linear-gradient(135deg, rgba(124,58,237,.30), rgba(34,211,238,.12));
    color: var(--accent-2);
}
.btn-mini.primary:hover:not(:disabled) { box-shadow: var(--glow); }
.btn-mini.danger { border-color: rgba(248,113,113,.45); color: var(--danger); }
.btn-mini.danger:hover:not(:disabled) { background: rgba(248,113,113,.12); box-shadow: 0 0 12px rgba(248,113,113,.25); }
.btn-mini.warn { border-color: rgba(251,191,36,.45); color: var(--warning); }
.btn-mini.warn:hover:not(:disabled) { background: rgba(251,191,36,.12); box-shadow: 0 0 12px rgba(251,191,36,.25); }
.btn-mini:disabled { opacity: .4; cursor: not-allowed; }

.content-row { cursor: pointer; }
.content-row.current { background: rgba(124,58,237,.16); }
.content-row.current:hover { background: rgba(124,58,237,.24); }

/* status chip */
.status-chip {
    font-size: 10px; padding: 3px 9px; border-radius: 999px; font-weight: 700;
    letter-spacing: .5px; font-family: var(--mono); white-space: nowrap;
    background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--line);
}
.status-chip.ok { color: var(--success); border-color: rgba(52,211,153,.4); }
.status-chip.cyan { color: var(--cyan); border-color: rgba(34,211,238,.4); }
.status-chip.accent { color: var(--accent-2); border-color: rgba(167,139,250,.4); }
.status-chip.warn { color: var(--warning); border-color: rgba(251,191,36,.4); }
.status-chip.muted { color: var(--text-muted); opacity: .7; }

/* progress bars */
.progress-track {
    height: 8px; border-radius: 999px; overflow: hidden;
    background: rgba(148,163,218,.12); border: 1px solid var(--line-soft);
}
.progress-fill {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    box-shadow: 0 0 12px rgba(34,211,238,.5);
    transition: width .6s cubic-bezier(.2,.8,.25,1);
}
.progress-fill.over {
    background: linear-gradient(90deg, var(--warning), var(--error));
    box-shadow: 0 0 12px rgba(248,113,113,.5);
}

/* filter chips */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
/* Order route: stages with arrows, parallel stations stacked in a bracket. */
.route-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.route-stage { display: inline-flex; flex-direction: column; gap: 6px; }
.route-stage.parallel { padding: 6px 8px; border: 1px dashed var(--line); border-left: 3px solid var(--accent, #7C5CFF); border-radius: 10px; }
.route-arrow { color: var(--text-muted); font-size: 16px; }
.filter-chip {
    border: 1px solid var(--line); background: var(--surface); color: var(--text-muted);
    border-radius: 999px; padding: 7px 14px; font-size: 12px; font-weight: 600;
    font-family: var(--font); cursor: pointer;
    transition: border-color .2s, color .2s, background .2s, box-shadow .2s;
}
.filter-chip:hover { border-color: var(--line-strong); color: var(--text); }
.filter-chip.active {
    background: linear-gradient(135deg, rgba(124,58,237,.25), rgba(34,211,238,.10));
    border-color: var(--line-strong); color: var(--accent-2);
    box-shadow: 0 0 14px rgba(124,58,237,.2);
}

/* ---------- inline messages + toasts ---------- */
.inline-msg {
    margin-top: 10px; padding: 11px 14px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
    animation: pageIn .3s ease both;
}
.inline-msg.success { background: rgba(52,211,153,.10); color: var(--success); border: 1px solid rgba(52,211,153,.35); }
.inline-msg.error { background: rgba(248,113,113,.10); color: var(--error); border: 1px solid rgba(248,113,113,.35); }
.inline-msg.info { background: rgba(124,58,237,.12); color: var(--accent-2); border: 1px solid rgba(167,139,250,.35); }

.confirm-banner {
    background: rgba(251,191,36,.10);
    border: 1px solid rgba(251,191,36,.40);
    border-radius: var(--radius-sm); padding: 14px;
    font-size: 14px; color: var(--warning);
    box-shadow: 0 0 18px rgba(251,191,36,.12);
    animation: pageIn .3s ease both;
}
.confirm-banner strong { color: #FDE68A; }
.confirm-actions { display: flex; gap: 10px; margin-top: 12px; }

#blazor-error-ui {
    background: rgba(34,10,10,.92); color: var(--error);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border-top: 1px solid rgba(248,113,113,.4);
    padding: 14px 20px; position: fixed; bottom: 0; left: 0; right: 0; display: none; z-index: 300;
}
#blazor-error-ui[style*="block"] { display: flex !important; justify-content: space-between; }
#blazor-error-ui a { color: var(--error); }

/* ---------- mobile dock ---------- */
.dock {
    position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 150;
    display: none;
    background: rgba(10, 14, 30, 0.78);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--line); border-radius: 24px;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 16px 50px rgba(0,0,0,.55);
}
.dock-inner { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.dock a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 2px; border-radius: 16px; text-decoration: none;
    color: var(--text-muted); position: relative;
    transition: color .2s;
}
.dock a svg { width: 21px; height: 21px; transition: transform .25s cubic-bezier(.2,.8,.25,1), filter .25s; }
.dock a span {
    font-size: 9px; font-weight: 600; letter-spacing: .2px;
    max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dock a.active { color: var(--accent-2); }
.dock a.active svg { transform: translateY(-2px); filter: drop-shadow(0 0 8px rgba(167,139,250,.9)); }
.dock a.active::before {
    content: ""; position: absolute; inset: 2px 6px;
    background: radial-gradient(60% 70% at 50% 30%, rgba(124,58,237,.28), transparent 75%);
    border-radius: 14px; z-index: -1;
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
    .content { padding: 16px 12px 110px; }
    /* List rows on a phone: the right column gets at most half the row, and a long
       status chip («Τεμαχιστική (1/6) · μπλοκαρισμένη») wraps inside it instead of
       growing over the title. */
    .row-main { flex: 1 1 auto; }
    .row-side { flex: 0 1 auto; max-width: 52%; min-width: 0; }
    .row-side .status-chip { white-space: normal; text-align: right; border-radius: 10px; line-height: 1.35; }
    .row-main .btn-mini { max-width: 100%; white-space: normal; text-align: left; }
    h2 { font-size: 20px; }
    .topbar { padding: 10px 14px; }
    .desktop-nav { display: none; }
    .dock { display: block; }
    .bg-toast { bottom: 96px; }
    .login-card { margin-top: 6vh; }
    .fx-aurora { filter: blur(70px); }
}
@media (min-width: 721px) {
    .dock { display: none !important; }
}

/* Touch devices: μεγαλύτεροι στόχοι */
@media (pointer: coarse) {
    .btn-mini { min-height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Παραγωγή: inline αριθμός δεμάτων στη γραμμή — στο ύψος των btn-mini */
.row-actions.pk-prompt { align-items: center; justify-content: flex-end; }
.row-actions.pk-prompt .input { width: 96px; padding: 6px 10px; }
.pk-hint { flex-basis: 100%; text-align: right; color: var(--text-muted); font-size: 12px; }
@media (pointer: coarse) {
    .row-actions.pk-prompt .input { min-height: 38px; }
}

/* ---------- Σελίδα σταθμού — tablet-first (κάθε σταθμός του tenant) ----------
   Τρέχει κυρίως σε tablet δίπλα στο μηχάνημα: βάση 16px, στόχοι αφής ≥ 56px,
   χρώμα κατάστασης στο hero, ερωτήσεις σε bottom sheet. */
.content:has(.st-page) { max-width: 1480px; }
/* Χωρίς την είσοδο με transform: ένα animated πρόγονος γίνεται containing block
   για τα position:fixed (sheet, toast) και τα «κλείνει» μέσα στη σελίδα. */
.content > .st-page { animation: none; }
.st-top, .st-layout { animation: pageIn .42s cubic-bezier(.2, .8, .25, 1) both; }
.st-layout { animation-delay: .05s; }

/* Λειτουργία σταθμού: χωρίς sidebar/nav/dock, όλο το πλάτος για τη δουλειά. */
html.st-focus .shell:has(.st-page) .sidebar,
html.st-focus .app:has(.st-page) .desktop-nav,
html.st-focus .app:has(.st-page) .dock { display: none !important; }
html.st-focus .content:has(.st-page) { max-width: none; padding-bottom: 24px; }

.st-page { font-size: 16px; }
.st-page .muted { font-size: 14px; }
.st-page button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.st-page .status-chip { font-size: 12px; padding: 4px 10px; }

.st-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.st-top h2 { margin: 0 0 10px; font-size: 30px; }
.st-top-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.st-stat {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 13px; border-radius: 999px; font-size: 14px;
    background: var(--surface); border: 1px solid var(--line); color: var(--text-muted);
}
.st-stat b { color: var(--text); font-family: var(--mono); font-size: 15px; }
.st-stat.working { border-color: rgba(34,211,238,.45); }
.st-stat.working b { color: var(--cyan); }
.st-stat.stopped { border-color: rgba(248,113,113,.5); }
.st-stat.stopped b { color: var(--error); }
.st-stat.drying { border-color: rgba(251,191,36,.45); }
.st-stat.drying b { color: var(--warning); }

.st-focus-btn {
    display: inline-flex; align-items: center; gap: 9px; min-height: 48px; padding: 0 18px;
    border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
    font: 600 15px var(--font); cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.st-focus-btn svg { width: 20px; height: 20px; color: var(--accent-2); }
.st-focus-btn:hover { border-color: var(--line-strong); box-shadow: 0 0 14px rgba(124,58,237,.2); }
.st-focus-exit { display: none; }
html.st-focus .st-focus-enter { display: none; }
html.st-focus .st-focus-exit { display: inline; }

.st-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }

/* ---- Worklist ---- */
.st-worklist { padding: 16px; }
.st-worklist-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.st-worklist-head strong { font-size: 18px; }
.st-link-btn {
    background: none; border: none; color: var(--accent-2); cursor: pointer;
    font: 600 14px var(--font); min-height: 44px; padding: 0 4px;
}
.st-jobs { display: flex; flex-direction: column; gap: 10px; padding: 2px; }
.st-job {
    --st-color: var(--line-strong);
    text-align: left; width: 100%; cursor: pointer; font-family: var(--font); color: var(--text);
    background: var(--surface-2); border: 1px solid var(--line); border-left: 6px solid var(--st-color);
    border-radius: var(--radius-sm); padding: 14px 16px;
    transition: border-color .2s, box-shadow .2s, background .2s, transform .1s;
}
.st-job:hover { border-color: var(--line-strong); border-left-color: var(--st-color); }
.st-job:active { transform: scale(.99); }
.st-job.active {
    border-color: var(--accent-2); border-left-color: var(--st-color); box-shadow: var(--glow);
    background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(34,211,238,.06));
}
.st-job-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.st-job-id { font-size: 19px; font-weight: 800; letter-spacing: .2px; overflow-wrap: anywhere; }
.st-job-sub { color: var(--text-muted); font-size: 14px; margin-top: 3px; }
.st-job-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 13px; }
.st-job-live { display: inline-flex; align-items: center; gap: 7px; color: var(--cyan); font-family: var(--mono); font-weight: 700; }
.st-job-date { color: var(--text-muted); font-weight: 600; font-size: 13px; }
.st-job-date.late { color: var(--warning); }
.st-job-brief { color: var(--accent-2); font-weight: 600; }
.st-job-prog { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 14px; white-space: nowrap; }
.st-job .progress-track { height: 10px; }
.st-job.is-done .progress-fill { background: var(--success); box-shadow: none; }

/* Tablet όρθιο / κινητό: η λίστα γίνεται οριζόντια λωρίδα, ώστε η ενεργή
   εργασία να μη σπρώχνεται κάτω από δέκα κάρτες. */
@media (max-width: 999px) {
    .st-jobs { flex-direction: row; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 8px; }
    .st-job { flex: 0 0 min(300px, 82%); scroll-snap-align: start; }
}
/* Tablet οριζόντιο / desktop: λίστα αριστερά, sticky, με δικό της scroll. */
@media (min-width: 1000px) {
    .st-layout { grid-template-columns: minmax(290px, 360px) minmax(0, 1fr); }
    .st-worklist { position: sticky; top: 78px; max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); display: flex; flex-direction: column; }
    .st-jobs { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
}

/* ---- Ενεργή εργασία ---- */
.st-detail { padding: 22px; container-type: inline-size; }
.st-detail-empty { min-height: 320px; display: grid; place-items: center; }
.st-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.st-eyebrow { display: block; font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: 1.4px; color: var(--text-muted); }
.st-detail-title { margin: 2px 0 0; font-size: 34px; font-weight: 800; line-height: 1.12; overflow-wrap: anywhere; }
.st-detail-sub { color: var(--text-muted); font-size: 17px; margin-top: 4px; }
.st-detail-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.st-page .st-chip-lg { font-size: 14px; padding: 6px 14px; }

/* Μηχάνημα / χειριστές ως tiles αφής */
.st-crew { margin-bottom: 16px; }
.st-crew-group + .st-crew-group { margin-top: 14px; }
.st-label { display: block; font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-muted); margin-bottom: 8px; }
.st-label-soft { text-transform: none; letter-spacing: 0; font-weight: 500; font-family: var(--font); }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.st-tile {
    display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 9px 14px;
    border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2);
    color: var(--text); font: 600 16px var(--font); text-align: left; cursor: pointer;
    transition: border-color .2s, box-shadow .2s, background .2s, transform .1s;
}
.st-tile:hover:not(:disabled) { border-color: var(--line-strong); }
.st-tile:active:not(:disabled) { transform: scale(.98); }
.st-tile.selected {
    border-color: var(--accent-2); box-shadow: var(--glow);
    background: linear-gradient(135deg, rgba(124,58,237,.24), rgba(34,211,238,.08));
}
.st-tile.selected::after { content: "✓"; margin-left: auto; color: var(--accent-2); font-weight: 800; font-size: 18px; }
/* Ονόματα σπάνε μόνο σε κενά (ποτέ «Administrat|or»)· μια λέξη που δεν χωρά
   ούτε σε πλακίδιο 240px κόβεται με «…» αντί να σπάσει στη μέση. */
.st-tile-text { min-width: 0; overflow-wrap: normal; word-break: normal; hyphens: none; overflow: hidden; text-overflow: ellipsis; }
.st-tile-sub { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.st-tile-sub.warn { color: var(--warning); }

/* ---------- Χτυπημένο κομμάτι ---------- */
.st-actions-secondary { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.st-act.help { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 45%, transparent); background: transparent; min-height: 48px; font-size: 15px; }

/* Ανοιχτές κλήσεις του σταθμού (andon) */
.st-calls { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.st-call {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-sm);
    border: 1px solid color-mix(in srgb, var(--warning) 55%, transparent); background: color-mix(in srgb, var(--warning) 8%, transparent);
}
.st-call.stop { border-color: color-mix(in srgb, var(--error) 55%, transparent); background: color-mix(in srgb, var(--error) 8%, transparent); }
.st-call.taken { border-color: color-mix(in srgb, var(--success) 55%, transparent); background: color-mix(in srgb, var(--success) 8%, transparent); }
.st-call-icon { font-size: 22px; }
.st-call-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-call-text strong { font-size: 15px; }
.st-call-text .muted { font-size: 13px; }
.st-call-notes { font-size: 13px; color: var(--text); }

/* «Τεμάχια παραγγελίας» στον σταθμό: αναδιπλούμενο, μεγάλα γράμματα για tablet. */
.st-parts { margin-top: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.st-parts-head {
    width: 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 56px;
    padding: 12px 16px; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.st-parts-head strong { font-size: 16px; }
.st-parts-head .muted { flex: 1; font-size: 14px; }
.st-parts-chevron { font-size: 18px; color: var(--text-muted); }
.st-parts-search { margin: 0 14px 10px; width: calc(100% - 28px); }
.st-parts-list { display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; border-top: 1px solid var(--line-soft); }
.st-part { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
.st-part:last-child { border-bottom: 0; }
.st-part.idle { opacity: .45; }
.st-part-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.st-part-name { font-weight: 700; font-size: 15px; flex: 1 1 200px; min-width: 0; }
.st-part-dims { font-size: 16px; font-weight: 800; }
.st-part-qty { font-size: 16px; font-weight: 800; color: var(--accent-2); min-width: 42px; text-align: right; }
.st-part-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 4px; color: var(--text-muted); font-size: 13px; align-items: center; }
.st-part-edges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.st-edge { font-family: var(--mono); font-size: 12px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); }
.st-edge b { color: var(--text-muted); font-weight: 700; margin-right: 2px; }
.st-edge.none { opacity: .5; }
.st-part-edges.strong .st-edge:not(.none) { border-color: var(--cyan); color: var(--cyan); }
.st-part-cnc { font-size: 12px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); }
.st-part-cnc.strong { border-color: var(--cyan); color: var(--cyan); }
.st-part-note { margin-top: 4px; font-size: 13px; color: var(--warning); }
.st-act.damage { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: transparent; min-height: 48px; font-size: 15px; }
.st-damage-list { display: flex; flex-direction: column; gap: 8px; max-height: 42vh; overflow-y: auto; margin: 12px 0 4px; padding-right: 4px; }
.st-damage-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.st-damage-row.selected { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger) inset; }
.st-damage-pick { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; background: none; border: 0; color: var(--text); text-align: left; cursor: pointer; font: inherit; min-height: 56px; }
.st-damage-name { font-weight: 700; font-size: 15px; }
.st-damage-meta { color: var(--text-muted); font-size: 13px; font-family: var(--mono); }
.st-damage-qty { display: flex; align-items: center; gap: 8px; padding-right: 10px; }
.st-damage-qty .st-step { width: 48px; height: 48px; min-height: 48px; font-size: 22px; }
.st-damage-qty .mono { min-width: 32px; text-align: center; font-size: 18px; font-weight: 800; }
.st-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
    display: inline-grid; place-items: center; font: 700 13px var(--font); color: #fff;
    background: linear-gradient(135deg, rgba(124,58,237,.75), rgba(34,211,238,.55));
}
.st-avatar.machine { background: var(--surface); border: 1px solid var(--line); color: var(--accent-2); font-size: 17px; }

.st-crew-locked {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px;
    padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line);
}
.st-pill {
    display: inline-flex; align-items: center; gap: 9px; padding: 4px 14px 4px 4px;
    border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600;
}
.st-pill .st-avatar { width: 32px; height: 32px; font-size: 12px; }
.st-crew-lock { margin-left: auto; color: var(--text-muted); font-size: 13px; }
.st-note { color: var(--accent-2); font-size: 14px; margin: -4px 0 16px; }
.st-crew .st-note.warn { margin: 12px 0 0; color: var(--warning); }

/* Σταθμός χωρίς μηχανές: εξήγηση αντί για άδεια pickers */
.st-machineless {
    background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
    padding: 12px 16px; margin-bottom: 16px; font-size: 14px; color: var(--text-muted); line-height: 1.5;
}

/* ---- Hero: κατάσταση + χρονόμετρο + πρόοδος ---- */
.st-hero {
    --hero: var(--accent-2);
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: center;
    padding: 26px 22px 24px; margin-bottom: 16px;
    border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2);
    transition: border-color .3s, background .3s, box-shadow .3s;
}
.st-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--hero); }
.st-hero.is-working {
    --hero: var(--cyan); border-color: rgba(34,211,238,.45); box-shadow: var(--glow-cyan);
    background: linear-gradient(135deg, rgba(34,211,238,.10), rgba(124,58,237,.08));
}
.st-hero.is-stopped { --hero: var(--error); border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.07); }
.st-hero.is-drying { --hero: var(--warning); border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.06); }
.st-hero.is-done { --hero: var(--success); border-color: rgba(52,211,153,.5); background: rgba(52,211,153,.07); }
.st-hero-main { min-width: 0; text-align: center; }
.st-state {
    display: inline-flex; align-items: center; gap: 10px;
    font: 800 15px var(--mono); text-transform: uppercase; letter-spacing: 1.6px; color: var(--hero);
}
.st-state-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--hero); box-shadow: 0 0 12px var(--hero); }
.st-hero.is-working .st-state-dot { animation: pulseDot 1.4s ease-in-out infinite; }
.st-clock {
    margin-top: 10px; color: var(--text);
    font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 800;
    font-size: clamp(54px, 12cqi, 108px); line-height: 1; letter-spacing: 1px;
}
.st-hero.is-working .st-clock { color: var(--cyan); text-shadow: 0 0 28px rgba(34,211,238,.35); }
.st-hero.is-stopped .st-clock { color: var(--error); }
.st-hero.is-done .st-clock { color: var(--success); }
.st-clock-label { margin-top: 8px; font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: 1.4px; color: var(--text-muted); }

.st-drying {
    margin-top: 16px; padding: 10px 14px; border-radius: var(--radius-sm);
    border: 1px dashed rgba(251,191,36,.5); color: var(--text-muted); font-size: 15px; line-height: 1.45;
}

.st-packages { max-width: 260px; margin: 0 auto; text-align: center; color: var(--text-muted); font-size: 16px; line-height: 1.45; }
.st-packages b { display: block; font: 800 64px var(--mono); line-height: 1; color: var(--text); }

/* Αρκετό πλάτος: ρολόι αριστερά, μέγεθος εργασίας δεξιά. */
@container (min-width: 540px) {
    .st-hero { grid-template-columns: minmax(0, 1fr) auto; padding: 30px 28px 28px; }
    .st-hero-main { text-align: left; }
    .st-clock { font-size: clamp(46px, 7.6cqi, 100px); }
}

/* ---- Κουμπιά βήματος (δέματα, χρόνος, χτυπημένα): μεγάλα για χέρια με γάντια ---- */
.st-step {
    min-width: 84px; min-height: 84px; flex: 0 0 auto;
    border-radius: 20px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
    font: 800 34px var(--font); line-height: 1; cursor: pointer; user-select: none;
    transition: border-color .2s, box-shadow .2s, transform .08s, filter .2s;
}
.st-step:hover:not(:disabled) { border-color: var(--line-strong); }
.st-step:active:not(:disabled) { transform: scale(.95); }
.st-step:disabled { opacity: .35; cursor: not-allowed; }
.st-step.plus {
    flex: 1 1 0; max-width: 240px; border-color: transparent; color: #fff;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9 55%, var(--accent-deep));
    box-shadow: 0 8px 24px rgba(124,58,237,.38);
}
.st-step.plus:disabled { box-shadow: none; }
/* ---- Ενέργειες ανά κατάσταση ---- */
.st-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.st-act {
    flex: 1 1 170px; min-height: 64px; padding: 0 20px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
    font: 700 18px var(--font); cursor: pointer; white-space: nowrap;
    transition: border-color .2s, box-shadow .2s, transform .08s, filter .2s;
}
.st-act:hover:not(:disabled) { border-color: var(--line-strong); filter: brightness(1.06); }
.st-act:active:not(:disabled) { transform: scale(.98); }
.st-act:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.st-act.main { flex-grow: 2; min-height: 72px; font-size: 20px; }
.st-act.go {
    border-color: transparent; color: #fff;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9 55%, var(--accent-deep));
    box-shadow: 0 8px 26px rgba(124,58,237,.40);
}
.st-act.finish {
    border-color: transparent; color: #fff;
    background: linear-gradient(135deg, #10B981, #059669);
    box-shadow: 0 8px 26px rgba(16,185,129,.30);
}
.st-act.finish-soft { border-color: rgba(52,211,153,.5); color: var(--success); }
.st-act.danger { border-color: rgba(248,113,113,.55); color: var(--danger); background: rgba(248,113,113,.08); }
.st-act.danger-solid { border-color: transparent; color: #fff; background: linear-gradient(135deg, #EF4444, #B91C1C); box-shadow: 0 8px 24px rgba(239,68,68,.30); }
.st-act.drying { border-color: rgba(251,191,36,.55); color: var(--warning); }
.st-hint { color: var(--text-muted); font-size: 15px; text-align: center; margin: -4px 0 16px; }

/* ---- Ενημέρωση ---- */
.st-brief { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.st-brief.unread {
    margin-bottom: 18px; border-color: rgba(167,139,250,.6); box-shadow: var(--glow);
    background: linear-gradient(135deg, rgba(124,58,237,.16), rgba(34,211,238,.05));
}
.st-brief-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.st-brief-head strong { font-size: 17px; }
.st-brief-line { font-size: 16px; line-height: 1.5; padding: 7px 0; border-top: 1px solid var(--line-soft); }
.st-brief-head + .st-brief-line { border-top: none; }
.st-brief-btn {
    min-height: 48px; padding: 0 20px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--line-strong); color: #fff; font: 700 15px var(--font);
    background: linear-gradient(135deg, #8B5CF6, #6D28D9 55%, var(--accent-deep));
}

/* ---- Ερωτήσεις: bottom sheet (κάτω στο κινητό, στο κέντρο στο tablet) ---- */
.st-sheet-backdrop {
    position: fixed; inset: 0; z-index: 400;
    display: flex; align-items: flex-end; justify-content: center; padding: 16px;
    background: rgba(3,5,12,.62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    animation: stFade .2s ease both;
}
@media (min-width: 700px) { .st-sheet-backdrop { align-items: center; } }
.st-sheet {
    width: min(660px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; outline: none;
    background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 22px;
    padding: 24px; box-shadow: 0 24px 60px rgba(0,0,0,.5);
    animation: stSheetIn .28s cubic-bezier(.2,.8,.25,1) both;
}
.st-sheet-head { margin-bottom: 18px; }
.st-sheet-head strong { display: block; font-size: 23px; margin-bottom: 6px; color: var(--accent-2); }
.st-sheet-head.danger strong { color: var(--danger); }
.st-sheet-head span { color: var(--text-muted); font-size: 15px; line-height: 1.5; }
.st-sheet-head b { color: var(--text); font-family: var(--mono); }
.st-sheet-note { color: var(--text-muted); font-size: 14px; margin: 8px 0 16px; }
.st-reasons { margin-bottom: 18px; }
.st-field { margin-bottom: 20px; }
.st-input-lg { min-height: 56px; font-size: 18px; }
.st-packages-input { display: flex; gap: 10px; align-items: stretch; }
.st-packages-input .st-step { min-width: 64px; min-height: 64px; font-size: 28px; flex: 0 0 auto; }
.st-input-num { max-width: 160px; text-align: center; font: 800 26px var(--mono); }
/* Τέλος: επιβεβαίωση χρόνου (ώρες ±1, λεπτά ±5). */
.st-time-input { display: flex; flex-wrap: wrap; gap: 12px; }
.st-time-part { display: flex; gap: 8px; align-items: center; flex: 1 1 240px; }
.st-time-part .st-step { min-width: 56px; min-height: 60px; font-size: 22px; flex: 0 0 auto; }
.st-time-part .st-input-num { max-width: 96px; min-width: 64px; }
.st-time-unit { font: 700 14px var(--mono); color: var(--text-muted); }
.st-time-error { color: var(--error); font-weight: 600; }
.st-sheet-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@keyframes stFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes stSheetIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
html[data-theme="light"] .st-sheet-backdrop { background: rgba(27,30,46,.35); }
html[data-theme="light"] .st-sheet { box-shadow: 0 24px 60px rgba(27,30,46,.22); }

/* ---- Toast: πάνω από όλα, κρύβεται μόνο του ---- */
.st-toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 450; transform: translateX(-50%);
    width: max-content; max-width: min(640px, calc(100% - 32px));
    padding: 16px 22px; border-radius: 16px; border: 1px solid var(--line);
    background: var(--surface-solid); font-size: 16px; font-weight: 600; cursor: pointer;
    box-shadow: 0 16px 40px rgba(0,0,0,.45);
    animation: stToastIn .3s cubic-bezier(.2,.8,.25,1) both;
}
.st-toast.success { color: var(--success); border-color: rgba(52,211,153,.55); }
.st-toast.error { color: var(--error); border-color: rgba(248,113,113,.55); }
.st-toast.info { color: var(--accent-2); border-color: rgba(167,139,250,.55); }
@keyframes stToastIn { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 720px) { .st-toast { bottom: 104px; } }
html.st-focus .st-toast { bottom: 24px; }
html[data-theme="light"] .st-toast { box-shadow: 0 14px 40px rgba(27,30,46,.20); }

/* Στενό κινητό */
@media (max-width: 480px) {
    .st-detail { padding: 16px; }
    .st-detail-title { font-size: 28px; }
}

/* ---------- Review mode (hosted review build only) ---------- */

/* «Τι νέο»: ο changelog της ομάδας (Review/WhatsNew.md). */
.wn-page { max-width: 820px; }
.wn-intro { margin: 0 0 14px; line-height: 1.5; }
.wn-entry { padding: 18px 20px; margin-bottom: 14px; }
.wn-entry.is-latest { border-color: rgba(167,139,250,.45); box-shadow: 0 0 0 1px rgba(124,58,237,.18), var(--glow); }
.wn-entry-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wn-date { font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.wn-tag { font: 700 11px var(--mono); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--accent-2); }
.wn-tag.new { border-color: rgba(34,211,238,.5); color: var(--cyan); }
.wn-title { margin: 8px 0 4px; font-size: 19px; line-height: 1.35; }
.wn-lead { margin: 0 0 6px; color: var(--text-muted); line-height: 1.5; }
.wn-section { margin-top: 12px; }
.wn-kind { margin: 0 0 6px; font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: 1.2px; }
.wn-kind.added { color: var(--success); }
.wn-kind.removed { color: var(--error); }
.wn-kind.fixed { color: var(--cyan); }
.wn-kind.changed { color: var(--warning); }
.wn-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; }
.wn-list b { color: var(--text); }
.rv-fab {
    position: fixed; right: 20px; bottom: 20px; z-index: 300;
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 46px; padding: 0 18px 0 14px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--line-strong); color: #fff; font: 700 14px var(--font);
    background: linear-gradient(135deg, #8B5CF6, #6D28D9 55%, var(--accent-deep));
    box-shadow: 0 12px 32px rgba(0,0,0,.4), var(--glow);
}
.rv-fab svg { width: 20px; height: 20px; }
.rv-fab:hover { filter: brightness(1.08); }
@media (max-width: 720px) {
    .rv-fab { bottom: 104px; right: 14px; padding: 0 14px; }
    .rv-fab span { display: none; }
}
/* Station pages: the button sits in the page header instead (StationPage), clear of
   the counter and «Τέλος» — and focus mode alone must not move it over the dock. */
.app:has(.st-page) .rv-fab { display: none; }

.content:has(.rv-board) { max-width: none; }
.rv-board {
    display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 12px;
    overflow-x: auto; padding-bottom: 8px; align-items: start;
}
/* Phone: one status under the other, empty ones out of the way. */
@media (max-width: 720px) {
    .rv-board { grid-template-columns: 1fr; overflow-x: visible; }
    .rv-col.empty { display: none; }
}
.rv-col {
    display: flex; flex-direction: column; gap: 8px; min-width: 0;
    background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
    padding: 10px;
}
.rv-col-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 4px; }
.rv-card {
    display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer;
    background: var(--surface-solid); color: var(--text); font: inherit;
    border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px;
}
.rv-card:hover { border-color: var(--line-strong); }
.rv-card.unread { border-color: rgba(167,139,250,.7); box-shadow: var(--glow); }
.rv-card-top { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.rv-card-title { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.rv-card-meta { font-size: 12px; overflow-wrap: anywhere; }
.rv-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); margin-left: auto; }
.rv-empty { text-align: center; padding: 8px 0; }
.rv-kind {
    font-size: 10px; font-weight: 700; letter-spacing: .4px; padding: 2px 8px; border-radius: 999px;
    border: 1px solid var(--line); color: var(--text-muted); font-family: var(--mono);
}
.rv-kind.bug { color: var(--error); border-color: rgba(248,113,113,.4); }
.rv-kind.idea { color: var(--cyan); border-color: rgba(34,211,238,.4); }
.rv-kind.question { color: var(--warning); border-color: rgba(251,191,36,.4); }
.rv-kind.change { color: var(--accent-2); border-color: rgba(167,139,250,.4); }
.rv-detail .st-sheet-head strong { overflow-wrap: anywhere; }
.rv-detail .st-sheet-head a { color: var(--accent-2); }
.rv-body { white-space: pre-wrap; line-height: 1.55; margin-bottom: 18px; overflow-wrap: anywhere; }
.rv-section-label {
    color: var(--text-muted); font: 700 11px var(--mono); letter-spacing: .6px;
    text-transform: uppercase; margin: 6px 0 8px;
}
.rv-timeline { list-style: none; margin: 0 0 14px; padding: 0; border-left: 2px solid var(--line); }
.rv-timeline li { padding: 4px 0 12px 14px; position: relative; }
.rv-timeline li::before {
    content: ""; position: absolute; left: -6px; top: 9px; width: 10px; height: 10px;
    border-radius: 50%; background: var(--surface-solid); border: 2px solid var(--accent-2);
}
.rv-tl-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.rv-tl-move { margin-top: 4px; font-size: 13px; color: var(--text-muted); }
.rv-tl-body { margin-top: 4px; white-space: pre-wrap; line-height: 1.5; overflow-wrap: anywhere; }
.rv-tl-commit { margin-top: 4px; font-size: 12px; }
.rv-timeline-empty { margin-bottom: 12px; }

/* Review — phase 1: sheet controls, inbox, verification */
.rv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rv-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 20px; border-radius: 999px; cursor: pointer; text-decoration: none;
    border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 600 15px var(--font);
}
.rv-btn:hover { border-color: var(--line-strong); }
.rv-btn.primary {
    border-color: var(--line-strong); color: #fff;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9 55%, var(--accent-deep));
}
.rv-input { font-size: 16px; } /* 16px: no zoom-on-focus on iPhone */
.rv-chip { min-height: 40px; }
.rv-captured { color: var(--text-muted); font-size: 13px; margin: -4px 0 14px; overflow-wrap: anywhere; }
.rv-toast {
    position: fixed; left: 50%; top: 76px; z-index: 450; transform: translateX(-50%);
    max-width: min(560px, calc(100% - 32px)); padding: 14px 20px; border-radius: 14px; cursor: pointer;
    border: 1px solid rgba(52,211,153,.55); background: var(--surface-solid); color: var(--success);
    font: 600 15px var(--font); box-shadow: 0 16px 40px rgba(0,0,0,.4);
}
.rv-st-btn svg { width: 20px; height: 20px; color: var(--accent-2); }

.rv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rv-head .page-title { margin-bottom: 8px; }
.rv-views { margin: 0; }
.rv-inbox { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.rv-section-title { font-size: 16px; font-weight: 800; margin: 0 0 4px; display: flex; gap: 10px; align-items: baseline; }
.rv-section-hint { font-size: 13px; margin: 0 0 8px; }
.rv-section-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.rv-more {
    border: 1px dashed var(--line); background: transparent; color: var(--text-muted);
    border-radius: var(--radius-sm); padding: 8px; cursor: pointer; font: inherit;
}
.rv-version { font-size: 11px; margin-top: 18px; }

.rv-open-page { width: 100%; margin: 0 0 16px; justify-content: flex-start; overflow-wrap: anywhere; }
.rv-verify {
    border: 1px solid rgba(251,191,36,.45); border-radius: var(--radius-sm);
    background: var(--surface-2); padding: 14px 16px; margin-bottom: 16px;
}
.rv-verify.rv-ask { border-color: rgba(167,139,250,.5); }
.rv-verify .rv-section-label { margin-top: 0; }
.rv-verify-meta { font-size: 13px; margin-top: 6px; }
.rv-verify-meta a, .rv-tl-commit a { color: var(--accent-2); }
.rv-verify-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.rv-context { margin: 0 0 14px; color: var(--text-muted); font-size: 13px; }
.rv-context summary { cursor: pointer; }
.rv-context ul { margin: 8px 0 0; padding-left: 18px; overflow-wrap: anywhere; }
.rv-detail-actions { align-items: center; }
.rv-status-select .input { min-height: 48px; }
@media (max-width: 720px) {
    .rv-toast { top: 64px; }
    .rv-detail-actions .rv-btn, .rv-status-select { flex: 1 1 100%; }
    .rv-status-select .input { width: 100%; }
}

/* Review — phase 2a: images on comments */
html.rv-capturing *, html.rv-capturing *::before, html.rv-capturing *::after {
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.rv-shots { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; }
.rv-shot {
    position: relative; margin: 0; width: 132px; border-radius: 10px; overflow: hidden;
    border: 1px solid var(--line); background: var(--surface-2); text-decoration: none; color: var(--text-muted);
}
.rv-shot img { display: block; width: 100%; height: 86px; object-fit: cover; object-position: top; }
.rv-shot figcaption, .rv-shot-cap { display: block; font-size: 11px; padding: 4px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-shot-x {
    position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--surface-solid); color: var(--text); cursor: pointer;
}
.rv-shot-wait { display: grid; place-items: center; height: 108px; font-size: 12px; padding: 8px; text-align: center; }
.rv-shots-detail .rv-shot { width: 180px; }
.rv-shots-detail .rv-shot img { height: 120px; }
.rv-shot-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.rv-shot-actions .rv-btn, .rv-detail-actions label.rv-btn { min-height: 44px; font-size: 14px; }
.rv-touch-only { display: none; }
@media (pointer: coarse) { .rv-touch-only { display: inline-flex; } }

/* Review — phase 2b: «Δείξε σημείο» */
html.rv-picking .st-sheet-backdrop, html.rv-picking .rv-fab, html.rv-picking .rv-toast { display: none !important; }
html.rv-picking, html.rv-picking * { cursor: crosshair !important; }
#rv-pick-layer { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.rv-pick-box {
    display: none; position: fixed; border: 2px solid var(--warning); border-radius: 6px;
    background: rgba(251,191,36,.10); box-shadow: 0 0 0 9999px rgba(3,5,12,.25);
}
.rv-pick-tag {
    display: none; position: fixed; padding: 2px 8px; border-radius: 6px; font: 600 11px var(--mono);
    background: var(--surface-solid); color: var(--warning); border: 1px solid rgba(251,191,36,.5);
}
.rv-pick-bar {
    position: fixed; top: 12px; left: 50%; transform: translateX(-50%); pointer-events: auto;
    display: flex; align-items: center; gap: 12px; max-width: calc(100% - 24px);
    padding: 10px 12px 10px 16px; border-radius: 999px; font: 600 14px var(--font);
    background: var(--surface-solid); color: var(--text); border: 1px solid var(--line-strong);
    box-shadow: 0 12px 32px rgba(0,0,0,.4); cursor: default !important;
}
.rv-pick-bar button {
    min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer !important;
    border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 600 14px var(--font);
}
.rv-flash { outline: 3px solid var(--warning) !important; outline-offset: 3px; animation: rvFlash 1s ease-in-out 3; }
@keyframes rvFlash { 50% { outline-color: transparent; } }
.rv-anchor-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.rv-anchor {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted);
    padding: 6px 6px 6px 12px; border-radius: 999px; border: 1px solid rgba(251,191,36,.45); overflow-wrap: anywhere;
}
.rv-anchor b { color: var(--text); font-weight: 700; }
.rv-anchor-x {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line);
    background: var(--surface-solid); color: var(--text); cursor: pointer;
}
.rv-anchor-detail { margin: -6px 0 16px; padding-right: 12px; }

/* Review — phase 3: pins, votes, priority, releases, annotation */
html.rv-picking #rv-pins, html.rv-capturing #rv-pins { display: none; }
#rv-pins { position: fixed; inset: 0; z-index: 250; pointer-events: none; }
.rv-pin {
    position: fixed; pointer-events: auto; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px 13px 13px 3px;
    border: 2px solid var(--surface-solid); background: var(--warning); color: #1B1E2E;
    font: 800 12px var(--mono); cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.rv-pin.mine { background: var(--accent-2); color: #fff; }
.rv-pop {
    position: fixed; z-index: 460; width: min(300px, calc(100% - 16px)); padding: 12px 14px; border-radius: 12px;
    background: var(--surface-solid); color: var(--text); border: 1px solid var(--line-strong);
    box-shadow: 0 16px 40px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 6px; font-size: 14px;
}
.rv-pop-meta { color: var(--text-muted); font-size: 12px; }
.rv-pop-actions { display: flex; gap: 8px; margin-top: 4px; }
.rv-pop-actions button {
    min-height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 600 13px var(--font);
}
.rv-pins-toggle {
    position: fixed; right: 20px; bottom: 76px; z-index: 300; min-height: 36px; padding: 0 14px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface-solid); color: var(--text-muted); font: 700 13px var(--font); cursor: pointer;
}
.rv-pins-toggle.on { color: var(--warning); border-color: rgba(251,191,36,.5); }
@media (max-width: 720px) { .rv-pins-toggle { bottom: 160px; right: 14px; } }
.app:has(.st-page) .rv-pins-toggle { display: none; }

.rv-existing { margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-2); }
.rv-existing summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.rv-existing ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rv-existing li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line-soft); }
.rv-existing li.same .rv-existing-title { color: var(--warning); }
.rv-existing-title { font-size: 14px; overflow-wrap: anywhere; }
.rv-existing-actions { display: flex; gap: 6px; }
.rv-existing-actions .rv-btn { min-height: 38px; padding: 0 12px; font-size: 13px; }
.rv-shot-edit { right: 36px; }

.rv-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -6px 0 14px; }
.rv-priority-select { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.rv-priority-select .input { min-height: 40px; width: auto; }
.rv-vote { min-height: 40px; font-size: 14px; }
.rv-vote.on { border-color: rgba(52,211,153,.5); color: var(--success); }
.rv-prio {
    font-size: 10px; font-weight: 700; letter-spacing: .4px; padding: 2px 8px; border-radius: 999px;
    font-family: var(--mono); border: 1px solid var(--line); color: var(--text-muted);
}
.rv-prio.urgent { color: var(--danger); border-color: rgba(248,113,113,.5); }
.rv-card.urgent { border-color: rgba(248,113,113,.55); }
.rv-card.low { opacity: .8; }
.rv-release { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rv-release li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rv-link { border: none; background: none; color: var(--accent-2); font: 600 14px var(--font); cursor: pointer; padding: 0; text-align: left; }

.rv-ann {
    position: fixed; inset: 0; z-index: 1100; display: flex; flex-direction: column; gap: 10px; padding: 12px;
    background: rgba(3,5,12,.86); outline: none;
}
.rv-ann-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.rv-ann-bar button {
    min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--line); background: var(--surface-solid); color: var(--text); font: 600 14px var(--font);
}
.rv-ann-bar button.on { border-color: var(--warning); color: var(--warning); }
.rv-ann-bar button.primary { border-color: var(--line-strong); color: #fff; background: linear-gradient(135deg, #8B5CF6, #6D28D9 55%, var(--accent-deep)); }
.rv-ann-canvas { flex: 1; min-height: 0; display: grid; place-items: center; }
.rv-ann-canvas canvas { max-width: 100%; max-height: 100%; touch-action: none; cursor: crosshair; border-radius: 8px; }
