/* ============================================================
   PrintCalc — минималистичная тёмная тема
   ============================================================ */

:root {
  --bg: #0d0e10;
  --bg-2: #131417;
  --panel: #17181c;
  --panel-2: #1b1d21;
  --border: #26282e;
  --border-2: #2f3238;
  --text: #e8eaed;
  --muted: #9aa1a9;
  --muted-2: #6b7279;
  --accent: #ff5c1a;
  --accent-2: #ff8a3d;
  --ok: #37d67a;
  --err: #ff5d5d;
  --info: #4da6ff;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Roboto Mono", monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(255, 92, 26, .35); }

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2c2f35; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a3e46; }

.num, code, pre, .mono { font-family: var(--mono); }

/* ================= header ================= */

.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 14, 16, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.top-inner {
  max-width: 1640px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }

.brand-mark { width: 30px; height: 30px; color: var(--accent); flex: none; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: .02em; }
.brand-tag { font-size: 12px; color: var(--muted); }

.top-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--border-2); border-radius: 999px;
  font-size: 13px; color: var(--text); background: var(--panel);
  transition: border-color .15s, color .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent-2); text-decoration: none; }
.chip-dim { color: var(--muted); }

/* ================= layout ================= */

.layout {
  max-width: 1640px; margin: 0 auto; padding: 20px;
  display: grid; grid-template-columns: minmax(0, 1fr) 424px; gap: 20px;
  align-items: start;
}

/* ================= 3D-вьювер ================= */

.stage { position: sticky; top: 82px; }

.viewer {
  position: relative;
  height: calc(100vh - 108px);
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0e0f12;
}

.viewer canvas { display: block; width: 100%; height: 100%; }

/* --- сетка окон моделей --- */
.stage { min-height: 480px; }

.viewer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px;
}

.mview {
  position: relative;
  background: #0b0c0f;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: min(52vh, 540px);
  min-height: 320px;
  transition: border-color .15s, box-shadow .15s;
}
.mview.focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 32px rgba(255, 92, 26, .14);
}

.mv-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  font-size: 12px; color: var(--muted);
  background: linear-gradient(180deg, rgba(8, 9, 12, .78), rgba(8, 9, 12, 0));
  pointer-events: none;
}
.mv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--text); }
.mv-price { margin-left: auto; font-family: var(--mono); font-weight: 700; color: var(--accent-2); white-space: nowrap; }
.mv-dims { font-family: var(--mono); color: var(--muted-2); white-space: nowrap; }
.viewer-grid.no-dims .mv-dims { display: none; }

.mv-canvas { position: absolute; inset: 0; }
.mv-canvas canvas { width: 100%; height: 100%; display: block; cursor: grab; }

.viewer-grid:has(.mview:only-child) .mview {
  height: calc(100vh - 172px);
  min-height: 440px;
}

.viewer-empty {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--muted-2); text-align: center; padding: 20px;
  pointer-events: none;
}
.viewer-empty svg { width: 56px; height: 56px; opacity: .55; }
.viewer-empty p { margin: 4px 0 0; font-size: 16px; color: var(--muted); font-weight: 600; }
.viewer-empty span { font-size: 13px; }

.viewer-tools {
  position: absolute; top: 14px; left: 14px; z-index: 5;
  display: flex; gap: 8px;
}

.vtool {
  width: 38px; height: 38px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(23, 24, 28, .88);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-2); border-radius: 10px;
  color: #c9cdd3; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.vtool svg { width: 19px; height: 19px; }
.vtool:hover { border-color: var(--accent); color: var(--accent-2); }
.vtool.is-on { background: var(--accent); border-color: var(--accent); color: #0d0e10; }
.vtool.is-on:hover { background: var(--accent-2); color: #0d0e10; }

.viewer-chip {
  position: absolute; z-index: 5;
  padding: 7px 12px; border-radius: 9px;
  background: rgba(23, 24, 28, .88);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-2);
  font-family: var(--mono); font-size: 12.5px; color: var(--text);
  max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.viewer-dims { left: 14px; bottom: 14px; }
.viewer-name { right: 14px; bottom: 14px; color: var(--muted); }

.viewer-offline {
  top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  max-width: 72%;
  color: #ffd166;
}
.viewer-offline .link { font-size: 12.5px; white-space: nowrap; }

.file-warn {
  padding: 10px 20px;
  background: rgba(255, 209, 102, .12);
  border-bottom: 1px solid rgba(255, 209, 102, .35);
  color: #ffd166;
  font-size: 13.5px;
  text-align: center;
}
.file-warn code { font-family: var(--mono); }

.viewer-loading {
  position: absolute; inset: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: rgba(13, 14, 16, .55);
  color: var(--muted); font-size: 14px;
}
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--border-2); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= панель ================= */

.panel { display: flex; flex-direction: column; gap: 16px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.card-title {
  margin: 0 0 14px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
.card-title .count { color: var(--accent-2); }

/* --- загрузка --- */

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  border: 1.5px dashed var(--border-2);
  border-radius: 12px;
  padding: 26px 18px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: rgba(255, 92, 26, .05); }
.dropzone:active { transform: scale(.995); }
.dropzone svg { width: 34px; height: 34px; color: var(--muted-2); margin-bottom: 10px; flex: none; }
.dz-title { margin: 0; font-weight: 600; }
.dz-sub { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.link { background: none; border: none; padding: 0; color: var(--accent-2); cursor: pointer; font-size: inherit; text-decoration: underline; }
.link:hover { color: var(--accent); }
.dz-hint { margin: 12px 0 0; font-size: 11.5px; color: var(--muted-2); letter-spacing: .02em; }

.upload-progress {
  margin-top: 12px; padding: 10px 14px;
  border-radius: var(--radius-s); font-size: 13px;
  background: rgba(77, 166, 255, .08); border: 1px solid rgba(77, 166, 255, .25);
  color: var(--info);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .55; } }

/* --- модели --- */

.models-list { display: flex; flex-direction: column; gap: 12px; }

.model {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.model.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(255, 92, 26, .08); }

.m-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-name { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-del {
  flex: none; width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid transparent; border-radius: 7px;
  color: var(--muted-2); cursor: pointer; font-size: 13px;
  transition: color .15s, border-color .15s, background .15s;
}
.m-del:hover { color: var(--err); border-color: rgba(255, 93, 93, .4); background: rgba(255, 93, 93, .08); }

.m-meta { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.m-meta .mono { color: var(--muted); }

.m-settings {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 12px;
}
.ms { display: flex; flex-direction: column; gap: 4px; }
.ms > span { font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; }

select, input[type="text"], input[type="tel"], input[type="email"], input[type="number"], textarea {
  width: 100%;
  background: #0e0f12;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-s);
  color: var(--text);
  font: inherit; font-size: 14px;
  padding: 8px 10px;
  transition: border-color .15s, box-shadow .15s;
}
select { cursor: pointer; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 92, 26, .15);
}
input[type="number"] { font-family: var(--mono); }

.m-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin-top: 12px;
}
.m-stats > div {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-s); padding: 8px 9px;
  display: flex; flex-direction: column; gap: 2px;
}
.m-stats span { font-size: 10.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; }
.m-stats b { font-family: var(--mono); font-size: 13.5px; font-weight: 600; white-space: nowrap; }

.m-warn {
  margin-top: 10px; padding: 7px 10px; font-size: 12px;
  border-radius: var(--radius-s);
  color: #ffd166; background: rgba(255, 209, 102, .08); border: 1px solid rgba(255, 209, 102, .25);
}
.m-warn.err {
  color: var(--err);
  background: rgba(255, 93, 93, .08);
  border-color: rgba(255, 93, 93, .35);
}

.order-block-note {
  margin: 10px 0 0; padding: 9px 12px; font-size: 12.5px;
  border-radius: var(--radius-s); text-align: center;
  color: var(--err);
  background: rgba(255, 93, 93, .08);
  border: 1px solid rgba(255, 93, 93, .35);
}

.m-foot { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-file { font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); }

/* --- кнопки --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-s);
  font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; transition: filter .15s, background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #140a03;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled:hover { filter: none; }

.btn-ghost {
  background: transparent; border-color: var(--border-2); color: var(--muted);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }

.btn-block { width: 100%; }

.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }

.btn-mini {
  padding: 5px 12px; font-size: 12.5px; font-weight: 600;
  background: transparent; border: 1px solid var(--border-2); border-radius: 8px;
  color: var(--muted); cursor: pointer;
}
.btn-mini:hover { border-color: var(--accent); color: var(--accent-2); }

/* --- итог --- */

.totals { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }

.t-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0; border-bottom: 1px dashed var(--border);
  font-size: 13.5px; color: var(--muted);
}
.t-row b { color: var(--text); font-family: var(--mono); font-weight: 600; }

.t-total {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 12px; font-size: 14px; color: var(--muted);
}
.t-total b { font-family: var(--mono); font-size: 26px; font-weight: 800; color: var(--accent-2); }
.t-total[data-min="1"] b::after { content: " *"; font-size: 14px; }

/* --- заказ --- */

.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { font-size: 12.5px; color: var(--muted); }
.field > span i { color: var(--accent-2); font-style: normal; }

.order-note { font-size: 12.5px; color: var(--muted-2); margin: 2px 0 14px; }

#order-card .btn { margin-top: 4px; }

.done-icon {
  width: 52px; height: 52px; margin: 4px auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(55, 214, 122, .12); border: 1px solid rgba(55, 214, 122, .4);
  color: var(--ok);
}
.done-icon svg { width: 26px; height: 26px; }
#order-done { text-align: center; }
#order-done h3 { margin: 0 0 6px; font-size: 18px; }
#order-done p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
#order-done b { color: var(--accent-2); font-family: var(--mono); }

/* ================= тосты ================= */

.toasts {
  position: fixed; bottom: 20px; right: 20px; z-index: 100;
  display: flex; flex-direction: column; gap: 10px; max-width: 360px;
}
.toast {
  padding: 12px 16px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--border-2);
  border-left: 3px solid var(--ok);
  font-size: 13.5px; color: var(--text);
  box-shadow: var(--shadow);
  animation: slideIn .25s ease-out;
  transition: opacity .4s, transform .4s;
}
.toast.err { border-left-color: var(--err); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } }

/* ================= футер ================= */

.foot {
  max-width: 1640px; margin: 0 auto; padding: 26px 20px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: var(--muted-2); font-size: 13px;
  border-top: 1px solid var(--border); margin-top: 8px;
}
.foot-note { font-size: 12px; }

/* ============================================================
   Админка
   ============================================================ */

.admin-body .layout { grid-template-columns: 1fr; max-width: 1280px; }

.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-nav .chip { padding: 8px 16px; }
.admin-nav .chip.active { border-color: var(--accent); color: var(--accent-2); background: rgba(255, 92, 26, .08); }

.a-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .a-grid { grid-template-columns: 1fr; } }

.a-section { margin-bottom: 22px; }
.a-section-title {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted-2);
  margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}

.a-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.a-row > span { font-size: 12.5px; color: var(--muted); }
.a-row .hint { font-size: 11.5px; color: var(--muted-2); }
.a-row input, .a-row textarea, .a-row select { max-width: 340px; }
.a-row textarea { font-family: var(--mono); font-size: 13px; }

.a-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

table.a-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.a-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted-2); font-weight: 700;
  padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.a-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.a-table tr:hover td { background: rgba(255, 255, 255, .015); }

.status-badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.status-new { background: rgba(255, 92, 26, .12); color: var(--accent-2); }
.status-progress { background: rgba(77, 166, 255, .12); color: var(--info); }
.status-done { background: rgba(55, 214, 122, .12); color: var(--ok); }
.status-cancel { background: rgba(255, 93, 93, .12); color: var(--err); }

/* --- личный кабинет --- */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.acc-model { display: flex; flex-direction: column; gap: 10px; }
.acc-model .m-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-model .m-foot { margin-top: auto; }
.order-account { margin: 10px 0 14px; font-size: 13.5px; color: var(--muted); }
.order-account a { font-weight: 700; }

/* --- фото результата --- */
.o-photos { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 12px; }
.o-photo { display: inline-flex; flex-direction: column; align-items: center; }
.o-photo img {
  width: 132px; height: 132px;
  max-width: 132px; max-height: 132px;
  object-fit: cover;
  border-radius: 10px; border: 1px solid var(--border-2); display: block;
  transition: border-color .15s, transform .15s;
}
.o-photo a:hover img { border-color: var(--accent); transform: scale(1.03); }
.o-upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.o-upload input[type=file] { width: auto; max-width: 280px; font-size: 12.5px; padding: 6px 8px; }

/* --- колокольчик уведомлений --- */
.bell { position: relative; }
.bell svg { width: 17px; height: 17px; }
.bell-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--err); color: #fff;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 700; font-family: var(--mono);
  border: 2px solid var(--bg);
  animation: bellpulse 1.6s ease-in-out infinite;
}
@keyframes bellpulse { 50% { transform: scale(1.15); } }

.dot-new {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 92, 26, .18);
  flex: none;
}

/* --- чат по заказу --- */
.chat {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-2);
  overflow: hidden;
}
.chat-body {
  max-height: 280px; overflow-y: auto;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.chat-empty { color: var(--muted-2); font-size: 12.5px; text-align: center; padding: 10px; }
.chat-msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  align-self: flex-start;
}
.chat-msg.me {
  align-self: flex-end;
  background: rgba(255, 92, 26, .10);
  border-color: rgba(255, 92, 26, .35);
}
.chat-head { font-size: 11px; color: var(--muted-2); margin-bottom: 3px; }
.chat-text { font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }
.chat-form {
  display: flex; gap: 8px; align-items: center;
  padding: 10px; border-top: 1px solid var(--border);
}
.chat-form input[type=text] { flex: 1; }
.chat-form .btn { flex: none; }

details.order-item { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); margin-bottom: 12px; }
details.order-item summary {
  cursor: pointer; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  list-style: none;
}
details.order-item summary::-webkit-details-marker { display: none; }
details.order-item summary .o-id { font-family: var(--mono); font-weight: 700; color: var(--accent-2); }
details.order-item summary .o-when { color: var(--muted-2); font-size: 12.5px; }
details.order-item summary .o-cust { color: var(--muted); }
details.order-item summary .o-total { margin-left: auto; font-family: var(--mono); font-weight: 700; }
details.order-item[open] { border-color: var(--accent); }

.o-body { padding: 0 16px 16px; border-top: 1px solid var(--border); }
.o-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 14px; }
@media (max-width: 800px) { .o-cols { grid-template-columns: 1fr; } }
.o-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); margin-bottom: 4px; }
.o-comment { white-space: pre-wrap; color: var(--muted); font-size: 13.5px; }

.o-item-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.o-item-row:last-child { border-bottom: none; }
.o-item-row .oi-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-item-row .oi-meta { color: var(--muted-2); font-size: 12px; white-space: nowrap; }
.o-item-row .oi-cost { margin-left: auto; font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.o-item-row a { font-size: 12px; white-space: nowrap; }

.login-wrap { max-width: 380px; margin: 12vh auto 0; padding: 0 20px; }
.login-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.login-card h1 { margin: 0 0 18px; font-size: 19px; }
.login-err { color: var(--err); font-size: 13px; margin: 0 0 12px; }

.alert {
  padding: 12px 16px; border-radius: var(--radius-s); margin-bottom: 16px;
  font-size: 13.5px;
}
.alert.ok { background: rgba(55, 214, 122, .1); border: 1px solid rgba(55, 214, 122, .3); color: var(--ok); }
.alert.err { background: rgba(255, 93, 93, .1); border: 1px solid rgba(255, 93, 93, .3); color: var(--err); }

/* ============================================================
   Адаптив
   ============================================================ */

@media (max-width: 1180px) {
  .layout { grid-template-columns: 1fr; }
  .stage { position: static; }
  .viewer { height: 55vh; min-height: 380px; }
  .top-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 560px) {
  .layout { padding: 12px; }
  .m-settings { grid-template-columns: 1fr 1fr; }
  .foot { flex-direction: column; align-items: flex-start; }
}
