/* =========================================================
   MC-CONNECT GLOBAL DESIGN SYSTEM (CSS VARIABLES & TOKENS)
   ========================================================= */

/* Fonts moved to HTML head for better performance */

:root {
    /* Color Palette */
    --bg-main: #0B0F17;
    --bg-surface: #111827;
    --bg-card: #162032;
    --bg-card-hover: #1E293B;
    --bg-elevated: #1F293D;
    
    /* Luxury Accents */
    --gold-primary: #D4AF37;
    --gold-hover: #E5C158;
    --gold-glow: rgba(212, 175, 55, 0.25);

    --indigo-primary: #6366F1;
    --indigo-hover: #4F46E5;
    
    /* Feedback Colors */
    --color-available: #10B981; /* Hijau */
    --color-tentative: #F59E0B; /* Kuning */
    --color-locked: #EF4444;    /* Merah */
    --color-review: #3B82F6;    /* Biru */
    
    /* Text Colors */
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-on-accent: #0B0F17;

    /* Borders & Glass */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(212, 175, 55, 0.3);
    --glass-bg: rgba(17, 24, 39, 0.75);
    --glass-blur: blur(16px);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 25px rgba(212, 175, 55, 0.2);

    /* Spacing & Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    /* Fonts */
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Light Theme Override */
[data-theme="light"] {
    /* Color Palette */
    --bg-main: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-card: #F1F5F9;
    --bg-card-hover: #E2E8F0;
    --bg-elevated: #FFFFFF;
    
    /* Text Colors */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --text-on-accent: #FFFFFF;

    /* Borders & Glass */
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-accent: rgba(212, 175, 55, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.85);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.25);
}


/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
}

/* UI Utilities & Components */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary), #B8860B);
    color: #0B0F17;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-hover), var(--gold-primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

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

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--indigo-primary);
    color: white;
}

.btn-accent:hover {
    background: var(--indigo-hover);
    transform: translateY(-2px);
}

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

.btn-outline-gold:hover {
    background: var(--gold-primary);
    color: #0B0F17;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
}

.badge-available {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-tentative {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-locked {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-review {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-completed {
    background: rgba(148, 163, 184, 0.15);
    color: #94A3B8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-tier-pro {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(245, 158, 11, 0.3));
    color: #FBBF24;
    border: 1px solid var(--gold-primary);
}

/* Global Navbar */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(11, 15, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.85rem 0;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-logo .brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--gold-primary), #B8860B);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B0F17;
    font-weight: 900;
}

.brand-text span {
    color: var(--gold-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--gold-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-close {
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
}

.btn-close:hover {
    color: var(--text-primary);
}

/* Floating Action Button */
.fab-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-primary), #B8860B);
    color: #0B0F17;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    z-index: 990;
    transition: transform 0.25s ease;
}

.fab-btn:hover {
    transform: scale(1.1) rotate(90deg);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
    outline: none;
}

.form-textarea {
    resize: vertical;
    min-height: 90px;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--gold-primary);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* =========================================================
   ADMIN SIDEBAR LAYOUT
   ========================================================= */
.admin-shell {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
}

.admin-sidebar {
    width: 280px;
    background: #0D131F;
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-profile {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.sidebar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-primary);
}

.sidebar-user-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.sidebar-user-info span {
    font-size: 0.78rem;
    color: var(--gold-primary);
}

.sidebar-menu-group {
    padding: 1.25rem 0.85rem 0.5rem;
}

.sidebar-group-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0 0.6rem 0.6rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sidebar-item-btn {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-item-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    transform: translateX(3px);
}

.sidebar-item-btn.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.04));
    color: var(--gold-primary);
    border-left: 3px solid var(--gold-primary);
    font-weight: 700;
}

.sidebar-item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-icon {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1.25rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-body-content {
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
    padding: 2rem 2.5rem 5rem;
}

@media (max-width: 1024px) {
    .admin-shell {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .admin-body-content {
        padding: 1.5rem;
    }
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
}
.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: 0.3s;
}
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 992px) {
    .nav-wrapper {
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 0.5rem 1rem;
    }
    .brand-logo {
        margin-bottom: 0;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .nav-links, .nav-actions {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem 0;
    }
    .nav-links.show, .nav-actions.show {
        display: flex;
    }
    .nav-links {
        gap: 0.5rem;
    }
    .nav-links a {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: var(--radius-sm);
        border: 1px solid rgba(255,255,255,0.05);
        text-align: center;
    }
    .nav-actions {
        gap: 0.5rem;
        margin-top: 0;
    }
    .nav-actions .btn {
        width: 100%;
        text-align: center;
    }
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
}
.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: 0.3s;
}
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 992px) {
    .nav-wrapper {
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 0.5rem 1rem;
    }
    .brand-logo {
        margin-bottom: 0;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .nav-links, .nav-actions {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem 0;
    }
    .nav-links.show, .nav-actions.show {
        display: flex;
    }
    .nav-links {
        gap: 0.5rem;
    }
    .nav-links a {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: var(--radius-sm);
        border: 1px solid rgba(255,255,255,0.05);
        text-align: center;
    }
    .nav-actions {
        gap: 0.5rem;
        margin-top: 0;
    }
    .nav-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.5); /* Semi-transparent gold */
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-primary);
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.5) var(--bg-surface);
}
