/* ===========================================
   VILLA ANDHITA DASHBOARD - RESPONSIVE CSS
   Comprehensive Device-Aware Styling System
   =========================================== */

/* ===========================================
   BREAKPOINT REFERENCE:
   - Phone:      320px - 480px   (xs)
   - Tablet:     481px - 768px   (sm)
   - Laptop:     769px - 1024px  (md)
   - Desktop:    1025px - 1440px (lg)
   - Large:      1441px+         (xl)
   =========================================== */

/* ===========================================
   1. MOBILE MORE MENU - ALWAYS NEEDED
   =========================================== */
.mobile-more-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.mobile-more-menu.active {
    display: block;
}

.more-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.more-menu-content {
    position: absolute;
    bottom: 70px;
    left: 1rem;
    right: 1rem;
    background: var(--card-color);
    border-radius: 16px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-more-menu.active .more-menu-content {
    transform: translateY(0);
    opacity: 1;
}

.more-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.more-menu-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

.more-menu-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.more-menu-close:hover {
    background: var(--bg-color);
    color: var(--text-color);
}

.more-menu-items {
    padding: 0.5rem 0;
    max-height: 50vh;
    overflow-y: auto;
}

.more-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s;
}

.more-menu-item:hover,
.more-menu-item:active {
    background: var(--bg-color);
}

.more-menu-item .material-icons-round {
    font-size: 24px;
    color: var(--primary);
}

.more-menu-item span:not(.material-icons-round) {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ===========================================
   2. BOTTOM NAVIGATION - BASE (Hidden By Default)
   =========================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-color);
    border-top: 1px solid var(--border-color);
    display: none;
    justify-content: space-around;
    align-items: stretch;
    z-index: 1000;
    padding: 0;
    height: 60px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    color: var(--text-muted);
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
}

.bottom-nav .nav-item.active {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    margin: 4px;
}

.bottom-nav .nav-item .material-icons-round {
    font-size: 24px;
}

.bottom-nav .nav-item span:not(.material-icons-round) {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ===========================================
   2.5 EXTRA SMALL SCREENS (320px - 375px)
   iPhone SE, Older iPhones, Tiny Android Phones
   =========================================== */
@media screen and (max-width: 375px) {

    /* Bottom Nav - Smaller Text To Prevent Truncation */
    .bottom-nav {
        height: calc(55px + env(safe-area-inset-bottom, 0));
    }

    .bottom-nav .nav-item {
        padding: 6px 2px;
    }

    .bottom-nav .nav-item .material-icons-round {
        font-size: 20px;
    }

    .bottom-nav .nav-item span:not(.material-icons-round) {
        font-size: 8px;
        letter-spacing: -0.3px;
        max-width: 50px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Main Content - Tighter Padding */
    .main-content {
        padding: 0.75rem;
        padding-top: calc(var(--header-height) + 0.5rem);
        padding-bottom: calc(75px + env(safe-area-inset-bottom, 0));
    }

    /* Header - Smaller */
    .header {
        padding: 0 0.75rem;
    }

    .header-title h1 {
        font-size: 12px;
    }

    /* Status Cards - Smaller For Tiny Screens */
    .status-cards,
    .status-summary,
    .room-status-grid {
        gap: 0.375rem;
        max-width: calc(100vw - 1.5rem);
    }

    .status-cards>*,
    .status-summary>*,
    .room-status-grid>* {
        min-width: 65px;
        max-width: 75px;
        padding: 0.5rem;
    }

    .status-cards .card-value,
    .status-summary .card-value {
        font-size: 1.25rem;
    }

    .status-cards .card-label,
    .status-summary .card-label {
        font-size: 0.6rem;
    }

    /* Modal - Full Screen On Tiny Devices */
    .modal-content {
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    /* Modal Form - Stack All Form Groups */
    .modal-body .form-row {
        flex-direction: column !important;
        gap: 0.75rem;
    }

    .modal-body .form-group {
        width: 100% !important;
    }

    /* Date Inputs In Modal - Stack Vertically */
    .modal-body .form-row:has(input[type="date"]) {
        flex-direction: column !important;
    }

    /* Summary Cards - 2 Columns Tighter */
    .summary-cards {
        gap: 0.375rem;
    }

    .summary-card {
        padding: 0.5rem;
    }

    .summary-card .card-value {
        font-size: 0.9rem;
    }

    .summary-card .card-icon {
        width: 28px;
        height: 28px;
    }

    /* Page Title */
    .page-title {
        font-size: 1.1rem !important;
    }

    /* Room Cards */
    .room-card {
        padding: 0.75rem;
    }

    /* Charts - Smaller Height */
    .chart-container canvas {
        max-height: 200px;
    }

    /* ===========================================
       XS SCREEN: AGGRESSIVE FORM STACKING
       ALL Forms Must Stack On Tiny Screens
       =========================================== */

    /* Stack ALL Form Rows - Not Just Modal */
    .form-row,
    .form-row.income-row,
    .form-row.expense-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .form-row .form-group,
    .form-group {
        width: 100% !important;
        flex: none !important;
    }

    /* Transaction Form Specific Fixes */
    .transaction-form .form-row {
        flex-direction: column !important;
    }

    /* All Inputs And Selects Full Width */
    .form-input,
    .form-select,
    input[type="text"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Card Containment - Prevent Any Overflow */
    .card {
        width: 100% !important;
        max-width: calc(100vw - 1.5rem) !important;
        overflow: hidden;
    }

    /* Table Container - Prevent Overflow */
    .table-container {
        max-width: calc(100vw - 1.5rem) !important;
        overflow-x: auto;
    }

    /* Filter Bar - Stack Everything */
    .filter-bar {
        flex-direction: column !important;
        width: 100%;
        gap: 0.5rem;
    }

    .filter-bar>* {
        width: 100% !important;
        min-width: auto !important;
    }

    /* Page Header Stack */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
}

/* ===========================================
   3. PHONE PORTRAIT (320px - 480px)
   Smallest Screens, Prioritize Essential Content
   =========================================== */
@media screen and (max-width: 480px) {

    /* CRITICAL: Prevent Horizontal Scroll On Body */
    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    /* Layout */
    .sidebar {
        display: none !important;
    }

    .bottom-nav {
        display: flex !important;
        /* Safe Area For Phones With Home Indicator */
        padding-bottom: env(safe-area-inset-bottom, 0);
        height: calc(60px + env(safe-area-inset-bottom, 0));
    }

    /* Header - Safe Area For Notch */
    .header {
        padding: 0 1rem;
        padding-top: env(safe-area-inset-top, 0);
        min-height: calc(var(--header-height) + env(safe-area-inset-top, 0));
    }

    /* Main Content - Proper Spacing */
    .main-content {
        margin-left: 0 !important;
        padding: 1rem;
        padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0) + 0.5rem);
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
        min-height: 100vh;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Typography - Smaller */
    h1,
    .page-title {
        font-size: 1.25rem !important;
    }

    h2 {
        font-size: 1.1rem !important;
    }

    h3 {
        font-size: 1rem !important;
    }

    /* Cards */
    .card {
        padding: 0.875rem;
        border-radius: 12px;
    }

    /* Page Header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    /* Summary Cards - Stack 2x2 */
    .summary-cards {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem;
    }

    .summary-card {
        padding: 0.75rem;
    }

    .summary-card .card-value {
        font-size: 1rem;
    }

    .summary-card .card-icon {
        width: 32px;
        height: 32px;
    }

    /* Charts - Single Column */
    .charts-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .chart-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .chart-legend {
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.7rem;
    }

    /* FINANCIAL PAGE MOBILE FIXES */
    /* Cards Grid - 2x2 on mobile */
    .cards-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }

    /* Stat Card - Smaller for mobile */
    .stat-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .stat-card .card-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
    }

    .stat-card .card-icon .material-icons-round {
        font-size: 18px !important;
    }

    .card-value {
        font-size: 1.1rem !important;
    }

    .card-title {
        font-size: 0.7rem !important;
    }

    /* Filter Bar - Stack dropdowns */
    .filter-bar {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .filter-bar .form-select {
        flex: 1;
        min-width: 80px !important;
        padding: 8px 10px !important;
        font-size: 0.8rem !important;
    }

    /* Chart Toggle Buttons */
    .chart-toggle {
        display: flex;
        gap: 4px;
    }

    .toggle-btn {
        font-size: 0.7rem !important;
        padding: 4px 8px !important;
    }

    /* Chart Container Donut - Legend Below */
    .chart-container-donut {
        height: 220px !important;
    }

    /* Donut Chart Legend - Move to Bottom on Mobile */
    .chart-container-donut canvas {
        max-height: 180px;
    }

    /* EMPLOYEE PAGE MOBILE FIXES */
    /* Employee status cards - always 3 columns but smaller */
    .cards-grid[style*="repeat(3, 1fr)"] {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.375rem !important;
    }

    .cards-grid[style*="repeat(3, 1fr)"] .card {
        padding: 0.5rem !important;
    }

    .cards-grid[style*="repeat(3, 1fr)"] .card-title {
        font-size: 0.65rem !important;
    }

    .cards-grid[style*="repeat(3, 1fr)"] .card-value {
        font-size: 1.25rem !important;
    }

    /* Employee Table - Essential columns only visible */
    table td:nth-child(3),
    table th:nth-child(3),
    /* Masuk */
    table td:nth-child(4),
    table th:nth-child(4),
    /* Berhenti */
    table td:nth-child(8),
    table th:nth-child(8) {
        /* Lama Kerja */
        display: none;
    }

    /* Rooms Status - Horizontal Scroll With Proper Containment */
    .status-cards,
    .status-summary,
    .room-status-grid {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        gap: 0.5rem;
        padding: 0.25rem;
        padding-bottom: 0.5rem;
        scroll-snap-type: x mandatory;
        width: 100%;
        max-width: calc(100vw - 2rem);
        margin: 0 auto;
    }

    .status-cards>*,
    .status-summary>*,
    .room-status-grid>* {
        flex: 0 0 auto;
        min-width: 85px;
        max-width: 100px;
        scroll-snap-align: start;
    }

    /* Room Cards - Full Width With Containment */
    .room-grid,
    .villa-grid {
        grid-template-columns: 1fr !important;
        width: 100%;
        max-width: 100%;
    }

    .room-card {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    /* Forms - Stack Everything */
    .form-row,
    .filter-bar {
        flex-direction: column !important;
        gap: 0.75rem;
    }

    .form-group {
        width: 100% !important;
    }

    select,
    input,
    textarea {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Tables - Scroll */
    .table-responsive,
    .card:has(table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 500px;
        font-size: 0.8rem;
    }

    /* Employee Grid */
    .employee-grid {
        grid-template-columns: 1fr !important;
    }

    /* Payslip */
    .payslip-container {
        padding: 0 0.5rem;
    }

    .payslip-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }

    .payslip-logo {
        width: 50px;
        height: 50px;
    }

    .company-info h2 {
        font-size: 1.1rem;
    }

    .payslip-title h3 {
        font-size: 1.25rem;
    }

    .payslip-info,
    .payslip-details {
        grid-template-columns: 1fr !important;
        padding: 0.75rem;
    }

    .payslip-info .info-row,
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .detail-row.total {
        flex-direction: row;
        justify-content: space-between;
    }

    .net-salary .amount {
        font-size: 1.5rem;
    }

    /* Attendance Grid */
    .attendance-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .att-item {
        padding: 0.5rem;
    }

    .att-count {
        font-size: 0.9rem;
    }

    .att-label {
        font-size: 0.6rem;
    }

    /* Settings Version History */
    .changelog-table {
        overflow-x: auto;
    }

    .changelog-table table {
        min-width: 350px;
    }

    /* Modal - Better For Phones */
    .modal-content {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
        margin: 5vh auto;
        overflow-y: auto;
    }

    .modal-header {
        padding: 1rem;
        position: sticky;
        top: 0;
        background: var(--card-color);
        z-index: 10;
    }

    .modal-body {
        padding: 1rem;
    }

    /* Modal Form - Stack Form Rows On Phone */
    .modal-body .form-row {
        display: flex;
        flex-direction: column !important;
        gap: 1rem;
    }

    .modal-body .form-group {
        width: 100% !important;
        flex: none !important;
    }

    /* Date Inputs In Modal - ALWAYS Stack */
    .modal-body input[type="date"] {
        width: 100% !important;
    }

    /* Date Picker - FIXED: Proper Containment To Prevent Overflow */
    .date-picker-wrapper,
    .date-picker-container {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        max-width: 100%;
    }

    .date-display {
        width: 100%;
        text-align: center;
    }

    /* Calendar Input - Prevent Overflow */
    input[type="date"],
    input[type="datetime-local"] {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* FIX: Calendar/Date Picker Popup Containment */
    .date-picker-container,
    .calendar-container,
    .filter-bar {
        position: relative;
        overflow: visible;
        width: 100%;
        max-width: calc(100vw - 2rem);
    }

    /* Rooms Page Specific Date Navigation */
    .date-navigation,
    .date-nav {
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
        justify-content: center;
    }

    .date-navigation button,
    .date-nav button {
        flex-shrink: 0;
    }

    /* Performance */
    .performance-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ===========================================
   4. TABLET PORTRAIT (481px - 768px)
   Medium Screens, Some Horizontal Space
   =========================================== */
@media screen and (min-width: 481px) and (max-width: 768px) {

    /* Prevent Horizontal Scroll */
    html,
    body {
        overflow-x: hidden !important;
    }

    /* Layout */
    .sidebar {
        display: none !important;
    }

    .bottom-nav {
        display: flex !important;
        padding-bottom: env(safe-area-inset-bottom, 0);
        height: calc(60px + env(safe-area-inset-bottom, 0));
    }

    .main-content {
        margin-left: 0 !important;
        padding: 1.25rem;
        padding-top: calc(var(--header-height) + 0.5rem);
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
        overflow-x: hidden;
    }

    /* Typography */
    h1,
    .page-title {
        font-size: 1.5rem;
    }

    /* Summary Cards - 2x2 */
    .summary-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }

    /* Charts - Single Or 2 Columns */
    .charts-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    /* Rooms Status - Better Spacing */
    .status-cards,
    .status-summary {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.75rem;
    }

    .status-cards>* {
        flex: 0 0 auto;
        min-width: 90px;
    }

    /* Room Grid - 2 Columns */
    .room-grid,
    .villa-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Forms - 2 Columns Where Possible */
    .form-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .form-group.full-width {
        grid-column: 1 / -1;
    }

    /* Employee Grid - 2 Columns */
    .employee-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Payslip - 2 Column Info */
    .payslip-header {
        flex-direction: row;
        justify-content: space-between;
    }

    .payslip-info {
        grid-template-columns: repeat(2, 1fr);
    }

    .payslip-details {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Performance - 3 Columns */
    .performance-cards {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Attendance - 6 Columns */
    .attendance-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    /* Table */
    table {
        font-size: 0.85rem;
    }
}

/* ===========================================
   5. LAPTOP/TABLET LANDSCAPE (769px - 1024px)
   Larger Tablets And Small Laptops
   =========================================== */
@media screen and (min-width: 769px) and (max-width: 1024px) {

    /* Layout - Compact Sidebar */
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
        padding: 1.5rem;
    }

    .bottom-nav {
        display: none !important;
    }

    /* Summary Cards - 4 columns */
    .summary-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    /* Charts - 2 columns */
    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Room Grid - 3 columns */
    .room-grid,
    .villa-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Employee Grid - 2-3 columns */
    .employee-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Performance - 5 columns */
    .performance-cards {
        grid-template-columns: repeat(5, 1fr);
    }

    /* Forms */
    .form-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* ===========================================
   6. DESKTOP (1025px - 1440px)
   Standard Desktop Experience
   =========================================== */
@media screen and (min-width: 1025px) and (max-width: 1440px) {

    /* Layout - Full Sidebar */
    .sidebar {
        width: var(--sidebar-width);
    }

    .main-content {
        margin-left: var(--sidebar-width);
        padding: 2rem;
    }

    .bottom-nav {
        display: none !important;
    }

    /* Summary Cards */
    .summary-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }

    /* Charts */
    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Room Grid */
    .room-grid,
    .villa-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Employee Grid */
    .employee-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Forms */
    .form-row {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

/* ===========================================
   7. LARGE DESKTOP (1441px+)
   Ultra-Wide And 4K Monitors
   =========================================== */
@media screen and (min-width: 1441px) {

    /* Layout */
    .main-content {
        max-width: 1600px;
        margin-left: var(--sidebar-width);
        margin-right: auto;
        padding: 2rem 3rem;
    }

    /* Summary Cards - More Space */
    .summary-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .summary-card {
        padding: 1.5rem;
    }

    .summary-card .card-value {
        font-size: 1.75rem;
    }

    /* Charts */
    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Room Grid - More Columns */
    .room-grid,
    .villa-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    /* Employee Grid */
    .employee-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Performance */
    .performance-cards {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.25rem;
    }
}

/* ===========================================
   8. LANDSCAPE ORIENTATION ADJUSTMENTS
   =========================================== */
@media screen and (max-height: 500px) and (orientation: landscape) {

    /* Compact Header For Landscape Phones */
    .header {
        height: 50px;
    }

    .bottom-nav {
        height: 50px;
    }

    .bottom-nav .nav-item span:not(.material-icons-round) {
        display: none;
    }

    .bottom-nav .nav-item .material-icons-round {
        font-size: 20px;
    }

    /* More Menu - Smaller */
    .more-menu-content {
        bottom: 55px;
        max-height: 60vh;
    }

    .more-menu-item {
        padding: 0.75rem 1rem;
    }
}

/* ===========================================
   9. TOUCH DEVICE OPTIMIZATIONS
   =========================================== */
@media (hover: none) and (pointer: coarse) {

    /* Larger Touch Targets */
    button,
    .btn,
    .nav-item,
    .more-menu-item {
        min-height: 44px;
    }

    select,
    input {
        min-height: 44px;
        font-size: 16px !important;
        /* Prevent Zoom On iOS */
    }

    /* Remove Hover States */
    .btn:hover,
    .nav-item:hover,
    .card:hover {
        transform: none;
    }

    /* Smooth Scrolling */
    .status-cards,
    .chart-container,
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

/* ===========================================
   10. HIGH CONTRAST / ACCESSIBILITY
   =========================================== */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
    }

    .card {
        border: 2px solid var(--border-color);
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* ===========================================
   11. REDUCED MOTION
   =========================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .more-menu-content {
        transition: none;
    }
}

/* ===========================================
   12. PRINT STYLES
   =========================================== */
@media print {

    .sidebar,
    .bottom-nav,
    .header,
    .mobile-more-menu,
    .btn,
    .filter-bar {
        display: none !important;
    }

    .main-content {
        margin: 0;
        padding: 0;
    }

    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: white;
        color: black;
    }

    /* Payslip Print Optimization */
    .payslip-container {
        max-width: 100%;
    }

    .payslip-card {
        box-shadow: none;
        border: 1px solid #333;
    }
}