/* «AllanService» admin pane (allan.js). Built on the admin's design tokens (theme-allan.css):
   panels, tables, pills, tabs and modals dressed like the rest of the admin. */
.al-wrap{min-width:0}
.al-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:6px}
.al-head h1{margin:0}
.al-head p{max-width:720px}
.al-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.al-note{background:rgba(245,158,11,.1);border:1px solid rgba(245,158,11,.35);color:#fcd34d;border-radius:10px;padding:11px 14px;margin:12px 0;font-size:13.5px;line-height:1.5}
.al-note b{color:#fde68a}

.al-cards{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));margin:14px 0 4px}
.al-stat{background:var(--panel);border:1px solid var(--glass-bd,var(--stroke));border-radius:12px;padding:14px 16px}
.al-stat .n{font-size:26px;font-weight:800;line-height:1.1;font-variant-numeric:tabular-nums}
.al-stat .l{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.4px;margin-top:4px}

.al-tabs{display:flex;flex-wrap:wrap;gap:6px;border-bottom:1px solid var(--stroke-2);margin:16px 0 14px}
.al-t{background:transparent;color:var(--muted);border:0;border-radius:8px 8px 0 0;padding:9px 15px;cursor:pointer;font:inherit;font-weight:600;font-size:13.5px}
.al-t:hover{color:var(--text)}
.al-t.on{background:var(--panel-2);color:#c7d2fe;border:1px solid var(--stroke-2);border-bottom-color:var(--panel-2)}

.al-card{background:var(--panel);border:1px solid var(--glass-bd,var(--stroke));border-radius:12px;padding:16px;margin:0 0 14px}
.al-card h4{margin:0 0 12px;font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:700}
.al-two{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.al-grid{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.al-grid2{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.al-bar{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 10px}
.al-bar h4{margin:0}

.al-wrap label{display:block;font-size:12px;color:var(--muted);margin:0 0 4px}
.al-wrap input,.al-wrap select,.al-wrap textarea,.al-modal input,.al-modal select,.al-modal textarea{
  width:100%;box-sizing:border-box;background:#0f172a;border:1px solid #334155;color:var(--text);border-radius:8px;padding:9px 11px;font:inherit;font-size:13.5px}
.al-wrap input:focus,.al-wrap select:focus,.al-wrap textarea:focus,.al-modal input:focus,.al-modal select:focus,.al-modal textarea:focus{outline:none;border-color:var(--blue-2,#818cf8);box-shadow:0 0 0 1px var(--blue-2,#818cf8)}
.al-wrap textarea,.al-modal textarea{min-height:70px;resize:vertical;font-family:ui-monospace,Consolas,monospace}
.al-sel{width:auto!important;min-width:120px}
.al-mono{font-family:ui-monospace,Consolas,monospace}
.al-check{display:inline-flex;gap:8px;align-items:center;font-size:13px;color:var(--muted);cursor:pointer}
.al-wrap .al-check input,.al-modal .al-check input{width:auto;margin:0;flex:none}

.al-scroll{overflow-x:auto}
.al-wrap table{width:100%;border-collapse:collapse;font-size:13px}
.al-wrap th,.al-wrap td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--stroke);vertical-align:middle}
.al-wrap th{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap;background:rgba(255,255,255,.02)}
.al-wrap tbody tr:last-child td{border-bottom:0}
.al-wrap tbody tr:hover{background:rgba(255,255,255,.02)}
.al-mut{color:var(--muted)}
.al-dim{color:var(--muted);opacity:.75}
.al-empty{text-align:center;color:var(--muted);padding:18px}
.al-err{color:#fca5a5;font-size:11px;white-space:normal;max-width:220px;margin-top:3px}
.al-acts{display:flex;flex-wrap:wrap;gap:4px;justify-content:flex-end;min-width:200px}
.al-acts .btn.sm{padding:5px 9px;font-size:11.5px}

.al-pill{display:inline-block;padding:2px 9px;border-radius:20px;font-size:11px;font-weight:700;white-space:nowrap}
.al-pill.free,.al-pill.active,.al-pill.ok,.al-pill.join{background:rgba(52,211,153,.15);color:#6ee7b7}
.al-pill.busy,.al-pill.joining,.al-pill.pending{background:rgba(129,140,248,.18);color:#a5b4fc}
.al-pill.invalid,.al-pill.failed,.al-pill.no,.al-pill.bad,.al-pill.leave{background:rgba(248,113,113,.15);color:#fca5a5}
.al-pill.disabled,.al-pill.stopped{background:#232838;color:var(--muted)}

.al-pre{background:#0f172a;border:1px solid var(--stroke-2);border-radius:8px;padding:10px 12px;font-size:12px;overflow:auto;max-height:280px;white-space:pre-wrap;word-break:break-all;color:#6ee7b7;font-family:ui-monospace,Consolas,monospace}
.al-out{font-size:14px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;overflow-wrap:anywhere;min-height:1.2em}
.al-out.ok{color:#6ee7b7}
.al-out.err{color:#fca5a5}
.al-out img{width:24px;height:24px;border-radius:7px;flex:none}
.al-prog{height:6px;background:#0f172a;border-radius:6px;overflow:hidden;margin-top:10px}
.al-prog>div{height:100%;width:0;background:var(--blue,#6366f1);transition:width .3s}
.al-log{font-family:ui-monospace,Consolas,monospace;font-size:12px;max-height:150px;overflow:auto;margin-top:8px}

/* modals reuse the admin's .modal-overlay / .modal / .modal-body */
.al-modal{max-width:520px}
.al-mfields{display:flex;flex-direction:column;gap:10px;margin:6px 0 4px}
.al-mact{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.al-modal h2{margin:0 0 6px}

/* connection badge next to the header */
.al-conn{font-size:11px;font-weight:700;padding:2px 9px;border-radius:20px;background:#232838;color:var(--muted)}
.al-conn.on{background:rgba(52,211,153,.15);color:#6ee7b7}
.al-conn.off{background:rgba(248,113,113,.15);color:#fca5a5}

/* «Браузерные машины»: on a phone each machine is a card (no sideways scroll to reach «Удалить») */
@media (max-width:640px){
  #al-bm-list table,#al-bm-list tbody,#al-bm-list tr,#al-bm-list td{display:block;width:auto}
  #al-bm-list thead{display:none}
  #al-bm-list tr{border-bottom:1px solid var(--stroke);padding:10px 0}
  #al-bm-list tbody tr:last-child{border-bottom:0}
  #al-bm-list td{border:0;padding:3px 0}
  #al-bm-list td:empty{display:none}
  #al-bm .al-sel{min-width:0}
  .al-acts{min-width:0;justify-content:flex-start}
  .al-head{flex-direction:column}
}
