/**
 * Mobile Responsiveness Fixes V3.7
 * Optimizes UI for mobile devices (320px - 768px)
 * Updated: November 10, 2025 - Enabled screenshots and removed restrictions
 */

/* ========================================
   GLOBAL FIXES - ENABLE SCREENSHOTS
   ======================================== */

/* Explicitly allow screenshots and user interactions */
html,
body {
    -webkit-touch-callout: default !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Remove any screenshot blocking */
* {
    -webkit-touch-callout: inherit !important;
}

/* ========================================
   MOBILE-SPECIFIC FIXES
   ======================================== */

@media (max-width: 768px) {

    /* ===== SIDEBAR MOBILE FIXES ===== */
    /* Ensure sidebar is hidden by default on mobile */
    #sidebar-wrapper {
        transform: translateX(-100%) !important;
        position: fixed !important;
        z-index: 1040 !important;
        width: 250px !important;
        left: 0 !important;
    }

    /* Show sidebar only when explicitly toggled */
    #sidebar-wrapper.show {
        transform: translateX(0) !important;
    }

    /* Ensure page content takes full width on mobile */
    #page-content-wrapper {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Sidebar overlay */
    .sidebar-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 1035 !important;
        display: none !important;
    }

    .sidebar-overlay.show {
        display: block !important;
    }

    /* Prevent body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden !important;
    }

    /* ===== WALLET VIEW MOBILE FIXES ===== */
    #wallet-view {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        padding: 0.5rem !important;
        margin: 0 !important;
    }

    #wallet-view .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    #wallet-view .col-md-6,
    #wallet-view .col-md-4 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        margin-bottom: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Balance cards on mobile - Compact side-by-side layout */
    #wallet-view .balance-display {
        font-size: 1.25rem !important;
        font-weight: 600 !important;
    }

    #wallet-view .card-subtitle {
        font-size: 0.65rem !important;
        margin-bottom: 0.25rem !important;
        font-weight: 500 !important;
    }

    #wallet-view .card-body small {
        font-size: 0.65rem !important;
    }

    /* Balance card icons - smaller for side-by-side */
    #wallet-view .row.g-4.mb-4 .bg-opacity-10 {
        padding: 0.5rem !important;
        width: 35px !important;
        height: 35px !important;
    }

    #wallet-view .row.g-4.mb-4 .bg-opacity-10 i {
        font-size: 1rem !important;
    }

    #wallet-view .bg-opacity-10 {
        padding: 0.75rem !important;
        width: 50px !important;
        height: 50px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #wallet-view .bg-opacity-10 i {
        font-size: 1.5rem !important;
    }

    /* Balance cards - compact padding for side-by-side */
    #wallet-view .row.g-4.mb-4 .card-body {
        padding: 0.75rem !important;
    }

    #wallet-view .card-body {
        padding: 1rem !important;
    }

    /* Virtual account cards on mobile */
    #wallet-view .card {
        margin-bottom: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Ensure balance cards use full container width */
    #wallet-view .row.g-4.mb-4 .card {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Ensure virtual account cards use full container width */
    #wallet-view .row.g-4 .card {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Virtual account section title */
    #wallet-view h4.card-title {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }

    #wallet-view>.card>.card-body {
        padding: 1rem !important;
    }

    #wallet-view>.card>.card-body>p {
        font-size: 0.8rem !important;
        margin-bottom: 1rem !important;
    }

    /* Virtual account individual cards */
    #wallet-view .col-md-4 .card {
        margin-bottom: 1rem !important;
        width: 100% !important;
    }

    #wallet-view .col-md-4 .card-body {
        padding: 0.5rem !important;
        text-align: center !important;
    }

    #wallet-view .col-md-4 h5.card-title {
        font-size: 0.75rem !important;
        margin-bottom: 0.35rem !important;
        font-weight: 600 !important;
    }

    #wallet-view .row.g-4 {
        gap: 0.25rem !important;
        row-gap: 0.5rem !important;
    }

    /* Virtual account card icons - compact for 3 columns */
    #wallet-view .col-md-4 .rounded-circle {
        width: 35px !important;
        height: 35px !important;
        margin-bottom: 0.35rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #wallet-view .col-md-4 .rounded-circle i {
        font-size: 1.1rem !important;
    }

    /* Account number styling - compact for 3 columns */
    #wallet-view .fw-bold.fs-6 {
        font-size: 0.75rem !important;
        word-break: break-all !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        display: block !important;
        letter-spacing: 0.2px !important;
        line-height: 1.2 !important;
    }

    /* Form labels - compact */
    #wallet-view .form-label {
        font-size: 0.6rem !important;
        margin-bottom: 0.2rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.2px !important;
        color: #6c757d !important;
    }

    /* Account name - compact */
    #wallet-view .fw-medium {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
    }

    /* Copy buttons - smaller for 2-column layout */
    #wallet-view .btn-sm {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.7rem !important;
        min-width: 35px !important;
        min-height: 35px !important;
    }

    /* Alert box */
    #wallet-view .alert {
        font-size: 0.75rem !important;
        padding: 0.5rem !important;
        margin-top: 0.75rem !important;
    }

    #wallet-view .alert strong {
        font-size: 0.75rem !important;
    }

    #wallet-view .alert i {
        font-size: 0.75rem !important;
    }

    /* Fix d-flex containers in wallet view */
    #wallet-view .d-flex {
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }

    #wallet-view .card-body p,
    #wallet-view .card-body span,
    #wallet-view .card-body label,
    #wallet-view .card-body h5,
    #wallet-view .card-body h6 {
        word-break: normal !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
    }

    /* Ensure text flows horizontally */
    #wallet-view * {
        writing-mode: horizontal-tb !important;
    }

    /* Arrange balance cards side by side on mobile */
    #wallet-view .row.g-4.mb-4 {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }

    #wallet-view .row.g-4.mb-4>.col-md-6 {
        width: 49.5% !important;
        max-width: 49.5% !important;
        flex: 0 0 49.5% !important;
    }

    /* Arrange virtual account cards in 3 columns */
    #wallet-view .row.g-4 {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        gap: 0.25rem !important;
        width: 100% !important;
    }

    #wallet-view .row.g-4>.col-md-4 {
        width: 33% !important;
        max-width: 33% !important;
        flex: 0 0 33% !important;
        margin-bottom: 0 !important;
    }

    /* Improve account number display */
    #wallet-view .d-flex.align-items-center.justify-content-center {
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }

    /* Better spacing for mobile */
    #wallet-view .mb-3 {
        margin-bottom: 0.75rem !important;
    }

    /* Ensure cards use full width */
    #wallet-view .card.border-0 {
        border-radius: 12px !important;
    }

    #wallet-view .card.shadow-sm {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    }

    /* Compact card spacing */
    #wallet-view .card.border-0.shadow-sm {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }

    /* ===== WELCOME CARD WITH WALLET BALANCE ===== */
    .card.bg-primary .card-body .row {
        text-align: center !important;
    }

    .card.bg-primary .card-body .col-md-8,
    .card.bg-primary .card-body .col-md-4 {
        text-align: center !important;
    }

    .card.bg-primary .card-body .wallet-balance-section {
        display: block !important;
        width: 100%;
        margin-top: 16px;
    }

    .card.bg-primary .card-body .wallet-balance-section .d-flex {
        justify-content: center !important;
        gap: 8px;
    }

    .card.bg-primary .card-body .wallet-balance-section span {
        font-size: 0.875rem !important;
    }

    .card.bg-primary .card-body .wallet-balance-section h2 {
        font-size: 1.5rem !important;
    }

    .card.bg-primary .card-body h4 {
        font-size: 1.25rem !important;
    }

    .card.bg-primary .card-body p {
        font-size: 0.875rem !important;
    }

    .card.bg-primary .card-body .btn {
        width: auto;
        padding: 8px 20px;
        margin-top: 8px;
    }

    /* ===== SPACING OPTIMIZATIONS ===== */
    /* Reduce space between news ticker and slider */
    .news-ticker-container {
        margin-bottom: 12px !important;
    }

    /* Reduce space between slider and wallet cards */
    #dashboardCarousel,
    .carousel {
        margin-bottom: 16px !important;
    }

    /* Compact row spacing */
    .row.g-4 {
        gap: 12px !important;
    }

    .row.mb-4 {
        margin-bottom: 16px !important;
    }

    /* ===== NEWS TICKER FIXES ===== */
    .news-ticker-container {
        max-width: 100%;
        overflow: hidden;
    }

    .news-ticker-content {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px !important;
        line-height: 1.4;
        padding: 8px 12px;
    }

    .news-ticker-item {
        display: inline-block;
        padding-right: 40px;
        font-size: 13px;
    }

    /* ===== SLIDER IMAGE FIXES ===== */
    .slider-container,
    .carousel,
    .image-slider {
        max-width: 100%;
        overflow: hidden;
        margin-bottom: 16px !important;
    }

    .slider-container img,
    .carousel img,
    .image-slider img {
        width: 100%;
        height: auto;
        max-height: 250px;
        object-fit: contain;
        border-radius: 8px;
    }

    .carousel-item {
        height: auto !important;
        min-height: 250px !important;
    }

    .carousel-item img {
        height: auto !important;
        max-height: 250px !important;
        object-fit: contain !important;
    }

    /* Hide slide content (text descriptions) on mobile */
    .slide-content {
        display: none !important;
    }

    /* Hide slide image container text overlays */
    .slide-image {
        width: 100% !important;
        padding: 0 !important;
    }

    /* Make carousel show full image */
    .professional-slide-card {
        padding: 0 !important;
    }

    .slide-background {
        padding: 0 !important;
    }

    .carousel-inner .row {
        margin: 0 !important;
    }

    .carousel-inner .col-lg-6 {
        padding: 0 !important;
    }

    /* Hide carousel caption on mobile */
    .carousel-caption {
        display: none !important;
    }

    /* Hide floating elements on slides */
    .floating-elements,
    .floating-card {
        display: none !important;
    }

    /* Hide slide features, badges, and actions */
    .slide-features,
    .slide-badge,
    .slide-actions,
    .slide-description {
        display: none !important;
    }

    /* Only show slide title, make it smaller */
    .slide-title {
        font-size: 1.25rem !important;
        padding: 12px !important;
        text-align: center !important;
        background: rgba(0, 0, 0, 0.5) !important;
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
    }

    /* ===== CAROUSEL INDICATORS (DOTS) ===== */
    /* Tiny dash-line indicators overlaying slider at top */
    .carousel-indicators {
        position: absolute !important;
        top: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: auto !important;
        margin: 0 !important;
        z-index: 10 !important;
        display: flex !important;
        justify-content: center;
        gap: 6px;
        width: auto !important;
    }

    .carousel-indicators button,
    .carousel-indicators .professional-indicator {
        width: 20px !important;
        height: 2px !important;
        border-radius: 1px !important;
        background: rgba(255, 255, 255, 0.4) !important;
        opacity: 1 !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        transition: all 0.3s ease;
    }

    .carousel-indicators button.active,
    .carousel-indicators .professional-indicator.active {
        width: 28px !important;
        background: rgba(255, 255, 255, 0.95) !important;
    }

    .carousel-indicators .indicator-text {
        display: none !important;
    }

    /* ===== TRANSACTION CARD FIXES ===== */
    .transaction-item,
    .transaction-card {
        padding: 12px !important;
        margin-bottom: 12px;
        font-size: 13px;
    }

    .transaction-item .transaction-description,
    .transaction-card .transaction-description {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 6px;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .transaction-item .transaction-details,
    .transaction-card .transaction-details {
        font-size: 11px;
        color: #6b7280;
        line-height: 1.5;
        word-break: break-all;
        overflow-wrap: anywhere;
    }

    /* Token and Serial Numbers */
    .transaction-token,
    .transaction-serial,
    .transaction-reference {
        display: block;
        font-size: 10px;
        font-family: 'Courier New', monospace;
        background: #f3f4f6;
        padding: 4px 6px;
        border-radius: 4px;
        margin: 4px 0;
        word-break: break-all;
        overflow-wrap: anywhere;
        max-width: 100%;
    }

    .transaction-amount {
        font-size: 15px;
        font-weight: 700;
        white-space: nowrap;
    }

    .transaction-date {
        font-size: 11px;
        color: #9ca3af;
    }

    /* ===== WALLET BALANCE FIXES ===== */
    .wallet-balance {
        font-size: 28px !important;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .wallet-label {
        font-size: 13px;
        color: #6b7280;
    }

    /* ===== STAT CARDS FIXES ===== */
    .stats-card,
    .stat-card {
        padding: 16px !important;
        margin-bottom: 16px;
    }

    .stat-value {
        font-size: 24px !important;
        font-weight: 700;
    }

    .stat-label {
        font-size: 12px;
        color: #6b7280;
    }

    /* ===== QUICK ACTIONS FIXES ===== */
    .quick-action-card {
        padding: 16px 12px !important;
        min-height: 100px;
    }

    .quick-action-icon {
        font-size: 32px !important;
        margin-bottom: 8px;
    }

    .quick-action-label {
        font-size: 13px;
        font-weight: 600;
    }

    /* ===== CARD SPACING ===== */
    .card {
        margin-bottom: 16px;
        border-radius: 12px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .card-body {
        padding: 16px !important;
    }

    .card-title {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }

    /* ===== BUTTON FIXES ===== */
    .btn {
        font-size: 14px;
        padding: 10px 16px;
    }

    .btn-sm {
        font-size: 12px;
        padding: 6px 12px;
    }

    /* ===== VIRTUAL ACCOUNT DETAILS ===== */
    .virtual-account-card {
        padding: 16px;
        margin-bottom: 12px;
    }

    .account-number {
        font-size: 18px !important;
        font-weight: 700;
        font-family: 'Courier New', monospace;
        letter-spacing: 1px;
        word-break: break-all;
    }

    .bank-name {
        font-size: 15px;
        font-weight: 600;
        margin-bottom: 8px;
    }

    /* ===== REFERRAL BALANCE ===== */
    .referral-balance {
        font-size: 24px !important;
        font-weight: 700;
        color: #10b981;
    }

    /* ===== WELCOME BANNER ===== */
    .welcome-banner {
        padding: 20px !important;
        margin-bottom: 16px;
        border-radius: 12px;
    }

    .welcome-banner h2,
    .welcome-banner h3 {
        font-size: 20px !important;
        margin-bottom: 8px;
    }

    .welcome-banner p {
        font-size: 13px;
        margin-bottom: 0;
    }

    /* ===== CONTEST CARD ===== */
    .contest-card {
        padding: 16px;
    }

    .contest-title {
        font-size: 14px;
        font-weight: 600;
    }

    .contest-status {
        font-size: 18px;
        font-weight: 700;
    }

    /* ===== SIDEBAR FIXES ===== */
    .sidebar {
        width: 260px !important;
        font-size: 14px;
    }

    .sidebar .nav-link {
        padding: 12px 16px;
        font-size: 14px;
    }

    /* ===== HEADER FIXES ===== */
    .dashboard-header {
        padding: 12px 16px;
    }

    .user-dropdown {
        font-size: 13px;
    }

    /* ===== RESPONSIVE GRID ===== */
    .row {
        margin-left: -8px;
        margin-right: -8px;
    }

    .row>* {
        padding-left: 8px;
        padding-right: 8px;
    }

    /* ===== TEXT TRUNCATION ===== */
    .text-truncate-mobile {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }

    .text-wrap-mobile {
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }

    /* ===== LOADING SPINNER ===== */
    .loading-spinner {
        width: 32px;
        height: 32px;
    }

    /* ===== MODAL FIXES ===== */
    .modal-dialog {
        margin: 8px;
    }

    .modal-content {
        border-radius: 12px;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
        font-size: 14px;
    }

    .modal-footer {
        padding: 12px 16px;
    }

    /* ===== TRANSACTIONS TABLE MOBILE VIEW ===== */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Hide table on mobile, show card layout instead */
    #allTransactionsTableBody tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 12px;
        background: white;
    }

    #allTransactionsTableBody td {
        display: block;
        text-align: left !important;
        padding: 6px 0 !important;
        border: none !important;
    }

    #allTransactionsTableBody td::before {
        content: attr(data-label);
        font-weight: 600;
        display: inline-block;
        width: 100px;
        color: #6b7280;
        font-size: 12px;
    }

    /* Hide table header on mobile */
    .table thead {
        display: none;
    }

    /* Transaction description in table */
    #allTransactionsTableBody td:nth-child(2) {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 8px;
    }

    /* Transaction amount */
    #allTransactionsTableBody td:nth-child(4) {
        font-size: 16px;
        font-weight: 700;
    }

    /* ===== USER DROPDOWN MENU ===== */
    .dropdown-menu {
        min-width: 200px !important;
        padding: 8px 0;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .dropdown-item {
        padding: 12px 20px !important;
        font-size: 15px !important;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .dropdown-item i {
        width: 20px;
        font-size: 16px;
    }

    .dropdown-divider {
        margin: 8px 0;
    }

    /* Dropdown backdrop */
    .dropdown-menu.show {
        z-index: 1050;
    }

    /* ===== RECENT TRANSACTIONS - MOBILE FIXES ===== */
    #dashboardRecentTransactions {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        bottom: auto !important;
        transform: none !important;
        float: none !important;
        margin: 0 0 1rem 0 !important;
    }

    /* Force hide Recent Transactions when dashboard is hidden */
    #dashboard-overview-view[style*="display: none"] #dashboardRecentTransactions,
    #dashboard-overview-view[style*="display:none"] #dashboardRecentTransactions {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    .recent-transactions-widget {
        max-width: 100%;
    }

    .recent-transactions-widget .card-title {
        font-size: 14px !important;
        white-space: normal !important;
        word-wrap: break-word;
    }

    .recent-transactions-widget .transaction-item {
        padding: 10px !important;
        font-size: 12px;
        border-bottom: 1px solid #f3f4f6;
    }

    .recent-transactions-widget .transaction-description {
        font-size: 12px !important;
        line-height: 1.4;
        max-width: 100%;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal !important;
        margin-bottom: 4px;
    }

    .recent-transactions-widget .transaction-reference {
        font-size: 10px !important;
        word-break: break-all;
        overflow-wrap: anywhere;
        display: block;
        margin-top: 4px;
    }

    .recent-transactions-widget .transaction-amount {
        font-size: 13px !important;
        white-space: nowrap;
        font-weight: 700;
    }

    .recent-transactions-widget .transaction-date {
        font-size: 10px !important;
        color: #9ca3af;
    }

    /* ===== TABLE HEADER FIXES ===== */
    .table thead th {
        font-size: 12px !important;
        padding: 10px 8px !important;
        white-space: nowrap;
    }

    /* Fix "Type" column header cutoff */
    .table thead th:nth-child(3) {
        min-width: 60px;
    }

    /* ===== DROPDOWN MENU POSITIONING ===== */
    .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        margin-top: 8px !important;
        z-index: 1050 !important;
    }

    /* Ensure dropdown doesn't overlap content */
    .dropdown {
        position: relative;
    }

    /* ===== WALLET & STATS CARDS HORIZONTAL LAYOUT ===== */
    /* Make wallet balance card more compact */
    .stats-card .card-body {
        padding: 16px !important;
    }

    .stats-card h6.card-subtitle {
        font-size: 12px !important;
        margin-bottom: 8px !important;
    }

    .stats-card h2 {
        font-size: 24px !important;
    }

    .stats-card .balance-display {
        font-size: 24px !important;
    }

    /* Remove Fund Wallet button from wallet card on mobile */
    .stats-card .btn.mt-3 {
        display: none !important;
    }

    /* Make stats cards display horizontally in 2 columns for better readability */
    .row.g-4.mb-4 {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .row.g-4.mb-4>.col-md-6,
    .row.g-4.mb-4>.col-lg-3 {
        flex: 0 0 calc(50% - 5px) !important;
        max-width: calc(50% - 5px) !important;
    }

    /* Adjust card height for horizontal layout */
    .row.g-4.mb-4 .stats-card {
        height: 100% !important;
        min-height: 130px !important;
    }

    .row.g-4.mb-4 .stats-card .card-body {
        padding: 14px !important;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    /* Better text sizing for readability */
    .row.g-4.mb-4 .stats-card h6.card-subtitle {
        font-size: 11px !important;
        margin-bottom: 8px !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .row.g-4.mb-4 .stats-card h2.card-title {
        font-size: 20px !important;
        line-height: 1.3 !important;
        margin-bottom: 6px !important;
        word-wrap: break-word !important;
        white-space: normal !important;
    }

    .row.g-4.mb-4 .stats-card small {
        font-size: 10px !important;
        line-height: 1.3 !important;
        display: block !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .row.g-4.mb-4 .stats-card .bg-opacity-10 {
        padding: 8px !important;
        flex-shrink: 0 !important;
    }

    .row.g-4.mb-4 .stats-card i {
        font-size: 18px !important;
    }

    /* Ensure d-flex container doesn't cause overflow */
    .row.g-4.mb-4 .stats-card .d-flex {
        gap: 8px !important;
        align-items: flex-start !important;
    }

    .row.g-4.mb-4 .stats-card .d-flex>div:first-child {
        flex: 1 !important;
        min-width: 0 !important;
    }

    /* ===== QUICK ACTIONS ALIGNMENT ===== */
    .quick-action-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .quick-action-card .card-body {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .quick-action-label {
        text-align: center;
        width: 100%;
        line-height: 1.3;
        margin-top: 8px;
    }

    .quick-action-description {
        font-size: 11px;
        color: #6b7280;
        text-align: center;
        margin-top: 4px;
        line-height: 1.3;
    }

    /* ===== SLIDER/CAROUSEL IMPROVEMENTS ===== */
    .carousel-item {
        height: 180px;
    }

    .carousel-item img {
        height: 180px;
        object-fit: cover;
        object-position: center;
    }

    .professional-slide-card {
        height: 180px;
        border-radius: 12px;
        overflow: hidden;
    }

    /* Hide carousel text if too small */
    .carousel-caption {
        display: none;
    }

    /* ===== PREVENT SIDE-BY-SIDE VIEW DISPLAY ===== */
    /* Force views to take full width on mobile */
    .view-container,
    [id$="-view"] {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Fix wallet view specifically */
    #wallet-view {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Fix recent transactions view */
    #transactions-view {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* ===== NOTIFICATION BADGE ===== */
    .notification-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        min-width: 18px;
        height: 18px;
        font-size: 10px;
        padding: 2px 5px;
    }

    /* ===== USER PROFILE DROPDOWN ===== */
    .user-dropdown .dropdown-toggle {
        font-size: 14px !important;
        padding: 8px 12px !important;
    }

    .user-dropdown .dropdown-toggle::after {
        margin-left: 6px;
    }
}

/* ========================================
   EXTRA SMALL DEVICES (< 576px)
   ======================================== */

@media (max-width: 576px) {

    /* Even smaller text for very small screens */
    .transaction-item,
    .transaction-card {
        font-size: 12px;
        padding: 10px !important;
    }

    .transaction-details {
        font-size: 10px !important;
    }

    .transaction-token,
    .transaction-serial,
    .transaction-reference {
        font-size: 9px !important;
        padding: 3px 5px;
    }

    .wallet-balance {
        font-size: 24px !important;
    }

    .stat-value {
        font-size: 20px !important;
    }

    .quick-action-icon {
        font-size: 28px !important;
    }

    .quick-action-label {
        font-size: 12px;
    }

    .card-body {
        padding: 12px !important;
    }

    .btn {
        font-size: 13px;
        padding: 8px 14px;
    }
}

/* ========================================
   LANDSCAPE MODE FIXES
   ======================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .welcome-banner {
        padding: 12px !important;
    }

    .welcome-banner h2,
    .welcome-banner h3 {
        font-size: 16px !important;
    }

    .stat-card {
        padding: 12px !important;
    }

    .quick-action-card {
        min-height: 80px;
        padding: 12px 8px !important;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Force word wrapping for long text */
.force-wrap {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

/* Prevent text overflow */
.no-overflow {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Mobile-only visibility */
.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }
}

/* ========================================
   REFERRAL PAGE MOBILE FIXES
   ======================================== */

@media (max-width: 768px) {

    /* Referral code display */
    .referral-code-display {
        font-size: 28px !important;
        letter-spacing: 3px;
        word-spacing: 5px;
        padding: 16px;
    }

    /* Referral stats cards */
    .referral-stat-card {
        padding: 16px !important;
        margin-bottom: 16px;
    }

    .referral-stat-value {
        font-size: 28px !important;
        font-weight: 700;
    }

    .referral-stat-label {
        font-size: 13px;
        color: #6b7280;
    }

    /* Copy button */
    .copy-code-btn {
        padding: 12px 24px !important;
        font-size: 14px !important;
        width: auto;
        min-width: 140px;
    }

    /* Tier badge */
    .tier-badge {
        font-size: 14px !important;
        padding: 8px 16px !important;
    }

    /* Commission rate */
    .commission-rate {
        font-size: 32px !important;
        font-weight: 700;
    }

    /* Referral card gradient */
    .referral-card {
        padding: 24px 16px !important;
        border-radius: 16px;
    }
}

/* ========================================
   ADDITIONAL MOBILE IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden !important;
    }

    /* Container padding */
    .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Page content wrapper */
    #page-content-wrapper {
        padding: 12px !important;
    }

    /* Main content area */
    .main-content {
        padding: 12px !important;
    }

    /* Section headings */
    h1 {
        font-size: 24px !important;
    }

    h2 {
        font-size: 20px !important;
    }

    h3 {
        font-size: 18px !important;
    }

    h4 {
        font-size: 16px !important;
    }

    h5 {
        font-size: 14px !important;
    }

    /* Form controls */
    .form-control,
    .form-select {
        font-size: 14px !important;
        padding: 10px 12px !important;
    }

    .form-label {
        font-size: 13px !important;
        margin-bottom: 6px;
    }

    /* Input groups */
    .input-group {
        flex-wrap: nowrap !important;
    }

    .input-group-text {
        font-size: 14px !important;
        padding: 10px 12px !important;
    }

    /* Alerts */
    .alert {
        font-size: 13px !important;
        padding: 12px !important;
        margin-bottom: 12px;
    }

    /* Badges */
    .badge {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }

    /* List groups */
    .list-group-item {
        font-size: 14px !important;
        padding: 12px !important;
    }

    /* Nav tabs */
    .nav-tabs .nav-link {
        font-size: 13px !important;
        padding: 10px 12px !important;
    }

    /* Pagination */
    .pagination {
        font-size: 13px !important;
    }

    .page-link {
        padding: 8px 12px !important;
    }

    /* Progress bars */
    .progress {
        height: 8px !important;
    }

    /* Tooltips */
    .tooltip {
        font-size: 12px !important;
    }

    /* Popovers */
    .popover {
        font-size: 13px !important;
    }

    /* Breadcrumbs */
    .breadcrumb {
        font-size: 12px !important;
        padding: 8px 12px !important;
    }

    /* Toast notifications */
    .toast {
        font-size: 13px !important;
        max-width: calc(100vw - 24px) !important;
    }

    /* Offcanvas */
    .offcanvas {
        width: 280px !important;
    }

    /* Accordion */
    .accordion-button {
        font-size: 14px !important;
        padding: 12px !important;
    }

    .accordion-body {
        font-size: 13px !important;
        padding: 12px !important;
    }
}

/* ========================================
  FUNDING PAGE - VIRTUAL ACCOUNT DETAILS FIX
  Mobile Responsive Layout (320px - 480px)
  ======================================== */

@media (max-width: 768px) {

    /* Main virtual accounts container */
    .virtual-accounts {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Individual account card - stack vertically */
    .account-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px !important;
        margin-bottom: 0 !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: visible !important;
    }

    /* Account header with logo and status */
    .account-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 16px !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
    }

    /* Bank logo container */
    .bank-logo-container {
        width: 50px !important;
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        background: #f3f4f6 !important;
        border-radius: 8px !important;
        padding: 6px !important;
    }

    .bank-logo-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        max-width: 45px !important;
        max-height: 45px !important;
    }

    /* Account status badge */
    .account-status {
        font-size: 12px !important;
        padding: 6px 12px !important;
        border-radius: 20px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .account-status.active {
        background-color: #d1fae5 !important;
        color: #065f46 !important;
    }

    /* Account details container */
    .account-details {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    /* Individual account info block */
    .account-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        width: 100% !important;
        padding: 12px !important;
        background: #f9fafb !important;
        border-radius: 8px !important;
        border: 1px solid #e5e7eb !important;
    }

    /* Account label styling */
    .account-label {
        font-size: 12px !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        color: #6b7280 !important;
    }

    /* Copy field container - horizontal layout */
    .copy-field {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
    }

    /* Account number styling */
    .account-number {
        font-size: 16px !important;
        font-weight: 700 !important;
        font-family: 'Courier New', monospace !important;
        letter-spacing: 1px !important;
        word-break: break-all !important;
        flex: 1 1 auto !important;
        min-width: 150px !important;
        color: #1f2937 !important;
        line-height: 1.4 !important;
    }

    /* Copy button */
    .copy-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        background-color: #3b82f6 !important;
        color: white !important;
        border: none !important;
        border-radius: 6px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        min-width: 70px !important;
    }

    .copy-btn:hover {
        background-color: #2563eb !important;
        transform: translateY(-1px) !important;
    }

    .copy-btn:active {
        transform: translateY(0) !important;
    }

    /* Copy icon styling */
    .copy-icon {
        width: 14px !important;
        height: 14px !important;
        display: inline !important;
    }

    /* Account name styling */
    .account-name {
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #1f2937 !important;
        word-break: break-word !important;
        line-height: 1.4 !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
    }

    /* Bank name styling */
    .bank-name {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
    }

    /* Fund wallet header and subtitle */
    .fund-wallet-title {
        font-size: 24px !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
        margin-bottom: 8px !important;
    }

    .fund-wallet-subtitle {
        font-size: 14px !important;
        color: #6b7280 !important;
        line-height: 1.6 !important;
    }

    /* Fund wallet header content */
    .fund-wallet-header-content {
        margin-bottom: 24px !important;
    }

    /* Info section */
    .info-section {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        margin-top: 24px !important;
    }

    .info-card,
    .support-card {
        padding: 16px !important;
        background: #f9fafb !important;
        border-radius: 12px !important;
        border: 1px solid #e5e7eb !important;
    }

    .info-card h3,
    .support-card h3 {
        font-size: 16px !important;
        font-weight: 700 !important;
        margin-bottom: 12px !important;
        color: #1f2937 !important;
    }

    .info-card ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .info-card li {
        font-size: 13px !important;
        color: #4b5563 !important;
        padding: 8px 0 !important;
        padding-left: 24px !important;
        position: relative !important;
        line-height: 1.5 !important;
    }

    .info-card li::before {
        content: "✓" !important;
        position: absolute !important;
        left: 0 !important;
        color: #10b981 !important;
        font-weight: bold !important;
    }

    .support-card p {
        font-size: 13px !important;
        color: #6b7280 !important;
        margin-bottom: 12px !important;
        line-height: 1.5 !important;
    }

    .support-buttons {
        display: flex !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
    }

    .support-buttons .btn {
        flex: 1 !important;
        min-width: 120px !important;
        font-size: 13px !important;
        padding: 10px 12px !important;
    }
}

/* ========================================
   WALLET VIEW - VIRTUAL ACCOUNT DETAILS FIX
   Mobile Responsive Layout (320px - 768px)
   ======================================== */

@media (max-width: 768px) {

    /* Wallet view virtual account cards - 3 column layout */
    #wallet-view .row.g-4>.col-md-4 {
        width: 32% !important;
        max-width: 32% !important;
        flex: 0 0 32% !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Virtual account card styling - compact */
    #wallet-view .col-md-4 .card {
        border-radius: 8px !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
        height: 100% !important;
    }

    #wallet-view .col-md-4 .card-body {
        padding: 0.75rem !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    /* Bank icon - smaller for 3-column */
    #wallet-view .col-md-4 .rounded-circle {
        width: 40px !important;
        height: 40px !important;
        margin: 0 auto 0.5rem auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #wallet-view .col-md-4 .rounded-circle i {
        font-size: 1.25rem !important;
    }

    /* Bank name - compact typography */
    #wallet-view .col-md-4 h5.card-title {
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.2 !important;
    }

    /* Account number container */
    #wallet-view .col-md-4 .mb-3 {
        margin-bottom: 0.5rem !important;
    }

    #wallet-view .col-md-4 .form-label {
        font-size: 0.65rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
        margin-bottom: 0.25rem !important;
        font-weight: 600 !important;
        color: #6b7280 !important;
    }

    /* Account number text - break properly on mobile */
    #wallet-view .col-md-4 .fw-bold.fs-6 {
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        word-break: break-all !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        letter-spacing: 0.5px !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
        display: block !important;
    }

    /* Copy button group - horizontal flex */
    #wallet-view .col-md-4 .d-flex.align-items-center.justify-content-center {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }

    /* Copy button - mobile optimized */
    #wallet-view .col-md-4 .btn-sm {
        padding: 0.35rem 0.6rem !important;
        font-size: 0.7rem !important;
        min-width: 36px !important;
        min-height: 36px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 5px !important;
        flex-shrink: 0 !important;
        transition: all 0.2s ease !important;
    }

    #wallet-view .col-md-4 .btn-sm:hover {
        transform: translateY(-1px) !important;
    }

    #wallet-view .col-md-4 .btn-sm i {
        font-size: 0.65rem !important;
    }

    /* Account name text */
    #wallet-view .col-md-4 .fw-medium {
        font-size: 0.7rem !important;
        font-weight: 500 !important;
        line-height: 1.3 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
    }

    /* Generate account button - if shown */
    #wallet-view .col-md-4 .btn-primary {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.7rem !important;
        width: 100% !important;
        margin-top: 0.5rem !important;
    }
}

/* Extra small devices (320px - 480px) */
@media (max-width: 480px) {
    .virtual-accounts {
        gap: 12px !important;
    }

    .account-card {
        padding: 12px !important;
    }

    .account-header {
        margin-bottom: 12px !important;
        gap: 8px !important;
    }

    .bank-logo-container {
        width: 45px !important;
        height: 45px !important;
    }

    .bank-logo-img {
        max-width: 40px !important;
        max-height: 40px !important;
    }

    .account-details {
        gap: 10px !important;
    }

    .account-info {
        padding: 10px !important;
        gap: 5px !important;
    }

    .copy-field {
        gap: 6px !important;
    }

    .account-number {
        font-size: 14px !important;
        min-width: 130px !important;
    }

    .copy-btn {
        padding: 6px 10px !important;
        font-size: 11px !important;
        min-width: 65px !important;
    }

    .copy-icon {
        width: 12px !important;
        height: 12px !important;
    }

    .account-name {
        font-size: 13px !important;
    }

    .bank-name {
        font-size: 13px !important;
    }

    .fund-wallet-title {
        font-size: 20px !important;
    }

    .fund-wallet-subtitle {
        font-size: 13px !important;
    }

    .info-card h3,
    .support-card h3 {
        font-size: 15px !important;
    }

    .info-card li {
        font-size: 12px !important;
        padding-left: 22px !important;
    }

    .support-card p {
        font-size: 12px !important;
    }

    .support-buttons {
        flex-direction: column !important;
    }

    .support-buttons .btn {
        width: 100% !important;
    }
}


/* Extra small devices (320px - 480px) - Wallet View Virtual Accounts */
@media (max-width: 480px) {

    /* Further compress 3-column layout */
    #wallet-view .row.g-4>.col-md-4 {
        width: 31% !important;
        max-width: 31% !important;
        flex: 0 0 31% !important;
        padding-left: 0.2rem !important;
        padding-right: 0.2rem !important;
        margin-bottom: 0.4rem !important;
    }

    #wallet-view .col-md-4 .card-body {
        padding: 0.6rem !important;
    }

    #wallet-view .col-md-4 .rounded-circle {
        width: 36px !important;
        height: 36px !important;
        margin-bottom: 0.4rem !important;
    }

    #wallet-view .col-md-4 .rounded-circle i {
        font-size: 1.1rem !important;
    }

    #wallet-view .col-md-4 h5.card-title {
        font-size: 0.75rem !important;
        margin-bottom: 0.4rem !important;
    }

    #wallet-view .col-md-4 .form-label {
        font-size: 0.6rem !important;
        margin-bottom: 0.2rem !important;
    }

    #wallet-view .col-md-4 .fw-bold.fs-6 {
        font-size: 0.75rem !important;
        margin-bottom: 0.4rem !important;
    }

    #wallet-view .col-md-4 .btn-sm {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.65rem !important;
        min-width: 34px !important;
        min-height: 34px !important;
    }

    #wallet-view .col-md-4 .fw-medium {
        font-size: 0.65rem !important;
    }

    /* ===== ENHANCED MOBILE UI - WELCOME CARD ===== */
    /* Improved welcome card with better mobile spacing and visual hierarchy */
    .card.bg-primary {
        border-radius: 16px !important;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
        margin-bottom: 1rem !important;
        overflow: hidden;
    }

    .card.bg-primary .card-body {
        padding: 1.25rem !important;
    }

    .card.bg-primary h4 {
        font-size: 1.35rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
    }

    .card.bg-primary p {
        font-size: 0.9rem !important;
        opacity: 0.9 !important;
        line-height: 1.4 !important;
    }

    .card.bg-primary .wallet-balance-section {
        margin-top: 1rem !important;
        padding-top: 1rem !important;
        border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    }

    .card.bg-primary .wallet-balance-section span {
        font-size: 0.85rem !important;
        opacity: 0.85 !important;
        font-weight: 500 !important;
    }

    .card.bg-primary .wallet-balance-section h2 {
        font-size: 1.75rem !important;
        font-weight: 800 !important;
        letter-spacing: -0.5px !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }

    /* ===== ENHANCED CHECK BALANCE BUTTON ===== */
    /* Modern, prominent check balance button with proper touch targets */
    .btn-dark,
    button[onclick*="checkBalance"],
    a[href*="*323#"] {
        min-height: 48px !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        transition: all 0.3s ease !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }

    .btn-dark:active,
    button[onclick*="checkBalance"]:active {
        transform: scale(0.98) !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
    }

    /* ===== ENHANCED CAROUSEL FOR MOBILE ===== */
    /* Better carousel spacing and visual polish */
    #dashboardCarousel {
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
        margin-bottom: 1rem !important;
    }

    #dashboardCarousel .carousel-inner {
        border-radius: 12px !important;
    }

    .professional-slide-card {
        min-height: 200px !important;
        border-radius: 12px !important;
    }

    .slide-background {
        min-height: 200px !important;
    }

    .slide-image {
        min-height: 200px !important;
    }

    .slide-image img {
        object-fit: cover !important;
        border-radius: 12px !important;
    }

    /* Enhanced carousel indicators - more visible on mobile */
    .carousel-indicators {
        position: absolute !important;
        top: 12px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: auto !important;
        margin: 0 !important;
        z-index: 15 !important;
        display: flex !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 6px 12px !important;
        background: rgba(0, 0, 0, 0.3) !important;
        backdrop-filter: blur(8px) !important;
        border-radius: 20px !important;
    }

    .carousel-indicators button,
    .carousel-indicators .professional-indicator {
        width: 24px !important;
        height: 3px !important;
        border-radius: 2px !important;
        background: rgba(255, 255, 255, 0.5) !important;
        opacity: 1 !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .carousel-indicators button.active,
    .carousel-indicators .professional-indicator.active {
        width: 32px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    }

    /* ===== NEWS TICKER MOBILE ENHANCEMENT ===== */
    .news-ticker-container {
        border-radius: 10px !important;
        margin-bottom: 1rem !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    }

    .news-ticker {
        padding: 10px 16px !important;
        height: 44px !important;
    }

    /* ===== OVERALL MOBILE POLISH ===== */
    /* Better card shadows and depth */
    .card {
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
        transition: box-shadow 0.3s ease !important;
    }

    .card:active {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    }

    /* Improved spacing between elements */
    .row.mb-2 {
        margin-bottom: 1rem !important;
    }

    .row.mb-3 {
        margin-bottom: 1.25rem !important;
    }

    .row.mb-4 {
        margin-bottom: 1.5rem !important;
    }

    /* Better touch targets for all buttons */
    .btn {
        min-height: 44px !important;
        padding: 0.65rem 1rem !important;
        border-radius: 10px !important;
        font-weight: 600 !important;
        transition: all 0.2s ease !important;
    }

    .btn-sm {
        min-height: 36px !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.85rem !important;
    }

    .btn-lg {
        min-height: 52px !important;
        padding: 0.85rem 1.5rem !important;
        font-size: 1rem !important;
    }

    /* Smooth transitions for interactive elements */
    .card,
    .btn,
    .nav-link,
    .list-group-item {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    /* Enhanced color contrast for better readability */
    .text-muted {
        color: #6b7280 !important;
    }

    /* Better focus states for accessibility */
    .btn:focus,
    .form-control:focus,
    .form-select:focus {
        outline: 2px solid rgba(59, 130, 246, 0.5) !important;
        outline-offset: 2px !important;
    }

    /* Improved form controls for mobile */
    .form-control,
    .form-select {
        min-height: 48px !important;
        font-size: 1rem !important;
        border-radius: 10px !important;
        padding: 0.75rem !important;
    }

    /* Better spacing for input groups */
    .input-group {
        border-radius: 10px !important;
        overflow: hidden !important;
    }

    .input-group-text {
        min-height: 48px !important;
        padding: 0.75rem !important;
        border-radius: 0 !important;
    }

    /* Enhanced modal appearance on mobile */
    .modal-content {
        border-radius: 16px !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    }

    .modal-header {
        padding: 1.25rem !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    }

    .modal-body {
        padding: 1.25rem !important;
    }

    .modal-footer {
        padding: 1rem 1.25rem !important;
        border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    }

    /* Better list group items */
    .list-group-item {
        padding: 1rem !important;
        border-radius: 10px !important;
        margin-bottom: 0.5rem !important;
    }

    /* Enhanced alert boxes */
    .alert {
        border-radius: 10px !important;
        padding: 1rem !important;
        border: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    }

    /* Better badge styling */
    .badge {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        border-radius: 6px !important;
    }

    /* Improved table responsiveness */
    .table-responsive {
        border-radius: 10px !important;
        overflow: hidden !important;
    }

    /* Better dropdown menus */
    .dropdown-menu {
        border-radius: 12px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
        border: none !important;
        padding: 0.5rem !important;
    }

    .dropdown-item {
        border-radius: 8px !important;
        padding: 0.75rem 1rem !important;
        margin-bottom: 0.25rem !important;
        transition: all 0.2s ease !important;
    }

    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: rgba(59, 130, 246, 0.1) !important;
        transform: translateX(4px) !important;
    }

    /* Enhanced navbar for mobile */
    .navbar {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
        backdrop-filter: blur(10px) !important;
    }

    /* Better pagination */
    .pagination {
        gap: 0.5rem !important;
    }

    .page-link {
        min-width: 44px !important;
        min-height: 44px !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Improved progress bars */
    .progress {
        height: 8px !important;
        border-radius: 10px !important;
        overflow: hidden !important;
    }

    .progress-bar {
        border-radius: 10px !important;
    }

    /* Better spinner sizing */
    .spinner-border {
        width: 2rem !important;
        height: 2rem !important;
    }

    .spinner-border-sm {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }

    /* Enhanced toast notifications */
    .toast {
        border-radius: 12px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    }

    /* Better breadcrumb */
    .breadcrumb {
        background: transparent !important;
        padding: 0.75rem 0 !important;
    }

    .breadcrumb-item {
        font-size: 0.9rem !important;
    }

    /* Improved tabs */
    .nav-tabs {
        border-bottom: 2px solid rgba(0, 0, 0, 0.08) !important;
        gap: 0.5rem !important;
    }

    .nav-tabs .nav-link {
        border: none !important;
        border-radius: 8px 8px 0 0 !important;
        padding: 0.75rem 1rem !important;
        font-weight: 600 !important;
    }

    .nav-tabs .nav-link.active {
        background-color: transparent !important;
        border-bottom: 3px solid #3b82f6 !important;
        color: #3b82f6 !important;
    }

    /* Better pills */
    .nav-pills {
        gap: 0.5rem !important;
    }

    .nav-pills .nav-link {
        border-radius: 10px !important;
        padding: 0.75rem 1rem !important;
        font-weight: 600 !important;
    }

    .nav-pills .nav-link.active {
        background-color: #3b82f6 !important;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
    }
}