/* Self-service client <-> vendor account linking */
.srl-overlay{
  position:fixed;inset:0;z-index:10060;display:none;align-items:center;justify-content:center;
  padding:18px;background:rgba(0,0,0,.48);backdrop-filter:blur(2px);
}
.srl-card{
  width:min(560px,96vw);max-height:90vh;overflow:auto;background:var(--bg2,#fff);
  color:var(--text,#111);border:1px solid var(--border,#ddd);border-radius:12px;
  box-shadow:0 20px 70px rgba(0,0,0,.25);
}
.srl-head{display:flex;justify-content:space-between;gap:18px;padding:18px 20px;border-bottom:1px solid var(--border,#ddd)}
.srl-kicker{font-size:9px;font-weight:800;letter-spacing:.12em;color:var(--accent,#6366f1)}
.srl-title{font-size:17px;font-weight:800;margin-top:3px}
.srl-subtitle{font-size:11px;line-height:1.5;color:var(--t3,#777);margin-top:5px;max-width:450px}
.srl-close{
  width:30px;height:30px;border:1px solid var(--border,#ddd);border-radius:7px;
  background:var(--bg3,#f6f7f9);color:var(--t2,#555);font-size:20px;line-height:1;cursor:pointer;flex:0 0 auto
}
.srl-body{padding:18px 20px}
/* Monthly usage / plan-limit summary, populated by feature-gate.js */
.srl-usage-panel{
  padding:12px 13px;border:1px solid var(--border,#ddd);border-radius:9px;
  background:var(--bg3,#f6f7f9);margin-bottom:14px
}
.srl-usage-panel[hidden]{display:none}
.srl-usage-label{font-size:9px;font-weight:800;letter-spacing:.08em;color:var(--t3,#777);text-transform:uppercase}
.srl-usage-row{font-size:12px;color:var(--text,#222);margin-top:7px}
.srl-usage-bar{height:6px;border-radius:4px;background:var(--border,#ddd);margin-top:8px;overflow:hidden}
.srl-usage-bar-fill{height:100%;border-radius:4px;background:var(--accent,#6366f1)}
.srl-usage-bar-fill.srl-usage-bar-warn{background:#c9840c}
.srl-usage-sub{font-size:11px;color:var(--t3,#777);margin-top:9px}
.ff-upgrade-btn{
  display:inline-block;margin-top:8px;min-height:28px;padding:0 10px;border:1px solid var(--accent,#6366f1);
  border-radius:6px;background:transparent;color:var(--accent,#6366f1);font:inherit;font-size:10px;font-weight:750;cursor:pointer
}
.ff-upgrade-btn:hover{background:var(--accent,#6366f1);color:#fff}
.srl-status{
  padding:10px 12px;border:1px solid var(--border,#ddd);border-radius:8px;
  background:var(--bg3,#f6f7f9);font-size:11px;font-weight:650;color:var(--t2,#555);margin-bottom:14px
}
.srl-status-error{color:#b42318;border-color:rgba(180,35,24,.25);background:rgba(180,35,24,.06)}
.srl-status-linked{color:#137333;border-color:rgba(19,115,51,.25);background:rgba(19,115,51,.06)}
.srl-form{display:flex;flex-direction:column;gap:12px}
.srl-field{display:flex;flex-direction:column;gap:5px}
.srl-label{font-size:10px;font-weight:750;color:var(--t2,#555)}
.srl-input{
  width:100%;box-sizing:border-box;padding:9px 11px;border:1px solid var(--border,#d6d9df);
  border-radius:7px;background:var(--bg,#fff);color:var(--text,#111);font:inherit;font-size:12px;outline:none
}
.srl-input:focus{border-color:var(--accent,#6366f1);box-shadow:0 0 0 2px rgba(99,102,241,.12)}
.srl-security-note{font-size:10px;line-height:1.45;color:var(--t3,#777)}
.srl-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}
.srl-btn{
  min-height:34px;padding:0 13px;border:1px solid var(--border,#d6d9df);border-radius:7px;
  background:var(--bg3,#f6f7f9);color:var(--text,#222);font:inherit;font-size:11px;font-weight:750;cursor:pointer
}
.srl-btn:disabled{opacity:.55;cursor:not-allowed}
.srl-primary{background:var(--accent,#6366f1);border-color:var(--accent,#6366f1);color:#fff}
.srl-danger{color:#b42318;border-color:rgba(180,35,24,.28);background:transparent}
.srl-linked-panel{padding:13px;border:1px solid var(--border,#ddd);border-radius:9px}
.srl-linked-title{font-size:9px;font-weight:800;letter-spacing:.08em;color:var(--t3,#777);text-transform:uppercase}
.srl-linked-name{font-size:14px;font-weight:800;margin-top:5px}
.srl-linked-email{font-size:10px;color:var(--t3,#777);margin-top:2px}
.srl-linked-help{font-size:10px;line-height:1.45;color:var(--t3,#777);margin-top:12px}
.srl-linked-actions{justify-content:flex-start;margin-top:14px}
/* Compact role switch control used in both Client and Vendor headers */
.srl-header-switch{
  width:30px;height:30px;min-width:30px;padding:0;display:inline-flex;align-items:center;justify-content:center;
  margin-left:10px;
  border:1px solid var(--border,#d6d9df);border-radius:7px;background:transparent;
  color:var(--t2,#667085);cursor:pointer;position:relative;flex:0 0 auto;
  transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease
}
.srl-header-switch:hover{
  background:var(--bg3,#f6f7f9);border-color:var(--accent,#6366f1);color:var(--accent,#6366f1)
}
.srl-header-switch:focus-visible{outline:2px solid var(--accent,#6366f1);outline-offset:2px}
.srl-header-switch:active{transform:scale(.96)}
.srl-header-switch:disabled{opacity:.55;cursor:not-allowed;transform:none}
.srl-switch-icon{width:16px;height:16px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* Native title provides an accessible tooltip without adding a second header element. */
.srl-header-account-btn{
  margin-left:8px;min-height:28px;padding:0 9px;border:1px solid var(--border,#d6d9df);
  border-radius:6px;background:var(--bg3,#f6f7f9);color:var(--t2,#555);font:inherit;font-size:10px;font-weight:700;cursor:pointer
}
.srl-header-account-btn:hover{color:var(--text,#111)}
/* Vendor account area: place the switch cleanly beside Log Out. */
#acctBadge .srl-header-switch{margin-left:9px;margin-right:8px}
.srl-more-item{border-bottom:1px solid var(--border,#ddd)}
.srl-switched-banner{
  position:fixed;left:0;right:0;top:0;z-index:10070;display:flex;align-items:center;justify-content:center;
  gap:14px;padding:9px 14px;background:#fff4ce;color:#6b4e00;border-bottom:1px solid #e5c96b;
  font-size:11px;box-shadow:0 2px 12px rgba(0,0,0,.08)
}
.srl-switched-banner div{display:flex;flex-direction:column;gap:1px}
.srl-switched-banner strong{font-size:11px}
.srl-switched-banner span{font-size:10px}
.srl-switched-btn{
  border:1px solid rgba(107,78,0,.35);background:#fff;color:#6b4e00;border-radius:6px;
  padding:6px 10px;font:inherit;font-weight:750;cursor:pointer
}
@media(max-width:600px){
  .srl-overlay{padding:10px}.srl-card{width:100%}.srl-head{padding:15px}.srl-body{padding:15px}
  .srl-switched-banner{align-items:flex-start;gap:8px;flex-wrap:wrap;justify-content:flex-start}
}
