*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
}

/* ========== MOBILE HEADER ========== */
.mobile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1565c0;
    color: #fff;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.hamburger {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.mobile-brand {
    font-weight: 600;
    font-size: 16px;
}
.mobile-brand small {
    font-weight: 300;
    font-size: 12px;
    opacity: 0.8;
}

/* ========== SIDEBAR OVERLAY ========== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1035;
}
.sidebar-overlay.show {
    display: block;
}

/* ========== SIDEBAR (mobile off-canvas) ========== */
.sidebar {
    position: fixed;
    top: 0;
    left: -270px;
    width: 270px;
    height: 100%;
    background: linear-gradient(180deg, #0d47a1 0%, #1565c0 100%);
    color: #fff;
    z-index: 1040;
    transition: left 0.3s ease;
    overflow-y: auto;
}
.sidebar.open {
    left: 0;
}
.sidebar-brand {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-brand .brand-icon {
    font-size: 32px;
}
.sidebar-brand h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 5px 0 0;
    color: #fff;
}
.sidebar-brand h5 {
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 1px;
    margin: 0;
    color: #90caf9;
}
.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.75) !important;
    padding: 12px 20px !important;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: 0.2s;
    text-decoration: none;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.1);
    border-left-color: #64b5f6;
}
.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    min-height: calc(100vh - 52px);
    padding: 16px;
}

/* ========== PAGE HEADER ========== */
.page-header {
    padding: 12px 0 16px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}
.page-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1565c0;
    margin: 0;
}
.page-header .breadcrumb {
    background: none;
    padding: 0;
    margin: 4px 0 0;
    font-size: 12px;
}
.page-header .breadcrumb .active {
    color: #1565c0;
}

/* ========== STAT CARDS ========== */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: 0.2s;
    border-left: 4px solid;
    margin-bottom: 14px;
}
.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1565c0;
}
.stat-card .stat-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== CARDS ========== */
.card-custom {
    background: #fff;
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}
.card-custom .card-header {
    background: #f8f9fc;
    border-bottom: 1px solid #eef0f5;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    color: #1565c0;
    border-radius: 10px 10px 0 0 !important;
}
.card-custom .card-body {
    padding: 16px;
}

/* ========== BUTTONS ========== */
.btn-blue {
    background: #1565c0;
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-blue:hover {
    background: #1976d2;
    color: #fff;
}
.btn-outline-blue {
    border: 2px solid #1565c0;
    color: #1565c0;
    background: transparent;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-outline-blue:hover {
    background: #1565c0;
    color: #fff;
}
.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
}

/* ========== TABLES ========== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-custom {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}
.table-custom thead th {
    background: #f8f9fc;
    color: #1565c0;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    padding: 10px;
    white-space: nowrap;
    text-align: left;
}
.table-custom tbody td {
    padding: 8px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

/* ========== BADGES ========== */
.badge-in, .badge-out {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 11px;
}
.badge-in {
    background: #e8f5e9;
    color: #2e7d32;
}
.badge-out {
    background: #fbe9e7;
    color: #c62828;
}

/* ========== SEARCH BOX ========== */
.search-box {
    position: relative;
}
.search-box input {
    width: 100%;
    padding: 10px 10px 10px 38px;
    border-radius: 25px;
    border: 2px solid #e0e0e0;
    height: 40px;
    font-size: 14px;
}
.search-box input:focus {
    border-color: #1565c0;
    box-shadow: none;
    outline: none;
}
.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* ========== FORMS ========== */
.form-custom label {
    font-weight: 600;
    color: #444;
    font-size: 13px;
    margin-bottom: 4px;
    display: block;
}
.form-custom .form-control, .form-custom .form-select {
    width: 100%;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
}
.form-custom .form-control:focus, .form-custom .form-select:focus {
    border-color: #1565c0;
    box-shadow: none;
    outline: none;
}

/* ========== MOVEMENT TYPE TOGGLE ========== */
.movement-type-btn {
    display: inline-block;
    padding: 8px 18px;
    font-weight: 600;
    font-size: 13px;
    border-radius: 25px;
    cursor: pointer;
    transition: 0.2s;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #666;
}
.movement-type-btn.active-in {
    background: #e8f5e9;
    border-color: #2e7d32;
    color: #2e7d32;
}
.movement-type-btn.active-out {
    background: #fbe9e7;
    border-color: #c62828;
    color: #c62828;
}

/* ========== TABS ========== */
.nav-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.nav-tabs .nav-link {
    flex-shrink: 0;
    color: #666 !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 16px !important;
    background: none !important;
    text-decoration: none;
    white-space: nowrap;
}
.nav-tabs .nav-link:hover {
    color: #1565c0 !important;
    border-bottom-color: #bbdefb !important;
}
.nav-tabs .nav-link.active {
    color: #1565c0 !important;
    border-bottom-color: #1565c0 !important;
}

/* ========== ACCORDION ========== */
.accordion-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}
.accordion-header {
    margin: 0;
}
.accordion-button {
    width: 100%;
    text-align: left;
    background: #f8f9fc;
    border: none;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.accordion-body {
    padding: 12px 16px;
}

/* ========== FOOTER ========== */
.footer-info {
    text-align: center;
    padding: 16px;
    color: #999;
    font-size: 12px;
    border-top: 1px solid #e0e0e0;
    margin-top: 24px;
}

/* ========== DESKTOP (≥992px) ========== */
@media (min-width: 992px) {
    .mobile-header {
        display: none;
    }
    .sidebar-overlay {
        display: none !important;
    }
    .sidebar {
        left: 0;
        width: 250px;
    }
    .main-content {
        margin-left: 250px;
        padding: 20px 30px;
        min-height: 100vh;
    }
    .page-header h3 {
        font-size: 24px;
    }
    .stat-card .stat-value {
        font-size: 28px;
    }
    .card-custom .card-body {
        padding: 20px;
    }
}

/* ========== TABLET (≥576px) ========== */
@media (min-width: 576px) {
    .main-content {
        padding: 20px;
    }
}
