/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary: #059669;       /* Emerald 600 */
    --primary-dark: #047857;  /* Emerald 700 */
    --primary-light: #d1fae5; /* Emerald 100 */
    --secondary: #0f172a;     /* Slate 900 */
    --bg-main: #f8fafc;       /* Slate 50 */
    --surface: #ffffff;
    --text-main: #1e293b;     /* Slate 800 */
    --text-muted: #64748b;    /* Slate 500 */
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- STYLING HALAMAN LOGIN --- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Efek Ornamen Latar Belakang */
.login-body::before, .login-body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
}
.login-body::before {
    width: 350px;
    height: 350px;
    background: rgba(16, 185, 129, 0.25);
    top: -100px;
    left: -100px;
}
.login-body::after {
    width: 400px;
    height: 400px;
    background: rgba(5, 150, 105, 0.2);
    bottom: -150px;
    right: -100px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    width: 100%;
    max-width: 420px;
    padding: 40px 35px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.4);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 16px;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.login-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 6px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-main);
    background-color: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.btn-primary {
    width: 100%;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background-color: var(--danger-bg);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}
/* --- STYLING LAYOUT DASHBOARD & SIDEBAR --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--secondary);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.sidebar-title h2 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.sidebar-title span {
    font-size: 11px;
    color: #94a3b8;
    display: block;
}

.sidebar-nav {
    padding: 20px 14px;
    flex: 1;
    overflow-y: auto;
}

.nav-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    padding: 0 12px;
    margin: 16px 0 8px;
}

.nav-label:first-child {
    margin-top: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.nav-item.active {
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--danger);
    color: #ffffff;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: 70px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-main);
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.content-body {
    padding: 30px;
    flex: 1;
}

/* Grid Statistik Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--surface);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-info h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-info .value {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.icon-emerald { background: #d1fae5; color: #059669; }
.icon-blue { background: #dbeafe; color: #2563eb; }
.icon-amber { background: #fef3c7; color: #d97706; }
.icon-rose { background: #ffe4e6; color: #e11d48; }

/* Card & Tabel Modern */
.card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary);
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8fafc;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* Responsif Mobile */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
    }
    .content-body {
        padding: 20px 15px;
    }
}
/* --- STYLING FORM CRUD, TOMBOL AKSI & MODAL --- */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .grid-2-col {
        grid-template-columns: 1fr;
    }
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-warning {
    background: #fef3c7;
    color: #b45309;
}
.btn-warning:hover {
    background: #fde68a;
}

.btn-danger {
    background: #fee2e2;
    color: #b91c1c;
}
.btn-danger:hover {
    background: #fecaca;
}

.btn-secondary {
    background: #e2e8f0;
    color: #334155;
}
.btn-secondary:hover {
    background: #cbd5e1;
}

/* Modal Edit */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--surface);
    width: 100%;
    max-width: 450px;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.25s ease-out;
}