/* MIC MVP (PHP + MySQL) — dark, tactical, structured */
:root {
  --bg0: #0f1115;
  --bg1: #2b2e34;
  --panel: rgba(255,255,255,0.04);
  --panel2: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.10);
  --text: #e6e8eb;
  --muted: rgba(230,232,235,0.72);
  --muted2: rgba(230,232,235,0.55);
  --red: #b1121a;
  --steel: #6c7078;
  --ok: #2fbf71;
  --warn: #d9a441;
  --bad: #d85858;
  --radius: 10px;
  --radius2: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --max: 1120px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg0);
  line-height: 1.55;
}
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 800px at 20% 0%, rgba(177,18,26,0.14), transparent 50%),
    radial-gradient(1000px 700px at 90% 10%, rgba(108,112,120,0.14), transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 18px; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(15,17,21,0.72);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand .mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(177,18,26,0.95), rgba(177,18,26,0.25));
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 8px 20px rgba(177,18,26,0.18);
}
.brand small {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  line-height: 1.6;       /* KLJUČNO */
  color: var(--muted2);
}
.navlinks { display:flex; gap:14px; align-items:center; }
.navlinks a {
  padding: 8px 10px; border-radius: 10px;
  color: var(--muted);
  border: 1px solid transparent;
}
/* tighter nav on desktop */
.navlinks { gap: 14px; }
.navlinks a { padding: 10px 12px; font-size: 15px; }

.navlinks a.active {
  color: var(--text);
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
}
.navlinks a:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  text-decoration: none;
}
.navbtn {
  display:none;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  color: var(--text);
}
@media (max-width: 860px) {
  .navlinks { display:none; }
  .navbtn { display:inline-flex; }
  .navlinks.open {
    display:flex; position:absolute; left: 18px; right:18px; top: 62px;
    flex-direction: column; gap: 6px;
    padding: 10px;
    background: rgba(15,17,21,0.92);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }
  .navlinks.open a { width: 100%; }
}
.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
}
.card .pad { padding: 18px; }
.panel {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius2);
}
.panel .pad { padding: 16px; }
.kicker {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--muted2);
}
h1 {
  margin: 10px 0 8px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h2 { margin: 0 0 10px; font-size: 20px; letter-spacing: -0.01em; }
.lead { color: var(--muted); font-size: 16px; margin: 0 0 14px; }
.section { padding: 18px 0 54px; }
.grid { display:grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.badges { display:flex; flex-wrap:wrap; gap: 8px; margin-top: 10px; }
.badge {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}
.badge.red { border-color: rgba(177,18,26,0.45); background: rgba(177,18,26,0.10); color: rgba(230,232,235,0.9); }
.actions { display:flex; gap: 10px; flex-wrap:wrap; margin-top: 14px; }
.btn {
  display:inline-flex; align-items:center; justify-content:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}
.btn:hover { text-decoration:none; background: rgba(255,255,255,0.07); }
.btn.primary { border-color: rgba(177,18,26,0.55); background: rgba(177,18,26,0.14); }
.btn.primary:hover { background: rgba(177,18,26,0.18); }
.btn.ghost { background: transparent; }
.btn.small { padding: 8px 10px; border-radius: 10px; font-weight: 600; }
hr.sep { border: 0; height: 1px; background: rgba(255,255,255,0.10); margin: 14px 0; }
.meta { color: var(--muted2); font-family: var(--mono); font-size: 12px; }
.small { font-size: 13px; color: var(--muted); }
.list { display:grid; gap: 10px; }
.item {
  display:flex; justify-content: space-between; gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}
.item strong { display:block; }
.item .right { text-align:right; min-width: 160px; }
.pill {
  display:inline-flex; align-items:center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}
.pill.ok { border-color: rgba(47,191,113,0.35); background: rgba(47,191,113,0.10); color: rgba(230,232,235,0.9); }
.pill.warn { border-color: rgba(217,164,65,0.35); background: rgba(217,164,65,0.10); color: rgba(230,232,235,0.9); }
.pill.bad { border-color: rgba(216,88,88,0.35); background: rgba(216,88,88,0.10); color: rgba(230,232,235,0.9); }
.pill.spot { border-color: rgba(177,18,26,0.45); background: rgba(177,18,26,0.10); color: rgba(230,232,235,0.9); }
.field { display:flex; flex-direction:column; gap: 6px; }
input, select, textarea {
  width:100%; padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(177,18,26,0.55);
  box-shadow: 0 0 0 4px rgba(177,18,26,0.12);
}
label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted2);
}
.notice {
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(177,18,26,0.35);
  background: rgba(177,18,26,0.08);
  color: rgba(230,232,235,0.92);
}
.table {
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
}
.table th, .table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align:left;
  vertical-align: top;
}
.table th {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--muted2);
  background: rgba(255,255,255,0.03);
}
.flash {
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
}
.flash.ok { border-color: rgba(47,191,113,0.35); background: rgba(47,191,113,0.10); }
.flash.bad { border-color: rgba(216,88,88,0.35); background: rgba(216,88,88,0.10); }

.footer {
  border-top: 1px solid rgba(255,255,255,0.10);
  background: rgba(15,17,21,0.78);
  padding: 26px 0;
}
.footer .cols {
  display:grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
}
@media (max-width: 860px) {
  .footer .cols { grid-template-columns: 1fr; }
}

/* --- layout helpers --- */
.container.narrow { max-width: 980px; }
.container.slim { max-width: 820px; }

/* make cards/panels behave nicely when nested */
.section > .card,
.section > .panel {
  margin-left: auto;
  margin-right: auto;
  max-width: var(--max);
}

/* Prevent tables from forcing weird full-width overflow */
.table { display: block; overflow-x: auto; }

/* Long text/urls should never break layout */
.meta, .small, .item, .panel, .card, td, th, a, .field, .list, .pad {
  min-width: 0;
}

a, .meta, .small, .pill, .badge, td, .item {
  overflow-wrap: anywhere;   /* modern */
  word-break: break-word;    /* fallback */
}

/* =========================
   NAV CLEAN BLOCK (single source of truth)
   ========================= */

.topbar{
  position: sticky;
  top: 0;
  z-index: 9999;
  overflow: visible;
}

.topbar .container{ position: relative; }

.nav{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
}

.brand{ flex: 0 0 auto; min-width: 0; }
.brand small{
  display:block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* desktop */
.navbtn{ display:none; }

.navlinks{
  display:flex;
  align-items:center;
  gap: 14px;
  white-space: nowrap;
}

.navlinks a{
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  border: 1px solid transparent;
}

.navlinks a:hover{
  color: var(--text);
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  text-decoration:none;
}

/* dropdown */
.navdrop{ position: relative; display:inline-flex; }

.navdrop-btn{
  appearance:none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.navdrop-btn:hover{
  color: var(--text);
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
}

.navdrop.open .navdrop-btn{
  color: var(--text);
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
}

.navdrop-menu{
  display:none;
  position:absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(15,17,21,0.95);
  box-shadow: var(--shadow);
  z-index: 20000;
}

.navdrop.open .navdrop-menu{ display:block; }

.navdrop-menu a{
  display:block;
  padding: 10px 12px;
  border-radius: 10px;
}

.navdrop-menu a:hover{
  background: rgba(255,255,255,0.05);
  text-decoration:none;
  color: var(--text);
}

/* mobile */
@media (max-width: 860px){
  .navbtn{
    display:inline-flex;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    color: var(--text);
  }

  .navlinks{ display:none; }

  .navlinks.open{
    display:flex !important;
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    top: calc(64px + env(safe-area-inset-top)) !important;
    bottom: 12px !important;

    flex-direction: column !important;
    gap: 6px !important;

    padding: 12px !important;
    border-radius: 14px !important;

    background: rgba(15,17,21,0.96) !important;
    border: 1px solid rgba(255,255,255,0.14) !important;
    box-shadow: var(--shadow) !important;

    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    z-index: 30000 !important;
  }

  .navlinks.open a,
  .navlinks.open button{
    width: 100% !important;
    justify-content: flex-start !important;
  }

  /* dropdown inline on mobile */
  .navdrop{ width: 100%; display:block; }
  .navdrop-btn{
    width: 100%;
    justify-content: space-between;
  }

  .navdrop-menu{
    position: static !important;
    margin-top: 6px;
    padding: 6px;
    min-width: 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: none;
  }
}

/* iPhone scrollbar nice */
@media (max-width: 860px){
  .navlinks.open::-webkit-scrollbar{ width: 6px; }
  .navlinks.open::-webkit-scrollbar-track{ background: transparent; }
  .navlinks.open::-webkit-scrollbar-thumb{
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
  }
}

/* utility */
.hidden{ display:none !important; }

/* desktop nav container */
.navlinks-desktop{
  display:flex;
  align-items:center;
  gap:14px;
  white-space: nowrap;
}

/* hide desktop nav on mobile */
@media (max-width: 860px){
  .navlinks-desktop{ display:none; }
  .navbtn{ display:inline-flex; }
}

/* DESKTOP engagements dropdown */
.navdrop{ position: relative; display:inline-flex; }
.navdrop-btn{
  appearance:none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.navdrop-btn:hover{
  color: var(--text);
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  text-decoration:none;
}
.navdrop-menu{
  display:none;
  position:absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(15,17,21,0.95);
  box-shadow: var(--shadow);
  z-index: 20000;
}
.navdrop-menu.open{ display:block; }
.navdrop-menu a{
  display:block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
}
.navdrop-menu a:hover{
  background: rgba(255,255,255,0.05);
  color: var(--text);
  text-decoration:none;
}

/* MOBILE DRAWER */
.mobileNav{
  position: fixed;
  inset: 0;
  z-index: 50000;
}

.mobileNav__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.55);
}

.mobileNav__panel{
  position:absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  bottom: 12px;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(15,17,21,0.96);
  box-shadow: var(--shadow);

  padding: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobileNav__head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}

.mobileNav__section{
  display:grid;
  gap: 6px;
  margin-top: 10px;
}

.mobileNav__section a,
.mobileNav__accordion{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  text-decoration:none;
}

.mobileNav__section a:hover,
.mobileNav__accordion:hover{
  background: rgba(255,255,255,0.06);
}

.mobileNav__accordion{
  appearance:none;
  cursor:pointer;
  display:flex;
  justify-content: space-between;
  align-items:center;
}

.mobileNav__submenu{
  display:grid;
  gap: 6px;
  padding-left: 10px;
  margin-top: 6px;
}

.mobileNav__submenu a{
  border-color: rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.02);
}

/* =========================
   NAV: desktop styling + mobile drawer styling
   (add at the END of style.css)
   ========================= */

/* Desktop nav container */
.navlinks-desktop{
  display:flex;
  align-items:center;
  gap: 10px;
}

/* Desktop links look (same vibe as before) */
.navlinks-desktop a,
.navlinks-desktop .navdrop-btn{
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.navlinks-desktop a:hover,
.navlinks-desktop .navdrop-btn:hover{
  color: var(--text);
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  text-decoration: none;
}

/* Desktop dropdown menu */
.navdrop{ position: relative; }
.navdrop-menu{
  display:none;
  position:absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(15,17,21,0.95);
  box-shadow: var(--shadow);
  z-index: 99999;
}
.navdrop-menu.open{ display:block; }

.navdrop-menu a{
  display:block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.navdrop-menu a:hover{
  color: var(--text);
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  text-decoration: none;
}

/* Nav button stays like your style */
.navbtn{
  display:none;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  color: var(--text);
}

/* Mobile: hide desktop nav, show menu button */
@media (max-width: 860px){
  .navlinks-desktop{ display:none; }
  .navbtn{ display:inline-flex; }
}

/* Body scroll lock when drawer open */
body.nav-lock{ overflow: hidden; }

/* Mobile drawer */
.mobileNav.hidden{ display:none; }
.mobileNav{
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.mobileNav__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
}

.mobileNav__panel{
  position:absolute;
  right: 12px;
  left: 12px;
  top: calc(64px + env(safe-area-inset-top));
  bottom: 12px;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(15,17,21,0.96);
  box-shadow: var(--shadow);

  display:flex;
  flex-direction: column;
  overflow: hidden;
}

.mobileNav__head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.mobileNav__section{
  padding: 10px 12px;
  display:flex;
  flex-direction: column;
  gap: 6px;
  overflow:auto;
}

.mobileNav__section a,
.mobileNav__accordion{
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  text-decoration: none;
  text-align: left;
}

.mobileNav__section a:hover,
.mobileNav__accordion:hover{
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
}

.mobileNav__accordion{
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content: space-between;
}

.mobileNav__submenu.hidden{ display:none; }
.mobileNav__submenu{
  display:flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 10px;
}

/* nice scrollbar for iOS/Chrome */
.mobileNav__section::-webkit-scrollbar{ width: 6px; }
.mobileNav__section::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
}
