/* ============================================================
   Πρόοδος — Online Testing Platform
   Design tokens & shared styles
   Academic / minimal / blue. IBM Plex family.
   ============================================================ */

:root {
  /* Surfaces & ink */
  --bg:           oklch(0.985 0.004 255);
  --surface:      #ffffff;
  --surface-2:    oklch(0.975 0.005 255);
  --surface-3:    oklch(0.955 0.006 255);
  --ink:          oklch(0.255 0.018 258);
  --ink-2:        oklch(0.44 0.022 258);
  --muted:        oklch(0.60 0.016 258);
  --faint:        oklch(0.72 0.012 258);
  --line:         oklch(0.915 0.006 258);
  --line-strong:  oklch(0.855 0.009 258);

  /* Brand blue */
  --primary:      oklch(0.475 0.132 258);
  --primary-hover:oklch(0.415 0.135 258);
  --primary-ink:  #ffffff;
  --primary-soft: oklch(0.955 0.028 258);
  --primary-soft-2: oklch(0.915 0.045 258);
  --primary-line: oklch(0.82 0.07 258);

  /* Status */
  --success:      oklch(0.55 0.115 152);
  --success-soft: oklch(0.955 0.04 152);
  --success-line: oklch(0.82 0.07 152);
  --danger:       oklch(0.545 0.17 27);
  --danger-soft:  oklch(0.965 0.025 27);
  --danger-line:  oklch(0.84 0.09 27);
  --warning:      oklch(0.70 0.12 72);
  --warning-soft: oklch(0.965 0.04 72);
  --gold:         oklch(0.72 0.115 85);

  /* Radii */
  --r-sm: 6px;
  --r:    9px;
  --r-md: 13px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Shadow — very restrained */
  --sh-1: 0 1px 2px oklch(0.4 0.03 258 / 0.05), 0 1px 1px oklch(0.4 0.03 258 / 0.04);
  --sh-2: 0 2px 8px oklch(0.4 0.03 258 / 0.06), 0 1px 2px oklch(0.4 0.03 258 / 0.05);
  --sh-3: 0 12px 32px oklch(0.35 0.04 258 / 0.10), 0 2px 8px oklch(0.35 0.04 258 / 0.06);
  --sh-pop: 0 24px 60px oklch(0.3 0.05 258 / 0.18), 0 4px 12px oklch(0.3 0.05 258 / 0.08);

  /* Type */
  --serif: "IBM Plex Serif", Georgia, serif;
  --sans:  "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.5;
}

#root { height: 100%; }

::selection { background: var(--primary-soft-2); }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }

button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

a { color: inherit; text-decoration: none; }

/* Scrollbars */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--faint); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Utility ---------- */
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.serif { font-family: var(--serif); }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r);
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
  user-select: none;
}
.btn:active { transform: translateY(0.5px); }
.btn svg { flex: none; }

.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink-2);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--faint); color: var(--ink); }

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: transparent;
}
.btn-soft:hover { background: var(--primary-soft-2); }

.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); }

.btn-danger-quiet {
  background: transparent; border-color: transparent; color: var(--muted);
}
.btn-danger-quiet:hover { background: var(--danger-soft); color: var(--danger); }

.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: var(--r-md); }
.btn-sm { padding: 6px 11px; font-size: 13px; gap: 6px; }
.btn-icon { padding: 8px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

/* ---------- Badge / pill ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  background: var(--surface-2);
  white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.badge.b-blue   { color: var(--primary); background: var(--primary-soft); border-color: transparent; }
.badge.b-green  { color: var(--success); background: var(--success-soft); border-color: transparent; }
.badge.b-red    { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.badge.b-amber  { color: oklch(0.5 0.12 72); background: var(--warning-soft); border-color: transparent; }
.badge.b-gray   { color: var(--muted); background: var(--surface-3); border-color: transparent; }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.input, .textarea, .select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--primary-line);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.textarea { resize: vertical; min-height: 80px; line-height: 1.55; }

/* ---------- Misc ---------- */
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { animation: fade-in .35s ease; }
@keyframes fade-in { from { transform: translateY(7px); } to { transform: none; } }
.pop-in { animation: pop-in .3s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pop-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* progress bar */
.bar { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .5s cubic-bezier(.2,.8,.2,1); }

/* image / media placeholder */
.placeholder {
  background-color: var(--surface-2);
  background-image: repeating-linear-gradient(
    -45deg,
    var(--line) 0, var(--line) 1px,
    transparent 1px, transparent 11px
  );
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: center;
}
