/* ═══════════════════════════════════════════════════════
   Motor Survey Pro — Mobile Application Stylesheet
   Professional Native App Experience
   Applied only on screens ≤ 768px
   ═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {

    /* ─── Safe Area & Body ─── */
    :root {
        --mob-bottom-nav-h: 64px;
        --mob-topbar-h: 56px;
        --safe-bottom: env(safe-area-inset-bottom, 0px);
        --safe-top: env(safe-area-inset-top, 0px);
    }

    html,
    body {
        height: 100%;
        overflow: hidden;
        /* Outer body doesn't scroll */
        position: fixed;
        width: 100%;
    }

    /* ─── Hide Desktop Sidebar Completely ─── */
    .sidebar,
    .sidebar-overlay {
        display: none !important;
    }

    /* ─── Main Wrapper becomes full-screen ─── */
    .main-wrapper {
        margin-left: 0 !important;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        position: relative;
    }

    /* ─── Mobile Topbar Redesign ─── */
    .topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: var(--mob-topbar-h);
        padding: 0 16px;
        padding-top: var(--safe-top);
        background: var(--clr-sidebar);
        border-bottom: none;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        z-index: 300;
    }

    .menu-toggle {
        display: none !important;
        /* Hidden — we use bottom nav now */
    }

    .topbar-title {
        font-family: var(--font-display);
        font-size: 17px;
        font-weight: 700;
        color: var(--clr-text);
        flex: 1;
        letter-spacing: -0.3px;
    }

    .topbar-actions .btn-primary {
        display: none;
        /* Hide top "New Case" — accessible via bottom nav */
    }

    #themeToggle {
        color: var(--clr-text-2);
        font-size: 18px;
        padding: 6px 8px;
    }

    /* ─── Main Scrollable Content Area ─── */
    .main-content {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        padding: calc(var(--mob-topbar-h) + 16px) 14px calc(var(--mob-bottom-nav-h) + var(--safe-bottom) + 16px);
        max-width: 100%;
    }

    /* ─── Bottom Navigation Bar ─── */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(var(--mob-bottom-nav-h) + var(--safe-bottom));
        padding-bottom: var(--safe-bottom);
        background: var(--clr-sidebar);
        border-top: 1px solid var(--clr-border);
        display: flex;
        align-items: stretch;
        z-index: 300;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }

    .mob-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        text-decoration: none;
        color: var(--clr-text-3);
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.3px;
        transition: color 0.2s, background 0.2s;
        border-radius: 0;
        padding: 8px 4px;
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }

    .mob-nav-item:hover,
    .mob-nav-item:active {
        text-decoration: none;
        color: var(--clr-text);
        background: var(--clr-table-hover);
    }

    .mob-nav-item.active {
        color: var(--clr-brand);
    }

    .mob-nav-item.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 20%;
        right: 20%;
        height: 2.5px;
        border-radius: 0 0 4px 4px;
        background: var(--clr-brand);
    }

    .mob-nav-icon {
        font-size: 20px;
        line-height: 1;
        display: block;
        transition: transform 0.15s;
    }

    .mob-nav-item.active .mob-nav-icon {
        transform: translateY(-1px);
    }

    /* FAB (Floating Action Button) for New Case in center of bottom nav */
    .mob-nav-item.mob-nav-fab {
        flex: 0 0 72px;
        position: relative;
        color: #fff;
    }

    .mob-nav-fab-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--clr-brand), #7c3aed);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        box-shadow: 0 4px 16px rgba(59, 110, 248, 0.5);
        margin-top: -16px;
        transition: transform 0.15s, box-shadow 0.15s;
        border: 3px solid var(--clr-sidebar);
    }

    .mob-nav-fab-btn:active {
        transform: scale(0.93);
        box-shadow: 0 2px 8px rgba(59, 110, 248, 0.4);
    }

    .mob-nav-item.mob-nav-fab .mob-nav-label {
        font-size: 10px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.5);
    }

    /* ─── Page Header Compact Style ─── */
    .page-header {
        margin-bottom: 16px;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .page-header h1 {
        font-size: 18px;
    }

    .page-header p {
        font-size: 12px;
        margin-top: 2px;
    }

    .page-header>.btn {
        display: none;
        /* Use FAB instead */
    }

    /* ─── Stats Grid → 2x2 Grid Layout (Fits all 4 cards on Mobile Screen) ─── */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 16px;
        overflow: visible;
    }

    .stat-card {
        flex: unset;
        min-width: 0;
        padding: 12px 14px;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        border-radius: 12px;
        width: 100%;
    }

    .stat-card:hover {
        transform: none;
        /* disable on mobile */
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 16px;
        flex-shrink: 0;
    }

    .stat-value {
        font-size: 18px;
        font-weight: 700;
        line-height: 1.2;
    }

    .stat-label {
        font-size: 11px;
        color: var(--clr-text-3);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ─── Filter Bar → Only Search on Mobile ─── */
    .filter-bar {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 12px;
    }

    .filter-bar .form-group {
        display: none !important;
    }

    .filter-bar .form-group:first-child,
    .filter-bar .form-group:has(input[name="search"]) {
        display: block !important;
        width: 100%;
        min-width: 0;
        margin-bottom: 0;
    }

    /* ─── Case Cards instead of Table ─── */
    .table-wrapper {
        overflow: visible;
    }

    table.table-responsive-stack thead {
        display: none;
    }

    table.table-responsive-stack,
    table.table-responsive-stack tbody,
    table.table-responsive-stack tr,
    table.table-responsive-stack td {
        display: block;
        width: 100%;
    }

    table.table-responsive-stack tbody tr {
        background: var(--clr-surface);
        border: 1px solid var(--clr-border);
        border-radius: 14px;
        margin-bottom: 10px;
        padding: 14px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        position: relative;
        overflow: hidden;
        transition: box-shadow 0.2s;
    }

    table.table-responsive-stack tbody tr:active {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    table.table-responsive-stack td {
        border: none;
        padding: 3px 0;
        font-size: 13px;
        display: flex;
        align-items: baseline;
        gap: 6px;
        color: var(--clr-text-2);
        text-align: left;
    }

    table.table-responsive-stack td::before {
        content: attr(data-label) ":";
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--clr-text-3);
        white-space: nowrap;
        min-width: 70px;
        flex-shrink: 0;
        text-align: left;
    }

    table.table-responsive-stack td[data-label="#"]::before,
    table.table-responsive-stack td[data-label="Actions"]::before {
        display: none;
    }

    table.table-responsive-stack td[data-label="#"] {
        display: none;
        /* Hide row number */
    }

    /* Reg No (first visible) — treat as card title */
    table.table-responsive-stack td[data-label="Reg No."] {
        color: var(--clr-text);
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 4px;
    }

    table.table-responsive-stack td[data-label="Reg No."]::before {
        display: none;
    }

    /* Actions cell → full-width CTA bar at bottom of card */
    table.table-responsive-stack td[data-label="Actions"] {
        position: static;
        width: 100%;
        padding: 10px 0 0;
        display: block;
        margin-top: 8px;
        border-top: 1px solid var(--clr-border) !important;
    }

    /* Hide desktop dropdown on mobile */
    .desktop-actions {
        display: none !important;
    }

    /* Mobile CTA buttons row */
    .mobile-card-cta {
        display: flex;
        gap: 8px;
        flex-wrap: nowrap;
    }

    /* Hide on desktop (done in the min-width block below) */
    .mob-cta-btn {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 9px 10px;
        border-radius: 9px;
        font-size: 12.5px;
        font-weight: 600;
        text-decoration: none;
        transition: opacity 0.15s, transform 0.1s;
        -webkit-tap-highlight-color: transparent;
        white-space: nowrap;
    }

    .mob-cta-btn:active {
        opacity: 0.8;
        transform: scale(0.96);
        text-decoration: none;
    }

    .mob-cta-btn:hover {
        text-decoration: none;
    }

    /* View — outlined brand color */
    .mob-cta-view {
        background: var(--clr-brand-lt);
        color: var(--clr-brand);
        border: 1.5px solid var(--clr-brand);
    }

    /* Edit — solid brand */
    .mob-cta-edit {
        background: var(--clr-brand);
        color: #fff;
        border: 1.5px solid var(--clr-brand);
    }

    /* Report — success green */
    .mob-cta-report {
        background: #f0fdf4;
        color: #166534;
        border: 1.5px solid #bbf7d0;
        flex: 0 0 auto;
        padding: 9px 12px;
    }

    /* ─── Cards More Native ─── */
    .card {
        border-radius: 14px;
        border: 1px solid var(--clr-border);
    }

    .card-header {
        padding: 14px 16px 12px;
    }

    .card-body {
        padding: 16px;
    }

    .card-title {
        font-size: 15px;
    }

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

    /* ─── Forms Native Style ─── */
    .form-control {
        font-size: 16px;
        /* Prevents auto-zoom on focus in iOS */
        padding: 12px 14px;
        border-radius: 10px;
    }

    .form-row-2,
    .form-row-3,
    .form-row-4 {
        grid-template-columns: 1fr;
    }

    /* Step progress scrollable */
    .step-progress {
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 8px;
    }

    .step-progress::-webkit-scrollbar {
        display: none;
    }

    /* ─── Buttons ─── */
    .btn {
        border-radius: 10px;
        padding: 11px 16px;
        font-size: 14px;
        /* Add active press feedback */
        transition: transform 0.1s, background 0.2s;
    }

    .btn:active {
        transform: scale(0.97);
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 15px;
        border-radius: 12px;
    }

    .step-nav-bar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .step-nav-bar .btn {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }

    /* ─── Modals → Sheet style ─── */
    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .modal {
        border-radius: 20px 20px 0 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        padding-bottom: calc(16px + var(--safe-bottom));
        animation: slideUpSheet 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    }

    @keyframes slideUpSheet {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    /* ─── Dropdown Menus → Bigger Touch Targets ─── */
    .dropdown-item {
        padding: 12px 18px;
        font-size: 14px;
    }

    .dropdown-menu {
        min-width: 180px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    }

    /* ─── Page Transitions ─── */
    .main-content>* {
        animation: mobFadeIn 0.22s ease;
    }

    @keyframes mobFadeIn {
        from {
            opacity: 0;
            transform: translateY(6px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* ─── Alerts Compact ─── */
    .alert {
        font-size: 13px;
        padding: 12px 14px;
        border-radius: 10px;
    }

    /* ─── Login Page Mobile Overrides ─── */
    .login-page {
        align-items: flex-start;
        padding: 0;
    }

    .login-box {
        min-height: 100dvh;
        border-radius: 0;
        border: none;
        padding: 64px 28px 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: rgba(255, 255, 255, 0.06);
    }

    .login-header {
        padding: 16px 24px;
    }

    .login-logo h1 {
        font-size: 22px;
    }

    .login-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: transparent;
        padding-bottom: calc(8px + var(--safe-bottom));
    }

    /* ─── Back Buttons / Utility ─── */
    .btn-back-mobile {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 14px;
        font-weight: 600;
        color: var(--clr-brand);
        text-decoration: none;
        margin-bottom: 12px;
        padding: 2px 0;
    }

    .btn-back-mobile:hover {
        text-decoration: none;
    }

    /* ── Tappable Case Card Row ── */
    table.table-responsive-stack tbody tr.case-card-row {
        /* Active state feedback when card is tapped */
        transition: background 0.15s, box-shadow 0.15s;
    }

    table.table-responsive-stack tbody tr.case-card-row:active {
        background: var(--clr-brand-lt);
        box-shadow: 0 1px 4px rgba(59, 110, 248, 0.15);
    }

    /* Tap-to-view hint text (replaces desktop dropdown on mobile) */
    .mob-card-tap-hint {
        display: inline-block;
        font-size: 11px;
        font-weight: 600;
        color: var(--clr-brand);
        letter-spacing: 0.3px;
        opacity: 0.8;
    }

    /* Hide desktop dropdown, keep tap hint */
    .desktop-actions {
        display: none !important;
    }

    .mobile-card-cta {
        display: none !important;
    }

    /* Actions cell: completely hidden on mobile — whole card is the CTA */
    table.table-responsive-stack td[data-label="Actions"] {
        display: none !important;
    }

    /* ── View Page: Sticky Mobile Action Bar ── */
    .mob-view-action-bar {
        position: fixed;
        bottom: calc(var(--mob-bottom-nav-h) + var(--safe-bottom));
        left: 0;
        right: 0;
        background: var(--clr-surface);
        border-top: 1px solid var(--clr-border);
        padding: 10px 14px;
        display: flex;
        gap: 8px;
        z-index: 250;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    }

    .mob-view-action-bar .mob-action-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 11px 8px;
        border-radius: 10px;
        font-size: 12.5px;
        font-weight: 600;
        text-decoration: none;
        border: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.1s, opacity 0.15s;
        font-family: var(--font-main);
    }

    .mob-view-action-bar .mob-action-btn:active {
        transform: scale(0.95);
        opacity: 0.85;
        text-decoration: none;
    }

    .mob-view-action-bar .mob-action-btn:hover {
        text-decoration: none;
    }

    .mob-action-back {
        background: var(--clr-border);
        color: var(--clr-text-2);
        flex: 0 0 44px;
        padding: 11px 10px;
    }

    .mob-action-edit {
        background: var(--clr-brand);
        color: #fff;
    }

    .mob-action-bill {
        background: #fffbeb;
        color: #92400e;
        border: 1.5px solid #fed7aa !important;
    }

    .mob-action-report {
        background: #f0fdf4;
        color: #166534;
        border: 1.5px solid #bbf7d0 !important;
    }

    /* Push content up so it's not hidden behind the action bar */
    body.has-mob-action-bar .main-content {
        padding-bottom: calc(var(--mob-bottom-nav-h) + var(--safe-bottom) + 72px);
    }

    /* ─── Photo Grid Mobile ─── */

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .photo-thumb img {
        height: 100px;
    }

    /* ═══════════════════════════════════
       VIEW MODE (body.view-mode)
       ═══════════════════════════════════ */

    /* 1. Hide top page-header action buttons — sticky bar duplicates them */
    body.view-mode .page-header .d-flex {
        display: none !important;
    }

    /* 2. Hide the step progress stepper tabs */
    body.view-mode .stepper-container {
        display: none !important;
    }

    /* 3. Show ALL step sections at once as a document */
    body.view-mode .step-section {
        display: block !important;
        animation: none !important;
        margin-bottom: 12px;
    }

    /* 4. Hide Back/Save/Next nav buttons at bottom of each step */
    body.view-mode .step-nav-bar {
        display: none !important;
    }

    /* 5. Make form controls look like plain read-only text */
    body.view-mode #caseForm input,
    body.view-mode #caseForm select,
    body.view-mode #caseForm textarea {
        border: none !important;
        background: transparent !important;
        padding: 2px 0 !important;
        font-weight: 500 !important;
        color: var(--clr-text) !important;
        font-size: 13.5px !important;
        min-height: unset !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        pointer-events: none !important;
        resize: none !important;
        -webkit-appearance: none;
        appearance: none;
    }

    /* 6. Labels become small muted captions */
    body.view-mode #caseForm .form-label {
        font-size: 10px !important;
        color: var(--clr-text-3) !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 1px;
    }

    /* 7. Compact form-group with a subtle divider */
    body.view-mode #caseForm .form-group {
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--clr-border);
    }

    /* 8. Hide the "Viewing Mode" alert — sticky bar makes it clear */
    body.view-mode .alert-info {
        display: none !important;
    }

    /* 9. Hide upload/add controls */
    body.view-mode .photo-dropzone,
    body.view-mode .estimate-dropzone,
    body.view-mode .del-photo,
    body.view-mode .add-row-btn,
    body.view-mode .del-row-btn {
        display: none !important;
    }

    /* 10. Checkboxes in View Mode */
    body.view-mode .form-check {
        pointer-events: none !important;
        border: none !important;
        background: transparent !important;
        padding: 4px 0 !important;
        box-shadow: none !important;
        cursor: default !important;
    }

    body.view-mode .form-check input[type="checkbox"] {
        -webkit-appearance: checkbox !important;
        appearance: checkbox !important;
        pointer-events: none !important;
        opacity: 0.7;
    }

    /* ─── Steps 9-12 & 14 Mobile UI Enhancements ─── */
    .card-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .card-header .card-title {
        flex: 1;
        min-width: 180px;
    }

    .card-header .add-row-btn,
    .card-header .btn-outline {
        align-self: flex-start;
        padding: 6px 12px;
        font-size: 13px;
    }

    /* Dynamic Tables (Steps 9, 10, 11, 14) */
    .dynamic-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        margin-bottom: 12px;
    }

    .dynamic-table .table input,
    .dynamic-table .table select {
        font-size: 16px !important;
        /* Prevents auto-zoom on iOS */
        padding: 10px 12px;
        min-height: 42px;
        border-radius: 8px;
    }

    .dynamic-table .table th,
    .dynamic-table .table td {
        padding: 8px 10px;
        vertical-align: middle;
    }

    .del-row-btn {
        min-width: 38px;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        border-radius: 8px;
    }

    /* Summary Table (Step 12) Mobile Fitting & View Mode */
    .summary-table {
        width: 100%;
        font-size: 13px;
    }

    .summary-table th,
    .summary-table td {
        padding: 8px 6px;
    }

    .summary-table input.form-control {
        font-size: 15px !important;
        padding: 6px 8px;
        min-height: 38px;
        width: 100%;
        max-width: 110px;
        text-align: right;
    }

    body.view-mode .summary-table td input.form-control {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        font-weight: 700 !important;
        color: var(--clr-text) !important;
        text-align: right !important;
        width: auto !important;
        box-shadow: none !important;
    }

    .net-liability-display {
        padding: 16px 14px;
        margin-top: 16px;
        border-radius: 14px;
        word-break: break-word;
    }

    .net-liability-display .amount {
        font-size: 24px;
        word-break: break-all;
    }

    .net-liability-display .words {
        font-size: 12px;
        line-height: 1.4;
    }

    /* Checkboxes on Mobile (Step 6 & Step 8) */
    .form-group[style*="padding-top:24px"],
    .form-group[style*="padding-top: 24px"] {
        padding-top: 0 !important;
        margin-top: 4px;
    }

    .form-check {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        background: var(--clr-surface);
        border: 1.5px solid var(--clr-border);
        border-radius: 12px;
        width: 100%;
        margin-bottom: 0;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.15s, border-color 0.15s;
    }

    .form-check:active {
        background: var(--clr-table-hover);
        border-color: var(--clr-brand);
    }

    .form-check input[type="checkbox"] {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        accent-color: var(--clr-brand);
        cursor: pointer;
    }

    .form-check span {
        font-size: 14px;
        font-weight: 600;
        color: var(--clr-text);
        line-height: 1.3;
    }



    /* ═══════════════════════════════════
       SETTINGS PAGE — VIEW MODE
       body.settings-view-mode
       ═══════════════════════════════════ */

    /* Hide desktop save button in header on mobile */
    .settings-desktop-actions {
        display: none !important;
    }

    /* Hide desktop Save button in step-nav-bar on mobile */
    .step-nav-bar .btn-lg {
        display: none !important;
    }

    /* In view mode: form fields look like plain text */
    body.settings-view-mode #settingsForm input,
    body.settings-view-mode #settingsForm select,
    body.settings-view-mode #settingsForm textarea {
        border: none !important;
        background: transparent !important;
        padding: 2px 0 !important;
        font-weight: 500 !important;
        color: var(--clr-text) !important;
        font-size: 13.5px !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        resize: none !important;
    }

    body.settings-view-mode #settingsForm .form-label {
        font-size: 10px !important;
        color: var(--clr-text-3) !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 1px;
    }

    body.settings-view-mode #settingsForm .form-group {
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--clr-border);
    }

    /* ═══════════════════════════════════
       MASTER INSURERS — MOBILE
       ═══════════════════════════════════ */

    /* Hide desktop Add Insurer header button on mobile */
    .desktop-only-btn {
        display: none !important;
    }

    /* Insurers: show mobile CTA buttons */
    #insurersTable .mobile-card-cta {
        display: flex !important;
        gap: 8px;
        padding-top: 8px;
    }

    /* Insurer Name as card title */
    #insurersTable td[data-label="Insurer Name"] {
        font-size: 15px;
        font-weight: 700;
        color: var(--clr-text);
        margin-bottom: 4px;
    }

    #insurersTable td[data-label="Insurer Name"]::before {
        display: none;
    }

    /* Insurers Actions cell: no border, just the CTA buttons */
    #insurersTable td[data-label="Actions"] {
        display: block !important;
        position: static !important;
        padding: 0 !important;
        margin-top: 0;
        border: none !important;
    }

    /* Floating Action Button for Add Insurer */
    .mob-insurers-fab {
        position: fixed;
        bottom: calc(var(--mob-bottom-nav-h) + var(--safe-bottom) + 16px);
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--clr-brand), #7c3aed);
        color: #fff;
        font-size: 28px;
        line-height: 1;
        border: none;
        cursor: pointer;
        box-shadow: 0 4px 20px rgba(59, 110, 248, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 280;
        transition: transform 0.15s, box-shadow 0.15s;
        -webkit-tap-highlight-color: transparent;
    }

    .mob-insurers-fab:active {
        transform: scale(0.92);
        box-shadow: 0 2px 10px rgba(59, 110, 248, 0.4);
    }

}

/* ═══════════════════════════════════════════════════════
   Extra small phones (< 375px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 375px) {
    .stat-card {
        flex: 0 0 115px;
        min-width: 115px;
    }

    .main-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .login-box {
        padding: 56px 20px 36px;
    }
}