@font-face {
  font-family: 'Inter Var';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Var';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter Var';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/inter-greek-wght-normal.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Inter Var';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/inter-greek-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}

:root {
  --navy-950: #081627;
  --navy-900: #0c1f35;
  --navy-800: #122b48;
  --navy-700: #1a3a5f;
  --navy-600: #24507f;
  --brass: #c9a54a;
  --brass-soft: #f3e2b3;

  --primary: #1e5fa6;
  --primary-hover: #184f8b;
  --primary-soft: #e8f0fa;
  --primary-line: #bcd2ec;

  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e1e6ed;
  --border-strong: #cfd7e2;
  --text: #142031;
  --text-2: #3d4a5c;
  --muted: #6b778a;
  --faint: #98a3b3;

  --success: #1b7f4b;
  --success-soft: #e5f4ec;
  --danger: #c13b3b;
  --danger-soft: #fbeaea;
  --warning: #a8690f;
  --warning-soft: #fdf3e2;
  --info-soft: #eaf2fb;

  --deck: #1e5fa6;
  --deck-soft: #e5eefa;
  --engine: #b4521d;
  --engine-soft: #fbece3;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 56, 0.06);
  --shadow: 0 1px 3px rgba(16, 32, 56, 0.08), 0 4px 14px rgba(16, 32, 56, 0.05);
  --shadow-lg: 0 18px 50px rgba(8, 22, 39, 0.28);
  --font: 'Inter Var', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Noto Sans', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
.tnum { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ layout */
.app { display: grid; grid-template-columns: 250px 1fr; height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: #cfdbea;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid #0a1a2c;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 18px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.brand-mark { flex: none; display: flex; }
.brand-name { color: #fff; font-weight: 650; font-size: 14.5px; letter-spacing: 0.1px; line-height: 1.2; }
.brand-sub { color: var(--brass); font-size: 11px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; margin-top: 3px; }

.nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: #6f86a3; padding: 14px 12px 6px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 8px;
  color: #c3d1e2; cursor: pointer; border: 0; background: none; width: 100%; text-align: left;
  font-weight: 500; font-size: 13.5px;
  transition: background 0.12s, color 0.12s;
}
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.1); color: #fff; box-shadow: inset 3px 0 0 var(--brass); }
.nav-item .nav-count { margin-left: auto; font-size: 11px; color: #8ea3bd; font-variant-numeric: tabular-nums; }

.sidebar-foot { padding: 14px 16px 16px; border-top: 1px solid rgba(255,255,255,0.06); font-size: 11.5px; color: #7f94ae; }
.sidebar-foot .year-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(201,165,74,0.12); color: var(--brass-soft); border: 1px solid rgba(201,165,74,0.35); padding: 4px 10px; border-radius: 999px; font-weight: 600; font-size: 12px; margin-bottom: 8px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--border);
  min-height: 68px;
}
.topbar h1 { font-size: 19px; margin: 0; font-weight: 650; letter-spacing: -0.2px; }
.page-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.year-switch {
  display: flex; align-items: center; gap: 10px;
  background: var(--navy-800); color: #fff; border-radius: 10px; padding: 6px 8px 6px 14px;
  box-shadow: var(--shadow-sm);
}
.year-switch-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--brass-soft); font-weight: 600; }
.year-switch select {
  background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.18);
  border-radius: 7px; padding: 5px 8px; font-weight: 650; font-size: 14px; cursor: pointer; outline: none;
}
.year-switch select option { color: var(--text); background: #fff; }
.save-status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 110px; justify-content: flex-end; }
.save-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.save-status.saving .dot { background: var(--warning); }
.save-status.error { color: var(--danger); }
.save-status.error .dot { background: var(--danger); }

.content { flex: 1; overflow: auto; padding: 24px 28px 40px; }
.page { max-width: 1500px; margin: 0 auto; }
.page-wide { max-width: none; }

/* ------------------------------------------------------------ primitives */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { margin: 0; font-size: 14.5px; font-weight: 650; }
.card-head .sub { color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }
.card-body { padding: 16px 18px; }
.section-title { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.9px; color: var(--muted); margin: 26px 0 10px; }
.section-title:first-child { margin-top: 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1250px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.strong { font-weight: 650; }
.mono { font-family: 'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
.danger-text { color: var(--danger); }
.success-text { color: var(--success); }
.warning-text { color: var(--warning); }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 550; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.btn:hover { background: var(--surface-2); border-color: #b9c4d3; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(30,95,166,0.25); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #a93232; border-color: #a93232; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #edf1f6; border-color: transparent; }
.btn-soft { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }
.btn-soft:hover { background: #dce8f7; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-icon { width: 30px; padding: 0; }
.btn.danger-text { color: var(--danger); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.link { color: var(--primary); cursor: pointer; background: none; border: 0; padding: 0; font-weight: 550; }
.link:hover { text-decoration: underline; }

/* ------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.input, .select, .textarea {
  height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: #fff; outline: none; min-width: 0; width: 100%;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.select { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b778a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; cursor: pointer; }
.textarea { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,95,166,0.15); }
.input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(193,59,59,0.12); }
.input-search { padding-left: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2398a3b3' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 10px center; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: span 2; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.checkbox > span b { font-weight: 650; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--primary); margin: 0; cursor: pointer; }
.error-box { background: var(--danger-soft); color: var(--danger); border: 1px solid #f0c9c9; border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12.5px; }

/* segmented */
.seg { display: inline-flex; background: #e9edf3; border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-weight: 550; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 10px 14px; cursor: pointer; font-weight: 550; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--primary); border-bottom-color: var(--primary); }
.tab .count { background: #e9edf3; color: var(--text-2); border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 600; line-height: 18px; }
.tab.on .count { background: var(--primary-soft); color: var(--primary); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1.5; white-space: nowrap; background: #eef1f5; color: var(--text-2); }
.badge-deck { background: var(--deck-soft); color: var(--deck); }
.badge-engine { background: var(--engine-soft); color: var(--engine); }
.badge-common { background: #eef1f5; color: var(--text-2); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-info { background: var(--info-soft); color: var(--primary); }
.badge-level { background: #eef1f7; color: var(--navy-700); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow: auto; border-radius: 0 0 var(--radius) var(--radius); }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.5px;
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 9px 12px; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: #f6f9fd; }
.table tbody tr.selected td { background: #eef4fc; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.chk, .table th.chk { width: 38px; padding-right: 0; }
.table .am { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--navy-700); }
.table-compact td { padding: 6px 10px; }
.table-compact th { padding: 7px 10px; }

/* ------------------------------------------------------------ misc components */
.empty {
  text-align: center; padding: 48px 20px; color: var(--muted);
}
.empty .empty-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.empty .empty-icon svg { width: 24px; height: 24px; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 15px; }
.empty p { margin: 0 auto 16px; max-width: 460px; }

.progress { height: 6px; background: #e8ecf2; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.progress.good > span { background: var(--success); }

.stat { padding: 16px 18px; }
.stat .stat-label { font-size: 12px; color: var(--muted); font-weight: 550; }
.stat .stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .stat-foot { font-size: 12px; color: var(--muted); margin-top: 4px; }

.hero {
  background: linear-gradient(120deg, var(--navy-800) 0%, var(--navy-700) 60%, #1f4a78 100%);
  color: #fff; border-radius: 14px; padding: 22px 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.hero::after { content: ''; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 36px solid rgba(255,255,255,0.04); }
.hero-kicker { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--brass-soft); font-weight: 600; }
.hero-year { font-size: 34px; font-weight: 750; letter-spacing: -0.8px; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.hero-sub { color: #b9c9dc; font-size: 13px; }
.hero-stats { display: flex; gap: 28px; position: relative; z-index: 1; }
.hero-stat .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-stat .l { font-size: 11.5px; color: #b9c9dc; }

.level-card { padding: 16px 18px; cursor: pointer; transition: border-color 0.12s, box-shadow 0.12s; }
.level-card:hover { border-color: var(--primary-line); box-shadow: var(--shadow); }
.level-card .lc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.level-card .lc-name { font-weight: 650; font-size: 14px; line-height: 1.3; }
.level-card .lc-code { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 3px; }
.level-card .lc-count { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.level-card .lc-meta { display: flex; gap: 8px; margin: 12px 0 10px; flex-wrap: wrap; }
.level-card .lc-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 7px; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.step { padding: 16px 18px; position: relative; }
.step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; margin-bottom: 10px; }
.step.done .n { background: var(--success-soft); color: var(--success); }
.step h4 { margin: 0 0 4px; font-size: 13.5px; }
.step p { margin: 0 0 12px; color: var(--muted); font-size: 12.5px; }

.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid #edf0f4; }
.list-item:last-child { border-bottom: 0; }
.list-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.list-icon svg { width: 16px; height: 16px; }
.list-icon.green { background: var(--success-soft); color: var(--success); }
.list-icon.gray { background: #eef1f5; color: var(--muted); }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input-search { width: 280px; }
.toolbar .select { width: auto; min-width: 150px; }

.selection-bar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; margin-top: 12px;
  background: var(--navy-800); color: #fff; border-radius: 10px; box-shadow: var(--shadow-lg);
}
.selection-bar .btn { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: #fff; }
.selection-bar .btn:hover { background: rgba(255,255,255,0.18); }
.selection-bar .btn-danger { background: var(--danger); border-color: var(--danger); }

.dropzone {
  border: 2px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2);
  padding: 30px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color 0.12s, background 0.12s;
}
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.dropzone .dz-icon svg { width: 34px; height: 34px; }
.dropzone .dz-title { font-weight: 650; color: var(--text); font-size: 14.5px; margin: 6px 0 4px; }
.file-chip { display: inline-flex; align-items: center; gap: 10px; background: var(--success-soft); color: var(--success); border-radius: 8px; padding: 8px 12px; font-weight: 600; }
.file-chip svg { width: 16px; height: 16px; }

.wizard-steps { display: flex; gap: 8px; margin-bottom: 18px; align-items: center; }
.wizard-steps .ws { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 550; font-size: 13px; }
.wizard-steps .ws .n { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; }
.wizard-steps .ws.on { color: var(--text); }
.wizard-steps .ws.on .n { background: var(--primary); border-color: var(--primary); color: #fff; }
.wizard-steps .ws.done .n { background: var(--success); border-color: var(--success); color: #fff; }
.wizard-steps .sep { width: 28px; height: 1.5px; background: var(--border-strong); }

.map-table td { padding: 8px 12px; }
.sample { color: var(--muted); font-size: 12px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-size: 12.5px; font-weight: 550; cursor: pointer; }
.chip b { font-variant-numeric: tabular-nums; }
.chip.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.chip .dot { width: 8px; height: 8px; }

.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: 9px; background: var(--info-soft); color: #1c4673; font-size: 12.8px; border: 1px solid #d3e3f5; }
.callout svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.callout.warn { background: var(--warning-soft); color: #7a4c0a; border-color: #f2dfbb; }
.callout.ok { background: var(--success-soft); color: #145c37; border-color: #c6e6d3; }
.callout p { margin: 0; }

/* ------------------------------------------------------------ gradebook */
.gb-wrap { overflow: auto; max-height: calc(100vh - 250px); border-radius: 0 0 var(--radius) var(--radius); }
table.gb { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.gb th, .gb td { border-bottom: 1px solid #e9edf2; border-right: 1px solid #eef1f5; padding: 0; background: #fff; }
.gb thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); font-size: 11.5px; font-weight: 600; color: var(--text-2); vertical-align: bottom; }
.gb thead th .th-in { padding: 8px 10px; }
.gb .sticky-1, .gb .sticky-2 { position: sticky; z-index: 2; }
.gb thead .sticky-1, .gb thead .sticky-2 { z-index: 4; }
.gb .sticky-1 { left: 0; min-width: 92px; }
.gb .sticky-2 { left: 92px; min-width: 240px; box-shadow: 1px 0 0 var(--border); }
.gb td.name-cell { padding: 7px 12px; white-space: nowrap; }
.gb td.am-cell { padding: 7px 12px; font-weight: 600; color: var(--navy-700); font-variant-numeric: tabular-nums; }
.gb .subj-h { width: 92px; min-width: 92px; max-width: 120px; text-align: center; }
.gb .subj-h .code { font-weight: 700; color: var(--text); font-size: 12px; }
.gb .subj-h .nm { font-weight: 500; color: var(--muted); font-size: 11px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-transform: none; letter-spacing: 0; }
.gb .subj-h .w { font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.gb td.g { text-align: center; }
.gb td.g input {
  width: 100%; height: 34px; border: 0; background: transparent; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13.5px; outline: none; padding: 0 4px;
}
.gb td.g input:focus { background: #fff; box-shadow: inset 0 0 0 2px var(--primary); }
.gb td.g.fail input { color: var(--danger); }
.gb td.g.absent input { color: var(--danger); font-size: 12px; }
.gb td.g.na { background: repeating-linear-gradient(-45deg, #f6f7f9, #f6f7f9 5px, #eef0f3 5px, #eef0f3 10px); }
.gb td.g.imported input { color: var(--text); }
.gb td.g.manual input { color: #2b4f7a; }
.gb td.g.fail.manual input, .gb td.g.fail.imported input { color: var(--danger); }
.gb td.avg { padding: 7px 12px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; background: #fbfcfd; }
.gb td.res { padding: 7px 12px; white-space: nowrap; background: #fbfcfd; }
.gb tr:hover td { background: #f7faff; }
.gb tr:hover td.g.na { background: repeating-linear-gradient(-45deg, #f1f4f8, #f1f4f8 5px, #e9edf2 5px, #e9edf2 10px); }
.gb tfoot td { background: var(--surface-2); font-size: 12px; color: var(--muted); padding: 7px 10px; text-align: center; font-variant-numeric: tabular-nums; position: sticky; bottom: 0; z-index: 2; border-top: 1px solid var(--border); }
.gb tfoot td.sticky-1, .gb tfoot td.sticky-2 { z-index: 3; text-align: left; }
.legend { display: flex; gap: 16px; align-items: center; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.legend .sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; vertical-align: -3px; margin-right: 5px; border: 1px solid var(--border); }

/* ------------------------------------------------------------ modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 22, 39, 0.5); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 30px;
  animation: fade 0.12s ease-out;
}
.modal {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 560px; max-width: 100%; max-height: calc(100vh - 60px);
  display: flex; flex-direction: column; animation: pop 0.14s ease-out;
}
.modal.lg { width: 860px; }
.modal.xl { width: 1080px; }
.modal.sm { width: 440px; }
.modal-head { padding: 18px 22px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 16.5px; font-weight: 650; }
.modal-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.modal-body { padding: 18px 22px; overflow: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 14px 14px; }
.modal-foot .left { margin-right: auto; display: flex; gap: 8px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: translateY(6px) scale(0.99); opacity: 0; } to { transform: none; opacity: 1; } }

.student-head { display: flex; align-items: center; gap: 14px; }
.avatar { width: 46px; height: 46px; border-radius: 12px; background: var(--navy-700); color: var(--brass-soft); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex: none; }
.kv { display: grid; grid-template-columns: 190px 1fr; gap: 8px 14px; font-size: 13px; }
.kv .k { color: var(--muted); }

.year-block { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; overflow: hidden; }
.year-block-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }

/* ------------------------------------------------------------ toast */
.toast-root { position: fixed; right: 22px; top: 80px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast-root .toast { pointer-events: auto; }
.toast {
  background: var(--navy-900); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg);
  font-size: 13px; max-width: 460px; display: flex; gap: 10px; align-items: flex-start; animation: pop 0.16s ease-out;
}
.toast svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.toast.success svg { color: #6fd69e; }
.toast.error { background: #7c1f1f; }
.toast.warn svg { color: #f3c969; }

.kbd { display: inline-block; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 11px; background: #fff; }

.scale-table td, .scale-table th { text-align: center; }
.scale-pill { display: inline-flex; width: 28px; height: 28px; border-radius: 8px; align-items: center; justify-content: center; font-weight: 700; background: var(--success-soft); color: var(--success); }
.scale-pill.fail { background: var(--danger-soft); color: var(--danger); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #c8d0db; border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #aab5c4; background-clip: content-box; border: 3px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* classes (τμήματα) */
.badge-sec { background: #f1ecdf; color: #7a5b12; }
.gb .subj-h .subj-export {
  margin-top: 4px; border: 1px solid var(--border); background: #fff; border-radius: 6px; width: 26px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--primary); padding: 0;
}
.gb .subj-h .subj-export:hover { background: var(--primary-soft); border-color: var(--primary-line); }
.gb .subj-h .subj-export svg { width: 13px; height: 13px; }
.lc-classes { font-size: 11.5px; color: var(--muted); margin: -4px 0 10px; display: flex; gap: 10px; flex-wrap: wrap; }
.lc-classes b { color: var(--text-2); font-weight: 650; }

/* transfer wizard */
.tr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); gap: 10px; align-items: stretch; }
.tr-box { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--surface-2); }
.tr-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 13.5px; margin-bottom: 12px; color: var(--navy-700); }
.tr-title svg { width: 17px; height: 17px; }
.tr-arrow { display: flex; align-items: center; justify-content: center; color: var(--primary); }
.tr-arrow svg { width: 22px; height: 22px; }

/* grade carried over from an earlier academic year (student came back) */
.gb td.g.carried { background: #eef6ff; }
.gb td.g.carried input { color: #2f6db3; font-style: italic; font-weight: 600; }
.gb tr:hover td.g.carried { background: #e4f0fd; }
.seg-sm button { padding: 4px 9px; font-size: 12px; }
.seg button.on[data-same="0"] { color: var(--danger); }
.badge-warning .icon, .badge-warning svg { vertical-align: -2px; }

/* ------------------------------------------------------------ screens: login / admin / student */
.login-root, .student-root, .teacher-root, .loading-root { display: none; }
body.mode-login .app, body.mode-student .app, body.mode-teacher .app, body.mode-loading .app { display: none; }
body.mode-login .login-root { display: block; }
body.mode-student .student-root { display: block; }
body.mode-teacher .teacher-root { display: block; }
body.mode-loading .loading-root { display: flex; }
.loading-root { position: fixed; inset: 0; align-items: center; justify-content: center; flex-direction: column; gap: 14px; color: var(--muted); background: var(--bg); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--primary-line); border-top-color: var(--primary); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-root { position: fixed; inset: 0; overflow: auto;
  background: radial-gradient(1200px 600px at 15% -10%, #24507f 0%, transparent 60%), linear-gradient(160deg, var(--navy-900) 0%, var(--navy-950) 100%); }
.login-wrap { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; }
.login-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 30px 32px 24px; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.login-title { font-size: 19px; font-weight: 700; color: var(--navy-800); letter-spacing: -0.01em; }
.login-sub { font-size: 12.5px; color: var(--brass); font-weight: 650; text-transform: uppercase; letter-spacing: 0.12em; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-btn { width: 100%; justify-content: center; margin-top: 4px; }
.login-foot { font-size: 12px; color: var(--muted); margin: 18px 0 0; text-align: center; }
.login-copy { color: #8fa4bf; font-size: 11.5px; margin-top: 18px; }
.login-server { display: flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.login-server .link { margin-left: auto; }
.srv-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.srv-dot.ok { background: var(--success); }
.srv-dot.bad { background: var(--danger); }
.input-lg { height: 40px; font-size: 14.5px; }
.user-chip { display: flex; align-items: center; gap: 6px; padding-left: 12px; border-left: 1px solid var(--border); }
.user-chip-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; color: var(--text-2); }
.user-chip:empty { display: none; }

/* ------------------------------------------------------------ student portal */
.student-root, .teacher-root { position: fixed; inset: 0; overflow: auto; background: var(--bg); }
.sp-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: linear-gradient(90deg, var(--navy-900), var(--navy-800)); color: #fff; box-shadow: var(--shadow); }
.sp-top .sp-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.sp-top .sp-brand small { display: block; color: var(--brass-soft); font-weight: 600; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.sp-top .spacer { flex: 1; }
.sp-top .sp-user { text-align: right; font-size: 12.5px; line-height: 1.3; }
.sp-top .sp-user b { font-size: 13.5px; }
.sp-top .btn { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); color: #fff; }
.sp-top .btn:hover { background: rgba(255,255,255,0.16); }
.sp-body { max-width: 980px; margin: 0 auto; padding: 26px 24px 60px; }
.sp-body h2 { margin: 0 0 4px; font-size: 20px; }
.exam-cards { display: grid; gap: 14px; margin-top: 18px; }
.exam-card { display: flex; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; box-shadow: var(--shadow-sm); }
.exam-card.open { border-color: var(--primary-line); box-shadow: 0 0 0 3px var(--primary-soft); }
.exam-card .ec-date { width: 74px; flex: none; text-align: center; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); padding: 7px 0; }
.exam-card .ec-date .d { font-size: 22px; font-weight: 750; line-height: 1.1; color: var(--navy-800); }
.exam-card .ec-date .m { font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.exam-card .ec-main { flex: 1; min-width: 0; }
.exam-card .ec-title { font-size: 15.5px; font-weight: 700; }
.exam-card .ec-meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.exam-card .ec-meta span { display: inline-flex; align-items: center; gap: 5px; }
.exam-card .ec-side { text-align: right; flex: none; }

/* exam taking */
.xm-bar { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 16px; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.xm-bar .xm-title { font-weight: 700; font-size: 15px; }
.xm-bar .xm-sub { font-size: 12px; color: var(--muted); }
.xm-timer { font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 750; color: var(--navy-800); padding: 4px 14px; border-radius: 10px; background: var(--primary-soft); display: flex; align-items: center; gap: 8px; }
.xm-timer.low { background: var(--warning-soft); color: var(--warning); }
.xm-timer.crit { background: var(--danger-soft); color: var(--danger); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.65; } }
.xm-save { font-size: 12px; color: var(--muted); min-width: 120px; text-align: right; }
.xm-save.err { color: var(--danger); }
.xm-layout { max-width: 1100px; margin: 0 auto; padding: 22px 24px 60px; display: grid; grid-template-columns: 1fr 230px; gap: 22px; align-items: start; }
.xm-q { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; box-shadow: var(--shadow-sm); }
.xm-qnum { font-size: 12px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.06em; }
.xm-qtext { font-size: 16.5px; font-weight: 600; margin: 8px 0 18px; white-space: pre-wrap; line-height: 1.5; }
.xm-opts { display: grid; gap: 10px; }
.xm-opt { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 14.5px; background: var(--surface); transition: border-color .12s, background .12s; }
.xm-opt:hover { border-color: var(--primary-line); background: var(--surface-2); }
.xm-opt.on { border-color: var(--primary); background: var(--primary-soft); }
.xm-opt .xm-letter { width: 26px; height: 26px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border-strong); }
.xm-opt.on .xm-letter { background: var(--primary); color: #fff; border-color: var(--primary); }
.xm-opt.multi .xm-letter { border-radius: 6px; }
.xm-nav-q { display: flex; justify-content: space-between; margin-top: 16px; }
.xm-side { position: sticky; top: 74px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; box-shadow: var(--shadow-sm); }
.xm-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0 14px; }
.xm-grid button { height: 32px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 650; font-size: 12.5px; }
.xm-grid button.done { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }
.xm-grid button.cur { outline: 2px solid var(--primary); outline-offset: 1px; }
.xm-done { max-width: 560px; margin: 70px auto; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 38px 30px; box-shadow: var(--shadow); }
.xm-done .big { width: 60px; height: 60px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: var(--success-soft); color: var(--success); }

/* admin: exams & accounts */
.q-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--surface); }
.q-card + .q-card { margin-top: 10px; }
.q-card .q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.q-card .q-n { font-weight: 750; color: var(--primary); min-width: 28px; }
.q-opt { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.q-opt .q-l { width: 24px; text-align: center; font-weight: 700; color: var(--muted); }
.q-opt input[type=text] { flex: 1; }
.cred-table td.pw { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 14px; font-weight: 700; letter-spacing: 0.04em; }
.pill-state { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.pill-state.ok { background: var(--success-soft); border-color: #bfe3cf; color: var(--success); }
.pill-state.live { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }
.pill-state.warn { background: var(--warning-soft); border-color: #f0d9b0; color: var(--warning); }
.pill-state.bad { background: var(--danger-soft); border-color: #f0c9c9; color: var(--danger); }
.gb .subj-h .subj-lock { display: inline-flex; margin: 4px 4px 0 0; color: var(--warning); vertical-align: middle; }
.btn-lock.on { background: var(--warning-soft); border-color: #f0d9b0; color: var(--warning); }

/* ------------------------------------------------------------ teacher portal */
.tp-body { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; padding: 22px 24px 50px; max-width: 1400px; margin: 0 auto; align-items: start; }
.tp-list { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 8px; }
.tp-list .section-title { margin: 0 0 4px; }
.tp-item { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; cursor: pointer; font: inherit; color: inherit; box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s; }
.tp-item:hover { border-color: var(--primary-line); }
.tp-item.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tp-item-t { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.tp-item-t svg { color: var(--warning); flex: none; }
.tp-item-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tp-item-n { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.tp-bar { height: 5px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; margin-top: 8px; }
.tp-bar span { display: block; height: 100%; background: var(--success); }
.tp-main { min-width: 0; }
.tp-table td { vertical-align: middle; }
.tp-grade { width: 76px; height: 30px; text-align: center; font-weight: 700; font-size: 14px; transition: background .2s, border-color .2s; }
.tp-grade.fail { color: var(--danger); }
.tp-grade.saving { background: var(--surface-2); }
.tp-grade.saved { background: var(--success-soft); border-color: #bfe3cf; }
.tp-grade:disabled { background: var(--surface-2); color: var(--muted); }
.tp-note { font-size: 12px; }
.tp-year { height: 32px; background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.25); }
.tp-year option { color: var(--text); }
.tp-yearlabel { font-weight: 650; font-size: 13px; padding: 5px 11px; border-radius: 99px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); }
@media (max-width: 860px) { .tp-body { grid-template-columns: 1fr; } .tp-list { position: static; } }

/* ============================================================ v2.2 — student portal tabs & syllabus, PDF viewer, login ΕΛ | EN */
/* login: language switch */
.login-card { position: relative; }
.login-lang { position: absolute; top: 12px; right: 12px; }
.login-lang button { min-width: 34px; padding: 3px 8px; font-size: 11.5px; }

/* student portal: Exams | Syllabus (in the top bar) */
.sp-tabs { display: flex; align-items: center; gap: 4px; margin-left: 22px; }
.sp-tab { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: rgba(255,255,255,0.72); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.sp-tab:hover { color: #fff; background: rgba(255,255,255,0.08); }
.sp-tab.on { color: #fff; background: rgba(255,255,255,0.14); box-shadow: inset 0 -2px 0 var(--brass); }
.sp-tab .count { background: var(--brass); color: var(--navy-900); border-radius: 999px; min-width: 18px; padding: 0 6px; font-size: 11px; font-weight: 750; line-height: 18px; text-align: center; }

/* student portal: syllabus */
.sy-none { margin-top: 18px; }
.sy-list { display: grid; gap: 14px; margin-top: 18px; }
.sy-subj { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
.sy-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.sy-subj.has-files .sy-head { border-bottom: 1px solid var(--border); background: var(--surface-2); }
.sy-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sy-ic svg { width: 17px; height: 17px; }
.sy-subj:not(.has-files) .sy-ic { background: var(--surface-2); color: var(--faint); }
.sy-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; }
.sy-code { margin-left: 9px; font-size: 11.5px; font-weight: 650; color: var(--muted); letter-spacing: 0.04em; }
.sy-n { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sy-files { display: flex; flex-direction: column; }
.sy-file { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 18px; border: 0; border-top: 1px solid #edf0f4; background: var(--surface); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.sy-file:first-child { border-top: 0; }
.sy-file:hover:not(:disabled) { background: #f6f9fd; }
.sy-file:hover:not(:disabled) .sy-open { text-decoration: underline; }
.sy-file:disabled { cursor: default; }
.sy-file.busy { cursor: progress; background: #f6f9fd; }
.sy-pdf { flex: none; width: 30px; height: 36px; border-radius: 4px 9px 4px 4px; background: var(--danger-soft); color: var(--danger); border: 1px solid #f0c9c9; font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; display: inline-flex; align-items: flex-end; justify-content: center; padding-bottom: 5px; }
.sy-fname { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sy-fmeta { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sy-open { flex: none; display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 88px; font-size: 12.5px; font-weight: 600; color: var(--primary); }
.sy-open svg { width: 15px; height: 15px; }
.sy-spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--primary-line); border-top-color: var(--primary); animation: spin 0.9s linear infinite; }

/* PDF viewer (App.pdfViewer — pdf-view.js) */
.modal.pdfv { width: 1180px; height: calc(100vh - 60px); }
.modal.pdfv .modal-body { flex: 1; min-height: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.modal.pdfv .modal-error { margin: 10px 16px 0; }
.modal.pdfv .modal-content { flex: 1; min-height: 0; display: flex; }
.pdfv-frame { flex: 1; display: block; width: 100%; height: 100%; border: 0; background: #525659; }
/* ============================================================ end v2.2 */

/* ============================================================ v2.7 — web interface on phones & tablets (teachers, students) */
@media (max-width: 760px) {
  .sp-top { flex-wrap: wrap; gap: 8px 10px; padding: 10px 14px 6px; }
  .sp-top .sp-brand { font-size: 14px; }
  .sp-top .sp-brand small { font-size: 10px; }
  .sp-top .sp-user { font-size: 11.5px; }
  .sp-top .sp-user b { font-size: 12.5px; }
  .sp-top .btn-sm[data-sx="logout"], .sp-top #tp-logout { padding: 0 8px; }
  .sp-tabs { order: 10; flex: 1 0 100%; margin: 2px -14px 0; padding: 0 10px 4px; overflow-x: auto; scrollbar-width: none; }
  .sp-tabs::-webkit-scrollbar { display: none; }
  .sp-tab { height: 32px; padding: 0 11px; font-size: 13px; }
  .sp-body { padding: 18px 14px 50px; }
  .sp-body .card, .tp-main .card { overflow-x: auto; }
  .exam-card { flex-wrap: wrap; gap: 12px; padding: 14px; }
  .exam-card .ec-side { text-align: left; flex: 1 0 100%; }
  .xm-bar { flex-wrap: wrap; gap: 8px 12px; padding: 8px 14px; }
  .xm-layout { grid-template-columns: minmax(0, 1fr); padding: 16px 12px 50px; }
  .xm-side { position: static; }
  .xm-q { padding: 16px; }
  .tp-body { padding: 14px 12px 40px; gap: 14px; }
  .tp-main .card-head { flex-wrap: wrap; gap: 10px; }
  .tp-main .card-head .row { flex-wrap: wrap; }
  /* the grade / hour buttons first: Α/Α and Α.Μ. give way on a phone */
  .tp-table th:nth-child(1), .tp-table td:nth-child(1), .tp-table th:nth-child(2), .tp-table td:nth-child(2) { display: none; }
  .tp-table th, .tp-table td { padding-left: 8px; padding-right: 8px; }
  .tp-table th[style*="width"] { width: auto !important; }
  .tp-table .tp-gb { display: inline-grid; grid-template-columns: repeat(4, 34px); gap: 5px; }
  .tp-table .tp-gb .gb { min-width: 0; padding: 0; }
  .tp-table:not(.tp-abs-table) th:nth-child(6), .tp-table:not(.tp-abs-table) td:nth-child(6) { display: none; }
}
@media (max-width: 420px) {
  .sp-top .sp-user { display: none; }
}

/* the desktop program is newer than the server it talks to */
.srv-old { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 900; max-width: min(880px, calc(100vw - 32px)); display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px 10px 14px; background: #fdecec; color: #8a1c1c; border: 1px solid #f2b8b8; border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); font-size: 13px; line-height: 1.45; }
.srv-old svg { flex: none; margin-top: 2px; }
.srv-old .btn { flex: none; color: inherit; }

/* exam assignment: filters */
.as-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.as-filters .input { width: 240px; }
.as-filters .select { width: auto; max-width: 260px; }
.as-filters .checkbox { margin-left: 4px; }

/* ISO training */
.iso-sig { height: 64px; min-width: 160px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border); border-radius: 8px; background: #fff; padding: 4px; }
.iso-sig img { max-height: 56px; max-width: 220px; object-fit: contain; }
.iso-sig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.iso-sig-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.iso-chips { display: flex; flex-wrap: wrap; gap: 3px; }
.iso-chip { min-width: 24px; height: 22px; padding: 0 5px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); font-size: 11.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.iso-chip:hover { border-color: var(--primary); }
.iso-chip.on { background: #fde2e2; border-color: #f2a5a5; color: #a11; }
.iso-tpl { display: flex; align-items: center; gap: 4px; max-width: 220px; }
.iso-tpl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ir-days .input { min-width: 140px; }
#ir-days td:nth-child(3) .input { min-width: 320px; }

/* ---- Ληξιπρόθεσμα (2.11) */
.nav-item .nav-alert { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d9822b; color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.arr-stats, .arr-preview-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.arr-stats > div, .arr-preview-stats > div { flex: 1; min-width: 150px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; background: var(--surface-2, #f7f9fc); }
.arr-stats b, .arr-preview-stats b { display: block; font-size: 20px; font-weight: 750; }
.arr-stats span, .arr-preview-stats span { font-size: 12px; color: var(--muted, #5a6678); }
.arr-preview-stats > div.bad b { color: var(--danger, #b42318); }
.arr-preview-stats > div.ok b { color: var(--success, #067647); }

/* ---- student portal: grades and the overdue amount (2.11) */
.gr-list { display: grid; gap: 16px; margin-top: 18px; }
.gr-level { overflow: hidden; }
.gr-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.gr-title { font-weight: 750; font-size: 16px; }
.gr-sum { display: flex; gap: 22px; }
.gr-sum span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.gr-sum b { font-size: 17px; }
.gr-res.pass b { color: var(--success); }
.gr-res.fail b { color: var(--danger); }
.gr-res.incomplete b { color: var(--warning); }
.gr-table { width: 100%; }
.gr-table td { vertical-align: middle; }
.gr-table td.gr-grade { font-weight: 750; font-size: 15px; white-space: nowrap; }
.gr-table tr.gr-fail td.gr-grade { color: var(--danger); }
.sp-arrears { max-width: 640px; margin: 30px auto 0; padding: 44px 24px !important; }
.sp-arrears > svg { color: var(--danger); }
.sp-arrears h2 { margin: 14px 0 4px; }
.sp-arrears-el { font-weight: 700; color: var(--danger); margin: 0 0 14px; }
@media (max-width: 640px) {
  .gr-head { padding: 12px 14px; }
  .gr-table th:last-child, .gr-table td:last-child { font-size: 11.5px; }
}

/* ---- the academy's logo (GMC Maritime Training Center) */
.brand-mark img, .login-logo, .sp-logo { display: block; flex: none; }
