@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #1e293b;
    --primary-light: #334155;
    --accent: #3b82f6; /* Modern Blue */
    --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-body: #f4f7fe; /* Soft blue-ish white for fresh look */
    --bg-white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.08);
    --shadow-hover: 0 15px 50px -10px rgba(59, 130, 246, 0.15);
    --bottom-nav-height: 75px;
    --border-color: #e2e8f0;
}

body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg-body); color: var(--text-main); line-height: 1.6; }

/* =========================================
   1. SIDEBAR (MODERN & COLORFUL ICON)
   ========================================= */
.sidebar { position: fixed; top: 0; left: 0; width: 270px; height: 100vh; background: var(--bg-white); padding: 24px 20px; z-index: 1000; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 4px 0 24px rgba(0,0,0,0.02); display: flex; flex-direction: column; }
.logo { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; padding-left: 10px;}
.logo-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 16px rgba(59,130,246,0.2); }
.logo-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.brand { font-size: 17px; font-weight: 800; color: var(--primary); line-height: 1.2; display: flex; flex-direction: column;}
.brand small { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.5px;}

.nav-label { font-size: 11px; text-transform: uppercase; color: #94a3b8; font-weight: 800; margin: 20px 0 10px 10px; letter-spacing: 1px; }
.nav-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 14px; transition: all 0.3s ease; margin-bottom: 6px; }
.nav-item i { font-size: 18px; width: 24px; text-align: center; transition: transform 0.3s; }
.nav-item:hover { background: #f8fafc; color: var(--primary); transform: translateX(4px); }
.nav-item.active { background: #eff6ff; color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.nav-item.active i { color: var(--accent) !important; }
.nav-item .badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 700; box-shadow: 0 4px 8px rgba(239,68,68,0.3);}

.sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px dashed var(--border-color); }
.user-mini-profile { display: flex; align-items: center; gap: 12px; background: #f8fafc; padding: 12px; border-radius: 16px; border: 1px solid var(--border-color); transition: 0.3s;}
.user-mini-profile:hover { border-color: var(--accent); background: #fff;}
.user-mini-profile .avatar { width: 38px; height: 38px; border-radius: 12px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; box-shadow: 0 4px 10px rgba(244,63,94,0.3);}
.user-mini-profile .info strong { display: block; font-size: 13px; color: var(--primary); }
.user-mini-profile .info span { font-size: 11px; color: var(--text-muted); font-weight: 500;}

/* =========================================
   2. MAIN CONTENT & HEADER
   ========================================= */
.main-content { margin-left: 270px; padding: 24px 32px; min-height: 100vh; transition: 0.3s; padding-bottom: 40px;}
.dashboard-header-card { border-radius: var(--radius-lg); padding: 32px; color: #fff; display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; box-shadow: 0 15px 35px -5px rgba(59, 130, 246, 0.3); position: relative; overflow: hidden;}
.dashboard-header-card::after { content: ''; position: absolute; right: -50px; top: -50px; width: 200px; height: 200px; background: rgba(255,255,255,0.1); border-radius: 50%; blur: 20px; }
.dashboard-header-card h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.5px;}
.dashboard-header-card p { color: rgba(255,255,255,0.9); font-size: 14px; font-weight: 500;}

.hamburger { display: none; background: var(--bg-white); border: 1px solid var(--border-color); font-size: 20px; color: var(--primary); border-radius: 12px; padding: 10px 14px; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.05); margin-bottom: 16px; transition: 0.3s;}
.hamburger:active { transform: scale(0.95); }

/* =========================================
   3. BOTTOM NAV (GOJEK / DANA STYLE)
   ========================================= */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,0.08); z-index: 900; padding: 10px 10px calc(env(safe-area-inset-bottom) + 12px); border-top: 1px solid rgba(255,255,255,0.5);}
.nav-items { display: flex; justify-content: space-between; align-items: flex-end; position: relative; max-width: 500px; margin: 0 auto;}
.nav-item-bottom { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: #94a3b8; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); padding: 4px 0;}
.nav-item-bottom i { font-size: 22px; transition: transform 0.3s, color 0.3s; }
.nav-item-bottom span { font-size: 10px; font-weight: 700; transition: color 0.3s; }
.nav-item-bottom.active i { transform: translateY(-4px) scale(1.1); }

.center-btn { position: relative; top: -20px; flex: 1.2 !important;}
.center-btn-inner { width: 60px; height: 60px; background: var(--accent-gradient); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4); border: 5px solid var(--bg-body); color: #fff; font-size: 24px; margin-bottom: 4px; transition: transform 0.3s; }
.center-btn:active .center-btn-inner { transform: scale(0.92) translateY(2px); }
.center-btn span { color: var(--primary); font-weight: 800;}

/* =========================================
   4. MODAL DEVELOPER (SMOOTH & CLEAN)
   ========================================= */
.developer-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.65); backdrop-filter: blur(8px); z-index: 1050; display: none; align-items: center; justify-content: center; padding-left: 270px; }
.developer-overlay.show { display: flex; }
.developer-modal { background: #fff; width: 100%; max-width: 450px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes modalPop { 0% { transform: scale(0.8) translateY(20px); opacity: 0; } 100% { transform: scale(1) translateY(0); opacity: 1; } }
.modal-header { padding: 24px; background: #fff; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); }
.brand-text { font-weight: 800; font-size: 20px; color: var(--primary); letter-spacing: -0.5px;}
.developer-close { background: #f1f5f9; border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 16px; color: var(--text-muted); cursor: pointer; transition: 0.3s; display: flex; align-items:center; justify-content:center;}
.developer-close:hover { background: #fee2e2; color: var(--danger); transform: rotate(90deg); }
.modal-body { padding: 24px; background: #fafaf9;}
.status-badge-modern { display: inline-flex; align-items: center; gap: 8px; background: #dcfce7; color: #166534; padding: 8px 14px; border-radius: 20px; font-size: 11px; font-weight: 800; margin-bottom: 16px; border: 1px solid #bbf7d0;}
.pulse-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.dev-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 24px; font-weight: 500;}
.tech-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tech-card { display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--border-color); border-radius: 14px; font-size: 13px; font-weight: 700; box-shadow: 0 2px 10px rgba(0,0,0,0.02); transition: 0.3s;}
.tech-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); border-color: var(--accent);}
.tech-card i { font-size: 20px; }
.modal-footer { padding: 20px 24px; background: #fff; border-top: 1px solid var(--border-color); }
.btn-contact { display: flex; justify-content: center; align-items: center; gap: 8px; background: #25D366; color: white; text-decoration: none; padding: 14px; border-radius: 14px; font-weight: 700; font-size: 14px; transition: 0.3s; box-shadow: 0 8px 20px rgba(37,211,102,0.3);}
.btn-contact:hover { background: #16a34a; transform: translateY(-2px); box-shadow: 0 10px 25px rgba(37,211,102,0.4);}

/* =========================================
   5. FILTER, CARDS & UTILITIES (MERIAH & RAPI)
   ========================================= */
.card { background: var(--bg-white); padding: 24px; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); margin-bottom: 24px; border: 1px solid rgba(0,0,0,0.02); transition: 0.3s;}
.card:hover { box-shadow: var(--shadow-hover); }

/* Filter Unit Wrapper */
.filter-wrapper { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 16px 24px; border-radius: var(--radius-md); box-shadow: var(--shadow-soft); margin-bottom: 24px; flex-wrap: wrap; gap: 15px;}
.filter-wrapper h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; color: var(--primary);}
.unit-select { padding: 10px 20px; border-radius: 20px; border: 2px solid var(--border-color); font-weight: 700; color: var(--primary); background: #f8fafc; cursor: pointer; outline: none; transition: 0.3s; font-family: inherit;}
.unit-select:focus, .unit-select:hover { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,0.1);}

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat-card { background: #fff; padding: 24px; border-radius: var(--radius-md); border: 1px solid var(--border-color); position: relative; overflow: hidden; transition: 0.3s; display: flex; flex-direction: column; justify-content: center;}
.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--accent);}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent-gradient); }
.stat-card.green::before { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card.orange::before { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-card.purple::before { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.stat-card h3 { font-size: 28px; font-weight: 800; color: var(--primary); margin-bottom: 4px;}
.stat-card p { font-size: 13px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 12px; border: none; font-weight: 700; font-size: 13px; cursor: pointer; color: white; transition: 0.3s; font-family: inherit;}
.btn:active { transform: scale(0.95); }
.btn-primary { background: var(--accent-gradient); box-shadow: 0 6px 15px rgba(59,130,246,0.3);}
.btn-primary:hover { box-shadow: 0 8px 20px rgba(59,130,246,0.4); transform: translateY(-2px);}
.btn-success { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 6px 15px rgba(16,185,129,0.3);}
.btn-danger { background: linear-gradient(135deg, #f43f5e, #e11d48); box-shadow: 0 6px 15px rgba(244,63,94,0.3);}
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 6px 15px rgba(245,158,11,0.3);}
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px;}

/* =========================================
   6. TABLE, PAGINATION & SHOW ENTRIES (MODERN)
   ========================================= */
.table-header-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; margin-bottom: 20px;}
.show-entries { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--text-muted);}
.show-entries select { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border-color); font-weight: 700; outline: none; cursor: pointer; transition: 0.3s; font-family: inherit;}
.show-entries select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.1);}
.search-input { padding: 10px 16px; border-radius: 20px; border: 1px solid var(--border-color); font-size: 13px; font-family: inherit; width: 250px; transition: 0.3s; outline: none; background: #f8fafc;}
.search-input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,0.1);}

.table-wrapper { overflow-x: auto; border-radius: 14px; border: 1px solid var(--border-color); margin-bottom: 20px;}
table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff;}
th { padding: 16px; text-align: left; background: #f8fafc; color: var(--text-muted); font-size: 12px; text-transform: uppercase; font-weight: 800; border-bottom: 2px solid var(--border-color); letter-spacing: 0.5px; white-space: nowrap;}
td { padding: 16px; border-bottom: 1px solid var(--border-color); font-weight: 500; color: var(--primary); vertical-align: middle;}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f1f5f9; }

/* Badges for Table Status */
.badge { padding: 6px 12px; border-radius: 20px; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; letter-spacing: 0.5px;}
.badge-hadir, .badge-aktif, .badge-terbayar { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0;}
.badge-terlambat, .badge-proses { background: #fef3c7; color: #92400e; border: 1px solid #fde68a;}
.badge-izin, .badge-pending { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe;}
.badge-sakit, .badge-nonaktif, .badge-belum { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca;}

/* Divisi Badge (Warna-Warni) */
.divisi-badge { padding: 4px 12px; border-radius: 10px; font-size: 11px; font-weight: 700;}
.div-skincare { background: #fce7f3; color: #be185d;}
.div-makeup { background: #fae8ff; color: #86198f;}
.div-haircare { background: #e0f2fe; color: #0369a1;}
.div-fragrance { background: #ffedd5; color: #c2410c;}
.div-bodycare { background: #dcfce7; color: #15803d;}
.div-management { background: #f3f4f6; color: #374151;}

/* Pagination Controls */
.pagination-wrapper { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px;}
.pagination-info { font-size: 13px; color: var(--text-muted); font-weight: 500;}
.pagination { display: flex; gap: 6px; }
.page-btn { padding: 8px 14px; border: 1px solid var(--border-color); background: #fff; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--text-muted); cursor: pointer; transition: 0.3s; font-family: inherit;}
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 10px rgba(59,130,246,0.3);}
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; background: #f8fafc;}

/* Footer */
.main-footer { text-align: center; padding: 24px; margin-top: auto; font-size: 13px; color: var(--text-muted); font-weight: 500;}

/* =========================================
   7. RESPONSIVE MOBILE
   ========================================= */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: 280px; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); z-index: 999; }
    .sidebar-overlay.active { display: block; }
    
    .main-content { margin-left: 0; padding: 16px 16px calc(var(--bottom-nav-height) + 30px); }
    .dashboard-header-card { padding: 24px; flex-direction: column; align-items: flex-start; gap: 20px;}
    .dashboard-header-card h1 { font-size: 22px; }
    .hamburger { display: inline-flex; }
    
    .bottom-nav { display: block; }
    .developer-overlay { padding-left: 0; }

    .filter-wrapper { flex-direction: column; align-items: stretch;}
    .unit-select { width: 100%;}
    
    .table-header-controls { flex-direction: column; align-items: stretch;}
    .search-input { width: 100%;}
    .pagination-wrapper { flex-direction: column; align-items: center; text-align: center;}
}