/* --- FONTS & VARS --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0f172a;
    --bg-gradient: radial-gradient(circle at 10% 20%, rgb(30, 58, 138) 0%, rgb(15, 23, 42) 90%);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #6366f1; /* Indigo */
    --primary-hover: #4f46e5;
    --danger: #ef4444;
    --success: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --radius: 16px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-dark);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    font-size: 14px;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- LAYOUT --- */
.admin-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    animation: fadeIn 0.5s ease-in-out;
}

/* --- SIDEBAR (Glass) --- */
.sidebar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 50;
}

.sidebar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-brand span { color: white; }

.sidebar-menu { display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-menu a {
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}
.sidebar-menu a:hover {
    background: rgba(99, 102, 241, 0.1);
    color: white;
    border-color: rgba(99, 102, 241, 0.2);
}
.sidebar-menu a.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* --- MAIN CONTENT --- */
.main-content {
    padding: 2rem 3rem;
    width: 100%;
}

h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.5px; }
.breadcrumb { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.9rem; }

/* --- COMPONENTS (CARDS) --- */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}
.card:hover { border-color: rgba(255,255,255,0.15); }
.card-header { margin-bottom: 1.5rem; border-bottom: 1px solid var(--glass-border); padding-bottom: 1rem; }
.card-title { font-size: 1.25rem; font-weight: 600; }

/* --- FORMS & INPUTS --- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }
label { display: block; margin-bottom: 0.5rem; color: var(--text-muted); font-weight: 500; font-size: 0.85rem; }
input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-family: inherit;
    transition: 0.3s;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.9rem;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4); }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-danger:hover { background: #ef4444; color: white; }
.btn-secondary { background: rgba(255,255,255,0.05); color: var(--text-main); border: 1px solid var(--glass-border); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

/* --- TABLES --- */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--glass-border); }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--glass-border); }
th { background: rgba(255,255,255,0.03); font-weight: 600; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.03); }

/* --- LOGIN PAGE --- */
.login-container {
    display: flex; justify-content: center; align-items: center; min-height: 100vh;
    background: var(--bg-gradient);
}
.login-box { width: 100%; max-width: 400px; text-align: center; }
.login-logo { font-size: 2rem; font-weight: 800; color: white; margin-bottom: 2rem; }
.login-logo span { color: var(--primary); }

/* --- UTILS --- */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.alert { padding: 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.alert-error { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }

/* --- MOBILE RESPONSIVE --- */
.hamburger { display: none; position: fixed; top: 20px; right: 20px; z-index: 200; background: var(--bg-dark); border: 1px solid var(--glass-border); padding: 10px 12px; color: white; border-radius: 8px; font-size: 1.2rem; backdrop-filter: blur(10px); }
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 40; }
@media (max-width: 768px) {
    .hamburger { display: block; }
    .admin-wrapper { grid-template-columns: 1fr; }
    .sidebar { position: fixed; width: 280px; transform: translateX(-100%); transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); border-right: 1px solid var(--glass-border); }
    .sidebar.active { transform: translateX(0); box-shadow: 10px 0 30px rgba(0,0,0,0.5); }
    .overlay.active { display: block; }
    .main-content { padding: 1.5rem; padding-top: 5rem; }
    .form-grid { grid-template-columns: 1fr; }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* TABLE RESPONSIVE (SPLIT DATA) */
.table-responsive {
    width: 100%;
    overflow-x: auto; /* Tabel bisa digeser ke kiri/kanan di HP */
    -webkit-overflow-scrolling: touch; /* Scroll halus di HP */
}
.table-responsive table {
    width: 100%;
    white-space: nowrap; /* Supaya teks tidak turun baris saat discroll */
}