:root {
  --ink: #16201e; --muted: #5a6763; --line: #d5dedb; --bg: #f3f6f5; --surface: #fff;
  --accent: #0b7480; --bar: #13201e; --bar-ink: #e6eeeb; --warn: #b25a00;
  font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; color: var(--ink); background: var(--bg); }

/* σύνδεση */
.login-body { display: grid; place-items: center; min-height: 100vh; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 28px 30px; width: min(380px, 92vw); box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.login-card h1 { margin: 0; font-size: 1.6rem; letter-spacing: .04em; }
.login-card .sub { margin: 4px 0 18px; color: var(--muted); font-size: .92rem; }
.login-card label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; margin-bottom: 12px; }
.login-card input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.login-card button { width: 100%; font: inherit; padding: 9px; border: 0; border-radius: 6px;
  background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }
.login-card button:disabled { opacity: .6; }
.msg { color: #b3261e; min-height: 1.2em; font-size: .9rem; margin: 10px 0 0; }

/* χάρτης */
.map-body { display: flex; flex-direction: column; overflow: hidden; }
#bar { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--bar); color: var(--bar-ink); padding: 7px 12px; font-size: .92rem; }
.bar-left, .bar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { letter-spacing: .08em; }
#bar button { font: inherit; font-size: .85rem; background: transparent; color: var(--bar-ink);
  border: 1px solid #3c4d49; border-radius: 5px; padding: 4px 9px; cursor: pointer; }
#bar button:hover { border-color: #7fa39b; }
.live { font-size: .8rem; }
.live.on { color: #6ccb92; } .live.off { color: #8a8f99; }
.job { font-size: .85rem; color: #f0c36b; }
#map { flex: 1 1 auto; position: relative; }
#panel { position: absolute; top: 46px; right: 10px; width: 330px; max-height: calc(100vh - 60px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12); z-index: 5; font-size: .88rem; }
#panel h2 { margin: 0 0 2px; font-size: 1.05rem; }
#panel fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 10px 0; padding: 6px 10px 8px; }
#panel legend { font-weight: 600; font-size: .82rem; color: var(--muted); }
#panel label { display: flex; align-items: center; gap: 6px; }
.hint { color: var(--muted); font-size: .8rem; margin: 2px 0; }
.lrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid #eef2f1; }
.lrow:last-child { border-bottom: 0; }
.lrow .name { font-weight: 600; }
.lrow .count { color: var(--muted); font-size: .78rem; text-align: right; }
.lrow .ctl { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; }
.lrow input[type=range] { width: 120px; }
.crow { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; }

.maplibregl-popup-content { max-height: 360px; overflow: auto; font-size: .8rem; padding: 10px 12px; }
.pp h3 { margin: 0 0 6px; font-size: .9rem; }
.pp table { border-collapse: collapse; }
.pp td { padding: 2px 6px; border-bottom: 1px solid #eef2f1; vertical-align: top; }
.pp td:first-child { color: var(--muted); white-space: nowrap; }
.pp td:last-child { word-break: break-word; max-width: 260px; }
.lbl { font: 600 11px/1 "Noto Sans", system-ui, sans-serif; color: #111; background: rgba(255,255,255,.78);
  padding: 1px 3px; border-radius: 3px; pointer-events: none; white-space: nowrap; }

/* Φ1: σχόλια, έγκριση, εξαγωγή */
.side { position: absolute; top: 46px; right: 10px; width: 360px; max-height: calc(100vh - 60px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12); z-index: 5; font-size: .86rem; }
.side h2 { margin: 0 0 4px; font-size: 1.05rem; }
.side label { display: flex; gap: 6px; align-items: center; margin: 6px 0; }
.clist, .flist { list-style: none; padding: 0; margin: 8px 0 0; }
.clist li { padding: 7px 4px; border-bottom: 1px solid #eef2f1; cursor: pointer; }
.clist li:hover { background: #f3f7f6; }
.clist li.done { color: var(--muted); }
.flist li { padding: 4px 0; }
.pp-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.pp-actions button { font: inherit; font-size: .8rem; padding: 4px 8px; border-radius: 5px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; }
.pp-actions button.ok { background: #2e7d4f; color: #fff; border-color: #2e7d4f; }
.pp-actions button.warn { background: #b25a00; color: #fff; border-color: #b25a00; }
.pp-actions input { flex: 1 1 160px; font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; }
.cbox p { margin: 6px 0; white-space: pre-wrap; }
.cbox .reply { padding: 4px 0 4px 10px; border-left: 2px solid var(--line); margin: 4px 0; }
.draw-hint { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); background: #13201e; color: #fff;
  padding: 6px 12px; border-radius: 6px; font-size: .85rem; z-index: 6; }

/* Φ2: Sunday, προτάσεις */
.side.wide { width: 420px; }
.chat-log { max-height: 38vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 6px; margin: 6px 0;
  background: #fafcfb; }
.msg-user { background: #e3f0ef; border-radius: 6px; padding: 5px 8px; margin: 4px 0 4px 30px; white-space: pre-wrap; }
.msg-sunday { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; margin: 4px 30px 4px 0;
  white-space: pre-wrap; }
.msg-err { color: #b3261e; padding: 4px 0; }
#chat-input { width: 100%; font: inherit; padding: 6px; border: 1px solid var(--line); border-radius: 6px; resize: vertical; }
#chat-polygon { font: inherit; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; }
#chat-send { font: inherit; margin-top: 4px; padding: 5px 12px; border: 0; border-radius: 5px; background: var(--accent);
  color: #fff; cursor: pointer; }
.difft { border-collapse: collapse; margin: 6px 0; }
.difft td, .difft th { padding: 2px 8px; border-bottom: 1px solid #eef2f1; text-align: left; }
.prop-detail h3 { margin: 6px 0 2px; font-size: .95rem; }
.notice { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); background: #2e7d4f; color: #fff;
  padding: 7px 14px; border-radius: 6px; font-size: .9rem; z-index: 7; }

/* Φ3: σελίδα ρυθμίσεων, επεξεργασία κορυφών */
.page-body { overflow: auto; }
.page { max-width: 1100px; margin: 18px auto; padding: 0 16px; font-size: .92rem; }
.page h2 { font-size: 1.1rem; margin-top: 26px; }
.kanones { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--line); }
.kanones th, .kanones td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.kanones th { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: var(--bg); }
.kanones code { white-space: pre-wrap; word-break: break-word; }
.k-edit input, .k-edit select { font: inherit; padding: 3px 6px; width: 170px; border: 1px solid var(--line); border-radius: 5px; }
.k-edit button, .kanones button { font: inherit; font-size: .8rem; margin: 2px; padding: 3px 9px; border-radius: 5px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; }
.kanones button.ok { background: #2e7d4f; color: #fff; } .kanones button.warn { background: #b25a00; color: #fff; }
.sklhros { font-size: .72rem; background: #b3261e; color: #fff; border-radius: 4px; padding: 1px 5px; }
.btn-link { color: var(--bar-ink); text-decoration: none; border: 1px solid #3c4d49; border-radius: 5px; padding: 4px 9px; }
.vx { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #d4006a; cursor: grab; }
.vx.shared { border-color: #0b4fd6; background: #cfe0ff; }
#bar button.active { background: #d4006a; border-color: #d4006a; }
