/* --- style.css - MODERN DASHBOARD THEME --- */

/* 1. IMPORT FONT & RESET */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;       /* Indigo Utama */
    --primary-dark: #4338ca;
    --secondary: #64748b;     /* Abu-abu Slate */
    --success: #10b981;       /* Hijau Emerald */
    --warning: #f59e0b;       /* Kuning Amber */
    --danger: #ef4444;        /* Merah Rose */
    --sidebar-bg: #1e293b;    /* Dark Blue/Grey */
    --bg-body: #f1f5f9;       /* Light Grey Background */
    --white: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 10px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border_box; margin: 0; padding: 0; outline: none; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex; /* Layout Flexbox untuk Sidebar + Content */
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
h1, h2, h3 { font-weight: 600; color: var(--text-main); }

/* 2. SIDEBAR NAVIGATION */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    transition: 0.3s;
    z-index: 100;
}

.sidebar-header {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 { font-size: 22px; color: var(--white); letter-spacing: 1px; }

.sidebar-menu { padding: 20px 15px; flex: 1; overflow-y: auto; }
.sidebar-menu li { margin-bottom: 8px; }

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: var(--radius);
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.sidebar-menu a span { margin-left: 10px; }

.user-profile {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
}
.user-profile .name { font-weight: 600; font-size: 14px; display: block; }
.user-profile .role { font-size: 12px; color: #94a3b8; display: block; margin-bottom: 10px; }

/* 3. MAIN CONTENT AREA */
.main-content {
    flex: 1;
    margin-left: 260px; /* Sesuai lebar sidebar */
    padding: 30px;
    width: calc(100% - 260px);
    overflow-x: hidden;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: transparent;
}

.page-header h1 { font-size: 24px; }

/* 4. CARDS (KOTAK STATISTIK) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s;
}
.card:hover { transform: translateY(-3px); }

.card h3 { font-size: 13px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 10px; font-weight: 600; }
.card .number { font-size: 32px; font-weight: 700; color: var(--primary); }

/* 5. TABLES (DATA GRID) */
.table-wrapper {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { padding: 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { font-weight: 600; color: var(--text-muted); background: #f8fafc; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; }
tr:hover { background-color: #f8fafc; }
tr:last-child td { border-bottom: none; }

/* 6. BUTTONS & FORMS */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px; font-weight: 500;
    border: none; cursor: pointer; transition: 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-grey { background: #e2e8f0; color: var(--text-main); }
.btn-grey:hover { background: #cbd5e1; }

.form-container {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 800px;
}

label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 14px; color: var(--text-main); }
input, select, textarea {
    width: 100%; padding: 12px 15px; margin-bottom: 20px;
    border: 1px solid var(--border); border-radius: 8px;
    font-family: inherit; font-size: 14px; transition: 0.2s;
    background: #fdfdfd;
}
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }

/* 7. BADGES (STATUS) */
.badge { padding: 6px 12px; border-radius: 50px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.badge-lunas { background: #d1fae5; color: #065f46; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar { width: 70px; }
    .sidebar h2, .sidebar-menu span, .user-profile { display: none; } 
    .sidebar-menu a { justify-content: center; padding: 15px; }
    .main-content { margin-left: 70px; width: calc(100% - 70px); padding: 15px; }
}
/* --- TAMBAHAN: LANDING PAGE STYLE --- */
.landing-body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e2e8f0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    text-align: center;
}

.landing-container {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 800px;
    width: 100%;
}

.landing-title { font-size: 3rem; font-weight: 800; color: var(--primary); margin-bottom: 10px; }
.landing-subtitle { font-size: 1.1rem; color: var(--secondary); margin-bottom: 40px; }

.landing-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-box {
    background: #f8fafc;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}
.stat-box h3 { font-size: 3rem; color: var(--text-main); margin-bottom: 5px; }
.stat-box p { color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

.landing-actions { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.btn-lg { padding: 15px 40px; font-size: 1.1rem; border-radius: 50px; }