:root {
  --navy: #1f3a5f; --teal: #1b7f79; --teal-d: #14625d; --red: #b5483b; --amber: #8a5a00;
  --bg: #f4f7fa; --card: #ffffff; --line: #dde4ec; --text: #1d2733; --muted: #5d6b7a;
  --ok: #1f8a4c; --ok-bg: #e6f5ec; --bad-bg: #fbeceb; --soft: #eef2f7; --teal-bg: #e8f4f3;
  --radius: 12px; --shadow: 0 1px 3px rgba(20, 40, 70, .08), 0 4px 16px rgba(20, 40, 70, .05);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 "Segoe UI", Calibri, system-ui, -apple-system, sans-serif; }
a { color: var(--teal-d); }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.4rem; margin-top: 1.4em; } h3 { font-size: 1.12rem; margin-top: 1.2em; }
small, .muted { color: var(--muted); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; margin: 0 auto; }

/* ---------- header ---------- */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 58px; flex-wrap: wrap; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.08rem; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 26px; height: 26px; border-radius: 8px; background: var(--teal); display: inline-grid; place-items: center; font-size: .95rem; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav a, .nav button.linklike { color: #dfe8f3; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .95rem; background: none; border: 0; cursor: pointer; font-family: inherit; }
.nav a:hover, .nav button.linklike:hover, .nav a.active { background: rgba(255, 255, 255, .14); color: #fff; }
.nav form { display: inline; margin: 0; }

main { padding: 28px 0 56px; min-height: 70vh; }
.site-footer { border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: .88rem; text-align: center; }

/* ---------- κάρτες, κουμπιά ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid > .card, .grid > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
@media (max-width: 760px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }
.btn { display: inline-block; background: var(--teal); color: #fff !important; padding: 10px 18px; border-radius: 9px; border: 0; text-decoration: none; font: inherit; font-weight: 600; cursor: pointer; line-height: 1.3; }
.btn:hover { background: var(--teal-d); }
.btn.secondary { background: var(--soft); color: var(--navy) !important; border: 1px solid var(--line); }
.btn.secondary:hover { background: #e2e8f0; }
.btn.danger { background: var(--red); }
.btn.small { padding: 6px 12px; font-size: .88rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.spacer { flex: 1; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; border: 1px solid; }
.flash.ok { background: var(--ok-bg); border-color: #b7e0c7; color: #14582f; }
.flash.err { background: var(--bad-bg); border-color: #efc1bc; color: #8d2d22; }

/* ---------- φόρμες ---------- */
label { display: block; font-weight: 600; margin: 14px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #c7d1dc; border-radius: 9px; font: inherit; background: #fff; color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
textarea.code { font-family: Consolas, monospace; font-size: .88rem; min-height: 260px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
.hint { font-size: .86rem; color: var(--muted); margin-top: 3px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: auto; }

/* ---------- πρόοδος ---------- */
.bar { height: 10px; background: #e3e9f0; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #35a79f); border-radius: 999px; transition: width .4s; }
.pill { display: inline-block; font-size: .78rem; padding: 2px 10px; border-radius: 999px; background: var(--soft); color: var(--navy); font-weight: 600; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.teal { background: var(--teal-bg); color: var(--teal-d); }

/* ---------- hero ---------- */
.hero { background: linear-gradient(135deg, var(--navy), #2c5282 60%, var(--teal)); color: #fff; border-radius: 18px; padding: 48px 36px; margin-bottom: 28px; }
.hero h1 { color: #fff; font-size: 2.3rem; margin-bottom: .3em; }
.hero p { font-size: 1.12rem; max-width: 640px; color: #e7eef7; }
.hero .btn.secondary { background: rgba(255, 255, 255, .16); color: #fff !important; border-color: rgba(255, 255, 255, .35); }
.quote { border-left: 4px solid var(--teal); background: var(--teal-bg); padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 10px 0; }

/* ---------- ενότητες ---------- */
.module-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.module-card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(20, 40, 70, .12); }
.module-card .num { width: 40px; height: 40px; border-radius: 12px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; }
.module-card h3 { margin: 0; }
.crumbs { font-size: .9rem; margin-bottom: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }

.items { list-style: none; padding: 0; margin: 0; }
.items li { border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.items a { display: flex; align-items: center; gap: 12px; padding: 12px 6px; text-decoration: none; color: inherit; }
.items a:hover { background: var(--soft); border-radius: 8px; }
.tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #b9c5d3; display: grid; place-items: center; font-size: .8rem; flex: none; color: #fff; }
.tick.done { background: var(--ok); border-color: var(--ok); }
.kind { font-size: .75rem; padding: 2px 8px; border-radius: 6px; background: var(--soft); color: var(--muted); margin-left: auto; white-space: nowrap; }

/* ---------- μάθημα ---------- */
.lesson-body { font-size: 1.05rem; }
.lesson-body ul, .lesson-body ol { padding-left: 1.3em; }
.lesson-body li { margin: .45em 0; }
.lesson-body h3 small { color: var(--muted); font-weight: 400; }
table.phrases { width: 100%; border-collapse: collapse; margin: 8px 0 22px; font-size: .97rem; }
table.phrases th { text-align: left; padding: 10px 12px; color: #fff; }
table.phrases th:first-child { background: var(--red); border-radius: 8px 0 0 0; }
table.phrases th:last-child { background: var(--teal); border-radius: 0 8px 0 0; }
table.phrases td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.phrases td:first-child { background: #fcf2f0; font-style: italic; width: 40%; }
table.phrases td:last-child { background: #eef8f7; }
@media (max-width: 640px) { table.phrases, table.phrases tbody, table.phrases tr, table.phrases td { display: block; width: 100% !important; } table.phrases thead { display: none; } table.phrases td:first-child::before { content: "Αντί για: "; font-style: normal; font-weight: 700; color: var(--red); } table.phrases td:last-child::before { content: "Πες: "; font-weight: 700; color: var(--teal-d); } }

.keybox { background: #eef2f7; border-radius: 12px; padding: 16px 20px; }
.keybox h3 { margin-top: 0; }
.keybox ul { margin: 0; padding-left: 1.2em; }

/* ---------- ασκήσεις ---------- */
.q { padding: 16px 0; border-bottom: 1px solid var(--line); }
.q:last-child { border: 0; }
.q .qtext { font-weight: 600; margin-bottom: 8px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; margin: 6px 0; cursor: pointer; background: #fff; }
.opt:hover { border-color: var(--teal); background: var(--teal-bg); }
.opt input { margin-top: 5px; }
.opt.right { background: var(--ok-bg); border-color: #8fd1aa; }
.opt.wrong { background: var(--bad-bg); border-color: #e7a8a1; }
.explain { margin-top: 8px; padding: 10px 14px; border-radius: 9px; background: var(--soft); font-size: .95rem; }
.badge-ok { color: var(--ok); font-weight: 700; } .badge-bad { color: var(--red); font-weight: 700; }
.bad-phrase { background: var(--bad-bg); border-left: 4px solid var(--red); padding: 8px 12px; border-radius: 0 8px 8px 0; font-style: italic; }
.model { background: var(--teal-bg); border-left: 4px solid var(--teal); padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 10px 0; }
.situation { color: var(--muted); font-size: .94rem; margin-bottom: 6px; }
.chat { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.bubble { max-width: 82%; padding: 12px 16px; border-radius: 16px; }
.bubble.customer { background: #fdecc8; border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble.you { background: var(--teal-bg); border: 1px solid #b6dcd9; border-bottom-right-radius: 4px; align-self: flex-end; }
.fb { border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
.fb.p2 { background: var(--ok-bg); border: 1px solid #a8d9ba; }
.fb.p1 { background: #fff6dc; border: 1px solid #ecd58f; }
.fb.p0 { background: var(--bad-bg); border: 1px solid #e7b1ab; }
.score-box { text-align: center; padding: 24px; border-radius: 14px; background: linear-gradient(135deg, var(--teal-bg), #f2f8ff); border: 1px solid #b6dcd9; margin-top: 18px; }
.score-box .big { font-size: 2.6rem; font-weight: 800; color: var(--teal-d); line-height: 1; }
.sel-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 700px) { .sel-row { grid-template-columns: 1fr; } }

/* ---------- πίνακες ---------- */
table.list { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
table.list th, table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.list th { background: var(--soft); color: var(--navy); font-size: .88rem; }
.table-wrap { overflow-x: auto; }
.stat { text-align: center; }
.stat .n { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1.1; }

/* ---------- κλίμακα αυτοαξιολόγησης ---------- */
.scale { display: flex; gap: 6px; flex-wrap: wrap; }
.scale label { margin: 0; font-weight: 500; }
.scale input { position: absolute; opacity: 0; }
.scale span { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid #c7d1dc; border-radius: 10px; cursor: pointer; background: #fff; }
.scale input:checked + span { background: var(--teal); color: #fff; border-color: var(--teal); font-weight: 700; }
.scale input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ---------- βεβαίωση ---------- */
.cert { background: #fff; border: 8px double var(--navy); padding: 60px 40px; text-align: center; border-radius: 6px; max-width: 820px; margin: 0 auto; }
.cert h1 { font-size: 2.4rem; letter-spacing: .06em; text-transform: uppercase; }
.cert .name { font-size: 2.2rem; color: var(--teal-d); font-weight: 700; margin: 18px 0; border-bottom: 2px solid var(--line); display: inline-block; padding: 0 30px 6px; }

/* ---------- εκτύπωση ---------- */
@media print {
  .site-header, .site-footer, .no-print, .actions, .btn { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  main { padding: 0; }
  table.phrases td:first-child, table.phrases td:last-child { background: #fff !important; }
}

/* ---------- εικονογραφήσεις ---------- */
.lesson-figure { margin: 6px 0 22px; }
.lesson-figure img { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow); background: #fff; }
.module-card .num.badge { width: 64px; height: 64px; background: none; border-radius: 50%; padding: 0; overflow: hidden; }
.module-card .num.badge img { width: 100%; height: 100%; display: block; }
.hero { position: relative; overflow: hidden; }
.hero-art { position: absolute; right: 18px; bottom: 6px; width: 380px; max-width: 42%; height: auto; pointer-events: none; }
@media (max-width: 860px) { .hero-art { display: none; } }
.module-head { display: flex; align-items: center; gap: 16px; }
.module-head img { width: 78px; height: 78px; flex: none; }

/* Πίνακες φράσεων: εικονίδια ✗ / ✓ */
table.phrases td:first-child::before, table.phrases td:last-child::before { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: .8rem; font-style: normal; font-weight: 800; margin-right: 8px; vertical-align: 1px; }
table.phrases td:first-child::before { content: "✗"; background: var(--red); }
table.phrases td:last-child::before { content: "✓"; background: var(--ok); }
@media (max-width: 640px) { table.phrases td:first-child::before, table.phrases td:last-child::before { all: unset; } }

/* Παιχνίδι ρόλων: πρόσωπα πελάτη */
.bubble.customer { display: flex; gap: 12px; align-items: center; }
.avatar { width: 46px; height: 46px; flex: none; }
.hero p { max-width: 540px; }
.hero-art { width: 330px; right: 14px; }

/* ---------- πλαίσια μαθήματος και έμφαση ---------- */
.lesson-body strong { color: var(--navy); font-weight: 700; }
.lesson-body p { margin: .7em 0; }
.lesson-body ol { counter-reset: n; list-style: none; padding-left: 0; }
.lesson-body ol > li { counter-increment: n; position: relative; padding-left: 38px; margin: .75em 0; }
.lesson-body ol > li::before { content: counter(n); position: absolute; left: 0; top: .1em; width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 800; font-size: .85rem; display: grid; place-items: center; }
.lesson-body .callout ol > li::before { background: var(--navy); }
.lesson-body ul { list-style: none; padding-left: 0; }
.lesson-body ul > li { position: relative; padding-left: 24px; margin: .55em 0; }
.lesson-body ul > li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }
.callout { border-radius: 14px; padding: 14px 18px 8px; margin: 18px 0; border-left: 6px solid; }
.callout-title { font-weight: 800; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.callout.example { background: #fff8e0; border-color: #e0a800; } .callout.example .callout-title { color: #8a5a00; }
.callout.tip { background: var(--teal-bg); border-color: var(--teal); } .callout.tip .callout-title { color: var(--teal-d); }
.callout.key { background: #eaf1fb; border-color: var(--navy); } .callout.key .callout-title { color: var(--navy); }
.callout.warn { background: var(--bad-bg); border-color: var(--red); } .callout.warn .callout-title { color: #a23b2f; }
.say { background: #fff; border: 1px dashed #b9c5d3; border-radius: 10px; padding: 8px 14px; font-style: italic; margin: .5em 0; }

/* ---------- βιβλιοθήκη εικόνων (διαχείριση) ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.gal-item { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); }
.gal-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 8px; background: var(--soft); display: block; }
.gal-item figcaption { padding: 6px 2px 2px; font-size: .88rem; word-break: break-all; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 340px; overflow: auto; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; }
.picker button { border: 2px solid transparent; background: var(--soft); border-radius: 8px; padding: 3px; cursor: pointer; }
.picker button:hover, .picker button.sel { border-color: var(--teal); }
.picker img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; display: block; }
.img-preview { max-width: 360px; border-radius: 12px; display: block; margin-bottom: 10px; background: #fff; border: 1px solid var(--line); }

/* ---------- player εκφώνησης ---------- */
.audio-player { position: sticky; top: 66px; z-index: 10; display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 2px solid var(--teal); border-radius: 16px; padding: 12px 16px; margin: 0 0 18px; box-shadow: 0 4px 18px rgba(20, 60, 90, .14); }
.ap-play { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--teal); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .12s, background .12s; }
.ap-play:hover { background: var(--teal-d); transform: scale(1.05); }
.audio-player.playing .ap-play { background: var(--coral, #f0705a); background: #e0604b; }
.ap-main { flex: 1; min-width: 0; }
.ap-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .95rem; }
.ap-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.ap-seek { width: 100%; margin: 8px 0 4px; accent-color: var(--teal); height: 6px; }
.ap-opts { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; }
.ap-mini { border: 1px solid var(--line); background: var(--soft); color: var(--navy); border-radius: 8px; padding: 3px 10px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.ap-mini:hover { background: #e2e8f0; }
.ap-check { font-size: .86rem; margin: 0; color: #3b4a5c; }
.ap-check input { accent-color: var(--teal); }
.ap-hint { margin-top: 6px; font-size: .86rem; color: #8a5a00; font-weight: 600; }
.audio-player.failed { border-color: var(--red); }
@media (max-width: 600px) { .audio-player { top: 62px; padding: 10px 12px; } .ap-play { width: 44px; height: 44px; } }

/* Παιχνίδι ρόλων: κουμπιά ήχου */
.optrow { display: flex; gap: 8px; align-items: stretch; margin: 6px 0; }
.optrow .opt { flex: 1; margin: 0; }
.say-btn { flex: none; width: 42px; border: 1px solid var(--line); background: var(--soft); border-radius: 9px; cursor: pointer; font-size: 1rem; }
.say-btn:hover, .say-btn.on { background: var(--teal-bg); border-color: var(--teal); }
.bubble .say-btn { width: 34px; height: 34px; border-radius: 50%; margin-left: auto; }
