/* ============ U7 VPN · Panel design system ============ */
:root {
  --bg: #070b14;
  --bg-2: #0a1120;
  --surface: rgba(17, 25, 43, .72);
  --surface-solid: #111a2c;
  --surface-2: #16213a;
  --surface-3: #1c2945;
  --line: rgba(148, 178, 255, .10);
  --line-2: rgba(148, 178, 255, .18);
  --text: #eef3ff;
  --text-2: #c3cde3;
  --muted: #8592ae;
  --accent: #4f8cff;
  --accent-2: #22d3ee;
  --grad: linear-gradient(135deg, #5b8cff 0%, #22c8ee 100%);
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 50px -20px rgba(0,0,0,.6);
  --font: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  font: 500 14.5px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(79, 140, 255, .16), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(34, 211, 238, .08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
::selection { background: rgba(79, 140, 255, .35); }
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .35; cursor: not-allowed; }
a { color: inherit; }
h1, h2, h3 { letter-spacing: -.02em; }
.muted { color: var(--muted); }
.eyebrow {
  margin: 0 0 6px; color: var(--accent-2); font-size: 11.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(148,178,255,.16); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(148,178,255,.28); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Forms ---------- */
label { display: grid; gap: 7px; color: var(--text-2); font-size: 13px; font-weight: 600; }
label small { font-size: 12px; font-weight: 500; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, .55); color: var(--text); padding: 11px 13px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #5e6a85; }
input:hover, select:hover, textarea:hover { border-color: rgba(148,178,255,.28); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); background: rgba(7, 11, 20, .8);
  box-shadow: 0 0 0 4px rgba(79, 140, 255, .16);
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238592ae' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
select option { background: #111a2c; color: var(--text); }
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 18px !important; height: 18px; min-width: 18px; padding: 0;
  border: 1.5px solid rgba(148,178,255,.35); border-radius: 6px; background: rgba(7,11,20,.6);
  display: inline-grid; place-content: center; cursor: pointer; transition: .15s;
}
input[type="checkbox"]::after {
  content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .12s;
}
input[type="checkbox"]:checked { background: var(--grad); border-color: transparent; }
input[type="checkbox"]:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
input[type="file"] { padding: 9px; }
input[type="file"]::file-selector-button {
  margin-right: 12px; border: 1px solid var(--line-2); border-radius: 9px; padding: 7px 12px;
  background: var(--surface-2); color: var(--text); font-weight: 600; cursor: pointer;
}
input[type="datetime-local"] { color-scheme: dark; }
textarea { min-height: 170px; resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: auto; }

/* ---------- Buttons ---------- */
.primary, .ghost, .danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: var(--radius-sm); font-weight: 700; font-size: 13.5px; line-height: 1.2;
  padding: 10px 15px; text-decoration: none; white-space: nowrap;
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s, color .15s, filter .15s;
}
.primary {
  border: 0; color: #fff; background: var(--grad);
  box-shadow: 0 8px 22px -8px rgba(59, 130, 246, .7), inset 0 1px 0 rgba(255,255,255,.25);
  padding: 11px 18px;
}
.primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(59,130,246,.8), inset 0 1px 0 rgba(255,255,255,.25); }
.primary:active { transform: translateY(0); }
.ghost { border: 1px solid var(--line-2); background: rgba(148,178,255,.06); color: var(--text-2); }
.ghost:hover { color: var(--text); border-color: rgba(148,178,255,.32); background: rgba(148,178,255,.11); }
.danger { border: 1px solid rgba(248,113,113,.3); background: rgba(248,113,113,.08); color: #fca5a5; }
.danger:hover { background: rgba(248,113,113,.16); border-color: rgba(248,113,113,.5); color: #fecaca; }
.danger-soft { color: #fca5a5 !important; border-color: rgba(248,113,113,.28) !important; background: rgba(248,113,113,.06) !important; }
.danger-soft:hover { background: rgba(248,113,113,.14) !important; }
.compact { padding: 7px 11px; font-size: 12.5px; }
.icon-btn { padding: 5px 0; min-width: 30px; font-size: 13px; }
.mini-action { width: 38px; min-width: 38px; padding: 9px 0 !important; }
.error { min-height: 20px; margin: 10px 0 0; color: var(--danger); font-size: 13px; }

/* ---------- Login ---------- */
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(420px, 100%); padding: 38px 34px 30px; border-radius: 26px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(22, 33, 58, .85), rgba(13, 20, 36, .9));
  backdrop-filter: blur(20px); box-shadow: 0 40px 120px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02) inset;
  position: relative; overflow: hidden;
}
.login-card::before {
  content: ""; position: absolute; inset: -1px -1px auto; height: 3px; background: var(--grad);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; font-weight: 800; font-size: 17px; }
.login-brand img { width: 46px; height: 46px; border-radius: 14px; box-shadow: 0 10px 30px -8px rgba(79,140,255,.6); }
.login-card h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; }
.login-card .muted { margin: 0 0 8px; }
.login-card label { margin: 16px 0 0; }
.login-card .primary { width: 100%; margin-top: 22px; padding: 13px; font-size: 15px; }

/* ---------- Layout ---------- */
.app { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
aside {
  position: sticky; top: 0; height: 100vh; padding: 22px 14px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 18, 32, .9), rgba(8, 12, 22, .92));
  backdrop-filter: blur(18px);
  display: flex; flex-direction: column; z-index: 20;
}
.aside-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
.aside-brand span {
  width: 42px; height: 42px; border-radius: 13px; overflow: hidden; flex: none;
  box-shadow: 0 10px 26px -8px rgba(79, 140, 255, .7), 0 0 0 1px rgba(255,255,255,.08);
}
.aside-brand span img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aside-brand b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.aside-brand small { display: block; color: var(--muted); font-size: 12px; }
.nav-caption { margin: 6px 10px 8px; color: #56627d; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
nav { display: grid; gap: 3px; }
.nav, .logout {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 0; background: transparent; color: var(--muted);
  padding: 10px 12px; text-align: left; border-radius: 11px; font-weight: 600; font-size: 14px;
  position: relative; transition: background .15s, color .15s;
}
.nav svg, .logout svg {
  width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.nav:hover { color: var(--text); background: rgba(148,178,255,.06); }
.nav.active { color: #fff; background: linear-gradient(90deg, rgba(79,140,255,.20), rgba(79,140,255,.06)); }
.nav.active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad);
}
.nav.active svg { color: #7fb2ff; }
.logout { margin-top: auto; color: #e79a9a; }
.logout:hover { background: rgba(248,113,113,.08); color: #fca5a5; }

main { padding: 30px 40px 80px; max-width: 1400px; width: 100%; min-width: 0; }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 26px; }
header h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.online {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1px solid rgba(52, 211, 153, .25); border-radius: 999px;
  background: rgba(52, 211, 153, .07); color: #a7f3d0; font-size: 12.5px; font-weight: 600;
}
.online i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2s infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.view { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Cards ---------- */
.panel, .stats article {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 24px; margin-bottom: 18px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel h2 { margin: 0; font-size: 20px; font-weight: 800; }
.panel h3 { margin: 0; font-size: 17px; font-weight: 700; }
.panel-head .muted { margin: 6px 0 0; }
.preview-label { margin: 0 0 12px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.hint { margin: 0 0 14px; color: var(--muted); font-size: 13px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stats article { padding: 20px 22px; position: relative; overflow: hidden; }
.stats article::after {
  content: ""; position: absolute; width: 160px; height: 160px; right: -60px; top: -70px; border-radius: 50%;
  background: radial-gradient(circle, rgba(79,140,255,.18), transparent 70%); pointer-events: none;
}
.stat-ico {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 12px;
  background: rgba(79,140,255,.14); color: #8fb8ff;
}
.stat-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat-b .stat-ico { background: rgba(34,211,238,.13); color: #67e8f9; }
.stat-b::after { background: radial-gradient(circle, rgba(34,211,238,.16), transparent 70%) !important; }
.stat-c .stat-ico { background: rgba(167,139,250,.14); color: #c4b5fd; }
.stat-c::after { background: radial-gradient(circle, rgba(167,139,250,.16), transparent 70%) !important; }
.stats span, .stats small { display: block; color: var(--muted); }
.stats span { font-size: 13px; font-weight: 600; }
.stats small { font-size: 12.5px; }
.stats strong { display: block; font-size: 32px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 2px; line-height: 1.15; }
.reserve-stat { border-color: rgba(251,191,36,.18) !important; }
.reserve-stat .stat-ico { background: rgba(251,191,36,.13); color: #fcd34d; }
.reserve-stat::after { background: radial-gradient(circle, rgba(251,191,36,.16), transparent 70%) !important; }
.reserve-stat strong, .ref-balance, .ref-card b { color: #fcd34d; }

.studio { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 22px; align-items: start; }
.howto { margin: 0; padding: 0; list-style: none; counter-reset: s; color: var(--text-2); display: grid; gap: 10px; }
.howto li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 13px; background: rgba(148,178,255,.04); border: 1px solid var(--line); }
.howto li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--grad); color: #fff; font-weight: 800; font-size: 13px; }
.howto code { color: #9fd0ff; }

/* ---------- Generic lists ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: end; }
.form-grid .wide { grid-column: 1 / -1; }
.stack { display: grid; gap: 16px; }
.row-actions, .card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mini-list { display: grid; gap: 10px; }
.mini-row, .sub-card { border: 1px solid var(--line); border-radius: 14px; background: rgba(7,11,20,.4); }
.mini-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.check-grid label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7,11,20,.4); }
.check-grid input { width: auto; }
.sub-list { display: grid; gap: 12px; margin-top: 8px; }
.sub-card { padding: 18px; }
.sub-card h3 { margin: 0 0 6px; }
.sub-url { display: flex; gap: 8px; margin: 12px 0; }
.sub-url input { flex: 1; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; min-height: 23px; padding: 0 9px; border-radius: 999px;
  background: rgba(52, 211, 153, .12); color: #6ee7b7; font-size: 11px; font-weight: 700; letter-spacing: .03em;
  border: 1px solid rgba(52,211,153,.22);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.off { background: rgba(248, 113, 113, .1); color: #fca5a5; border-color: rgba(248,113,113,.22); }
.badge.buy { background: rgba(79,140,255,.12); color: #93c5fd; border-color: rgba(79,140,255,.26); }
.badge.gift { background: rgba(251,191,36,.1); color: #fcd34d; border-color: rgba(251,191,36,.24); }

/* ---------- Tables ---------- */
.table-panel { overflow: hidden; }
.search {
  width: min(340px, 100%); padding-left: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238592ae' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5.2'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 13px center;
}
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 860px; }
.data-table th, .data-table td { padding: 14px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td small { display: block; color: var(--muted); margin-top: 3px; font-size: 12px; }
.data-table code { color: #93c5fd; font-family: var(--mono); font-size: 12.5px; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: rgba(148,178,255,.04); }

/* Users */
.users-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.users-toolbar h2 { font-size: 22px; }
.users-toolbar .muted { margin: 6px 0 0; }
.toolbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.user-filter { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 13px; background: rgba(7,11,20,.5); border: 1px solid var(--line); }
.user-filter-btn { border: 0; background: transparent; color: var(--muted); border-radius: 9px; padding: 7px 12px; font-size: 12.5px; font-weight: 700; transition: .15s; }
.user-filter-btn:hover { color: var(--text); background: rgba(148,178,255,.07); }
.user-filter-btn.active { color: #fff; background: var(--grad); box-shadow: 0 6px 16px -6px rgba(59,130,246,.7); }
.users-studio { align-items: start; }
.user-table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(14px); box-shadow: var(--shadow); max-height: calc(100vh - 290px); }
.user-table th { background: #0f1729; position: sticky; top: 0; z-index: 1; }
.user-table td { vertical-align: middle; }
.user-row { cursor: pointer; }
.user-cell { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.user-cell b { font-weight: 700; }
.avatar {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px;
  background: var(--grad); color: white; font-weight: 800; font-size: 13px; letter-spacing: .02em;
  box-shadow: 0 6px 16px -6px rgba(59,130,246,.6);
}
.copy-line { margin-top: 3px; }
.copy-inline { display: block; max-width: 220px; padding: 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.copy-inline:hover { color: #93c5fd; }
.mini-progress { width: 110px; height: 5px; margin-top: 8px; border-radius: 9px; background: rgba(148,178,255,.12); overflow: hidden; }
.mini-progress i { display: block; height: 100%; background: var(--grad); border-radius: 9px; }
.row-menu { display: flex; gap: 6px; justify-content: flex-end; }
.tg-link { color: #93c5fd; text-decoration: none; font-weight: 700; }
.tg-link:hover { color: #bfdbfe; }
.ref-balance { font-weight: 800; }

/* User editor (modal) */
.user-editor {
  position: fixed; z-index: 60; inset: 4vh max(3vw, 16px); max-width: 1000px; max-height: 92vh; overflow: auto; margin: auto;
  padding: 26px; border: 1px solid var(--line-2); border-radius: 22px;
  background: linear-gradient(180deg, #131d33, #0d1526);
  box-shadow: 0 0 0 100vmax rgba(3, 6, 12, .72), 0 40px 120px -20px rgba(0,0,0,.9);
}
.user-editor::before { content: "Подписка"; display: block; margin-bottom: 4px; color: var(--text); font-size: 22px; font-weight: 800; }
.identity, .issue-flags { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.identity .wide { grid-column: 1 / -1; }
.issue-form { min-width: 0; }
.expiry-control { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7,11,20,.4); }
.expiry-control input { font-size: 15px; }
.expiry-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.expiry-actions button { flex: 1 1 90px; }
.slug-row { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: rgba(7,11,20,.55); overflow: hidden; }
.slug-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79,140,255,.16); }
.slug-row span { padding: 11px 0 11px 13px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.slug-row input { border: 0; box-shadow: none !important; background: transparent !important; padding-left: 0; }
.user-group-select { width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7,11,20,.4); }
.user-group-select > small { display: block; margin-bottom: 10px; color: var(--muted); }
.pretty-url { display: flex; flex-wrap: wrap; align-items: baseline; margin: 12px 0; padding: 12px 14px; border-radius: 12px; cursor: pointer; background: rgba(7,11,20,.5); border: 1px solid var(--line-2); font-size: 13px; }
.pretty-url span { color: var(--muted); }
.pretty-url b { color: #93c5fd; font-size: 15px; }

/* Detail drawer */
.drawer { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; }
.drawer-backdrop { position: absolute; inset: 0; border: 0; background: rgba(3, 6, 12, .66); backdrop-filter: blur(4px); cursor: default; }
.detail-panel {
  position: relative; width: min(620px, 100vw); height: 100%; overflow: auto; padding: 28px;
  background: linear-gradient(180deg, #111a2e, #0b1222); border-left: 1px solid var(--line-2);
  box-shadow: -30px 0 90px rgba(0,0,0,.6); animation: slidein .25s ease;
}
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.detail-head, .detail-status, .detail-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.detail-head { align-items: flex-start; }
.detail-head h2 { margin: 0; font-size: 26px; font-weight: 800; }
.detail-head .muted { margin: 4px 0 0; }
.detail-status { margin: 20px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7,11,20,.45); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-grid article { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(148,178,255,.04); }
.detail-grid span, .detail-grid b { display: block; }
.detail-grid span { color: var(--muted); font-size: 12px; font-weight: 600; }
.detail-grid b { margin-top: 5px; }
.identity-copy { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.qr-box {
  display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 18px; align-items: center; margin: 18px 0; padding: 16px;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(7,11,20,.45); color: var(--text);
}
.qr-box img { width: 150px; height: 150px; border-radius: 12px; background: #fff; padding: 8px; }
.qr-box h3 { margin: 0 0 8px; }
.qr-box code { display: block; overflow-wrap: anywhere; color: #93c5fd; margin-bottom: 12px; font-family: var(--mono); font-size: 12.5px; }
.detail-section { margin: 22px 0; }
.detail-section h3 { margin: 0 0 10px; font-size: 16px; }
.device-card { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 13px 15px; margin: 8px 0; border: 1px solid var(--line); border-radius: 13px; background: rgba(148,178,255,.04); }
.device-card small { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; }
.device-card code { color: #c4b5fd; font-family: var(--mono); font-size: 12.5px; }
.quick-group-setting { display: grid; grid-template-columns: 1fr minmax(200px, 1fr); gap: 14px; align-items: center; padding: 16px; border: 1px solid rgba(79,140,255,.22); border-radius: 16px; background: rgba(79,140,255,.07); }
.quick-group-setting small { display: block; margin-top: 4px; color: var(--muted); }
.quick-group-setting select { width: 100%; }

/* ---------- Groups / folders / nodes ---------- */
.group-manager { margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.group-manager > summary { cursor: pointer; list-style: none; padding: 16px 20px; color: var(--text); font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.group-manager > summary::-webkit-details-marker { display: none; }
.group-manager > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.group-manager[open] > summary::after { transform: rotate(-135deg); }
.group-manager > summary:hover { background: rgba(148,178,255,.04); }
.group-manager-body { padding: 4px 20px 20px; border-top: 1px solid var(--line); }
.group-manager-body .panel-head { margin-top: 16px; }
#group-list { margin-top: 16px; }
.group-editor { display: grid; grid-template-columns: minmax(140px,1fr) minmax(140px,1fr) auto auto auto auto auto; gap: 8px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7,11,20,.4); }
.group-pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.group-chip { padding: 7px 11px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(7,11,20,.45); white-space: nowrap; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.group-chip.is-default { border-color: rgba(79,140,255,.45); background: rgba(79,140,255,.1); }

.group-shell { margin-top: 18px; }
.group-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; }
.group-tab {
  min-width: 190px; padding: 14px 16px; text-align: left; border-radius: 15px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); transition: .15s;
}
.group-tab:hover { border-color: var(--line-2); color: var(--text); }
.group-tab.active { border-color: rgba(79,140,255,.55); background: linear-gradient(145deg, rgba(79,140,255,.18), rgba(34,211,238,.06)); color: #fff; box-shadow: 0 10px 30px -14px rgba(79,140,255,.8); }
.group-tab strong, .group-tab small { display: block; }
.group-tab strong { font-size: 17px; font-weight: 800; margin: 4px 0 2px; }
.group-tab small { color: var(--muted); font-size: 12px; }
.group-tab .group-mark { font-size: 10.5px; color: var(--accent-2); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.group-workspace { border-radius: 20px; }

.folder-shell { margin-top: 24px; }
.folder-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; margin-bottom: 12px; border-radius: 13px; background: rgba(7,11,20,.5); border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.folder-tab { padding: 8px 14px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); white-space: nowrap; font-weight: 700; font-size: 13px; transition: .15s; }
.folder-tab:hover { color: var(--text); background: rgba(148,178,255,.07); }
.folder-tab.active { color: #fff; background: var(--surface-3); box-shadow: 0 0 0 1px rgba(79,140,255,.4) inset; }
.folder-pane { padding: 0; }
.folder-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.6fr); gap: 12px; margin-bottom: 14px; }
.folder-create, .folder-current-tools { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7,11,20,.4); }
.folder-create input, .folder-current-tools input { min-width: 120px; flex: 1; }
.manage-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; white-space: nowrap; padding-left: 6px; }
.folder-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; margin: 18px 0 10px; border-radius: 12px; background: linear-gradient(90deg, rgba(79,140,255,.12), transparent); border-left: 3px solid var(--accent); }
.folder-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0 8px; padding: 14px 16px; border: 1px solid rgba(248,113,113,.22); border-radius: 14px; background: rgba(248,113,113,.05); }
.folder-danger-zone b { display: block; color: #fecaca; }
.folder-danger-zone small { display: block; margin-top: 3px; color: #c49a9a; }

#import-form .row-actions { padding-top: 4px; }
#import-count { padding: 0 6px; font-size: 13px; }
#delete-all-nodes { margin-left: auto; }

.node-list { display: grid; gap: 8px; }
.node-row {
  display: grid; grid-template-columns: 96px 38px minmax(180px, 1fr) 150px 170px minmax(160px, auto) auto; gap: 12px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(148,178,255,.03); transition: border-color .15s, background .15s;
}
.node-row:hover { border-color: var(--line-2); background: rgba(148,178,255,.06); }
.node-row.is-off { opacity: .5; }
.node-row select { padding-top: 9px; padding-bottom: 9px; font-size: 13px; }
.node-order { display: flex; align-items: center; gap: 4px; }
.node-order b { min-width: 22px; text-align: center; color: var(--muted); font-size: 12.5px; }
.node-flag { font-size: 24px; text-align: center; }
.node-main { min-width: 0; }
.node-name { margin-bottom: 3px; padding: 7px 10px; font-weight: 700; background: transparent; border-color: transparent; }
.node-name:hover { border-color: var(--line-2); }
.node-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 10px; font-size: 12px; }
.node-group-pills { min-width: 0; }

/* ---------- Happ preview card ---------- */
.happ-card {
  width: min(420px, 100%); background: #fff; color: #1c1c1e; border-radius: 26px; padding: 16px 18px 10px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.8), 0 0 0 8px rgba(148,178,255,.06), 0 0 0 1px rgba(255,255,255,.08);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--font);
}
.happ-top { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; }
.happ-chev { color: #c5c5c7; font-size: 18px; line-height: 1; padding-top: 4px; }
.happ-top h3 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.happ-top small { color: #8e8e93; font-size: 12px; }
.happ-tools { display: flex; gap: 10px; color: #8e8e93; font-size: 16px; padding-top: 4px; }
.happ-meter { display: grid; grid-template-columns: 18px 1fr auto 18px; gap: 8px; align-items: center; margin: 14px 0 12px; }
.happ-info { width: 16px; height: 16px; border-radius: 50%; background: #0a84ff; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.happ-track { height: 8px; border-radius: 99px; background: #e8e8ed; overflow: hidden; position: relative; }
.happ-track span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 9px; font-weight: 800; color: #3a3a3c; }
.happ-exp { color: #3a3a3c; font-size: 12px; white-space: nowrap; }
.happ-link { color: #0a84ff; }
.happ-copy { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 4px 0 12px; }
.happ-copy b, .happ-copy p { margin: 0; font-size: 13px; }
.happ-copy p { color: #3a3a3c; margin-top: 2px; }
.happ-copy pre { margin: 0; font: 700 13px/1.4 -apple-system, var(--font); white-space: pre-wrap; text-align: center; color: #1c1c1e; }
.happ-node { display: grid; grid-template-columns: 34px 28px 1fr 14px; gap: 8px; align-items: center; padding: 11px 2px; border-top: 1px solid #eee; }
.happ-globe { width: 34px; height: 34px; border-radius: 9px; background: #2c2c2e; color: #fff; display: grid; place-items: center; font-size: 16px; }
.happ-node b { display: block; font-size: 15px; }
.happ-node small { color: #8e8e93; font-size: 12px; }
.happ-arrow { color: #c7c7cc; font-size: 22px; line-height: 1; }
.happ-empty { padding: 16px 4px; }
.happ-edit { width: 100%; max-width: none; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.happ-edit .happ-title-input, .happ-edit .happ-traffic-wrap input, .happ-edit .happ-exp-wrap input {
  border: 0; background: transparent; color: #1c1c1e; padding: 0; border-radius: 0; box-shadow: none !important; font: inherit;
}
.happ-edit .happ-title-input { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.happ-edit .happ-meter { align-items: end; }
.happ-traffic-wrap, .happ-exp-wrap { font-size: 10px; color: #8e8e93; gap: 2px; font-weight: 500; }
.happ-edit .happ-exp-wrap input { font-size: 12px; color: #3a3a3c; }
.happ-edit .happ-copy textarea { border: 0; background: #f2f2f7; color: #1c1c1e; text-align: center; min-height: 72px; font: 700 13px/1.4 -apple-system, var(--font); resize: vertical; padding: 10px 12px; border-radius: 12px; box-shadow: none; }
.happ-edit .happ-pick { display: none; }
.happ-edit::after { content: "Ноды назначаются автоматически. Для выборочной выдачи отключите «Все ноды»."; display: block; margin-top: 10px; padding: 10px 12px; border-radius: 11px; background: #f2f2f7; color: #636366; font-size: 12px; }
.happ-pick { border-top: 1px solid #eee; }
.happ-pick label { display: grid; grid-template-columns: 18px 34px 28px 1fr 14px; gap: 8px; align-items: center; padding: 10px 2px; border-bottom: 1px solid #f2f2f4; color: #1c1c1e; font-size: 14px; }
.happ-pick input { width: auto; }
.happ-pick.pick-off input { display: none; }
.happ-pick.pick-off label { grid-template-columns: 34px 28px 1fr 14px; }
.happ-pick b { display: block; font-size: 15px; font-weight: 700; color: #1c1c1e; }
.happ-pick small { color: #8e8e93; font-size: 12px; }
.happ-mini { padding: 16px; border-radius: 18px; background: rgba(148,178,255,.05); border: 1px solid var(--line); }
.happ-mini-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.happ-mini-top b { display: block; font-size: 16px; }
.happ-mini-top small { display: block; color: var(--muted); margin-top: 4px; }
.happ-mini .muted { margin: 10px 0 0; font-size: 12px; }
.var-btn { border: 0; background: #e5e5ea; color: #3a3a3c; border-radius: 999px; padding: 5px 11px; font-size: 11px; font-weight: 800; justify-self: start; }
#settings-form .var-btn.ghost { background: rgba(148,178,255,.08); color: #93c5fd; border: 1px solid var(--line-2); margin-top: 2px; }
.connection-strip { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin: 12px 0; padding: 10px 12px; border-radius: 11px; background: rgba(7,11,20,.45); border: 1px solid var(--line); font-size: 12px; }
.connection-strip span, .connection-strip small { color: var(--muted); }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; background: rgba(3, 6, 12, .72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; z-index: 70; }
.modal-card {
  width: min(720px, 100%); max-height: min(84vh, 760px); overflow: auto;
  background: linear-gradient(180deg, #131d33, #0d1526); border: 1px solid var(--line-2);
  border-radius: 22px; padding: 24px; box-shadow: 0 40px 120px -20px rgba(0,0,0,.9); animation: pop .2s ease;
}
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 8px; }
.modal-head h2, .modal-head h3 { margin: 0; }
.var-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.var-chip { display: grid; gap: 4px; text-align: left; border: 1px solid var(--line-2); background: rgba(148,178,255,.05); color: var(--text); border-radius: 12px; padding: 10px 12px; transition: .15s; }
.var-chip:hover { border-color: rgba(79,140,255,.5); background: rgba(79,140,255,.1); }
.var-chip code { color: #93c5fd; font-size: 12px; font-family: var(--mono); }
.var-chip small { color: var(--muted); font-size: 11px; }
.sub-import-card { width: min(760px, 94vw); max-height: 86vh; display: flex; flex-direction: column; gap: 12px; }
.sub-import-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#sub-import-meta { margin-left: auto; font-weight: 700; color: var(--text-2); }
#sub-import-warnings:empty { display: none; }
.sub-import-list { overflow: auto; max-height: 50vh; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.sub-import-item { display: flex; gap: 12px; align-items: center; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(148,178,255,.03); cursor: pointer; transition: .12s; }
.sub-import-item:hover { border-color: var(--line-2); background: rgba(148,178,255,.06); }
.sub-import-item b { display: block; color: var(--text); }
.sub-import-item small { color: var(--muted); font-size: 12px; }
.sub-import-card .row-actions { padding-top: 6px; border-top: 1px solid var(--line); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; right: 24px; bottom: 24px; padding: 13px 18px 13px 16px; border-radius: 13px;
  background: #0f2a22; color: #a7f3d0; border: 1px solid rgba(52,211,153,.35); font-weight: 700;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.7);
  transform: translateY(120px); opacity: 0; transition: .28s cubic-bezier(.2,.9,.3,1.2); z-index: 100; max-width: min(460px, calc(100vw - 32px));
}
.toast.show { transform: none; opacity: 1; }
.toast.bad { background: #2a1215; color: #fecaca; border-color: rgba(248,113,113,.4); }

.node-list, .sub-list { content-visibility: auto; contain-intrinsic-size: 1px 720px; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .node-row { grid-template-columns: 90px 34px minmax(160px,1fr) 140px 150px; }
  .node-row .node-group-pills { grid-column: 3 / 5; }
  .node-row .card-actions { grid-column: 5; justify-content: flex-end; }
  .group-editor { grid-template-columns: 1fr 1fr auto auto; }
}
@media (max-width: 1100px) {
  .studio, .stats, .form-grid, .check-grid, .identity, .issue-flags, .var-grid, .folder-toolbar { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  main { padding: 26px 24px 70px; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  aside {
    position: sticky; top: 0; height: auto; flex-direction: row; align-items: center; gap: 6px;
    padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .aside-brand { padding: 0 6px 0 0; }
  .aside-brand div, .nav-caption { display: none; }
  .aside-brand span { width: 36px; height: 36px; border-radius: 11px; }
  nav { display: flex; overflow-x: auto; gap: 4px; flex: 1; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  .nav { width: auto; padding: 9px 11px; white-space: nowrap; font-size: 13px; gap: 7px; }
  .nav svg { width: 17px; height: 17px; }
  .nav.active::before { display: none; }
  .logout { margin: 0; width: auto; padding: 9px; }
  .logout span { display: none; }
  main { padding: 20px 14px 60px; }
  header h1 { font-size: 25px; }
  .online { display: none; }
  .stats strong { font-size: 26px; }
  .node-row { grid-template-columns: 1fr; }
  .node-row .node-group-pills, .node-row .card-actions { grid-column: auto; justify-content: flex-start; }
  .node-order { order: -1; }
  .group-editor { grid-template-columns: 1fr 1fr; }
  .group-editor input { grid-column: 1 / -1; }
  .folder-create, .folder-current-tools, .folder-danger-zone { flex-wrap: wrap; }
  .folder-create input, .folder-current-tools input { min-width: 100%; }
  .toolbar-actions { justify-content: flex-start; width: 100%; }
  .search { width: 100%; }
  .quick-group-setting, .qr-box, .device-card, .detail-grid { grid-template-columns: 1fr; }
  #delete-all-nodes { margin-left: 0; }
  .user-table-wrap { max-height: none; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats article { padding: 16px; }
  .stat-ico { width: 34px; height: 34px; margin-bottom: 10px; }
  .panel { padding: 18px; }
  .user-editor { inset: 0; max-height: 100vh; border-radius: 0; padding: 18px; }
}

/* ---------- Refinements ---------- */
.users-toolbar { display: grid; grid-template-columns: 1fr; gap: 18px; }
.users-toolbar .toolbar-actions { justify-content: flex-start; width: 100%; }
.users-toolbar .user-filter { margin-right: auto; }
.users-toolbar .search { flex: 1 1 260px; width: auto; max-width: 380px; }
.form-grid > button { justify-self: start; }
.data-table td:nth-child(6) b { white-space: nowrap; }
.detail-head .ghost { width: 38px; height: 38px; padding: 0; font-size: 18px; }
.app { grid-template-columns: 250px minmax(0, 1fr); }
nav { min-width: 0; }
.node-row { grid-template-columns: 88px 32px minmax(140px, 1fr) 138px 150px max-content max-content; gap: 10px; }
.node-row .group-chip { padding: 6px 9px; }
.node-row .node-group-pills { flex-wrap: nowrap; }
.node-row .card-actions { flex-wrap: nowrap; }
.data-table th, .data-table td { padding: 13px 11px; }
.data-table th:first-child, .data-table td:first-child { padding-left: 18px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 16px; }
.row-menu .ghost, .row-menu .primary { padding: 8px 12px; font-size: 12.5px; }
@media (max-width: 1280px) {
  .node-row { grid-template-columns: 92px 34px minmax(160px,1fr) 145px 160px; }
  .node-row .node-group-pills { grid-column: 3 / 5; flex-wrap: wrap; }
  .node-row .card-actions { grid-column: 5; justify-content: flex-end; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .node-row { grid-template-columns: 1fr; }
  .node-row .node-group-pills, .node-row .card-actions { grid-column: auto; justify-content: flex-start; flex-wrap: wrap; }
}

/* =====================================================
   v10 · Premium layer — aurora, glow borders, phone frame
   ===================================================== */
:root {
  --bg: #05070f;
  --grad: linear-gradient(135deg, #6d7cff 0%, #3aa0ff 45%, #20d3e6 100%);
  --grad-soft: linear-gradient(135deg, rgba(109,124,255,.22), rgba(32,211,230,.14));
  --glow: 0 0 0 1px rgba(125,150,255,.14), 0 18px 60px -24px rgba(58,120,255,.55);
}
body { background: var(--bg); overflow-x: hidden; }
/* Aurora */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(90px); opacity: .55;
}
body::before {
  width: 780px; height: 620px; top: -260px; right: -160px;
  background: radial-gradient(circle at 30% 40%, #3b5bff 0%, transparent 60%), radial-gradient(circle at 70% 60%, #11b5d6 0%, transparent 60%);
  animation: aurora1 22s ease-in-out infinite alternate;
}
body::after {
  width: 700px; height: 560px; bottom: -280px; left: 80px;
  background: radial-gradient(circle at 40% 50%, #6a3cff 0%, transparent 60%), radial-gradient(circle at 70% 30%, #1e6bff 0%, transparent 55%);
  opacity: .32; animation: aurora2 26s ease-in-out infinite alternate;
}
@keyframes aurora1 { to { transform: translate(-140px, 80px) scale(1.12); } }
@keyframes aurora2 { to { transform: translate(160px, -60px) scale(1.08); } }
/* subtle grid texture */
.app::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(148,178,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(148,178,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 60% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 0%, #000 0%, transparent 70%);
}

/* Gradient-border glass cards */
.panel, .stats article, .group-manager, .user-table-wrap, .group-tab {
  background: linear-gradient(180deg, rgba(20, 29, 52, .78), rgba(11, 17, 32, .82)) padding-box,
              linear-gradient(160deg, rgba(140,160,255,.28), rgba(140,160,255,.06) 40%, rgba(32,211,230,.16)) border-box;
  border: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 60px -35px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.05);
}
.panel { border-radius: 22px; }
.stats article { border-radius: 22px; transition: transform .25s ease, box-shadow .25s ease; }
.stats article:hover { transform: translateY(-3px); box-shadow: var(--glow); }

/* Headline */
header { padding-bottom: 4px; }
header h1 {
  font-size: 34px;
  background: linear-gradient(90deg, #ffffff 0%, #c9d6ff 55%, #8fdcff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow { color: #7fd7ff; letter-spacing: .08em; }
.online { backdrop-filter: blur(10px); }

/* Sidebar */
aside {
  background: linear-gradient(180deg, rgba(10, 15, 30, .72), rgba(6, 9, 18, .82));
  border-right: 1px solid rgba(140,160,255,.10);
}
.aside-brand { position: relative; margin: 0 2px 10px; padding: 12px; border-radius: 16px; background: var(--grad-soft); border: 1px solid rgba(140,160,255,.16); }
.aside-brand span { box-shadow: 0 0 24px rgba(58,160,255,.55), 0 0 0 1px rgba(255,255,255,.12); }
.nav { border-radius: 12px; padding: 11px 12px; }
.nav.active {
  background: linear-gradient(90deg, rgba(88,120,255,.30), rgba(32,211,230,.10));
  box-shadow: inset 0 0 0 1px rgba(125,160,255,.28), 0 10px 30px -14px rgba(58,120,255,.9);
}
.nav.active::before { left: -14px; box-shadow: 0 0 14px #3aa0ff; }
.nav.active svg { color: #9fd8ff; filter: drop-shadow(0 0 6px rgba(58,160,255,.8)); }

/* Stats: gradient numbers + glow icon */
.stats strong {
  font-size: 36px;
  background: linear-gradient(180deg, #ffffff, #b7c6f5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.reserve-stat strong { background: linear-gradient(180deg, #ffe7a3, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-ico { width: 44px; height: 44px; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 8px 24px -10px currentColor; }
.stats article::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160,190,255,.55), transparent);
}

/* Buttons */
.primary { background: var(--grad); background-size: 160% 160%; position: relative; overflow: hidden; border-radius: 13px; }
.primary::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.primary:hover::after { left: 130%; }
.ghost { backdrop-filter: blur(8px); }

/* Phone frame around Happ preview */
#happ-preview-overview, #happ-preview-settings {
  width: min(400px, 100%); padding: 14px; border-radius: 48px; position: relative;
  background: linear-gradient(160deg, #2a3350, #0c1120 40%, #1a2240);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 0 0 7px #0a0e19, 0 0 0 8px rgba(140,160,255,.22), 0 60px 120px -40px rgba(20,60,255,.55);
}
#happ-preview-overview::before, #happ-preview-settings::before {
  content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 26px; border-radius: 20px; background: #05070d; z-index: 2;
}
#happ-preview-overview .happ-card, #happ-preview-settings .happ-card {
  width: 100%; border-radius: 36px; padding-top: 46px; box-shadow: none;
  max-height: 640px; overflow: hidden;
}
.preview-label { text-align: left; }

/* Tables */
.user-table th { background: rgba(10, 16, 32, .96); backdrop-filter: blur(10px); }
.data-table tbody tr:hover { background: linear-gradient(90deg, rgba(88,120,255,.10), rgba(32,211,230,.03)); }
.avatar { border-radius: 13px; box-shadow: 0 0 0 2px rgba(255,255,255,.06), 0 8px 20px -8px rgba(58,120,255,.9); }

/* Group tabs & nodes */
.group-tab.active {
  background: linear-gradient(145deg, rgba(88,120,255,.32), rgba(32,211,230,.10)) padding-box,
              linear-gradient(135deg, #6d7cff, #20d3e6) border-box;
  border: 1px solid transparent;
}
.node-row { border-radius: 16px; background: rgba(16, 24, 44, .55); }
.node-row:hover { box-shadow: 0 12px 30px -18px rgba(58,120,255,.7); }
.node-flag { font-size: 26px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
.folder-tabs { backdrop-filter: blur(10px); }
.folder-tab.active { background: var(--grad); box-shadow: 0 8px 20px -10px rgba(58,160,255,.9); }

/* Login */
.login-card {
  background: linear-gradient(180deg, rgba(22, 32, 60, .78), rgba(10, 15, 30, .86)) padding-box,
              linear-gradient(160deg, rgba(140,160,255,.45), rgba(140,160,255,.05) 45%, rgba(32,211,230,.35)) border-box;
  border: 1px solid transparent;
}
.login-brand img { box-shadow: 0 0 30px rgba(58,160,255,.6); }
.login-card h1 { background: linear-gradient(90deg, #fff, #9fdcff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Drawer & modals glass */
.detail-panel, .modal-card, .user-editor {
  background: linear-gradient(180deg, rgba(20, 30, 56, .96), rgba(9, 14, 28, .98));
}
.detail-head h2 { background: linear-gradient(90deg, #fff, #b9ccff); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
  .view, .detail-panel, .modal-card { animation: none; }
}
@media (max-width: 900px) {
  .aside-brand { margin: 0; padding: 0; background: none; border: 0; }
  header h1 { font-size: 26px; }
  #happ-preview-overview, #happ-preview-settings { margin: 0 auto; }
}
.group-tab.active {
  background: linear-gradient(145deg, #1a2a58, #0e1d33) padding-box,
              linear-gradient(135deg, #6d7cff, #20d3e6) border-box;
}
.group-tab.active small { color: #a9b8dc; }

/* ---------- Mobile performance: no heavy live blur on phones ---------- */
@media (max-width: 900px), (hover: none) {
  body { background-attachment: scroll; }
  body::before, body::after { animation: none !important; filter: blur(60px); opacity: .35; }
  .app::before { display: none; }
  .panel, .stats article, .group-manager, .user-table-wrap, .group-tab, aside, .online, .ghost, .folder-tabs,
  .modal, .drawer-backdrop, .detail-panel, .modal-card, .user-editor {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .panel, .stats article, .group-manager, .user-table-wrap, .group-tab {
    background: linear-gradient(180deg, #141d34, #0b1120) padding-box,
                linear-gradient(160deg, rgba(140,160,255,.28), rgba(140,160,255,.06) 40%, rgba(32,211,230,.16)) border-box;
  }
  .stats article:hover { transform: none; }
  .view, .detail-panel, .modal-card { animation: none; }
  .primary::after { display: none; }
  .online i { animation: none; }
  aside { background: #080c18; }
}

/* =====================================================
   v12 · Performance: no live blur, no backdrop-filter, no infinite
   animations. Same look, static and GPU-light.
   ===================================================== */
body {
  background:
    radial-gradient(700px 520px at 88% -6%, rgba(59, 91, 255, .30), transparent 70%),
    radial-gradient(620px 480px at 8% 104%, rgba(17, 181, 214, .14), transparent 70%),
    radial-gradient(520px 420px at 45% 40%, rgba(106, 60, 255, .08), transparent 70%),
    #05070f !important;
  background-attachment: scroll !important;
}
body::before, body::after, .app::before { display: none !important; animation: none !important; }
*, *::before, *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.panel, .stats article, .group-manager, .user-table-wrap, .group-tab {
  background: linear-gradient(180deg, #131c33, #0c1323) padding-box,
              linear-gradient(160deg, rgba(140,160,255,.28), rgba(140,160,255,.06) 40%, rgba(32,211,230,.16)) border-box !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset !important;
}
.group-tab.active {
  background: linear-gradient(145deg, #1a2a58, #0e1d33) padding-box,
              linear-gradient(135deg, #6d7cff, #20d3e6) border-box !important;
}
aside { background: #070b16 !important; }
.stats article { transition: none !important; }
.stats article:hover { transform: none !important; box-shadow: 0 1px 0 rgba(255,255,255,.04) inset !important; }
.online i, .primary::after, .view, .detail-panel, .modal-card { animation: none !important; }
.primary::after { display: none !important; }
.node-row, .data-table tbody tr, .user-row { transition: none !important; }
.node-row:hover { box-shadow: none !important; }
.nav.active svg { filter: none !important; }
.nav.active { box-shadow: inset 0 0 0 1px rgba(125,160,255,.28) !important; }
.node-flag { filter: none !important; }
.modal, .drawer-backdrop { background: rgba(3, 6, 12, .82) !important; }
.detail-panel, .modal-card, .user-editor { background: #101a2e !important; }
.node-list, .sub-list, #user-list { content-visibility: auto; contain-intrinsic-size: auto 800px; }
.node-row { contain: layout paint; }

/* Fast server toggle */
.fast-toggle{white-space:nowrap}
.fast-toggle.is-fast{background:linear-gradient(135deg,#f59e0b,#fbbf24)!important;color:#1a1200!important;border-color:transparent!important;font-weight:800}

/* Autosync */
.autosync-box{margin:14px 0 6px;padding:14px;border-radius:18px;border:1px solid rgba(120,160,255,.18);background:rgba(20,30,60,.45);display:grid;gap:10px}
.autosync-head{display:flex;gap:12px;align-items:flex-start;justify-content:space-between}
.autosync-head b{display:block;font-size:15px}.autosync-head small{color:var(--muted,#8b98b8);font-size:12.5px}
.autosync-item{display:flex;gap:8px;align-items:center;padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.06)}
.autosync-main{flex:1;min-width:0}.autosync-main b{display:block;font-size:13.5px;word-break:break-all}.autosync-main small{color:var(--muted,#8b98b8);font-size:12px}
.autosync-add{display:flex;gap:8px}.autosync-add input{flex:1;min-width:0}
.autosync-rules{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:13.5px}
.autosync-empty{margin:0;font-size:13px}
@media (max-width:640px){.autosync-head{flex-direction:column}.autosync-add{flex-direction:column}}

/* Marketing links */
.mk-stats{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.mk-small{font-size:22px!important}
.mk-details{margin-top:14px;border-top:1px solid rgba(255,255,255,.06);padding-top:10px}
.mk-details summary{cursor:pointer;list-style:none;font-weight:800;font-size:16px;display:flex;align-items:center;gap:8px;padding:6px 0;user-select:none}
.mk-details summary::-webkit-details-marker{display:none}
.mk-arrow{display:inline-block;transition:transform .2s}
.mk-details[open] .mk-arrow{transform:rotate(90deg)}
.mk-list{display:grid;gap:8px;margin-top:8px}
.mk-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.mk-chip{font-size:12px;padding:3px 8px;border-radius:99px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.08)}

/* =====================================================
   v-mob · закрываемые окна + мобильная версия
   ===================================================== */
body.overlay-open { overflow: hidden; }
.editor-backdrop { position: fixed; inset: 0; z-index: 59; background: rgba(3,6,12,.78); backdrop-filter: blur(5px); cursor: pointer; animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.user-editor { box-shadow: 0 40px 120px -20px rgba(0,0,0,.9) !important; padding-top: 0 !important; }
.user-editor::before { display: none !important; }
.sheet-bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  margin: 0 -26px 16px; padding: 16px 20px 14px 26px;
  background: rgba(16,26,46,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.sheet-bar b { font-size: 19px; font-weight: 800; flex: 1; }
.sheet-grip { display: none; }
.sheet-close, .detail-head #detail-close {
  width: 40px !important; height: 40px !important; flex: none; display: grid; place-items: center; padding: 0 !important;
  border-radius: 12px !important; border: 1px solid var(--line-2) !important; background: rgba(255,255,255,.06) !important;
  color: var(--text) !important; font-size: 17px !important; font-weight: 700; cursor: pointer; transition: .15s;
}
.sheet-close:hover, .detail-head #detail-close:hover { background: rgba(248,113,113,.16) !important; border-color: rgba(248,113,113,.45) !important; }
.detail-panel { overflow-x: hidden; padding-top: 0 !important; max-width: 100vw; }
.detail-panel * { min-width: 0; }
.detail-panel code { word-break: break-all; white-space: normal; }
.detail-head {
  position: sticky; top: 0; z-index: 5; margin: 0 -28px 4px; padding: 20px 22px 16px 28px;
  background: rgba(16,26,46,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.detail-head h2 { font-size: 22px !important; overflow-wrap: anywhere; }
.identity-copy, .row-actions, .detail-actions { flex-wrap: wrap; }
.identity-copy { display: flex; gap: 8px; margin-top: 14px; }
.identity-copy > * { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  /* нижнее меню вместо верхней ленты */
  aside {
    position: fixed !important; top: auto !important; left: 10px; right: 10px; bottom: 10px; z-index: 40; height: auto !important;
    display: flex !important; flex-direction: row; align-items: stretch; gap: 2px; padding: 6px !important;
    border: 1px solid var(--line-2) !important; border-radius: 22px; background: rgba(9,14,28,.94) !important;
    backdrop-filter: blur(18px); box-shadow: 0 16px 40px rgba(0,0,0,.55);
    padding-bottom: max(6px, env(safe-area-inset-bottom)) !important;
  }
  .aside-brand, .nav-caption { display: none !important; }
  nav { display: flex !important; flex: 1; gap: 2px; overflow: visible !important; }
  .nav {
    flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 3px !important;
    padding: 7px 2px !important; border-radius: 15px; font-size: 10px !important; line-height: 1.1; text-align: center; white-space: normal !important;
  }
  .nav svg { width: 21px !important; height: 21px !important; margin: 0 auto; }
  .nav span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .logout { flex: 0 0 40px; padding: 0 !important; display: grid; place-items: center; border-radius: 15px; }
  .logout svg { width: 19px; height: 19px; }
  main { padding: 16px 14px 110px !important; }
  header { margin-bottom: 14px; }
  header .eyebrow { display: none; }
  header h1 { font-size: 24px !important; }

  /* окна — во весь экран, как шторка */
  .user-editor { inset: 0 !important; max-width: none; max-height: none; height: 100%; margin: 0; border-radius: 0 !important; padding: 0 16px 120px !important; border: 0; animation: sheetup .25s ease; }
  .sheet-bar { margin: 0 -16px 14px; padding: 10px 14px 12px 18px; padding-top: max(10px, env(safe-area-inset-top)); flex-wrap: wrap; }
  .sheet-grip { display: block; width: 100%; height: 4px; flex-basis: 100%; }
  .sheet-grip::before { content: ""; display: block; width: 42px; height: 4px; margin: 0 auto; border-radius: 9px; background: rgba(255,255,255,.22); }
  .user-editor .row-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; margin: 0; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); background: rgba(12,19,36,.97); border-top: 1px solid var(--line); display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
  .user-editor .row-actions button { width: 100%; padding: 14px; }
  .drawer { align-items: stretch; }
  .detail-panel { width: 100% !important; border-left: 0 !important; padding: 0 16px 40px !important; animation: sheetup .25s ease !important; }
  .detail-head { margin: 0 -16px 4px; padding: 12px 14px 12px 18px; padding-top: max(12px, env(safe-area-inset-top)); }
  .detail-head h2 { font-size: 19px !important; }
  .detail-head .eyebrow { display: none; }
  .detail-grid { grid-template-columns: 1fr 1fr !important; gap: 8px; }
  .detail-grid article { padding: 12px; }
  .detail-status { margin: 14px 0; }
  .qr-box { grid-template-columns: 1fr !important; text-align: center; }
  .qr-box img { width: 170px; height: 170px; margin: 0 auto; }
  .qr-box .row-actions { justify-content: center; }
  .detail-actions { position: sticky; bottom: 0; padding: 12px 0 max(4px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, #101a2e 30%); display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; }
  .detail-actions .primary { grid-column: 1 / -1; }
  .quick-group-setting select { width: 100%; }

  /* пользователи — карточками */
  .users-toolbar { padding: 14px !important; gap: 12px !important; }
  .users-toolbar > div:first-child { display: none; }
  .user-filter { display: flex; overflow-x: auto; flex-wrap: nowrap !important; scrollbar-width: none; max-width: 100%; }
  .user-filter::-webkit-scrollbar { display: none; }
  .user-filter-btn { white-space: nowrap; flex: none; }
  .users-toolbar .search { max-width: none !important; flex: 1 1 100%; }
  #create-user { width: 100%; }
  .preview-label { margin-top: 4px; }
  .user-table-wrap, #devices .table-wrap { border: 0 !important; background: none !important; box-shadow: none !important; backdrop-filter: none !important; overflow: visible !important; }
  .user-table, #devices .data-table { display: block; min-width: 0 !important; width: 100%; }
  .user-table thead, #devices .data-table thead { display: none; }
  .user-table tbody, #devices .data-table tbody { display: flex; flex-direction: column; gap: 10px; }
  .user-table tr.user-row, #devices .data-table tbody tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 14px;
    border: 1px solid var(--line-2); border-radius: 18px; background: rgba(17,26,46,.85); cursor: pointer;
  }
  .user-table tr.user-row:active { transform: scale(.99); }
  .user-table td, #devices .data-table td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; }
  .user-table td[data-label]:not([data-label=""])::before, #devices .data-table td[data-label]:not([data-label=""])::before {
    content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  }
  .user-table td:nth-child(1), #devices .data-table td:nth-child(1) { grid-column: 1 / -1; }
  .user-table td:nth-child(2), .user-table td:nth-child(4) { display: none; }
  .user-table td:nth-child(7), #devices .data-table td:nth-child(6) { grid-column: 1 / -1; }
  .user-cell { min-width: 0 !important; }
  .user-cell > div { min-width: 0; }
  .user-cell .copy-line:first-of-type { display: none; }
  .user-table .row-menu { justify-content: stretch; display: grid; grid-template-columns: auto 1fr 1.4fr; gap: 8px; }
  .user-table .row-menu > * { text-align: center; justify-content: center; padding: 10px !important; }
  #devices .panel-head { flex-direction: column; align-items: stretch; }
  #devices .data-table td:nth-child(6) button { width: 100%; }
  .table-panel { padding: 14px !important; }
}
@keyframes sheetup { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (max-width: 900px) {
  .users-toolbar { grid-template-columns: minmax(0,1fr) !important; }
  .users-toolbar .toolbar-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-width: 0; width: 100%; }
  .users-toolbar .user-filter { margin: 0 !important; width: 100%; min-width: 0; }
  .users-toolbar .search { width: 100% !important; }
  .group-editor { min-width: 0; grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; }
  .drawer { align-items: stretch !important; }
  .detail-panel { height: 100% !important; max-height: 100% !important; }
  html, body { overflow-x: hidden; }
}
.detail-panel { height: 100%; max-height: 100vh; }
.user-editor #user-form-title { display: none; }
@media (max-width: 900px) {
  .drawer .detail-panel { margin: 0 !important; border-radius: 0 !important; border: 0 !important; left: 0; right: 0; }
  .detail-head { padding-top: max(16px, env(safe-area-inset-top)) !important; }
  .detail-actions button { padding: 12px 10px; }
  .nav span { font-size: 0 !important; }
  .nav span::after { content: attr(data-short); font-size: 10.5px; font-weight: 700; }
}

/* ===== merge: заработок / бот и сайт / продажи ===== */
.embed-frame { display: block; width: 100%; height: calc(100vh - 150px); height: calc(100dvh - 150px); border: 0; background: transparent; color-scheme: dark; }
#finance, #bot { margin-top: -8px; }
.sale-box { margin-top: 16px; padding: 16px; border: 1px solid var(--line-2); border-radius: 16px; background: rgba(7,11,20,.45); }
.sale-head b { display: block; font-size: 15px; }
.sale-head small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.sale-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.sale-toggle button { padding: 12px; border-radius: 13px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--text-2); font: 700 14px var(--font); cursor: pointer; transition: .15s; }
.sale-toggle button.on[data-sale="paid"] { background: rgba(52,211,153,.14); border-color: rgba(52,211,153,.55); color: #6ee7b7; box-shadow: 0 0 0 3px rgba(52,211,153,.12); }
.sale-toggle button.on[data-sale="gift"] { background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.5); color: #fcd34d; box-shadow: 0 0 0 3px rgba(251,191,36,.1); }
.sale-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sale-box:not([data-type="paid"]) .sale-fields { display: none; }
.badge.gift { white-space: nowrap; }
@media (max-width: 900px) {
  .embed-frame { height: calc(100dvh - 190px); }
  nav { overflow-x: auto !important; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  .nav { flex: 0 0 58px !important; }
  .sale-fields { grid-template-columns: 1fr; }
}
/* оплаты в карточке */
.pay-section { padding: 16px; border: 1px solid var(--line-2); border-radius: 16px; background: linear-gradient(135deg, rgba(52,211,153,.06), rgba(79,140,255,.05)); }
.pay-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pay-head h3 { margin: 0 !important; display: flex; align-items: center; gap: 10px; }
.pay-total { font-size: 15px; color: #6ee7b7; }
.pay-note { font-size: 12.5px; margin: 4px 0 8px; }
.pay-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; max-height: 220px; overflow: auto; }
.pay-item { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; background: rgba(7,11,20,.45); font-size: 13px; }
.pay-item small { color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-kind { font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.pay-kind.new { background: rgba(79,140,255,.15); color: #bfdbfe; }
.pay-kind.ren { background: rgba(139,92,246,.18); color: #ddd6fe; }
.pay-open { width: 100%; }
.pay-form { display: flex; flex-direction: column; gap: 12px; }
.pay-days { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-days button { flex: 1 1 70px; padding: 10px 8px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--text-2); font: 700 13px var(--font); cursor: pointer; }
.pay-days button.on { background: rgba(52,211,153,.14); border-color: rgba(52,211,153,.55); color: #6ee7b7; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-grid label, .pay-noteinp { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.pay-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
@media (max-width: 900px) { .pay-grid { grid-template-columns: 1fr; } .pay-item { grid-template-columns: auto 1fr; } .pay-item small { grid-column: 1 / -1; text-align: left; } }
.dev-btns { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.dev-btns button { white-space: nowrap; }
.blocked-panel { margin-top: 16px; }
@media (max-width: 900px) { .dev-btns { flex-direction: row; } .dev-btns button { flex: 1; } }
.owner-dev { display: inline-block; margin-top: 6px; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; color: #fcd34d; background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.35); }
.detail-status { flex-wrap: wrap; }
.last-act { width: 100%; color: var(--muted); font-weight: 700; }
.blocked-in-card h3 { color: #fca5a5; }
.blocked-card { border-color: rgba(248,113,113,.35) !important; background: rgba(248,113,113,.06) !important; }
.sub-as { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 700; color: #7dd3fc; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-as.saving { color: #fcd34d; }
.sub-as.ok { color: #6ee7b7; }
.sub-as.bad { color: #fca5a5; }

.mk-hidden-note{margin:10px 0 4px;padding:10px 12px;border-radius:12px;background:rgba(245,158,11,.10);border:1px solid rgba(245,158,11,.28);font-size:13px;line-height:1.5}
