/* Profile page học viên. */
.profile-page{padding:110px 0 70px;background:#fbfaf7;min-height:80vh}
.profile-wrap{display:grid;gap:18px}
.profile-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap}
.profile-head h1{margin:4px 0 0;color:#0d1f33;font-size:clamp(30px,4vw,48px)}
.profile-badge{border:1px solid #e6e1d6;background:#fff;border-radius:999px;padding:9px 14px;font-weight:800;color:#94601f}
.profile-badge.ok{background:#ecfdf5;border-color:#86efac;color:#166534}
.profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.profile-card,.profile-form{background:#fff;border:1px solid #e6e1d6;border-radius:12px;padding:18px;box-shadow:0 18px 50px rgba(13,31,51,.08)}
.profile-card h3{margin:0 0 10px;color:#0d1f33}.profile-card p{margin:7px 0;color:#334155;overflow-wrap:anywhere}
.profile-stack{display:grid;gap:16px}
.profile-tabs{display:flex;gap:8px;overflow:auto;padding:4px 0 2px}
.profile-tabs button{border:1px solid #e6e1d6;background:#fff;color:#0d1f33;border-radius:999px;padding:10px 14px;font-weight:800;white-space:nowrap;cursor:pointer}
.profile-tabs button.active{background:#0d1f33;color:#f7d58a;border-color:#0d1f33}
.student-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.student-kpis div{background:#0d1f33;color:#fff;border-radius:12px;padding:18px;border:1px solid rgba(201,154,78,.45)}
.student-kpis b{display:block;font-family:"Playfair Display",serif;font-size:34px;color:#f7d58a;line-height:1}
.student-kpis span{display:block;margin-top:7px;color:#dbe7f4;font-weight:700}
.profile-list{display:grid;gap:10px}
.profile-row{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#fff;border:1px solid #e6e1d6;border-radius:12px;padding:14px 16px}
.profile-row b{color:#0d1f33}.profile-row p{margin:5px 0 0;color:#64748b;font-size:13px}
.status-pill{border:1px solid #f3d58b;background:#fffbeb;color:#92400e;border-radius:999px;padding:8px 10px;font-weight:900;white-space:nowrap}
.status-pill.ok{border-color:#86efac;background:#ecfdf5;color:#166534}.status-pill.warn{border-color:#fca5a5;background:#fff1f2;color:#9f1239}
.artifact-grid,.course-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.artifact-card,.course-card{background:#fff;border:1px solid #e6e1d6;border-radius:12px;padding:16px;text-decoration:none;color:#0d1f33;box-shadow:0 12px 34px rgba(13,31,51,.06)}
.artifact-card span,.artifact-card small{display:block;color:#64748b;font-size:13px}.artifact-card b{display:block;margin:8px 0;color:#0d1f33}
.course-card{display:grid;gap:12px}.course-card.owned{border-color:#C99A4E;background:linear-gradient(180deg,#fff,#fffaf1)}
.course-card p{margin:7px 0 0;color:#475569}.course-card .btn{width:max-content}
.profile-empty{background:#fff;border:1px dashed #d8dee9;border-radius:12px;padding:22px;color:#334155;display:grid;gap:12px}
.danger-btn{margin-top:12px;width:100%;justify-content:center;border-color:#c2526b!important;color:#c2526b!important}
.logout-confirm{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.logout-confirm .btn{justify-content:center}
.history-panel{display:inline-grid;gap:6px}.history-box{background:rgba(28,111,184,.06)!important;color:var(--ink)!important}
.history-score{font-size:13.5px;line-height:1.55}.history-links{margin:8px 0 0;padding-left:18px}.history-links li{margin-bottom:4px}.history-links a{color:var(--accent)}
.affiliate-profile-card{border-color:#C99A4E;background:linear-gradient(180deg,#fff,#fffaf1)}
.aff-code{display:inline-block;background:#0d1f33;color:#f7d58a;border-radius:8px;padding:5px 9px;letter-spacing:.08em;font-weight:900}
.aff-link-row{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:12px}
.aff-link-row input{min-width:0;border:1px solid #d8dee9;border-radius:10px;padding:11px;font:inherit;background:#fff}
.aff-course-picker{display:grid;gap:6px;margin-top:10px;color:#0d1f33;font-size:13px;font-weight:800}
.aff-course-picker select{min-width:0;border:1px solid #d8dee9;border-radius:10px;padding:11px;font:inherit;background:#fff}
.aff-guide-box{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;margin-top:14px;border:1px solid rgba(201,154,78,.35);border-radius:12px;background:rgba(13,31,51,.04);padding:12px}
.aff-guide-box b{display:block;color:#0d1f33;font-size:14px}.aff-guide-box span{display:block;color:#64748b;font-size:12.5px;line-height:1.45;margin-top:3px}
.aff-guide-link{display:inline-flex;align-items:center;justify-content:center;border:1px solid #C99A4E;border-radius:10px;padding:9px 11px;color:#94601f;background:#fffaf1;font-weight:900;font-size:13px;text-decoration:none;white-space:nowrap}
.profile-check{display:flex;gap:9px;align-items:flex-start;margin:10px 0;color:#0d1f33;font-size:13px;font-weight:800;line-height:1.45}
.profile-check input{margin-top:3px}
.profile-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.profile-form label{display:grid;gap:6px;color:#0d1f33;font-weight:800;font-size:13px}
.profile-form input,.profile-form textarea,.profile-form select{border:1px solid #d8dee9;border-radius:10px;padding:12px;font:inherit;background:#fff}
.profile-form textarea{min-height:92px;resize:vertical}.profile-msg{grid-column:1/-1;background:#f8fafc;border:1px solid #e2e8f0;padding:10px;border-radius:10px}
.profile-form .btn{width:max-content}
@media(min-width:1024px){.profile-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:721px) and (max-width:1023px){.profile-grid .profile-card:nth-child(3){grid-column:1/-1}}
@media(max-width:720px){.profile-grid,.profile-form,.aff-link-row,.aff-guide-box,.student-kpis,.artifact-grid,.course-grid{grid-template-columns:1fr}.profile-page{padding-top:92px}.profile-row{align-items:flex-start;flex-direction:column}.status-pill{white-space:normal}.aff-guide-link{width:100%}}
