/* ==========================================
   BFS HR · Design system (βλ. docs/design-system.md)
   Κόκκινο = πού βρίσκομαι / τώρα. Μπλε = ενέργεια. Χωρίς κεφαλαία σε ελληνικό κείμενο.
   ========================================== */
:root {
    /* Επιφάνειες */
    --canvas: #F3F2EE;
    --surface: #FFFFFF;
    --surface-2: #FAF9F6;
    --surface-3: #F1F0EB;
    --line: #E5E3DD;
    --line-strong: #D2CFC7;

    /* Μελάνι (κείμενο) */
    --ink: #22222D;
    --ink-2: #4B4B58;
    --ink-3: #75747F;
    --ink-4: #A3A2AA;

    /* Πλοήγηση */
    --nav: #22222E;
    --nav-2: #2E2E3C;
    --nav-line: #393947;
    --nav-ink: #D8D7E0;
    --nav-ink-dim: #8E8D9A;

    /* BFS */
    --brand: #565785;
    --brand-700: #43446B;
    --brand-50: #EFEFF6;
    --brand-100: #DFDFEE;
    --accent: #AC4539;
    --accent-700: #8C362C;
    --accent-50: #F9EDEA;

    /* Κατάσταση */
    --ok: #2B7A4B;
    --ok-50: #E8F3EC;
    --warn: #93570A;
    --warn-50: #FBF1E0;
    --bad: #AC4539;
    --bad-50: #F9EDEA;

    --font-ui: 'Commissioner', system-ui, sans-serif;
    --font-display: 'Literata', Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --r: 8px;
    --r-sm: 6px;
    --shadow-1: 0 1px 2px rgba(34, 34, 45, 0.05);
    --shadow-2: 0 2px 8px rgba(34, 34, 45, 0.07);
    --shadow-pop: 0 16px 40px rgba(34, 34, 45, 0.18);
    --focus: 0 0 0 3px rgba(86, 87, 133, 0.25);
}

html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-ui);
    font-size: 14px;
    line-height: 1.45;
    background: var(--canvas);
    color: var(--ink);
    font-feature-settings: "tnum" 0;
}
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
::selection { background: var(--brand-100); }

.mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.display { font-family: var(--font-display); font-optical-sizing: auto; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.subtle { color: var(--ink-4); }
.link { color: var(--brand); font-weight: 600; text-underline-offset: 2px; }
.link:hover { color: var(--accent); text-decoration: underline; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.01em; }
.code { font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; } /* κωδικοί θέσεων: TECH, OASA */

/* ==========================================
   Δομή σελίδας
   ========================================== */
.page { max-width: 1320px; margin: 0 auto; padding: 28px 32px 56px; }
.page.narrow { max-width: 1040px; }
@media (max-width: 767px) { .page { padding: 20px 16px 48px; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .eyebrow { margin-bottom: 4px; }
.page-head h1 { font-family: var(--font-display); font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.page-head .rule { display: flex; width: 44px; height: 3px; margin: 10px 0 8px; border-radius: 2px; overflow: hidden; }
.page-head .rule::before, .page-head .rule::after { content: ''; flex: 1; }
.page-head .rule::before { background: var(--accent); }
.page-head .rule::after { background: var(--brand); }
.page-head .desc { color: var(--ink-3); font-size: 14px; max-width: 70ch; }
.page-head .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.stack > * + * { margin-top: 20px; }
.grid-gap { gap: 20px; }

/* Είσοδος σελίδας: τα panels εμφανίζονται διαδοχικά */
@media (prefers-reduced-motion: no-preference) {
    .page > * { animation: rise 0.32s cubic-bezier(.2, .7, .2, 1) both; }
    .page > *:nth-child(2) { animation-delay: 40ms; }
    .page > *:nth-child(3) { animation-delay: 80ms; }
    .page > *:nth-child(4) { animation-delay: 120ms; }
    .page > *:nth-child(n+5) { animation-delay: 160ms; }
    @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ==========================================
   Panel (το «φύλλο»): η μόνη κάρτα της εφαρμογής
   ========================================== */
.panel, .tech-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); }
.panel-head, .card-title {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 14px 20px; border-bottom: 1px solid var(--line);
    font-size: 15px; font-weight: 650; color: var(--ink);
}
.panel-head h2, .panel-head h3 { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.panel-head .count { font-size: 12px; font-weight: 600; color: var(--ink-3); background: var(--surface-3); border-radius: 999px; padding: 1px 8px; }
.panel-head .hint { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.panel-head i.fa-solid, .card-title i.fa-solid { color: var(--ink-4); font-size: 13px; }
.panel-body { padding: 18px 20px; }
.panel-body.flush { padding: 0; }
.panel-foot { padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); }
.tech-card.hoverable:hover, .panel.hoverable:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
/* Παλιές κάρτες που δεν έχουν panel-body: εσωτερικό περιθώριο */
.tech-card > .card-title { margin: -1px -1px 16px; }

/* Φίλτρα: μία γραμμή πάνω από τον πίνακα */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.toolbar .inp { width: auto; min-width: 150px; }
.toolbar .grow { flex: 1 1 220px; }

/* ==========================================
   Κουμπιά
   ========================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 36px; padding: 0 14px; border-radius: var(--r-sm);
    font-size: 13.5px; font-weight: 600; line-height: 1; white-space: nowrap;
    border: 1px solid transparent; cursor: pointer; user-select: none;
    transition: background-color .12s, border-color .12s, color .12s, box-shadow .12s;
}
.btn i { font-size: 12px; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .45; cursor: not-allowed; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.08); }
.btn-primary:hover:not(:disabled) { background: var(--brand-700); }
.btn-secondary, .btn-ghost-legacy { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.btn-secondary:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--accent-700); }
.btn-link { background: none; border: none; padding: 0; height: auto; color: var(--brand); font-weight: 600; }
.btn-link:hover { color: var(--accent); text-decoration: underline; }

/* Αποτέλεσμα ραντεβού: ίδιο σχήμα για όλα, χρώμα μόνο στο εικονίδιο */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
.seg > button { height: 30px; padding: 0 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; border-left: 1px solid var(--line); }
.seg > button:first-child { border-left: none; }
.seg > button:hover { background: var(--surface-3); color: var(--ink); }
.seg .seg-ok i { color: var(--ok); }
.seg .seg-bad i { color: var(--bad); }
.seg .seg-warn i { color: var(--warn); }
.seg .seg-ok:hover { background: var(--ok-50); color: var(--ok); }
.seg .seg-bad:hover { background: var(--bad-50); color: var(--bad); }
.seg .seg-warn:hover { background: var(--warn-50); color: var(--warn); }

/* ==========================================
   Chips κατάστασης (και τα παλιά tech-badge)
   ========================================== */
.chip, .tech-badge {
    display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
    border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
    background: var(--surface-3); color: var(--ink-2); border: 1px solid transparent;
}
.chip i, .tech-badge i { font-size: 10px; }
.chip-neutral, .b-gray { background: var(--surface-3); color: var(--ink-2); }
.chip-info, .b-blue, .b-purple { background: var(--brand-50); color: var(--brand-700); }
.chip-ok, .b-green { background: var(--ok-50); color: var(--ok); }
.chip-warn, .b-amber { background: var(--warn-50); color: var(--warn); }
.chip-bad, .b-red { background: var(--bad-50); color: var(--bad); }
.chip-strong-bad, .b-solid-red { background: var(--bad); color: #fff; }
.chip-dark, .b-dark { background: var(--ink); color: #fff; }
.chip-outline { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: currentColor; }

/* ==========================================
   Φόρμες
   ========================================== */
.lbl { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.inp {
    width: 100%; height: 36px; font: inherit; font-size: 14px; color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 10px; background: var(--surface);
    transition: border-color .12s, box-shadow .12s;
}
.inp::placeholder { color: var(--ink-4); }
.inp:hover { border-color: #BDB9AF; }
.inp:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
textarea.inp { height: auto; min-height: 76px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
select.inp { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2375747F' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.inp-sm { height: 30px; font-size: 13px; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 16px; height: 16px; }
.field-hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* ==========================================
   Πίνακες: η επιφάνεια δουλειάς
   ========================================== */
.tbl { width: 100%; text-align: left; border-collapse: separate; border-spacing: 0; }
.tbl thead th {
    position: sticky; top: 0; z-index: 1;
    font-size: 12px; font-weight: 600; color: var(--ink-3); background: var(--surface-2);
    padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl tbody td { padding: 11px 14px; font-size: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.clickable:hover td, .tbl tbody tr.row-hover:hover td { background: #FBFAF7; }
.tbl tr.slot-start td { border-top: 1px solid var(--line-strong); }
.tbl .t-strong { font-weight: 600; color: var(--ink); }
.tbl .t-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.tbl.compact tbody td { padding: 8px 14px; }

/* ==========================================
   KPI / μετρητές δουλειάς
   ========================================== */
.kpi { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.kpi-icon { width: 38px; height: 38px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.kpi-value { font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.05; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.kpi-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

.worktile { display: block; padding: 16px 18px; border-left: 3px solid transparent; transition: box-shadow .12s, border-color .12s; }
.worktile:hover { box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.worktile.urgent { border-left-color: var(--accent); }
.worktile .kpi-value { font-size: 32px; }
.worktile .go { font-size: 13px; font-weight: 600; color: var(--brand); margin-top: 8px; display: inline-flex; gap: 6px; align-items: center; }

/* ==========================================
   Λίστες εργασίας (σημεία δουλειάς)
   ========================================== */
.worklist > li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.worklist > li:last-child { border-bottom: none; }
.worklist > li:hover { background: #FBFAF7; }
.worklist .when { font-family: var(--font-mono); font-size: 13px; font-weight: 600; min-width: 52px; flex-shrink: 0; color: var(--ink-2); }
.worklist .when .day { font-family: var(--font-ui); font-size: 12px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.worklist .when.now { color: var(--accent); }
.worklist .who { flex: 1; min-width: 0; }
.worklist .who a { font-weight: 600; color: var(--ink); }
.worklist .who a:hover { color: var(--accent); }
.worklist .who .t-sub { font-size: 12.5px; color: var(--ink-3); }

.empty { padding: 36px 20px; text-align: center; color: var(--ink-3); font-size: 14px; }
.empty i { display: block; font-size: 22px; color: var(--ink-4); margin-bottom: 10px; }
.empty.ok i { color: var(--ok); }

/* Tabs: κόκκινο = πού βρίσκομαι */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab, .chip-tab { padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover, .chip-tab:hover { color: var(--ink); }
.tab.active, .chip-tab.active { color: var(--ink); border-bottom-color: var(--accent); }

/* Segmented filter (Εγώ / Ομάδα, περίοδοι) */
.segf { display: inline-flex; background: var(--surface-3); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.segf a, .segf button { height: 28px; padding: 0 11px; border-radius: 5px; font-size: 13px; font-weight: 600; color: var(--ink-3); display: inline-flex; align-items: center; }
.segf .on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* ==========================================
   Καρτέλα υποψηφίου
   ========================================== */
.avatar { width: 52px; height: 52px; border-radius: var(--r); background: var(--nav); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 20px; font-weight: 600; flex-shrink: 0; }
.dossier-name { font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }
.kv { display: grid; grid-template-columns: 132px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--ink-3); font-size: 13px; }
.kv dd { color: var(--ink); }

/* Stepper σταδίων */
.stepper { display: flex; gap: 3px; }
.stepper .st { flex: 1; height: 5px; background: var(--line); border-radius: 3px; }
.stepper .st.done { background: var(--brand); }
.stepper .st.current { background: var(--accent); }
.stepper.closed .st.done, .stepper.closed .st.current { background: #B9B8C7; }
.stepper.hired .st.done, .stepper.hired .st.current { background: var(--ok); }
.stepper-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-4); margin-top: 6px; }
.stepper-labels .cur { color: var(--accent); font-weight: 600; }

/* Timeline */
.tl-item { position: relative; padding-left: 36px; padding-bottom: 16px; }
.tl-item::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 2px; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-icon { position: absolute; left: 0; top: 0; width: 27px; height: 27px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; border: 1px solid var(--line); background: var(--surface); }
.tl-body { font-size: 14px; line-height: 1.45; }
.tl-note { margin-top: 6px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13.5px; color: var(--ink-2); white-space: pre-line; }
.tl-meta { font-size: 12px; color: var(--ink-4); margin-top: 4px; }

/* Pipeline */
.pipe-col { min-width: 220px; flex: 1; background: var(--surface-3); border-radius: var(--r); padding: 10px; }
.pipe-col-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.pipe-card { border-left: 3px solid var(--brand); }
.pipe-card.warm { border-left-color: #C98A2B; }
.pipe-card.stale { border-left-color: var(--accent); }

/* ==========================================
   Modal
   ========================================== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(28, 28, 38, 0.42); backdrop-filter: blur(2px); z-index: 900; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 6vh 16px; }
.modal-box { background: var(--surface); border-radius: 10px; width: 100%; max-width: 560px; box-shadow: var(--shadow-pop); position: relative; overflow: hidden; }
.modal-box.wide { max-width: 860px; }
.modal-box .modal-bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; display: flex; }
.modal-box .modal-bar div { flex: 1; }
.modal-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
@media (prefers-reduced-motion: no-preference) {
    .modal-box { animation: pop .18s cubic-bezier(.2, .7, .2, 1); }
    @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
}

/* Αναζήτηση στο header */
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop); z-index: 80; max-height: 70vh; overflow-y: auto; }
.search-results .sr-item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.search-results .sr-item:last-child { border-bottom: none; }
.search-results .sr-item:hover, .search-results .sr-item.active { background: var(--brand-50); }

.dup-box { border: 1px solid #EED9B3; background: #FFF9EE; border-radius: var(--r); padding: 12px 14px; }
.dup-box .dup-title { font-size: 13.5px; font-weight: 650; color: var(--warn); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.dup-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid #F1E3C8; border-radius: var(--r-sm); padding: 10px 12px; }
.dup-row + .dup-row { margin-top: 6px; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r); font-size: 14px; }
.notice-warn { background: #FFF9EE; border: 1px solid #EED9B3; color: #6F4207; }
.notice-info { background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700); }
.notice-ok { background: var(--ok-50); border: 1px solid #CDE6D5; color: var(--ok); }

.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--r); background: var(--surface-2); transition: all .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-50); }

.bar-track { background: var(--surface-3); height: 8px; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 4px; }

/* Toasts (component του Time Tracker): ίδια γραμματοσειρά */
.toast-item { font-family: var(--font-ui) !important; border-radius: var(--r) !important; }

@media print { #sidebar, header { display: none !important; } }
