/* DonXEra - Minimalist Inventory Manager */

:root {
    --primary: #000000;
    --secondary: #666666;
    --accent: #f0f0f0;
    --text: #1a1a1a;
    --text-light: #666666;
    --bg-main: #ffffff;
    --bg-secondary: #fafafa;
    --border: #e5e5e5;
    --shadow: rgba(0, 0, 0, 0.04);
    --shadow-hover: rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    background: var(--bg-main);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Minimalist Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Clean Navbar */
.navbar {
    background: var(--bg-main) !important;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    transition: all 0.2s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary) !important;
    letter-spacing: -0.5px;
    transition: opacity 0.2s ease;
}

.navbar-brand:hover {
    opacity: 0.7;
}

.nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    font-size: 0.9rem;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary) !important;
    background: var(--bg-secondary);
}

.nav-link.active {
    color: var(--primary) !important;
    background: var(--accent);
}

.nav-link i {
    font-size: 0.9rem;
    margin-right: 0.25rem;
}

/* Minimal Page Header */
.page-header {
    background: var(--bg-main);
    padding: 3rem 0 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0.5rem 0 0 0;
}

/* Clean Cards */
.card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-main);
    box-shadow: 0 1px 3px var(--shadow);
    transition: all 0.2s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 4px 12px var(--shadow-hover);
    transform: translateY(-2px);
}

.metric-card {
    position: relative;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.card-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: var(--text-light);
}

/* Minimal Number Display */
.card-title.mb-0 {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--primary);
    letter-spacing: -1px;
}

/* Clean Buttons */
.btn {
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-hover);
}

.btn-outline-primary {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-outline-danger {
    border: 1px solid #dc3545;
    color: #dc3545;
    background: transparent;
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: white;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

/* Minimal Tables */
.table-responsive {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background: var(--bg-secondary);
}

.table thead th {
    border: none;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.table tbody tr {
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.table tbody tr:hover {
    background: var(--bg-secondary);
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border: none;
    font-size: 0.9rem;
}

.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    background: var(--accent);
}

.sortable i {
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

.sortable:hover i {
    opacity: 1;
}

/* Clean Badges */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}

.bg-success {
    background: #f0fdf4 !important;
    color: #166534 !important;
    border-color: #bbf7d0 !important;
}

.bg-warning {
    background: #fffbeb !important;
    color: #92400e !important;
    border-color: #fde68a !important;
}

.bg-danger {
    background: #fef2f2 !important;
    color: #991b1b !important;
    border-color: #fecaca !important;
}

.bg-primary {
    background: #f0f0f0 !important;
    color: var(--primary) !important;
    border-color: #e5e5e5 !important;
}

/* Category chips: remove gray background, use subtle outline + brand color text */
.badge-category {
    background: transparent !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-radius: 999px;
}

.badge-category.cat-sneakers {
    color: #2563eb !important; /* blue */
    border: 1px solid rgba(37, 99, 235, 0.35) !important;
}

.badge-category.cat-clothing {
    color: #7c3aed !important; /* violet */
    border: 1px solid rgba(124, 58, 237, 0.35) !important;
}

.badge-category.cat-accessories {
    color: #0d9488 !important; /* teal */
    border: 1px solid rgba(13, 148, 136, 0.35) !important;
}

/* Minimal category icons */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #ffffff;
    margin-right: 0.4rem;
    line-height: 1;
}

.icon.cat-sneakers { background: #2563eb; }
.icon.cat-clothing { background: #7c3aed; }
.icon.cat-accessories { background: #0d9488; }

.bg-info {
    background: #f0f9ff !important;
    color: #075985 !important;
    border-color: #bae6fd !important;
}

/* Clean Form Controls */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 0.65rem 1rem;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    background: var(--bg-main);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
    outline: none;
}

.input-group-text {
    border-radius: 6px 0 0 6px;
    border: 1px solid var(--border);
    border-right: none;
    background: var(--bg-secondary);
    color: var(--text-light);
}

/* Minimal Alerts */
.alert {
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert i {
    margin-right: 0.5rem;
}

/* Clean Footer */
.footer {
    background: var(--bg-main);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

.footer p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 400;
}

/* Minimal Icons */
i.bi {
    transition: transform 0.2s ease;
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Hover Effects */
.glow-on-hover:hover {
    box-shadow: 0 4px 12px var(--shadow-hover);
}

/* Responsive */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .card-title.mb-0 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* Clean Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Subtle Table Highlight */
.table-danger {
    background: #fef2f2 !important;
    border-left: 2px solid #991b1b;
}

.table-warning {
    background: #fffbeb !important;
}

/* Low Stock Showcase chips */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8rem;
    border: 1px solid transparent;
}

.chip-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.chip-danger {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}


/* Buttons */
.btn {
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-1);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--gradient-4);
    border: none;
}

.btn-warning {
    background: var(--gradient-5);
    border: none;
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
}

/* Tables */
.table-responsive {
    border-radius: 15px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background: var(--gradient-1);
    color: white;
}

.table thead th {
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    font-size: 0.85rem;
}

.table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: scale(1.01);
    box-shadow: var(--shadow-sm);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border: none;
}

.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sortable i {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.sortable:hover i {
    opacity: 1;
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.bg-success {
    background: var(--gradient-4) !important;
}

.bg-warning {
    background: var(--gradient-5) !important;
}

.bg-danger {
    background: var(--gradient-2) !important;
}

.bg-primary {
    background: var(--gradient-1) !important;
}

.bg-secondary {
    background: linear-gradient(135deg, #868f96 0%, #596164 100%) !important;
}

.bg-info {
    background: var(--gradient-3) !important;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

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

.input-group-text {
    border-radius: 10px 0 0 10px;
    border: 2px solid #e5e7eb;
    border-right: none;
    background: var(--light);
    color: var(--dark);
}

/* Alerts */
.alert {
    border-radius: 15px;
    border: none;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-md);
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    border-left: 4px solid var(--warning);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
    border-left: 4px solid var(--success);
}

.alert i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* Icons */
i.bi {
    transition: all 0.3s ease;
}

.card:hover i.bi {
    transform: scale(1.1) rotate(5deg);
}

/* Loading Animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.loading {
    animation: shimmer 2s infinite;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .card-title.mb-0 {
        font-size: 1.75rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .container {
        padding: 1rem;
        margin: 1rem auto;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    border-image-slice: 1;
}

.footer p {
    margin: 0;
    color: var(--dark);
    font-weight: 600;
}

/* Hover Glow Effect */
.glow-on-hover {
    position: relative;
}

.glow-on-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    opacity: 0;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    transition: opacity 0.3s ease;
}

.glow-on-hover:hover::after {
    opacity: 1;
}

/* Pulse Animation for Critical Items */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
    }
}

.table-danger {
    animation: pulse-glow 2s infinite;
}

/* Smooth Fade In */
.fade-in {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   CATEGORY FILTER BUTTONS
   ======================================== */

.category-filter-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.btn-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-main);
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
}

.btn-category i {
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.btn-category:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow);
}

.btn-category:hover i {
    opacity: 1;
}

.btn-category.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px var(--shadow-hover);
}

.btn-category.active i {
    opacity: 1;
}

/* Mobile responsive category buttons */
@media (max-width: 575.98px) {
    .btn-category {
        flex: 1 1 calc(50% - 0.375rem);
        justify-content: center;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* ========================================
   SIZE DROPDOWN (DESKTOP HOVER)
   ======================================== */

.size-badge {
    font-weight: 600;
    color: var(--text);
}

.inventory-row {
    position: relative;
}

.size-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    min-width: 200px;
    box-shadow: 0 4px 12px var(--shadow-hover);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    margin-top: 0.25rem;
}

.inventory-row:hover .size-dropdown {
    opacity: 1;
    visibility: visible;
}

.size-dropdown-header {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.size-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.size-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-secondary);
    transition: background 0.2s ease;
}

.size-item:hover {
    background: var(--accent);
}

.size-item.low-stock {
    background: #fffbeb;
    border-left: 2px solid #f59e0b;
}

.size-item.out-of-stock {
    background: #fef2f2;
    border-left: 2px solid #ef4444;
    opacity: 0.6;
}

.size-label {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.85rem;
}

.size-qty {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.size-item.low-stock .size-qty {
    color: #92400e;
    font-weight: 600;
}

.size-item.out-of-stock .size-qty {
    color: #991b1b;
    font-weight: 600;
}

/* ========================================
   MOBILE SIZE DROPDOWN (TAP TO EXPAND)
   ======================================== */

.size-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary);
    transition: color 0.2s ease;
}

.size-toggle:hover {
    color: var(--secondary);
}

.size-toggle i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.mobile-sizes-dropdown {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.mobile-sizes-header {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.mobile-size-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-size-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.mobile-size-item.low-stock {
    border-left: 3px solid #f59e0b;
    background: #fffbeb;
}

.mobile-size-item.out-of-stock {
    border-left: 3px solid #ef4444;
    background: #fef2f2;
    opacity: 0.7;
}

.mobile-size-item .size-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary);
}

.mobile-size-item .size-qty {
    font-size: 0.8rem;
    font-weight: 600;
}

/* ========================================
   MOBILE RESPONSIVE INVENTORY CARDS
   ======================================== */

/* Mobile Inventory Card Layout */
.mobile-inventory-card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    padding: 1rem;
    transition: all 0.2s ease;
}

.mobile-inventory-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px var(--shadow-hover);
}

/* Card Header */
.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.mobile-card-title {
    flex: 1;
    min-width: 0; /* Prevent text overflow */
}

.mobile-card-title strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.mobile-card-sku {
    font-size: 0.75rem;
    color: var(--text-light);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.mobile-card-status {
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Card Body */
.mobile-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-info-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mobile-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0; /* Prevent overflow */
}

.mobile-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    font-weight: 600;
}

.mobile-info-item strong {
    color: var(--primary);
    font-size: 0.9rem;
}

.mobile-info-item span:not(.badge):not(.mobile-label) {
    font-size: 0.85rem;
    color: var(--text);
}

/* Mobile Badge Sizes */
@media (max-width: 991.98px) {
    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

/* ========================================
   MOBILE RESPONSIVE ADJUSTMENTS
   ======================================== */

/* Container padding on mobile */
@media (max-width: 767.98px) {
    .container {
        padding: 0 1rem;
    }
    
    .page-header {
        padding: 2rem 0 1.5rem 0;
        margin-bottom: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header p {
        font-size: 0.85rem;
    }
}

/* Search and filter controls on mobile */
@media (max-width: 767.98px) {
    .row.mb-3 .col-md-6,
    .row.mb-3 .col-md-3 {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .row.mb-3 .col-md-6:last-child,
    .row.mb-3 .col-md-3:last-child {
        margin-bottom: 0;
    }
}

/* Summary cards responsive */
@media (max-width: 767.98px) {
    .row.mb-3 .col-md-3 {
        padding: 0.5rem;
    }
    
    .card-body.py-2 small {
        font-size: 0.7rem;
    }
    
    .card-body.py-2 strong {
        font-size: 0.9rem;
    }
}

/* Card header buttons on mobile */
@media (max-width: 575.98px) {
    .card-header h5 {
        font-size: 0.95rem;
    }
    
    .card-header .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .card-header .btn-sm i {
        font-size: 0.85rem;
    }
}

/* Navbar responsive */
@media (max-width: 991.98px) {
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem !important;
    }
    
    .navbar-collapse {
        margin-top: 0.5rem;
    }
}

/* Table responsive improvements */
@media (max-width: 991.98px) {
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
}

/* Percentage-based layout for very small screens */
@media (max-width: 575.98px) {
    .mobile-info-row {
        flex-direction: column;
    }
    
    .mobile-info-item {
        width: 100%;
    }
    
    /* Stack filter controls */
    .input-group {
        width: 100%;
    }
    
    .form-select {
        width: 100%;
    }
}

/* Ensure viewport is properly set for mobile */
@media (max-width: 767.98px) {
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    body {
        overflow-x: hidden;
    }
}

/* Touch-friendly buttons on mobile */
@media (max-width: 767.98px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn-sm {
        min-height: 36px;
        min-width: 36px;
    }
    
    /* Dashboard metric cards */
    .metric-card {
        margin-bottom: 1rem;
    }
    
    .metric-card .card-title {
        font-size: 2rem;
    }
    
    .metric-card .card-subtitle {
        font-size: 0.75rem;
    }
    
    /* Quick action buttons */
    .col-md-3.mb-2 {
        margin-bottom: 0.75rem !important;
    }
    
    .col-md-3.mb-2 .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Dashboard responsive adjustments */
@media (max-width: 575.98px) {
    .row.mb-4 .col-md-3 {
        margin-bottom: 0.75rem;
    }
    
    .card-body h3 {
        font-size: 2rem;
    }
    
    .card-body h6 {
        font-size: 0.75rem;
    }
}


/* Scrollbar styling for mobile webkit browsers */
@media (max-width: 991.98px) {
    .table-responsive::-webkit-scrollbar {
        height: 8px;
    }
    
    .table-responsive::-webkit-scrollbar-track {
        background: var(--bg-secondary);
        border-radius: 4px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 4px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: var(--secondary);
    }
}
