/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'Inter', sans-serif; background: #f0f2f6; color: #1a1d2e; font-size: 14px; overflow: hidden; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: #d0d4e2; border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }
button { font-family: 'Inter', sans-serif; }
input, select { font-family: 'Inter', sans-serif; }

/* ─── SHELL ─── */
.app { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 54px 1fr; height: 100vh; overflow: hidden; }

/* ─── HEADER ─── */
header {
  background: #3a6bd0;
  display: flex; align-items: center; padding: 0 0 0 0;
  box-shadow: 0 2px 10px rgba(58,107,208,.45);
  z-index: 100; position: relative;
}
.h-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px; height: 100%;
  border-right: 1px solid rgba(255,255,255,.15);
  min-width: 180px;
}
.h-brand-ico {
  width: 32px; height: 32px; background: rgba(255,255,255,.22);
  border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.h-brand-txt { color: #fff; font-size: 15px; font-weight: 800; letter-spacing: -.2px; }

/* ─── SIDEBAR ─── */
.sidebar {
  grid-row: 1 / 3;
  width: 240px;
  background: #1a1d2e;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s ease-in-out;
  z-index: 200;
  position: relative;
}
.sidebar.collapsed { width: 70px; }
.sidebar.collapsed:hover { width: 240px; }
.sidebar.collapsed:hover .sn-label { opacity: 1; width: auto; overflow: visible; }
.sidebar.collapsed:hover .sidebar-brand-txt { opacity: 1; width: auto; overflow: visible; }
.sidebar.collapsed:hover .sn-item { padding: 11px 18px; justify-content: flex-start; border-left: 4px solid transparent; border-right: none !important; border-right-color: transparent !important; }
.sidebar.collapsed:hover .sn-item.on { border-left: 4px solid #3a6bd0 !important; border-right: none !important; }
.sidebar.collapsed:hover .sn-tooltip { display: none !important; }

.sidebar-header {
  height: 54px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
  gap: 10px;
}
.sidebar-brand-ico {
  width: 32px; height: 32px;
  background: #3a6bd0;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.sidebar-brand-txt {
  color: #fff; font-size: 14px; font-weight: 800;
  white-space: nowrap; overflow: hidden;
  transition: opacity 0.2s, width 0.3s;
}
.sidebar.collapsed .sidebar-brand-txt { opacity: 0; width: 0; }

.sidebar-toggle {
  margin-left: auto;
  background: none; border: none;
  color: rgba(255,255,255,.5);
  cursor: pointer; font-size: 16px;
  padding: 4px; border-radius: 6px;
  flex-shrink: 0;
  transition: color .15s;
}
.sidebar-toggle:hover { color: #fff; background: rgba(255,255,255,.08); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }

.sn-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  color: rgba(255,255,255,.6);
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
  border-left: 4px solid transparent;
  white-space: nowrap;
}
.sn-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.sn-item.on {
  background: rgba(58,107,208,.18);
  color: #fff;
  font-weight: 700;
  border-left: 4px solid #3a6bd0;
}
.sn-ico { font-size: 17px; flex-shrink: 0; width: 24px; text-align: center; }
.sn-label { overflow: hidden; transition: opacity 0.2s; }
.sidebar.collapsed .sn-label { opacity: 0; width: 0; overflow: hidden; }
.sidebar.collapsed .sn-item { padding: 11px 0; justify-content: center; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.sidebar.collapsed .sn-item.on { border-left: 4px solid transparent; border-right: 4px solid #3a6bd0; }

.sn-tooltip {
  position: absolute;
  left: 78px;
  top: 50%;
  transform: translateY(-50%);
  background: #2d3561;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  display: block;
}
.sidebar.collapsed .sn-item:hover .sn-tooltip {
  opacity: 1;
  visibility: visible;
}

.sn-spacer { flex: 1; min-height: 8px; }

/* Header slim (bez navigacije) */
header {
  grid-column: 2;
}

/* Main bez headera row */
.main {
  grid-column: 2;
}

/* Nav unutar headera — ovo su tab switcher za desni panel */
.h-nav { display: none; }
.hn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 7px; border: none; background: none;
  color: rgba(255,255,255,.7); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.hn:hover { color: #fff; background: rgba(255,255,255,.14); }
.hn.on { color: #3a6bd0; background: #fff; font-weight: 600; }
.hn-ico { font-size: 14px; }

.h-right { display: flex; align-items: center; gap: 10px; padding: 0 16px; margin-left: auto; }
.h-date { font-size: 12px; color: rgba(255,255,255,.65); white-space: nowrap; }
.h-novi {
  padding: 7px 16px; background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.35); border-radius: 8px;
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.h-novi:hover { background: rgba(255,255,255,.28); transform: translateY(-1px); }

/* ─── MAIN: 2 KOLONE ─── */
.main {
  display: grid;
  grid-template-columns: 1fr;
  height: calc(100vh - 54px);
  overflow: hidden;
}
