/* ============================================
   SIMDES 2026 — Main Design System
   No gradients. Flat, bold, premium.
   ============================================ */

/* === CSS Variables === */
:root {
  /* Background Layers */
  --bg-base:       #080C18;
  --bg-surface:    #0F1523;
  --bg-card:       #141C2E;
  --bg-card-hover: #1A2338;
  --bg-input:      #1A2338;
  --bg-muted:      #1F2940;

  /* Border */
  --border:        #232D42;
  --border-light:  #2A3650;
  --border-focus:  #F5A623;

  /* Text */
  --text-primary:  #F0F4FF;
  --text-secondary:#8B97B5;
  --text-muted:    #4B5878;
  --text-inverse:  #080C18;

  /* Accent — Kuning Emas (APBDes/Primary) */
  --accent:        #F5A623;
  --accent-dim:    #2A2010;
  --accent-text:   #F5A623;

  /* Positive — Teal (Realisasi/Surplus) */
  --positive:      #00C896;
  --positive-dim:  #00201A;
  --positive-text: #00C896;

  /* Danger — Merah (Defisit/Alert) */
  --danger:        #EF4444;
  --danger-dim:    #2A0808;
  --danger-text:   #EF4444;

  /* Info — Biru (Informasi) */
  --info:          #3B82F6;
  --info-dim:      #0A1A3A;
  --info-text:     #3B82F6;

  /* Warning */
  --warning:       #F59E0B;
  --warning-dim:   #2A1E00;

  /* Purple */
  --purple:        #8B5CF6;
  --purple-dim:    #150F2A;

  /* Sidebar */
  --sidebar-bg:    #080C18;
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;

  /* Spacing */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  20px;

  /* Shadow */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow:     0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-accent: 0 4px 20px rgba(245,166,35,0.2);
  --shadow-positive: 0 4px 20px rgba(0,200,150,0.15);

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: var(--font);
}

/* === Layout === */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition-slow);
  overflow-x: hidden;
}

body.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-collapsed);
}

/* === Topbar === */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.topbar-menu-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.breadcrumb .bc-home {
  color: var(--text-muted);
}

.breadcrumb .bc-sep {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.breadcrumb .bc-current {
  color: var(--text-primary);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-date {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
}

.topbar-date svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.topbar-notif {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.topbar-notif:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.topbar-notif svg {
  width: 18px;
  height: 18px;
}

.notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--bg-surface);
}

/* === Page Content === */
.page-content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

/* === Page Header === */
.page-header {
  margin-bottom: 28px;
}

.page-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 6px;
  font-weight: 400;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* === Animations === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.animate-fadeInUp {
  animation: fadeInUp 0.4s ease both;
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease both;
}

/* Staggered animation delays */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.3s; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-muted); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* === Overlay === */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 199;
}

.sidebar-overlay.active {
  display: block;
}

/* === Responsive === */
@media (max-width: 900px) {
  .main-content {
    margin-left: 0 !important;
  }

  .topbar-menu-btn {
    display: flex;
  }

  .page-content {
    padding: 20px 16px;
  }
}

@media (max-width: 600px) {
  .topbar-date {
    display: none;
  }

  .page-title {
    font-size: 1.4rem;
  }

  .page-content {
    padding: 16px 12px;
  }
}
