/* ===================================================
   SIMPA — Sistem Informasi Monitoring Pangan Daerah
   Main Stylesheet
   =================================================== */

/* ========== CSS VARIABLES ========== */
:root {
    /* Primary Colors */
    --primary: #16A34A;
    --primary-light: #22C55E;
    --primary-dark: #15803D;
    --primary-50: #F0FDF4;
    --primary-100: #DCFCE7;
    --primary-200: #BBF7D0;

    /* Secondary Colors */
    --secondary: #2563EB;
    --secondary-light: #3B82F6;
    --secondary-dark: #1D4ED8;
    --secondary-50: #EFF6FF;
    --secondary-100: #DBEAFE;

    /* Accent Colors */
    --amber: #F59E0B;
    --amber-light: #FBBF24;
    --amber-50: #FFFBEB;
    --red: #EF4444;
    --red-light: #F87171;
    --red-50: #FEF2F2;
    --purple: #8B5CF6;
    --purple-light: #A78BFA;

    /* Neutral Colors */
    --bg-primary: #F8FAFC;
    --bg-white: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-hover: #F1F5F9;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --border: #E2E8F0;
    --border-light: #F1F5F9;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-glow-green: 0 0 20px rgba(22, 163, 74, 0.15);
    --shadow-glow-blue: 0 0 20px rgba(37, 99, 235, 0.15);

    /* Typography */
    --font: 'Poppins', sans-serif;

    /* Spacing */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
}

/* ========== DARK MODE ========== */
body.dark-mode {
    --bg-primary: #0F172A;
    --bg-white: #1E293B;
    --bg-card: #1E293B;
    --bg-hover: #334155;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border: #334155;
    --border-light: #1E293B;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

input {
    font-family: var(--font);
    border: none;
    outline: none;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

.btn-white {
    background: white;
    color: var(--primary);
    font-weight: 700;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

/* ========== SECTION COMMON ========== */
.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--primary-50);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
    border: 1px solid var(--primary-100);
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition);
    background: transparent;
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    box-shadow: var(--shadow-sm);
}

body.dark-mode .navbar.scrolled {
    background: rgba(15, 23, 42, 0.85);
    border-bottom-color: rgba(51, 65, 85, 0.5);
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.logo-text {
    font-weight: 800;
    letter-spacing: -0.5px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.navbar-menu a {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius);
    transition: var(--transition);
}

.navbar-menu a:hover {
    color: var(--primary);
    background: var(--primary-50);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-nav {
    padding: 8px 18px;
    font-size: 13px;
}

.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: var(--transition);
}

.hamburger {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: var(--transition);
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.hamburger::before { top: -6px; }
.hamburger::after { bottom: -6px; }

.mobile-toggle.active .hamburger {
    background: transparent;
}

.mobile-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* ========== HERO SECTION ========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 100px 0 60px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.hero-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-200), transparent);
    top: -200px;
    right: -100px;
    animation: orbFloat1 20s ease-in-out infinite;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--secondary-100), transparent);
    bottom: -100px;
    left: -100px;
    animation: orbFloat2 25s ease-in-out infinite;
}

.hero-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.15), transparent);
    top: 50%;
    left: 50%;
    animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 30px) scale(1.05); }
    66% { transform: translate(20px, -20px) scale(0.95); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-45%, -55%) scale(1.15); }
}

.hero-grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(226,232,240,0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(226,232,240,0.3) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

body.dark-mode .hero-grid-pattern {
    background-image:
        linear-gradient(rgba(51,65,85,0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(51,65,85,0.3) 1px, transparent 1px);
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
}

.hero-badge i {
    font-size: 12px;
}

.hero-title {
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 520px;
}

.hero-cta {
    display: flex;
    gap: 14px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-stats-mini {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    width: fit-content;
    box-shadow: var(--shadow-sm);
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
}

.hero-stat-number {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.hero-stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.hero-stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

/* Hero Dashboard Mockup */
.hero-visual {
    position: relative;
}

.hero-dashboard-mockup {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
}

.mockup-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}

.mockup-dots {
    display: flex;
    gap: 6px;
}

.mockup-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mockup-dots span:nth-child(1) { background: #EF4444; }
.mockup-dots span:nth-child(2) { background: #F59E0B; }
.mockup-dots span:nth-child(3) { background: #22C55E; }

.mockup-url {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-white);
    padding: 4px 16px;
    border-radius: var(--radius-sm);
    flex: 1;
    text-align: center;
}

.mockup-content {
    display: flex;
    min-height: 260px;
}

.mockup-sidebar {
    width: 48px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mockup-menu-item {
    height: 8px;
    border-radius: 4px;
    background: var(--border);
}

.mockup-menu-item.active {
    background: var(--primary);
}

.mockup-main {
    flex: 1;
    padding: 16px;
}

.mockup-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.mockup-kpi {
    height: 40px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.mockup-kpi.green { background: var(--primary-50); border: 1px solid var(--primary-200); }
.mockup-kpi.blue { background: var(--secondary-50); border: 1px solid var(--secondary-100); }
.mockup-kpi.yellow { background: var(--amber-50); border: 1px solid #FDE68A; }
.mockup-kpi.red { background: var(--red-50); border: 1px solid #FECACA; }

.mockup-chart-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

.mockup-chart-line {
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 12px;
    height: 120px;
    display: flex;
    align-items: flex-end;
}

.mockup-chart-line svg {
    width: 100%;
    height: 100%;
}

.mockup-chart-bars {
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 12px;
    height: 120px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.mockup-bar {
    flex: 1;
    background: linear-gradient(to top, var(--primary), var(--primary-light));
    border-radius: 3px 3px 0 0;
    min-height: 10px;
}

/* Floating Cards */
.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 2;
}

.floating-card i {
    font-size: 14px;
}

.floating-card-1 {
    top: 20px;
    right: -20px;
    color: var(--primary);
    animation: floatCard1 6s ease-in-out infinite;
}

.floating-card-2 {
    bottom: 80px;
    left: -30px;
    color: var(--amber);
    animation: floatCard2 7s ease-in-out infinite;
}

.floating-card-3 {
    bottom: 20px;
    right: 20px;
    color: var(--primary);
    animation: floatCard3 5s ease-in-out infinite;
}

@keyframes floatCard1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes floatCard2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

@keyframes floatCard3 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(1deg); }
}

/* ========== STATS SECTION ========== */
.stats-section {
    padding: 40px 0 80px;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ========== FEATURES SECTION ========== */
.features-section {
    padding: 100px 0;
    background: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    padding: 32px 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity var(--transition);
}

.feature-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-200);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 20px;
}

.feature-icon-blue {
    background: linear-gradient(135deg, var(--secondary-50), var(--secondary-100));
    color: var(--secondary);
}

.feature-icon-amber {
    background: linear-gradient(135deg, var(--amber-50), #FDE68A);
    color: var(--amber);
}

.feature-icon-purple {
    background: linear-gradient(135deg, #F5F3FF, #EDE9FE);
    color: var(--purple);
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.feature-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

.feature-link i {
    transition: transform var(--transition);
}

.feature-card:hover .feature-link i {
    transform: translateX(4px);
}

/* ========== ABOUT / WORKFLOW SECTION ========== */
.about-section {
    padding: 100px 0;
}

.workflow-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.workflow-line {
    position: absolute;
    left: 32px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    opacity: 0.2;
}

.workflow-step {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    position: relative;
}

.workflow-step:last-child {
    margin-bottom: 0;
}

.workflow-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 2px solid var(--primary-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    flex-shrink: 0;
    z-index: 1;
    transition: all var(--transition);
}

.workflow-step:hover .workflow-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: var(--shadow-glow-green);
}

.workflow-content {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    flex: 1;
    transition: all var(--transition);
}

.workflow-step:hover .workflow-content {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-md);
}

.workflow-number {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
    display: block;
}

.workflow-content h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.workflow-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========== DASHBOARD PREVIEW SECTION ========== */
.preview-section {
    padding: 100px 0;
    background: var(--bg-white);
}

.preview-dashboard {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
}

.preview-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
}

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

.preview-dots {
    display: flex;
    gap: 6px;
}

.preview-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.preview-dots span:nth-child(1) { background: #EF4444; }
.preview-dots span:nth-child(2) { background: #F59E0B; }
.preview-dots span:nth-child(3) { background: #22C55E; }

.preview-title-bar {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.preview-date {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-body {
    padding: 20px;
}

.preview-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.preview-kpi-card {
    background: var(--bg-white);
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.preview-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.preview-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.preview-kpi-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.preview-kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.preview-kpi-icon.green { background: var(--primary-50); color: var(--primary); }
.preview-kpi-icon.blue { background: var(--secondary-50); color: var(--secondary); }
.preview-kpi-icon.red { background: var(--red-50); color: var(--red); }
.preview-kpi-icon.amber { background: var(--amber-50); color: var(--amber); }

.preview-kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.preview-kpi-value span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.preview-kpi-change {
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.preview-kpi-change.positive { color: var(--primary); }
.preview-kpi-change.negative { color: var(--red); }
.preview-kpi-change.neutral { color: var(--text-muted); }

/* Preview Charts */
.preview-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.preview-chart-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.preview-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
}

.preview-chart-header h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-chart-tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.preview-chart-tabs span {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.preview-chart-tabs span.active {
    background: var(--bg-white);
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
}

.preview-chart-body {
    padding: 14px;
    height: 220px;
}

.preview-chart-pie-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Preview Table */
.preview-table-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.preview-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
}

.preview-table-header h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--primary-50);
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.preview-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

.preview-table-wrapper {
    overflow-x: auto;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
}

.preview-table th {
    padding: 10px 18px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}

.preview-table td {
    padding: 12px 18px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.preview-table tr:hover td {
    background: var(--bg-hover);
}

.table-region {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.table-region i {
    color: var(--primary);
    font-size: 12px;
}

.status-badge {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.status-aman {
    background: var(--primary-50);
    color: var(--primary);
}

.status-waspada {
    background: var(--amber-50);
    color: var(--amber);
}

.status-kritis {
    background: var(--red-50);
    color: var(--red);
}

/* ========== MODULES SECTION ========== */
.modules-section {
    padding: 100px 0;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.module-card {
    position: relative;
    padding: 28px 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all var(--transition);
    overflow: hidden;
}

.module-card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-200);
}

.module-number {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 36px;
    font-weight: 800;
    color: var(--border);
    line-height: 1;
    transition: var(--transition);
}

.module-card:hover .module-number {
    color: var(--primary-100);
}

.module-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    margin-bottom: 16px;
}

.module-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.module-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========== TEAM SECTION ========== */
.team-section {
    padding: 100px 0;
    background: var(--bg-white);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.team-card {
    text-align: center;
    padding: 32px 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.team-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-200);
}

.team-card-lead {
    border-color: var(--primary-200);
    background: linear-gradient(135deg, var(--primary-50), var(--bg-primary));
}

.team-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.team-avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin: 0 auto;
}

.team-badge-role {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.team-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.team-role {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.team-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
}

.team-social {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.team-social a {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    transition: var(--transition);
}

.team-social a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ========== PROJECT TIMELINE ========== */
.project-timeline-section {
    padding: 100px 0;
}

.timeline-horizontal {
    position: relative;
    padding: 60px 0 0;
}

.timeline-track {
    position: absolute;
    top: 90px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
}

.timeline-progress {
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: width 1s ease;
}

.timeline-items {
    display: flex;
    justify-content: space-between;
}

.timeline-item {
    text-align: center;
    position: relative;
    flex: 1;
}

.timeline-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 14px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
    transition: all var(--transition);
}

.timeline-item.completed .timeline-dot {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.timeline-item.active .timeline-dot {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.2);
    animation: timelinePulse 2s ease-in-out infinite;
}

@keyframes timelinePulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.1); }
}

.timeline-card {
    padding: 20px 12px;
}

.timeline-sprint {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-50);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-full);
    margin-bottom: 8px;
}

.timeline-item.active .timeline-sprint {
    background: var(--secondary-50);
    color: var(--secondary);
}

.timeline-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.timeline-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========== CTA SECTION ========== */
.cta-section {
    padding: 60px 0 100px;
}

.cta-card {
    position: relative;
    padding: 64px 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-2xl);
    text-align: center;
    overflow: hidden;
    color: white;
}

.cta-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 30px 30px, 20px 20px;
}

.cta-card h2 {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
}

.cta-card p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 28px;
    position: relative;
}

.cta-buttons {
    position: relative;
}

/* ========== FOOTER ========== */
.footer {
    padding: 64px 0 0;
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .footer {
    background: #020617;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-brand .logo-text {
    color: white;
    font-size: 20px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.footer-links h4,
.footer-contact h4 {
    color: white;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-contact ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-contact i {
    color: var(--primary-light);
    font-size: 14px;
    width: 16px;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

/* =========================================================================
   DASHBOARD PAGE STYLES
   ========================================================================= */

.dashboard-page {
    background: var(--bg-primary);
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition);
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    min-height: 64px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.sidebar-logo .logo-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    transition: opacity var(--transition), width var(--transition);
}

.sidebar.collapsed .sidebar-logo .logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-collapse-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    font-size: 12px;
    flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar.collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

.sidebar-menu {
    flex: 1;
    padding: 12px 8px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-menu-group {
    margin-bottom: 20px;
}

.sidebar-menu-label {
    display: block;
    padding: 8px 12px 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-menu-label {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}

.sidebar-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-item.active {
    background: var(--primary-50);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}

.sidebar-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-badge {
    margin-left: auto;
    padding: 2px 7px;
    background: var(--red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.sidebar.collapsed .sidebar-item span,
.sidebar.collapsed .sidebar-badge {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius);
    overflow: hidden;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar.collapsed .sidebar-user-info {
    opacity: 0;
    width: 0;
}

/* ========== DASHBOARD MAIN ========== */
.dashboard-main {
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition);
    min-height: 100vh;
}

.sidebar.collapsed ~ .dashboard-main {
    margin-left: var(--sidebar-collapsed);
}

/* ========== DASHBOARD TOPBAR ========== */
.dashboard-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: var(--topbar-height);
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

body.dark-mode .dashboard-topbar {
    background: rgba(15, 23, 42, 0.8);
}

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

.mobile-sidebar-toggle {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 18px;
    transition: var(--transition);
}

.mobile-sidebar-toggle:hover {
    background: var(--bg-hover);
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

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

.topbar-breadcrumb i {
    font-size: 10px;
}

.topbar-center {
    flex: 1;
    max-width: 400px;
    margin: 0 24px;
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-hover);
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: var(--transition);
}

.topbar-search:focus-within {
    background: var(--bg-white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.topbar-search i {
    color: var(--text-muted);
    font-size: 14px;
}

.topbar-search input {
    flex: 1;
    background: transparent;
    font-size: 13px;
    color: var(--text-primary);
}

.topbar-search input::placeholder {
    color: var(--text-muted);
}

.topbar-search kbd {
    padding: 2px 6px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font);
}

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

.topbar-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
    transition: var(--transition);
    position: relative;
}

.topbar-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    border: 2px solid var(--bg-white);
}

.topbar-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.topbar-profile:hover {
    background: var(--bg-hover);
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

.topbar-username {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-profile i.fa-chevron-down {
    font-size: 10px;
    color: var(--text-muted);
}

/* ========== DASHBOARD CONTENT ========== */
.dashboard-content {
    padding: 24px;
}

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

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

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

.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-secondary);
}

/* ========== KPI GRID ========== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 20px;
    transition: all var(--transition);
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: var(--shadow-lg);
}

.kpi-card-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.kpi-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kpi-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.kpi-value small {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.kpi-change {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.kpi-change.positive { color: var(--primary); }
.kpi-change.negative { color: var(--red); }
.kpi-change.neutral { color: var(--text-muted); }

.kpi-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.kpi-icon-green { background: var(--primary-50); color: var(--primary); }
.kpi-icon-blue { background: var(--secondary-50); color: var(--secondary); }
.kpi-icon-red { background: var(--red-50); color: var(--red); }
.kpi-icon-amber { background: var(--amber-50); color: var(--amber); }

.kpi-progress {
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.kpi-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-progress-bar.blue { background: linear-gradient(90deg, var(--secondary), var(--secondary-light)); }
.kpi-progress-bar.red { background: linear-gradient(90deg, var(--red), var(--red-light)); }
.kpi-progress-bar.amber { background: linear-gradient(90deg, var(--amber), var(--amber-light)); }

/* ========== CHARTS GRID ========== */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.charts-grid-second {
    grid-template-columns: 1fr 2fr;
}

.chart-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
}

.chart-card:hover {
    box-shadow: var(--shadow-md);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
}

.chart-title-group h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.chart-title-group p {
    font-size: 12px;
    color: var(--text-muted);
}

.chart-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.chart-tab {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}

.chart-tab.active {
    background: var(--bg-white);
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
}

.chart-body {
    padding: 16px 20px 20px;
    height: 300px;
}

.chart-body-pie {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-body-table {
    height: auto;
    padding: 0;
}

.chart-header-badge {
    padding: 4px 10px;
    background: var(--red-50);
    color: var(--red);
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.chart-header-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

.chart-header-link:hover {
    color: var(--primary-dark);
}

/* ========== DASHBOARD TABLE ========== */
.dashboard-table-wrapper {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th {
    padding: 12px 18px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}

.dashboard-table td {
    padding: 14px 18px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.dashboard-table tr:hover td {
    background: var(--bg-hover);
}

.table-cell-region {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.table-cell-region i {
    color: var(--primary);
    font-size: 13px;
}

.change-positive {
    color: var(--primary);
    font-weight: 600;
    font-size: 12px;
}

.change-negative {
    color: var(--red);
    font-weight: 600;
    font-size: 12px;
}

/* ========== BOTTOM GRID (Notifications + Activity) ========== */
.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* Notification List */
.notification-list {
    padding: 0 !important;
    height: auto !important;
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.notification-icon.critical { background: var(--red-50); color: var(--red); }
.notification-icon.warning { background: var(--amber-50); color: var(--amber); }
.notification-icon.info { background: var(--secondary-50); color: var(--secondary); }

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
}

.notification-content p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.notification-time {
    font-size: 11px;
    color: var(--text-muted);
}

.notification-bell {
    animation: bellRing 3s ease-in-out infinite;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0); }
    5%, 15% { transform: rotate(10deg); }
    10%, 20% { transform: rotate(-10deg); }
    25% { transform: rotate(0); }
}

/* Activity List */
.activity-list {
    padding: 0 !important;
    height: auto !important;
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    align-items: flex-start;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.activity-dot.green { background: var(--primary); }
.activity-dot.blue { background: var(--secondary); }
.activity-dot.amber { background: var(--amber); }
.activity-dot.red { background: var(--red); }
.activity-dot.purple { background: var(--purple); }

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.activity-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.activity-time {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

/* ========== SIDEBAR OVERLAY (Mobile) ========== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    backdrop-filter: blur(4px);
    transition: opacity var(--transition);
    opacity: 0;
}

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

/* =========================================================================
   RESPONSIVE DESIGN
   ========================================================================= */

/* Tablet Landscape (1024px) */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-subtitle {
        margin: 0 auto 32px;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats-mini {
        margin: 0 auto;
    }

    .hero-visual {
        max-width: 600px;
        margin: 0 auto;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .preview-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .preview-charts-grid {
        grid-template-columns: 1fr 1fr;
    }

    .preview-chart-large {
        grid-column: 1 / -1;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Dashboard */
    .sidebar {
        transform: translateX(-100%);
    }

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

    .dashboard-main {
        margin-left: 0;
    }

    .sidebar.collapsed ~ .dashboard-main {
        margin-left: 0;
    }

    .mobile-sidebar-toggle {
        display: flex;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-grid,
    .charts-grid-second {
        grid-template-columns: 1fr;
    }

    .bottom-grid {
        grid-template-columns: 1fr;
    }

    .topbar-center {
        display: none;
    }

    .topbar-username {
        display: none;
    }
}

/* Tablet Portrait (768px) */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        border: 1px solid var(--border);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        flex-direction: column;
        padding: 12px;
        box-shadow: var(--shadow-lg);
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-menu a {
        width: 100%;
        padding: 12px 16px;
    }

    .mobile-toggle {
        display: flex;
    }

    .btn-nav span {
        display: none;
    }

    .btn-nav {
        padding: 8px 12px;
    }

    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: clamp(28px, 6vw, 44px);
    }

    .floating-card {
        display: none;
    }

    .timeline-items {
        flex-direction: column;
        gap: 24px;
    }

    .timeline-track {
        display: none;
    }

    .timeline-item {
        text-align: left;
        display: flex;
        gap: 16px;
        align-items: flex-start;
    }

    .timeline-dot {
        margin: 0;
        flex-shrink: 0;
    }

    .timeline-card {
        padding: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .page-header {
        flex-direction: column;
    }

    .page-header-right {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Mobile Large (430px and below) */
@media (max-width: 430px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 28px;
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

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

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats-mini {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .hero-stat-divider {
        width: 100%;
        height: 1px;
    }

    .hero-dashboard-mockup {
        border-radius: var(--radius-lg);
    }

    .mockup-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .mockup-chart-area {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .preview-kpi-grid {
        grid-template-columns: 1fr;
    }

    .preview-charts-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 26px;
    }

    .section-subtitle {
        font-size: 14px;
    }

    /* Dashboard Mobile */
    .dashboard-content {
        padding: 16px;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .kpi-value {
        font-size: 24px;
    }

    .chart-header {
        flex-direction: column;
        gap: 10px;
    }

    .chart-body {
        height: 240px;
    }

    .cta-card {
        padding: 40px 24px;
    }
}

/* Very Small Mobile (360-375px) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 26px;
    }

    .navbar-logo .logo-text {
        font-size: 16px;
    }

    .kpi-value {
        font-size: 22px;
    }

    .page-header h1 {
        font-size: 20px;
    }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========== SELECTION ========== */
::selection {
    background: var(--primary);
    color: white;
}

/* ========== FOCUS STYLES (Accessibility) ========== */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.scale-in {
    animation: scaleIn 0.5s ease forwards;
}

/* ========== PRINT STYLES ========== */
@media print {
    .navbar, .sidebar, .dashboard-topbar, .mobile-toggle, .sidebar-overlay {
        display: none !important;
    }

    .dashboard-main {
        margin-left: 0 !important;
    }

    body {
        background: white !important;
    }
}
