/**
 * SIMOPEL DINPUTARU DEMAK - Main Design System & Base CSS
 * Modern Government Executive Theme: Deep Navy, Gold Accents, Clean Slate
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-500: #2563eb;
  --primary-600: #1d4ed8;
  --primary-700: #1e40af;
  --primary-800: #1e3a8a;
  --primary-900: #0f172a;
  
  --accent-gold: #f59e0b;
  --accent-gold-light: #fef3c7;
  --accent-gold-dark: #b45309;

  --success-50: #ecfdf5;
  --success-100: #d1fae5;
  --success-500: #10b981;
  --success-600: #059669;
  --success-700: #047857;

  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --warning-500: #f59e0b;
  --warning-600: #d97706;

  --danger-50: #fef2f2;
  --danger-100: #fee2e2;
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  --danger-700: #b91c1c;

  --purple-50: #f5f3ff;
  --purple-100: #ede9fe;
  --purple-600: #7c3aed;

  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Elevations */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.18);

  /* Borders & Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Layout */
  --max-w-screen: 1440px;
  --header-height: 72px;
}

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

html {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--slate-800);
  background-color: #f4f6fa;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

input, select, textarea {
  font-family: inherit;
  outline: none;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-w-screen);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Quick Role Bar (Demo & Pimpinan Selector) */
.role-quick-bar {
  background: #091325;
  color: #cbd5e1;
  font-size: 0.8rem;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 100;
}

.role-quick-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.role-quick-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.role-quick-buttons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.role-switch-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.role-switch-btn:hover {
  background: rgba(37, 99, 235, 0.25);
  border-color: var(--primary-500);
  color: #ffffff;
}

.role-switch-btn.active {
  background: var(--primary-600);
  border-color: var(--primary-500);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

/* Main Top Navigation */
.main-navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-title span.highlight {
  color: var(--primary-600);
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate-500);
  letter-spacing: 0.01em;
}

.nav-center-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate-600);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover {
  color: var(--primary-600);
  background-color: var(--primary-50);
}

.nav-link.active {
  color: var(--primary-600);
  background-color: var(--primary-50);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* User Profile Badge in Nav */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-lg);
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  cursor: pointer;
  transition: all 0.2s;
}

.user-profile-badge:hover {
  background: var(--slate-200);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-xs);
}

.user-info-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-800);
  line-height: 1.2;
}

.user-role-tag {
  font-size: 0.7rem;
  color: var(--primary-700);
  font-weight: 600;
}

/* Footer */
.main-footer {
  margin-top: auto;
  background: #0f172a;
  color: #94a3b8;
  padding: 2.5rem 0 1.5rem;
  border-top: 1px solid #1e293b;
  font-size: 0.85rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .mobile-menu-toggle {
    display: inline-flex;
  }

  .nav-center-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .nav-center-menu.mobile-open {
    display: flex;
  }

  .nav-center-menu .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .role-quick-bar {
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-start;
  }

  .role-quick-buttons {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .user-profile-badge {
    max-width: 160px;
  }

  .user-info-text {
    display: none;
  }
}

@media (max-width: 640px) {
  .brand-subtitle {
    display: none;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .public-tracker-card {
    padding: 1.25rem;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .form-group.col-span-2 {
    grid-column: span 1 !important;
  }
}
