:root {
  --fc-ink: #1c2b24;
  --fc-muted: #5c6b63;
  --fc-surface: #f4f7f4;
  --fc-panel: #ffffff;
  --fc-forest: #1f6b4a;
  --fc-forest-deep: #154d36;
  --fc-moss: #3d8b6e;
  --fc-amber: #c47a1a;
  --fc-sky: #2a6f8f;
  --fc-danger: #b33a3a;
  --fc-ok: #2f8f5b;
  --fc-shadow: 0 12px 30px rgba(28, 43, 36, 0.12);
  --fc-radius: 1rem;
}

html {
  font-size: 16px;
}

body {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--fc-ink);
  background:
    radial-gradient(circle at top left, rgba(61, 139, 110, 0.18), transparent 40%),
    radial-gradient(circle at top right, rgba(196, 122, 26, 0.12), transparent 35%),
    linear-gradient(180deg, #eef4ef 0%, var(--fc-surface) 45%, #e8efe9 100%);
  min-height: 100vh;
}

.brand-mark {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.navbar-fc {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(28, 43, 36, 0.08);
}

.navbar-fc .nav-link {
  color: var(--fc-ink);
  font-weight: 600;
}

.navbar-fc .nav-link:hover,
.navbar-fc .nav-link:focus {
  color: var(--fc-forest);
}

.page-shell {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.page-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.page-subtitle {
  color: var(--fc-muted);
  margin-bottom: 1.5rem;
}

.action-tile {
  display: block;
  width: 100%;
  min-height: 180px;
  border: 0;
  border-radius: var(--fc-radius);
  box-shadow: var(--fc-shadow);
  color: #fff;
  text-align: left;
  padding: 1.35rem 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.action-tile:hover,
.action-tile:focus {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(28, 43, 36, 0.18);
  color: #fff;
}

.action-tile h2,
.action-tile h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
}

.action-tile .tile-value {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
}

.tile-teal { background: linear-gradient(145deg, var(--fc-moss), var(--fc-forest-deep)); }
.tile-blue { background: linear-gradient(145deg, #3d8aa8, var(--fc-sky)); }
.tile-orange { background: linear-gradient(145deg, #d9922b, #a86212); }
.tile-green { background: linear-gradient(145deg, #45a56f, var(--fc-ok)); }
.tile-red { background: linear-gradient(145deg, #d15a5a, var(--fc-danger)); }
.tile-slate { background: linear-gradient(145deg, #3a4a55, #24313a); }

.panel-surface {
  background: var(--fc-panel);
  border: 1px solid rgba(28, 43, 36, 0.08);
  border-radius: var(--fc-radius);
  box-shadow: var(--fc-shadow);
  padding: 1.5rem;
}

.page-shell-auth {
  padding-bottom: 0.5rem;
}

.auth-page {
  max-width: 980px;
  margin: 0 auto;
}

.auth-hero {
  min-height: 0;
  display: flex;
  align-items: stretch;
  padding-bottom: 0.5rem;
}

.auth-hero .row {
  width: 100%;
}

.auth-compass {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 280px;
}

.auth-compass img {
  width: min(100%, 320px);
  max-width: 320px;
  height: auto;
  filter: drop-shadow(0 14px 28px rgba(28, 43, 36, 0.18));
}

.auth-mountains {
  position: relative;
  overflow: hidden;
  margin-top: -0.5rem;
  max-height: 280px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 18%, rgba(0, 0, 0, 0.85) 55%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 18%, rgba(0, 0, 0, 0.85) 55%, #000 100%);
}

.auth-mountains img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.9;
}

.auth-copy {
  padding: 0.5rem 0 0.25rem;
  text-align: left;
}

.btn-forest {
  --bs-btn-bg: var(--fc-forest);
  --bs-btn-border-color: var(--fc-forest);
  --bs-btn-hover-bg: var(--fc-forest-deep);
  --bs-btn-hover-border-color: var(--fc-forest-deep);
  --bs-btn-active-bg: var(--fc-forest-deep);
  --bs-btn-active-border-color: var(--fc-forest-deep);
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.stat-chip-ok {
  background: #ffffff;
  color: #1b7a45;
  border-color: rgba(255, 255, 255, 0.55);
}

.stat-chip-nok {
  background: #ffffff;
  color: #a32828;
  border-color: rgba(255, 255, 255, 0.55);
}

.flip-container {
  perspective: 1000px;
  width: 100%;
  max-width: 340px;
  height: 440px;
  margin: 0 auto;
}

.flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.flip-container:hover .flipper {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--fc-radius);
  border: 2px solid #5a626a;
  color: var(--fc-ink);
  box-shadow: var(--fc-shadow);
  padding: 1.25rem;
  overflow: auto;
}

/* Pitanje: tamnija siva — fokus na pitanje */
.flip-face.front {
  background: #9aa3ac;
  color: #1a1f24;
  z-index: 2;
  transform: rotateY(0deg);
}

/* Odgovor: svjetlija pastelna siva */
.flip-face.back {
  background: #e6e9ed;
  color: #1a1f24;
  border-color: #6c757d;
  transform: rotateY(180deg);
}

.exam-choice {
  min-height: 140px;
  border: 0;
  border-radius: var(--fc-radius);
  color: #fff;
  box-shadow: var(--fc-shadow);
  transition: transform 0.15s ease;
}

.exam-choice:hover {
  transform: translateY(-3px);
  color: #fff;
}

.site-footer {
  color: var(--fc-muted);
  font-size: 0.95rem;
}

#dtQuestions_wrapper .dataTables_filter input,
#dtQuestions_wrapper .dataTables_length select {
  border-radius: 0.5rem;
  border: 1px solid rgba(28, 43, 36, 0.15);
  padding: 0.35rem 0.6rem;
}
