/* Clean/InDrive-Style Profile Header */
.profile-header-new {
    background: #fff;
    padding: 30px 20px 20px;
    text-align: left;
    /* Left aligned like modern apps */
    color: #333;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    margin-bottom: 20px;
}

.profile-header-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.profile-image-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0;
    flex-shrink: 0;
}

.profile-avatar-large {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: none;
    overflow: hidden;
    cursor: pointer;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.avatar-initials-large {
    font-size: 32px;
    font-weight: 700;
    color: #666;
}

.profile-info-block {
    flex: 1;
}

.profile-name-large {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 5px;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.profile-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff2cc;
    /* Gold/Yellow ish */
    color: #bfa100;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.edit-pic-btn {
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: var(--brand-primary);
    border: 2px solid white;
}

.profile-address-text {
    font-size: 13px;
    color: #8e8e93;
    margin: 5px 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.profile-address-text i {
    color: var(--brand-primary);
}

/* Stats Row - Full Width rounded card look */
.profile-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 15px 20px;
    border: none;
    /* Removed top border */
    margin-top: 10px;
}

.stat-box-new {
    text-align: center;
    flex: 1;
}

.stat-number {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 11px;
    color: #8e8e93;
    font-weight: 600;
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(0, 0, 0, 0.1);
}

/* Profile Menu */
.profile-menu-new {
    margin: 20px 15px;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.dark-mode .profile-menu-new {
    background: var(--card-dark);
}

.secondary-menu {
    margin-top: 15px;
}

.profile-menu-item-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.profile-menu-item-new:last-child {
    border-bottom: none;
}

.profile-menu-item-new:active {
    background: rgba(0, 0, 0, 0.03);
}

body.dark-mode .profile-menu-item-new:active {
    background: rgba(255, 255, 255, 0.05);
}

.menu-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-icon-new {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.menu-item-left span {
    font-size: 15px;
    font-weight: 500;
}

.menu-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-value {
    font-size: 14px;
    color: var(--emerald);
    font-weight: 600;
}

.menu-item-right i {
    font-size: 14px;
    opacity: 0.4;
}

/* Logout Container */
.logout-container {
    margin: 25px 15px 80px;
}

.logout-btn-new {
    width: 100%;
    padding: 16px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.logout-btn-new:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
}

/* Guest View */
.guest-profile-view {
    text-align: center;
    padding: 60px 20px;
}

.guest-avatar {
    font-size: 80px;
    color: var(--grey-light);
    margin-bottom: 20px;
}

.guest-profile-view h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.guest-profile-view p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.auth-btn-large {
    padding: 12px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--brand-primary);
    color: var(--brand-primary);
    background: white;
    transition: all 0.3s;
}

.auth-btn-large.primary {
    background: var(--brand-primary);
    color: white;
}

/* Legacy styles for modals */
.menu-icon.edit {
    background: var(--brand-primary);
}

.menu-icon.wallet {
    background: var(--emerald);
}

.transaction-item {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info {
    flex: 1;
}

.transaction-type {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 4px;
}

.transaction-amount {
    font-weight: 700;
    font-size: 16px;
}

.transaction-amount.credit {
    color: var(--emerald);
}

.transaction-amount.debit {
    color: var(--danger);
}

.login-history-item {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.login-history-item:last-child {
    border-bottom: none;
}

.login-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--grey-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    flex-shrink: 0;
}

body.dark-mode .login-icon {
    background: var(--bg-dark);
    color: var(--brand-accent);
}

.login-details {
    flex: 1;
}

.login-time {
    font-weight: 600;
    margin-bottom: 4px;
}

.login-meta {
    font-size: 12px;
    opacity: 0.7;
}

.profile-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    backdrop-filter: blur(10px);
}

.profile-modal-overlay.active {
    display: flex;
}

/* Map Select Button */
.map-select-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.map-select-btn:hover {
    transform: scale(1.1);
    background: var(--brand-secondary);
}

/* Settings List */
.settings-list-new {
    padding: 10px 0;
}

.setting-item-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.setting-item-new:last-child {
    border-bottom: none;
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
}

.setting-info i {
    width: 24px;
    color: var(--brand-primary);
}

/* Map Modal */
.map-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    padding: 20px;
}

.map-modal-overlay.active {
    display: flex;
}

.map-modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 20px;
}

body.dark-mode .map-modal-content {
    background: var(--card-dark);
}

.map-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.map-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-controls {
    margin-bottom: 15px;
}

.current-location-btn {
    width: 100%;
    padding: 12px;
    background: var(--brand-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.current-location-btn:hover {
    background: var(--brand-secondary);
}

.current-location-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#locationMap {
    border: 2px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.selected-address {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
}

body.dark-mode .selected-address {
    background: rgba(255, 255, 255, 0.05);
}

.address-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--brand-primary);
}

.address-text {
    font-size: 14px;
    line-height: 1.6;
}

.save-location-btn {
    width: 100%;
    padding: 14px;
    background: var(--emerald);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.save-location-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}