/* =========================
   ADMIN PANEL - GLOBAL STYLE
   Selaras dengan Artikel CSS
========================= */

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

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --background: #f8fafc;
    --sidebar-bg: #1e293b;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),
              0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 14px;
    --transition: all 0.3s ease;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text-main);
    display: flex;
}

/* =========================
   SIDEBAR
========================= */
.sidebar {
    width: 260px;
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
}

.sidebar h2 {
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.sidebar h2 span {
    color: var(--primary);
}

.sidebar ul {
    list-style: none;
    padding: 0 1rem;
}

.sidebar ul li {
    margin-bottom: 0.4rem;
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: var(--primary);
    color: var(--white);
}

/* =========================
   MAIN CONTENT
========================= */
.content {
    margin-left: 260px;
    padding: 2rem;
    width: calc(100% - 260px);
}

/* =========================
   TOPBAR
========================= */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.topbar h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.topbar p {
    color: var(--text-muted);
}

.profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

/* =========================
   DASHBOARD CARDS
========================= */
.card-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
}

.card h3 {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.card .count {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

/* =========================
   TABLE
========================= */
.table-container {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

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

thead th {
    text-align: left;
    padding: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 2px solid #f1f5f9;
}

tbody td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

tbody tr:hover {
    background: #f8fafc;
}

/* =========================
   STATUS BADGE
========================= */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.success {
    background: #dcfce7;
    color: #166534;
}

.badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

/* =========================
   BUTTONS
========================= */
.btn {
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

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

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

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

/* =========================
   ACTION ICONS
========================= */
.action {
    display: flex;
    gap: 0.5rem;
}

.action a {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.action .edit {
    background: #eff6ff;
    color: var(--primary);
}

.action .edit:hover {
    background: var(--primary);
    color: white;
}

.action .delete {
    background: #fef2f2;
    color: var(--danger);
}

.action .delete:hover {
    background: var(--danger);
    color: white;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px) {
    .sidebar {
        width: 80px;
    }

    .sidebar h2 span,
    .sidebar ul li a span {
        display: none;
    }

    .content {
        margin-left: 80px;
        width: calc(100% - 80px);
    }

    .sidebar ul li a {
        justify-content: center;
    }
}

/* =========================
   DASHBOARD ENHANCEMENT
========================= */

.sidebar-brand {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar ul li a {
    font-weight: 500;
}

.sidebar ul li a i {
    font-size: 16px;
}

/* Topbar user */
.user {
    background: white;
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Card color accents */
.card.blue::after,
.card.green::after,
.card.orange::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 5px;
    width: 100%;
}

.card.blue::after { background: #3b82f6; }
.card.green::after { background: #10b981; }
.card.orange::after { background: #f59e0b; }

.card {
    position: relative;
}

.card .number {
    font-size: 34px;
    font-weight: 800;
    margin-top: 8px;
}

/* Subtle animation */
.card:hover {
    transform: translateY(-6px);
}

