.devices-card{width:min(100%,620px)}
.device-status{
  margin:0 0 12px;padding:10px 12px;border-radius:11px;border:1px solid var(--line);
  background:#111827;color:#cbd5e1;font-size:13px;font-weight:700
}
.device-status.approved{border-color:rgba(34,197,94,.45);background:rgba(20,83,45,.25);color:#bbf7d0}
.device-status.pending{border-color:rgba(245,158,11,.5);background:rgba(120,53,15,.22);color:#fde68a}
.device-status.error{border-color:rgba(239,68,68,.45);background:rgba(127,29,29,.2);color:#fecaca}
.device-panel{
  display:flex;flex-direction:column;gap:9px;margin:0 0 14px;padding:14px;border:1px solid var(--line);
  border-radius:13px;background:rgba(15,23,42,.7)
}
.device-panel>strong{font-size:15px;color:#f8fafc}
.device-panel p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.pair-code{
  padding:13px 10px;border-radius:11px;background:#020617;border:1px dashed #475569;
  color:#f8fafc;text-align:center;font-size:clamp(21px,5vw,30px);font-weight:850;
  font-variant-numeric:tabular-nums;letter-spacing:.08em;user-select:all
}
.device-hint{min-height:18px;color:#94a3b8;font-size:12px;text-align:center}
.approve-device-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px}
.approve-device-row input{
  min-width:0;border:1px solid var(--line);outline:none;padding:11px 12px;border-radius:10px;
  background:#111827;color:var(--text);text-transform:uppercase
}
.approve-device-row input:focus{border-color:#3b82f6}
.approve-device-row .send-btn{padding-inline:18px}
.devices-list{display:flex;flex-direction:column;gap:8px;max-height:330px;overflow:auto;padding-right:2px}
.device-row{
  display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;
  border:1px solid var(--line);border-radius:12px;background:#111827
}
.device-row.revoked{opacity:.58}
.device-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.device-copy strong{color:#e2e8f0;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.device-copy span{color:#94a3b8;font-size:11px;line-height:1.35}
.device-current{
  display:inline-flex;margin-left:5px;padding:2px 6px;border-radius:999px;
  background:rgba(34,197,94,.17);color:#86efac;font-size:10px;font-weight:800;vertical-align:1px
}
.device-revoke-btn{
  flex:0 0 auto;border:1px solid rgba(239,68,68,.38);border-radius:9px;background:rgba(127,29,29,.22);
  color:#fecaca;padding:8px 10px;font-size:12px;font-weight:750
}
.device-revoke-btn:hover:not(:disabled){background:rgba(153,27,27,.36);border-color:#ef4444;color:#fff}
.device-empty{padding:14px;text-align:center;color:#64748b;font-size:13px}
.history-device-note{
  margin:4px auto 12px;max-width:720px;padding:9px 12px;border:1px solid rgba(59,130,246,.28);
  border-radius:10px;background:rgba(30,64,175,.10);color:#93c5fd;font-size:12px;line-height:1.45;text-align:center
}

/* PUK / recovery */
.recovery-panel{border-color:rgba(59,130,246,.28);background:rgba(30,64,175,.08)}
.recovery-issued{
  margin:12px 0 16px;padding:14px;border:1px solid rgba(59,130,246,.38);border-radius:13px;
  background:rgba(30,64,175,.12);display:flex;flex-direction:column;gap:10px
}
.recovery-issued-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.recovery-issued-head strong{color:#dbeafe}.recovery-issued-head span{color:#93c5fd;font-size:11px}
.recovery-issued small{color:#94a3b8;line-height:1.45}
.recovery-code{
  padding:13px 10px;border:1px dashed rgba(96,165,250,.55);border-radius:11px;background:#020617;color:#dbeafe;
  text-align:center;font:800 clamp(18px,4vw,26px)/1.35 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.06em;user-select:all;overflow-wrap:anywhere
}
.puk-recover-box{display:flex;flex-direction:column;gap:9px;margin-top:4px}
.device-or{display:flex;align-items:center;gap:10px;color:#64748b;font-size:11px;text-transform:uppercase;letter-spacing:.1em}
.device-or::before,.device-or::after{content:"";height:1px;background:#334155;flex:1}.device-or span{flex:0 0 auto}
.recovery-input{
  width:100%;border:1px solid var(--line);outline:none;padding:11px 12px;border-radius:10px;background:#111827;color:var(--text);
  text-transform:uppercase;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.04em
}
.recovery-input:focus{border-color:#60a5fa}
.recovery-check{display:flex;align-items:flex-start;gap:8px;color:#cbd5e1;font-size:12px;line-height:1.4}.recovery-check input{margin-top:2px}
.recovery-save-card{width:min(100%,560px)}
.recovery-save-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}

/* Master wipe */
.master-wipe-panel{border-color:rgba(239,68,68,.32);background:rgba(127,29,29,.12)}
.master-wipe-panel>strong{color:#fecaca}
.master-wipe-btn{
  min-height:42px;border:1px solid rgba(248,113,113,.55);border-radius:10px;background:rgba(127,29,29,.35);
  color:#fee2e2;font-weight:850;letter-spacing:.04em;padding:0 14px
}
.master-wipe-btn:hover:not(:disabled){background:rgba(153,27,27,.55);border-color:#f87171;color:white}
.wipe-card{width:min(100%,560px);border-color:rgba(239,68,68,.45)}
.wipe-warning{padding:12px;border:1px solid rgba(248,113,113,.38);border-radius:11px;background:rgba(127,29,29,.22);color:#fecaca;line-height:1.5;font-size:13px}

@media (max-width:760px){
  .devices-card{max-height:calc(100dvh - 24px);overflow:auto}
  .approve-device-row{grid-template-columns:1fr}
  .approve-device-row .send-btn{width:100%}
  .device-row{align-items:flex-start}
  .device-copy strong{white-space:normal}
  .recovery-issued-head{align-items:flex-start;flex-direction:column;gap:3px}
  .recovery-save-actions{grid-template-columns:1fr}
}
