/* css/global.css - Emerald Harmony Theme */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* =========== EMERALD HARMONY VARIABLES =========== */
:root {
    /* Emerald Harmony Colors */
    --primary: #206E35;           /* Emerald Green */
    --primary-dark: #072621;      /* Deep Forest Green */
    --primary-darker: #051c18;    /* Darker for gradients */
    --primary-light: #e8f5e9;     /* Light Emerald */
    --primary-extra-light: #f7fdf8; /* Very light green */
    
    /* Gold Accent Colors */
    --accent: #F0C56F;            /* Soft Gold */
    --accent-dark: #d4a657;       /* Dark Gold */
    --accent-light: #f9e4b7;      /* Light Gold */
    
    /* Status Colors (Emerald Harmony Variants) */
    --success: #2e7d32;           /* Emerald Success */
    --success-light: #d4edda;
    --warning: #F0C56F;           /* Gold Warning */
    --warning-light: #fff3cd;
    --danger: #dc3545;            /* Red Danger */
    --danger-light: #f8d7da;
    --info: #2196f3;              /* Blue Info */
    --info-light: #d1ecf1;
    
    /* Extended Emerald Palette */
    --emerald-50: #f0f9f2;
    --emerald-100: #d4e8d8;
    --emerald-200: #b8d7be;
    --emerald-300: #8bc096;
    --emerald-400: #5da96e;
    --emerald-500: #206E35;       /* Primary */
    --emerald-600: #1b5e2c;
    --emerald-700: #164d23;
    --emerald-800: #072621;       /* Primary Dark */
    --emerald-900: #051c18;
    
    /* Gold Palette */
    --gold-50: #fffdf6;
    --gold-100: #fef9e7;
    --gold-200: #f9e4b7;
    --gold-300: #F0C56F;          /* Accent */
    --gold-400: #e6b95c;
    --gold-500: #d4a657;          /* Accent Dark */
    --gold-600: #c28b3e;
    
    /* Grayscale - Adjusted for Emerald Theme */
    --dark: #0a291f;              /* Dark greenish black */
    --gray-800: #1e3a2f;
    --gray-700: #2d4a3e;
    --gray-600: #4a6659;
    --gray-500: #6b8a7d;
    --gray-400: #9cb5a9;
    --gray-300: #c5d6cf;
    --gray-200: #e3ede8;
    --gray-100: #f0f9f4;
    --light: #ffffff;
    
    /* Status Colors - Emerald Harmony */
    --completed: #2e7d32;         /* Emerald Green */
    --completed-light: #e8f5e9;
    --active: #F0C56F;            /* Gold for active */
    --active-light: #fff9e6;
    --upcoming: #2196f3;          /* Blue for upcoming */
    --upcoming-light: #e3f2fd;
    
    /* Shadows - Adjusted for Emerald */
    --shadow-sm: 0 1px 2px 0 rgba(7, 38, 33, 0.05);
    --shadow: 0 2px 8px rgba(7, 38, 33, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(7, 38, 33, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(7, 38, 33, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(7, 38, 33, 0.1);
    --shadow-header: 0 4px 12px rgba(32, 110, 53, 0.15);
    
    /* Layout */
    --header-height: 85px;
    --nav-height: 70px;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    
    /* Theme specific */
    --modal-radius: var(--radius-lg);
    --modal-shadow: var(--shadow-xl);
    --badge-radius: 10px;
    --badge-font-size: 0.65rem;

    --nav-height-compact: 65px;
    --header-height-compact: 85px;
}

/* =========== RESET & BASE =========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, #f7fdf8 0%, #eef9f0 100%);
    color: var(--dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    padding-top: var(--header-height);
    padding-bottom: var(--nav-height);
    overflow-x: hidden;
}

/* =========== TYPOGRAPHY =========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--dark);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* =========== UTILITY CLASSES =========== */
.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 16px;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Text Color Utilities */
.text-primary {
    color: var(--primary) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

/* Background Color Utilities */
.bg-primary-light {
    background-color: var(--primary-light) !important;
}

.bg-accent-light {
    background-color: var(--accent-light) !important;
}

/* =========== SCROLLBAR =========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-200);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* =========== ANIMATIONS =========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Gold pulse for active elements */
@keyframes gold-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(240, 197, 111, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(240, 197, 111, 0);
    }
}

/* =========== RESPONSIVE =========== */
@media (max-width: 360px) {
    :root {
        --header-height: 80px;
        --nav-height: 58px;
    }
    
    .container {
        padding: 0 12px;
    }
}

@media (max-width: 320px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    :root {
        --header-height: 95px;
        --nav-height: 68px;
    }
    
    .container {
        max-width: 768px;
        padding: 0 24px;
    }
}

/* =========== TRANSITIONS =========== */
.dashboard-main.skeleton-loading * {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Smooth content reveal */
.content-reveal {
    animation: contentReveal 0.5s ease forwards;
}

@keyframes contentReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card hover effects */
.stat-card, .jadwal-item, .activity-item, .quick-action-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(32, 110, 53, 0.15);
}

.jadwal-item.active {
    animation: gold-pulse 2s infinite;
}

/* =========== TEXT UTILITIES =========== */
.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* Emerald Badge Base */
.emerald-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--badge-radius);
    font-size: var(--badge-font-size);
    font-weight: 600;
    white-space: nowrap;
}

/* =========== FORM ELEMENTS =========== */
.form-control:focus,
.form-control-sm:focus,
.modal-select:focus,
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(32, 110, 53, 0.1);
}

/* Emerald Theme Button Base */
.emerald-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--emerald-600) 100%);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.emerald-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 110, 53, 0.2);
}

/* Gold Accent Button */
.gold-btn {
    background: linear-gradient(135deg, var(--accent) 0%, var(--gold-500) 100%);
    color: #072621;
    border: none;
    font-weight: 600;
}

.gold-btn:hover {
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
    color: white;
}

/* Tambahkan di global.css setelah animasi yang ada */
@keyframes shooting-star {
    0% {
        transform: translateX(-20px) translateY(0) rotate(45deg);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    20%, 100% {
        transform: translateX(calc(100vw + 50px)) translateY(20px) rotate(45deg);
        opacity: 0;
    }
}