/* ============================================================
   Kudasai Hostings — premium dark control room
   Palette, type and surfaces follow the reference product UI.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #07080f;
  --bg-2: #0b0d18;
  --panel: rgba(19, 22, 36, 0.72);
  --panel-solid: #0d0f1a;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1ff;
  --muted: #8d96b2;
  --dim: #5f6987;
  --violet: #7c5cff;
  --pink: #45d0ff;
  --cyan: #45d0ff;
  --lime: #31e1c0;
  --amber: #ffb020;
  --red: #ff5c7a;
  --green: #2ee6a8;
  --grad: linear-gradient(135deg, #7c5cff 0%, #45d0ff 55%, #31e1c0 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(49, 225, 192, 0.1));
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* atmosphere */
body::before {
  content: '';
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 72vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 60% at 18% 20%, rgba(124, 92, 255, 0.28), transparent 70%),
    radial-gradient(50% 50% at 78% 8%, rgba(69, 208, 255, 0.2), transparent 70%),
    radial-gradient(40% 50% at 55% 55%, rgba(49, 225, 192, 0.12), transparent 70%);
  filter: blur(10px);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

body > * { position: relative; z-index: 1; }

.blob { display: none; }

::selection { background: rgba(124, 92, 255, 0.4); color: #fff; }

* { scrollbar-width: thin; scrollbar-color: rgba(140, 150, 190, 0.32) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: rgba(140, 150, 190, 0.28); border-radius: 99px; }
*::-webkit-scrollbar-track { background: transparent; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 600;
  font-family: var(--display);
}
p { margin: 0; }
code, pre, .mono { font-family: var(--mono); }

/* ------------------------------- icons ------------------------------- */

.ico-svg {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  vertical-align: -0.16em;
  display: inline-block;
}
.btn .ico-svg { width: 15px; height: 15px; }
.btn-icon { width: 34px; height: 34px; padding: 0; }
.pill .ico-svg { width: 12px; height: 12px; vertical-align: -0.12em; }
.modal-close .ico-svg { width: 14px; height: 14px; }
.toast .ti svg { width: 16px; height: 16px; }
.empty .e-ico svg { width: 28px; height: 28px; }
.detail-empty .de-ico svg { width: 42px; height: 42px; }
.success-panel .big-check svg { width: 30px; height: 30px; }
.admin-links .ico svg { width: 17px; height: 17px; }

.container { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.section { padding: 92px 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: 42px; }
.section-head h2 { font-size: clamp(30px, 4.6vw, 46px); }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 16.5px; line-height: 1.65; }

.grad {
  background: linear-gradient(120deg, #ffffff 12%, #c9d3ff 48%, #9ff5e3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500;
  color: #a9b2cf; padding: 7px 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 10px var(--lime);
}
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.tiny { font-size: 12px; }
.mono-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* ------------------------------- nav ------------------------------- */

.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(20px) saturate(140%);
  background: rgba(7, 8, 15, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 17px; letter-spacing: -0.03em; }
.brand span:not(.brand-mark) { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad); color: #07080f; font-weight: 800; font-size: 16px; flex: none;
  box-shadow: 0 10px 26px -10px rgba(124, 92, 255, 0.9);
}
.brand-mark .ico-svg { width: 18px; height: 18px; }
.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a {
  padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 13.5px;
  font-weight: 500; transition: 0.18s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #07080f;
  font-weight: 700; font-size: 13px; text-transform: uppercase;
}

/* ------------------------------ buttons ----------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04); color: var(--text);
  font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; cursor: pointer; white-space: nowrap;
  backdrop-filter: blur(8px);
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.075); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px) scale(0.995); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary {
  background: var(--grad); color: #07080f; border: 0; font-weight: 700;
  box-shadow: 0 14px 32px -14px rgba(124, 92, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover {
  background: var(--grad); transform: translateY(-1px);
  box-shadow: 0 20px 42px -14px rgba(69, 208, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  filter: saturate(1.08);
}
.btn-ghost { background: rgba(255, 255, 255, 0.04); }
.btn-danger { border-color: rgba(255, 92, 122, 0.4); color: #ff9db0; background: rgba(255, 92, 122, 0.13); }
.btn-danger:hover { background: rgba(255, 92, 122, 0.22); border-color: rgba(255, 92, 122, 0.55); }
.btn-success { border-color: rgba(46, 230, 168, 0.38); color: #8df5d6; background: rgba(46, 230, 168, 0.11); }
.btn-success:hover { background: rgba(46, 230, 168, 0.18); border-color: rgba(46, 230, 168, 0.55); }
.btn-sm { padding: 8px 13px; font-size: 12.5px; border-radius: 10px; }
.btn-xs { padding: 6px 10px; font-size: 11.5px; border-radius: 8px; gap: 6px; }
.btn-xs .ico-svg { width: 13px; height: 13px; }
.btn .spinner { width: 13px; height: 13px; border-width: 2px; }

.spinner {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: currentColor;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------- cards ------------------------------ */

.card {
  position: relative;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
    rgba(13, 15, 26, 0.66);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.card-pad { padding: 24px; }
.card-hover:hover {
  border-color: rgba(124, 92, 255, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 34px 70px -44px rgba(124, 92, 255, 0.75);
  transition: 0.25s ease;
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.06); color: var(--muted);
  border: 1px solid var(--line); text-transform: capitalize; white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.pill.pending { color: var(--amber); background: rgba(255, 176, 32, 0.09); border-color: rgba(255, 176, 32, 0.26); }
.pill.approved, .pill.running { color: var(--green); background: rgba(46, 230, 168, 0.09); border-color: rgba(46, 230, 168, 0.26); }
.pill.rejected, .pill.crashed, .pill.failed { color: var(--red); background: rgba(255, 92, 122, 0.09); border-color: rgba(255, 92, 122, 0.26); }
.pill.installing, .pill.restarting, .pill.queued { color: var(--cyan); background: rgba(69, 208, 255, 0.09); border-color: rgba(69, 208, 255, 0.26); }
.pill.stopped, .pill.not_installed, .pill.installed { color: var(--muted); }
.pill.telegram { color: #7cd7ff; }
.pill.discord { color: #b7a9ff; }
.pill.other { color: #8df5d6; }
.pill.no-dot::before { display: none; }

/* status dots used in lists */
.sdot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block;
  margin-right: 8px; vertical-align: 1px; background: #4a5370;
}
.sdot.ok { background: var(--green); box-shadow: 0 0 0 3px rgba(46, 230, 168, 0.14); }
.sdot.warn { background: var(--amber); box-shadow: 0 0 0 3px rgba(255, 176, 32, 0.14); }
.sdot.bad { background: var(--red); box-shadow: 0 0 0 3px rgba(255, 92, 122, 0.14); }
.sdot.idle { background: #4a5370; }

/* ------------------------------ forms ------------------------------- */

.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 500; letter-spacing: 0.01em; }
.field .hint { font-size: 11.5px; color: var(--dim); }
input[type='text'], input[type='email'], input[type='password'], input[type='number'], input[type='search'],
input[type='url'], input[type='tel'], textarea, select {
  width: 100%; padding: 11px 13px; border-radius: 12px;
  background: rgba(10, 12, 22, 0.7); border: 1px solid var(--line);
  color: var(--text); font-family: var(--font); font-size: 14px;
  outline: none; transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
textarea { resize: vertical; min-height: 100px; line-height: 1.5; }
textarea.code { font-family: var(--mono); font-size: 12.5px; line-height: 1.65; }
input:focus, textarea:focus, select:focus {
  border-color: rgba(124, 92, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.16);
  background: rgba(12, 15, 27, 0.9);
}
input::placeholder, textarea::placeholder { color: #5d6684; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238d96b2' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px;
}

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: var(--muted); }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); position: relative; cursor: pointer; transition: 0.2s; border: 1px solid var(--line); }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #cbc6df; transition: 0.2s; }
.switch input:checked { background: var(--grad); border-color: transparent; }
.switch input:checked::after { left: 18px; background: #fff; }

.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.type-option { position: relative; cursor: pointer; }
.type-option input { position: absolute; opacity: 0; }
.type-option .type-box {
  border: 1px solid var(--line-strong); border-radius: 13px; padding: 13px 14px;
  background: rgba(255, 255, 255, 0.02); transition: 0.18s ease; display: flex; align-items: center; gap: 10px;
}
.type-option .type-box .icon {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--line); color: var(--cyan); flex: none;
}
.type-option .type-box .icon svg { width: 17px; height: 17px; }
.type-option .type-box b { display: block; font-size: 13px; font-weight: 600; }
.type-option .type-box small { color: var(--dim); font-size: 10.5px; }
.type-option input:checked + .type-box {
  border-color: rgba(124, 92, 255, 0.65); background: rgba(124, 92, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.1);
}

/* ----------------------------- dropzone ----------------------------- */

.dropzone {
  border: 1.5px dashed rgba(124, 92, 255, 0.35); border-radius: 16px;
  padding: 26px 20px; text-align: center; cursor: pointer; transition: 0.18s ease;
  background: rgba(124, 92, 255, 0.03);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--violet); background: rgba(124, 92, 255, 0.08); }
.dropzone .dz-icon {
  width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 13px;
  display: grid; place-items: center; color: var(--cyan);
  background: var(--grad-soft); border: 1px solid var(--line);
}
.dropzone .dz-icon svg { width: 21px; height: 21px; }
.dropzone b { font-size: 13.5px; font-weight: 600; }
.dropzone p { color: var(--dim); font-size: 12px; margin-top: 3px; }
.dz-files { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow: auto; text-align: left; }
.dz-file { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 11.5px; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); color: var(--muted); }
.dz-file .x { cursor: pointer; color: var(--red); display: inline-grid; place-items: center; }
.dz-file .x svg { width: 13px; height: 13px; }
input[type='file'] { display: none; }

/* ------------------------------ hero -------------------------------- */

.hero { padding: 82px 0 46px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.06fr 0.94fr; gap: 54px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6vw, 74px); font-weight: 700; letter-spacing: -0.05em; margin: 20px 0 22px; }
.hero h1 span { display: block; }
.hero p.lede { color: var(--muted); font-size: 17px; max-width: 490px; line-height: 1.7; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 24px; margin-top: 36px; flex-wrap: wrap; }
.hero-meta .hm { display: flex; flex-direction: column; gap: 2px; }
.hero-meta b { font-size: 21px; font-weight: 700; font-family: var(--display); }
.hero-meta small { color: var(--dim); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; }

.hero-art { position: relative; }
.terminal {
  border-radius: 20px; overflow: hidden; border: 1px solid rgba(124, 92, 255, 0.25);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(124, 92, 255, 0.16), transparent 55%),
    linear-gradient(180deg, rgba(18, 21, 36, 0.96), rgba(8, 10, 19, 0.98));
  box-shadow: 0 40px 90px -35px rgba(124, 92, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform: rotate(-1.2deg);
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 15px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); }
.terminal-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #3c4260; }
.terminal-bar .dot.r { background: #ff5c7a; }
.terminal-bar .dot.y { background: #ffb020; }
.terminal-bar .dot.g { background: #2ee6a8; }
.terminal-bar span { margin-left: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.terminal-body { padding: 18px 19px 22px; font-family: var(--mono); font-size: 12px; line-height: 1.95; min-height: 258px; }
.terminal-body .ln { white-space: pre-wrap; word-break: break-word; }
.terminal-body .ok { color: var(--green); }
.terminal-body .warn { color: var(--amber); }
.terminal-body .info { color: var(--cyan); }
.terminal-body .pink { color: var(--lime); }
.terminal-body .dim { color: var(--dim); }
.caret { display: inline-block; width: 7px; height: 13px; background: var(--violet); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.float-card {
  position: absolute; right: -14px; bottom: -30px; width: 252px;
  padding: 15px; border-radius: 16px; border: 1px solid var(--line-strong);
  background: rgba(13, 15, 26, 0.94); box-shadow: var(--shadow); backdrop-filter: blur(14px);
  transform: rotate(2.4deg); animation: bob 6s ease-in-out infinite;
}
@keyframes bob { 50% { transform: rotate(2.4deg) translateY(-7px); } }
.float-card .fc-title { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; margin-bottom: 9px; }
.float-card .fc-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); padding: 6px 0; border-top: 1px dashed rgba(255, 255, 255, 0.07); }
.float-card .fc-ico {
  width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  background: rgba(124, 92, 255, 0.15); color: var(--cyan);
}
.float-card .fc-ico svg { width: 12px; height: 12px; }
.float-card .fc-check { margin-left: auto; color: var(--green); font-size: 11px; }
.float-card .fc-check svg { width: 13px; height: 13px; }
.float-card .fc-check.off { color: var(--dim); }
.float-card .fc-installing { color: var(--green); }

/* ------------------------------ ticker ------------------------------ */

.ticker { border-block: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); overflow: hidden; padding: 13px 0; }
.ticker-track { display: flex; gap: 46px; width: max-content; animation: ticker 32s linear infinite; }
.ticker span { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; gap: 46px; white-space: nowrap; }
.ticker span::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--lime); opacity: 0.8; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ------------------------------ stats ------------------------------- */

.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: -1px; }
.stat {
  padding: 22px; border-radius: var(--radius); border: 1px solid var(--line);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(124, 92, 255, 0.13), transparent 55%),
    rgba(13, 15, 26, 0.66);
  backdrop-filter: blur(14px);
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.stat:hover { transform: translateY(-2px); border-color: rgba(124, 92, 255, 0.32); }
.stat b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -0.04em; margin-bottom: 2px; font-family: var(--display); }
.stat small { color: var(--dim); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.stat .glow { color: var(--lime); }

/* ------------------------------- steps ------------------------------ */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { padding: 26px; position: relative; overflow: hidden; }
.step .num { font-size: 10.5px; color: var(--lime); letter-spacing: 0.16em; }
.step h3 { font-size: 19px; margin: 14px 0 8px; }
.step p { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.step .step-ico {
  position: absolute; right: 20px; top: 20px;
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--line); color: var(--cyan);
}
.step .step-ico svg { width: 20px; height: 20px; }

/* ------------------------------ rails ------------------------------- */

.rails { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rail { padding: 26px; }
.rail .rail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.rail .rail-ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--line); color: var(--cyan);
}
.rail .rail-ico svg { width: 20px; height: 20px; }
.rail h3 { font-size: 16px; }
.rail small { color: var(--dim); font-size: 10.5px; }
.rail ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.rail li { font-size: 12.5px; color: var(--muted); display: flex; gap: 9px; line-height: 1.5; }
.rail li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--violet); margin-top: 7px; flex: none; }

/* ------------------------------- faq -------------------------------- */

.faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
details.faq-item { border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.02); overflow: hidden; }
details.faq-item summary { cursor: pointer; padding: 17px 20px; font-size: 14px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: '+'; color: var(--cyan); font-size: 18px; font-weight: 400; }
details.faq-item[open] summary::after { content: '\2212'; }
details.faq-item .faq-body { padding: 0 20px 18px; color: var(--muted); font-size: 13.5px; line-height: 1.7; max-width: 700px; }

/* ------------------------------ submit ------------------------------ */

.submit-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 26px; align-items: start; }
.submit-aside { position: sticky; top: 92px; }
.submit-aside h3 { font-size: 24px; margin-bottom: 12px; }
.submit-aside p { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.checklist { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 11px; }
.checklist li { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); }
.checklist li::before {
  content: ''; flex: none; width: 13px; height: 13px; margin-top: 3px;
  border-left: 2px solid var(--green); border-bottom: 2px solid var(--green);
  transform: rotate(-45deg); border-radius: 1px;
}
.aside-note {
  margin-top: 24px; padding: 14px; border-radius: 12px; display: flex; gap: 10px;
  border: 1px dashed rgba(124, 92, 255, 0.32); background: rgba(124, 92, 255, 0.05);
  font-size: 11.5px; color: var(--muted); line-height: 1.65;
}
.aside-note .ni { color: var(--amber); flex: none; margin-top: 1px; }
.aside-note .ni svg { width: 15px; height: 15px; }

.form-card { padding: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section-title { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; }
.form-section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.auth-gate { padding: 34px; }
.auth-tabs { display: inline-flex; padding: 4px; border-radius: 11px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); margin-bottom: 22px; }
.auth-tabs button { border: none; background: transparent; color: var(--muted); padding: 8px 18px; border-radius: 8px; font-size: 12.5px; cursor: pointer; font-weight: 500; }
.auth-tabs button.active { background: rgba(124, 92, 255, 0.2); color: var(--text); }

.success-panel { text-align: center; padding: 40px 28px; }
.success-panel .big-check {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center;
  color: var(--green); background: rgba(46, 230, 168, 0.12); border: 1px solid rgba(46, 230, 168, 0.3);
}
.success-panel h3 { font-size: 26px; margin-bottom: 10px; }
.success-panel p { color: var(--muted); font-size: 13.5px; max-width: 440px; margin: 0 auto; line-height: 1.65; }
.id-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 8px 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong); border-radius: 10px; font-family: var(--mono); font-size: 13px; }

/* ------------------------------ footer ------------------------------ */

.footer { border-top: 1px solid var(--line); padding: 38px 0 28px; margin-top: 60px; }
.footer-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer p { color: var(--dim); font-size: 12px; }
.footer-links { margin-left: auto; display: flex; gap: 18px; }
.footer-links a { color: var(--muted); font-size: 12px; }
.footer-links a:hover { color: var(--text); }

/* ============================ dashboard ============================= */

.app-nav { border-bottom: 1px solid var(--line); background: rgba(7, 8, 15, 0.75); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 50; }
.app-nav .nav-inner { height: 62px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 38px 0 24px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(28px, 4vw, 38px); }
.page-head p { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

.dash-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 22px; padding-bottom: 60px; align-items: start; }
.side-card { padding: 16px; position: sticky; top: 82px; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 12px; }
.side-head h2 { font-size: 13px; letter-spacing: 0.02em; }
.bot-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; padding-right: 2px; }
.bot-item { padding: 12px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: 0.15s; }
.bot-item:hover { background: rgba(255, 255, 255, 0.045); }
.bot-item.active {
  background: linear-gradient(100deg, rgba(124, 92, 255, 0.22), rgba(69, 208, 255, 0.08));
  border-color: rgba(124, 92, 255, 0.35);
}
.bot-item .bi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bot-item b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-item small { color: var(--dim); font-family: var(--mono); font-size: 10px; }
.bot-item small .ico-svg { width: 11px; height: 11px; }
.side-foot { border-top: 1px solid var(--line); margin-top: 14px; padding: 14px 4px 2px; display: flex; flex-direction: column; gap: 10px; }
.side-user { display: flex; align-items: center; gap: 10px; }
.side-user .su-info { min-width: 0; }
.side-user b { display: block; font-size: 12.5px; font-weight: 600; }
.side-user small { color: var(--dim); font-size: 10.5px; }

.detail-empty { padding: 70px 30px; text-align: center; }
.detail-empty .de-ico { color: var(--lime); opacity: 0.85; margin-bottom: 16px; }
.detail-empty h3 { font-size: 20px; margin-bottom: 8px; }
.detail-empty p { color: var(--muted); font-size: 13px; max-width: 360px; margin: 0 auto 20px; }

.detail-head { padding: 24px; display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.detail-head .dh-info { min-width: 0; flex: 1; }
.detail-head h2 { font-size: 24px; margin-bottom: 5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-head h2 > .ico-svg { width: 21px; height: 21px; color: var(--cyan); }
.detail-head .dh-sub { color: var(--dim); font-family: var(--mono); font-size: 11px; display: flex; gap: 12px; flex-wrap: wrap; }
.detail-head .dh-sub .ico-svg { width: 12px; height: 12px; }
.detail-head .dh-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.detail-body { padding: 24px; }
.notice {
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03); font-size: 12.5px; color: var(--muted);
  display: flex; gap: 10px; line-height: 1.6;
}
.notice.warn { border-color: rgba(255, 176, 32, 0.25); background: rgba(255, 176, 32, 0.07); color: #ffdf9e; }
.notice.bad { border-color: rgba(255, 92, 122, 0.3); background: rgba(255, 92, 122, 0.08); color: #ffb3c1; }
.notice.good { border-color: rgba(46, 230, 168, 0.28); background: rgba(46, 230, 168, 0.07); color: #9df5da; }
.notice .ni { flex: none; display: inline-grid; place-items: center; margin-top: 1px; }
.notice .ni svg { width: 15px; height: 15px; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.info-cell { padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.02); min-width: 0; }
.info-cell small { display: block; color: var(--dim); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; }
.info-cell b { font-size: 13px; font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); padding: 0 24px; margin-top: 4px; overflow-x: auto; }
.tabs button { border: none; background: none; color: var(--muted); padding: 13px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tabs button .ico-svg { width: 14px; height: 14px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--violet); }
.tab-panel { padding: 24px; }

.console {
  background: #080a13; border: 1px solid var(--line); border-radius: 12px;
  height: 420px; overflow: auto; padding: 14px 16px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.75; color: #c6cbe4;
  scrollbar-width: thin;
}
.console .ln { white-space: pre-wrap; word-break: break-word; }
.console .ln.err { color: #ff9db0; }
.console .ln.sys { color: var(--cyan); }
.console .empty { color: var(--dim); font-style: italic; }
.console-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; flex-wrap: wrap; }
.console-toolbar .spacer { flex: 1; }

.file-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-height: 460px; overflow-y: auto; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; background: rgba(255, 255, 255, 0.015); cursor: pointer; }
.file-row:last-child { border-bottom: none; }
.file-row:hover { background: rgba(124, 92, 255, 0.07); }
.file-row .fi { color: var(--cyan); display: inline-grid; place-items: center; }
.file-row .fi svg { width: 14px; height: 14px; }
.file-row .fs { margin-left: auto; color: var(--dim); font-size: 10px; }
.file-row .truncate { flex: 1; min-width: 0; }
.file-row .file-actions { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.file-row .file-actions .btn { padding: 4px 8px; font-size: 10.5px; }

.env-editor { width: 100%; min-height: 300px; }
.code-view { background: #080a13; border: 1px solid var(--line); border-radius: 12px; padding: 16px; font-family: var(--mono); font-size: 11.5px; line-height: 1.7; max-height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-word; }

/* ============================== admin =============================== */

.admin-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.admin-nav {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 14, 24, 0.92), rgba(8, 9, 16, 0.86));
  backdrop-filter: blur(20px);
  padding: 20px 14px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 22px; z-index: 30;
}
.admin-nav .brand { padding: 4px 8px 10px; }
.admin-links { display: flex; flex-direction: column; gap: 3px; }
.admin-links button {
  display: flex; align-items: center; gap: 10px; border: 1px solid transparent; background: none;
  color: var(--muted); padding: 10px 12px; border-radius: 11px; font-size: 13px; font-weight: 500;
  cursor: pointer; text-align: left; width: 100%; transition: 0.18s; position: relative;
}
.admin-links button:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); transform: translateX(2px); }
.admin-links button.active {
  color: var(--text);
  background: linear-gradient(100deg, rgba(124, 92, 255, 0.22), rgba(69, 208, 255, 0.08));
  border-color: rgba(124, 92, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 26px -20px rgba(124, 92, 255, 0.9);
}
.admin-links button.active::before {
  content: ''; position: absolute; left: -1px; top: 22%; bottom: 22%; width: 3px;
  border-radius: 99px; background: var(--grad);
}
.admin-links button .ico { width: 18px; height: 18px; display: grid; place-items: center; color: inherit; opacity: 0.9; }
.admin-links button .count { margin-left: auto; font-size: 10px; background: rgba(255, 176, 32, 0.16); color: var(--amber); padding: 2px 7px; border-radius: 999px; }
.admin-nav .an-foot { margin-top: auto; padding: 4px; display: flex; flex-direction: column; gap: 8px; }
.admin-nav .an-foot a, .admin-nav .an-foot button { color: var(--dim); font-size: 11.5px; padding: 7px 8px; border-radius: 8px; border: none; background: none; text-align: left; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.admin-nav .an-foot .ico-svg { width: 13px; height: 13px; }
.admin-nav .an-foot a:hover, .admin-nav .an-foot button:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }

.admin-main { min-width: 0; padding: 32px 34px 60px; }
.admin-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-head h1 { font-size: 27px; }
.admin-head .ah-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.admin-head .spacer { flex: 1; }
.panel { display: flex; flex-direction: column; gap: 18px; }
.panel.hidden { display: none; }

.admin-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.admin-stat {
  padding: 17px; border: 1px solid var(--line); border-radius: 18px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(124, 92, 255, 0.13), transparent 55%),
    rgba(13, 15, 26, 0.66);
  backdrop-filter: blur(14px);
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.admin-stat:hover { transform: translateY(-2px); border-color: rgba(124, 92, 255, 0.32); }
.admin-stat b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; font-family: var(--display); }
.admin-stat small { color: var(--dim); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; }

.admin-cols { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 16px; align-items: start; }
.panel-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-title .spacer { flex: 1; }
.panel-title .mono-label { font-weight: 400; }
.panel-title .pt-ico {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(124, 92, 255, 0.14); border: 1px solid var(--line); color: var(--cyan);
  flex: none;
}
.panel-title .pt-ico svg { width: 14px; height: 14px; }
.panel-title > .ico-svg { width: 16px; height: 16px; color: var(--cyan); }

.request-list { display: flex; flex-direction: column; gap: 12px; }
.request-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.022); transition: border-color 0.2s ease; }
.request-card:hover { border-color: rgba(124, 92, 255, 0.32); }
.rc-top { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.rc-top h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-top h3 > .ico-svg { width: 16px; height: 16px; color: var(--cyan); }
.rc-meta { color: var(--dim); font-family: var(--mono); font-size: 10.5px; margin-top: 5px; display: flex; gap: 12px; flex-wrap: wrap; }
.rc-desc { color: var(--muted); font-size: 12.5px; margin: 12px 0; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line); }
.rc-foot .spacer { flex: 1; }
.rc-tag { font-family: var(--mono); font-size: 10px; color: var(--dim); background: rgba(255, 255, 255, 0.04); padding: 3px 8px; border-radius: 6px; }

.integration-card { padding: 22px; }
.integration-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.integration-head .ii {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--line); color: var(--cyan);
}
.integration-head .ii svg { width: 19px; height: 19px; }
.integration-head h3 { font-size: 16px; }
.integration-head .spacer { flex: 1; }
.integration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.integration-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.form-actions .spacer { flex: 1; }

.int-ico { display: inline-grid; place-items: center; color: var(--cyan); }
.int-ico svg { width: 15px; height: 15px; }

.table-wrap { border: 1px solid var(--line); border-radius: 18px; overflow: auto; background: rgba(11, 13, 23, 0.6); backdrop-filter: blur(14px); }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 720px; }
table.data th {
  text-align: left; padding: 12px 14px; font-size: 9.5px; letter-spacing: 0.11em; text-transform: uppercase;
  color: #8e98b6; border-bottom: 1px solid var(--line); background: rgba(14, 17, 29, 0.96);
  font-weight: 600; position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
table.data td { padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.045); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background 0.16s ease; }
table.data tbody tr:hover td { background: rgba(124, 92, 255, 0.07); }
table.data .name { font-weight: 600; }
table.data .name .ico-svg { width: 14px; height: 14px; color: var(--cyan); }
table.data .sub { color: var(--dim); font-family: var(--mono); font-size: 10px; }
.td-actions { display: flex; gap: 5px; justify-content: flex-end; }

/* ------------------------------ customers --------------------------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { position: relative; display: flex; align-items: center; flex: 1 1 240px; max-width: 360px; }
.toolbar .search .ico-svg { position: absolute; left: 12px; width: 15px; height: 15px; color: var(--dim); pointer-events: none; }
.toolbar .search input { width: 100%; padding-left: 34px; }
.toolbar select { width: auto; min-width: 150px; padding: 9px 32px 9px 12px; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person .avatar { flex: none; }
.person .who, .profile-head .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.person .who strong, .profile-head .who strong { font-size: 12.5px; font-weight: 600; color: var(--text); }
.person .who span, .profile-head .who span { font-size: 11px; color: var(--muted); }
.profile-head { display: flex; align-items: center; gap: 14px; padding: 4px 0 18px; border-bottom: 1px dashed var(--line); }
.profile-head .who .mono { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.user-bot-list { display: flex; flex-direction: column; gap: 7px; }
.user-bot {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025); color: var(--text); cursor: pointer;
  transition: 0.16s ease;
}
.user-bot:hover { border-color: var(--line-strong); background: rgba(124, 92, 255, 0.08); transform: translateX(2px); }
.user-bot .ub-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(124, 92, 255, 0.12); color: var(--violet); flex: none; }
.user-bot .ub-ico svg { width: 15px; height: 15px; }
.user-bot .ub-main { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.user-bot .ub-main strong { font-size: 12.5px; font-weight: 600; }
.user-bot .ub-main small { font-size: 10px; color: var(--dim); font-family: var(--mono); }
.user-bot .ub-arrow { color: var(--dim); display: grid; place-items: center; }
.user-bot .ub-arrow svg { width: 14px; height: 14px; }
@media (max-width: 760px) { .hide-sm { display: none; } }

.activity { display: flex; flex-direction: column; }
.act-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.act-item:last-child { border-bottom: none; }
.act-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); margin-top: 7px; flex: none; }
.act-item .a-main { min-width: 0; flex: 1; }
.act-item .a-main p { font-size: 12.5px; }
.act-item .a-main .ai {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px;
  background: rgba(255, 255, 255, 0.05); color: var(--muted); margin-right: 6px; vertical-align: -7px;
}
.act-item .a-main .ai svg { width: 12px; height: 12px; }
.act-item .a-main small { color: var(--dim); font-family: var(--mono); font-size: 9.5px; display: block; margin-top: 2px; }

.filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-row input { max-width: 260px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--muted); font-size: 11.5px; cursor: pointer; }
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.active { border-color: rgba(124, 92, 255, 0.5); background: rgba(124, 92, 255, 0.16); color: var(--text); }

/* ------------------------------- modal ------------------------------ */

.modal-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(4, 5, 10, 0.74); backdrop-filter: blur(7px); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 20px; overflow-y: auto; animation: fade 0.15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(680px, 100%); border-radius: 20px; border: 1px solid var(--line-strong); background: linear-gradient(160deg, rgba(22, 25, 42, 0.98), rgba(10, 12, 21, 0.98)); box-shadow: var(--shadow); animation: pop 0.18s ease; }
.modal.wide { width: min(940px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(0.99); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-head .spacer { flex: 1; }
.modal-close { border: none; background: rgba(255, 255, 255, 0.05); color: var(--muted); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.modal-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); }
.modal-body { padding: 22px; }
.modal-foot { padding: 15px 22px; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; }

/* ------------------------------- toast ------------------------------ */

#toast-stack { position: fixed; top: 18px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast {
  min-width: 250px; max-width: 380px; padding: 12px 15px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: rgba(17, 20, 33, 0.97);
  box-shadow: var(--shadow); font-size: 12.5px; display: flex; gap: 10px; align-items: flex-start;
  animation: slideIn 0.22s ease; pointer-events: auto; line-height: 1.5;
}
.toast .ti { flex: none; display: inline-grid; place-items: center; margin-top: 1px; }
.toast.good { border-color: rgba(46, 230, 168, 0.35); }
.toast.good .ti { color: var(--green); }
.toast.bad { border-color: rgba(255, 92, 122, 0.4); }
.toast.bad .ti { color: var(--red); }
.toast.info { border-color: rgba(124, 92, 255, 0.4); }
.toast.info .ti { color: var(--cyan); }
.toast.out { animation: slideOut 0.2s ease forwards; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
@keyframes slideOut { to { transform: translateX(30px); opacity: 0; } }

/* ----------------------------- utilities ---------------------------- */

.empty { text-align: center; padding: 40px 20px; color: var(--dim); font-size: 12.5px; }
.empty .e-ico { color: var(--lime); opacity: 0.75; margin-bottom: 10px; }
.divider { height: 1px; background: var(--line); margin: 6px 0; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link { color: var(--lime); }
.link:hover { text-decoration: underline; }
.cursor { cursor: pointer; }
.flex-col { display: flex; flex-direction: column; }

.confetti { position: fixed; z-index: 400; width: 8px; height: 12px; pointer-events: none; border-radius: 2px; animation: confettiFall var(--dur) ease-out forwards; }
@keyframes confettiFall {
  from { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 1; }
  to { transform: translate3d(var(--dx), 70vh, 0) rotate(var(--rot)); opacity: 0; }
}

/* skeleton */
.sk { background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; color: transparent !important; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* --------------------------- responsive ----------------------------- */

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { max-width: 560px; }
  .float-card { right: 8px; }
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
  .admin-cols { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 270px minmax(0, 1fr); }
  .submit-wrap { grid-template-columns: 1fr; }
  .submit-aside { position: static; }
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .steps, .rails { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .bot-list { max-height: 230px; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav {
    position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto;
    padding: 10px 12px; gap: 12px; border-right: none; border-bottom: 1px solid var(--line);
  }
  .admin-nav .brand span:not(.brand-mark) { display: none; }
  .admin-links { flex-direction: row; }
  .admin-links button { white-space: nowrap; padding: 8px 11px; }
  .admin-links button.active::before { display: none; }
  .admin-links button .count { display: none; }
  .admin-nav .an-foot { margin: 0 0 0 auto; flex-direction: row; }
  .admin-main { padding: 20px 18px 50px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .integration-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}

@media (max-width: 520px) {
  .container { width: calc(100% - 28px); }
  .hero { padding-top: 44px; }
  .hero h1 { font-size: 42px; }
  .terminal-body { font-size: 10.5px; padding: 14px; min-height: 220px; }
  .float-card { position: static; margin-top: 16px; width: 100%; transform: none; animation: none; }
  .hero-meta { gap: 16px; }
  .form-card, .auth-gate { padding: 20px; }
  .detail-head, .detail-body, .tab-panel { padding: 18px; }
  .tabs { padding: 0 14px; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .rc-foot .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
