/* Desktop Dashboard Styles */
@media (min-width: 1024px) {
    body {
        padding-bottom: 40px;
        background-color: #f4f6f8;
    }

    main {
        max-width: 1200px;
        margin: 40px auto;
    }

    .page-container {
        display: grid;
        grid-template-columns: 350px 1fr;
        gap: 30px;
        align-items: flex-start;
        padding: 0 20px;
    }

    /* Left Column: Profile Card */
    .profile-header-new {
        background: #fff;
        padding: 40px;
        border-radius: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
        text-align: center;
        height: fit-content;
        position: sticky;
        top: 20px;
        margin-bottom: 0;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .profile-avatar-large {
        width: 120px;
        height: 120px;
        font-size: 40px;
    }

    .profile-name-large {
        font-size: 24px;
    }

    /* Stats Row in Profile Card */
    .profile-stats-row {
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid #f0f0f0;
    }

    /* Right Column: Menu Grid */
    .profile-menu-new {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }

    .profile-menu-item-new {
        background: #fff;
        padding: 24px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        /* Icon+Text Left, Arrow Right */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
        border: 1px solid transparent;
        transition: all 0.2s;
        height: 100%;
    }

    .profile-menu-item-new:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
        border-color: rgba(0, 0, 0, 0.05);
        z-index: 10;
    }

    .menu-item-left {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .menu-icon-new {
        width: 50px;
        height: 50px;
        /* Larger icons */
        font-size: 20px;
        margin-right: 0;
        /* gap handles spacing */
    }

    .profile-menu-item-new span {
        font-size: 16px;
        font-weight: 600;
    }

    /* Logout Button Area */
    .logout-container {
        grid-column: 2;
        /* Place in right column flow */
        margin-top: 10px;
    }

    .logout-btn-new {
        max-width: 200px;
        margin-left: auto;
        /* Align right */
    }

    /* Modal tweaks for desktop */
    .modal-content {
        max-width: 500px;
        /* Standardize modal width */
    }

    /* Dark Mode Desktop */
    body.dark-mode .profile-header-new,
    body.dark-mode .profile-menu-item-new {
        background: #1C1C1E;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    body.dark-mode .profile-stats-row {
        border-color: #38383A;
    }
}

/* iOS Customer Profile Styles */
.ios-profile-page {
    background: #F2F2F7;
    min-height: 100vh;
    padding-bottom: 100px;
}

/* Header Bar */
.ios-profile-header {
    background: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #E5E5EA;
    position: sticky;
    top: 0;
    z-index: 100;
}

.ios-header-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F2F2F7;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #1C1C1E;
    cursor: pointer;
    transition: background 0.2s;
}

.ios-header-btn:hover {
    background: #E5E5EA;
}

.ios-header-title {
    font-size: 17px;
    font-weight: 600;
    color: #1C1C1E;
}

/* Profile Card - iOS Style */
.ios-profile-card {
    background: #fff;
    margin: 0 16px 16px;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ios-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #AF52DE, #5856D6);
    padding: 3px;
    flex-shrink: 0;
}

.ios-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ios-avatar-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ios-avatar-initials {
    font-size: 24px;
    font-weight: 700;
    color: #5856D6;
}

.ios-profile-info {
    flex: 1;
    min-width: 0;
}

.ios-profile-name {
    font-size: 18px;
    font-weight: 600;
    color: #1C1C1E;
    margin: 0 0 4px;
}

.ios-profile-email {
    font-size: 14px;
    color: #8E8E93;
    margin: 0;
}

.ios-edit-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F2F2F7;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1C1C1E;
    cursor: pointer;
    transition: background 0.2s;
}

.ios-edit-btn:hover {
    background: #E5E5EA;
}

/* Section Title */
.ios-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #8E8E93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 24px 16px 8px;
}

/* Menu Card */
.ios-menu-card {
    background: #fff;
    margin: 0 16px 16px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ios-menu-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    text-decoration: none;
    color: #1C1C1E;
    border-bottom: 1px solid #F2F2F7;
    transition: background 0.2s;
    cursor: pointer;
}

.ios-menu-item:last-child {
    border-bottom: none;
}

.ios-menu-item:hover {
    background: #F8F8FA;
}

.ios-menu-item:active {
    background: #ECECF0;
}

.ios-menu-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    margin-right: 12px;
    flex-shrink: 0;
}

.ios-menu-icon.wallet {
    background: #34C759;
}

.ios-menu-icon.bookings {
    background: #007AFF;
}

.ios-menu-icon.referral {
    background: #FF9500;
}

.ios-menu-icon.fixer {
    background: #5856D6;
}

.ios-menu-icon.support {
    background: #FF2D55;
}

.ios-menu-icon.terms {
    background: #8E8E93;
}

.ios-menu-icon.privacy {
    background: #8E8E93;
}

.ios-menu-label {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

.ios-menu-value {
    font-size: 14px;
    color: #8E8E93;
    margin-right: 8px;
}

.ios-menu-chevron {
    color: #C7C7CC;
    font-size: 14px;
}

/* Logout Button */
.ios-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    margin: 24px 16px;
    padding: 14px;
    background: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #FF3B30;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: background 0.2s;
}

.ios-logout-btn:hover {
    background: #FFF5F5;
}

.ios-login-btn {
    background: #007AFF;
    color: #fff;
}

.ios-login-btn:hover {
    background: #0066DD;
}

/* More Options Popup */
.ios-more-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000;
    align-items: flex-end;
    justify-content: center;
}

.ios-more-popup-overlay.active {
    display: flex;
}

.ios-more-popup {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 20px);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.ios-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #F2F2F7;
}

.ios-popup-title {
    font-size: 17px;
    font-weight: 600;
    color: #1C1C1E;
}

.ios-popup-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #F2F2F7;
    border: none;
    font-size: 18px;
    color: #8E8E93;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ios-popup-content {
    padding: 8px 0;
}

/* Settings Modal Styles */
.setting-item-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.setting-item-new:last-child {
    border-bottom: none;
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: #333;
}

.setting-info i {
    width: 24px;
    color: #666;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #2ecc71;
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* Dark Mode Adjustments for Modal */
body.dark-mode .modal-content {
    background: #1C1C1E;
    color: #fff;
}

body.dark-mode .modal-title {
    color: #fff;
}

body.dark-mode .close-modal {
    color: #fff;
}

body.dark-mode .setting-info {
    color: #fff;
}

body.dark-mode .setting-info i {
    color: #aaa;
}

body.dark-mode .setting-item-new {
    border-bottom-color: #38383A;
}

/* Dark Mode */
body.dark-mode .ios-profile-page {
    background: #000;
}

body.dark-mode .ios-profile-header {
    background: #1C1C1E;
    border-color: #38383A;
}

body.dark-mode .ios-profile-card {
    background: #1C1C1E;
}

body.dark-mode .ios-menu-card {
    background: #1C1C1E;
}

body.dark-mode .ios-menu-item {
    border-color: #38383A;
}

body.dark-mode .ios-menu-item:hover {
    background: #2C2C2E;
}

body.dark-mode .ios-profile-name,
body.dark-mode .ios-header-title,
body.dark-mode .ios-menu-label {
    color: #fff;
}

body.dark-mode .ios-header-btn,
body.dark-mode .ios-edit-btn {
    background: #2C2C2E;
    color: #fff;
}

body.dark-mode .ios-logout-btn {
    background: #1C1C1E;
}

body.dark-mode .ios-more-popup {
    background: #1C1C1E;
}