/* Custom Scrollbar for tab container */
.tab-container::-webkit-scrollbar {
    height: 4px;
}
.tab-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.tab-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.tab-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Tab Button Styles */
.tab-btn {
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
}
.tab-btn:hover {
    color: #334155;
    background: #f8fafc;
}
.tab-btn.active {
    color: #002D62; /* Primary */
    border-bottom: 2px solid #002D62;
}

/* Item Card Selection */
.item-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}
.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.item-card.selected {
    border-color: #002D62;
    background-color: #f8fafc;
}
.item-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(100%);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-warning { background-color: #fef3c7; color: #b45309; }
.badge-info { background-color: #e0f2fe; color: #0369a1; }
.badge-success { background-color: #dcfce3; color: #166534; }
.badge-danger { background-color: #fee2e2; color: #b91c1c; }

/* Modal Animation */
.modal-show {
    display: flex !important;
}
.modal-content-show {
    transform: scale(1) !important;
    opacity: 1 !important;
}

/* ===================================
   MOBILE RESPONSIVE STYLES
   =================================== */

/* Hamburger button — hidden on desktop */
#mobile-menu-btn {
    display: none;
}

/* Sidebar overlay backdrop */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 40;
}
#sidebar-overlay.active {
    display: block;
}

/* Mobile bottom navigation */
#mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    /* === Layout === */
    #view-app {
        flex-direction: column;
    }

    /* === Sidebar becomes off-canvas drawer === */
    aside {
        position: fixed !important;
        top: 0;
        left: -280px;
        width: 280px !important;
        height: 100% !important;
        z-index: 50;
        transition: left 0.3s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        overflow-y: auto;
    }
    aside.sidebar-open {
        left: 0 !important;
    }

    /* === Top header bar on mobile === */
    #mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
        position: sticky;
        top: 0;
        z-index: 30;
        flex-shrink: 0;
    }

    /* === Main content takes full screen === */
    main {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 70px !important; /* space for bottom nav */
    }

    /* === Hamburger button === */
    #mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background: #f1f5f9;
        border: none;
        cursor: pointer;
        color: #002D62;
        font-size: 18px;
    }

    /* === Bottom navigation === */
    #mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #e5e7eb;
        z-index: 30;
        height: 64px;
    }
    .mobile-nav-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        font-size: 10px;
        font-weight: 500;
        color: #6b7280;
        border: none;
        background: transparent;
        cursor: pointer;
        padding: 4px 0;
        transition: color 0.2s;
        font-family: 'Prompt', sans-serif;
    }
    .mobile-nav-btn i {
        font-size: 18px;
    }
    .mobile-nav-btn.active,
    .mobile-nav-btn:hover {
        color: #002D62;
    }
    .mobile-nav-btn.active i {
        color: #002D62;
    }

    /* === Table responsive: horizontal scroll === */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
    table {
        font-size: 13px;
    }
    th, td {
        padding: 8px 10px !important;
    }

    /* === Form grid: stack to single column === */
    .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    .md\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    /* === Cards === */
    .item-card {
        font-size: 13px;
    }

    /* === Page padding === */
    .p-6 {
        padding: 16px !important;
    }
    .p-8 {
        padding: 16px !important;
    }

    /* === Modal: full screen on mobile === */
    .max-w-lg, .max-w-xl, .max-w-2xl, .max-w-3xl {
        max-width: calc(100vw - 24px) !important;
        margin: 12px !important;
    }
}

