/* ================================================================
   SIMKES KAI — Shared Layout CSS
   Header + Sidebar + Layout + Scrollbar
   Digunakan oleh semua halaman inner (relative path: ../shared/simkes.css)
   ================================================================ */

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* === CSS VARIABLES === */
:root {
  --bg: #F0F4F8;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --text: #1E293B;
  --muted: #64748B;
  --kai-navy: #1E3A5F;
  --kai-red: #DC2626;
  --blue: #0EA5E9;
  --hijau: #16A34A;
  --kuning: #D97706;
  --merah: #DC2626;
  --kritis: #7C3AED;
  --bg-hijau: #F0FDF4;
  --bg-kuning: #FFFBEB;
  --bg-merah: #FEF2F2;
  --bg-kritis: #F5F3FF;
  --navy: #1E3A5F;
  --red: #DC2626;
}

/* === BASE === */
html, body { height: 100%; }

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* ================================================================
   HEADER — Navy dark bar (52px)
   ================================================================ */
.hdr {
  height: 52px;
  background: var(--kai-navy);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 1rem;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hdr-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.hdr-logo-box {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.hdr-logo-text {
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.hdr-logo-text span { color: var(--blue); }

.hdr-sep {
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.hdr-breadcrumb {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}

.hdr-breadcrumb span {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}

.hdr-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(22,163,74,0.2);
  border: 1px solid rgba(22,163,74,0.45);
  color: #4ade80;
  padding: 0.2rem 0.625rem;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: blink 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

.live-hint {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}

.hdr-right {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-shrink: 0;
}

.hdr-date {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
}

.hdr-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hdr-bell {
  position: relative;
  cursor: pointer;
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}

.hdr-bell:hover { color: #fff; }

.hdr-bell-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  background: var(--kai-red);
  border-radius: 100px;
  font-size: 0.55rem;
  color: #fff;
  font-weight: 700;
  padding: 0.05rem 0.28rem;
  min-width: 15px;
  text-align: center;
  border: 1.5px solid var(--kai-navy);
}

.hdr-avatar {
  width: 30px;
  height: 30px;
  background: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.68rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* ================================================================
   LAYOUT WRAPPER
   ================================================================ */
.layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ================================================================
   SIDEBAR — 252px, consistent structure
   ================================================================ */
.sidebar {
  width: 252px;
  background: var(--card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-inner {
  flex: 1;
  padding: 0.875rem 0.75rem;
}

.sidebar-section-label {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  padding: 0.75rem 0.625rem 0.375rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item:hover {
  background: var(--bg);
  color: var(--kai-navy);
}

.nav-item.active {
  background: var(--kai-navy);
  color: #fff;
  font-weight: 600;
}

.nav-item i {
  width: 16px;
  text-align: center;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  line-height: 1.6;
  flex-shrink: 0;
}

.nav-badge.kuning { background: var(--bg-kuning); color: var(--kuning); }
.nav-badge.merah  { background: var(--bg-merah);  color: var(--merah); }
.nav-badge.blue   { background: rgba(14,165,233,0.15); color: #0369A1; }

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 0.75rem 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.sb-fp-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--kai-navy), var(--blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.sb-fp-info { flex: 1; min-width: 0; }

.sb-fp-name {
  font-weight: 600;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.sb-fp-role { font-size: 0.625rem; color: var(--muted); margin-top: 1px; }

.sb-fp-logout {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.875rem;
  transition: color 0.12s;
  flex-shrink: 0;
}

.sb-fp-logout:hover { color: var(--merah); }

/* ================================================================
   MAIN CONTENT AREA
   ================================================================ */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

/* ================================================================
   SCROLLBAR
   ================================================================ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 2px; }
