/* ============================================
   WORKBOOK — Shared / Global CSS (v2)
   Importaj ovo na svim stranicama osim index.html
   ============================================ */

:root {
  --cream:        #faf8f4;
  --cream-dark:   #f0ebe3;
  --cream-border: #e5dfd6;
  --ink:          #1a1814;
  --ink-mid:      #3d3830;
  --ink-soft:     #7a7265;
  --ink-muted:    #b0a89c;
  --amber:        #e8880a;
  --amber-light:  #fff3e0;
  --amber-dark:   #c4720a;
  --green:        #1a7a5e;
  --green-light:  #e8f4f0;
  --red:          #c0392b;
  --red-light:    #fdecea;
  --blue:         #2563eb;
  --blue-light:   #eff6ff;
  --border:       #e5dfd6;
  --white:        #ffffff;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(26,24,20,0.06);
  --shadow-md: 0 8px 32px rgba(26,24,20,0.10);
  --shadow-lg: 0 24px 64px rgba(26,24,20,0.14);
  --max-w:     1160px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ── TOPNAV (inner pages) ─────────────────── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,248,244,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  height: 62px;
  display: flex;
  align-items: center;
}

.topnav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.topnav__logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 16px;
}

.logo-icon {
  width: 32px; height: 32px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
}

.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}

.topnav__search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.topnav__search input {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 14px 9px 38px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.topnav__search input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(232,136,10,0.12);
}

.topnav__search input::placeholder { color: var(--ink-muted); }

.topnav__search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  font-size: 15px;
  pointer-events: none;
}

.topnav__spacer { flex: 1; }

.topnav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topnav__links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius);
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}

.topnav__links a:hover { background: var(--cream-dark); color: var(--ink); }
.topnav__links a.active { color: var(--amber); background: var(--amber-light); }

.topnav__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.topnav__avatar {
  width: 34px; height: 34px;
  background: var(--cream-dark);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.2s;
}

.topnav__avatar:hover { border-color: var(--amber); }

/* ── BUTTONS ──────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; border: none; cursor: pointer; font-family: var(--font-body); font-weight: 600; border-radius: var(--radius); transition: all 0.18s; white-space: nowrap; }

.btn-sm  { padding: 7px 14px; font-size: 13px; }
.btn-md  { padding: 10px 20px; font-size: 14px; }
.btn-lg  { padding: 13px 26px; font-size: 15px; border-radius: 12px; }

.btn-primary { background: var(--amber); color: #fff; box-shadow: 0 2px 10px rgba(232,136,10,0.28); }
.btn-primary:hover { background: var(--amber-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(232,136,10,0.35); }

.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: var(--ink-mid); transform: translateY(-1px); }

.btn-ghost { background: none; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--cream-dark); color: var(--ink); }

.btn-outline { background: none; border: 1.5px solid var(--border); color: var(--ink-mid); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); background: var(--cream-dark); }

.btn-outline-amber { background: none; border: 1.5px solid var(--amber); color: var(--amber); }
.btn-outline-amber:hover { background: var(--amber); color: #fff; }

.btn-danger { background: var(--red-light); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }

/* ── FORM ELEMENTS ────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-mid);
}

.form-input, .form-select, .form-textarea {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(232,136,10,0.12);
}

.form-input::placeholder, .form-textarea::placeholder { color: var(--ink-muted); }
.form-textarea { resize: vertical; min-height: 100px; }

/* ── BADGE / TAG ──────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}

.tag-amber  { background: var(--amber-light); color: var(--amber-dark); }
.tag-green  { background: var(--green-light); color: var(--green); }
.tag-ink    { background: var(--cream-dark); color: var(--ink-soft); }
.tag-blue   { background: var(--blue-light); color: var(--blue); }

/* ── CARD ─────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ── STARS ────────────────────────────────── */
.stars { color: var(--amber); letter-spacing: 1px; }

/* ── AVATAR ───────────────────────────────── */
.avatar {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: var(--font-body);
  flex-shrink: 0; overflow: hidden; background: var(--cream-dark);
}
.avatar-sm  { width: 32px; height: 32px; font-size: 12px; }
.avatar-md  { width: 44px; height: 44px; font-size: 15px; }
.avatar-lg  { width: 64px; height: 64px; font-size: 22px; }
.avatar-xl  { width: 88px; height: 88px; font-size: 28px; border-radius: var(--radius-lg); }

/* ── DIVIDER ──────────────────────────────── */
.divider { height: 1px; background: var(--border); width: 100%; }

/* ── SCROLL REVEAL ────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── UTILS ────────────────────────────────── */
.text-muted  { color: var(--ink-muted); }
.text-soft   { color: var(--ink-soft); }
.text-amber  { color: var(--amber); }
.text-green  { color: var(--green); }
.text-mono   { font-family: var(--font-mono); }
.fw-bold     { font-weight: 700; }
.fw-med      { font-weight: 500; }
.mt-auto     { margin-top: auto; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.gap-16      { gap: 16px; }
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── MOBILE NAV ────────────────────────────── */
@media (max-width: 768px) {
  .topnav__search { display: none; }
  .topnav__links  { display: none; }
}
