/**
 * JELITA - Jendela Ekonomi & Layanan Informasi Data
 * Design System - Sensus Ekonomi 2026 Branding
 * Version 1.0.0
 */

/* ============================================
   Google Fonts Import
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS Variables (SE2026 Color Palette)
   ============================================ */
:root {
    /* Primary Colors */
    --bps-blue-dark: #00305e;
    --bps-blue-deep: #001a33;
    --bps-blue-light: #004080;
    --bps-orange: #f7941d;
    --bps-gold: #ffc107;
    
    /* Text Colors */
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-dark: #1a1a2e;
    
    /* Glass Effect Variables */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-light: rgba(255, 255, 255, 0.2);
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(247, 148, 29, 0.3);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--bps-blue-dark) 0%, var(--bps-blue-deep) 100%);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background Orbs */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    z-index: -1;
    animation: float 20s infinite ease-in-out;
}

body::before {
    width: 600px;
    height: 600px;
    background: var(--bps-orange);
    top: -200px;
    right: -200px;
}

body::after {
    width: 400px;
    height: 400px;
    background: var(--bps-gold);
    bottom: -100px;
    left: -100px;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(50px, 50px) rotate(5deg); }
    50% { transform: translate(0, 100px) rotate(0deg); }
    75% { transform: translate(-50px, 50px) rotate(-5deg); }
}

/* ============================================
   Glassmorphism Effects
   ============================================ */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.glass-effect-light {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition-normal);
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }

.text-gradient {
    background: linear-gradient(135deg, var(--bps-orange) 0%, var(--bps-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* ============================================
   Navbar
   ============================================ */
.navbar-glass {
    background: rgba(0, 48, 94, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-light) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand img {
    height: 40px;
}

.navbar-brand .brand-text {
    background: linear-gradient(135deg, var(--bps-orange), var(--bps-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    background: var(--glass-bg-hover);
    color: var(--bps-orange) !important;
}

.nav-link.active {
    background: var(--bps-orange);
    color: var(--text-light) !important;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 4rem;
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--bps-orange), var(--bps-gold));
    color: var(--text-dark);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Search Box
   ============================================ */
.search-container {
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.search-box {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    transition: all var(--transition-normal);
}

.search-box:focus-within {
    border-color: var(--bps-orange);
    box-shadow: var(--shadow-glow);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.search-tab {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-tab:hover,
.search-tab.active {
    background: var(--bps-orange);
    border-color: var(--bps-orange);
    color: var(--text-light);
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--bps-orange) 0%, var(--bps-gold) 100%);
    border: none;
    color: var(--text-dark);
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: var(--text-dark);
}

.btn-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-glass:hover {
    background: var(--glass-bg-hover);
    border-color: var(--bps-orange);
    color: var(--bps-orange);
}

/* ============================================
   Cards
   ============================================ */
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-icon.orange {
    background: linear-gradient(135deg, var(--bps-orange), var(--bps-gold));
    color: var(--text-dark);
}

.stat-icon.blue {
    background: linear-gradient(135deg, var(--bps-blue-light), var(--bps-blue-dark));
    color: var(--text-light);
}

.stat-icon.green {
    background: linear-gradient(135deg, var(--success), #059669);
    color: var(--text-light);
}

.stat-icon.red {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: var(--text-light);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================
   Search Results
   ============================================ */
.search-results {
    max-width: 700px;
    margin: 2rem auto 0;
    max-height: 400px;
    overflow-y: auto;
}

.result-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.result-item:hover {
    background: var(--glass-bg-hover);
    border-color: var(--bps-orange);
    transform: translateX(5px);
}

.result-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bps-orange);
}

.result-info h5 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.result-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.result-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
}

.result-badge.active {
    background: var(--success);
    color: white;
}

.result-badge.inactive {
    background: var(--danger);
    color: white;
}

/* ============================================
   Login Form
   ============================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 450px;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border-light);
    border-radius: var(--radius-xl);
    padding: 3rem;
    animation: fadeInUp 0.5s ease;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 80px;
    margin-bottom: 1rem;
}

.login-logo h2 {
    font-weight: 700;
}

.form-floating-glass {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-floating-glass input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem 1rem 1rem 3rem;
    color: var(--text-light);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-floating-glass input:focus {
    outline: none;
    border-color: var(--bps-orange);
    background: rgba(255, 255, 255, 0.1);
}

.form-floating-glass input::placeholder {
    color: var(--text-muted);
}

.form-floating-glass .icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.login-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #fca5a5;
    text-align: center;
}

/* ============================================
   Dashboard & Monitoring
   ============================================ */
.dashboard-container {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.breadcrumb-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.breadcrumb-glass .breadcrumb {
    margin: 0;
    background: none;
}

.breadcrumb-glass .breadcrumb-item a {
    color: var(--bps-orange);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-glass .breadcrumb-item a:hover {
    color: var(--bps-gold);
}

.breadcrumb-glass .breadcrumb-item.active {
    color: var(--text-light);
}

.breadcrumb-glass .breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* ============================================
   Data Table
   ============================================ */
.table-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-glass table {
    margin: 0;
    color: var(--text-light);
}

.table-glass thead th {
    background: rgba(0, 48, 94, 0.5);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem;
    font-weight: 600;
    color: var(--text-light);
}

.table-glass tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.table-glass tbody tr:hover {
    background: var(--glass-bg-hover);
}

.table-glass tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   Progress Bars
   ============================================ */
.progress-glass {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-bar-animated {
    transition: width 1s ease;
}

.progress-success {
    background: linear-gradient(90deg, var(--success), #34d399);
}

.progress-warning {
    background: linear-gradient(90deg, var(--warning), var(--bps-gold));
}

.progress-danger {
    background: linear-gradient(90deg, var(--danger), #f87171);
}

/* Large Progress */
.progress-lg {
    height: 24px;
    border-radius: var(--radius-md);
}

.progress-lg .progress-bar {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Drill-down List
   ============================================ */
.drill-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    color: var(--text-light);
}

.drill-item:hover {
    background: var(--glass-bg-hover);
    border-color: var(--bps-orange);
    transform: translateX(10px);
    color: var(--text-light);
}

.drill-item .drill-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--bps-blue-light), var(--bps-blue-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.drill-item .drill-info {
    flex: 1;
}

.drill-item .drill-info h5 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.drill-item .drill-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.drill-item .drill-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.drill-item .drill-stat {
    text-align: center;
}

.drill-item .drill-stat .value {
    font-size: 1.25rem;
    font-weight: 700;
    display: block;
}

.drill-item .drill-stat .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.drill-item .drill-arrow {
    font-size: 1.5rem;
    color: var(--bps-orange);
}

/* ============================================
   Footer
   ============================================ */
.footer-glass {
    background: rgba(0, 26, 51, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-glass p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================
   Utilities
   ============================================ */
.text-orange { color: var(--bps-orange) !important; }
.text-gold { color: var(--bps-gold) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }

.bg-orange { background-color: var(--bps-orange) !important; }
.bg-gold { background-color: var(--bps-gold) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mt-0 { margin-top: 0 !important; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding: 5rem 0 3rem;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box input {
        padding: 1rem;
    }
    
    .search-tabs {
        flex-wrap: wrap;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .drill-item {
        flex-direction: column;
        text-align: center;
    }
    
    .drill-item .drill-stats {
        margin-top: 1rem;
    }
    
    .login-card {
        padding: 2rem;
    }
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 26, 51, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--bps-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bps-blue-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--bps-blue-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bps-orange);
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
