/**
 * SynckShop - Account Mobile App-Like Experience
 * Estilos para versión móvil similar a aplicación nativa
 * 
 * @version 1.0.0
 */

/* ============================================
   CSS VARIABLES MOBILE
   ============================================ */
:root {
    --mobile-nav-height: 76px;
    --mobile-header-height: 56px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-top: env(safe-area-inset-top, 0px);
    --account-mobile-bottom-space: calc(var(--mobile-nav-height) + var(--safe-area-bottom) + 1.5rem);
}

/* ============================================
   FLOATING ACTION BUTTON (Base styles - always available)
   Renamed to account-fab to avoid conflict with FontAwesome .fab class
   ============================================ */
.account-fab {
    position: fixed;
    bottom: 6rem;
    right: 1rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 9999;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.account-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.account-fab:active {
    transform: scale(0.95);
}

/* ============================================
   MOBILE DETECTION (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    
    /* Hide desktop sidebar on mobile */
    .account__sidebar {
        display: none;
    }
    
    /* Full width main content */
    .account .container {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        max-width: 100%;
    }
    
    /* Account section adjustments */
    .account {
        padding: 0;
        padding-bottom: 0;
        background: var(--color-gray-50);
        min-height: 100vh;
        min-height: 100dvh;
        overflow-x: hidden;
    }
    
    /* Override body padding when in account section */
    body:has(.account) {
        padding-bottom: 0 !important;
        overflow-x: hidden;
    }
    
    /* Main content full width */
    .account__main {
        padding: 0.875rem;
        padding-bottom: var(--account-mobile-bottom-space);
        gap: 0.875rem;
    }
    
    /* Mobile Header Sticky */
    .account__header,
    .account__page-header,
    .sec__header {
        position: sticky;
        top: env(safe-area-inset-top, 0px);
        z-index: 50;
        background: rgba(249, 250, 251, 0.92);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        margin: -0.875rem -0.875rem 0;
        padding: 0.875rem;
        border-bottom: 1px solid var(--color-gray-200);
        box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
    }
    
    .account__header h1,
    .account__page-header h1,
    .account__page-title h1,
    .sec__header h1 {
        font-size: 1.25rem;
    }
    
    .account__header p,
    .account__page-header p,
    .account__page-title p,
    .sec__header p {
        font-size: 0.8rem;
    }
    
    /* ============================================
       ACCOUNT MENU DRAWER (Bottom Sheet)
       ============================================ */
    .account-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99999;
        visibility: hidden;
        pointer-events: none;
    }
    
    .account-menu.active {
        visibility: visible;
        pointer-events: auto;
    }
    
    .account-menu__backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 1;
    }
    
    .account-menu.active .account-menu__backdrop {
        opacity: 1;
    }
    
    .account-menu__content {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 85vh;
        max-height: 85dvh;
        background: #fff;
        border-radius: 1.5rem 1.5rem 0 0;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
        z-index: 2;
    }
    
    .account-menu.active .account-menu__content {
        transform: translateY(0);
    }
    
    .account-menu__handle {
        width: 36px;
        height: 4px;
        background: var(--color-gray-300);
        border-radius: 2px;
        margin: 12px auto;
        flex-shrink: 0;
    }
    
    .account-menu__header {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.5rem 1.25rem 1rem;
        border-bottom: 1px solid var(--color-gray-100);
        flex-shrink: 0;
    }
    
    .account-menu__avatar {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: var(--color-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        overflow: hidden;
    }
    
    .account-menu__avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .account-menu__avatar span {
        color: #fff;
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    .account-menu__user-info h3 {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--color-gray-900);
    }
    
    .account-menu__user-info p {
        font-size: 0.75rem;
        color: var(--color-gray-500);
    }
    
    .account-menu__close {
        margin-left: auto;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--color-gray-100);
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--color-gray-600);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .account-menu__close:active {
        background: var(--color-gray-200);
    }
    
    .account-menu__nav {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 0.75rem;
    }
    
    .account-menu__section {
        margin-bottom: 0.5rem;
    }
    
    .account-menu__section-title {
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--color-gray-400);
        padding: 0.5rem 0.75rem;
    }
    
    .account-menu__link {
        display: flex;
        align-items: center;
        gap: 0.875rem;
        padding: 0.875rem;
        border-radius: 0.75rem;
        color: var(--color-gray-700);
        text-decoration: none;
        font-size: 0.75rem;
        font-weight: 550;
        transition: all 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .account-menu__link:active {
        background: var(--color-gray-100);
    }
    
    .account-menu__link--active {
        background: var(--color-primary);
        color: #fff;
    }
    
    .account-menu__link--active:active {
        background: var(--color-primary-dark);
    }
    
    .account-menu__link i {
        width: 24px;
        text-align: center;
        font-size: 1.1rem;
    }
    
    .account-menu__link-badge {
        margin-left: auto;
        background: var(--color-error);
        color: #fff;
        font-size: 0.65rem;
        font-weight: 600;
        padding: 0.15rem 0.5rem;
        border-radius: 50px;
        min-width: 18px;
        text-align: center;
    }
    
    .account-menu__link--active .account-menu__link-badge {
        background: rgba(255, 255, 255, 0.25);
    }
    
    .account-menu__divider {
        height: 1px;
        background: var(--color-gray-100);
        margin: 0.5rem 0.75rem;
    }
    
    .account-menu__link--danger {
        color: var(--color-error);
    }
    
    .account-menu__link--danger:active {
        background: #fef2f2;
    }
    
    .account-menu__link--store {
        color: var(--color-primary);
    }
    
    .account-menu__link--store:active {
        background: rgba(1, 87, 254, 0.08);
    }
    
    /* ============================================
       MOBILE CARDS - Touch Friendly
       ============================================ */
    .account__card,
    .profile__card,
    .sec__card,
    .order,
    .addr,
    .bill,
    .warranty__item,
    .pc-config__card,
    .support__ticket,
    .support__stat-card {
        border-radius: var(--radius-xl);
        margin: 0;
    }
    
    /* Larger touch targets */
    body:has(.account) .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
    }
    
    body:has(.account) .btn-sm {
        min-height: 40px;
        padding: 0.625rem 1rem;
    }
    
    body:has(.account) .btn-xs {
        min-height: 36px;
        padding: 0.5rem 0.875rem;
    }
    
    /* Form inputs larger */
    body:has(.account) input[type="text"],
    body:has(.account) input[type="email"],
    body:has(.account) input[type="password"],
    body:has(.account) input[type="tel"],
    body:has(.account) input[type="number"],
    body:has(.account) select,
    body:has(.account) textarea {
        min-height: 48px;
        padding: 0.875rem 1rem;
        font-size: 16px; /* Prevent iOS zoom */
        border-radius: var(--radius-lg);
    }

    body:is([data-page="perfil"], [data-page="profile"]):has(.account) .account__main input[type="text"],
    body:is([data-page="perfil"], [data-page="profile"]):has(.account) .account__main input[type="email"],
    body:is([data-page="perfil"], [data-page="profile"]):has(.account) .account__main input[type="password"],
    body:is([data-page="perfil"], [data-page="profile"]):has(.account) .account__main input[type="tel"],
    body:is([data-page="perfil"], [data-page="profile"]):has(.account) .account__main input[type="number"],
    body:is([data-page="perfil"], [data-page="profile"]):has(.account) .account__main select,
    body:is([data-page="perfil"], [data-page="profile"]):has(.account) .account__main textarea,
    body:is([data-page="seguridad"], [data-page="security"]):has(.account) .account__main input[type="text"],
    body:is([data-page="seguridad"], [data-page="security"]):has(.account) .account__main input[type="email"],
    body:is([data-page="seguridad"], [data-page="security"]):has(.account) .account__main input[type="password"],
    body:is([data-page="seguridad"], [data-page="security"]):has(.account) .account__main input[type="tel"],
    body:is([data-page="seguridad"], [data-page="security"]):has(.account) .account__main input[type="number"],
    body:is([data-page="seguridad"], [data-page="security"]):has(.account) .account__main select,
    body:is([data-page="seguridad"], [data-page="security"]):has(.account) .account__main textarea {
        min-height: 38px;
        padding: 0.52rem 0.72rem;
        font-size: 0.84rem;
        border-radius: 8px;
    }

    body:is([data-page="seguridad"], [data-page="security"]):has(.account) .sec__input-wrap input {
        padding-right: 2.25rem;
    }

    body:is([data-page="seguridad"], [data-page="security"]):has(.account) .sec__eye {
        width: 2.25rem;
    }

    body:is([data-page="perfil"], [data-page="profile"]):has(.account) .form__group,
    body:is([data-page="seguridad"], [data-page="security"]):has(.account) .sec__field {
        margin-bottom: 0.6rem;
    }

    body:is([data-page="perfil"], [data-page="profile"]):has(.account) .profile__card,
    body:is([data-page="seguridad"], [data-page="security"]):has(.account) .sec__form,
    body:is([data-page="seguridad"], [data-page="security"]):has(.account) .sec__danger-content {
        padding: 0.9rem;
    }
    
    /* ============================================
       MOBILE ORDERS LIST
       ============================================ */
    .orders__filters {
        margin-bottom: 0.75rem;
    }
    
    .orders__filters::-webkit-scrollbar {
        display: none;
    }
    
    .orders__filters-row {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }
    
    .orders__grid {
        gap: 0.75rem;
    }
    
    .order {
        padding: 0;
    }
    
    .order__id {
        font-size: 0.85rem;
    }
    
    /* ============================================
       MOBILE PROFILE
       ============================================ */
    .profile__card--avatar {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }
    
    .profile__avatar {
        width: 80px;
        height: 80px;
    }
    
    .profile__user {
        text-align: center;
    }
    
    .profile__meta {
        width: 100%;
        justify-content: center;
        gap: 2rem;
    }
    
    .profile__grid {
        grid-template-columns: 1fr;
    }
    
    body:has(.account) .form__row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* ============================================
       MOBILE ADDRESSES
       ============================================ */
    .addr__grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .addr,
    .bill {
        padding: 0;
    }
    
    /* ============================================
       MOBILE WISHLIST
       ============================================ */
    .wishlist__tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .wishlist__tabs::-webkit-scrollbar {
        display: none;
    }
    
    /* ============================================
       MOBILE SECURITY
       ============================================ */
    .sec__grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sec__card {
        padding: 0;
    }
    
    /* ============================================
       MOBILE DASHBOARD STATS
       ============================================ */
    .dashboard__stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .dashboard__stat-card {
        padding: 1rem;
    }
    
    .dashboard__stat-value {
        font-size: 1.25rem;
    }
    
    /* ============================================
       MOBILE MODALS
       ============================================ */
    body:has(.account) .modal,
    body:has(.account) .sec__modal {
        padding: 0;
        align-items: flex-end;
        justify-content: center;
        z-index: 10020;
    }
    
    body:has(.account) .modal__box,
    body:has(.account) .modal__container,
    body:has(.account) .sec__modal-box {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: auto;
        max-height: calc(100vh - var(--safe-area-top) - 0.5rem);
        max-height: calc(100dvh - var(--safe-area-top) - 0.5rem);
        border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
        margin: 0;
        max-width: 100%;
        width: 100%;
        min-height: 0;
        animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden;
    }

    body:has(.account) .modal__container > form {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    body:has(.account) .modal__header {
        flex-shrink: 0;
    }
    
    body:has(.account) .modal__body {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    body:has(.account) .modal__footer {
        flex-direction: column-reverse;
        gap: 0.5rem;
        padding: 1rem 1.25rem;
        padding-bottom: calc(1rem + var(--safe-area-bottom));
        flex-shrink: 0;
        background: #fff;
        position: relative;
        z-index: 1;
    }
    
    body:has(.account) .modal__footer .btn {
        width: 100%;
        flex-shrink: 0;
    }

    body.support-modal-open .account-fab,
    body:has(.account .modal.modal--open) .account-fab {
        opacity: 0;
        pointer-events: none;
        transform: scale(0.92);
    }

    body[data-page="support"] #ticketModal .modal__container {
        height: min(92vh, calc(100vh - var(--safe-area-top) - 0.5rem));
        height: min(92dvh, calc(100dvh - var(--safe-area-top) - 0.5rem));
        max-height: calc(100vh - var(--safe-area-top) - 0.5rem);
        max-height: calc(100dvh - var(--safe-area-top) - 0.5rem);
    }

    body[data-page="support"] #ticketModal .modal__container > form {
        max-height: 100%;
    }

    body[data-page="support"] #ticketModal .modal__body {
        padding: 1rem;
    }

    body[data-page="support"] .support__workspace {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    body[data-page="support"] .support__detail-backdrop {
        position: fixed;
        inset: 0;
        z-index: var(--sheet-z-index, 10020);
        display: block;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        background: var(--sheet-backdrop, rgba(15, 23, 42, 0.52));
        opacity: 0;
        pointer-events: none;
        backdrop-filter: blur(var(--sheet-backdrop-blur, 6px));
        -webkit-backdrop-filter: blur(var(--sheet-backdrop-blur, 6px));
        transition: opacity 0.2s ease;
    }

    body[data-page="support"].support-detail-open .support__detail-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    body[data-page="support"] .support__detail-panel {
        position: fixed;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: calc(var(--sheet-z-index, 10020) + 1);
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        max-height: min(88dvh, calc(100dvh - 12px));
        min-height: 0;
        margin: 0;
        border: 0;
        border-radius: var(--sheet-radius, 20px) var(--sheet-radius, 20px) 0 0;
        background: var(--sheet-bg, #fff);
        box-shadow: var(--sheet-shadow, 0 -18px 48px rgba(15, 23, 42, 0.22));
        overflow: hidden;
        transform: translate3d(0, calc(100% + 24px), 0);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }

    body[data-page="support"].support-detail-open .support__detail-panel {
        transform: translate3d(0, 0, 0);
    }

    body[data-page="support"] .support__detail-panel::before {
        content: '';
        width: 36px;
        height: 4px;
        margin: 10px auto 6px;
        border-radius: 999px;
        background: var(--sheet-handle, #d1d5db);
        flex: 0 0 auto;
    }

    body[data-page="support"] .support__detail-close {
        position: absolute;
        top: 10px;
        right: var(--sheet-padding-x, 1rem);
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        width: var(--sheet-close-size, 36px);
        height: var(--sheet-close-size, 36px);
        min-width: var(--sheet-close-size, 36px);
        min-height: var(--sheet-close-size, 36px);
        padding: 0;
        border: 1px solid var(--sheet-border, #e5e7eb);
        border-radius: 12px;
        background: #f8fafc;
        color: #475569;
    }

    body[data-page="support"] .support__detail-empty,
    body[data-page="support"] .support__detail-loading,
    body[data-page="support"] .support__detail-shell {
        min-height: 0;
        max-height: min(88dvh, calc(100dvh - 12px));
    }

    body[data-page="support"] .support__detail-shell {
        height: auto;
        max-height: calc(88dvh - 20px);
    }

    body[data-page="support"] .support__detail-head {
        align-items: stretch;
        flex-direction: column;
        flex: 0 0 auto;
        min-height: 52px;
        padding: var(--sheet-header-y, 0.8rem) calc(var(--sheet-padding-x, 1rem) + 46px) var(--sheet-header-y, 0.8rem) var(--sheet-padding-x, 1rem);
    }

    body[data-page="support"] .support__detail-body {
        flex: 0 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body[data-page="support"] .support__ticket-detail,
    body[data-page="support"] .support__messages {
        min-height: 0;
    }

    body[data-page="support"] .support__messages {
        max-height: 340px;
        overflow-y: auto;
    }

    body[data-page="support"] .support__reply-form {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    body[data-page="support"] .support__reply-compose {
        align-items: stretch;
        flex-direction: column;
        gap: 0.5rem;
    }

    body[data-page="support"] .support__reply-actions {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 0.45rem;
    }

    body[data-page="support"] .support__reply-form textarea {
        height: auto;
        min-height: 84px;
        max-height: 120px;
        overflow-y: auto;
    }

    body[data-page="support"] .support__reply-form .btn {
        width: 100%;
        justify-content: center;
    }

    body[data-page="support"] .support__reply-attach {
        width: 42px;
    }

    body[data-page="support"] .support__message-attachment--file {
        max-width: 150px;
    }
    
    /* ============================================
       PULL TO REFRESH INDICATOR (optional)
       ============================================ */
    .pull-indicator {
        position: fixed;
        top: -50px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 40px;
        border-radius: var(--radius-full);
        background: #fff;
        box-shadow: var(--shadow-md);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 100;
        transition: top 0.2s ease;
    }
    
    .pull-indicator.visible {
        top: 20px;
    }
    
    .pull-indicator i {
        color: var(--color-primary);
        font-size: 1rem;
    }
    
    /* ============================================
       SWIPE ACTIONS FOR CARDS
       ============================================ */
    .swipeable {
        position: relative;
        overflow: hidden;
    }
    
    .swipeable__actions {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        display: flex;
        align-items: stretch;
        transform: translateX(100%);
        transition: transform 0.2s ease;
    }
    
    .swipeable.swiped .swipeable__actions {
        transform: translateX(0);
    }
    
    .swipeable__action {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 70px;
        color: #fff;
        font-size: 1.25rem;
    }
    
    .swipeable__action--edit {
        background: var(--color-primary);
    }
    
    .swipeable__action--delete {
        background: var(--color-error);
    }
    
    /* ============================================
       TOAST NOTIFICATIONS - MOBILE
       ============================================ */
    body:has(.account) .toast,
    body:has(.account) .sec__toast {
        position: fixed;
        bottom: calc(var(--mobile-nav-height) + var(--safe-area-bottom) + 1rem);
        left: 1rem;
        right: 1rem;
        max-width: 100%;
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-lg);
    }
    
    /* ============================================
       HAPTIC FEEDBACK SIMULATION
       ============================================ */
    body:has(.account) .haptic {
        transition: transform 0.1s ease;
    }
    
    body:has(.account) .haptic:active {
        transform: scale(0.97);
    }
    
    /* ============================================
       SKELETON LOADING - Mobile Optimized
       ============================================ */
    body:has(.account) .skeleton {
        background: linear-gradient(
            90deg,
            var(--color-gray-100) 25%,
            var(--color-gray-200) 50%,
            var(--color-gray-100) 75%
        );
        background-size: 200% 100%;
        animation: shimmer 1.5s infinite;
        border-radius: var(--radius-lg);
    }
    
    @keyframes shimmer {
        0% {
            background-position: 200% 0;
        }
        100% {
            background-position: -200% 0;
        }
    }
    
    body:has(.account) .skeleton-card {
        height: 120px;
        border-radius: var(--radius-xl);
    }
    
    /* ============================================
       EMPTY STATES - MOBILE
       ============================================ */
    .account__empty,
    .orders__state--empty,
    .addr__state--empty {
        padding: 2rem 1rem;
    }
    
    .account__empty i,
    .orders__state--empty i,
    .addr__state--empty i {
        font-size: 3rem;
        margin-bottom: 0.75rem;
    }
    
    /* ============================================
       FLOATING ACTION BUTTON (Mobile specific adjustments)
       ============================================ */
    .account-fab {
        bottom: calc(var(--mobile-nav-height) + var(--safe-area-bottom) + 1rem);
    }
    
    /* Hide desktop new buttons, show FAB instead */
    .account__page-header .btn:not(.account__page-action--mobile-visible),
    #btnNewAddress,
    #btnNewBilling,
    #btnNewTicket,
    #btnNewWishlist {
        display: none !important;
    }
    
    /* ============================================
       SCROLL BEHAVIOR
       ============================================ */
    .account__main {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Hide scrollbars but keep functionality */
    .account__main::-webkit-scrollbar {
        display: none;
    }
    
    .account__main {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    /* ============================================
       iOS SPECIFIC FIXES
       ============================================ */
    @supports (-webkit-touch-callout: none) {
        /* iOS specific styles */
        .account {
            min-height: -webkit-fill-available;
        }
        
        body:has(.account) input,
        body:has(.account) select,
        body:has(.account) textarea {
            font-size: 16px; /* Prevents zoom on focus */
        }
    }
    
    /* ============================================
       LANDSCAPE MODE ADJUSTMENTS
       ============================================ */
    @media (max-height: 500px) and (orientation: landscape) {
        .account {
            padding-bottom: 0;
        }

        .account__main {
            padding-bottom: calc(52px + var(--safe-area-bottom) + 1rem);
        }
        
        .account-menu__content {
            max-height: 100vh;
            max-height: 100dvh;
            border-radius: 0;
        }
    }
    
} /* End @media (max-width: 768px) */

/* ============================================
   TABLET ADJUSTMENTS (768px - 1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .account-menu {
        display: none;
    }
    
    .account .container {
        grid-template-columns: 240px 1fr;
    }
    
    .account__nav-item span {
        display: inline;
    }
}

/* ============================================
   MOBILE DASHBOARD ENHANCEMENTS
   ============================================ */
@media (max-width: 768px) {
    /* Welcome banner more compact */
    .dashboard__welcome {
        padding: 1.25rem;
        margin: -0.875rem -0.875rem 0;
        border-radius: 0;
        gap: 1rem;
    }
    
    .dashboard__welcome-avatar {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }
    
    .dashboard__welcome-text h1 {
        font-size: 1.1rem;
    }
    
    .dashboard__welcome-text p {
        font-size: 0.8rem;
        display: none;
    }
    
    .dashboard__welcome-meta {
        gap: 0.75rem;
        align-items: center;
        flex-direction: column;
    }
    
    .dashboard__welcome-meta span {
        font-size: 0.7rem;
        justify-content: center;
        max-width: 100%;
        text-align: center;
    }
    
    .dashboard__welcome-actions {
        display: none;
    }
    
    /* Stats cards compact grid */
    .dashboard__stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
        overflow: visible;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    .dashboard__stat-card {
        align-items: flex-start;
        flex-direction: column;
        min-width: 0;
        padding: 0.875rem;
        gap: 0.75rem;
    }

    .dashboard__stat-content {
        min-width: 0;
        width: 100%;
    }
    
    .dashboard__stat-value {
        font-size: 1.25rem;
        max-width: 100%;
        overflow-wrap: anywhere;
    }
    
    .dashboard__stat-label {
        font-size: 0.75rem;
    }

    .dashboard__stat-footer {
        display: none;
    }

    .dashboard__charts,
    .dashboard__chart-card,
    .dashboard__analytics-toolbar {
        min-width: 0;
        max-width: 100%;
    }

    .dashboard__analytics-toolbar {
        align-items: stretch;
        flex-direction: column;
        padding: 0.875rem;
        gap: 0.65rem;
    }

    .dashboard__period-control {
        align-items: stretch;
        flex-direction: column;
        gap: 0.35rem;
    }

    .dashboard__period-select,
    .dashboard__report-btn {
        width: 100%;
        justify-content: center;
    }

    .dashboard__chart-card {
        border-radius: 8px;
    }
    
    .dashboard__chart-header {
        padding: 0.875rem;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .dashboard__chart-title h3 {
        min-width: 0;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }
    
    .dashboard__chart-body {
        padding: 0.875rem;
        min-height: 220px;
        overflow: hidden;
    }

    .dashboard__chart-body canvas {
        max-width: 100% !important;
    }

    .dashboard__chart-body--centered {
        min-height: 190px;
    }

    .dashboard__status-legend {
        grid-template-columns: 1fr;
        padding: 0 0.875rem 0.875rem;
    }

    .dashboard__status-item,
    .dashboard__legend-item {
        min-width: 0;
    }

    .dashboard__status-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
}

@media (max-width: 380px) {
    .dashboard__stats {
        grid-template-columns: 1fr;
    }

}

/* ============================================
   DESKTOP: HIDE MOBILE ELEMENTS
   ============================================ */
@media (min-width: 769px) {
    .account-menu,
    .account-fab {
        display: none !important;
    }
}
