  :root { --bg:#f5f6f8; --card:#fff; --line:#e3e6eb; --txt:#1d2330; --mute:#6b7383;
          --blue:#006fff; --red:#d93636; --green:#1a9a50; --amber:#c98a00; }
  * { box-sizing:border-box; }
  body { margin:0; font:14px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif; background:var(--bg); color:var(--txt); }
  header { background:var(--card); border-bottom:1px solid var(--line); padding:12px 24px; display:flex; align-items:center; gap:24px; }
  header h1 { font-size:16px; margin:0; }
  nav button { background:none; border:0; padding:8px 12px; font:inherit; color:var(--mute); cursor:pointer; border-radius:6px; }
  nav button.on { color:var(--blue); background:#e8f1ff; font-weight:600; }
  main { padding:20px 24px; max-width:1300px; margin:auto; }
  .bar { display:flex; gap:8px; align-items:center; margin-bottom:12px; flex-wrap:wrap; }
  .bar .grow { flex:1; }
  input, select { font:inherit; padding:7px 10px; border:1px solid var(--line); border-radius:6px; background:#fff; }
  button.btn { font:inherit; padding:7px 14px; border-radius:6px; border:1px solid var(--line); background:#fff; cursor:pointer; }
  button.primary { background:var(--blue); color:#fff; border-color:var(--blue); }
  button.danger { color:var(--red); }
  button.sm { padding:3px 8px; font-size:12px; }
  table { width:100%; border-collapse:collapse; background:var(--card); border:1px solid var(--line); border-radius:8px; overflow:hidden; }
  th, td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
  th { background:#fafbfc; font-weight:600; color:var(--mute); font-size:12px; text-transform:uppercase; letter-spacing:.03em; }
  tr:last-child td { border-bottom:0; }
  td.act { white-space:nowrap; text-align:right; }
  .pill { display:inline-block; padding:1px 8px; border-radius:10px; font-size:12px; background:#eef0f3; margin:1px 2px 1px 0; }
  .ACTIVE { background:#e3f6ea; color:var(--green); }
  .DEACTIVATED { background:#fde8e8; color:var(--red); }
  .PENDING { background:#fff4d6; color:var(--amber); }
  .mute { color:var(--mute); }
  .stats { display:flex; gap:12px; margin-bottom:14px; }
  .stat { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:10px 16px; min-width:130px; }
  .stat b { display:block; font-size:22px; }
  dialog { border:0; border-radius:10px; padding:20px 22px; width:min(480px,95vw); box-shadow:0 10px 40px rgba(0,0,0,.2); }
  dialog h2 { margin:0 0 14px; font-size:17px; }
  dialog label { display:block; margin:10px 0 4px; font-weight:600; font-size:13px; }
  dialog input { width:100%; }
  .checks { max-height:180px; overflow:auto; border:1px solid var(--line); border-radius:6px; padding:6px 10px; }
  .checks label { font-weight:normal; display:flex; gap:8px; margin:4px 0; }
  .checks input { width:auto; }
  .row2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .foot { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
  #toast { position:fixed; bottom:20px; right:20px; padding:10px 16px; border-radius:8px; color:#fff; display:none; max-width:420px; }
  .hidden { display:none; }
  .card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:20px 22px; margin-bottom:16px; }
  .card h2 { margin:0 0 6px; font-size:16px; }
  .form label { display:block; margin:12px 0 4px; font-weight:600; font-size:13px; }
  .form input, .form textarea, .form select { width:100%; }
  textarea { font:12px/1.4 ui-monospace,Menlo,Consolas,monospace; padding:8px 10px; border:1px solid var(--line); border-radius:6px; min-height:150px; }
  .hint { color:var(--mute); font-size:12px; margin-top:4px; }
  .steps { list-style:none; padding:0; margin:12px 0 0; }
  .steps li { padding:4px 0; }
  .fp { font:11px ui-monospace,monospace; word-break:break-all; background:#f3f4f6; padding:6px 8px; border-radius:6px; }
  .narrow { max-width:620px; margin:40px auto; padding:0 16px; }
  .badge { font-size:12px; padding:2px 10px; border-radius:10px; }
  .right { margin-left:auto; display:flex; gap:10px; align-items:center; }
  .err { color:var(--red); margin-top:10px; }
  button:disabled { opacity:.45; cursor:not-allowed; }
  dialog.wide { width:min(780px,96vw); max-height:92vh; overflow:auto; }
  .dhead { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
  .dhead h2 { margin:0; }
  .usec { border-top:1px solid var(--line); padding:12px 0 6px; }
  .usec h3 { margin:0 0 6px; font-size:14px; }
  .usec label { display:block; margin:8px 0 4px; font-weight:600; font-size:13px; }
  .usec label.inline { font-weight:normal; display:flex; gap:6px; align-items:center; }
  .usec input:not([type=checkbox]) { width:100%; }
  .usec .bar input { width:auto; }
  table.mini { border:0; }
  table.mini td { padding:5px 8px; }
  a { color:inherit; text-decoration:none; }
  a:hover b { color:var(--blue); }
  details summary { cursor:pointer; font-size:13px; }
  .usec input[type=checkbox], dialog .checks input { width:auto; }
  body.operator .admin-only { display:none !important; }
  .pill.role { background:#e8f1ff; color:var(--blue); }
  #gTable input:not([type=checkbox]) { width:100%; }
  .form .checks input { width:auto; }
  .checks label { display:flex; gap:8px; align-items:center; font-weight:normal; margin:4px 0; }
  dialog.readonly .usec input, dialog.readonly .usec select, dialog.readonly .usec button { pointer-events:none; opacity:.55; }
  dialog.readonly .usec details { display:none; }
