/* ═══════════════════════════════════════════════════════════════════════════
   Account pages
   The customer profile and the office, driver and store account pages share
   one layout; each role only tints it (.admin-shell, .driver-shell,
   .vendor-shell). Everything sits under .profile-page.
   ═══════════════════════════════════════════════════════════════════════════ */

.profile-page {
    --profile-bg: linear-gradient(140deg, #f6fbf8 0%, #eef8f4 48%, #f9f5ec 100%);
    --profile-surface: #ffffff;
    --profile-border: rgba(20, 78, 66, 0.12);
    --profile-text: #153831;
    --profile-subtle: rgba(21, 56, 49, 0.62);
}

.profile-page .profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: var(--kh-radius-lg);
    border: 1px solid rgba(16, 96, 80, 0.18);
    background: linear-gradient(135deg, rgba(13, 95, 80, 0.08) 0%, rgba(43, 145, 124, 0.06) 100%);
}

.profile-page .admin-shell .profile-header {
    background: linear-gradient(135deg, rgba(18, 63, 94, 0.1) 0%, rgba(66, 144, 212, 0.08) 100%);
}

.profile-page .profile-avatar-wrap {
    width: 58px;
    height: 58px;
    border-radius: var(--kh-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f4fffb;
    background: linear-gradient(135deg, var(--kh-primary-dark) 0%, var(--kh-primary) 100%);
    box-shadow: var(--kh-shadow-md);
}

.profile-page .admin-shell .profile-avatar-wrap {
    background: linear-gradient(135deg, #123f5e 0%, #3478b5 100%);
    box-shadow: var(--kh-shadow-md);
}

.profile-page .profile-avatar-wrap .mud-icon-root {
    font-size: var(--kh-fs-3xl);
}

.profile-page .profile-header-content {
    min-width: 0;
}

.profile-page .profile-section {
    background: var(--profile-surface);
    border-radius: var(--kh-radius-lg);
    border: 1px solid var(--profile-border);
    padding: 16px;
    box-shadow: var(--kh-shadow-sm);
}

.profile-page .section-header {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.profile-page .profile-image-panel {
    height: 100%;
    border-radius: var(--kh-radius);
    border: 1px dashed rgba(24, 96, 81, 0.28);
    background: linear-gradient(140deg, #f7fcfa 0%, #eff9f5 100%);
    padding: 12px;
}

.profile-page .profile-image-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.profile-page .profile-image-panel-head .mud-icon-root {
    color: var(--kh-primary-dark);
    font-size: var(--kh-fs-lg);
}

.profile-page .admin-shell .profile-image-panel-head .mud-icon-root {
    color: #1f5f96;
}

.profile-page .profile-image-panel .mud-grid {
    margin-top: 0;
}

.profile-page .profile-image-panel .mud-paper {
    max-width: 100% !important;
    border-radius: var(--kh-radius);
    border-color: rgba(24, 96, 81, 0.2);
    background: #ffffff;
}

.profile-page .profile-image-panel img {
    width: 100%;
    max-height: 240px;
    object-fit: cover !important;
}

.profile-page .profile-wallet-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, var(--kh-primary-dark) 0%, var(--kh-primary) 42%, var(--kh-primary-light) 100%);
    border-radius: var(--kh-radius-lg);
    padding: 16px 20px;
    color: var(--kh-primary-wash);
    box-shadow: var(--kh-shadow-md);
    flex-wrap: wrap;
}

.profile-page .admin-spotlight {
    background: linear-gradient(135deg, #123f5e 0%, #1f5f96 42%, #4ca3ef 100%);
    box-shadow: var(--kh-shadow-md);
}

.profile-page .profile-wallet-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--kh-radius);
    background: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kh-primary-wash);
}

.profile-page .profile-wallet-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.profile-page .profile-wallet-label {
    font-size: var(--kh-fs-2xs);
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(200, 248, 235, 0.75);
}

.profile-page .profile-wallet-points {
    font-size: var(--kh-fs-2xl);
    font-weight: 800;
    line-height: 1.1;
    color: #f0fffc;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* The driver and store cards are warm, so their text is warm white. */
.profile-page .driver-spotlight .profile-wallet-label {
    color: rgba(255, 249, 233, 0.76);
}

.profile-page .vendor-spotlight .profile-wallet-label {
    color: rgba(255, 247, 232, 0.76);
}

.profile-page .driver-spotlight .profile-wallet-points,
.profile-page .vendor-spotlight .profile-wallet-points {
    color: #fffdf8;
}

.profile-page .account-role-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.profile-page .security-section {
    background: linear-gradient(135deg, #ffffff 0%, #f9f3ec 100%);
}

.profile-page .profile-wallet-unit {
    font-size: var(--kh-fs-sm);
    font-weight: 600;
    opacity: 0.65;
}

.profile-page .driver-shell .profile-header {
    background: linear-gradient(135deg, rgba(128, 83, 16, 0.08) 0%, color-mix(in srgb, var(--kh-warning) 10%, transparent) 100%);
}

.profile-page .driver-shell .profile-avatar-wrap {
    background: linear-gradient(135deg, var(--kh-ink-warning) 0%, var(--mud-palette-warning) 100%);
    box-shadow: var(--kh-shadow-md);
}

.profile-page .driver-shell .profile-image-panel-head .mud-icon-root {
    color: #c78417;
}

.profile-page .driver-spotlight {
    background: linear-gradient(135deg, var(--kh-ink-warning) 0%, var(--mud-palette-warning) 42%, #f0bf67 100%);
    box-shadow: var(--kh-shadow-md);
}

.profile-page .vendor-shell .profile-header {
    background: linear-gradient(135deg, rgba(114, 84, 18, 0.08) 0%, color-mix(in srgb, var(--kh-secondary) 10%, transparent) 100%);
}

.profile-page .vendor-shell .profile-avatar-wrap {
    background: linear-gradient(135deg, var(--kh-ink-warning) 0%, var(--kh-secondary) 100%);
    box-shadow: var(--kh-shadow-md);
}

.profile-page .vendor-shell .profile-image-panel-head .mud-icon-root {
    color: #a46e1a;
}

.profile-page .vendor-spotlight {
    background: linear-gradient(135deg, var(--kh-ink-warning) 0%, var(--kh-secondary) 42%, #e2b25c 100%);
    box-shadow: var(--kh-shadow-md);
}

@media (max-width: 600px) {
    .profile-page .profile-header {
        padding: 12px;
    }

    .profile-page .profile-section {
        padding: 14px;
    }

    .profile-page .profile-wallet-card {
        padding: 14px;
    }

    .profile-page .profile-image-panel {
        margin-top: 4px;
    }
}
