/* =========================================================
   1. UTAMA
   ========================================================= */
:root {
    --primary: #6366f1;
    --primary-light: #e0e7ff;
    --bg-body: #f1f5f9;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-text-hover: #ffffff;
    --sidebar-active-bg: #1e293b;
    --sidebar-width: 260px;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --border-color: #e2e8f0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: #1e293b;
    overflow-x: hidden;
}

/* =========================================================
   2. SIDEBAR & LAYOUT
   ========================================================= */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    background: var(--sidebar-bg);
    color: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.05);
    left: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem 2.5rem;
    min-height: 100vh;
    transition: margin-left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.main-content.expanded {
    margin-left: 0;
}

.sidebar-toggler {
    background: var(--primary);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 25px;
    z-index: 100;
}

.sidebar-toggler i {
    font-size: 1.5rem !important;
}

.sidebar-toggler:hover {
    background: #4f46e5;
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.nav-pills {
    padding: 1rem 0.8rem;
    gap: 0.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nav-link {
    color: var(--sidebar-text);
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--sidebar-text-hover);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-link i {
    font-size: 1.1rem;
    margin-right: 10px;
    opacity: 0.8;
}

.user-profile-box {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.user-card-dark {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================================================
   3. CONTENT & TABLES
   ========================================================= */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.table-modern {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-modern thead th {
    background: transparent;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    font-weight: 700;
    padding: 0 1.5rem 1rem;
    border: none;
}

.table-modern tbody tr {
    background: white;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s;
}

.table-modern tbody tr:hover {
    transform: translateY(-2px);
}

.table-modern td {
    padding: 1.25rem 1.5rem;
    vertical-align: middle;
    border: none;
}

.table-modern td:first-child {
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.table-modern td:last-child {
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.btn-action {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: none;
    transition: 0.2s;
}

.btn-edit {
    background: #fff7ed;
    color: #ea580c;
}

.btn-edit:hover {
    background: #ffedd5;
}

.btn-delete {
    background: #fef2f2;
    color: #dc2626;
}

.btn-delete:hover {
    background: #fee2e2;
}

/* =========================================================
   4. FORMS, SEARCH, & MODALS
   ========================================================= */
.search-bar {
    background: white;
    border-radius: 50px;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    margin-left: 10px;
    font-weight: 500;
}

.form-control,
.form-select {
    border-radius: 12px;
    padding: 0.7rem 1rem;
    border-color: #e2e8f0;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.modal-content {
    border-radius: 24px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.schedule-row {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
}

.time-inputs input {
    text-align: center;
    font-weight: 600;
    letter-spacing: 1px;
}

#mapPicker {
    height: 300px;
    width: 100%;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
}

/* =========================================================
   5. DASHBOARD
   ========================================================= */
.stat-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.1) !important;
    border-color: transparent;
}

.stat-icon-wrapper {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: transform 0.4s ease;
}

.stat-card:hover .stat-icon-wrapper {
    transform: scale(1.15) rotate(-10deg);
}

.welcome-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #818cf8 100%);
    border-radius: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.welcome-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ls-1 {
    letter-spacing: 1px;
}