/* ============================================
   LOOTCRM MOBILE RESPONSIVE CSS
   Complete mobile-first responsive system
   ============================================ */

/* ============================================
   1. CSS CUSTOM PROPERTIES FOR MOBILE
   ============================================ */
:root {
    --mobile-spacing-xs: 0.25rem;
    --mobile-spacing-sm: 0.5rem;
    --mobile-spacing-md: 1rem;
    --mobile-spacing-lg: 1.5rem;
    --mobile-spacing-xl: 2rem;
    --mobile-touch-target: 44px;
    --mobile-font-size-sm: 0.8rem;
    --mobile-font-size-base: 0.9rem;
    --mobile-font-size-lg: 1rem;
    --mobile-border-radius: 12px;
    --mobile-safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --mobile-safe-area-top: env(safe-area-inset-top, 0px);
}

/* ============================================
   2. BASE MOBILE RESETS
   ============================================ */
@media (max-width: 991.98px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Improve tap highlighting */
    * {
        -webkit-tap-highlight-color: rgba(var(--tp-primary-rgb), 0.1);
    }
    
    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Base font size adjustment */
    body {
        font-size: var(--mobile-font-size-base);
    }
}

/* ============================================
   3. NAVIGATION - MOBILE OPTIMIZED
   ============================================ */
@media (max-width: 991.98px) {
    /* Mobile navbar improvements */
    .navbar {
        padding: 0.5rem 0.75rem;
        padding-top: calc(0.5rem + var(--mobile-safe-area-top));
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-brand svg {
        width: 28px;
        height: 28px;
    }
    
    /* Hamburger button larger */
    .navbar-toggler {
        padding: 0.5rem;
        min-width: var(--mobile-touch-target);
        min-height: var(--mobile-touch-target);
        border: none;
        background: rgba(255,255,255,0.1);
        border-radius: 8px;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(var(--tp-primary-rgb), 0.25);
    }
    
    /* Mobile menu fullscreen */
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, var(--tp-navbar-bg-start), var(--tp-navbar-bg-mid), var(--tp-navbar-bg-end));
        padding: calc(60px + var(--mobile-safe-area-top)) 1rem 1rem;
        z-index: 1040;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        transform: translateX(0);
    }
    
    /* Close button for mobile menu */
    .navbar-collapse::before {
        content: '✕';
        position: absolute;
        top: calc(15px + var(--mobile-safe-area-top));
        right: 15px;
        font-size: 1.5rem;
        color: white;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.1);
        border-radius: 8px;
    }
    
    /* Nav items stacked */
    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        padding: 0.875rem 1rem;
        font-size: 1rem;
        border-radius: 10px;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        background: rgba(255,255,255,0.1);
    }
    
    .navbar-nav .nav-link i {
        font-size: 1.1rem;
        width: 24px;
        text-align: center;
    }
    
    /* Mobile dropdowns */
    .navbar-nav .dropdown-menu {
        position: static !important;
        width: 100%;
        background: rgba(0,0,0,0.2);
        border: none;
        border-radius: 10px;
        margin-top: 0.5rem;
        padding: 0.5rem;
    }
    
    .navbar-nav .dropdown-item {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        color: rgba(255,255,255,0.9);
    }
    
    .navbar-nav .dropdown-item:hover {
        background: rgba(255,255,255,0.1);
    }
}

/* ============================================
   4. BOTTOM NAVIGATION BAR (Optional)
   ============================================ */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 767.98px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--tp-card-bg);
        border-top: 1px solid var(--tp-border);
        padding: 0.5rem;
        padding-bottom: calc(0.5rem + var(--mobile-safe-area-bottom));
        z-index: 1030;
        justify-content: space-around;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }
    
    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.5rem 0.75rem;
        color: var(--tp-text-muted);
        text-decoration: none;
        font-size: 0.7rem;
        min-width: 60px;
        border-radius: 8px;
        transition: all 0.2s;
    }
    
    .mobile-bottom-nav a i {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    .mobile-bottom-nav a.active,
    .mobile-bottom-nav a:hover {
        color: var(--tp-primary);
        background: rgba(var(--tp-primary-rgb), 0.1);
    }
    
    /* Add padding to body for bottom nav */
    body.has-bottom-nav {
        padding-bottom: calc(70px + var(--mobile-safe-area-bottom));
    }
}

/* ============================================
   5. CARDS - MOBILE LAYOUT
   ============================================ */
@media (max-width: 767.98px) {
    .card {
        border-radius: var(--mobile-border-radius);
        margin-bottom: var(--mobile-spacing-md);
    }
    
    .card-body {
        padding: var(--mobile-spacing-md);
    }
    
    .card-header {
        padding: 0.75rem var(--mobile-spacing-md);
    }
    
    .card-header h5,
    .card-header h6 {
        font-size: 0.95rem;
    }
    
    /* Stack card columns */
    .row > [class*="col-lg-"],
    .row > [class*="col-md-"] {
        margin-bottom: var(--mobile-spacing-md);
    }
}

/* ============================================
   6. TABLES - RESPONSIVE CARD VIEW
   ============================================ */
@media (max-width: 767.98px) {
    /* Hide table on mobile, show card view */
    .table-mobile-cards thead {
        display: none;
    }
    
    .table-mobile-cards tbody tr {
        display: block;
        padding: var(--mobile-spacing-md);
        margin-bottom: var(--mobile-spacing-sm);
        background: var(--tp-card-bg);
        border-radius: var(--mobile-border-radius);
        border: 1px solid var(--tp-border);
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    
    .table-mobile-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 1px solid var(--tp-border);
    }
    
    .table-mobile-cards tbody td:last-child {
        border-bottom: none;
    }
    
    .table-mobile-cards tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: var(--mobile-font-size-sm);
        color: var(--tp-text-muted);
        flex: 0 0 40%;
        padding-right: 0.5rem;
    }
    
    .table-mobile-cards tbody td > * {
        flex: 1;
        text-align: right;
    }
    
    /* Action buttons in card view */
    .table-mobile-cards .btn-group,
    .table-mobile-cards .action-buttons {
        display: flex;
        gap: 0.5rem;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
    
    /* Standard table-responsive improvements */
    .table-responsive {
        margin: 0 calc(-1 * var(--mobile-spacing-md));
        padding: 0 var(--mobile-spacing-md);
        border: none;
    }
    
    .table {
        font-size: var(--mobile-font-size-sm);
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.375rem;
        white-space: nowrap;
    }
    
    /* Horizontal scroll indicator */
    .table-responsive::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to right, transparent, var(--tp-card-bg));
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .table-responsive.scrollable::after {
        opacity: 1;
    }
    
    /* ============================================
       MOBILE ACTION DROPDOWN - Single icon menu
       ============================================ */
    
    /* Hide regular btn-group on mobile, show dropdown */
    .actions-cell .btn-group {
        display: none !important;
    }
    
    .actions-cell .mobile-actions-dropdown {
        display: inline-block !important;
    }
    
    .mobile-actions-dropdown {
        display: none;
    }
    
    .mobile-actions-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--tp-primary);
        color: white;
        border: none;
        font-size: 1rem;
    }
    
    .mobile-actions-btn:hover,
    .mobile-actions-btn:focus {
        background: var(--tp-primary-dark);
        color: white;
    }
    
    .mobile-actions-menu {
        min-width: 200px;
        padding: 0.5rem;
        border-radius: var(--mobile-border-radius);
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    }
    
    .mobile-actions-menu .dropdown-item {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 0.9rem;
    }
    
    .mobile-actions-menu .dropdown-item i {
        width: 20px;
        text-align: center;
        font-size: 1rem;
    }
    
    .mobile-actions-menu .dropdown-item:hover {
        background: rgba(var(--tp-primary-rgb), 0.1);
    }
    
    .mobile-actions-menu .dropdown-divider {
        margin: 0.375rem 0;
    }
    
    .mobile-actions-menu .dropdown-item.text-danger:hover {
        background: rgba(239, 68, 68, 0.1);
    }
}

/* ============================================
   7. FORMS - MOBILE OPTIMIZED
   ============================================ */
@media (max-width: 767.98px) {
    /* Stack all form columns */
    .row > [class*="col-md-"],
    .row > [class*="col-lg-"] {
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Larger touch targets for inputs */
    .form-control,
    .form-select {
        min-height: var(--mobile-touch-target);
        padding: 0.625rem 0.875rem;
        font-size: 16px; /* Prevents iOS zoom */
        border-radius: 10px;
    }
    
    .form-control:focus,
    .form-select:focus {
        box-shadow: 0 0 0 3px rgba(var(--tp-primary-rgb), 0.15);
    }
    
    /* Form labels */
    .form-label {
        font-size: var(--mobile-font-size-sm);
        margin-bottom: 0.375rem;
    }
    
    /* Input groups */
    .input-group {
        flex-wrap: nowrap;
    }
    
    .input-group-text {
        min-height: var(--mobile-touch-target);
        padding: 0.625rem 0.75rem;
    }
    
    /* Checkboxes and radios */
    .form-check {
        padding: 0.75rem 0;
        padding-left: 2rem;
    }
    
    .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
        margin-top: 0.125rem;
    }
    
    .form-check-label {
        font-size: var(--mobile-font-size-base);
        padding-left: 0.25rem;
    }
    
    /* Form switches */
    .form-switch .form-check-input {
        width: 2.5rem;
        height: 1.375rem;
    }
    
    /* Form floating labels */
    .form-floating > .form-control,
    .form-floating > .form-select {
        height: calc(3.5rem + 2px);
        padding: 1rem 0.875rem;
    }
    
    /* Textarea */
    textarea.form-control {
        min-height: 100px;
    }
    
    /* Search inputs */
    .input-group .form-control[type="search"],
    #globalSearch {
        font-size: 16px;
    }
}

/* ============================================
   8. BUTTONS - TOUCH FRIENDLY
   ============================================ */
@media (max-width: 767.98px) {
    /* Minimum touch target */
    .btn {
        min-height: var(--mobile-touch-target);
        padding: 0.625rem 1rem;
        font-size: var(--mobile-font-size-base);
        border-radius: 10px;
    }
    
    /* Small buttons still touchable */
    .btn-sm {
        min-height: 38px;
        padding: 0.5rem 0.75rem;
        font-size: var(--mobile-font-size-sm);
    }
    
    /* Icon-only buttons */
    .btn-icon-only {
        width: var(--mobile-touch-target);
        height: var(--mobile-touch-target);
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Button groups stack on mobile */
    .btn-group-mobile-stack {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group-mobile-stack .btn {
        width: 100%;
        border-radius: 10px !important;
        margin-bottom: 0.5rem;
    }
    
    /* Action buttons row */
    .action-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    /* Full width buttons */
    .btn-mobile-full {
        width: 100%;
    }
    
    /* Floating action button */
    .btn-fab {
        position: fixed;
        bottom: calc(80px + var(--mobile-safe-area-bottom));
        right: 1rem;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        z-index: 1020;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
    }
}

/* ============================================
   9. MODALS - MOBILE FULLSCREEN
   ============================================ */
@media (max-width: 767.98px) {
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        min-height: 100%;
    }
    
    .modal-content {
        border: none;
        border-radius: 0;
        min-height: 100vh;
        padding-top: var(--mobile-safe-area-top);
        padding-bottom: var(--mobile-safe-area-bottom);
    }
    
    .modal-header {
        border-radius: 0;
        padding: 1rem;
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--tp-card-bg);
    }
    
    .modal-body {
        padding: var(--mobile-spacing-md);
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: var(--mobile-spacing-md);
        position: sticky;
        bottom: 0;
        background: var(--tp-card-bg);
        border-top: 1px solid var(--tp-border);
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        flex: 1;
    }
    
    /* Modal close button larger */
    .btn-close {
        width: 40px;
        height: 40px;
        padding: 0;
        opacity: 0.75;
    }
    
    /* Bottom sheet modal variant */
    .modal-bottom-sheet .modal-dialog {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        min-height: auto;
        max-height: 90vh;
    }
    
    .modal-bottom-sheet.show .modal-dialog {
        transform: translateY(0);
    }
    
    .modal-bottom-sheet .modal-content {
        min-height: auto;
        border-radius: 20px 20px 0 0;
    }
    
    .modal-bottom-sheet .modal-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: var(--tp-border);
        border-radius: 2px;
    }
}

/* ============================================
   10. PREVIEW POPUPS - MOBILE BOTTOM SHEET
   ============================================ */
@media (max-width: 767.98px) {
    .sale-preview-popup,
    .customer-preview-popup {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 70vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s ease, opacity 0.3s;
        padding-bottom: var(--mobile-safe-area-bottom);
    }
    
    .sale-preview-popup.visible,
    .customer-preview-popup.visible {
        transform: translateY(0);
    }
    
    /* Drag handle */
    .sale-preview-popup::before,
    .customer-preview-popup::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(0,0,0,0.2);
        border-radius: 2px;
    }
    
    .sale-preview-popup .card,
    .customer-preview-popup .card {
        border: none;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    }
}

/* ============================================
   11. TYPOGRAPHY - MOBILE SCALING
   ============================================ */
@media (max-width: 767.98px) {
    h1, .h1 { font-size: 1.5rem; }
    h2, .h2 { font-size: 1.3rem; }
    h3, .h3 { font-size: 1.15rem; }
    h4, .h4 { font-size: 1.05rem; }
    h5, .h5 { font-size: 0.95rem; }
    h6, .h6 { font-size: 0.875rem; }
    
    .display-1 { font-size: 2.5rem; }
    .display-2 { font-size: 2.25rem; }
    .display-3 { font-size: 2rem; }
    .display-4 { font-size: 1.75rem; }
    
    .lead { font-size: 1rem; }
    
    small, .small { font-size: 0.8rem; }
    
    /* Page titles */
    .page-title,
    .content-header h1 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    /* Badges */
    .badge {
        font-size: 0.7rem;
        padding: 0.35em 0.6em;
    }
}

/* ============================================
   12. SPACING - MOBILE ADJUSTMENTS
   ============================================ */
@media (max-width: 767.98px) {
    .container-fluid {
        padding-left: var(--mobile-spacing-md);
        padding-right: var(--mobile-spacing-md);
    }
    
    /* Reduce margins */
    .mb-4 { margin-bottom: var(--mobile-spacing-md) !important; }
    .mb-5 { margin-bottom: var(--mobile-spacing-lg) !important; }
    .mt-4 { margin-top: var(--mobile-spacing-md) !important; }
    .mt-5 { margin-top: var(--mobile-spacing-lg) !important; }
    .py-4 { padding-top: var(--mobile-spacing-md) !important; padding-bottom: var(--mobile-spacing-md) !important; }
    .py-5 { padding-top: var(--mobile-spacing-lg) !important; padding-bottom: var(--mobile-spacing-lg) !important; }
    
    /* Row gutters */
    .row {
        --bs-gutter-x: var(--mobile-spacing-md);
    }
    
    .g-4, .gx-4 { --bs-gutter-x: var(--mobile-spacing-md); }
    .g-4, .gy-4 { --bs-gutter-y: var(--mobile-spacing-md); }
}

/* ============================================
   13. ALERTS & NOTIFICATIONS
   ============================================ */
@media (max-width: 767.98px) {
    .alert {
        padding: 0.875rem var(--mobile-spacing-md);
        font-size: var(--mobile-font-size-base);
        border-radius: var(--mobile-border-radius);
    }
    
    /* Toast notifications */
    .toast-container {
        bottom: calc(80px + var(--mobile-safe-area-bottom)) !important;
        right: var(--mobile-spacing-md) !important;
        left: var(--mobile-spacing-md) !important;
    }
    
    .toast {
        width: 100%;
        max-width: none;
    }
}

/* ============================================
   14. DASHBOARD SPECIFIC
   ============================================ */
@media (max-width: 767.98px) {
    /* Stats cards */
    .stats-card,
    .metric-card {
        padding: var(--mobile-spacing-md);
    }
    
    .stats-card .display-6,
    .metric-value {
        font-size: 1.5rem;
    }
    
    /* Charts */
    .chart-container {
        height: 200px !important;
        min-height: 200px;
    }
    
    /* Calendar view */
    .fc-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }
    
    .fc-toolbar-title {
        font-size: 1rem !important;
    }
    
    .fc-button {
        padding: 0.375rem 0.5rem !important;
        font-size: 0.8rem !important;
    }
}

/* ============================================
   15. LISTS & LIST GROUPS
   ============================================ */
@media (max-width: 767.98px) {
    .list-group-item {
        padding: 0.875rem var(--mobile-spacing-md);
    }
    
    .list-group-item-action {
        min-height: var(--mobile-touch-target);
        display: flex;
        align-items: center;
    }
    
    /* Swipe actions indicator */
    .list-group-item.swipeable {
        position: relative;
    }
    
    .list-group-item.swipeable::after {
        content: '⟩';
        position: absolute;
        right: var(--mobile-spacing-md);
        color: var(--tp-text-muted);
        opacity: 0.5;
    }
}

/* ============================================
   16. TABS - MOBILE SCROLLABLE
   ============================================ */
@media (max-width: 767.98px) {
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        border-bottom: none;
        gap: 0.25rem;
        padding-bottom: 0.5rem;
    }
    
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .nav-tabs .nav-link {
        white-space: nowrap;
        padding: 0.625rem 1rem;
        border-radius: 20px;
        border: 1px solid var(--tp-border);
        font-size: var(--mobile-font-size-sm);
    }
    
    .nav-tabs .nav-link.active {
        background: var(--tp-primary);
        color: white;
        border-color: var(--tp-primary);
    }
    
    .nav-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-pills .nav-link {
        white-space: nowrap;
    }
}

/* ============================================
   17. PAGINATION - MOBILE
   ============================================ */
@media (max-width: 767.98px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .page-link {
        min-width: 38px;
        min-height: 38px;
        padding: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px !important;
    }
    
    /* Hide some page numbers on small screens */
    .pagination .page-item:not(.active):not(:first-child):not(:last-child):not(:nth-child(2)):not(:nth-last-child(2)) {
        display: none;
    }
}

/* ============================================
   18. DROPDOWNS - MOBILE
   ============================================ */
@media (max-width: 767.98px) {
    .dropdown-menu {
        border-radius: var(--mobile-border-radius);
        padding: 0.5rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        min-height: var(--mobile-touch-target);
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    
    .dropdown-item i {
        width: 20px;
        text-align: center;
    }
    
    /* Full width dropdowns */
    .dropdown-menu-mobile-full {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto !important;
        transform: none !important;
        border-radius: 20px 20px 0 0;
        max-height: 70vh;
        overflow-y: auto;
        padding-bottom: var(--mobile-safe-area-bottom);
    }
    
    /* Action dropdown button */
    .actions-cell .dropdown .btn-primary.rounded-circle {
        background: var(--tp-primary);
        border-color: var(--tp-primary);
    }
    
    .actions-cell .dropdown .btn-primary.rounded-circle:hover,
    .actions-cell .dropdown .btn-primary.rounded-circle:focus {
        background: var(--tp-primary-dark);
        border-color: var(--tp-primary-dark);
    }
    
    /* Action dropdown menu styling */
    .actions-cell .dropdown-menu {
        min-width: 180px;
        padding: 0.5rem;
    }
    
    .actions-cell .dropdown-item {
        font-size: 0.9rem;
        padding: 0.625rem 0.875rem;
        border-radius: 6px;
    }
    
    .actions-cell .dropdown-item:active {
        background: var(--tp-primary);
        color: white;
    }
    
    .actions-cell .dropdown-item.text-danger:active {
        background: #dc3545;
    }
}

/* ============================================
   19. IMAGES - RESPONSIVE
   ============================================ */
@media (max-width: 767.98px) {
    img {
        max-width: 100%;
        height: auto;
    }
    
    .img-thumbnail {
        padding: 0.125rem;
        border-radius: 8px;
    }
    
    /* Avatar sizes */
    .avatar-lg {
        width: 80px !important;
        height: 80px !important;
    }
    
    .avatar-md {
        width: 50px !important;
        height: 50px !important;
    }
}

/* ============================================
   20. SPLASH SCREEN - MOBILE
   ============================================ */
@media (max-width: 767.98px) {
    .splash-screen .splash-logo-container {
        width: 120px;
        height: 120px;
    }
    
    .splash-screen .splash-title {
        font-size: 1.75rem;
        letter-spacing: 2px;
    }
    
    .splash-screen .splash-tagline {
        font-size: 0.875rem;
    }
    
    .splash-screen .splash-loader {
        width: 150px;
    }
}

/* ============================================
   21. PROFILE PAGE - MOBILE
   ============================================ */
@media (max-width: 767.98px) {
    /* Theme grid */
    #themeGrid .col-6 {
        padding: 0.25rem;
    }
    
    .theme-option {
        border-radius: 10px;
    }
    
    .theme-preview {
        height: 50px;
    }
    
    .theme-info {
        padding: 8px;
    }
    
    .theme-info strong {
        font-size: 0.75rem;
    }
    
    .theme-info small {
        font-size: 0.65rem;
    }
}

/* ============================================
   22. UTILITY CLASSES - MOBILE
   ============================================ */
@media (max-width: 767.98px) {
    /* Hide on mobile */
    .d-mobile-none,
    .hide-mobile {
        display: none !important;
    }
    
    /* Show only on mobile */
    .d-mobile-block {
        display: block !important;
    }
    
    .d-mobile-flex {
        display: flex !important;
    }
    
    /* Text alignment */
    .text-mobile-center {
        text-align: center !important;
    }
    
    .text-mobile-start {
        text-align: start !important;
    }
    
    /* Widths */
    .w-mobile-100 {
        width: 100% !important;
    }
    
    /* Order */
    .order-mobile-first {
        order: -1 !important;
    }
    
    .order-mobile-last {
        order: 999 !important;
    }
    
    /* Sticky header on scroll */
    .sticky-mobile-top {
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--tp-card-bg);
    }
}

/* ============================================
   23. PRINT STYLES
   ============================================ */
@media print {
    .mobile-bottom-nav,
    .btn-fab,
    .theme-switcher {
        display: none !important;
    }
}

/* ============================================
   24. LANDSCAPE PHONE
   ============================================ */
@media (max-width: 767.98px) and (orientation: landscape) {
    .modal-content {
        min-height: auto;
    }
    
    .splash-screen .splash-logo-container {
        width: 80px;
        height: 80px;
    }
    
    .splash-screen .splash-title {
        font-size: 1.25rem;
    }
}

/* ============================================
   25. DARK MODE MOBILE ADJUSTMENTS
   ============================================ */
@media (max-width: 767.98px) {
    [data-theme="dark"] .mobile-bottom-nav,
    [data-theme="cyber"] .mobile-bottom-nav {
        background: var(--tp-card-bg);
        border-top-color: var(--tp-border);
    }
    
    [data-theme="dark"] .table-mobile-cards tbody tr,
    [data-theme="cyber"] .table-mobile-cards tbody tr {
        background: var(--tp-card-bg);
        border-color: var(--tp-border);
    }
}
