/* ─── Profile Page Styles ─── */

body { background: #f8fafc; }

/* Hero */
.profile-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%);
    color: white;
    padding: 110px 0 60px;
    position: relative;
    overflow: hidden;
}
.profile-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(99,102,241,0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 30%, rgba(236,72,153,0.2) 0%, transparent 50%);
    pointer-events: none;
}
.profile-hero .container { position: relative; z-index: 1; }
.profile-hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 12px;
}
.profile-welcome { font-size: 16px; opacity: 0.85; max-width: 720px; line-height: 1.6; }

.profile-completion {
    margin-top: 30px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    padding: 20px 24px;
    max-width: 600px;
}
.completion-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.completion-label { font-weight: 600; font-size: 14px; letter-spacing: 0.5px; text-transform: uppercase; }
.completion-percent { font-size: 28px; font-weight: 800; color: #34d399; }
.completion-bar {
    height: 10px;
    background: rgba(255,255,255,0.12);
    border-radius: 5px;
    overflow: hidden;
}
.completion-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 5px;
    width: 0%;
    transition: width 0.6s ease;
}
.completion-hint { margin-top: 10px; font-size: 13px; opacity: 0.75; }

/* Main */
.profile-main { padding: 50px 0 80px; }

/* Section card */
.profile-section {
    background: white;
    border-radius: 16px;
    padding: 28px 30px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s;
}
.profile-section:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.06); }

.section-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}
.section-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}
.section-head h2 {
    margin: 0;
    font-size: 20px;
    color: #1e293b;
    font-weight: 700;
}
.section-desc {
    margin: 6px 0 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

/* Form grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 20px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}
.field label small { color: #94a3b8; font-weight: 400; }
.req { color: #ef4444; font-weight: 700; }

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    color: #1e293b;
    transition: all 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.field input:disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}
.field textarea { resize: vertical; min-height: 80px; }

/* Languages list */
#languagesList { display: flex; flex-direction: column; gap: 10px; }
.lang-row {
    display: grid;
    grid-template-columns: 1fr 180px 40px;
    gap: 10px;
    align-items: center;
}
.lang-row input,
.lang-row select {
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}
.lang-row .remove-lang {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}
.lang-row .remove-lang:hover { background: #fecaca; }

.add-row-btn {
    margin-top: 14px;
    background: #f1f5f9;
    border: 1.5px dashed #cbd5e1;
    color: #475569;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s;
}
.add-row-btn:hover { background: #e2e8f0; border-color: #94a3b8; }

/* Checkbox cards */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.check-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.check-card:hover { border-color: #93c5fd; background: white; }
.check-card input[type="checkbox"] {
    width: 18px; height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #3b82f6;
    flex-shrink: 0;
}
.check-card input[type="checkbox"]:checked + span strong { color: #1d4ed8; }
.check-card:has(input:checked) { background: #eff6ff; border-color: #3b82f6; }
.check-card span { font-size: 14px; color: #475569; line-height: 1.4; }
.check-card span strong { color: #1e293b; font-weight: 600; }
.check-card span small { color: #94a3b8; font-size: 12px; }

/* Radio cards */
.radio-row { display: flex; gap: 12px; flex-wrap: wrap; }
.radio-card {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
    color: #475569;
}
.radio-card input[type="radio"] {
    width: 18px; height: 18px;
    accent-color: #3b82f6;
}
.radio-card:has(input:checked) { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; font-weight: 600; }

/* Consent items */
.consent-list { display: flex; flex-direction: column; gap: 14px; }
.consent-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.consent-item:hover { border-color: #93c5fd; background: white; }
.consent-item:has(input:checked) { background: #f0fdf4; border-color: #10b981; }
.consent-item input[type="checkbox"] {
    width: 20px; height: 20px;
    margin-top: 2px;
    accent-color: #10b981;
    cursor: pointer;
    flex-shrink: 0;
}
.consent-item strong { color: #1e293b; font-size: 15px; display: block; margin-bottom: 4px; }
.consent-item p { margin: 0; color: #64748b; font-size: 13px; line-height: 1.5; }

/* Save bar */
.form-actions {
    position: sticky;
    bottom: 20px;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 24px;
    margin-top: 30px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 100;
}
.btn-save {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.15s;
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}
.btn-save:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16,185,129,0.4); }
.btn-save:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.save-message {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    display: none;
}
.save-message.success { display: block; background: #d1fae5; color: #065f46; }
.save-message.error { display: block; background: #fee2e2; color: #991b1b; }
.save-message.loading { display: block; background: #dbeafe; color: #1e40af; }

/* Responsive */
@media (max-width: 768px) {
    .profile-hero { padding: 100px 0 40px; }
    .profile-hero h1 { font-size: 30px; }
    .form-grid { grid-template-columns: 1fr; }
    .checkbox-grid { grid-template-columns: 1fr; }
    .lang-row { grid-template-columns: 1fr 120px 40px; }
    .form-actions { flex-direction: column; align-items: stretch; }
    .btn-save { width: 100%; justify-content: center; }
    .profile-section { padding: 22px 18px; }
}
