/* ============================================
   REFERENCES DASHBOARD - TEMA TERANG BIRU LANGIT
   ============================================ */

/* ===== ROOT VARIABLES ===== */
:root {
    /* Primary Colors - Biru Langit */
    --primary-blue: #4A90E2;
    --primary-blue-light: #6BA3F0;
    --primary-blue-dark: #357ABD;
    --primary-blue-gradient: linear-gradient(135deg, #4A90E2 0%, #6BA3F0 100%);
    
    /* Secondary Colors */
    --secondary-blue: #87CEEB;
    --light-blue: #E3F2FD;
    --sky-blue: #B3E5FC;
    --cloud-blue: #F0F8FF;
    
    /* Accent Colors */
    --success-green: #28a745;
    --warning-orange: #ffc107;
    --danger-red: #dc3545;
    --info-cyan: #17a2b8;
    
    /* Neutral Colors */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --text-dark: #343a40;
    --text-light: #6c757d;
    
    /* Shadows */
    --shadow-light: 0 2px 4px rgba(74, 144, 226, 0.1);
    --shadow-medium: 0 4px 8px rgba(74, 144, 226, 0.15);
    --shadow-heavy: 0 8px 16px rgba(74, 144, 226, 0.2);
    
    /* Border Radius */
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 16px;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ===== MAIN DASHBOARD CONTAINER ===== */
.admin-dashboard {
    background: linear-gradient(135deg, #f0f8ff 0%, #e3f2fd 100%);
    min-height: 100vh;
    padding: var(--spacing-md);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== DASHBOARD HEADER ===== */
.dashboard-header {
    background: var(--primary-blue-gradient);
    border-radius: var(--radius-large);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-medium);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 1;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 1;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.header-info {
    flex: 1;
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 var(--spacing-xs) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.dashboard-title i {
    font-size: 2.2rem;
    opacity: 0.9;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 300;
}

.header-meta {
    display: flex;
    gap: var(--spacing-xs);
}

/* ===== CART HEADERS ===== */
.cart-header {
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.cart-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 var(--spacing-xs) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.cart-title i {
    color: var(--primary-blue);
    font-size: 1.6rem;
}

.cart-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

/* ===== STATISTICS CART CONTAINER ===== */
.stats-cart-container {
    background: var(--white);
    border-radius: var(--radius-large);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(74, 144, 226, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.stat-cart {
    background: var(--white);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(74, 144, 226, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.stat-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-blue-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.15);
    border-color: var(--primary-blue);
}

.stat-cart:hover::before {
    transform: scaleX(1);
}

.stat-cart-primary {
    border-left: 4px solid var(--primary-blue);
}

.stat-cart-success {
    border-left: 4px solid var(--success-green);
}

.stat-cart-warning {
    border-left: 4px solid var(--warning-orange);
}

.stat-cart-info {
    border-left: 4px solid var(--info-cyan);
}

.stat-cart-secondary {
    border-left: 4px solid #6c757d;
}

.stat-cart-dark {
    border-left: 4px solid #343a40;
}

.stat-cart-danger {
    border-left: 4px solid var(--danger-red);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-cart-primary .stat-icon {
    background: var(--primary-blue-gradient);
}

.stat-cart-success .stat-icon {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
}

.stat-cart-warning .stat-icon {
    background: linear-gradient(135deg, #ffc107 0%, #ffd43b 100%);
}

.stat-cart-info .stat-icon {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
}

.stat-cart-secondary .stat-icon {
    background: linear-gradient(135deg, #6c757d 0%, #868e96 100%);
}

.stat-cart-dark .stat-icon {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
}

.stat-cart-danger .stat-icon {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.stat-description {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.3;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--success-green);
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ===== ANALYTICS CART CONTAINER ===== */
.analytics-cart-container {
    background: var(--white);
    border-radius: var(--radius-large);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(74, 144, 226, 0.1);
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.chart-cart {
    background: var(--white);
    border-radius: var(--radius-medium);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-light);
    border: 2px solid rgba(74, 144, 226, 0.1);
    transition: all 0.3s ease;
}

.chart-cart:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-blue-light);
}

.chart-header {
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.chart-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 var(--spacing-xs) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.chart-title i {
    color: var(--primary-blue);
    font-size: 1.2rem;
}

.chart-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.chart-body {
    padding: var(--spacing-sm);
}

/* Data Summary */
.data-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.summary-item {
    text-align: center;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    border: 1px solid var(--medium-gray);
}

.summary-label {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.status-online {
    color: var(--success-green) !important;
}

/* Gender Distribution */
.gender-distribution {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.gender-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    border: 1px solid var(--medium-gray);
    min-width: 150px;
}

.gender-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.gender-icon.male {
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-blue);
}

.gender-icon.female {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-red);
}

.gender-info {
    text-align: center;
}

.gender-label {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-bottom: 0.25rem;
}

.gender-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Age & Education Distribution */
.age-distribution,
.education-distribution {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.age-item,
.education-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    border: 1px solid var(--medium-gray);
}

.age-label,
.education-label {
    font-size: 0.9rem;
    color: var(--dark-gray);
    font-weight: 600;
}

.age-count,
.education-count {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* ===== FLOATING ACTION BUTTON ===== */
.floating-fab-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1050;
}

.fab-main {
    width: 60px;
    height: 60px;
    background: var(--primary-blue-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
    transition: all 0.3s ease;
}

.fab-main.active {
    transform: rotate(45deg);
}

.fab-main:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.6);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.fab-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-item {
    margin-bottom: 1rem;
    position: relative;
}

.fab-item a {
    width: 50px;
    height: 50px;
    background-color: var(--white);
    color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
}

.fab-item a:hover {
    background-color: var(--primary-blue);
    color: white;
    transform: scale(1.1);
}

.fab-item::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 65px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--text-dark);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.fab-item:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet (768px - 991px) - 3 kolom */
@media (min-width: 768px) and (max-width: 991px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-summary-grid,
    .age-distribution,
    .education-distribution {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (max 767px) - 2 kolom */
@media (max-width: 767px) {
    .admin-dashboard {
        padding: 1rem;
    }
    
    .dashboard-header {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .header-meta {
        flex-direction: column;
        width: 100%;
    }
    
    .header-meta .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header-meta .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        margin: 0 !important;
    }
    
    .header-meta .btn i {
        font-size: 0.75rem;
        margin-right: 0.25rem !important;
    }
    
    .dashboard-title {
        font-size: 1.5rem;
        gap: 0.5rem;
    }
    
    .dashboard-title i {
        font-size: 1.3rem;
    }
    
    .dashboard-subtitle {
        font-size: 0.95rem;
    }
    
    .stats-cart-container,
    .analytics-cart-container {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .cart-header {
        margin-bottom: 1rem;
    }
    
    .cart-title {
        font-size: 1.3rem;
        gap: 0.5rem;
    }
    
    .cart-title i {
        font-size: 1.2rem;
    }
    
    .cart-subtitle {
        font-size: 0.85rem;
    }
    
    /* STATS GRID - 2 KOLOM DI MOBILE */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }
    
    .stat-cart {
        padding: 0.875rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }
    
    .stat-description {
        font-size: 0.75rem;
    }
    
    .stat-trend {
        font-size: 0.75rem;
        padding-top: 0.5rem;
    }
    
    /* ANALYTICS GRID - 1 KOLOM DI MOBILE */
    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-cart {
        padding: 1rem;
    }
    
    .chart-header {
        margin-bottom: 1rem;
    }
    
    .chart-title {
        font-size: 1.1rem;
        gap: 0.375rem;
    }
    
    .chart-title i {
        font-size: 1rem;
    }
    
    .chart-subtitle {
        font-size: 0.8rem;
    }
    
    .chart-body {
        padding: 0.5rem;
    }
    
    /* DATA GRIDS - 2 KOLOM DI MOBILE */
    .data-summary-grid,
    .age-distribution,
    .education-distribution {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .summary-item,
    .age-item,
    .education-item {
        padding: 0.75rem;
    }
    
    .summary-label,
    .age-label,
    .education-label {
        font-size: 0.8rem;
    }
    
    .summary-value {
        font-size: 1.2rem;
    }
    
    .age-count,
    .education-count {
        font-size: 1rem;
    }
    
    /* GENDER DISTRIBUTION */
    .gender-distribution {
        flex-direction: column;
        gap: 1rem;
    }
    
    .gender-item {
        min-width: auto;
        justify-content: center;
    }
    
    .gender-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .gender-count {
        font-size: 1.3rem;
    }
    
    /* FAB */
    .floating-fab-container {
        bottom: 20px;
        right: 20px;
    }
    
    .fab-main {
        width: 50px;
        height: 50px;
    }
    
    .fab-main i {
        font-size: 1.2rem;
    }
    
    .fab-item a {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* Extra Small Mobile (max 480px) - 2 kolom tetap */
@media (max-width: 480px) {
    .admin-dashboard {
        padding: 0.5rem;
    }
    
    .dashboard-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .dashboard-title {
        font-size: 1.25rem;
    }
    
    .dashboard-title i {
        font-size: 1.1rem;
    }
    
    .dashboard-subtitle {
        font-size: 0.875rem;
    }
    
    .header-meta .btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
    
    .header-meta .btn i {
        font-size: 0.7rem;
    }
    
    .stats-cart-container,
    .analytics-cart-container {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .cart-title {
        font-size: 1.1rem;
    }
    
    .cart-subtitle {
        font-size: 0.8rem;
    }
    
    /* STATS GRID - 2 KOLOM TETAP */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }
    
    .stat-cart {
        padding: 0.75rem;
    }
    
    .stat-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .stat-description {
        font-size: 0.7rem;
    }
    
    .stat-trend {
        font-size: 0.7rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-cart,
.chart-cart {
    animation: fadeInUp 0.6s ease-out;
}

.stat-cart:nth-child(1) { animation-delay: 0.1s; }
.stat-cart:nth-child(2) { animation-delay: 0.2s; }
.stat-cart:nth-child(3) { animation-delay: 0.3s; }
.stat-cart:nth-child(4) { animation-delay: 0.4s; }

