@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url(/static/fonts/onest-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url(/static/fonts/onest-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 500; font-display: swap; src: url(/static/fonts/onest-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Onest"; font-weight: 500; font-display: swap; src: url(/static/fonts/onest-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 600; font-display: swap; src: url(/static/fonts/onest-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Onest"; font-weight: 600; font-display: swap; src: url(/static/fonts/onest-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 700; font-display: swap; src: url(/static/fonts/onest-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Onest"; font-weight: 700; font-display: swap; src: url(/static/fonts/onest-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

/* Orbynox — кабинет клиента.
   Палитра: «nox» (глубокий индиго ночного неба) + «orbit» (бирюза орбиты). Статусы доменов — свои цвета. */
:root {
  --nox: #161A36; --nox-2: #232850; --nox-3: #343A6B;
  --paper: #F1F3F8; --surface: #FFFFFF; --line: #DDE1EB; --line-2: #EBEEF4;
  --ink: #161A36; --muted: #5E6685; --faint: #8A91AB;
  --orbit: #0FA39A; --orbit-d: #0B8780; --orbit-l: #E3F5F3;
  --ok: #1F8F62; --signal: #C9800F; --danger: #C8443B;
  --r: 10px; --r-s: 6px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.55 var(--font); color: var(--ink); background: var(--paper); font-feature-settings: "tnum" 1; }
a { color: var(--orbit-d); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--orbit); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- верхняя панель ---------- */
.top { background: var(--nox); color: #fff; }
.top-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand .mark { color: #fff; }
.mainnav { display: flex; gap: 2px; flex: 1; }
.mainnav a { color: #C9CDE3; padding: 8px 12px; border-radius: var(--r-s); font-weight: 500; }
.mainnav a:hover { color: #fff; background: var(--nox-2); text-decoration: none; }
.mainnav a.on { color: #fff; box-shadow: inset 0 -2px 0 var(--orbit); border-radius: 0; }
.top-right { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.top-right a { color: #C9CDE3; } .top-right a:hover { color: #fff; }
.lang { display: inline-flex; border: 1px solid var(--nox-3); border-radius: var(--r-s); overflow: hidden; }
.lang a { padding: 4px 9px; font-size: 13px; font-weight: 600; color: #C9CDE3; }
.lang a.on { background: var(--nox-3); color: #fff; }
.lang a:hover { text-decoration: none; }
.burger { display: none; }

/* ---------- раскладка ---------- */
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 28px; padding-top: 28px; padding-bottom: 64px; align-items: start; }
.side { display: grid; gap: 16px; position: sticky; top: 16px; }
.main { min-width: 0; }
.head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.head h1 { font-size: 28px; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; margin: 0; }
.crumbs { font-size: 13px; color: var(--faint); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.head .tools { margin-left: auto; display: flex; gap: 8px; }

/* ---------- баланс: единственный «громкий» элемент ---------- */
.credit { position: relative; overflow: hidden; background: var(--nox); color: #fff; border-radius: var(--r); padding: 20px 20px 18px; }
.credit .ring { position: absolute; right: -54px; top: -40px; width: 190px; height: 190px; pointer-events: none; }
.credit-l { color: #AEB3D0; font-size: 13px; }
.credit-v { font-size: 30px; font-weight: 650; letter-spacing: -.02em; margin: 2px 0 14px; position: relative; }
.credit .btn { width: 100%; justify-content: center; position: relative; }

/* ---------- панели ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.panel > h2, .panel-h { display: flex; align-items: center; gap: 10px; margin: 0; padding: 16px 20px; font-size: 16px; font-weight: 600; border-bottom: 1px solid var(--line-2); }
.panel-h .more { margin-left: auto; font-size: 14px; font-weight: 500; }
.panel-b { padding: 18px 20px; }
.stack { display: grid; gap: 20px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* боковое меню-список с количеством */
.menu { list-style: none; margin: 0; padding: 6px; }
.menu a { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: var(--r-s); color: var(--ink); }
.menu a:hover { background: var(--paper); text-decoration: none; }
.menu a.on { background: var(--orbit-l); color: var(--orbit-d); font-weight: 600; }
.menu .n { color: var(--faint); font-size: 13px; }
.menu a.on .n { color: var(--orbit-d); }
.menu-t { padding: 12px 18px 4px; font-size: 13px; color: var(--faint); }

/* ---------- сводка доменов на главной ---------- */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip a { display: block; padding: 18px 20px 16px; color: var(--ink); border-right: 1px solid var(--line-2); border-top: 3px solid transparent; }
.strip a:last-child { border-right: 0; }
.strip a:hover { background: var(--paper); text-decoration: none; }
.strip .v { font-size: 30px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.strip .l { color: var(--muted); font-size: 14px; margin-top: 4px; }
.strip .s-active { border-top-color: var(--ok); }
.strip .s-expiring { border-top-color: var(--signal); }
.strip .s-expired { border-top-color: var(--danger); }
.strip .s-unpaid { border-top-color: var(--nox-3); }

/* ---------- формы и кнопки ---------- */
label { display: block; font-size: 14px; font-weight: 500; margin: 14px 0 6px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
input, textarea, select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: #fff; color: var(--ink); font: inherit; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--orbit); box-shadow: 0 0 0 3px var(--orbit-l); }
textarea { min-height: 180px; resize: vertical; line-height: 1.6; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: var(--r-s); padding: 10px 16px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--nox); color: #fff; white-space: nowrap; }
.btn:hover { background: var(--nox-2); text-decoration: none; }
.btn-orbit { background: var(--orbit); } .btn-orbit:hover { background: var(--orbit-d); }
.btn-line { background: #fff; color: var(--ink); border-color: var(--line); } .btn-line:hover { background: var(--paper); }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--line); } .btn-danger:hover { background: #FBEDEC; }
.btn-s { padding: 6px 11px; font-size: 13px; }
.btn-w { width: 100%; justify-content: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mt { margin-top: 16px; } .muted { color: var(--muted); } .small { font-size: 13px; } .right { margin-left: auto; }

/* ---------- таблицы ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-2); font-size: 14px; vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 13px; background: #FAFBFD; white-space: nowrap; }
th a { color: var(--muted); } th a.on { color: var(--ink); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FAFBFD; }
td.num, th.num { text-align: right; }
.dn { font-weight: 600; color: var(--ink); }
.dn:hover { color: var(--orbit-d); }
.cb { width: 36px; } .cb input { width: 16px; height: 16px; accent-color: var(--orbit); }
.yes { color: var(--ok); font-weight: 500; } .no { color: var(--faint); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }

/* статусы */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.chip.active::before, .chip.done::before, .chip.paid::before { background: var(--ok); }
.chip.expiring::before, .chip.awaiting_payment::before, .chip.pending::before, .chip.partial::before { background: var(--signal); }
.chip.expired::before, .chip.failed::before, .chip.cancelled::before { background: var(--danger); }
.chip.queued::before, .chip.processing::before, .chip.registering::before, .chip.ns_pending::before, .chip.hold::before, .chip.waiting_op::before { background: var(--orbit); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.busy { font-size: 12px; color: var(--orbit-d); margin-left: 6px; }

/* панель массовых действий */
.toolbar { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { width: auto; }
.bulk { position: sticky; bottom: 16px; margin-top: 16px; display: none; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--nox); color: #fff; border-radius: var(--r); padding: 12px 16px; box-shadow: 0 10px 30px rgba(22, 26, 54, .25); }
.bulk.show { display: flex; }
.bulk select, .bulk input { width: auto; background: var(--nox-2); color: #fff; border-color: var(--nox-3); }
.bulk input { min-width: 300px; }
.pager { display: flex; align-items: center; gap: 4px; padding: 12px 14px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.pager a, .pager span { min-width: 34px; padding: 5px 9px; border-radius: var(--r-s); text-align: center; font-size: 14px; color: var(--ink); }
.pager a:hover { background: var(--paper); text-decoration: none; }
.pager .cur { background: var(--nox); color: #fff; }

/* ---------- карточка домена ---------- */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.facts div { padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.facts dt { font-size: 13px; color: var(--muted); } .facts dd { margin: 2px 0 0; font-weight: 600; }
.note { padding: 12px 16px; border-radius: var(--r-s); background: var(--orbit-l); color: var(--orbit-d); font-size: 14px; }
.note.warn { background: #FCF3E3; color: #8A5A08; }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 18px; letter-spacing: .04em; padding: 12px 16px; background: var(--paper); border-radius: var(--r-s); display: inline-block; }

/* ---------- сообщения ---------- */
.flash { padding: 12px 16px; border-radius: var(--r-s); margin-bottom: 20px; font-weight: 500; border: 1px solid; }
.flash.ok { background: #E9F6F0; border-color: #C3E6D5; color: #155F43; }
.flash.err { background: #FBEDEC; border-color: #F1CDCA; color: #8E2B24; }
.demo { background: #FCF3E3; color: #8A5A08; text-align: center; padding: 6px; font-size: 13px; font-weight: 500; }

/* ---------- оплата ---------- */
.pay { display: grid; grid-template-columns: 196px 1fr; gap: 24px; align-items: start; }
.pay img { width: 196px; height: 196px; border-radius: var(--r-s); border: 1px solid var(--line); }
.amount { font-size: 34px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.copy { cursor: pointer; border-bottom: 1px dashed var(--faint); }
.copy:hover { color: var(--orbit-d); border-color: var(--orbit); }
.addr { word-break: break-all; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; }
.wait { display: flex; gap: 10px; align-items: center; color: var(--muted); margin-top: 14px; }
.wait i { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--orbit); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- вход ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: var(--nox); color: #fff; position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; }
.auth-art .brand { font-size: 22px; }
.auth-art .big-ring { position: absolute; width: 820px; height: 820px; right: -330px; top: 50%; transform: translateY(-58%); }
.auth-art h2 { font-size: 34px; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; max-width: 14em; margin: auto 0 12px; position: relative; }
.auth-art p { color: #AEB3D0; max-width: 30em; position: relative; margin: 0 0 24px; }
.auth-form { display: grid; place-items: center; padding: 32px; position: relative; }
.auth-form form { width: 100%; max-width: 360px; }
.auth-form h1 { font-size: 26px; font-weight: 650; margin: 0 0 4px; }
.auth-form .lang { position: absolute; top: 24px; right: 24px; border-color: var(--line); }
.auth-form .lang a { color: var(--muted); } .auth-form .lang a.on { background: var(--nox); color: #fff; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; padding-top: 20px; }
  .side { position: static; order: 2; }
  .main { order: 1; }
  .mainnav { display: none; } .mainnav.open { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--nox); padding: 8px 24px 16px; z-index: 10; }
  .burger { display: inline-flex; background: none; border: 1px solid var(--nox-3); color: #fff; border-radius: var(--r-s); padding: 6px 10px; cursor: pointer; }
  .top-in { position: relative; } .top-right .who { display: none; }
  .strip { grid-template-columns: 1fr 1fr; } .strip a:nth-child(2) { border-right: 0; }
  .cols, .facts { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; } .auth-art { min-height: 260px; }
  .pay { grid-template-columns: 1fr; }
  .hide-m { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
