/* ============================================================
   admin.css — Gudang Masker Admin Panel
   ============================================================ */

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    background: #f0f2f5;
    color: #2d3436;
}

a { text-decoration: none; }

/* ─── Layout Wrapper ────────────────────────────────────────── */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.admin-sidebar {
    width: 230px;
    min-width: 230px;
    background: #1e2a38;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: transform 0.25s ease;
}

/* scrollbar tipis di sidebar */
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* ─── Sidebar Brand ─────────────────────────────────────────── */
.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    text-align: center;
}
.sidebar-brand img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.15);
    margin-bottom: 10px;
}
.sidebar-brand h5 {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 2px;
    letter-spacing: 0.3px;
}
.sidebar-brand small {
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ─── Sidebar Menu ──────────────────────────────────────────── */
.sidebar-menu {
    list-style: none;
    margin: 12px 0 0;
    padding: 0 10px;
    flex: 1;
}
.sidebar-menu .menu-section {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.3);
    padding: 18px 10px 6px;
}
.sidebar-menu li a.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,0.65);
    font-size: 13.5px;
    font-weight: 400;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 2px;
}
.sidebar-menu li a.nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.sidebar-menu li a.nav-link.active {
    background: #c0395f;
    color: #fff;
    font-weight: 500;
}
.sidebar-menu li a.nav-link .material-icons {
    font-size: 19px;
    flex-shrink: 0;
    opacity: 0.85;
}
.sidebar-menu li a.nav-link.active .material-icons { opacity: 1; }

/* ─── Sidebar Footer ────────────────────────────────────────── */
.sidebar-footer {
    padding: 14px 14px 18px;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.user-info .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.user-info .avatar .material-icons { color: rgba(255,255,255,0.7); font-size: 20px; }
.user-info .name { font-size: 13px; font-weight: 500; color: #fff; line-height: 1.3; }
.user-info .role { font-size: 11px; color: rgba(255,255,255,0.4); text-transform: capitalize; }

/* ─── Content Area ──────────────────────────────────────────── */
.admin-content {
    margin-left: 230px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ─── Topbar ────────────────────────────────────────────────── */
.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #eaeaea;
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-topbar .page-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 2px;
}
.admin-topbar .breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
    font-size: 12px;
    color: #999;
}
.admin-topbar .breadcrumb-item + .breadcrumb-item::before { color: #ccc; }
.admin-topbar .breadcrumb-item.active { color: #888; }

/* Tombol hamburger (mobile) */
.admin-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px 4px 0;
    margin-right: 6px;
    color: #555;
}
.admin-mobile-toggle .material-icons { font-size: 24px; }

/* ─── Main Content ──────────────────────────────────────────── */
.admin-main {
    padding: 24px 28px;
    flex: 1;
}

/* ─── Komponen Umum ─────────────────────────────────────────── */

/* Card umum */
.admin-card {
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 20px;
}

/* Tabel umum */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table thead th {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    white-space: nowrap;
    background: #fafafa;
}
.admin-table tbody td {
    font-size: 13px;
    color: #555;
    padding: 11px 16px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #fafafa; }

/* Badge status */
.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-paid    { background: #EAF3DE; color: #3B6D11; }
.badge-waiting { background: #FAEEDA; color: #854F0B; }
.badge-unpaid  { background: #FCEBEB; color: #A32D2D; }

/* Tombol pink */
.btn-pink {
    background: #D4537E;
    border-color: #D4537E;
    color: #fff;
    font-size: 13px;
    border-radius: 7px;
    padding: 6px 14px;
    font-weight: 500;
    transition: background 0.15s;
}
.btn-pink:hover { background: #b8426a; border-color: #b8426a; color: #fff; }

/* Product thumbnail */
.product-thumb {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    object-fit: cover;
    border: 1px solid #eee;
    background: #f5f5f5;
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 44px 20px;
    color: #bbb;
}
.empty-state .material-icons { font-size: 40px; }
.empty-state p { font-size: 13px; color: #aaa; margin: 0; }

/* Alert / Flash message */
.flash-alert {
    border-radius: 9px;
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-content {
        margin-left: 0;
    }
    .admin-mobile-toggle {
        display: block;
    }
    /* overlay gelap saat sidebar terbuka di mobile */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 999;
    }
    .sidebar-overlay.show { display: block; }
}

@media (max-width: 576px) {
    .admin-main { padding: 16px; }
    .admin-topbar { padding: 10px 16px; }
}