/* ============================================================
   Varna uporaba UI - tečaj v Kwizmo videzu
   Moderna SaaS estetika: indigo/violet naglasi, cisto belo ozadje,
   zaobljene kartice z mehko senco, velikodusen prostor.
   ============================================================ */
:root {
  --primary: #4f46e5;       /* indigo-600 */
  --primary-dark: #4338ca;  /* indigo-700 */
  --accent: #7c3aed;        /* violet-600 */
  --ink: #0f172a;           /* slate-900 */
  --ink-soft: #1e293b;      /* slate-800 */
  --muted: #64748b;         /* slate-500 */
  --border: #e2e8f0;        /* slate-200 */
  --bg: #f8fafc;            /* slate-50 */
  --card: #ffffff;
  --green: #059669;
  --green-bg: #ecfdf5;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --amber-bg: #fffbeb;
  --amber: #b45309;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15,23,42,0.04), 0 8px 24px -12px rgba(15,23,42,0.10);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink-soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.header .brand img.logo { height: 30px; display: block; }
.header .brand .product-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  border-left: 1px solid var(--border);
  padding-left: 10px;
  margin-left: 2px;
  line-height: 1.2;
  max-width: 160px;
}
.header nav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 18px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s;
}
.header nav a:hover { color: var(--primary); }

.container { max-width: 880px; margin: 0 auto; padding: 36px 20px 60px; }
.container.wide { max-width: 1180px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

h1 { font-size: 1.7rem; margin-top: 0; letter-spacing: -0.02em; color: var(--ink); font-weight: 700; }
h2 { font-size: 1.3rem; color: var(--ink); font-weight: 700; }
h3 { font-size: 1.05rem; color: var(--ink); font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--primary);
  background-image: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff !important;
  padding: 11px 22px;
  border-radius: 10px;
  border: none;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px -4px rgba(79,70,229,0.45);
  transition: filter 0.15s, transform 0.1s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn.secondary {
  background-image: none;
  background: #fff;
  color: var(--ink-soft) !important;
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn.secondary:hover { background: #f1f5f9; }
.btn.danger { background-image: none; background: var(--red); box-shadow: none; }
.btn:disabled { background-image: none; background: #cbd5e1; color: #fff !important; cursor: not-allowed; box-shadow: none; }

/* ---------- Forms ---------- */
form .field { margin-bottom: 15px; }
label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 0.86rem; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}

/* ---------- Progress ---------- */
.progress-bar-outer {
  background: #eef0f6;
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
  margin: 14px 0 20px;
}
.progress-bar-inner {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  height: 100%;
  border-radius: 20px;
}

/* ---------- Flash ---------- */
.flash { padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 0.9rem; border: 1px solid transparent; }
.flash.success { background: var(--green-bg); color: #065f46; border-color: #a7f3d0; }
.flash.error { background: var(--red-bg); color: #991b1b; border-color: #fecaca; }
.flash.info { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.flash a { color: inherit; font-weight: 700; }

/* ---------- Lessons ---------- */
.lesson-list { list-style: none; padding: 0; margin: 0; }
.lesson-list li {
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  transition: border-color 0.15s;
}
.lesson-list li.done { background: var(--green-bg); border-color: #a7f3d0; }
.badge { font-size: 0.74rem; padding: 3px 10px; border-radius: 20px; background: #eef0f6; color: var(--muted); font-weight: 600; }
.badge.done { background: #d1fae5; color: #065f46; }

.q-options label {
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 9px;
  font-weight: 400;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.q-options label:hover { border-color: var(--primary); background: #f5f4ff; }
.q-options input { margin-right: 9px; accent-color: var(--primary); }

.result-big { font-size: 3.2rem; font-weight: 800; margin: 6px 0; letter-spacing: -0.03em; }
.result-pass { color: var(--green); }
.result-fail { color: var(--red); }

table.data { width: 100%; border-collapse: collapse; font-size: 0.89rem; }
table.data th, table.data td { text-align: left; padding: 10px 11px; border-bottom: 1px solid var(--border); }
table.data th { background: #f8fafc; font-weight: 700; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
table.data tr:hover { background: #fafbff; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 10px; }
.stat-box { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; text-align: center; }
.stat-box .num { font-size: 1.8rem; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; }
.stat-box .label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

.timer-box { font-variant-numeric: tabular-nums; font-weight: 700; }
.muted { color: var(--muted); font-size: 0.89rem; }
.pill { display: inline-block; padding: 3px 11px; border-radius: 20px; font-size: 0.76rem; font-weight: 700; }
.pill.pass { background: var(--green-bg); color: #065f46; }
.pill.fail { background: var(--red-bg); color: #991b1b; }
.pill.pending { background: var(--amber-bg); color: var(--amber); }

.chart-card canvas { max-height: 320px; }
footer.footnote { text-align: center; color: var(--muted); font-size: 0.8rem; margin-top: 40px; padding-top: 20px; }
footer.footnote img { height: 16px; vertical-align: middle; opacity: 0.7; margin-left: 4px; }
code.joincode { background: #eef2ff; color: var(--primary-dark); padding: 4px 12px; border-radius: 8px; font-weight: 700; letter-spacing: 1px; }

/* ---------- Hero (landing page) ---------- */
.hero {
  background: linear-gradient(160deg, #ffffff 0%, #f5f4ff 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 46px 40px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.hero .eyebrow {
  display: inline-block;
  background: #eef2ff;
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.hero h1 { font-size: 2.1rem; max-width: 640px; }
.hero p.lead { font-size: 1.02rem; color: var(--muted); max-width: 620px; }
