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

:root {
    /* Premium Blue Palette */
    --primary-h: 221;
    --primary-s: 83%;
    --primary-l: 53%;
    
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-light: hsl(var(--primary-h), var(--primary-s), 95%);
    --primary-soft: hsl(var(--primary-h), var(--primary-s), 90%);
    --primary-dark: hsl(var(--primary-h), var(--primary-s), 35%);
    
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    
    /* Neutral / Surface */
    --background: #fdfdfd;
    --surface: #ffffff;
    --surface-glass: rgba(255, 255, 255, 0.8);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Semantic */
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --border: #f1f5f9;
    --border-dark: #e2e8f0;
    
    /* Effects */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 25px 50px -12px rgba(37, 99, 235, 0.15);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent white gap on the right */
    position: relative;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    font-weight: 700;
}

/* Base Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }

.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

/* Navbar */
.navbar {
    background: var(--primary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 0;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-brand img {
    height: 32px;
    width: auto;
    background: white; /* Provides a clean base for the logo */
    padding: 2px;
    border-radius: 4px; /* Soften the corners */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* Subtle depth */
    display: block;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.navbar-nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.navbar-nav a:hover {
    color: var(--primary);
}

.navbar-nav a:hover::after {
    width: 100%;
}

.btn-nav-login {
    background: var(--primary);
    color: white !important;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.btn-nav-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-premium);
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.8)), 
                url('../../uploads/berkas/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.05;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(to right, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Cards & Components */
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-soft);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 10px 20px -10px var(--primary);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 30px -15px var(--primary);
}

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

.btn-outline:hover {
    background: var(--primary-soft);
}

/* Stats Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-item {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

.stat-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 1px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--border);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 16px 24px;
    text-align: left;
}

td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: var(--primary-light);
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-pending { background: #fef3c7; color: #d97706; }
.badge-success { background: #d1fae5; color: #059669; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-info { background: #e0f2fe; color: #0284c7; }

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

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

.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.hidden {
    display: none !important;
}

/* Responsive Improvements */
/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #0f172a; /* Dark sleek sidebar */
    color: white;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    transition: var(--transition);
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    min-height: 100vh;
    background: #f8fafc;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #94a3b8;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-link i {
    width: 20px;
    height: 20px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

/* Stats Cards */
.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-soft);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Alert System */
.alert {
    padding: 16px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-weight: 600;
    border: 1px solid transparent;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-danger, .alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 80px;
    }
    
    .mobile-header {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: white;
        border-bottom: 1px solid var(--border);
        z-index: 1000;
        align-items: center;
        padding: 0 20px;
        justify-content: space-between;
    }

    .mobile-header.dark {
        background: #0f172a;
        color: white;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* Navbar Mobile Fix */
    .navbar-brand span {
        white-space: nowrap;
    }

    @media (max-width: 576px) {
        .navbar {
            height: 70px;
            padding: 0 !important;
            display: flex;
            align-items: center;
            background: var(--primary) !important;
            width: 100vw !important;
            left: 0 !important;
            right: 0 !important;
            position: fixed;
        }
        .navbar .container {
            padding: 0 20px !important;
            display: flex !important;
            justify-content: space-between !important;
            width: 100% !important;
            max-width: 100% !important;
            margin: 0 !important;
        }
        .navbar-brand {
            gap: 10px;
        }
        .navbar-brand span {
            font-size: 1.1rem !important;
            font-weight: 800;
        }
        .navbar-brand img {
            height: 30px !important;
        }
        .navbar-nav {
            margin: 0;
        }
        .navbar-nav div {
            display: none !important; /* Hide user profile section on mobile */
        }
        
        .btn-keluar {
            padding: 8px 20px !important;
            height: auto !important;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem !important;
            border-radius: 30px !important;
            font-weight: 700;
            background: var(--danger) !important;
            color: white !important;
            box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
        }
    }
}

/* Mobile Form Optimization */
@media screen and (max-width: 768px) {
    input[type="text"], 
    input[type="number"], 
    input[type="date"], 
    input[type="time"], 
    input[type="email"],
    select, 
    textarea {
        font-size: 16px !important; /* Prevents auto-zoom on mobile */
    }

    .form-group {
        width: 100% !important;
        margin: 0 0 16px 0 !important;
    }
}

