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

:root {
    /* Light Mode - Indonesian Flag Colors */
    --primary-red: #FF0000;
    --primary-white: #FFFFFF;
    --deep-red: #CC0000;
    --light-red: #FF3333;
    --soft-red: #FFE5E5;
    
    /* Light Mode Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-card: #FFFFFF;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --border-color: #e9ecef;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    
    /* Accent Colors */
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

[data-theme="dark"] {
    /* Dark Mode - Indonesian Flag Colors with adjustments */
    --primary-red: #FF3333;
    --primary-white: #F5F5F5;
    --deep-red: #CC0000;
    --light-red: #FF6666;
    --soft-red: #331111;
    
    /* Dark Mode Colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #242424;
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --border-color: #404040;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-hover);
}

.theme-toggle-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-toggle-icon {
    transform: rotate(20deg);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-red) 100%);
    color: var(--primary-white);
    padding: 60px 20px;
    text-align: center;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 10px 30px var(--shadow);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.header p {
    font-size: 1.1em;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-hover);
}

.card h2, .card h3 {
    color: var(--primary-red);
    margin-bottom: 20px;
    font-weight: 600;
}

.card h2 {
    font-size: 1.8em;
    border-bottom: 3px solid var(--primary-red);
    padding-bottom: 10px;
}

.card h3 {
    font-size: 1.4em;
}

.card p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

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

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    margin-left: 10px;
}

.success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-red) 100%);
    color: var(--primary-white);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.4);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

/* Links */
a {
    color: var(--primary-red);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--deep-red);
    text-decoration: underline;
}

/* Admin Sidebar */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-secondary);
}

.sidebar {
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 12px var(--shadow);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-red) 100%);
    color: var(--primary-white);
    font-size: 1.4em;
    font-weight: 700;
    text-align: center;
    border-bottom: 3px solid var(--deep-red);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    flex: 1;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 500;
}

.sidebar-menu li a:hover {
    background: var(--soft-red);
    border-left-color: var(--primary-red);
    color: var(--primary-red);
    padding-left: 28px;
}

.sidebar-menu li a.active {
    background: var(--soft-red);
    border-left-color: var(--primary-red);
    color: var(--primary-red);
}

/* Admin Content */
.admin-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 4px 12px var(--shadow);
}

.admin-header h2 {
    color: var(--primary-red);
    font-size: 2em;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
    border-left: 4px solid var(--primary-red);
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-hover);
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 8px;
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .admin-layout {
        flex-direction: column;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .theme-toggle {
        top: 10px;
        right: 10px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
