/*==========================================================
FILE : auth/css/profile.css
VERSION : V1
STATUS : Production Ready
==========================================================*/
:root{
--primary:#18B64A;
--primary-dark:#13963D;
--primary-light:#ECFDF3;
--secondary:#22C55E;
--white:#FFFFFF;
--bg:#F5F8FB;
--border:#E7EDF4;
--text:#1E293B;
--text-light:#64748B;
--shadow:0 20px 45px rgba(15,23,42,.08);
--radius:24px;
}
body{ margin:0; padding:0; font-family:'Poppins',sans-serif; background:var(--bg); color:var(--text); overflow-x:hidden; }
.main{ margin-left:290px; min-height:100vh; transition:.35s; }
.profile-v3{ padding:35px; padding-bottom:60px; max-width:1200px; }

/*==========================================
PROFILE HEADER CARD
==========================================*/
.profile-header-card{
background:var(--white);
border:1px solid var(--border);
border-radius:var(--radius);
box-shadow:var(--shadow);
padding:32px;
display:flex;
align-items:center;
gap:28px;
margin-bottom:24px;
flex-wrap:wrap;
position:relative;
overflow:hidden;
}
.profile-header-card::before{
content:"";
position:absolute;
top:-60px; right:-60px;
width:220px; height:220px;
border-radius:50%;
background:var(--primary-light);
opacity:.6;
}
.profile-photo-wrap{
position:relative;
z-index:1;
flex-shrink:0;
}
.profile-photo-wrap img{
width:110px; height:110px;
border-radius:50%;
object-fit:cover;
border:4px solid var(--primary-light);
}
.photo-edit-btn{
position:absolute;
bottom:2px; right:2px;
width:34px; height:34px;
border-radius:50%;
background:var(--primary);
color:#fff;
border:3px solid #fff;
cursor:pointer;
font-size:13px;
}
.profile-header-info{ flex:1; min-width:220px; z-index:1; }
.profile-header-info h2{ font-size:24px; font-weight:800; margin:0 0 2px; }
.profile-header-info .username-line{ font-size:13px; color:var(--text-light); margin-bottom:12px; }
.profile-header-info .username-line span{ color:var(--primary-dark); font-weight:700; }
.header-badges{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.status-pill{
font-size:11px; font-weight:700; padding:5px 12px; border-radius:20px;
text-transform:uppercase; letter-spacing:.3px;
}
.status-pill.active{ background:#ECFDF3; color:#13963D; }
.status-pill.pending{ background:#FFFBEB; color:#B45309; }
.status-pill.approved{ background:#EFF6FF; color:#2563EB; }
.status-pill.rejected{ background:#FEF2F2; color:#DC2626; }
.status-pill.vip{ background:#F5F3FF; color:#6D28D9; }
.profile-contact-grid{ display:flex; gap:22px; flex-wrap:wrap; font-size:13px; color:var(--text-light); }
.profile-contact-grid div{ display:flex; align-items:center; gap:7px; }
.profile-contact-grid i{ color:var(--primary); }
.edit-profile-btn{
background:var(--primary); color:#fff; border:none; padding:12px 22px;
border-radius:14px; font-weight:700; font-size:14px; cursor:pointer; z-index:1;
display:flex; align-items:center; gap:8px; align-self:flex-start;
}
.edit-profile-btn:hover{ background:var(--primary-dark); }

/*==========================================
COMPLETION + BADGES
==========================================*/
.completion-card{
background:var(--white); border:1px solid var(--border); border-radius:20px;
box-shadow:var(--shadow); padding:22px 26px; margin-bottom:24px;
}
.completion-top{ display:flex; justify-content:space-between; margin-bottom:10px; align-items:center; }
.completion-top h4{ font-size:15px; font-weight:800; margin:0; }
.completion-top span{ font-size:14px; font-weight:800; color:var(--primary-dark); }
.completion-checklist{ display:flex; gap:14px; flex-wrap:wrap; margin-top:14px; }
.completion-checklist div{ display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-light); }
.completion-checklist i{ font-size:13px; }
.completion-checklist .done i{ color:var(--primary); }
.completion-checklist .todo i{ color:#CBD5E1; }

.badges-row{
display:flex; gap:14px; overflow-x:auto; padding-bottom:6px; margin-bottom:28px;
}
.badge-chip{
flex:0 0 auto; background:var(--white); border:1px solid var(--border); border-radius:16px;
padding:14px 18px; text-align:center; min-width:110px; box-shadow:var(--shadow);
opacity:.4; filter:grayscale(1);
}
.badge-chip.earned{ opacity:1; filter:none; border-color:var(--primary-light); }
.badge-chip i{ font-size:22px; color:var(--primary); margin-bottom:6px; display:block; }
.badge-chip span{ font-size:11px; font-weight:700; color:var(--text); }

/*==========================================
TABS LAYOUT
==========================================*/
.profile-tabs-layout{ display:flex; gap:24px; align-items:flex-start; }
.profile-tab-nav{
background:var(--white); border:1px solid var(--border); border-radius:20px;
box-shadow:var(--shadow); padding:12px; width:250px; flex-shrink:0;
position:sticky; top:20px;
}
.profile-tab-nav button{
width:100%; display:flex; align-items:center; gap:12px; text-align:left;
padding:13px 16px; border:none; background:none; border-radius:14px;
font-size:14px; font-weight:600; color:var(--text-light); cursor:pointer; margin-bottom:2px;
transition:.2s;
}
.profile-tab-nav button i{ width:18px; text-align:center; }
.profile-tab-nav button:hover{ background:var(--bg); color:var(--text); }
.profile-tab-nav button.active{ background:var(--primary); color:#fff; }
.profile-tab-content{ flex:1; min-width:0; }
.tab-panel{ display:none; animation:tabFade .35s; }
.tab-panel.active{ display:block; }
@keyframes tabFade{ from{ opacity:0; transform:translateY(8px);} to{ opacity:1; transform:translateY(0);} }

.panel-card{
background:var(--white); border:1px solid var(--border); border-radius:20px;
box-shadow:var(--shadow); padding:26px 28px; margin-bottom:22px;
}
.panel-card h3{ font-size:17px; font-weight:800; margin:0 0 4px; }
.panel-card .panel-sub{ font-size:13px; color:var(--text-light); margin:0 0 20px; }

/*==========================================
OVERVIEW STAT GRIDS
==========================================*/
.stat-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:22px; }
.stat-box{
background:var(--white); border:1px solid var(--border); border-radius:18px;
padding:20px; box-shadow:var(--shadow);
}
.stat-box .stat-icon{
width:42px; height:42px; border-radius:12px; background:var(--primary-light); color:var(--primary-dark);
display:flex; align-items:center; justify-content:center; font-size:16px; margin-bottom:12px;
}
.stat-box span{ display:block; font-size:12px; color:var(--text-light); margin-bottom:4px; }
.stat-box strong{ font-size:19px; font-weight:800; }

/*==========================================
FORMS
==========================================*/
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.form-group{ margin-bottom:6px; }
.form-group.full{ grid-column:1 / -1; }
.form-group label{ display:block; font-size:13px; font-weight:700; margin-bottom:8px; }
.form-group .hint{ font-size:11px; color:var(--text-light); font-weight:500; margin-top:6px; }
.form-group input,.form-group select{
width:100%; padding:13px 15px; border:1.5px solid var(--border); border-radius:12px;
font-size:14px; font-family:'Poppins',sans-serif; box-sizing:border-box; background:#fff; color:var(--text);
}
.form-group input:disabled{ background:var(--bg); color:var(--text-light); }
.form-group input:focus,.form-group select:focus{ outline:none; border-color:var(--primary); }
.verify-inline{ display:flex; gap:10px; }
.verify-inline input{ flex:1; }
.verify-badge{
flex-shrink:0; padding:0 16px; border-radius:12px; font-size:12px; font-weight:700;
display:flex; align-items:center; gap:6px; white-space:nowrap; border:none; cursor:pointer;
}
.verify-badge.verified{ background:#ECFDF3; color:#13963D; }
.verify-badge.unverified{ background:var(--primary); color:#fff; }
.form-actions{ margin-top:22px; display:flex; gap:12px; }
.btn-save{
background:var(--primary); color:#fff; border:none; padding:13px 26px;
border-radius:14px; font-weight:700; font-size:14px; cursor:pointer;
}
.btn-save:hover{ background:var(--primary-dark); }
.btn-cancel{
background:var(--bg); color:var(--text-light); border:none; padding:13px 26px;
border-radius:14px; font-weight:700; font-size:14px; cursor:pointer;
}
.form-msg{
font-size:13px; padding:11px 15px; border-radius:12px; margin-bottom:16px; display:none;
}
.form-msg.show{ display:block; }
.form-msg.success{ background:#ECFDF3; color:#13963D; }
.form-msg.error{ background:#FEF2F2; color:#DC2626; }

/*==========================================
SECURITY
==========================================*/
.security-score-bar{ margin-bottom:24px; }
.security-score-top{ display:flex; justify-content:space-between; margin-bottom:8px; font-size:13px; font-weight:700; }
.toggle-row{
display:flex; align-items:center; justify-content:space-between;
padding:16px 0; border-bottom:1px solid var(--border);
}
.toggle-row:last-child{ border-bottom:none; }
.toggle-row div span{ display:block; font-size:14px; font-weight:700; }
.toggle-row div p{ margin:2px 0 0; font-size:12px; color:var(--text-light); }
.switch{ position:relative; width:48px; height:26px; flex-shrink:0; }
.switch input{ opacity:0; width:0; height:0; }
.slider{
position:absolute; cursor:pointer; inset:0; background:#CBD5E1; border-radius:30px; transition:.3s;
}
.slider::before{
content:""; position:absolute; height:20px; width:20px; left:3px; top:3px;
background:#fff; border-radius:50%; transition:.3s;
}
.switch input:checked + .slider{ background:var(--primary); }
.switch input:checked + .slider::before{ transform:translateX(22px); }

.login-history-table{ width:100%; border-collapse:collapse; margin-top:6px; }
.login-history-table th{
text-align:left; font-size:11px; text-transform:uppercase; color:var(--text-light);
padding:10px 8px; border-bottom:1px solid var(--border);
}
.login-history-table td{ font-size:13px; padding:12px 8px; border-bottom:1px solid var(--border); }
.device-tag{ background:var(--bg); padding:4px 10px; border-radius:8px; font-size:11px; font-weight:600; }

/*==========================================
KYC
==========================================*/
.kyc-doc-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.kyc-doc-card{
border:1.5px dashed var(--border); border-radius:16px; padding:22px; text-align:center;
cursor:pointer; transition:.2s;
}
.kyc-doc-card:hover{ border-color:var(--primary); background:var(--primary-light); }
.kyc-doc-card i{ font-size:26px; color:var(--primary); margin-bottom:10px; display:block; }
.kyc-doc-card h4{ font-size:13px; margin:0 0 6px; }
.kyc-doc-card .doc-status{
font-size:10px; font-weight:700; padding:4px 10px; border-radius:20px; display:inline-block;
}
.kyc-doc-card .doc-status.not-submitted{ background:var(--bg); color:var(--text-light); }
.kyc-doc-card .doc-status.uploaded{ background:#FFFBEB; color:#B45309; }
.kyc-doc-card input[type="file"]{ display:none; }

/*==========================================
REFERRAL
==========================================*/
.referral-code-box{
background:var(--primary-light); border-radius:16px; padding:20px 24px;
display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; flex-wrap:wrap; gap:14px;
}
.referral-code-box div span{ display:block; font-size:12px; color:var(--primary-dark); font-weight:700; margin-bottom:4px; }
.referral-code-box div strong{ font-size:20px; letter-spacing:1px; }
.referral-actions{ display:flex; gap:10px; }
.referral-actions button{
border:none; padding:10px 18px; border-radius:12px; font-size:13px; font-weight:700; cursor:pointer;
}
.copy-btn{ background:var(--primary); color:#fff; }
.share-btn{ background:#fff; color:var(--primary-dark); border:1px solid var(--primary) !important; }
.referral-levels{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:20px; }
.level-box{ background:var(--bg); border-radius:14px; padding:18px; text-align:center; }
.level-box span{ display:block; font-size:12px; color:var(--text-light); margin-bottom:6px; }
.level-box strong{ font-size:22px; font-weight:800; }

/*==========================================
PREFERENCES / PRIVACY
==========================================*/
.pref-row{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; border-bottom:1px solid var(--border); }
.pref-row:last-child{ border-bottom:none; }
.pref-row span{ font-size:14px; font-weight:700; }

/*==========================================
DANGER ZONE
==========================================*/
.danger-card{ border:1.5px solid #FEE2E2; }
.danger-row{
display:flex; align-items:center; justify-content:space-between; padding:16px 0; border-bottom:1px solid var(--border); gap:14px; flex-wrap:wrap;
}
.danger-row:last-child{ border-bottom:none; }
.danger-row div span{ display:block; font-size:14px; font-weight:700; }
.danger-row div p{ margin:2px 0 0; font-size:12px; color:var(--text-light); }
.btn-outline{ background:#fff; border:1.5px solid var(--border); color:var(--text); padding:11px 20px; border-radius:12px; font-weight:700; font-size:13px; cursor:pointer; }
.btn-outline:hover{ border-color:var(--primary); color:var(--primary); }
.btn-danger{ background:#FEF2F2; border:1.5px solid #FECACA; color:#DC2626; padding:11px 20px; border-radius:12px; font-weight:700; font-size:13px; cursor:pointer; }
.btn-danger:hover{ background:#DC2626; color:#fff; }

/*==========================================
MODAL / TOAST (shared pattern)
==========================================*/
.profile-modal-overlay{
position:fixed; inset:0; background:rgba(15,23,42,.55); display:none; align-items:center;
justify-content:center; z-index:1000; padding:20px; backdrop-filter:blur(4px);
}
.profile-modal-overlay.show{ display:flex; }
.profile-modal{
background:#fff; border-radius:24px; max-width:420px; width:100%; padding:30px;
box-shadow:0 40px 80px rgba(15,23,42,.25); max-height:90vh; overflow-y:auto; position:relative;
animation:modalPop .3s;
}
@keyframes modalPop{ from{ opacity:0; transform:scale(.94);} to{ opacity:1; transform:scale(1);} }
.profile-modal-close{
position:absolute; top:16px; right:16px; width:32px; height:32px; border-radius:50%;
border:none; background:var(--bg); cursor:pointer; font-size:13px; color:var(--text-light);
}
.profile-modal h3{ font-size:18px; font-weight:800; margin:0 0 16px; }
.toast{
position:fixed; bottom:30px; left:50%; transform:translateX(-50%) translateY(20px);
background:#1E293B; color:#fff; padding:14px 26px; border-radius:14px; font-size:14px; font-weight:600;
box-shadow:0 20px 40px rgba(0,0,0,.25); z-index:1200; opacity:0; transition:.35s; pointer-events:none;
}
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }

/*==========================================
SKELETON
==========================================*/
.skeleton-block{
height:16px; border-radius:8px; background:linear-gradient(90deg,#EEF2F6 25%,#F8FAFC 37%,#EEF2F6 63%);
background-size:400% 100%; animation:skeletonShine 1.4s ease infinite;
}
@keyframes skeletonShine{ 0%{ background-position:100% 50%;} 100%{ background-position:0 50%;} }

/*==========================================
BOTTOM NAV / SUPPORT / BACK TO TOP / FOOTER
==========================================*/
.bottom-nav{
display:none; position:fixed; bottom:0; left:0; right:0; background:#fff; border-top:1px solid var(--border);
padding:10px 0 22px; justify-content:space-around; z-index:90; box-shadow:0 -10px 30px rgba(15,23,42,.06);
}
.bottom-nav a{ display:flex; flex-direction:column; align-items:center; gap:4px; color:#94A3B8; text-decoration:none; font-size:11px; font-weight:600; }
.bottom-nav a i{ font-size:22px; }
.bottom-nav a.active{ color:var(--primary); }
.floating-support{
position:fixed; bottom:30px; right:30px; width:58px; height:58px; border-radius:50%; background:var(--primary);
color:#fff; display:flex; align-items:center; justify-content:center; font-size:22px;
box-shadow:0 20px 40px rgba(24,182,74,.35); z-index:95; text-decoration:none;
}
.back-top{
position:fixed; bottom:100px; right:30px; width:46px; height:46px; border-radius:50%; border:1px solid var(--border);
background:#fff; color:var(--primary); cursor:pointer; opacity:0; visibility:hidden; transition:.3s; z-index:95;
}
.back-top.show{ opacity:1; visibility:visible; }
.footer{ display:flex; align-items:center; justify-content:space-between; padding:26px 6px; border-top:1px solid var(--border); margin-top:20px; flex-wrap:wrap; gap:14px; }
.footer-left p{ font-size:13px; color:var(--text-light); margin:0; }
.footer-right{ display:flex; gap:18px; flex-wrap:wrap; }
.footer-right a{ font-size:13px; color:var(--text-light); text-decoration:none; }
.footer-right a:hover{ color:var(--primary); }

/*==========================================
RESPONSIVE
==========================================*/
@media(max-width:1200px){
.main{ margin-left:0; }
.stat-grid{ grid-template-columns:repeat(2,1fr); }
}
@media(max-width:992px){
.profile-tabs-layout{ flex-direction:column; }
.profile-tab-nav{ width:100%; position:static; display:flex; overflow-x:auto; gap:4px; }
.profile-tab-nav button{ white-space:nowrap; width:auto; }
.kyc-doc-grid{ grid-template-columns:repeat(2,1fr); }
.referral-levels{ grid-template-columns:1fr; }
}
@media(max-width:768px){
.profile-v3{ padding:18px; padding-bottom:100px; }
.profile-header-card{ padding:22px; text-align:center; justify-content:center; }
.profile-contact-grid{ justify-content:center; }
.form-grid{ grid-template-columns:1fr; }
.stat-grid{ grid-template-columns:1fr 1fr; }
.bottom-nav{ display:flex; }
.floating-support{ bottom:95px; right:18px; }
.back-top{ bottom:170px; right:18px; }
.footer{ flex-direction:column; text-align:center; }
}
@media(max-width:576px){
.profile-v3{ padding:16px; }
.kyc-doc-grid{ grid-template-columns:1fr; }
.stat-grid{ grid-template-columns:1fr; }
.verify-inline{ flex-direction:column; }
.danger-row{ flex-direction:column; align-items:flex-start; }
.referral-code-box{ flex-direction:column; align-items:flex-start; }
}
