/* Stock Sync IMS — Premium Profile UI v1 */
:root{
  --ss-profile-navy:#123b63;
  --ss-profile-blue:#2476d3;
  --ss-profile-teal:#0e7f8f;
  --ss-profile-cyan:#eaf8fb;
  --ss-profile-soft:#f5f8fc;
  --ss-profile-card:#ffffff;
  --ss-profile-text:#17324d;
  --ss-profile-muted:#6b7f93;
  --ss-profile-line:#dce7f0;
  --ss-profile-success:#159a68;
  --ss-profile-warning:#f4a62a;
  --ss-profile-shadow:0 18px 50px rgba(30,72,112,.12);
}

.ss-profile-page{
  display:grid;
  grid-template-columns:minmax(250px,310px) minmax(0,1fr);
  gap:22px;
  align-items:stretch;
}

.ss-profile-side,
.ss-profile-main{
  background:var(--ss-profile-card);
  border:1px solid rgba(192,211,226,.72);
  box-shadow:var(--ss-profile-shadow);
  border-radius:26px;
}

.ss-profile-side{
  padding:28px 22px;
  display:flex;
  flex-direction:column;
  min-height:670px;
  overflow:hidden;
  position:relative;
}

.ss-profile-side::after{
  content:"";
  position:absolute;
  left:-58px;
  bottom:-70px;
  width:220px;
  height:220px;
  border-radius:50%;
  background:radial-gradient(circle at 40% 35%,rgba(32,164,184,.18),rgba(36,118,211,.05) 60%,transparent 71%);
  pointer-events:none;
}

.ss-profile-avatar-wrap{
  width:148px;
  height:148px;
  border-radius:50%;
  padding:6px;
  background:linear-gradient(135deg,#dff6fa,#dceaff 55%,#fff0d7);
  margin:2px auto 16px;
  position:relative;
  box-shadow:0 13px 32px rgba(30,84,126,.16);
}

.ss-profile-avatar{
  width:100%;
  height:100%;
  border-radius:50%;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(145deg,#edf8fb,#e8eefb);
  color:var(--ss-profile-navy);
  font-size:43px;
  font-weight:850;
  letter-spacing:-2px;
  border:4px solid #fff;
}

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

.ss-profile-photo-button{
  position:absolute;
  right:4px;
  bottom:8px;
  width:43px;
  height:43px;
  border-radius:50%;
  border:4px solid #fff;
  background:linear-gradient(135deg,var(--ss-profile-teal),var(--ss-profile-blue));
  color:#fff;
  display:grid;
  place-items:center;
  box-shadow:0 8px 20px rgba(22,92,143,.25);
  cursor:pointer;
  transition:transform .18s ease,box-shadow .18s ease;
}
.ss-profile-photo-button:hover{transform:translateY(-2px) scale(1.04);box-shadow:0 12px 25px rgba(22,92,143,.32)}
.ss-profile-photo-button svg{width:18px;height:18px}

.ss-profile-name{text-align:center;color:var(--ss-profile-text);font-size:23px;font-weight:850;line-height:1.2;margin:0}
.ss-profile-role{display:flex;align-items:center;justify-content:center;gap:7px;color:var(--ss-profile-teal);font-weight:800;font-size:14px;margin-top:8px}
.ss-profile-role svg{width:17px;height:17px}
.ss-profile-status{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:10px;color:var(--ss-profile-muted);font-size:12px;font-weight:700}
.ss-profile-status-dot{width:8px;height:8px;border-radius:50%;background:var(--ss-profile-success);box-shadow:0 0 0 5px rgba(21,154,104,.11)}

.ss-profile-divider{height:1px;background:linear-gradient(90deg,transparent,var(--ss-profile-line),transparent);margin:25px 0 18px}

.ss-profile-nav{display:flex;flex-direction:column;gap:8px;position:relative;z-index:1}
.ss-profile-nav-button{
  width:100%;
  border:0;
  background:transparent;
  color:#526b82;
  border-radius:14px;
  padding:13px 14px;
  display:flex;
  align-items:center;
  gap:11px;
  text-align:left;
  font-weight:750;
  transition:all .18s ease;
}
.ss-profile-nav-button svg{width:19px;height:19px;flex:0 0 auto}
.ss-profile-nav-button:hover{background:#f0f7fb;color:var(--ss-profile-navy);transform:translateX(2px)}
.ss-profile-nav-button.active{background:linear-gradient(135deg,#e8f7fa,#edf3ff);color:var(--ss-profile-navy);box-shadow:inset 0 0 0 1px #d4e9f1}
.ss-profile-nav-button.active svg{color:var(--ss-profile-teal)}
.ss-profile-nav-button.danger{margin-top:4px;color:#c84848}
.ss-profile-nav-button.danger:hover{background:#fff1f1;color:#a92929}

.ss-profile-mini-card{
  margin-top:auto;
  border:1px solid #d7eaf1;
  background:linear-gradient(145deg,#f5fcfd,#f3f7ff);
  border-radius:18px;
  padding:15px;
  position:relative;
  z-index:1;
}
.ss-profile-mini-card strong{display:block;color:var(--ss-profile-navy);font-size:13px;margin-bottom:4px}
.ss-profile-mini-card p{color:var(--ss-profile-muted);font-size:12px;line-height:1.55;margin:0}

.ss-profile-main{padding:28px 30px;min-height:670px}
.ss-profile-panel{display:none}
.ss-profile-panel.active{display:block;animation:ssProfileFade .2s ease}
@keyframes ssProfileFade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

.ss-profile-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  padding-bottom:22px;
  border-bottom:1px solid var(--ss-profile-line);
  margin-bottom:24px;
}
.ss-profile-title-wrap{display:flex;align-items:flex-start;gap:14px}
.ss-profile-title-icon{
  width:52px;
  height:52px;
  border-radius:17px;
  display:grid;
  place-items:center;
  color:#fff;
  background:linear-gradient(135deg,var(--ss-profile-navy),var(--ss-profile-teal));
  box-shadow:0 11px 25px rgba(18,80,109,.23);
}
.ss-profile-title-icon svg{width:25px;height:25px}
.ss-profile-header h2{margin:1px 0 5px;color:var(--ss-profile-text);font-size:25px;line-height:1.2}
.ss-profile-header p{margin:0;color:var(--ss-profile-muted);font-size:13px;line-height:1.55}
.ss-profile-account-pill{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:8px 11px;
  border-radius:999px;
  background:#eaf8f2;
  color:#11794f;
  font-size:12px;
  font-weight:850;
  white-space:nowrap;
}
.ss-profile-account-pill::before{content:"";width:8px;height:8px;border-radius:50%;background:#20aa72;box-shadow:0 0 0 4px rgba(32,170,114,.12)}

.ss-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px}
.ss-profile-field.full{grid-column:1/-1}
.ss-profile-field label{display:block;color:#455e75;font-weight:800;font-size:13px;margin:0 0 7px 2px}
.ss-profile-input-wrap{position:relative}
.ss-profile-input-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:19px;height:19px;color:#778ba0;pointer-events:none}
.ss-profile-input-wrap textarea + .ss-profile-input-icon{top:17px;transform:none}
.ss-profile-input,
.ss-profile-select,
.ss-profile-textarea{
  width:100%;
  border:1px solid #ccdbe7;
  background:#fbfdff;
  color:#213b53;
  border-radius:13px;
  padding:13px 14px 13px 44px;
  min-height:48px;
  font-weight:650;
  outline:none;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.ss-profile-textarea{min-height:92px;resize:vertical;line-height:1.55;padding-top:13px}
.ss-profile-input:focus,
.ss-profile-select:focus,
.ss-profile-textarea:focus{border-color:#4a9bb7;background:#fff;box-shadow:0 0 0 4px rgba(30,135,161,.11)}
.ss-profile-input[readonly]{background:#f1f5f9;color:#6f8192;cursor:not-allowed}
.ss-profile-help{display:block;color:#8a9bac;font-size:11px;margin:6px 2px 0;line-height:1.45}

.ss-profile-actions{
  display:flex;
  justify-content:flex-end;
  gap:11px;
  margin-top:27px;
  padding-top:21px;
  border-top:1px solid var(--ss-profile-line);
}
.ss-profile-button{
  border:0;
  border-radius:13px;
  min-height:46px;
  padding:0 22px;
  font-weight:850;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}
.ss-profile-button svg{width:18px;height:18px}
.ss-profile-button.secondary{background:#fff;color:var(--ss-profile-navy);box-shadow:inset 0 0 0 1px #bdd0df}
.ss-profile-button.secondary:hover{background:#f5f9fc;transform:translateY(-1px)}
.ss-profile-button.primary{color:#fff;background:linear-gradient(135deg,var(--ss-profile-navy),var(--ss-profile-teal));box-shadow:0 10px 24px rgba(18,86,114,.22)}
.ss-profile-button.primary:hover{transform:translateY(-2px);box-shadow:0 14px 28px rgba(18,86,114,.28)}

.ss-profile-security-card{
  border:1px solid #d6e3ed;
  border-radius:18px;
  padding:18px;
  background:linear-gradient(145deg,#fbfdff,#f4f9fc);
  margin-top:18px;
}
.ss-profile-security-card h3{font-size:16px;color:var(--ss-profile-navy);margin:0 0 6px}
.ss-profile-security-card p{font-size:12px;color:var(--ss-profile-muted);line-height:1.6;margin:0}
.ss-profile-security-row{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:16px;padding-top:15px;border-top:1px solid #dce7ef}
.ss-profile-security-meta strong{display:block;color:#294761;font-size:13px;margin-bottom:3px}
.ss-profile-security-meta span{color:#74899d;font-size:12px}

[data-theme="dark"] .ss-profile-side,
[data-theme="dark"] .ss-profile-main{background:#122232;border-color:#294155;box-shadow:0 18px 55px rgba(0,0,0,.27)}
[data-theme="dark"] .ss-profile-name,
[data-theme="dark"] .ss-profile-header h2,
[data-theme="dark"] .ss-profile-field label,
[data-theme="dark"] .ss-profile-security-card h3{color:#e9f3fb}
[data-theme="dark"] .ss-profile-header p,
[data-theme="dark"] .ss-profile-status,
[data-theme="dark"] .ss-profile-mini-card p,
[data-theme="dark"] .ss-profile-help,
[data-theme="dark"] .ss-profile-security-card p,
[data-theme="dark"] .ss-profile-security-meta span{color:#9bb0c2}
[data-theme="dark"] .ss-profile-divider,
[data-theme="dark"] .ss-profile-header,
[data-theme="dark"] .ss-profile-actions{border-color:#294155}
[data-theme="dark"] .ss-profile-nav-button{color:#a9bdcc}
[data-theme="dark"] .ss-profile-nav-button:hover,
[data-theme="dark"] .ss-profile-nav-button.active{background:#1b3346;color:#eef8ff;box-shadow:inset 0 0 0 1px #31516a}
[data-theme="dark"] .ss-profile-mini-card,
[data-theme="dark"] .ss-profile-security-card{background:#172b3d;border-color:#2d4a60}
[data-theme="dark"] .ss-profile-input,
[data-theme="dark"] .ss-profile-select,
[data-theme="dark"] .ss-profile-textarea{background:#102334;border-color:#34536b;color:#eaf4fb}
[data-theme="dark"] .ss-profile-input[readonly]{background:#1a2e40;color:#9fb2c1}
[data-theme="dark"] .ss-profile-button.secondary{background:#172b3d;color:#eaf4fb;box-shadow:inset 0 0 0 1px #3b5c73}

@media(max-width:1050px){
  .ss-profile-page{grid-template-columns:250px minmax(0,1fr)}
  .ss-profile-main{padding:24px}
}
@media(max-width:820px){
  .ss-profile-page{grid-template-columns:1fr}
  .ss-profile-side{min-height:auto;padding:22px}
  .ss-profile-mini-card{display:none}
  .ss-profile-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  .ss-profile-nav-button{justify-content:center;text-align:center;padding:12px 8px;font-size:12px}
  .ss-profile-nav-button.danger{margin-top:0}
  .ss-profile-main{min-height:auto}
}
@media(max-width:620px){
  .ss-profile-page{gap:14px}
  .ss-profile-side,.ss-profile-main{border-radius:20px}
  .ss-profile-main{padding:19px 16px}
  .ss-profile-grid{grid-template-columns:1fr;gap:15px}
  .ss-profile-field.full{grid-column:auto}
  .ss-profile-header{flex-direction:column}
  .ss-profile-actions{flex-direction:column-reverse}
  .ss-profile-button{width:100%}
  .ss-profile-nav{grid-template-columns:1fr}
  .ss-profile-nav-button{justify-content:flex-start;text-align:left}
  .ss-profile-security-row{align-items:flex-start;flex-direction:column}
}
