:root {
  --navy: #1f4e79;
  --navy-dark: #163a5c;
  --light: #d9e1f2;
  --grey: #f4f5f7;
  --border: #d0d4da;
  --text: #1f2430;
  --danger: #c0392b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, Arial, sans-serif;
  color: var(--text);
  background: var(--grey);
}
.hidden { display: none !important; }
.muted { color: #6b7280; }
.error { color: var(--danger); font-size: 0.9em; margin: 6px 0; }

/* ---------- LOGIN ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
}
.login-card {
  background: #fff; padding: 32px; border-radius: 12px; width: 340px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.login-card h1 { font-size: 1.3rem; margin: 0 0 4px; color: var(--navy); }
.login-card label { display: block; margin: 14px 0 0; font-size: .9rem; }
.login-card input { width: 100%; padding: 9px; margin-top: 4px; border: 1px solid var(--border); border-radius: 6px; }
.login-card button { width: 100%; margin-top: 18px; }

/* ---------- TOPBAR ---------- */
.topbar {
  display: flex; align-items: center; gap: 18px;
  background: var(--navy); color: #fff; padding: 0 18px; height: 56px;
}
.brand { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tab {
  background: transparent; border: none; color: #cdd9e8; padding: 8px 14px;
  cursor: pointer; border-radius: 6px; font-size: .95rem;
}
.tab:hover { background: rgba(255,255,255,.1); color: #fff; }
.tab.active { background: #fff; color: var(--navy); font-weight: 600; }
.tabs.hidden { display: none !important; }
.spacer { flex: 1; }
.btn-home {
  background: rgba(255,255,255,.12); border: none; color: #fff; padding: 7px 14px;
  border-radius: 6px; cursor: pointer; font-size: .9rem; white-space: nowrap;
}
.btn-home:hover { background: rgba(255,255,255,.22); }
#brand { cursor: pointer; }
.assigned-chip {
  background: rgba(255,255,255,.15); color: #fff; padding: 5px 12px;
  border-radius: 20px; font-size: .85rem; white-space: nowrap;
}
.user-box { display: flex; align-items: center; gap: 12px; font-size: .9rem; white-space: nowrap; }
.btn-link { background: none; border: none; color: #cdd9e8; cursor: pointer; text-decoration: underline; font-size: .85rem; }
.btn-link:hover { color: #fff; }

/* ---------- CONTENT ---------- */
.content { max-width: 980px; margin: 0 auto; padding: 22px 18px 60px; }
h2 { color: var(--navy); margin-top: 4px; }
fieldset { border: 1px solid var(--border); border-radius: 8px; margin: 0 0 18px; padding: 14px 16px; background: #fff; }
legend { font-weight: 600; color: var(--navy); padding: 0 6px; }

label { font-size: .88rem; display: block; }
input, select, textarea {
  font-family: inherit; font-size: .95rem; padding: 8px; border: 1px solid var(--border);
  border-radius: 6px; width: 100%; margin-top: 3px; background: #fff;
}
textarea { resize: vertical; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2.narrow { max-width: 560px; }
.span2 { grid-column: 1 / 3; }
.row { display: flex; gap: 16px; align-items: flex-end; margin-bottom: 12px; }
.grow { flex: 1; }
.row label { display: flex; align-items: center; gap: 6px; }
.row input[type=checkbox] { width: auto; margin: 0; }

/* ---------- ΚΕΝΤΡΙΚΟ ΜΕΝΟΥ ---------- */
.menu-head { text-align: center; margin: 18px 0 28px; }
.menu-title { margin: 0; }
.menu-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; max-width: 760px; margin: 0 auto;
}
.menu-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 30px 20px; cursor: pointer; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05); transition: transform .12s, box-shadow .12s, border-color .12s;
}
.menu-card:hover {
  transform: translateY(-3px); box-shadow: 0 10px 26px rgba(31,78,121,.18);
  border-color: var(--navy);
}
.menu-ico { font-size: 2.6rem; line-height: 1; }
.menu-label { font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.menu-desc { font-size: .85rem; color: #6b7280; }

.menu-grid-2 { grid-template-columns: repeat(2, minmax(200px, 1fr)); max-width: 560px; }
.menu-secondary { display: flex; gap: 12px; justify-content: center; margin-top: 14px; }
.menu-card-sm { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 9px 18px; cursor: pointer; font-size: .9rem; color: var(--navy); }
.menu-card-sm:hover { background: #f0f2f5; border-color: var(--navy); }

/* ---------- ΣΕΛΙΔΑ ΕΡΓΟΥ ---------- */
.row-click { cursor: pointer; }
tr.row-click:hover td { background: #eef3fb; }
.proj-head h2 { margin: 0; }
.proj-sub { color: #6b7280; font-size: .95rem; margin-top: 2px; }
.proj-phasebanner { display: inline-block; margin-top: 14px; padding: 8px 16px; border-radius: 8px; font-size: 1rem; }
.proj-progress-row { display: flex; gap: 26px; align-items: flex-start; margin-top: 10px; }
.pp-left { flex: 0 0 auto; width: 250px; }
.pp-right { flex: 1 1 auto; min-width: 0; }
.pp-left .dash-h, .pp-right .dash-h { margin-top: 0; }
@media (max-width: 760px) { .proj-progress-row { flex-direction: column; gap: 4px; } .pp-left { width: 100%; } }
.phase-timeline { display: flex; flex-direction: column; }
.phase-step { display: flex; align-items: center; gap: 12px; background: none; border: none; text-align: left; padding: 7px 8px; cursor: pointer; position: relative; border-radius: 6px; width: 100%; }
.phase-step:hover { background: #f4f6f9; }
.phase-step:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 24px; bottom: -2px; width: 2px; background: #e3e7ee; z-index: 0; }
.phase-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #c7ccd4; background: #fff; flex: none; position: relative; z-index: 1; }
.phase-step.done .phase-dot { background: #2e9e5b; border-color: #2e9e5b; }
.phase-step.current .phase-dot { background: var(--navy); border-color: var(--navy); box-shadow: 0 0 0 4px rgba(31, 78, 121, .15); }
.phase-step.current .phase-name { font-weight: 700; color: var(--navy); }
.phase-step.future .phase-name { color: #9aa0a8; }
.phase-name { font-size: .95rem; }
.proj-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.proj-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 24px; max-width: 760px; margin-bottom: 8px; }
.proj-info > div { display: flex; flex-direction: column; }
.pi-l { font-size: .78rem; color: #6b7280; }
.pi-v { font-size: .95rem; }
.proj-rejected { color: var(--danger); font-weight: 600; margin: 8px 0; }
/* Κάρτα «Απαραίτητες ενέργειες» — έντονη ανάδειξη */
.phase-actions-card { border: 1px solid #cbd8ea; border-left: 5px solid var(--navy); border-radius: 12px;
  background: linear-gradient(180deg, #f5f9ff 0%, #fdfeff 70%); padding: 14px 18px 8px;
  box-shadow: 0 2px 10px rgba(31, 78, 121, .08); max-width: 660px; }
.phase-actions-card.pac-complete { border-left-color: #2e9e5b; background: linear-gradient(180deg, #f1fbf5 0%, #fdfffe 70%); }
.phase-actions-card.pac-empty { border-left-color: #cfd6df; background: #fafbfc; box-shadow: none; }
.pac-head { display: flex; align-items: center; gap: 12px; }
.pac-head h3 { margin: 0; color: var(--navy); font-size: 1.1rem; }
.pac-count { margin-left: auto; background: var(--navy); color: #fff; font-size: .82rem; font-weight: 700;
  padding: 3px 12px; border-radius: 12px; font-variant-numeric: tabular-nums; }
.pac-complete .pac-count { background: #2e9e5b; }
.pac-sub { font-size: .85rem; color: #5b6675; margin: 4px 0 11px; }
.pac-bar { height: 8px; background: #e1e7f0; border-radius: 5px; overflow: hidden; margin-bottom: 12px; }
.pac-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #2e9e5b, #38ba66); border-radius: 5px; transition: width .35s ease; }

.phase-checklist { list-style: none; padding: 0; margin: 0; }
.phase-checklist li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid #e8edf4; }
.phase-checklist li:first-child { border-top: none; }
.phase-act { white-space: nowrap; flex: none; text-align: center; background: #fff; color: var(--navy); border: 1px solid var(--navy);
  font-weight: 600; border-radius: 7px; padding: 5px 12px; cursor: pointer; }
.phase-act:hover { background: var(--navy); color: #fff; }
.phase-checklist .ck-label { font-size: .97rem; }
.phase-checklist li.ck-todo .ck-label { font-weight: 600; color: var(--text); }
.phase-checklist li.ck-done .ck-label { color: #2e9e5b; text-decoration: line-through; font-weight: 400; }
.ck-box { flex: none; margin-left: auto; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 4px; }
.ck-locked .ck-box { cursor: default; }
.phase-checklist input[type=checkbox] { width: 22px; height: 22px; flex: none; margin: 0; accent-color: #2e9e5b; cursor: pointer; }
.phase-checklist input[type=checkbox]:disabled { opacity: 1; cursor: default; }
.proj-actions .btn-primary[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- DASHBOARD ---------- */
.dash-h { color: var(--navy); font-size: 1.05rem; margin: 22px 0 10px; }
.dash-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; }
.metric-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.metric-label { font-size: .82rem; color: #6b7280; margin-bottom: 6px; }
.metric-value { font-size: 1.7rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.metric-card:nth-child(4) .metric-value, .metric-card:nth-child(5) .metric-value { font-size: 1.25rem; }
.att-list { display: flex; flex-direction: column; gap: 6px; }
.att-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 9px 14px; cursor: pointer; }
.att-item:hover { background: #f7f9fc; border-color: var(--navy); }
.att-no { font-weight: 600; color: var(--navy); min-width: 90px; }
.att-cl { flex: 1; color: var(--text); }
.att-eur { font-variant-numeric: tabular-nums; color: #444; min-width: 90px; text-align: right; }
.assign-actions { display: flex; gap: 18px; align-items: center; justify-content: center; margin: 26px auto 0; flex-wrap: wrap; }

/* ---------- ITEMS TABLE ---------- */
table.items { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
table.items th { background: var(--navy); color: #fff; padding: 8px 6px; font-size: .85rem; text-align: left; }
table.items td { border: 1px solid var(--border); padding: 2px; }
table.items td input { border: none; margin: 0; border-radius: 0; }
table.items td.idx { text-align: center; color: #6b7280; }
table.items td.tot { text-align: right; padding-right: 8px; background: #fafafa; font-variant-numeric: tabular-nums; }
.btn-del-row { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 1.1rem; width: 100%; }

/* ---------- DATA TABLES ---------- */
table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
table.data th { background: var(--light); color: var(--navy); text-align: left; padding: 10px 12px; font-size: .85rem; }
table.data td { padding: 9px 12px; border-top: 1px solid var(--border); font-size: .9rem; }
table.data tr:hover td { background: #f9fafb; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- SCO TABLE ---------- */
table.sco td { padding: 3px 8px; font-size: .85rem; vertical-align: middle; }
table.sco tr.sco-group td { background: var(--light); color: var(--navy); font-weight: 600; font-size: .88rem; }
table.sco input { border: 1px solid var(--border); margin: 0; padding: 4px 6px; text-align: right; border-radius: 4px; }
table.sco .sco-tot { font-variant-numeric: tabular-nums; color: #333; }
table.sco .sco-gtot { font-variant-numeric: tabular-nums; }

/* ---------- OFFER STATUS / FILTERS ---------- */
.offer-filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.of-btn { padding: 6px 14px; border: 1px solid var(--border); background: #fff; border-radius: 20px; cursor: pointer; font-size: .85rem; }
.of-btn:hover { background: #f0f2f5; }
.of-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.status-badge { padding: 3px 10px; border-radius: 12px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.st-pending { background: #fff3cd; color: #8a6100; }
.st-impl { background: #d7f0dd; color: #1c6b34; }
.st-rej { background: #ececed; color: #777; }
.tag-sco { background: var(--navy); color: #fff; font-size: .62rem; padding: 1px 5px; border-radius: 4px; vertical-align: middle; }

/* pipeline bar + stage chips */
.pipeline-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pl-chip { padding: 5px 11px; border: 1px solid var(--border); background: #fff; border-radius: 16px; cursor: pointer; font-size: .8rem; white-space: nowrap; }
.pl-chip:hover { filter: brightness(.97); }
.pl-chip.active { outline: 2px solid var(--navy); outline-offset: 1px; font-weight: 600; }
.pl-chip.pl-all { background: #eef1f5; color: var(--navy); }
.pl-chip.sg-offer { background: #fff7e6; color: #8a6100; border-color: #f0d28a; }
.pl-chip.sg-project { background: #eaf6ee; color: #1c6b34; border-color: #b6dcc1; }
.pl-chip.sg-billing { background: #efeefb; color: #473fa0; border-color: #cdc9f0; }
.pl-chip.sg-end { background: #f1efe8; color: #5f5e5a; border-color: #d3d1c7; }
/* stage badges by group */
.status-badge.sg-offer { background: #fff3cd; color: #8a6100; }
.status-badge.sg-project { background: #d7f0dd; color: #1c6b34; }
.status-badge.sg-billing { background: #e4e1f7; color: #473fa0; }
.status-badge.sg-end { background: #ececed; color: #777; }
.stage-sel { font-size: .78rem; padding: 3px 4px; width: auto; margin: 0; }

/* ---------- ΑΝΑΘΕΣΗ ΥΠΕΥΘΥΝΟΥ (picker) ---------- */
.rp-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow: auto; margin: 10px 0; }
.rp-item { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; cursor: pointer; }
.rp-item:hover { background: #f4f6f9; border-color: var(--navy); }
.rp-item.rp-current { border-color: var(--navy); background: #eef3fb; }
.rp-ico { font-size: 1.4rem; flex: none; }
.rp-info { display: flex; flex-direction: column; }
.rp-name { font-weight: 600; color: var(--navy); }
.rp-meta { font-size: .8rem; color: #6b7280; }
.cp-item input[type=checkbox] { width: 18px; height: 18px; flex: none; margin: 0; }
.cp-lab { flex: 1; display: flex; align-items: center; gap: 9px; cursor: pointer; min-width: 0; }
.cp-edit { background: none; border: 0; cursor: pointer; font-size: 1.05rem; color: var(--navy); padding: 4px 9px; flex: none; border-radius: 6px; }
.cp-edit:hover { background: #eef1f5; }
.cp-incomplete { color: #b45309; }
.cp-add { margin: 8px 0; }
.cp-add summary { cursor: pointer; color: var(--navy); font-size: .9rem; font-weight: 600; }
.cp-add-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.cp-add-form input { flex: 1 1 140px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; box-sizing: border-box; }

/* ---- Συμφωνητικά συνεργατών ---- */
.sub-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: #fafbfc; }
.sub-head { font-size: 15px; margin-bottom: 4px; }
.sub-miss { color: #b45309; font-size: .8rem; margin: 4px 0; }
.sub-l { display: block; font-size: .78rem; color: #6b7280; font-weight: 600; margin: 8px 0 3px; }
.sub-obj { width: 100%; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; box-sizing: border-box; font-family: inherit; font-size: .9rem; resize: vertical; }
.sub-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sub-row .sub-l { flex: 1 1 120px; }
.sub-row input { width: 100%; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; box-sizing: border-box; }
.sub-btns { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.badge-ok { background: #dcfce7; color: #166534; font-size: .72rem; font-weight: 700; border-radius: 10px; padding: 2px 8px; }
.badge-mut { background: #eef2f7; color: #475569; font-size: .72rem; font-weight: 700; border-radius: 10px; padding: 2px 8px; }

/* ---- Εισερχόμενα (email intake) ---- */
.mail-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.mail-subj { font-weight: 700; font-size: 15px; }
.mail-meta { color: #6b7280; font-size: 13px; margin: 2px 0 8px; }
.mail-atts { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.mail-att { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.mail-import { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ma-proj { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; max-width: 280px; }

/* ---- Πίνακας Εγγυήσεων ---- */
.guar-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.guar-table { border-collapse: collapse; width: 100%; min-width: 920px; font-size: .82rem; }
.guar-table th { background: #f0f2f5; padding: 6px; text-align: left; font-weight: 600; white-space: nowrap; }
.guar-table td { padding: 3px 4px; border-top: 1px solid var(--border); }
.guar-table input, .guar-table select { width: 100%; padding: 5px 6px; border: 1px solid var(--border); border-radius: 5px; box-sizing: border-box; font-size: .82rem; }
.guar-table .g-del { padding: 4px 8px; }
.guar-scan { display: flex; gap: 8px; margin-bottom: 10px; }
.guar-scan input { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; box-sizing: border-box; font-size: .85rem; }
.guar-scan button { white-space: nowrap; }

/* ---- Ένσημα ΕΦΚΑ ---- */
.efka-chk { display: flex; align-items: center; gap: 8px; }
.efka-chk input { width: 18px; height: 18px; flex: none; }
.efka-file { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0 4px; padding: 8px 10px; background: #f7f9fb; border-radius: 8px; }
.efka-h { margin: 14px 0 6px; }
.efka-table { width: 100%; border-collapse: collapse; }
.efka-table th { text-align: left; font-size: .8rem; color: #6b7280; padding: 4px 6px; }
.efka-table td { padding: 3px 6px; }
.efka-table input { width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; box-sizing: border-box; }
.efka-table tfoot td { padding-top: 8px; font-size: .9rem; }
#poInput { width: 100%; padding: 10px 12px; margin: 10px 0; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; box-sizing: border-box; }

/* ---------- ΜΗΝΥΜΑΤΑ (chat) ---------- */
.ch-h2 { margin: 0 0 12px; }
.ch-menubadge { background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; margin-left: 4px; }
.ch-wrap { display: flex; height: 72vh; min-height: 420px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.ch-sidebar { width: 260px; flex: none; border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: #fafbfc; }
.ch-mebar { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.ch-avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; }
.ch-mename { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-scroll { overflow-y: auto; flex: 1; min-height: 0; }
.ch-sec { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7280); font-weight: 700; }
.ch-sec button { background: none; border: 0; color: #2563eb; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 4px; }
.ch-item { display: flex; align-items: center; gap: 9px; padding: 8px 14px; cursor: pointer; font-size: 14px; border-left: 3px solid transparent; }
.ch-item:hover { background: #eef1f5; }
.ch-item.active { background: #e8f0fe; border-left-color: #2563eb; font-weight: 600; }
.ch-hash { color: #9aa1ab; font-weight: 700; }
.ch-dot { width: 9px; height: 9px; border-radius: 50%; background: #c7ccd3; flex: none; }
.ch-dot.online { background: #22c55e; }
.ch-badge { margin-left: auto; background: #2563eb; color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.ch-main { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #f0f2f5; }
.ch-header { padding: 12px 18px; border-bottom: 1px solid var(--border); background: #fff; display: flex; align-items: center; gap: 10px; }
.ch-title { font-size: 16px; font-weight: 700; }
.ch-sub { font-size: 12px; color: var(--muted, #6b7280); }
.ch-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; }
.ch-empty { color: var(--muted, #6b7280); text-align: center; margin-top: 36px; font-size: 14px; }
.ch-msg { margin-bottom: 12px; display: flex; flex-direction: column; max-width: 72%; }
.ch-msg.me { margin-left: auto; align-items: flex-end; }
.ch-author { font-size: 12px; margin: 0 4px 3px; font-weight: 600; }
.ch-bubble { padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4; background: #eaecf0; white-space: pre-wrap; word-wrap: break-word; }
.ch-msg.me .ch-bubble { background: #2563eb; color: #fff; }
.ch-time { font-size: 11px; color: var(--muted, #6b7280); margin: 3px 4px 0; }
.ch-daysep { text-align: center; color: var(--muted, #6b7280); font-size: 12px; margin: 14px 0; }
.ch-img { max-width: 220px; max-height: 220px; border-radius: 8px; display: block; }
.ch-att { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.ch-fn { font-weight: 600; } .ch-fs { font-size: 11px; opacity: .8; }
.ch-typing { height: 18px; padding: 0 18px; font-size: 12px; color: var(--muted, #6b7280); font-style: italic; }
.ch-composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); background: #fff; }
.ch-composer textarea { flex: 1; resize: none; height: 40px; max-height: 120px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 18px; font-family: inherit; font-size: 14px; }
.ch-attach { background: none; border: 0; font-size: 20px; cursor: pointer; padding: 4px; }
.ch-attach:disabled { opacity: .4; cursor: default; }
@media (max-width: 760px) { .ch-sidebar { width: 150px; } .ch-msg { max-width: 86%; } }

/* ---------- Βιντεοκλήση ---------- */
.ch-callbtn { margin-left: auto; background: #16a34a; color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer; }
.ch-callbtn:hover { background: #15803d; }
.ch-modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 70; display: flex; align-items: center; justify-content: center; }
.ch-modal { background: #fff; padding: 24px; border-radius: 14px; width: 320px; max-width: 90vw; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.ch-call-overlay { position: fixed; inset: 0; background: #0b0f14; z-index: 80; display: flex; align-items: center; justify-content: center; }
#chRemoteVideo { width: 100%; height: 100%; object-fit: contain; background: #0b0f14; position: absolute; inset: 0; }
#chLocalVideo { position: absolute; right: 18px; bottom: 90px; width: 220px; max-width: 32vw; border-radius: 10px; border: 2px solid rgba(255,255,255,.5); background: #000; z-index: 2; transform: scaleX(-1); }
.ch-call-status { position: absolute; top: 22px; left: 0; right: 0; text-align: center; color: #fff; font-size: 18px; z-index: 2; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.ch-call-controls { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; z-index: 2; }
.ch-hangup { background: #dc2626; color: #fff; border: 0; border-radius: 30px; padding: 14px 32px; font-size: 16px; font-weight: 700; cursor: pointer; }
.ch-hangup:hover { background: #b91c1c; }

/* ---------- ΑΠΟΣΤΟΛΗ ΑΡΧΕΙΩΝ (email) ---------- */
.sm-lbl { display: block; font-size: .8rem; color: #6b7280; font-weight: 600; margin: 12px 0 4px; }
.sm-files { max-height: 30vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }
.sm-file { display: flex; align-items: center; gap: 10px; padding: 4px 0; cursor: pointer; }
.sm-file input { flex: none; width: 16px; height: 16px; margin: 0; }
.sm-fname { font-size: .9rem; }
.sm-fmeta { font-size: .75rem; color: #888; }
#smSubject, #smMessage { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; box-sizing: border-box; font-family: inherit; font-size: .92rem; }

/* ---------- ΧΡΟΝΟΔΙΑΓΡΑΜΜΑ (Gantt) ---------- */
.gantt { margin: 6px 0 4px; }
.g-row { display: flex; align-items: center; gap: 10px; margin: 5px 0; }
.g-label { width: 170px; flex: none; font-size: .85rem; text-align: right; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-track { position: relative; flex: 1; height: 22px; background: #f0f2f5; border-radius: 5px; }
.g-bar { position: absolute; top: 3px; height: 16px; background: linear-gradient(90deg, #1f3a5f, #2e6da4); border-radius: 4px; display: flex; align-items: center; justify-content: center; min-width: 14px; }
.g-bar span { font-size: .7rem; color: #fff; white-space: nowrap; padding: 0 4px; }
.g-axis { display: flex; justify-content: space-between; margin-left: 180px; font-size: .72rem; color: #888; margin-top: 3px; }
.sched-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.sched-table th { text-align: left; font-size: .8rem; color: #6b7280; padding: 4px 6px; }
.sched-table td { padding: 4px 6px; }
.sched-table input { width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; box-sizing: border-box; }
.sched-table td:nth-child(2), .sched-table td:nth-child(3) { width: 150px; }
.sched-table td:last-child { width: 36px; }

/* ---------- SCO GATE (σχέδια) ---------- */
#scoGate { background: #fff; }
.sx-list { margin: 8px 0 0; padding-left: 18px; font-size: .85rem; color: #444; }
.sx-list li { padding: 2px 0; }
#scoGateMsg { font-size: .9rem; }

/* ---------- COST ANALYSIS MODAL ---------- */
.btn-cost { background: none; border: none; cursor: pointer; font-size: 1rem; padding: 0 4px; }
.btn-cost:hover { opacity: .7; }
td.row-actions { white-space: nowrap; text-align: center; }
#costModal .mp-results { max-height: 30vh; }
#cmMatBody input { width: 100%; margin: 0; padding: 5px 6px; border: 1px solid var(--border); border-radius: 4px; }
#cmMatBody .cm-cost, #cmMatBody .cm-qty { text-align: right; }
.cost-summary { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; align-items: baseline; padding: 12px 4px 4px; font-size: .95rem; }
.cost-summary .cost-price { color: var(--navy); font-size: 1.1rem; }
.cost-summary b { color: var(--navy); }

/* ---------- TOTALS BAR ---------- */
.totals-bar {
  position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; gap: 16px;
  box-shadow: 0 -2px 10px rgba(0,0,0,.05);
}
#totalsText { font-size: 1rem; }
#totalsText b { color: var(--navy); font-size: 1.1rem; }

/* ---------- BUTTONS ---------- */
button { font-family: inherit; }
.btn-primary { background: var(--navy); color: #fff; border: none; padding: 11px 20px; border-radius: 7px; cursor: pointer; font-size: .95rem; font-weight: 600; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-secondary { background: #eef1f5; color: var(--navy); border: 1px solid var(--border); padding: 9px 16px; border-radius: 7px; cursor: pointer; }
.btn-secondary:hover { background: #e2e7ee; }
.btn-small { padding: 5px 10px; font-size: .82rem; border-radius: 5px; border: 1px solid var(--border); background: #fff; cursor: pointer; }
.btn-small.danger { color: var(--danger); border-color: #e3b4ae; }
.btn-small:hover { background: #f0f2f5; }

/* ---------- MODAL ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; }
.modal-card { background: #fff; padding: 24px; border-radius: 10px; width: 320px; max-height: calc(100vh - 32px); overflow-y: auto; }
.modal-card h3 { margin-top: 0; color: var(--navy); }
.modal-card label { margin-top: 12px; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 18px; }
.modal-card.modal-wide { width: min(760px, 92vw); }
.mp-results { max-height: 52vh; overflow-y: auto; margin-top: 8px; border: 1px solid var(--border, #e3e7ee); border-radius: 8px; }
.mp-results table.data { border-radius: 0; }
.mp-results thead th { position: sticky; top: 0; z-index: 1; }

/* ---------- FORM ACTIONS / ITEMS ACTIONS ---------- */
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.items-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- ACTIONS / EDIT BANNER / LOGO ---------- */
td.actions { white-space: nowrap; }
td.actions button { margin-right: 5px; }
td.actions button:last-child { margin-right: 0; }

.edit-banner {
  background: #fff7e6; border: 1px solid #f0d28a; color: #8a6100;
  padding: 9px 14px; border-radius: 8px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px; font-size: .92rem;
}
.edit-banner .btn-link { color: #8a6100; }
.edit-banner .btn-link:hover { color: #5c4000; }

.small { font-size: .8rem; }
.logo-row { display: flex; gap: 20px; align-items: flex-start; }
.logo-preview {
  width: 180px; height: 90px; border: 1px dashed var(--border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: #fafbfc; font-size: .82rem; padding: 6px; overflow: hidden;
}
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.logo-actions .muted { margin: 2px 0 0; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #2c3e50; color: #fff; padding: 12px 22px; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.3); z-index: 100; font-size: .92rem;
}
.toast.err { background: var(--danger); }

/* Ημερήσιες αναφορές συνεργατών */
.daily-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 12px 0; }
.daily-thumb { position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.daily-thumb img { width: 100%; height: 90px; object-fit: cover; display: block; cursor: grab; }
.daily-thumb .dcap { width: 100%; border: none; border-top: 1px solid var(--border); padding: 5px 6px; font-size: 12px; font-family: inherit; }
.daily-thumb .dcap:focus { outline: 2px solid var(--navy); outline-offset: -2px; }
.daily-thumb .dx { position: absolute; top: 3px; right: 3px; background: rgba(0,0,0,.55); color: #fff; border: none; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; }
.daily-thumb .dn { position: absolute; top: 3px; left: 3px; background: var(--navy); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 9px; }
.daily-thumb.drag { opacity: .4; }
#dailyLink { font-size: .85rem; color: var(--navy); }
