:root{
  --bg:#0f172a;
  --surface:#111827;
  --surface-2:#1f2937;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --primary:#3b82f6;
  --danger:#ef4444;
  --border:#334155;
  --radius:14px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{touch-action:manipulation}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,system-ui,sans-serif}
body{padding-bottom:88px}
body.form-open .fab{display:none}
.app{max-width:860px;margin:0 auto;padding:12px}
.topbar{position:sticky;top:0;z-index:10;background:rgba(15,23,42,.88);backdrop-filter:blur(8px);padding:calc(env(safe-area-inset-top, 0px) + 34px) 12px 10px;border-bottom:1px solid var(--border);margin:0 -12px 12px}
.topbar h1{margin:0;font-size:18px;font-weight:700}
.topbar .sub{color:var(--muted);font-size:12px;margin-top:2px}
.card{background:linear-gradient(180deg,var(--surface),#0b1220);border:1px solid var(--border);border-radius:var(--radius);padding:12px;margin-bottom:12px}
.formHead{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
@media (max-width:640px){.row{grid-template-columns:1fr}}
input,select,button{width:100%;padding:11px 12px;border-radius:12px;border:1px solid var(--border);background:#0b1220;color:var(--text);font-size:15px}
input::placeholder{color:#6b7280}
button{border:none;background:var(--primary);font-weight:600}
button.secondary{background:#1e293b;border:1px solid var(--border)}
button.ghost{background:transparent;border:1px solid var(--border)}
button.danger{background:#7f1d1d;border:1px solid #ef4444;color:#fecaca}
.toolbar{display:flex;gap:8px}
.client{border:1px solid var(--border);border-radius:12px;padding:10px;background:#0b1220;margin-top:8px}
.clientHead{display:flex;justify-content:space-between;gap:8px;align-items:center}
.clientName{font-size:19px;font-weight:700}
.phone{color:var(--muted);font-size:15px}
.inlineActions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;align-items:center}
.miniBtn{width:auto;padding:8px 12px;border-radius:10px;background:#1e293b;border:1px solid var(--border);font-size:12px;line-height:1}
.device{margin-top:8px;padding:8px;border:1px dashed #334155;border-radius:10px;background:#0f172a}
.deviceTop{display:flex;justify-content:space-between;align-items:center;gap:8px}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap;word-break:break-word;font-size:16px;line-height:1.35}
.copyable{cursor:pointer;position:relative;padding:0 2px;border-radius:4px;transition:all .14s ease}
.copyable:hover{color:#bfdbfe;background:rgba(59,130,246,.12)}
.copyable.copying{color:#6ee7b7;background:rgba(16,185,129,.14)}
.copyable.copying::after{content:' ✓';font-size:11px;color:#6ee7b7}
.badge{font-size:11px;color:#93c5fd;background:#1e3a8a33;border:1px solid #1d4ed8;border-radius:999px;padding:2px 8px}
.editBtn{width:auto;padding:6px 10px;border-radius:8px;background:#1e293b;border:1px solid var(--border);font-size:12px}
.fab{position:fixed;right:16px;bottom:18px;z-index:20;width:auto;padding:12px 14px;border-radius:999px;box-shadow:0 8px 24px rgba(0,0,0,.35)}
.hidden{display:none}
