@font-face { font-family: "Sarafan UI"; src: url("./sarafan-regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sarafan UI"; src: url("./sarafan-medium.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sarafan UI"; src: url("./sarafan-semibold.ttf") format("truetype"); font-weight: 750 900; font-display: swap; }

:root {
  --bg: #0a0a0b;
  --surface: #121214;
  --surface-2: #18181b;
  --line: #29292d;
  --line-soft: #202024;
  --text: #f7f7f8;
  --muted: #929299;
  --red: #ff303c;
  --red-dark: #ca1421;
  --green: #39d98a;
  --amber: #ffbe55;
  --radius: 22px;
  font-family: "Sarafan UI", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); text-rendering: optimizeLegibility; }
button, input, select { font: inherit; }
button { color: inherit; }
.app-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px; border-right: 1px solid var(--line-soft); background: #0d0d0f; display: flex; flex-direction: column; z-index: 30; }
.sidebar::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 3px; border-radius: 0 4px 4px 0; background: var(--red); }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 13px; padding: 0 9px 28px; }
.brand-mark { width: 45px; height: 45px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; background: var(--red); }
.brand-mark img { width: 34px; height: 34px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; letter-spacing: -.02em; }
.brand small { color: var(--muted); margin-top: 2px; font-size: 12px; }
.nav { display: grid; gap: 6px; }
.nav-item { appearance: none; border: 0; background: transparent; color: #a8a8ae; border-radius: 13px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; font-weight: 650; transition: .18s ease; }
.nav-item span { width: 24px; height: 24px; display: grid; place-items: center; font-size: 17px; color: #bdbdc2; }
.nav-item:hover { background: var(--surface); color: white; }
.nav-item.active { background: #211315; color: white; box-shadow: inset 3px 0 var(--red); }
.nav-item.active span { color: var(--red); }
.sidebar-foot { margin-top: auto; padding: 14px; border: 1px solid var(--line); border-radius: 15px; display: flex; align-items: center; gap: 10px; background: #111113; }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: 12px; }
.sidebar-foot small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.safe-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(57,217,138,.10); }

.main { min-width: 0; padding: 0 38px 54px; }
.topbar { min-height: 99px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line-soft); margin-bottom: 30px; }
.eyebrow { color: var(--muted); letter-spacing: .17em; font-weight: 800; font-size: 10px; margin: 0 0 6px; }
.topbar h1 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.top-actions, .sync-status { display: flex; align-items: center; gap: 13px; }
.sync-status { color: #b1b1b6; font-size: 12px; }
.sync-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.sync-status.ready i { background: var(--green); }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #3d3d42; background: #232326; font-size: 12px; font-weight: 800; cursor: default; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 22px; }
.page { display: none; }
.page.active { display: block; animation: enter .24s ease; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.auth-screen { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; overflow: hidden; background: #09090a; }
.auth-screen[hidden] { display: none; }
.auth-noise { position: absolute; inset: 0; background: linear-gradient(124deg, transparent 0 55%, rgba(255,48,60,.16) 55% 56%, transparent 56%), radial-gradient(circle at 72% 30%, rgba(255,48,60,.18), transparent 34%); }
.auth-noise::before, .auth-noise::after { content: ""; position: absolute; width: 340px; height: 340px; border: 36px solid rgba(255,48,60,.12); border-radius: 50%; }
.auth-noise::before { left: -160px; bottom: -180px; }
.auth-noise::after { right: -170px; top: -160px; }
.auth-card { position: relative; width: min(520px, 100%); padding: 42px; border: 1px solid #343438; border-radius: 30px; background: #121214; box-shadow: 14px 14px 0 #ff303c; }
.auth-logo { width: 78px; height: 78px; margin-bottom: 28px; border-radius: 22px; overflow: hidden; display: grid; place-items: center; background: var(--red); }
.auth-logo img { width: 58px; height: 58px; }
.auth-card h1 { margin: 18px 0 14px; font-size: clamp(42px, 8vw, 68px); line-height: .92; letter-spacing: -.055em; }
.auth-card h1 span { color: var(--red); }
.auth-card > p { color: #a2a2a8; max-width: 410px; line-height: 1.55; }
.telegram-login-slot { min-height: 52px; margin: 27px 0 18px; display: flex; align-items: center; }
.telegram-login-slot .login-placeholder { display: inline-flex; min-height: 48px; align-items: center; padding: 0 18px; border-radius: 14px; border: 1px solid #3b3b40; background: #1b1b1e; color: #b8b8bd; font-weight: 700; }
.telegram-login-slot .login-error { color: #ff9298; border-color: rgba(255,48,60,.45); }
.monitor-login-button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; padding: 0 20px; border-radius: 14px; background: var(--red); color: white; text-decoration: none; font-weight: 800; box-shadow: 4px 4px 0 #671018; }
.monitor-login-button:hover { background: #ff4651; }
.auth-foot { display: flex; align-items: center; gap: 8px; color: #727279; font-size: 11px; }
.auth-foot span { color: var(--red); }

.hero-card { min-height: 338px; border-radius: 30px; overflow: hidden; padding: 44px 48px; background: linear-gradient(126deg, #ff303c 0%, #e0182a 58%, #b80e1c 100%); position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); align-items: center; border: 1px solid rgba(255,255,255,.20); box-shadow: 8px 8px 0 #231214; }
.hero-card::before { content: ""; position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(90deg, transparent 30%, black); }
.hero-copy { position: relative; z-index: 2; max-width: 610px; }
.pill { display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,.45); background: rgba(0,0,0,.12); border-radius: 999px; padding: 8px 12px; font-size: 10px; font-weight: 850; letter-spacing: .13em; }
.hero-copy h2, .routing-banner h2 { margin: 17px 0 10px; font-size: clamp(38px, 4.6vw, 66px); line-height: .96; letter-spacing: -.055em; }
.hero-copy h2 span, .routing-banner h2 span { color: #1a0d0e; }
.hero-copy p { max-width: 530px; margin: 0; font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.83); }
.hero-actions { display: flex; gap: 10px; margin-top: 26px; }
.primary-action, .secondary-action, .protected-action { border-radius: 12px; border: 1px solid transparent; padding: 11px 15px; font-weight: 750; cursor: pointer; }
.primary-action { background: white; color: #171719; }
.secondary-action { color: white; background: rgba(12,12,13,.25); border-color: rgba(255,255,255,.28); }
.hero-visual { position: relative; min-height: 270px; display: grid; place-items: center; }
.hero-visual .hero-logo { position: relative; width: min(245px, 61%); z-index: 2; }
.orbit { position: absolute; border: 2px solid rgba(255,255,255,.24); border-radius: 50%; }
.orbit-a { width: 330px; height: 185px; transform: rotate(23deg); }
.orbit-b { width: 320px; height: 170px; transform: rotate(-29deg); }
.spark { position: absolute; z-index: 2; color: white; }
.spark-a { right: 10%; top: 12%; font-size: 24px; }
.spark-b { left: 8%; bottom: 8%; font-size: 14px; }
.network-card { position: absolute; right: 0; bottom: -4px; z-index: 4; width: 235px; min-height: 76px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.45); border-radius: 17px; background: #111113; display: flex; align-items: center; justify-content: space-between; gap: 14px; box-shadow: 5px 5px 0 rgba(30,8,11,.42); }
.network-card > div { display: grid; grid-template-columns: 9px 1fr; column-gap: 8px; }
.network-card strong, .network-card small { display: block; }
.network-card strong { font-size: 12px; }
.network-card small { color: #8b8b91; font-size: 9px; margin-top: 3px; grid-column: 2; }
.network-live { width: 8px; height: 8px; border-radius: 50%; margin-top: 3px; background: var(--green); }
.network-card b { font-size: 26px; text-align: right; line-height: .9; }
.network-card b small { font-size: 8px; font-weight: 600; margin-top: 6px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.stat-card { border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 19px; min-width: 0; display: flex; align-items: flex-start; gap: 13px; }
.stat-icon { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: #202024; color: white; font-weight: 850; }
.stat-icon.red { background: rgba(255,48,60,.13); color: var(--red); }
.stat-icon.green { background: rgba(57,217,138,.12); color: var(--green); }
.stat-card small, .stat-card em, .stat-card strong { display: block; min-width: 0; }
.stat-card small { color: #a1a1a7; font-size: 11px; margin: 1px 0 6px; }
.stat-card strong { font-size: 28px; letter-spacing: -.04em; }
.stat-card em { color: #77777e; font-size: 10px; font-style: normal; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loading { opacity: .62; }

.overview-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.panel { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.panel-head { padding: 22px 22px 17px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-head h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.status-chip { border-radius: 999px; padding: 7px 10px; font-size: 10px; font-weight: 800; }
.status-chip.online { color: var(--green); background: rgba(57,217,138,.10); border: 1px solid rgba(57,217,138,.17); }
.health-list { padding: 0 10px 10px; }
.health-list button { width: 100%; border: 0; border-top: 1px solid var(--line-soft); background: transparent; color: inherit; padding: 14px 10px; display: grid; grid-template-columns: 36px 1fr 12px; align-items: center; gap: 12px; text-align: left; cursor: pointer; }
.health-list button:hover { background: #161619; }
.health-icon { width: 32px; height: 32px; border-radius: 10px; background: #202024; display: grid; place-items: center; color: var(--red); font-weight: 900; }
.health-list strong, .health-list small { display: block; }
.health-list strong { font-size: 13px; }
.health-list small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.ok, .health-indicator { width: 8px; height: 8px; background: var(--green); border-radius: 50%; }
.health-indicator.pending { background: var(--amber); }
.health-indicator.offline { background: var(--red); }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px 14px; }
.action-grid button { min-height: 97px; text-align: left; border: 1px solid var(--line-soft); border-radius: 14px; background: #161619; padding: 14px; cursor: pointer; }
.action-grid button:hover { border-color: #3a3a40; transform: translateY(-1px); }
.action-grid span, .action-grid strong, .action-grid small { display: block; }
.action-grid span { color: var(--red); font-size: 20px; margin-bottom: 10px; }
.action-grid strong { font-size: 12px; }
.action-grid small { color: var(--muted); margin-top: 4px; font-size: 10px; }

.section-lead { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-lead p { margin: 0; color: #a5a5ab; line-height: 1.55; font-size: 13px; max-width: 700px; }
.protected-action { border-color: #39393e; color: #c9c9cd; background: #1a1a1d; white-space: nowrap; }
.protected-action:hover { border-color: var(--red); color: white; }
.protected-action.danger { color: #ff7f87; border-color: rgba(255,48,60,.24); }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
.search { flex: 1; height: 44px; border: 1px solid var(--line); border-radius: 13px; display: flex; align-items: center; gap: 8px; background: var(--surface); padding: 0 13px; }
.search span { color: var(--muted); font-size: 19px; }
.search input { width: 100%; background: transparent; border: 0; outline: 0; color: white; }
.toolbar select { min-width: 165px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: #d6d6d9; padding: 0 12px; }
.table-panel { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { color: #74747b; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--line); }
td { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); color: #d2d2d6; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:not(:has(.empty)):hover td { background: #151518; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-monogram { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #242428; color: var(--red); font-weight: 850; }
.user-cell strong, .user-cell small { display: block; }
.user-cell small { color: #77777e; margin-top: 3px; }
.table-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; background: #222225; }
.table-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #777; }
.table-status.active { color: var(--green); background: rgba(57,217,138,.08); }
.table-status.active::before { background: var(--green); }
.table-status.expired { color: var(--amber); background: rgba(255,190,85,.08); }
.table-status.expired::before { background: var(--amber); }
.table-status.blocked { color: var(--red); background: rgba(255,48,60,.08); }
.table-status.blocked::before { background: var(--red); }
.row-button { border: 1px solid #333338; background: #1c1c1f; border-radius: 9px; padding: 7px 9px; cursor: pointer; font-size: 11px; }
.empty { text-align: center; color: var(--muted); padding: 44px 20px; }
.mini-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mini-stat { min-width: 140px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.mini-stat small, .mini-stat strong { display: block; }
.mini-stat small { color: var(--muted); font-size: 10px; }
.mini-stat strong { margin-top: 6px; font-size: 21px; }

.nodes-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }
.node-card { padding: 18px; border: 1px solid var(--line); background: var(--surface); border-radius: 17px; }
.node-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flag-code { display: flex; align-items: center; gap: 10px; }
.country-code { width: 34px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #252529; font-size: 10px; font-weight: 850; }
.node-card h3 { font-size: 13px; margin: 15px 0 4px; }
.node-card p { color: var(--muted); margin: 0; font-size: 11px; }
.node-role { margin-top: 13px; border-top: 1px solid var(--line-soft); padding-top: 12px; display: flex; align-items: center; justify-content: space-between; color: #b5b5ba; font-size: 10px; }

.routing-banner { border-radius: 25px; padding: 34px 40px; margin-bottom: 17px; background: linear-gradient(120deg, #d71523, #a60c17); display: flex; align-items: center; justify-content: space-between; overflow: hidden; }
.routing-banner h2 { font-size: clamp(34px, 4.2vw, 58px); }
.routing-banner p { color: rgba(255,255,255,.78); max-width: 560px; }
.routing-banner img { width: 190px; margin-right: 4%; opacity: .96; }
.route-panel { padding-bottom: 22px; }
.route-flow { padding: 10px 22px 22px; display: grid; grid-template-columns: repeat(7, auto); align-items: center; gap: 9px; }
.route-step { min-width: 140px; padding: 17px; border-radius: 15px; border: 1px solid var(--line); background: #17171a; }
.route-step .number { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--red); font-size: 10px; font-weight: 850; margin-bottom: 25px; }
.route-step strong, .route-step small { display: block; }
.route-step strong { font-size: 12px; }
.route-step small { font-size: 9px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.route-arrow { color: var(--red); font-size: 24px; text-align: center; }
.route-note { margin: 0 22px; border-top: 1px solid var(--line-soft); padding-top: 18px; display: flex; align-items: center; gap: 12px; }
.route-note > span { width: 30px; height: 30px; border-radius: 50%; background: #232327; display: grid; place-items: center; color: var(--red); font-weight: 850; }
.route-note strong, .route-note small { display: block; }
.route-note strong { font-size: 11px; }
.route-note small { margin-top: 4px; color: var(--muted); font-size: 10px; }

.promo-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.promo-card { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 18px; }
.promo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.promo-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; font-size: 17px; }
.promo-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 17px; }
.promo-meta div { background: #18181b; border: 1px solid var(--line-soft); border-radius: 11px; padding: 11px; }
.promo-meta small, .promo-meta strong { display: block; }
.promo-meta small { color: var(--muted); font-size: 9px; }
.promo-meta strong { font-size: 13px; margin-top: 5px; }
.timeline { padding: 10px 22px; }
.log-item { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.log-item:last-child { border-bottom: 0; }
.log-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--red); background: rgba(255,48,60,.09); }
.log-item strong, .log-item small { display: block; }
.log-item strong { font-size: 12px; }
.log-item small { color: var(--muted); margin-top: 4px; font-size: 10px; }
.log-time { color: #77777e; font-size: 10px; }
.readonly-badge { color: var(--amber); border: 1px solid rgba(255,190,85,.24); padding: 7px 10px; border-radius: 999px; font-size: 9px; font-weight: 850; }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.65); opacity: 0; visibility: hidden; transition: .2s; z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100vw); background: #111113; border-left: 1px solid var(--line); padding: 30px; transform: translateX(100%); transition: .25s ease; z-index: 70; overflow-y: auto; }
.drawer.open { transform: translateX(0); }
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer-close { position: absolute; right: 22px; top: 20px; border: 0; background: transparent; color: #aaa; font-size: 27px; cursor: pointer; }
.drawer h2 { font-size: 29px; margin: 8px 0 3px; }
.drawer h3 { font-size: 13px; margin: 25px 0 11px; }
.muted { color: var(--muted); }
.drawer-status { margin: 20px 0; }
.details { margin: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.details div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 14px; border-bottom: 1px solid var(--line-soft); }
.details div:last-child { border-bottom: 0; }
.details dt { color: var(--muted); font-size: 11px; }
.details dd { margin: 0; font-size: 11px; font-weight: 700; text-align: right; }
.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drawer-actions button { white-space: normal; min-height: 54px; }
.protection-note { color: #86868c; font-size: 10px; line-height: 1.5; margin-top: 18px; padding: 13px; background: #18181a; border-radius: 12px; }
.protection-note span { color: var(--red); }
.toast { position: fixed; right: 24px; bottom: 24px; width: min(360px, calc(100vw - 48px)); border: 1px solid #3a3a3f; background: #18181b; border-radius: 15px; padding: 14px; display: flex; align-items: center; gap: 12px; transform: translateY(150%); transition: .25s; z-index: 100; box-shadow: 0 18px 60px rgba(0,0,0,.45); }
.toast.show { transform: none; }
.toast > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,48,60,.1); color: var(--red); }
.toast strong, .toast small { display: block; }
.toast strong { font-size: 11px; }
.toast small { color: var(--muted); font-size: 9px; margin-top: 4px; }

.confirm-backdrop { position: fixed; inset: 0; z-index: 78; background: rgba(0,0,0,.72); opacity: 0; visibility: hidden; transition: .2s; }
.confirm-backdrop.open { opacity: 1; visibility: visible; }
.confirm-modal { position: fixed; left: 50%; top: 50%; z-index: 80; width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; transform: translate(-50%, -46%) scale(.97); padding: 30px; border: 1px solid #3a3a3f; border-radius: 24px; background: #141416; opacity: 0; visibility: hidden; transition: .2s; box-shadow: 8px 8px 0 #2b1518; }
.confirm-modal[hidden] { display: block; }
.confirm-modal.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.confirm-close { position: absolute; right: 18px; top: 14px; border: 0; background: transparent; color: #8f8f95; font-size: 26px; cursor: pointer; }
.confirm-mark { width: 48px; height: 48px; margin-bottom: 22px; display: grid; place-items: center; border-radius: 15px; background: var(--red); font-size: 22px; }
.confirm-modal h2 { margin: 7px 0 10px; font-size: 28px; letter-spacing: -.035em; }
.confirm-modal > p:not(.eyebrow) { color: #9b9ba1; line-height: 1.5; }
.confirm-target { margin: 18px 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #1b1b1e; color: #d6d6d9; font-size: 12px; }
.operation-form { display: grid; gap: 12px; margin-bottom: 14px; }
.operation-form[hidden], .operation-summary:empty, .operation-note[hidden] { display: none; }
.operation-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: #d6d6da; font-size: 12px; font-weight: 750; }
.operation-label small { color: #77777e; font-size: 9px; font-weight: 500; }
.preset-grid, .device-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.preset-button, .device-button { min-height: 40px; border: 1px solid #343439; border-radius: 11px; color: #c7c7cb; background: #1b1b1e; cursor: pointer; font-size: 11px; font-weight: 750; }
.preset-button:hover, .device-button:hover { border-color: #5b5b62; }
.preset-button.active, .device-button.active { color: white; border-color: var(--red); background: #39171b; box-shadow: inset 0 -2px var(--red); }
.custom-days { display: flex; align-items: center; gap: 10px; }
.custom-days input, .operation-note input { width: 100%; min-height: 42px; border: 1px solid #343439; border-radius: 11px; outline: none; background: #1b1b1e; color: white; padding: 0 12px; }
.custom-days input:focus, .operation-note input:focus { border-color: var(--red); }
.custom-days span { color: #7e7e84; font-size: 11px; }
.operation-warning { display: flex; gap: 10px; padding: 13px; border: 1px solid rgba(255,190,85,.22); border-radius: 12px; background: rgba(255,190,85,.06); color: #c7aa7c; font-size: 11px; line-height: 1.45; }
.operation-warning b { color: var(--amber); }
.operation-summary { margin: 14px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #101012; }
.summary-row { display: grid; grid-template-columns: 1fr 1fr 22px 1fr; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line-soft); }
.summary-row:last-child { border-bottom: 0; }
.summary-row small { color: #77777e; font-size: 9px; }
.summary-row span { color: #a2a2a8; font-size: 10px; }
.summary-row i { color: var(--red); font-style: normal; text-align: center; }
.summary-row strong { color: white; font-size: 10px; text-align: right; }
.operation-note { display: grid; gap: 7px; margin: 14px 0 18px; color: #babac0; font-size: 10px; font-weight: 700; }
.operation-note span { display: flex; justify-content: space-between; }
.operation-note small { color: #6f6f76; font-weight: 500; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.confirm-actions button:disabled { opacity: .48; cursor: not-allowed; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 210px minmax(0,1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .nodes-grid, .promo-grid { grid-template-columns: 1fr 1fr; }
  .route-flow { grid-template-columns: 1fr; }
  .route-arrow { transform: rotate(90deg); }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; transform: translateX(-100%); transition: .22s; width: 260px; }
  .sidebar.open { transform: none; }
  .main { padding: 0 18px 40px; }
  .mobile-menu { display: block; }
  .topbar { justify-content: flex-start; }
  .top-actions { margin-left: auto; }
  .sync-status span { display: none; }
  .hero-card { grid-template-columns: 1fr; padding: 34px 28px; }
  .hero-visual { display: none; }
  .overview-grid { grid-template-columns: 1fr; }
  .routing-banner img { display: none; }
}
@media (max-width: 560px) {
  .main { padding-inline: 13px; }
  .topbar { min-height: 83px; margin-bottom: 20px; }
  .topbar .eyebrow { display: none; }
  .topbar h1 { font-size: 20px; }
  .hero-card { min-height: 0; padding: 28px 21px; border-radius: 21px; }
  .confirm-modal { padding: 24px 19px; }
  .preset-grid { grid-template-columns: repeat(3, 1fr); }
  .device-grid { grid-template-columns: repeat(5, 1fr); }
  .summary-row { grid-template-columns: 1fr 1fr 16px 1fr; }
  .hero-copy h2 { font-size: 39px; }
  .hero-actions { flex-direction: column; }
  .stats-grid, .nodes-grid, .promo-grid { grid-template-columns: 1fr; }
  .section-lead { align-items: flex-start; flex-direction: column; }
  .toolbar { flex-direction: column; }
  .toolbar select { height: 44px; }
  .routing-banner { padding: 27px 23px; }
  .routing-banner h2 { font-size: 38px; }
  .action-grid { grid-template-columns: 1fr; }
  .drawer { padding: 26px 18px; }
  .auth-card { padding: 29px 23px; border-radius: 23px; box-shadow: 7px 7px 0 #ff303c; }
}
