/* SES Warm Panel — тема по макету webapp-design (Telegram dark) */
:root {
  --m: ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --s: -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --bg: #0e1621; --panel: #17212b; --panel2: #131e29;
  --line: #1c2b38; --line2: #22303c;
  --acc: #2b5278; --link: #5288c1;
  --txt: #fff; --txt2: #c8d6e2; --mut: #7f91a4; --faint: #4a5c6d;
  --grn: #4cae63; --grn-t: #7ed195; --grn-bg: #1e3b2a;
  --amb: #d8a13a; --amb-t: #e0bb72; --amb-bg: #3a3222;
  --red: #c96a6a; --red-t: #e08585; --red-bg: #3a2326;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body { background: var(--bg); color: var(--txt); font-family: var(--s); font-size: 14px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--link); text-decoration: none; }

#app { max-width: 600px; margin: 0 auto; min-height: 100vh;
  display: flex; flex-direction: column; }
@media (min-width: 700px) {
  #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

.head { display: flex; align-items: center; gap: 12px; padding: 14px; }
.head h1 { font-size: 20px; font-weight: 500; flex: 1; }
.head .grow { flex: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; height: 40px; padding: 0 16px; border-radius: 20px;
  background: var(--acc); color: #fff; font-size: 13px; }
.btn.ghost { background: var(--line2); color: var(--txt2); }
.btn.danger { background: var(--red-bg); color: var(--red-t); }
.btn.big { height: 48px; border-radius: 24px; font-size: 15px; width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* очередь */
.queue { background: var(--panel2); border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); }
.queue .qhead { display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  width: 100%; text-align: left; }
.queue .qhead .t { flex: 1; font-size: 14px; }
.queue .qhead .n, .mono { font-family: var(--m); }
.queue .qhead .n { font-size: 12px; color: var(--mut); }
.queue .qhead .chev { transition: transform .15s; color: var(--mut); }
.queue.open .qhead .chev { transform: rotate(180deg); }
.queue .qbody { display: none; padding: 0 14px 12px; flex-direction: column; gap: 9px; }
.queue.open .qbody { display: flex; }
.qrow { display: flex; align-items: center; gap: 9px; font-family: var(--m); font-size: 12px; }
.qrow .p { color: var(--faint); }
.qrow .nm { color: var(--txt2); }
.qrow .st { color: var(--mut); }
.qrow .st.live { color: var(--grn-t); }

/* карточки аккаунтов */
.cards { display: flex; flex-direction: column; }
@media (min-width: 560px) {
  .cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; }
  .cards .card { border-bottom: 0; }
}
.card { border-left: 2px solid var(--faint); background: var(--panel);
  padding: 12px 14px; border-bottom: 1px solid var(--line); }
.card.warming { border-left-color: var(--grn); }
.card.queued { border-left-color: var(--amb); }
.card.error { border-left-color: var(--red); }
.card .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card .prof { font-family: var(--m); font-size: 15px; overflow-wrap: anywhere; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  padding: 5px 10px; border-radius: 20px; white-space: nowrap; }
.chip i { width: 6px; height: 6px; border-radius: 50%; }
.chip.idle { background: var(--line); color: var(--mut); } .chip.idle i { background: var(--faint); }
.chip.warming { background: var(--grn-bg); color: var(--grn-t); } .chip.warming i { background: var(--grn); }
.chip.queued { background: var(--amb-bg); color: var(--amb-t); } .chip.queued i { background: var(--amb); }
.chip.error { background: var(--red-bg); color: var(--red-t); } .chip.error i { background: var(--red); }
.card .meta { font-family: var(--m); font-size: 12px; color: var(--mut); margin-top: 6px; }
.card .err { font-size: 13px; color: var(--red-t); margin-top: 8px; }
.card .proj { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 10px; }
.card .proj .lbl { font-family: var(--m); font-size: 11px; color: var(--mut); }
.card .proj .val { font-family: var(--m); font-size: 26px; font-weight: 500; line-height: 1; }
.card .proj .val.dim { color: var(--mut); }
.card .acts { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line); }
.card .acts .btn { flex: 1; }
.card .acts .btn.icon { flex: 0 0 44px; width: 44px; padding: 0; }
.card .detail { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  font-family: var(--m); font-size: 12px; color: var(--txt2); white-space: pre-wrap;
  overflow-wrap: anywhere; max-height: 260px; overflow-y: auto; }

/* пустое состояние / загрузка */
.empty { border-top: 1px solid var(--line); padding: 48px 22px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.empty h2 { font-size: 17px; font-weight: 500; }
.empty p { font-size: 14px; color: var(--mut); line-height: 1.5; }
.skel { animation: pulse 1.4s ease-in-out infinite; background: var(--line2); }
@keyframes pulse { 0%,100% { opacity: .35 } 50% { opacity: .15 } }
@keyframes spin { to { transform: rotate(360deg) } }
.spin { animation: spin 1s linear infinite; }

/* формы */
.form { padding: 14px; display: flex; flex-direction: column; gap: 14px;
  border-top: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--m); font-size: 12px; color: var(--mut); }
.field .hint { font-family: var(--m); font-size: 11px; color: var(--faint); }
.field .errm { font-size: 12px; color: var(--red-t); line-height: 1.45; }
.input, select.input { width: 100%; height: 44px; background: var(--panel);
  border: 1px solid var(--line2); border-radius: 12px; padding: 0 14px;
  font-family: var(--m); font-size: 14px; color: var(--txt); outline: none; }
.input:focus { border-color: var(--link); }
.input.bad { border-color: var(--red); }
select.input { background: var(--line2); border: 0; appearance: none; }
.pw { position: relative; }
.pw .input { padding-right: 46px; }
.pw .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  color: var(--mut); }
.note { padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start;
  font-family: var(--m); font-size: 13px; line-height: 1.5; }
.note.ok { background: var(--grn-bg); color: var(--grn-t); }
.note.bad { background: var(--red-bg); color: var(--red-t); }
.note pre { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }

/* конструктор */
.step-lbl { font-family: var(--m); font-size: 11px; color: var(--mut);
  padding: 12px 14px 8px; }
.regions { padding: 12px 14px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px; }
.regions .step-lbl { padding: 0 0 10px; width: 100%; }
.rchip { display: inline-flex; align-items: center; gap: 6px; height: 38px;
  padding: 0 14px; border-radius: 19px; background: var(--panel);
  border: 1px solid var(--line2); color: var(--mut);
  font-family: var(--m); font-size: 13px; }
.rchip.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.svc { background: var(--panel); padding: 12px 14px;
  border-bottom: 1px solid var(--line); }
.svc:first-of-type { border-top: 1px solid var(--line); }
.svc.off { background: var(--panel2); }
.svc .row { display: flex; align-items: center; gap: 11px; }
.svc .nm { flex: 1; font-size: 14px; }
.svc.off .nm { color: var(--mut); }
.tick { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line2);
  display: inline-flex; align-items: center; justify-content: center; flex: none; }
.svc.on .tick { background: var(--acc); border-color: var(--acc); }
.price { font-family: var(--m); font-size: 13px; color: var(--faint); }
.svc.on .price { color: var(--grn-t); background: var(--grn-bg);
  padding: 4px 9px; border-radius: 12px; }
.svc .ctl { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.svc .ctl .lbl { font-family: var(--m); font-size: 12px; color: var(--mut); }
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 38px; height: 38px; border-radius: 50%; background: var(--line2);
  color: var(--txt2); font-size: 19px; display: inline-flex; align-items: center;
  justify-content: center; }
.stepper button.plus { background: var(--acc); color: #fff; }
.stepper .v { font-family: var(--m); font-size: 19px; min-width: 42px; text-align: center; }
.svc select.input { max-width: 220px; }

/* прибитое итого */
.total { position: sticky; bottom: 0; margin-top: auto; background: var(--panel2);
  border-top: 1px solid var(--line2); padding: 12px 14px; }
.total .row { display: flex; align-items: flex-end; justify-content: space-between; }
.total .lbl { font-family: var(--m); font-size: 11px; color: var(--mut); }
.total .val { font-family: var(--m); font-size: 28px; font-weight: 500; line-height: 1; }
.total .val.bad { color: var(--red-t); }
.total .val.dim { color: var(--mut); }
.bar { margin-top: 12px; height: 6px; background: var(--line); position: relative; }
.bar .win { position: absolute; top: 0; bottom: 0; background: var(--line2); }
.bar .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--faint); }
.bar .mark.ok { background: var(--grn); }
.bar .mark.bad { background: var(--red); }
.total .sub { display: flex; justify-content: space-between; margin-top: 5px; }
.total .sub .t { font-family: var(--m); font-size: 11px; color: var(--faint); }
.total .sub .s { font-family: var(--m); font-size: 11px; color: var(--mut); }
.total .sub .s.ok { color: var(--grn-t); }
.total .sub .s.bad { color: var(--red-t); }

/* админка */
.admin-hero { padding: 16px 14px 18px; border-top: 1px solid var(--line);
  background: var(--panel2); }
.admin-hero .big { font-family: var(--m); font-size: 42px; font-weight: 500;
  line-height: 1.1; margin-top: 6px; }
.stats { display: flex; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); background: var(--panel); }
.stats .cell { flex: 1; padding: 12px 14px; border-right: 1px solid var(--line); }
.stats .cell:last-child { border-right: 0; }
.stats .v { font-family: var(--m); font-size: 20px; font-weight: 500; }
.stats .v.grn { color: var(--grn-t); }
.stats .k { font-family: var(--m); font-size: 11px; color: var(--mut); margin-top: 3px; }
.uro { background: var(--panel); border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); padding: 12px 14px;
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; }
.uro .nm { font-size: 14px; }
.uro .sub { font-family: var(--m); font-size: 12px; color: var(--mut); margin-top: 4px; }
.uro .arr { color: var(--mut); transition: transform .15s; }
.uro.open .arr { transform: rotate(90deg); }
.udetail { background: var(--panel2); border-bottom: 1px solid var(--line);
  padding: 10px 14px; font-family: var(--m); font-size: 12px; color: var(--txt2);
  display: flex; flex-direction: column; gap: 6px; }
.banner { background: var(--amb-bg); padding: 10px 14px; display: flex;
  align-items: center; gap: 10px; font-family: var(--m); font-size: 12px; color: var(--amb-t); }
.banner button { color: var(--amb-t); text-decoration: underline; font-family: var(--m);
  font-size: 12px; }
.fatal { padding: 60px 22px; text-align: center; color: var(--mut);
  display: flex; flex-direction: column; gap: 10px; align-items: center; }
.fatal .code { font-family: var(--m); font-size: 12px; color: var(--faint); }
