:root { 
  --bg: #0b0f19; 
  --card-bg: rgba(30, 41, 59, 0.75); 
  --card-border: rgba(255, 255, 255, 0.1); 
  --sidebar-bg: #060911; 
  --accent: #3b82f6; 
  --accent-hover: #2563eb; 
  --accent-danger: #ef4444; 
  --accent-success: #10b981; 
  --accent-warning: #f59e0b; 
  --text: #f8fafc; 
  --text-dim: #94a3b8; 
  --border: #1e293b; 
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
  font-family: 'Inter', system-ui, -apple-system, sans-serif; 
}

html, body {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
}

body { 
  background: var(--bg) !important; 
  color: var(--text); 
  display: flex; 
  flex-direction: column; 
  justify-content: flex-start; 
  align-items: stretch; 
  overflow: hidden; 
  scrollbar-width: thin; 
  scrollbar-color: #334155 #0f172a; 
  position: relative; 
}

.hidden { 
  display: none !important; 
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

.app-layout { 
  display: flex; 
  width: 100vw; 
  flex: 1; 
  min-height: 100dvh; 
  overflow: hidden; 
  position: relative; 
  z-index: 20; 
  background-color: var(--bg); 
}

.sidebar { 
  width: 270px; 
  background: #060911 !important; 
  border-right: 1px solid var(--border); 
  padding: 24px 0; 
  display: flex; 
  flex-direction: column; 
  flex-shrink: 0; 
  transition: transform 0.3s ease-in-out; 
  z-index: 1050; 
  height: 100vh; 
  height: 100dvh;
  overflow: hidden; 
  position: relative;
}

.sidebar-header { 
  padding: 8px 20px; 
  margin-bottom: 12px; 
  flex-shrink: 0; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}

.sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.sidebar-nav-scroll { 
  flex: 1; 
  overflow-y: auto; 
  overflow-x: hidden; 
  padding: 10px 20px 0 24px; 
}

.sidebar-section { margin-bottom: 18px; }

.nav-btn { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  width: 100%; 
  background: transparent; 
  color: var(--text-dim); 
  text-align: left; 
  padding: 12px 14px; 
  border-radius: 8px; 
  font-weight: 500; 
  margin-top: 6px; 
  line-height: 1; 
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s;
}

.nav-btn:hover, 
.nav-btn.active { 
  background: rgba(255,255,255,0.05); 
  color: var(--text); 
}

.nav-btn.active { 
  border-left: 3px solid var(--accent); 
  background: rgba(59, 130, 246, 0.1); 
}

.sidebar-footer { 
  padding: 16px 24px 0 24px; 
  flex-shrink: 0; 
}

.sidebar-divider { 
  margin: 12px 0; 
  border-top: 1px solid var(--border); 
}

.copyright-sidebar { 
  text-align: center; 
  font-size: 0.75rem; 
  color: var(--text-dim); 
  margin-top: 12px; 
  opacity: 0.7; 
}

.content-area { 
  flex: 1; 
  padding: 40px; 
  display: flex; 
  justify-content: center; 
  align-items: flex-start; 
  overflow-y: auto; 
  background: linear-gradient(rgba(11, 15, 25, 0.75), rgba(11, 15, 25, 0.75)), url('media/background.png') center/cover no-repeat fixed !important; 
  min-height: 100dvh;
}

.page { width: 100%; max-width: 900px; }
.page-wide { max-width: 1400px; }

.welcome-card, 
.overview-card { 
  background: var(--card-bg); 
  backdrop-filter: blur(16px); 
  -webkit-backdrop-filter: blur(16px); 
  border: 1px solid var(--card-border); 
  border-radius: 16px; 
  padding: 24px; 
  width: 100%; 
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); 
}

.wide-card {
  max-width: 100% !important;
}

h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.5px; color: var(--text); }
h2 { font-size: 1.3rem; font-weight: 600; margin-bottom: 1rem; color: var(--text); }
h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.sub-text { font-size: 0.82rem; color: var(--text-dim); }
.divider { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.sub-divider { margin: 10px 0 14px; opacity: 0.5; }

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.faq-item {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.faq-question {
  padding: 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.faq-question i {
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: transform 0.2s ease;
}

.faq-item.open .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 16px 16px 16px;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.5;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 4px;
  padding-top: 12px;
}

.faq-item.open .faq-answer {
  display: block;
}

.handboeken-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.handboek-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.handboek-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

.hb-icon-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  padding: 6px;
  border: 1px solid var(--border);
}

.hb-icon-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.handboek-card h3 {
  margin-bottom: 6px;
}

.handboek-card .sub-text {
  margin-bottom: 12px;
  line-height: 1.4;
  flex: 1;
}

.hb-author {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hb-author span {
  color: var(--text);
  font-weight: 600;
}

.btn-hb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  padding: 10px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
  cursor: pointer;
}

.btn-hb:hover {
  background: var(--accent-hover);
}

.legenda-container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.legenda-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.legenda-items {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.legenda-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.legenda-box {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

.rt-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
}

.rt-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
  text-align: left;
}

.rt-table th {
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.th-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.team-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.th-ambu { background: #facc15; color: #0f172a !important; }
.th-brand { background: #ef4444; color: #ffffff !important; }
.th-infra { background: #38bdf8; color: #0f172a !important; }
.th-kmar { background: #2563eb; color: #ffffff !important; }
.th-poli { background: #1d4ed8; color: #ffffff !important; }

.rt-level-col {
  background: #1e293b;
  width: 45px !important;
  max-width: 45px !important;
  padding: 0 !important;
  text-align: center;
}

.rt-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: top;
  min-width: 200px;
}

.rt-level-badge {
  background: rgba(15, 23, 42, 0.9);
  font-weight: 800;
  font-size: 1.05rem;
  color: #ffffff;
  text-align: center;
  vertical-align: middle !important;
  width: 45px !important;
  min-width: 45px !important;
  padding: 8px 0 !important;
}

.gp-badge {
  font-size: 0.72rem !important;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.rt-item {
  font-size: 0.83rem;
  color: #f8fafc;
  padding: 7px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rt-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rt-item i {
  flex-shrink: 0;
}

.rt-item.clickable {
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.rt-item.clickable:hover {
  transform: translateX(3px);
  filter: brightness(1.2);
}

.rt-item:last-child {
  margin-bottom: 0;
}

.gp-item {
  border: 1px dashed rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
}

.tag-red { background: #dc2626 !important; color: #ffffff !important; font-weight: 600; }
.tag-green { background: #16a34a !important; color: #ffffff !important; font-weight: 600; }
.tag-lightblue { background: #0284c7 !important; color: #ffffff !important; font-weight: 600; }
.tag-blue { background: #1d4ed8 !important; color: #ffffff !important; font-weight: 600; }
.tag-dark { background: #475569 !important; color: #ffffff !important; font-weight: 600; }

.publication-meta {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.modal-overlay { 
  position: fixed; 
  inset: 0; 
  background: rgba(0, 0, 0, 0.7); 
  backdrop-filter: blur(6px); 
  -webkit-backdrop-filter: blur(6px); 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  z-index: 999999; 
  padding: 16px; 
}

.modal-card { 
  background: #1e293b; 
  border: 1px solid var(--card-border); 
  border-radius: 16px; 
  padding: 24px; 
  width: 100%; 
  max-width: 480px; 
  box-shadow: 0 25px 50px rgba(0,0,0,0.8); 
  display: flex; 
  flex-direction: column; 
}

.modal-small {
  max-width: 420px !important;
}

.modal-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.modal-section {
  margin-top: 12px;
  margin-bottom: 12px;
}

.modal-desc-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.modal-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-list li {
  font-size: 0.83rem;
  color: var(--text-dim);
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
}

.btn-gp-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  padding: 12px;
  background: #f59e0b;
  color: #0f172a;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  margin-top: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-gp-link:hover {
  background: #d97706;
  color: #ffffff;
}

.external-url-box {
  font-family: monospace;
  font-size: 0.8rem;
  color: #60a5fa;
  background: rgba(15, 23, 42, 0.8);
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  word-break: break-all;
}

.modal-actions { 
  display: flex; 
  gap: 10px; 
  margin-top: 16px; 
}

button { 
  width: 100%; 
  padding: 12px; 
  border: none; 
  border-radius: 8px; 
  background: var(--accent); 
  color: white; 
  font-weight: 600; 
  cursor: pointer; 
  transition: 0.2s; 
}

button:hover { 
  background: var(--accent-hover); 
}

.mobile-header {
  display: none !important;
}

@media screen and (max-width: 768px) {
  .mobile-header {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #060911;
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }

  .mobile-menu-toggle {
    background: transparent;
    border: none;
    color: var(--text);
    padding: 4px;
    width: auto;
  }

  .mobile-title {
    font-weight: 700;
    font-size: 1.1rem;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 1100;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1080;
  }

  .content-area {
    padding: 80px 16px 24px 16px;
  }
}
