/* ═══════════════════════════════════════════════════════════════════════════
   EU Database · Germany Eligibility — Design System v2
   Scheme: Deep navy → electric blue gradients, glass morphism, vivid accents
   ══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* ── brand palette ── */
  --brand:        #0f2744;
  --primary:      #1e56a0;
  --primary-dark: #153d77;
  --primary-mid:  #2563eb;
  --primary-lite: #3b82f6;
  --primary-tint: #eff6ff;
  --accent:       #06b6d4;   /* cyan pop */
  --accent-2:     #8b5cf6;   /* violet pop */
  --accent-3:     #f59e0b;   /* amber highlight */

  /* ── gradient stops ── */
  --g-start: #0f2744;
  --g-mid:   #1e3a8a;
  --g-end:   #1d4ed8;
  --g-full:  linear-gradient(135deg, #0f2744 0%, #1e3a8a 50%, #1d4ed8 100%);
  --g-card:  linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(239,246,255,0.95) 100%);
  --g-hero:  linear-gradient(135deg, #0f2744 0%, #1e3a8a 45%, #2563eb 75%, #06b6d4 100%);
  --g-nav:   linear-gradient(90deg, #0f2744 0%, #1e3a8a 100%);

  /* ── semantic ── */
  --ok:         #10b981;  --ok-bg:   #d1fae5;  --ok-border:   #6ee7b7;
  --bad:        #ef4444;  --bad-bg:  #fee2e2;  --bad-border:  #fca5a5;
  --free:       #2563eb;  --free-bg: #dbeafe;  --free-border: #93c5fd;
  --nc:         #d97706;  --nc-bg:   #fef3c7;  --nc-border:   #fcd34d;
  --warn:       #f59e0b;
  --info:       #06b6d4;  --info-bg: #cffafe;

  /* ── surfaces ── */
  --ink:           #0f172a;
  --ink-2:         #1e293b;
  --muted:         #64748b;
  --faint:         #94a3b8;
  --bg:            #f0f4f8;
  --bg-2:          #e8eef6;
  --surface:       #ffffff;
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;

  /* ── geometry ── */
  --radius:    16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  /* ── shadows ── */
  --shadow:    0 4px 6px -1px rgba(15,23,42,.08), 0 10px 40px -4px rgba(15,23,42,.1);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.08), 0 2px 8px rgba(15,23,42,.06);
  --shadow-lg: 0 20px 60px -10px rgba(15,39,68,.3), 0 8px 24px -4px rgba(15,39,68,.2);
  --shadow-glow: 0 0 30px rgba(37,99,235,.25), 0 8px 32px rgba(37,99,235,.15);

  /* ── glass ── */
  --glass-bg:     rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.18);
  --glass-blur:   blur(20px);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ═══ reset ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--primary-dark); }

/* ═══ top bar ══════════════════════════════════════════════════════════════ */
.topbar {
  background: var(--g-nav);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 20px rgba(15,39,68,.4);
}
.topbar-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 20px; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; flex-shrink: 0; }
.brand:hover { text-decoration: none; opacity: .9; }
.brand img.logo-img { height: 36px; width: auto; display: block; filter: brightness(1.1); }
.brand .sub {
  font-size: 11px; font-weight: 700; letter-spacing: .12em; white-space: nowrap;
  color: rgba(255,255,255,.9); background: rgba(255,255,255,.12);
  padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2);
  text-transform: uppercase;
}

/* ── nav links inside topbar ── */
.nav-links {
  display: flex; align-items: center; gap: 2px;
}
.nav-link {
  padding: 7px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,.75); transition: all .2s; white-space: nowrap;
  border: 1px solid transparent;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.12); text-decoration: none; }
.nav-link.active {
  color: #fff; background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.25); font-weight: 600;
}

/* ── user menu button ── */
.user-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; border-radius: 10px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; cursor: pointer; transition: all .2s; font-size: 13.5px; font-weight: 500;
  white-space: nowrap;
}
.user-btn:hover { background: rgba(255,255,255,.18); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary-lite));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}
/* dropdown content styled via DaisyUI but overridden */
.user-menu .dropdown-content {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 220px; margin-top: 8px;
  overflow: hidden;
}
.user-menu-header {
  padding: 14px 16px 12px; background: var(--g-full); color: #fff;
}
.user-menu-email { font-size: 12px; opacity: .8; }
.user-menu-name  { font-size: 14px; font-weight: 700; margin-top: 1px; }
.user-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: 13.5px; color: var(--ink); transition: background .15s;
  border: none; background: none; width: 100%; cursor: pointer; text-align: left;
}
.user-menu-item:hover { background: var(--primary-tint); color: var(--primary); text-decoration: none; }
.user-menu-item.danger { color: var(--bad); }
.user-menu-item.danger:hover { background: var(--bad-bg); }
.user-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ═══ layout ═══════════════════════════════════════════════════════════════ */
body { display: flex; flex-direction: column; min-height: 100dvh; }
main { max-width: 1400px; width: 100%; margin: 28px auto; padding: 0 20px; flex: 1; }
.narrow { max-width: 440px; margin: 0 auto; }
.page-head { margin: 0 0 20px; }
.page-head h1 {
  font-size: 24px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 4px;
  background: var(--g-full); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-head p { color: var(--muted); margin: 0; font-size: 14.5px; }

/* breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--muted); margin-bottom: 14px;
}
.breadcrumb a { color: var(--primary); font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { opacity: .4; }

/* ═══ cards ════════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow); }
.card h2 {
  font-size: 16px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em;
  color: var(--ink-2);
}
.card .hint { color: var(--muted); font-size: 13.5px; margin: 0 0 6px; }

/* gradient card accent bar */
.card-accent {
  border-top: 3px solid transparent;
  border-image: var(--g-full) 1;
}

/* ═══ gradient hero sections ═══════════════════════════════════════════════ */
.hero-gradient {
  background: var(--g-hero);
  border-radius: var(--radius); padding: 32px; margin-bottom: 18px; color: #fff;
  position: relative; overflow: hidden;
}
.hero-gradient::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% -10%, rgba(6,182,212,.35) 0%, transparent 70%);
  pointer-events: none;
}
.hero-gradient::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 80% at -10% 110%, rgba(139,92,246,.2) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }

/* ═══ forms ════════════════════════════════════════════════════════════════ */
label {
  display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin: 18px 0 7px;
}
input:not([type=checkbox]):not([type=radio]):not([type=file]),
select,
textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: 14.5px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-mid);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
input[type=file] {
  padding: 9px; background: var(--bg); cursor: pointer;
  border-style: dashed;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

/* ═══ buttons ══════════════════════════════════════════════════════════════ */
button, .btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  background: var(--g-full); color: #fff !important; border: 0;
  padding: 9px 20px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 13.5px; font-family: inherit; cursor: pointer; margin-top: 0;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
  box-shadow: 0 2px 8px rgba(30,86,160,.35);
  letter-spacing: .01em; white-space: nowrap; text-decoration: none;
}
button:hover, .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30,86,160,.45);
  text-decoration: none; color: #fff !important;
  /* no background change on hover — keep gradient intact */
}
button:active { transform: translateY(0); }

button.ghost, .btn.ghost {
  background: none; color: rgba(255,255,255,.75); box-shadow: none;
  padding: 7px 14px; margin: 0; font-weight: 500;
  border: 1px solid rgba(255,255,255,.2);
}
button.ghost:hover, .btn.ghost:hover {
  background: rgba(255,255,255,.12); color: #fff; transform: none;
  box-shadow: none;
}

button.secondary, .btn.secondary {
  background: var(--surface) !important; color: var(--primary-mid) !important;
  border: 1.5px solid var(--border-strong); box-shadow: var(--shadow-sm);
}
button.secondary:hover, .btn.secondary:hover {
  background: var(--primary-tint) !important; border-color: var(--primary-lite);
  transform: translateY(-1px); color: var(--primary-dark) !important;
}
button.danger, .btn.danger { color: var(--bad) !important; }
button.danger.secondary, .btn.danger.secondary { border-color: var(--bad-border) !important; }
button.danger.secondary:hover { background: var(--bad-bg) !important; color: var(--bad) !important; }

button.sm, .btn.sm { padding: 5px 12px; font-size: 12.5px; margin: 0; }
button.lg, .btn.lg { padding: 12px 26px; font-size: 15px; }

/* defeat DaisyUI .btn hover color reset */
button:hover *, .btn:hover *, button:hover, .btn:hover { color: inherit; }
button:not(.secondary):not(.ghost):not(.danger):not(.act-btn):not(.user-menu-item):hover,
.btn:not(.secondary):not(.ghost):not(.danger):not(.act-btn):not(.btn-outline):not(.btn-ghost):hover { color: #fff !important; }

/* form submit buttons that need top spacing */
form.spaced button[type=submit], .btn-spaced { margin-top: 18px; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions button, .actions .btn, .actions a.btn, .actions form { margin: 0; }

/* ═══ alerts / banners ═════════════════════════════════════════════════════ */
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius-sm); font-size: 14px;
  margin-bottom: 16px; border: 1px solid;
}
.alert.err   { background: var(--bad-bg);  border-color: var(--bad-border);  color: #7f1d1d; }
.alert.ok    { background: var(--ok-bg);   border-color: var(--ok-border);   color: #064e3b; }
.alert.info  { background: var(--info-bg); border-color: #a5f3fc;            color: #164e63; }
.alert-icon  { flex-shrink: 0; margin-top: 1px; }

/* anabin recognition banner */
.banner { border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; border: 1px solid; }
.banner .banner-title { font-weight: 700; margin-bottom: 4px; font-size: 14.5px; }
.banner.ok   { background: var(--ok-bg);  border-color: var(--ok-border);  color: #065f46; }
.banner.warn { background: var(--nc-bg);  border-color: var(--nc-border);  color: #854d0e; }
.banner.bad  { background: var(--bad-bg); border-color: var(--bad-border); color: #7f1d1d; }

.anabin-confirm {
  background: linear-gradient(135deg, var(--primary-tint), #f0f9ff);
  border: 1.5px solid var(--free-border); border-radius: var(--radius-sm);
  padding: 14px 18px; margin-bottom: 8px;
}
.anabin-confirm label { margin-top: 0; }

/* ═══ stats row ════════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 8px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 18px;
  position: relative; overflow: hidden; transition: all .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--g-full);
}
.stat-card.accent-ok::before  { background: linear-gradient(90deg, var(--ok), #34d399); }
.stat-card.accent-blue::before{ background: linear-gradient(90deg, var(--primary-mid), var(--accent)); }
.stat-card.accent-violet::before { background: linear-gradient(90deg, var(--accent-2), #c4b5fd); }
.stat-card .num  { font-size: 28px; font-weight: 800; letter-spacing: -.04em; margin-bottom: 2px; }
.stat-card .num.accent { background: var(--g-full); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-card .num.green  { color: var(--ok); }
.stat-card .num.violet { color: var(--accent-2); }
.stat-card .num.muted  { color: var(--muted); }
.stat-card .lbl  { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ═══ table ════════════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; display: table; }
th, td {
  text-align: left; padding: 12px 16px;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
thead th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700; background: var(--bg);
  white-space: nowrap; border-bottom: 1px solid var(--border);
}
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--primary-tint); }
tbody tr:last-child td { border-bottom: none; }
.prog { font-weight: 600; color: var(--ink); }
.muted { color: var(--muted); }
.city { font-size: 12px; color: var(--faint); }
.city::before { content: "📍"; margin-right: 3px; font-size: 10px; opacity: .7; }
.score { font-weight: 800; font-size: 16px; }

details { margin-top: 6px; }
details summary { cursor: pointer; color: var(--primary); font-size: 12.5px; font-weight: 600; }
details ul { margin: 6px 0 0; padding-left: 16px; }
details li { font-size: 12.5px; color: var(--muted); margin: 2px 0; }

/* ═══ pills / badges ═══════════════════════════════════════════════════════ */
.flags { display: flex; flex-wrap: wrap; gap: 5px 6px; align-items: center; max-width: 300px; }
.pill {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1.5; white-space: nowrap;
  letter-spacing: .02em; border: 1px solid transparent;
}
.pill.ok   { background: var(--ok-bg);   color: #065f46; border-color: var(--ok-border); }
.pill.bad  { background: var(--bad-bg);  color: #991b1b; border-color: var(--bad-border); }
.pill.free { background: var(--free-bg); color: #1d4ed8; border-color: var(--free-border); }
.pill.nc   { background: var(--nc-bg);   color: var(--nc); border-color: var(--nc-border); }
.pill.de   { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }
.pill.rel-relevant { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.pill.rel-related  { background: #e0f2fe; color: #0369a1; border-color: #7dd3fc; }
.pill.warn { background: var(--nc-bg); color: var(--nc); border-color: var(--nc-border); }
.pill.ua   { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }
.pill.eng  { background: #ccfbf1; color: #0f766e; border-color: #5eead4; }
.pill.intake { background: #e0e7ff; color: #4338ca; border-color: #a5b4fc; }
.pill.test { background: var(--bad-bg); color: #b91c1c; border-color: var(--bad-border); }

/* ═══ score badge ══════════════════════════════════════════════════════════ */
.score-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; height: 36px; border-radius: 10px; font-size: 16px; font-weight: 800;
  background: var(--g-full); color: #fff;
  box-shadow: 0 2px 8px rgba(30,86,160,.3);
  letter-spacing: -.02em;
}

/* ═══ why & sources ════════════════════════════════════════════════════════ */
td.why { max-width: 480px; min-width: 300px; font-size: 13px; }
.why-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.why-list li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.why-ic {
  flex: none; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700;
  line-height: 20px; text-align: center; margin-top: 1px; flex-shrink: 0;
}
.why-list li.pass .why-ic { background: var(--ok-bg);  color: #065f46;  border: 1px solid var(--ok-border); }
.why-list li.req  .why-ic { background: var(--nc-bg);  color: var(--nc); border: 1px solid var(--nc-border); }
.why-list li.info .why-ic { background: var(--info-bg); color: #0e7490; border: 1px solid #a5f3fc; }
.why-list li.req  { color: #854d0e; }
.why-list li b {
  display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 700; color: var(--faint); margin-bottom: 1px;
}
.why-list li.req b  { color: var(--nc); }
.why-list li.info b { color: var(--info); }

details.src { margin-top: 10px; }
details.src summary { color: var(--primary); font-size: 12px; font-weight: 600; }
.src-body { margin-top: 8px; display: flex; flex-direction: column; gap: 10px;
  border-left: 3px solid var(--border); padding-left: 12px; }
.src-name  { font-weight: 700; font-size: 11px; color: var(--ink); letter-spacing: .02em; }
.src-links { margin: 2px 0; font-size: 12px; }
.src-links .sep { color: var(--faint); margin: 0 5px; }
.src-snip  { color: var(--muted); font-style: italic; font-size: 12px; line-height: 1.45; }

/* ═══ results toolbar ══════════════════════════════════════════════════════ */
.toolbar-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar input, .toolbar select {
  padding: 8px 12px; font-size: 13.5px; border-radius: var(--radius-xs);
}
.toolbar .search { flex: 1 1 220px; min-width: 180px; }
.toolbar select  { width: auto; min-width: 140px; max-width: 240px; }
.filter-toggles  { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.toggle-pill {
  display: flex; align-items: center; gap: 7px; padding: 6px 13px;
  border-radius: 999px; border: 1.5px solid var(--border-strong);
  background: var(--surface); cursor: pointer; user-select: none;
  font-size: 13px; font-weight: 500; color: var(--muted);
  transition: all .15s;
}
.toggle-pill:has(input:checked) {
  background: var(--primary-tint); border-color: var(--primary-lite);
  color: var(--primary-dark); font-weight: 600;
}
.toggle-pill input { display: none; }
.toggle-pill .t-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-strong); flex-shrink: 0; transition: background .15s;
}
.toggle-pill:has(input:checked) .t-dot { background: var(--primary-mid); }
#count {
  margin-left: auto; font-size: 12px; color: var(--muted);
  background: var(--bg); padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); white-space: nowrap; font-weight: 600;
}
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--primary); }
th.sortable .arr { font-size: 9px; opacity: .4; margin-left: 3px; }
th.sortable.active { color: var(--primary-dark); }
th.sortable.active .arr { opacity: 1; color: var(--primary-mid); }

/* ═══ shortlist tray ═══════════════════════════════════════════════════════ */
.selcell { white-space: nowrap; vertical-align: middle; }
.selcell input { width: auto; cursor: pointer; accent-color: var(--primary-mid); transform: scale(1.15); }
#slbar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--g-full); color: #fff; border-radius: 999px;
  padding: 10px 12px 10px 20px;
  display: flex; gap: 8px; align-items: center;
  box-shadow: var(--shadow-glow); z-index: 30;
  border: 1px solid rgba(255,255,255,.2);
  animation: slideUp .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}
#slbar[hidden] { display: none; }
#slbar .slcount { font-weight: 700; font-size: 13.5px; white-space: nowrap; }
#slbar input {
  width: 190px; padding: 8px 14px; border-radius: 999px; border: 0; font-size: 13px;
  background: rgba(255,255,255,.15); color: #fff; placeholder-color: rgba(255,255,255,.6);
}
#slbar input::placeholder { color: rgba(255,255,255,.6); }
#slbar input:focus { outline: none; background: rgba(255,255,255,.22); }
#slbar button {
  margin: 0; padding: 8px 16px; background: rgba(255,255,255,.2); color: #fff;
  box-shadow: none; border: 1px solid rgba(255,255,255,.25); font-size: 13px;
  border-radius: 999px; transition: background .15s;
}
#slbar button:hover { background: rgba(255,255,255,.32); transform: none; box-shadow: none; }
#slbar button.ghost {
  background: transparent; color: rgba(255,255,255,.7); border-color: transparent;
}
#slbar button.ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ═══ background breakdown (review page) ══════════════════════════════════ */
.bg-breakdown { margin-top: 14px; }
.bg-head { font-weight: 700; font-size: 14px; }
.bg-head .muted { font-weight: 400; }
.bg-note { font-size: 12.5px; color: var(--muted); margin: 4px 0 14px; }
.bg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bg-row-top { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; margin-bottom: 3px; }
.bg-cr { color: var(--muted); white-space: nowrap; }
.bg-bar { height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.bg-bar-fill { height: 100%; background: var(--g-full); border-radius: 999px; }
.bg-total { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.bg-courses { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.bg-subjects { display: flex; flex-direction: column; gap: 14px; }
.bg-area-h { font-weight: 700; font-size: 13px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.bg-area-n { font-weight: 400; font-size: 11.5px; color: var(--faint); }
.bg-subj-tbl { width: 100%; border-collapse: collapse; }
.bg-subj-tbl td { padding: 4px 6px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: top; }
.bg-subj-tbl tr:last-child td { border-bottom: none; }
.bg-subj-tbl .s-name { width: 58%; }
.bg-subj-tbl .s-ch   { width: 18%; text-align: right; color: var(--muted); white-space: nowrap; }
.bg-subj-tbl .s-ects { width: 24%; text-align: right; font-weight: 600; white-space: nowrap; }

/* ═══ step wizard ══════════════════════════════════════════════════════════ */
.step-wizard { display: flex; align-items: center; gap: 0; margin-bottom: 24px; flex-wrap: nowrap; }
.sw-step { display: flex; align-items: center; gap: 10px; }
.sw-circle {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 700; flex: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.sw-step.done   .sw-circle { background: var(--ok);   color: #fff; }
.sw-step.active .sw-circle { background: var(--g-full); color: #fff; }
.sw-step.pending .sw-circle { background: var(--border-strong); color: var(--muted); }
.sw-label { font-size: 13px; font-weight: 600; }
.sw-step.done    .sw-label { color: var(--ok); }
.sw-step.active  .sw-label { color: var(--primary-mid); }
.sw-step.pending .sw-label { color: var(--muted); }
.sw-line { flex: 1; height: 2px; background: var(--border); min-width: 24px; }
.sw-line.done { background: var(--ok); }

/* ═══ drag-and-drop upload ══════════════════════════════════════════════════ */
.drop-zone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: 44px 24px; text-align: center; cursor: pointer;
  transition: all .2s; background: var(--bg); position: relative;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--primary-mid); border-style: solid;
  background: var(--primary-tint);
  box-shadow: 0 0 0 4px rgba(37,99,235,.1);
}
.drop-zone input[type=file] { display: none; }
.drop-zone .dz-icon { color: var(--primary-lite); margin-bottom: 12px; }
.drop-zone .dz-label { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.drop-zone .dz-hint  { font-size: 13.5px; color: var(--muted); }
.drop-zone .dz-filename { font-size: 13.5px; font-weight: 600; color: var(--primary); margin-top: 12px;
  background: var(--primary-tint); display: inline-block; padding: 6px 14px; border-radius: 999px; }

/* ═══ degree toggle ════════════════════════════════════════════════════════ */
.deg-toggle { display: flex; gap: 0; margin: 0; border-radius: var(--radius-sm); overflow: hidden; border: 1.5px solid var(--border-strong); }
.deg-toggle label {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  flex: 1; padding: 11px 18px; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; text-transform: none; letter-spacing: 0;
  color: var(--muted); background: var(--surface); margin: 0;
  transition: all .15s; border-right: 1px solid var(--border-strong);
}
.deg-toggle label:last-child { border-right: none; }
.deg-toggle input[type=radio] { display: none; }
.deg-toggle label:has(input:checked) {
  background: var(--g-full); color: #fff; font-weight: 700;
}

/* ═══ reassurance strip ════════════════════════════════════════════════════ */
.reassurance {
  display: flex; gap: 0; flex-wrap: nowrap; margin-top: 16px; overflow: hidden;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.ra-item {
  display: flex; align-items: center; gap: 8px; flex: 1;
  padding: 12px 16px; font-size: 12.5px; color: var(--muted); font-weight: 500;
  border-right: 1px solid var(--border); background: var(--bg);
}
.ra-item:last-child { border-right: none; }
.ra-item svg { flex: none; color: var(--primary-mid); }

/* ═══ spinner / loading ════════════════════════════════════════════════════ */
.spinner {
  display: inline-block; width: 15px; height: 15px; vertical-align: -2px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite; margin-right: 8px; flex-shrink: 0;
}
.btn.secondary .spinner, button.secondary .spinner { border-color: rgba(0,0,0,.2); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }
.gen-progress {
  display: none; margin-top: 14px; padding: 14px 18px; border-radius: var(--radius-sm);
  background: var(--primary-tint); color: var(--primary-dark); font-size: 14px;
  border: 1px solid var(--free-border); display: none; align-items: center; gap: 10px;
}
.gen-progress.show { display: flex; }
.gen-progress .spinner { border-color: rgba(30,86,160,.3); border-top-color: var(--primary); }

/* ═══ student report (print-safe — no gradient overrides) ═══════════════════ */
.report { color: var(--ink); max-width: 900px; }
.report .lh {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  border-bottom: 3px solid var(--brand); padding-bottom: 14px; margin-bottom: 20px;
}
.report .lh img { height: 44px; width: auto; display: block; }
.report .lh .doc { text-align: right; }
.report .lh .doc .t { font-size: 18px; font-weight: 800; color: var(--brand); letter-spacing: -.01em; }
.report .lh .doc .s { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; margin-top: 2px; }
.report .who {
  display: flex; flex-wrap: wrap; gap: 12px 34px; background: var(--primary-tint);
  border: 1px solid var(--free-border); border-radius: 10px; padding: 14px 18px; margin-bottom: 8px;
}
.report .who .f .k { color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: 10px; display: block; }
.report .who .f .v { font-weight: 700; font-size: 14px; color: var(--ink); }
.report h2.sec {
  font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--brand);
  margin: 24px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.conv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.conv-grid .cell { border: 1px solid var(--border); border-radius: 9px; padding: 10px 14px; background: #fafcfe; }
.conv-grid .cell.accent { border-left: 4px solid var(--brand); }
.conv-grid .k { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.conv-grid .v { font-size: 18px; font-weight: 800; color: var(--brand); margin-top: 1px; }
.conv-note { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.course { border: 1px solid var(--border-strong); border-radius: 12px; padding: 16px 20px; margin-bottom: 16px; }
.course-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.course-head h3 { font-size: 15.5px; margin: 0; line-height: 1.38; }
.course-head h3 .n { color: var(--brand); font-weight: 800; }
.course .uni { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.pill-elig { font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.pill-elig.ok { background: var(--ok-bg); color: #137333; }
.pill-elig.no { background: var(--nc-bg); color: #92500a; }
.subh { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 16px 0 8px; }
.reqs { margin: 0; padding-left: 18px; }
.reqs li { margin: 3px 0; }
.eval { list-style: none; margin: 0; padding: 0; }
.eval li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); align-items: flex-start; }
.eval li:first-child { border-top: none; }
.chip { flex: 0 0 auto; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  padding: 3px 8px; border-radius: 6px; min-width: 68px; text-align: center; margin-top: 2px; }
.chip.met       { background: var(--ok-bg);  color: #065f46; }
.chip.partial   { background: var(--nc-bg);  color: #92500a; }
.chip.not_met   { background: var(--bad-bg); color: #b91c1c; }
.chip.info      { background: #eef2f6; color: #475569; }
.eval .rq { flex: 1; }
.eval .rq .det { font-size: 13.5px; }
.eval .rq .mc  { font-size: 12px; color: var(--muted); margin-top: 3px; }
.verdict { margin-top: 14px; padding: 12px 16px; background: var(--primary-tint);
  border-left: 4px solid var(--brand); border-radius: 8px; font-size: 13.5px; }
.report .src { margin: 10px 0 0; font-size: 13px; }
.report-foot { margin-top: 24px; border-top: 2px solid var(--brand); padding-top: 12px;
  color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.report-foot b { color: var(--brand); }

/* ═══ mobile ════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .conv-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  main { padding: 0 14px; margin-top: 18px; }
  .topbar-inner { padding: 0 14px; }
  .brand .sub { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .card { padding: 16px; border-radius: 12px; }
  .page-head h1 { font-size: 20px; }
  .toolbar { gap: 6px; }
  .toolbar .search { min-width: 100%; }
  .reassurance { flex-wrap: wrap; }
  .ra-item { min-width: 50%; border-bottom: 1px solid var(--border); }
  .step-wizard .sw-label { display: none; }
  .sw-circle { width: 28px; height: 28px; font-size: 11px; }
  .deg-toggle label { padding: 10px 12px; font-size: 13px; }
  #slbar { left: 14px; right: 14px; transform: none; bottom: 16px;
    border-radius: 16px; flex-wrap: wrap; justify-content: space-between; }
  #slbar input { width: 100%; order: 3; border-radius: 8px; }
  .filter-toggles { gap: 6px; }
  .toggle-pill { font-size: 12px; padding: 5px 10px; }
  thead th { position: static; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }   /* on very small: only show user menu */
  .brand img.logo-img { height: 30px; }
}

/* ═══ print ══════════════════════════════════════════════════════════════════ */
@media print {
  @page { margin: 0; }
  .topbar, .no-print, #slbar, footer, .toolbar-card { display: none !important; }
  body { background: #fff; }
  main { margin: 0; max-width: none; padding: 14mm 14mm 16mm; }
  .card { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
  a { color: #000; }
  .page-head h1 { -webkit-text-fill-color: var(--brand); background: none; color: var(--brand); }
  .course-head, .verdict, .eval li, .conv-grid, .report .who, .report .lh { break-inside: avoid; }
  .report, .report .lh img, .pill-elig, .chip, .verdict, .report .who, .conv-grid .cell {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}

footer {
  margin-top: 48px; padding: 20px 24px;
  background: var(--g-nav);
  text-align: center; color: rgba(255,255,255,.45); font-size: 12px;
  letter-spacing: .02em;
}
