/* ═══════════════════════════════════════════════════════════════════
   MOBILE-FIRST RESPONSIVE OVERRIDES
   File: mobile-first.css
   Strategy: Mobile-first overrides for screens < 1024px
   Loaded AFTER tailwind-output.css so it can override existing rules.
   ═══════════════════════════════════════════════════════════════════ */

/* ═════════════════════════ DEFAULTS (mobile chrome hidden on desktop) ═════════════════════════ */
.mobile-top-header,
.mobile-bottom-nav,
.mobile-side-drawer {
    display: none;
}

/* Hero cells are mobile-only (hidden by default on desktop) */
.table-container .table tbody td.cell-hero,
.tesla-table tbody td.cell-hero {
    display: none;
}

/* Mobile pagination controls hidden on desktop */
.pagination-controls-mobile {
    display: none;
}

/* ═════════════════════════ MOBILE & TABLET (< 1024px) ═════════════════════════ */
@media (max-width: 1023.98px) {

    /* ----- Layout ----- */
    .admin-layout {
        flex-direction: column;
    }

    /* Hide both desktop sidebars on mobile */
    .sidebar,
    .supplier-sidebar,
    .sidebar *,
    .supplier-sidebar * {
        display: none !important;
    }

    /* Hide the original top-header (replaced by mobile-top-header) */
    .top-header {
        display: none !important;
    }

    /* Main content takes full width, with padding for mobile chrome */
    .main-content {
        margin-right: 0 !important;
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-top: 56px;        /* below MobileTopHeader */
        padding-bottom: 72px;     /* above MobileBottomNav */
    }

    .main-content .page-content {
        padding: 1rem;
    }

    /* ----- Show mobile chrome ----- */
    .mobile-top-header,
    .mobile-bottom-nav {
        display: flex;
    }

    .mobile-side-drawer {
        display: block;
    }

    /* ═══════════════ DATA TABLES → NATIVE MOBILE CARDS ═══════════════ */
    /* Apply to TeslaTable (renders as .table inside .table-container/.table-wrapper) */
    .table-container,
    .table-wrapper {
        overflow: visible !important;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 !important;
    }

    .table-container .table,
    .tesla-table {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        display: block;
        width: 100%;
    }

    .table-container .table thead,
    .tesla-table thead {
        display: none !important;
    }

    .table-container .table tbody,
    .tesla-table tbody {
        display: block;
    }

    /* Each row = a card */
    .table-container .table tbody tr,
    .tesla-table tbody tr {
        display: block;
        background: hsl(var(--card));
        border: 1px solid hsl(var(--border));
        border-radius: 14px;
        padding: 0.875rem 1rem 0.5rem;
        margin-bottom: 0.75rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        position: relative;
    }

    /* Pressed state for native feel */
    .table-container .table tbody tr:active,
    .tesla-table tbody tr:active {
        background: hsl(var(--muted) / 0.4);
        transform: scale(0.995);
        transition: transform 0.1s, background 0.1s;
    }

    /* Each cell = label + value row */
    .table-container .table tbody td,
    .tesla-table tbody td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.4rem 0 !important;
        border-bottom: 1px solid hsl(var(--border) / 0.35);
        text-align: start !important;
        width: 100% !important;
        min-height: 32px;
    }

    .table-container .table tbody td:last-child,
    .tesla-table tbody td:last-child {
        border-bottom: none;
        padding-top: 0.6rem !important;
        justify-content: flex-end;
        gap: 0.25rem;
    }

    /* Label from data-label attribute */
    .table-container .table tbody td[data-label]::before,
    .tesla-table tbody td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        color: hsl(var(--muted-foreground));
        font-size: 0.78rem;
        flex-shrink: 0;
    }

    /* "Hero" cell: spans full width as the card title (no inline label) */
    .table-container .table tbody td.cell-hero,
    .tesla-table tbody td.cell-hero {
        display: block !important;
        padding-bottom: 0.6rem !important;
        margin-bottom: 0.2rem;
        border-bottom: 1px solid hsl(var(--border) / 0.5);
        min-height: 0;
    }

    .table-container .table tbody td.cell-hero::before,
    .tesla-table tbody td.cell-hero::before {
        display: none !important;
    }

    /* Cells without data-label and not hero: hide ::before, right-align content */
    .table-container .table tbody td:not([data-label]):not(.cell-hero)::before,
    .tesla-table tbody td:not([data-label]):not(.cell-hero)::before {
        content: "";
        display: none;
    }

    /* Hide cells marked as desktop-only on mobile */
    .table-container .table tbody td.hide-on-mobile,
    .tesla-table tbody td.hide-on-mobile {
        display: none !important;
    }

    /* Action button cells - tighter spacing */
    .table-container .table tbody td .action-buttons,
    .tesla-table tbody td .action-buttons {
        gap: 0.25rem !important;
    }

    /* Bigger tap targets for action buttons */
    .table-container .table tbody td .action-buttons .tesla-button,
    .tesla-table tbody td .action-buttons .tesla-button {
        min-width: 36px;
        min-height: 36px;
    }

    /* ═══════════════ STATS GRID → 2 COLUMNS (NO SCROLL) ═══════════════ */
    .stats-grid-mobile {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.5rem !important;
        margin-bottom: 1rem;
    }

    /* Compact stat card on mobile */
    .stats-grid-mobile .stat-card,
    .stats-grid-mobile .tesla-stat-card {
        padding: 0.625rem 0.75rem !important;
        gap: 0.375rem !important;
        min-height: 0 !important;
    }

    .stats-grid-mobile .stat-icon {
        width: 32px !important;
        height: 32px !important;
        border-radius: 8px;
    }

    .stats-grid-mobile .stat-icon svg {
        width: 16px !important;
        height: 16px !important;
    }

    .stats-grid-mobile .stat-label {
        font-size: 0.65rem !important;
        line-height: 1.2;
    }

    .stats-grid-mobile .stat-value {
        font-size: 1.1rem !important;
        margin-top: 0.125rem;
        line-height: 1.1;
    }

    .stats-grid-mobile .stat-change {
        font-size: 0.6rem !important;
    }

    /* ═══════════════ HIDE STRAY DESKTOP CONTROLS ON MOBILE ═══════════════ */
    .sidebar-collapse-btn,
    .sidebar-toggle,
    .user-dropdown,
    .dropdown-arrow,
    .user-avatar-btn,
    .user-menu,
    button[aria-label*="toggle"],
    button[aria-label*="collapse"],
    .collapse-btn,
    .toggle-sidebar-btn {
        display: none !important;
    }

    /* ═══════════════ PAGE HEADER — HIDE COMPLETELY ON MOBILE ═══════════════ */
    .page-header {
        display: none !important;
    }

    /* ═══════════════ FILTERS — STACK VERTICALLY ═══════════════ */
    .filters-container {
        display: flex !important;
        flex-direction: column;
        gap: 0.625rem;
    }

    .filter-search-box {
        width: 100% !important;
    }

    .filter-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .filter-group > * {
        width: 100% !important;
        min-width: 0 !important;
    }

    .filter-group input[type="date"],
    .filter-group input[type="text"],
    .filter-group select {
        width: 100% !important;
    }

    /* ═══════════════ PROGRESS TRACKER → VERTICAL ON MOBILE ═══════════════ */
    .progress-tracker-mobile .relative.py-4 {
        padding: 0.5rem 0 !important;
    }

    /* Hide horizontal background/progress lines */
    .progress-tracker-mobile .relative.py-4 > div.absolute {
        display: none;
    }

    /* Stack steps vertically with a vertical line connector */
    .progress-tracker-mobile .relative.flex.justify-between {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem;
        position: relative;
    }

    /* Vertical connector line behind circles */
    .progress-tracker-mobile .relative.flex.justify-between::before {
        content: '';
        position: absolute;
        top: 24px;
        bottom: 24px;
        inset-inline-start: 24px;
        width: 2px;
        background: hsl(var(--border));
        z-index: 0;
    }

    /* Each step: horizontal row (circle + label) */
    .progress-tracker-mobile .relative.flex.justify-between > div {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.875rem !important;
        width: 100%;
    }

    /* Allow label to wrap and align start */
    .progress-tracker-mobile .relative.flex.justify-between > div > span {
        white-space: normal !important;
        text-align: start;
        font-size: 0.875rem !important;
    }

    /* ═══════════════ ORDER ITEMS TABLE → CARDS ═══════════════ */
    .order-items-table {
        min-width: 0 !important;
    }

    .order-items-table thead {
        display: none;
    }

    .order-items-table tbody {
        display: block;
    }

    .order-items-table tbody tr {
        display: block;
        background: hsl(var(--card));
        border: 1px solid hsl(var(--border));
        border-radius: 12px;
        padding: 0.75rem 0.875rem;
        margin-bottom: 0.625rem;
    }

    .order-items-table tbody td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.4rem 0 !important;
        border-bottom: 1px solid hsl(var(--border) / 0.4);
        text-align: start !important;
        width: 100%;
    }

    .order-items-table tbody td:last-child {
        border-bottom: none;
    }

    .order-items-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: hsl(var(--muted-foreground));
        font-size: 0.75rem;
    }

    .order-items-table tbody td:not([data-label])::before {
        content: "";
        display: none;
    }

    /* Footer rows: stack as summary cards */
    .order-items-table tfoot {
        display: block;
        margin-top: 0.5rem;
        background: hsl(var(--card));
        border: 1px solid hsl(var(--border));
        border-radius: 12px;
        padding: 0.5rem 0.875rem;
    }

    .order-items-table tfoot tr {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.4rem 0;
        border-bottom: 1px solid hsl(var(--border) / 0.4);
    }

    .order-items-table tfoot tr:last-child {
        border-bottom: none;
    }

    .order-items-table tfoot td {
        padding: 0 !important;
        border: none !important;
        text-align: start !important;
    }

    .order-items-table tfoot td[colspan] {
        flex: 1;
    }

    /* Allow parent wrapper to relax horizontal scroll on mobile */
    .order-items-wrapper {
        overflow-x: visible !important;
    }

    /* ═══════════════ TESLA CARDS spacing ═══════════════ */
    .tesla-card {
        border-radius: 12px;
    }

    /* ═══════════════ TESLA MODAL → FULL SCREEN ═══════════════ */
    .tesla-modal-content,
    .tesla-modal-panel {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100vh !important;
        height: 100vh;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    /* Page header */
    .page-header {
        margin-bottom: 1rem;
    }

    .page-title {
        font-size: 1.25rem !important;
    }

    /* Touch-friendly buttons (44px min) */
    .tesla-button {
        min-height: 40px;
    }

    /* Responsive full-width helper */
    .responsive-full {
        width: 100%;
        justify-content: center;
    }

    /* ═══════════════ COMPACT STOCK CARD (mobile-only) ═══════════════ */
    /* Tighter row card padding for stock list */
    .table-container .table tbody tr,
    .tesla-table tbody tr {
        padding: 0.625rem 0.75rem !important;
        margin-bottom: 0.5rem !important;
        border-radius: 12px;
    }

    .stock-card-mobile {
        display: flex;
        align-items: flex-start;
        gap: 0.625rem;
        width: 100%;
    }

    .stock-card-icon {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        background: hsl(var(--primary) / 0.08);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .stock-card-body {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .stock-card-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        min-height: 20px;
    }

    .stock-card-badges {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        flex-wrap: wrap;
        min-width: 0;
    }

    .badge-brand {
        font-size: 0.65rem;
        font-weight: 600;
        padding: 2px 8px;
        border-radius: 6px;
        background: hsl(var(--muted));
        color: hsl(var(--muted-foreground));
        text-transform: uppercase;
        letter-spacing: 0.02em;
        white-space: nowrap;
    }

    .badge-partno {
        font-size: 0.65rem;
        font-weight: 700;
        padding: 2px 8px;
        border-radius: 6px;
        background: hsl(var(--primary) / 0.12);
        color: hsl(var(--primary));
        font-family: ui-monospace, monospace;
        white-space: nowrap;
    }

    .stock-card-name {
        font-size: 0.875rem;
        font-weight: 600;
        color: hsl(var(--foreground));
        line-height: 1.3;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .stock-card-meta {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.75rem;
        color: hsl(var(--muted-foreground));
        flex-wrap: wrap;
    }

    .stock-meta-price {
        font-weight: 700;
        color: hsl(var(--primary));
        font-size: 0.8rem;
    }

    .stock-meta-qty {
        display: inline-flex;
        align-items: center;
        gap: 0.2rem;
        font-weight: 600;
    }

    .stock-meta-branch {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100px;
    }

    .stock-meta-divider {
        opacity: 0.4;
    }

    /* Make actions row compact under the hero */
    .table-container .table tbody td:last-child,
    .tesla-table tbody td:last-child {
        padding: 0.5rem 0 0 !important;
        margin-top: 0.25rem;
        border-top: 1px solid hsl(var(--border) / 0.4);
        justify-content: flex-end;
    }

    .table-container .table tbody td .action-buttons .tesla-button,
    .tesla-table tbody td .action-buttons .tesla-button {
        min-width: 32px !important;
        min-height: 32px !important;
        padding: 0.25rem !important;
    }

    /* ═══════════════ COMPACT PAGINATION ═══════════════ */
    .pagination-wrapper {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding: 1rem 0.75rem !important;
        width: 100%;
        background: hsl(var(--card));
        border-radius: 12px;
    }

    /* Hide desktop page-number list on mobile */
    .pagination-controls-desktop {
        display: none !important;
    }

    /* Show mobile picker layout */
    .pagination-controls-mobile {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        width: 100%;
        order: 1;
        padding: 0 0.25rem;
    }

    .pagination-page-picker {
        display: flex;
        align-items: center;
        gap: 0.625rem;
        flex: 1;
        justify-content: center;
        font-size: 0.875rem;
        font-weight: 500;
        color: hsl(var(--foreground));
    }

    .pagination-page-label {
        white-space: nowrap;
        color: hsl(var(--muted-foreground));
    }

    .pagination-page-select {
        height: 38px !important;
        min-width: 80px !important;
        max-width: 100px !important;
        padding: 0 0.75rem !important;
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        text-align: center;
        background-color: hsl(var(--primary) / 0.08) !important;
        border: 2px solid hsl(var(--primary) / 0.2) !important;
        border-radius: 10px !important;
        color: hsl(var(--primary)) !important;
        transition: all 0.2s ease;
    }

    .pagination-page-select:focus {
        outline: none;
        border-color: hsl(var(--primary)) !important;
        background-color: hsl(var(--primary) / 0.12) !important;
    }

    .pagination-info {
        order: 3;
        justify-content: center !important;
        font-size: 0.75rem !important;
        font-weight: 500;
        flex-wrap: wrap;
        gap: 0.3rem;
        color: hsl(var(--muted-foreground));
        padding: 0.5rem 0 0;
        border-top: 1px solid hsl(var(--border) / 0.5);
    }

    .pagination-info .pagination-range {
        font-weight: 700;
        color: hsl(var(--foreground));
    }

    .pagination-info .pagination-total-items {
        font-weight: 700;
        color: hsl(var(--foreground));
    }

    .pagination-size-selector {
        order: 2;
        justify-content: center !important;
        font-size: 0.8rem !important;
        gap: 0.5rem !important;
        font-weight: 500;
    }

    .pagination-size-selector .pagination-size-label {
        color: hsl(var(--muted-foreground));
    }

    .pagination-size-selector .pagination-select {
        height: 32px !important;
        padding: 0 0.625rem !important;
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        min-width: 65px;
        background-color: hsl(var(--muted)) !important;
        border: 1px solid hsl(var(--border)) !important;
        border-radius: 8px !important;
        color: hsl(var(--foreground)) !important;
    }

    .pagination-btn-nav {
        min-width: 38px !important;
        width: 38px !important;
        height: 38px !important;
        flex-shrink: 0;
        border-radius: 10px !important;
        background-color: hsl(var(--muted)) !important;
        border: 1px solid hsl(var(--border)) !important;
        color: hsl(var(--foreground)) !important;
        transition: all 0.2s ease;
    }

    .pagination-btn-nav:hover:not(:disabled) {
        background-color: hsl(var(--primary)) !important;
        border-color: hsl(var(--primary)) !important;
        color: white !important;
    }

    .pagination-btn-nav:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

    .pagination-btn-nav svg {
        transition: transform 0.2s ease;
    }

    .pagination-btn-nav:hover:not(:disabled) svg {
        transform: scale(1.1);
    }

    /* ═══════════════ FILTER CARD HEADER + DROPDOWNS ═══════════════ */
    /* Stack HeaderRow (title + action buttons) on mobile */
    .tesla-card-header,
    [class*="card-header"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .tesla-card-header .tesla-card-title,
    [class*="card-header"] [class*="card-title"] {
        font-size: 1rem !important;
        font-weight: 700;
    }

    /* Header action buttons row — primary button takes full width, secondary share row */
    .tesla-card-header > div:last-child,
    [class*="card-header"] > div:last-child {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
        width: 100%;
    }

    /* Primary button (إضافة) spans full row */
    .tesla-card-header > div:last-child .tesla-button.primary,
    .tesla-card-header > div:last-child .tesla-button[class*="primary"],
    [class*="card-header"] > div:last-child .tesla-button[class*="primary"] {
        grid-column: 1 / -1;
        order: -1;
        min-height: 44px !important;
        font-size: 0.875rem !important;
        font-weight: 600;
    }

    .tesla-card-header .tesla-button,
    [class*="card-header"] .tesla-button {
        min-height: 38px !important;
        font-size: 0.8rem !important;
        padding: 0.5rem 0.75rem !important;
        justify-content: center;
    }

    /* ─── Filters group: clean stacked layout ─── */
    .filters-container .filter-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.625rem !important;
        margin-top: 0.25rem;
    }

    .filter-search-box {
        width: 100% !important;
        margin-bottom: 0.25rem;
    }

    /* Force ALL filter items to full width — covers TeslaSearchableSelect, TeslaDropdown, etc. */
    .filters-container .filter-group > *,
    .filters-container .filter-group .filter-dropdown,
    .filters-container .filter-group .tesla-dropdown,
    .filters-container .filter-group .tesla-searchable-select {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        display: block !important;
    }

    /* Make sure inner trigger buttons fill the wrapper */
    .filters-container .filter-group .tesla-dropdown-trigger,
    .filters-container .filter-group .tesla-searchable-select-trigger,
    .filters-container .filter-group .tesla-searchable-select > button,
    .filters-container .filter-group select,
    .filters-container .filter-group input {
        width: 100% !important;
        min-height: 42px !important;
    }

    /* Reset button — make it an inline text link, full width, subtle */
    .filter-group .tesla-button[class*="ghost"],
    .filter-group > button[class*="ghost"] {
        width: 100% !important;
        flex: 0 0 auto !important;
        justify-content: center !important;
        margin-top: 0.25rem;
        min-height: 38px !important;
        font-size: 0.8rem !important;
        color: hsl(var(--muted-foreground)) !important;
        background: transparent !important;
        border: 1px dashed hsl(var(--border)) !important;
    }

    .filter-group .tesla-button[class*="ghost"]:hover {
        color: hsl(var(--destructive)) !important;
        border-color: hsl(var(--destructive) / 0.4) !important;
        background: hsl(var(--destructive) / 0.05) !important;
    }

    /* Filter card body padding tighter */
    .filters-container {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ═════════════════════════ DESKTOP (>= 1024px) ═════════════════════════ */
@media (min-width: 1024px) {
    /* Mobile chrome stays hidden (default state above) */
    .mobile-top-header,
    .mobile-bottom-nav,
    .mobile-side-drawer {
        display: none !important;
    }
}

/* ═════════════════════════ MOBILE TOP HEADER ═════════════════════════ */
.mobile-top-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 56px;
    background: hsl(var(--card));
    border-bottom: 1px solid hsl(var(--border));
    align-items: center;
    justify-content: space-between;
    padding: 0 0.75rem;
    z-index: 40;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mobile-top-header .header-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: hsl(var(--foreground));
    flex: 1;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 0.5rem;
}

.mobile-top-header .header-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: hsl(var(--foreground));
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.mobile-top-header .header-btn:hover,
.mobile-top-header .header-btn:focus-visible {
    background: hsl(var(--accent) / 0.5);
    outline: none;
}

.mobile-top-header .header-badge {
    position: absolute;
    top: 4px;
    inset-inline-end: 4px;
    background: hsl(var(--destructive));
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    line-height: 1.2;
    text-align: center;
}

/* ═════════════════════════ MOBILE BOTTOM NAV ═════════════════════════ */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    min-height: 64px;
    background: hsl(var(--card));
    border-top: 1px solid hsl(var(--border));
    justify-content: space-around;
    align-items: stretch;
    z-index: 40;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-nav .bottom-nav-item {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: hsl(var(--muted-foreground));
    font-size: 0.7rem;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    transition: color 0.2s;
    position: relative;
}

.mobile-bottom-nav .nav-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-bottom-nav .bottom-nav-item.active {
    color: hsl(var(--primary));
}

.mobile-bottom-nav .bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: hsl(var(--primary));
    border-radius: 0 0 3px 3px;
}

.mobile-bottom-nav .nav-badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -8px;
    background: hsl(var(--destructive));
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    min-width: 16px;
    line-height: 1.2;
    text-align: center;
}

/* ═════════════════════════ MOBILE SIDE DRAWER ═════════════════════════ */
.mobile-side-drawer {
    position: fixed;
    inset: 0;
    z-index: 60;
    visibility: hidden;
    transition: visibility 0.3s;
    pointer-events: none;
}

.mobile-side-drawer.open {
    visibility: visible;
    pointer-events: auto;
}

.mobile-side-drawer .drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-side-drawer.open .drawer-backdrop {
    opacity: 1;
}

.mobile-side-drawer .drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: hsl(var(--card));
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

[dir="ltr"] .mobile-side-drawer .drawer-content {
    right: auto;
    left: 0;
    transform: translateX(-100%);
}

.mobile-side-drawer.open .drawer-content {
    transform: translateX(0);
}

.mobile-side-drawer .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid hsl(var(--border));
}

.mobile-side-drawer .drawer-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.mobile-side-drawer .close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: hsl(var(--foreground));
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
}

.mobile-side-drawer .close-btn:hover {
    background: hsl(var(--accent) / 0.5);
}

.mobile-side-drawer .drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.mobile-drawer-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-drawer-link {
    display: block;
    padding: 0.85rem 1.25rem;
    color: hsl(var(--foreground));
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 1px solid hsl(var(--border) / 0.3);
    transition: background 0.15s;
}

.mobile-drawer-link:hover,
.mobile-drawer-link:focus {
    background: hsl(var(--accent) / 0.4);
}

.mobile-drawer-link-danger {
    color: hsl(var(--destructive));
}

.mobile-drawer-divider {
    height: 8px;
    background: hsl(var(--muted) / 0.3);
    margin: 0.25rem 0;
}
