:root {
  --bg: #f6f4ee;
  --card-bg: #fbfaf6;
  --border: #e4e0d6;
  --border-strong: #d9d4c7;
  --ink: #2c2a25;
  --ink-soft: #5a5750;
  --ink-faint: #9c9788;
  --accent: #2c4a3e;
  --accent-bg: #eef4ef;
  --nizak: #3f7d5c;      --nizak-bg: #eef4ef;
  --umjeren: #a58324;    --umjeren-bg: #f8f2e3;
  --povisen: #c1622b;    --povisen-bg: #faece2;
  --visok: #a13a3a;      --visok-bg: #f6e6e6;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
}
h1, h2 { font-family: Georgia, 'Times New Roman', serif; margin: 0 0 10px; color: #232019; }
h1 { font-size: 1.6rem; font-weight: 600; }
h2 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; margin: 6px 0 20px; }
p { line-height: 1.6; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border); background: var(--card-bg);
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #3d4a3f; letter-spacing: .02em; }
.switch { display: flex; background: #f0ede3; border-radius: 8px; padding: 3px; gap: 2px; }
.switch button {
  border: none; background: transparent; padding: 6px 12px; border-radius: 6px;
  font-size: 13px; color: #7a7669; cursor: pointer;
}
.switch button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

.content { display: flex; justify-content: center; padding: 40px 16px 80px; }
.card {
  width: 100%; max-width: 560px; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 36px 32px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.icon-circle {
  width: 44px; height: 44px; border-radius: 12px; background: var(--accent-bg);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px; font-size: 20px;
}
.lead { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 24px; }
.field { margin-bottom: 16px; }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
input, select {
  width: 100%; padding: 11px 14px; border-radius: 9px; border: 1px solid var(--border-strong);
  font-size: 14.5px; background: #fff; color: var(--ink); font-family: inherit;
}
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center; width: 100%;
  padding: 12px 20px; border-radius: 9px; border: none; background: var(--accent); color: #fff;
  font-size: 14.5px; font-weight: 600; cursor: pointer; margin-top: 6px; font-family: inherit;
  text-decoration: none;
}
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: #fff; color: var(--ink); font-size: 13.5px;
  font-weight: 600; cursor: pointer; font-family: inherit;
}
.error-text { font-size: 13px; color: var(--visok); margin-bottom: 12px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: none;
  color: var(--ink-faint); font-size: 13px; cursor: pointer; padding: 0; margin-bottom: 18px; font-family: inherit;
}
.info-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.progress-track { height: 4px; background: #eeebe0; border-radius: 2px; margin-bottom: 22px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s ease; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #8a8570; text-transform: uppercase; margin-bottom: 6px; }
.q-counter { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 10px; }
.options-list { display: flex; flex-direction: column; gap: 10px; }
.option-btn {
  display: flex; align-items: flex-start; gap: 12px; text-align: left; width: 100%;
  padding: 13px 16px; border-radius: 10px; border: 1px solid var(--border); background: #fff;
  font-size: 14px; line-height: 1.5; color: #3a3730; cursor: pointer; font-family: inherit;
}
.option-btn.selected { border-color: var(--accent); background: var(--accent-bg); color: #1f3a2e; }
.option-dot { margin-top: 4px; min-width: 8px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #c7c2b3; }
.option-btn.selected .option-dot { background: var(--accent); border-color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  font-size: .8rem; font-weight: 600;
}
.badge.lg { padding: 8px 18px; font-size: 1rem; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge.Nizak { color: var(--nizak); background: var(--nizak-bg); }
.badge.Nizak .dot { background: var(--nizak); }
.badge.Umjeren { color: var(--umjeren); background: var(--umjeren-bg); }
.badge.Umjeren .dot { background: var(--umjeren); }
.badge.Povišen { color: var(--povisen); background: var(--povisen-bg); }
.badge.Povišen .dot { background: var(--povisen); }
.badge.Visok { color: var(--visok); background: var(--visok-bg); }
.badge.Visok .dot { background: var(--visok); }

.result-box { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.result-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; gap: 12px; }
.result-label { color: var(--ink-faint); }
.footnote { font-size: 12.5px; color: var(--ink-faint); text-align: center; margin-top: 12px; }

.admin-wrap { width: 100%; max-width: 920px; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.stat-row { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-card { flex: 1 1 140px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.stat-num { font-family: Georgia, serif; font-size: 1.8rem; font-weight: 600; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 60px 20px; color: var(--ink-faint); font-size: 14px; background: var(--card-bg); border: 1px dashed var(--border-strong); border-radius: 12px; }
.table-wrap { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; padding: 12px 16px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: #8a8570; text-transform: uppercase; border-bottom: 1px solid var(--border); white-space: nowrap; }
tr.data-row { border-bottom: 1px solid #eeebe0; cursor: pointer; }
tr.data-row:hover { background: #f3f1e9; }
td { padding: 12px 16px; color: #3a3730; white-space: nowrap; }

.modal-overlay { position: fixed; inset: 0; background: rgba(30,28,22,.4); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal { background: var(--card-bg); border-radius: 16px; padding: 28px; max-width: 560px; width: 100%; max-height: 85vh; overflow-y: auto; border: 1px solid var(--border); }
.answer-list { display: flex; flex-direction: column; gap: 12px; }
.answer-item { background: #fff; border: 1px solid #eeebe0; border-radius: 8px; padding: 10px 12px; }
.answer-q { font-size: 12.5px; color: #8a8570; margin-bottom: 4px; }
.answer-a { font-size: 13.5px; color: var(--ink); }
.hidden { display: none !important; }
