.profile-header {
    background: linear-gradient(135deg, #095fa3 0%, #3970b2 100%);
    color: #fff;
    border-radius: 0.75rem;
}

.profile-header .page-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.profile-header .page-description {
    opacity: 0.9;
    margin-bottom: 0;
}

.profile-page .profile-card,
.profile-page .security-card,
.profile-page .card {
    border: none;
    border-radius: 1rem;
}

.profile-photo-picker {
    display: inline-grid;
    justify-items: center;
    gap: 0.7rem;
    cursor: pointer;
}

.profile-avatar {
    position: relative;
    margin: 0 auto;
    width: 110px;
    height: 110px;
    background: linear-gradient(135deg, #315f9b 0%, #3e84d6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    border-radius: 50%;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.profile-photo-picker:hover .profile-avatar {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, .18);
}

.profile-avatar.has-image {
    background: #fff;
    border: 3px solid #e7eef7;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-overlay {
    position: absolute;
    inset-inline-end: 8px;
    inset-block-end: 8px;
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 0.95rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .18);
}

.profile-photo-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 0.9rem;
    border: 1px solid #dbe7f3;
    border-radius: 999px;
    background: #f8fbff;
    color: #2563eb;
    font-size: 0.86rem;
    font-weight: 800;
}

.profile-info {
    margin-top: 1.5rem;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eff2f7;
}

.profile-info-row:last-child {
    border-bottom: none;
}

.security-card {
    margin-top: 1.5rem;
}

.security-card .card-title {
    font-weight: 700;
}

.password-change-form {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eff2f7;
}

.password-change-form .form-label {
    display: grid;
    gap: 0.4rem;
    margin: 0;
    color: #44515c;
    font-size: 0.88rem;
    font-weight: 700;
}

.btn-refresh {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-refresh:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.profile-theme-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.profile-theme-option {
    position: relative;
    display: grid;
    gap: 7px;
    padding: 13px;
    cursor: pointer;
    border: 2px solid var(--erp-border);
    border-radius: 15px;
    background: var(--erp-surface);
    transition: .2s ease;
}

.profile-theme-option:has(input:checked) {
    border-color: var(--erp-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--erp-primary) 13%, transparent);
}

.profile-theme-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.profile-theme-option strong { color: var(--erp-text); }
.profile-theme-option small { color: var(--erp-muted); line-height: 1.4; }

.profile-appearance-panel {
    padding: 18px;
    border: 1px solid var(--erp-border, #e5e7eb);
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--erp-primary, #2563eb) 8%, transparent), transparent 34%),
        color-mix(in srgb, var(--erp-surface, #fff) 96%, var(--erp-primary, #2563eb));
}

.profile-appearance-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.profile-appearance-head strong {
    display: block;
    color: var(--erp-title, #172033);
    font-weight: 900;
}

.profile-appearance-head small {
    display: block;
    margin-top: 3px;
    color: var(--erp-note, #64748b);
}

.profile-appearance-head > i {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 14px;
    color: var(--erp-primary, #2563eb);
    background: color-mix(in srgb, var(--erp-primary, #2563eb) 12%, transparent);
    font-size: 1.25rem;
}
.theme-swatch { display: flex; height: 38px; overflow: hidden; border-radius: 10px; }
.theme-swatch i { flex: 1; }
.theme-harplink .theme-swatch i:nth-child(1) { background: #2563eb; }
.theme-harplink .theme-swatch i:nth-child(2) { background: #0f766e; }
.theme-harplink .theme-swatch i:nth-child(3) { background: #7c3aed; }
.theme-ocean .theme-swatch i:nth-child(1) { background: #0369a1; }
.theme-ocean .theme-swatch i:nth-child(2) { background: #0891b2; }
.theme-ocean .theme-swatch i:nth-child(3) { background: #38bdf8; }
.theme-emerald .theme-swatch i:nth-child(1) { background: #047857; }
.theme-emerald .theme-swatch i:nth-child(2) { background: #0d9488; }
.theme-emerald .theme-swatch i:nth-child(3) { background: #84cc16; }
.theme-sunset .theme-swatch i:nth-child(1) { background: #7c3aed; }
.theme-sunset .theme-swatch i:nth-child(2) { background: #db2777; }
.theme-sunset .theme-swatch i:nth-child(3) { background: #f97316; }

@media (max-width: 767px) {
    .profile-page {
        padding-top: 1rem;
    }
    .profile-theme-grid { grid-template-columns: 1fr 1fr; }
}
