/* Rust Panel - dark theme */

@font-face { font-family: 'Inter'; src: url('/vendor/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/vendor/fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --bg: #090b0f;
  --bg-2: #0d1015;
  --panel: #12151b;
  --panel-2: #191d24;
  --hover: #1f242c;
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.12);
  --text: #edf0f3;
  --text-2: #b9bfc9;
  --muted: #7f8794;
  --faint: #5a626e;
  --accent: #ea6a35;
  --accent-2: #f6834f;
  --accent-soft: rgba(234, 106, 53, 0.14);
  --green: #3fcf8e;
  --green-soft: rgba(63, 207, 142, 0.12);
  --red: #f2585e;
  --red-soft: rgba(242, 88, 94, 0.12);
  --amber: #f1b23f;
  --amber-soft: rgba(241, 178, 63, 0.13);
  --blue: #62aaf6;
  --blue-soft: rgba(98, 170, 246, 0.12);
  --violet: #a698ff;
  --violet-soft: rgba(166, 152, 255, 0.13);
  --folder: #e2ad52;
  --radius: 14px;
  --radius-sm: 9px;
  --card: linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.012));
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px -14px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 30px 80px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'Cascadia Mono', Consolas, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(98, 170, 246, 0.07), transparent 62%),
    radial-gradient(900px 480px at 30% -12%, rgba(234, 106, 53, 0.07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.5 var(--font);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(234, 106, 53, 0.35); }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
code { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 680; letter-spacing: -0.018em; }
h1 { font-size: 26px; letter-spacing: -0.025em; }
h2 { font-size: 16px; }
h3 { font-size: 15px; display: flex; align-items: center; gap: 9px; }
h3 .icon { color: var(--muted); }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.pad { padding: 14px; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.pre-line { white-space: pre-line; }
.tone-red { color: var(--red); }
.tone-green { color: var(--green); }
.tone-amber { color: var(--amber); }
.tone-folder { color: var(--folder); }
.icon { flex: none; vertical-align: middle; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.985); } }
@keyframes slide { from { transform: translateX(28px); opacity: 0.5; } }

/* thin dark scrollbars */
* { scrollbar-width: thin; scrollbar-color: #2a3038 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #262b33; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #343a44; background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- form controls */
input, select, textarea {
  font: inherit; color: var(--text); width: 100%;
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  padding: 9px 12px; outline: none; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
input:hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, 0.17); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), inset 0 1px 2px rgba(0, 0, 0, 0.35); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type='checkbox'], input[type='radio'] { width: auto; accent-color: var(--accent); box-shadow: none; }
select {
  width: auto; padding-right: 32px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237f8794' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
textarea { resize: vertical; }
label { display: flex; flex-direction: column; gap: 7px; font-weight: 560; font-size: 13px; color: var(--text-2); margin-bottom: 15px; }
label > input, label > select, label > textarea { font-weight: 400; }
label .muted { font-weight: 400; }
.field-label { font-weight: 620; font-size: 13px; color: var(--text-2); margin: 4px 0 9px; }
.form-error { color: #ff9a9e; background: var(--red-soft); border: 1px solid rgba(242, 88, 94, 0.28); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 13px; font: inherit; font-weight: 580; font-size: 13.5px; white-space: nowrap;
  color: var(--text); cursor: pointer; border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  border: 1px solid var(--border-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.btn .icon { opacity: 0.9; }
.btn:hover:not(:disabled) { background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.055)); border-color: rgba(255, 255, 255, 0.18); text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible, .icon-btn:focus-visible, .menu-item:focus-visible, .seg button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary {
  color: #fff; border-color: rgba(255, 140, 90, 0.5);
  background: linear-gradient(180deg, #f27c46, #dd5a26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 18px -6px rgba(234, 106, 53, 0.6);
}
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #f8894f, #e3622d); border-color: rgba(255, 160, 115, 0.6); }
.btn-danger { color: #fff; border-color: rgba(255, 120, 125, 0.45); background: linear-gradient(180deg, #e54a50, #c7353b); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 18px -8px rgba(242, 88, 94, 0.6); }
.btn-danger:hover:not(:disabled) { background: linear-gradient(180deg, #ee5a60, #d23d43); }
.btn-danger-ghost { color: #ff9599; }
.btn-danger-ghost:hover:not(:disabled) { background: var(--red-soft); border-color: rgba(242, 88, 94, 0.4); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.05); border-color: var(--border); }
.btn-sm { height: 29px; padding: 0 10px; font-size: 12.5px; gap: 6px; border-radius: 8px; }
.btn-icon { padding: 0 8px; }
.btn-block { width: 100%; height: 42px; font-size: 14px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 8px; background: transparent; border: 0; color: var(--muted); cursor: pointer; transition: background 0.12s, color 0.12s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); text-decoration: none; }
.icon-btn.danger:hover { color: var(--red); background: var(--red-soft); }

/* ---------- pills, tags, dots */
.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px;
  font-size: 12px; font-weight: 620; border-radius: 999px; white-space: nowrap; border: 1px solid transparent;
}
.pill .dot { width: 7px; height: 7px; margin: 0; border-radius: 50%; background: currentColor; }
.pill-green { color: var(--green); background: var(--green-soft); border-color: rgba(63, 207, 142, 0.25); }
.pill-green .dot { box-shadow: 0 0 0 3px rgba(63, 207, 142, 0.18), 0 0 8px rgba(63, 207, 142, 0.7); }
.pill-red { color: #ff8a8f; background: var(--red-soft); border-color: rgba(242, 88, 94, 0.26); }
.pill-amber { color: var(--amber); background: var(--amber-soft); border-color: rgba(241, 178, 63, 0.28); }
.pill-muted { color: var(--muted); background: rgba(255, 255, 255, 0.04); border-color: var(--border); }
.tag { display: inline-block; font-size: 11px; font-weight: 640; color: var(--text-2); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-2); border-radius: 6px; padding: 0 6px; line-height: 18px; vertical-align: middle; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }
.dot-green { background: var(--green); box-shadow: 0 0 6px rgba(63, 207, 142, 0.6); }
.dot-red { background: var(--red); }
.dot-amber { background: var(--amber); }
.count-chip { font-size: 12px; font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px; }

/* server tags */
.grp-hollow { --grp: var(--violet); --grp-soft: var(--violet-soft); }
.grp-ace { --grp: #f3b84a; --grp-soft: rgba(243, 184, 74, 0.13); }
.grp-none { --grp: var(--muted); --grp-soft: rgba(255, 255, 255, 0.05); }
.tags { display: inline-flex; gap: 5px; vertical-align: middle; margin-left: 4px; }
.rate-tag, .group-tag, .region-tag { display: inline-block; font-size: 10.5px; font-weight: 720; line-height: 18px; padding: 0 7px; border-radius: 6px; letter-spacing: 0.03em; }
.rate-tag { color: var(--text); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-2); font-family: var(--mono); }
.region-tag { color: #8cc1f7; background: var(--blue-soft); border: 1px solid rgba(98, 170, 246, 0.3); }
.group-tag { color: var(--grp); background: var(--grp-soft); border: 1px solid color-mix(in srgb, var(--grp) 35%, transparent); }
.sh-title h1 .tags .rate-tag, .sh-title h1 .tags .group-tag, .sh-title h1 .tags .region-tag { font-size: 11.5px; line-height: 21px; padding: 0 8px; }

/* ---------- boot & sign-in */
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.login {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden;
  background:
    radial-gradient(600px 400px at 50% 0%, rgba(234, 106, 53, 0.16), transparent 70%),
    radial-gradient(700px 500px at 100% 100%, rgba(98, 170, 246, 0.08), transparent 70%),
    var(--bg);
}
.login::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 30%, transparent 75%);
}
.login-card {
  position: relative; width: 100%; max-width: 400px; padding: 32px;
  background: linear-gradient(180deg, rgba(25, 29, 36, 0.92), rgba(16, 19, 24, 0.92)); backdrop-filter: blur(12px);
  border: 1px solid var(--border-2); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop 0.25s ease-out;
}
.login-card h1 { margin: 26px 0 8px; font-size: 22px; }
.login-card p { font-size: 13px; margin-bottom: 18px; }
.login-card .form-error { margin-bottom: 14px; }
.login-alt { margin: 16px 0 0; }

.brand { display: flex; align-items: center; gap: 11px; font-weight: 720; font-size: 15px; letter-spacing: -0.015em; color: var(--text); }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; flex: none;
  background: linear-gradient(140deg, #ff9a64 0%, #ea6a35 45%, #b8401a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 22px -6px rgba(234, 106, 53, 0.65);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 740; font-size: 15.5px; letter-spacing: -0.015em; }
.brand-sub { font-size: 11.5px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.brand-lg .brand-mark { width: 40px; height: 40px; border-radius: 12px; }
.brand-lg .brand-name { font-size: 17px; }

/* ---------- shell & sidebar */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 252px; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; padding: 16px 14px 14px;
  background:
    radial-gradient(240px 180px at 30px 0, rgba(234, 106, 53, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(17, 20, 26, 0.96), rgba(11, 13, 17, 0.98));
  border-right: 1px solid var(--border);
}
.sidebar .brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; }
.sidebar .brand:hover { text-decoration: none; }
.sidebar .brand-mark { width: 36px; height: 36px; }
.side-label { font-size: 10.5px; font-weight: 720; color: var(--faint); text-transform: uppercase; letter-spacing: 0.1em; padding: 14px 10px 7px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px;
  border-radius: 9px; color: var(--text-2); font-weight: 560; transition: background 0.12s, color 0.12s;
}
.side-nav a .icon { color: var(--muted); transition: color 0.12s; }
.side-nav a:hover { background: rgba(255, 255, 255, 0.045); color: var(--text); text-decoration: none; }
.side-nav a:hover .icon { color: var(--text-2); }
.side-nav a.active { background: linear-gradient(90deg, rgba(234, 106, 53, 0.17), rgba(234, 106, 53, 0.04)); color: var(--text); }
.side-nav a.active .icon { color: var(--accent-2); }
.side-nav a.active::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px rgba(234, 106, 53, 0.7); }
.nav-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--muted); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); border-radius: 999px; padding: 0 8px; line-height: 19px; }
.side-nav a.active .nav-count { color: var(--text-2); border-color: var(--border-2); }
.nav-count.bad { color: #ff8a8f; background: var(--red-soft); border-color: rgba(242, 88, 94, 0.3); }
.nav-count.busy { color: #1a1205; background: var(--amber); border-color: var(--amber); animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px rgba(241, 178, 63, 0.18); } }
.side-groups a.active { background: var(--grp-soft); }
.side-groups a.active::before { background: var(--grp); box-shadow: 0 0 12px var(--grp); }
.side-groups .group-swatch { width: 10px; height: 10px; margin: 0 3px; }
.side-status { margin: 16px 2px 2px; padding: 13px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.028); border: 1px solid var(--border); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03); }
.side-status-top { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 600; }
.side-status-top b { font-size: 21px; color: var(--text); font-weight: 760; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.side-status-top small { font-size: 13px; color: var(--muted); font-weight: 600; }
.side-meter { height: 5px; margin: 9px 0 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.side-meter div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2f9e6a, var(--green)); box-shadow: 0 0 10px rgba(63, 207, 142, 0.5); transition: width 0.5s; }
.side-status-foot { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); }
.side-status-foot .dot { width: 7px; height: 7px; margin-right: 7px; }
.busy-text { color: #f5c86f; }
.sidebar-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.me-menu { display: block; }
.me-menu > span { display: block; }
.me {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 8px 8px; text-align: left;
  font: inherit; color: var(--text); cursor: pointer;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: 12px; transition: background 0.12s, border-color 0.12s;
}
.me:hover { background: rgba(255, 255, 255, 0.055); border-color: var(--border-2); }
.avatar { position: relative; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; font-weight: 760; color: #fff; background: linear-gradient(140deg, #ff9a64, #c2481d); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.live-pip { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #0e1115; }
.live-pip.on { background: var(--green); }
.live-pip.off { background: var(--amber); }
.me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.me-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-role { font-size: 11.5px; color: var(--muted); }
.me-chevron { color: var(--muted); }
.me-menu .dropdown-menu { left: 0; right: 0; min-width: 0; }
.version { font-size: 11px; color: var(--faint); padding: 0 10px; }
.main { flex: 1; min-width: 0; }
.page { padding: 30px 36px 120px; max-width: 1480px; animation: fade 0.2s ease-out; }
.live-banner { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 36px; font-size: 13px; color: #f5c86f; background: var(--amber-soft); border-bottom: 1px solid rgba(241, 178, 63, 0.25); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.summary { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.head-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; }
.search .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 36px; width: 260px; }
.search-sm input { width: 170px; height: 31px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; }

.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty-card { text-align: center; padding: 54px 24px; background: var(--card), var(--panel); border: 1px dashed var(--border-2); border-radius: 18px; color: var(--muted); }
.empty-card h2 { color: var(--text); margin: 16px 0 6px; font-size: 18px; }
.empty-card p { max-width: 470px; margin: 0 auto 20px; }
.empty-icon { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; color: var(--accent-2); background: var(--accent-soft); border: 1px solid rgba(234, 106, 53, 0.25); box-shadow: 0 10px 30px -10px rgba(234, 106, 53, 0.5); }

/* ---------- cards */
.card { background: var(--card), var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { padding: 18px; }
.panel > h3 { margin-bottom: 12px; }
.page > .card.panel + .card.panel { margin-top: 16px; }

/* ---------- dashboard */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.tile {
  --c: var(--muted); --c-soft: rgba(255, 255, 255, 0.05);
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--card), var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.tile::after { content: ''; position: absolute; right: -30px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, var(--c-soft), transparent 70%); pointer-events: none; }
.tile-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; color: var(--c); background: var(--c-soft); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); }
.tile-value { font-size: 26px; font-weight: 760; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile-value small { font-size: 15px; color: var(--muted); font-weight: 600; }
.tile-label { font-size: 12.5px; color: var(--muted); font-weight: 560; margin-top: 2px; }
.tile-green { --c: var(--green); --c-soft: var(--green-soft); }
.tile-red { --c: var(--red); --c-soft: var(--red-soft); }
.tile-amber { --c: var(--amber); --c-soft: var(--amber-soft); }
.tile-blue { --c: var(--blue); --c-soft: var(--blue-soft); }

.view-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 26px; }
.seg { display: inline-flex; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border-2); border-radius: 10px; padding: 3px; gap: 2px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35); }
.seg button { font: inherit; font-size: 12.5px; font-weight: 620; color: var(--text-2); background: none; border: 0; border-radius: 7px; padding: 5px 12px; cursor: pointer; white-space: nowrap; transition: background 0.12s, color 0.12s; }
.seg button:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.seg button.on { color: var(--text); background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); box-shadow: 0 0 0 1px var(--border-2), 0 1px 3px rgba(0, 0, 0, 0.4); }
.seg button.on.grp-hollow, .seg button.on.grp-ace { color: var(--grp); background: var(--grp-soft); box-shadow: 0 0 0 1px color-mix(in srgb, var(--grp) 40%, transparent); }
.seg button .icon { margin-right: 3px; vertical-align: -2px; }
.seg-groups button { display: inline-flex; align-items: center; gap: 7px; }
.seg-groups .group-swatch { width: 8px; height: 8px; border-radius: 3px; box-shadow: none; }
.seg-wide { display: flex; margin-bottom: 16px; }
.seg-wide button { flex: 1; padding: 8px; }

.group { margin-bottom: 32px; }
.group-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.group-head h2 { font-size: 17px; }
.group-title { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.group-swatch { width: 11px; height: 11px; border-radius: 3px; background: var(--grp); box-shadow: 0 0 0 3px var(--grp-soft), 0 0 10px var(--grp-soft); }
.group-stats { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin-left: auto; flex-wrap: wrap; }
.group-empty { font-size: 13px; background: rgba(255, 255, 255, 0.02); border: 1px dashed var(--border-2); border-radius: var(--radius); padding: 18px; }
.check { margin: 0; flex-direction: row; display: inline-flex; cursor: pointer; }
.check input { width: 16px; height: 16px; cursor: pointer; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr)); gap: 14px; }
.server-card {
  --edge: var(--faint);
  position: relative; min-width: 0; padding: 16px 16px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 12px; overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.server-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--edge); opacity: 0.9; }
.server-card::after { content: ''; position: absolute; left: 0; top: 0; width: 160px; height: 100px; background: radial-gradient(ellipse at 0 0, color-mix(in srgb, var(--edge) 16%, transparent), transparent 70%); pointer-events: none; }
.server-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px -18px rgba(0, 0, 0, 0.85); }
.server-card.selected { border-color: rgba(234, 106, 53, 0.7); box-shadow: 0 0 0 1px rgba(234, 106, 53, 0.7) inset, 0 12px 30px -14px rgba(234, 106, 53, 0.4); }
.server-card.dim { opacity: 0.55; }
.st-running { --edge: var(--green); }
.st-stopped { --edge: var(--red); }
.st-busy, .st-starting, .st-stopping, .st-paused { --edge: var(--amber); }
.st-offline { --edge: var(--faint); }
.server-card .check { opacity: 0.35; padding-top: 3px; transition: opacity 0.12s; }
.server-card:hover .check, .server-card.selected .check { opacity: 1; }
.sc-top { display: flex; gap: 10px; align-items: flex-start; position: relative; z-index: 1; }
.sc-title { min-width: 0; flex: 1; }
.sc-name { font-weight: 680; font-size: 15.5px; letter-spacing: -0.012em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-path { font-family: var(--mono); font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.sc-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; z-index: 1; }
.sc-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-height: 32px; align-items: center; }
.sc-idle { display: flex; font-size: 12.5px; color: var(--faint); }
.mini { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: 12px; }
.mini-label { color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: 0.04em; }
.mini b { font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.mini-bar { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.mini-bar i { display: block; height: 100%; min-width: 3px; border-radius: 99px; background: linear-gradient(90deg, #d4582a, var(--accent-2)); transition: width 0.5s; }
.sc-actions { display: flex; gap: 6px; align-items: center; margin: 2px -16px -14px; padding: 11px 16px; background: rgba(0, 0, 0, 0.18); border-top: 1px solid var(--border); }
.sc-actions .dropdown { margin-left: auto; }
.sc-downs { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #ff8a8f; }

/* ---------- dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); z-index: 30; min-width: 210px; padding: 5px;
  background: rgba(24, 28, 35, 0.97); backdrop-filter: blur(14px); border: 1px solid var(--border-2); border-radius: 12px;
  box-shadow: var(--shadow-lg); animation: pop 0.12s ease-out;
}
.dropdown-menu.align-right { right: 0; }
.dropdown-menu.align-left { left: 0; }
.dropdown-menu.drop-up { top: auto; bottom: calc(100% + 6px); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; font-size: 13.5px; color: var(--text); background: none; border: 0; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.menu-item .icon { color: var(--muted); }
.menu-item:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); }
.menu-item:hover:not(:disabled) .icon { color: var(--text-2); }
.menu-item:disabled { opacity: 0.4; cursor: not-allowed; }
.menu-item.danger, .menu-item.danger .icon { color: #ff9599; }
.menu-item.danger:hover:not(:disabled) { background: var(--red-soft); }
.menu-sep { height: 1px; background: var(--border); margin: 5px 6px; }

/* ---------- bulk bar */
.bulkbar {
  position: fixed; bottom: 20px; left: calc(252px + (100vw - 252px) / 2); transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
  background: rgba(24, 28, 35, 0.95); backdrop-filter: blur(16px); border: 1px solid var(--border-2); border-radius: 14px;
  padding: 9px 11px; box-shadow: var(--shadow-lg); z-index: 20; max-width: calc(100vw - 290px); animation: pop 0.18s ease-out;
}
.bulk-count { font-weight: 680; padding: 0 9px; white-space: nowrap; }
.bulk-sep, .bar-sep { width: 1px; align-self: stretch; background: var(--border-2); margin: 2px 4px; }

/* ---------- server page */
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.hero { position: relative; margin-bottom: 20px; }
.hero::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 140px; border-radius: var(--radius) var(--radius) 0 0; background: radial-gradient(500px 140px at 0 0, rgba(234, 106, 53, 0.12), transparent 70%); pointer-events: none; }
.server-head { position: relative; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 22px; }
.hero-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; flex: none; color: var(--accent-2); background: var(--accent-soft); border: 1px solid rgba(234, 106, 53, 0.25); box-shadow: 0 10px 28px -12px rgba(234, 106, 53, 0.6); }
.sh-title { flex: 1; min-width: 0; }
.sh-title h1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 25px; }
.hero-sub { display: flex; align-items: center; gap: 12px; margin-top: 5px; color: var(--muted); font-size: 13px; min-width: 0; }
.hero-sub .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.hero-machine { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--text-2); font-weight: 560; }
.sh-status { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sh-status-top { display: flex; align-items: center; gap: 8px; }
.svc-line { display: inline-flex; align-items: center; gap: 5px; }
.svc-line b { color: var(--text-2); font-weight: 620; }
.action-bar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; padding: 12px 22px; border-top: 1px solid var(--border); background: rgba(0, 0, 0, 0.18); border-radius: 0 0 var(--radius) var(--radius); }
.act-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bar-label { font-size: 10.5px; font-weight: 720; color: var(--faint); text-transform: uppercase; letter-spacing: 0.1em; margin-right: 2px; }
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tabs a { position: relative; padding: 10px 15px; color: var(--muted); font-weight: 620; border-radius: 8px 8px 0 0; transition: color 0.12s, background 0.12s; }
.tabs a:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); text-decoration: none; }
.tabs a.active { color: var(--text); }
.tabs a.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px rgba(234, 106, 53, 0.7); }

.overview { display: flex; flex-direction: column; gap: 16px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { display: flex; align-items: center; gap: 13px; padding: 15px 17px; background: var(--card), var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-icon { --c: var(--muted); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 26%, transparent); }
.si-green { --c: var(--green); }
.si-blue { --c: var(--blue); }
.si-amber { --c: var(--amber); }
.si-violet { --c: var(--violet); }
.stat-label { font-size: 11.5px; color: var(--muted); font-weight: 640; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.stat-value { font-size: 20px; font-weight: 720; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.file-row {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; font: inherit; color: var(--text);
  background: rgba(0, 0, 0, 0.2); border: 1px solid var(--border); border-radius: 11px; padding: 11px 14px; margin-bottom: 8px; cursor: pointer; transition: border-color 0.12s, background 0.12s;
}
.file-row:hover:not(:disabled) { border-color: rgba(234, 106, 53, 0.45); background: rgba(234, 106, 53, 0.06); }
.file-row:disabled { opacity: 0.5; cursor: not-allowed; }
.file-row .icon { color: var(--accent-2); }
.panel > a.small { display: inline-block; margin-top: 6px; }
.link { color: var(--accent-2); font-weight: 620; }
.script-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.script-row:last-child { border-bottom: 0; }
.script-row .icon { color: var(--muted); }
.script-row .mono { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.script-label { width: 92px; flex: none; font-weight: 580; }

/* ---------- tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: 11px; font-weight: 680; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: rgba(255, 255, 255, 0.03); }
.table tr.clickable:hover td:first-child { border-radius: 9px 0 0 9px; }
.table tr.clickable:hover td:last-child { border-radius: 0 9px 9px 0; }
.act { display: inline-flex; align-items: center; gap: 10px; font-weight: 580; }
.act-icon { --c: var(--muted); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 24%, transparent); }
.act-start { --c: var(--green); }
.act-stop, .act-wipemap, .act-wipebp, .act-forcewipe { --c: var(--red); }
.act-restart { --c: var(--blue); }
.act-update { --c: var(--violet); }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions > * { vertical-align: middle; }
.row-actions > * + * { margin-left: 4px; }
.locked-pill { margin-left: 6px; }

/* ---------- files */
.files { position: relative; overflow: hidden; }
.files-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 14px; border-bottom: 1px solid var(--border); background: rgba(0, 0, 0, 0.15); }
.path-crumbs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-width: 0; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 620; color: var(--text-2); background: none; border: 0; padding: 4px 8px; border-radius: 7px; cursor: pointer; }
.crumb:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.crumb .icon { color: var(--folder); }
.file-table td { padding-top: 8px; padding-bottom: 8px; }
.file-table td:first-child, .file-table th:first-child { padding-left: 16px; }
.fname { display: inline-flex; align-items: center; gap: 11px; word-break: break-all; }
.files-msg { margin: 16px; }
.files-loading { position: absolute; inset: 54px 0 0; display: grid; place-items: center; background: rgba(9, 11, 15, 0.5); color: var(--muted); }
.upload-progress { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--accent-soft); font-size: 13px; }
.upload-progress .meter-bar { flex: 1; }
.drop-hint { display: none; }
.files.dragging { border-color: var(--accent); }
.files.dragging .drop-hint { display: grid; place-items: center; position: absolute; inset: 0; background: rgba(234, 106, 53, 0.12); border: 2px dashed var(--accent); border-radius: var(--radius); color: var(--accent-2); font-weight: 680; font-size: 15px; pointer-events: none; }

/* ---------- meters */
.meter { min-width: 0; }
.meter-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 560; }
.meter-text { color: var(--text-2); font-variant-numeric: tabular-nums; }
.meter-bar { height: 7px; background: rgba(255, 255, 255, 0.06); border-radius: 99px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4); }
.meter-fill { height: 100%; border-radius: 99px; transition: width 0.4s; }
.fill-ok { background: linear-gradient(90deg, #d4582a, var(--accent-2)); }
.fill-amber { background: linear-gradient(90deg, #d39427, var(--amber)); }
.fill-red { background: linear-gradient(90deg, #cf3c42, var(--red)); }

/* ---------- machines */
.machine-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(430px, 100%), 1fr)); gap: 16px; }
.machine-card { min-width: 0; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.mc-head { display: flex; align-items: flex-start; gap: 14px; }
.mc-head h2 { margin-bottom: 3px; font-size: 17px; }
.mc-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none; color: var(--muted); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-2); }
.mc-icon.on { color: var(--green); background: var(--green-soft); border-color: rgba(63, 207, 142, 0.28); box-shadow: 0 8px 22px -10px rgba(63, 207, 142, 0.6); }
.mc-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 18px; padding: 14px; background: rgba(0, 0, 0, 0.18); border: 1px solid var(--border); border-radius: 11px; }
.mc-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-facts > span { font-size: 12px; color: var(--text-2); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.mc-actions { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--border); padding-top: 14px; }
.notice { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--amber-soft); color: #f5c86f; border: 1px solid rgba(241, 178, 63, 0.25); margin: 0 0 12px; }
.notice.ok { background: var(--green-soft); color: #7fe0b2; border-color: rgba(63, 207, 142, 0.25); }
.notice.warn { background: var(--amber-soft); }
.machine-card .notice { margin: 0; }

/* ---------- overlays */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; overflow-y: auto;
  background: rgba(4, 5, 8, 0.6); backdrop-filter: blur(6px); animation: fade 0.15s ease-out;
}
.modal { width: 100%; max-width: 520px; display: flex; flex-direction: column; background: linear-gradient(180deg, #1a1e25, #14171d); border: 1px solid var(--border-2); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop 0.18s ease-out; }
.modal-sm { max-width: 440px; }
.modal-lg { max-width: 720px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; }
.modal-head h3 { flex: 1; font-size: 16px; }
.modal-body { padding: 4px 20px 10px; }
.modal-body p { color: var(--text-2); }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); margin-top: 6px; background: rgba(0, 0, 0, 0.15); border-radius: 0 0 18px 18px; }
.preview-body { padding: 8px 20px; text-align: center; }
.preview-body img { max-width: 100%; max-height: 65vh; border-radius: 10px; border: 1px solid var(--border); }

.modal-editor { max-width: 1120px; height: 84vh; }
.overlay:has(.modal-editor) { padding-top: 5vh; }
.editor-title { min-width: 0; }
.editor-title h3 { flex: none; }
.dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); display: inline-block; box-shadow: 0 0 8px rgba(241, 178, 63, 0.7); }
.editor-hint { display: flex; align-items: center; gap: 8px; margin: 0 20px 10px; padding: 8px 12px; font-size: 12.5px; color: var(--text-2); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.editor-hint.warn { color: #f5c86f; background: var(--amber-soft); border-color: rgba(241, 178, 63, 0.25); }
.editor-body { flex: 1; min-height: 0; margin: 0 20px; display: flex; }
.editor-msg { margin: auto; text-align: center; color: var(--muted); }
.code { flex: 1; display: flex; min-height: 0; background: #07090c; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.code:focus-within { border-color: var(--border-2); }
.gutter { margin: 0; padding: 14px 10px 14px 14px; text-align: right; color: #3e4550; user-select: none; font: 13px/1.65 var(--mono); overflow: hidden; background: rgba(255, 255, 255, 0.015); border-right: 1px solid var(--border); min-width: 50px; }
.code textarea { flex: 1; border: 0; border-radius: 0; background: transparent; resize: none; box-shadow: none !important; padding: 14px 16px; font: 13px/1.65 var(--mono); white-space: pre; overflow: auto; tab-size: 4; color: #dfe3e8; }

/* job output drawer */
.drawer-wrap { position: fixed; inset: 0; z-index: 45; display: flex; justify-content: flex-end; background: rgba(4, 5, 8, 0.45); backdrop-filter: blur(3px); animation: fade 0.15s ease-out; }
.drawer { width: min(840px, 100vw); height: 100%; display: flex; flex-direction: column; background: linear-gradient(180deg, #171a20, #111419); border-left: 1px solid var(--border-2); box-shadow: var(--shadow-lg); animation: slide 0.18s ease-out; }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { margin-bottom: 4px; }
.drawer-foot { display: flex; align-items: center; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--border); background: rgba(0, 0, 0, 0.18); }
.console { flex: 1; margin: 0; padding: 16px 20px; overflow: auto; background: #06080b; color: #d5dae1; font: 12.5px/1.65 var(--mono); white-space: pre-wrap; word-break: break-word; }
.console-modal { margin: 0 20px 20px; border: 1px solid var(--border); border-radius: 11px; }
.cursor { color: var(--accent-2); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* live server console */
.console-card { overflow: hidden; }
.console-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 14px; border-bottom: 1px solid var(--border); background: rgba(0, 0, 0, 0.15); }
.log-pick { font-family: var(--mono); font-size: 12.5px; height: 31px; padding: 4px 30px 4px 10px; max-width: 360px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.live-dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(63, 207, 142, 0.2), 0 0 10px rgba(63, 207, 142, 0.6); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(63, 207, 142, 0.06), 0 0 10px rgba(63, 207, 142, 0.4); } }
.console-note { padding: 9px 16px; font-size: 13px; color: var(--text-2); background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid var(--border); }
.console-note.warn { color: #f5c86f; background: var(--amber-soft); }
.console-wrap { position: relative; }
.console-live { height: calc(100vh - 470px); min-height: 380px; margin: 0; border-radius: 0; }
.console-jump { position: absolute; right: 20px; bottom: 16px; box-shadow: var(--shadow-lg); }

/* ---------- link a machine, settings, account */
.inline-form { display: flex; gap: 8px; margin-bottom: 12px; }
.steps { padding-left: 20px; margin: 4px 0 14px; color: var(--text-2); }
.steps li { margin-bottom: 10px; padding-left: 4px; }
.steps li::marker { color: var(--accent-2); font-weight: 700; }
.codebox { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; background: #07090c; border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 10px 6px 10px 12px; }
.codebox code { flex: 1; background: none; border: 0; padding: 0; font-size: 12px; word-break: break-all; color: #f6b48d; user-select: all; }
.link-fields { display: grid; gap: 9px; margin: 4px 0 16px 20px; }
.link-field { display: flex; align-items: center; gap: 12px; background: #07090c; border: 1px solid var(--border-2); border-radius: 11px; padding: 9px 9px 9px 15px; }
.link-label { width: 110px; flex: none; color: var(--muted); font-size: 12.5px; font-weight: 640; }
.link-value { flex: 1; font-size: 15px; color: var(--text); word-break: break-all; }
.link-code { font-size: 24px; font-weight: 760; letter-spacing: 0.14em; color: var(--accent-2); text-shadow: 0 0 22px rgba(234, 106, 53, 0.45); }
.radio-card { flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: var(--radius); cursor: pointer; margin-bottom: 8px; font-weight: 400; color: var(--text); }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.hidden-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.danger-zone { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.danger-zone .field-label { width: 100%; color: #ff9599; }
.inline-user { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.inline-user label { margin: 0; flex: 1; min-width: 160px; }
.check-row { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; color: var(--text); margin-bottom: 10px; }
.tfa-qr { width: 200px; height: 200px; margin: 8px auto 12px; padding: 9px; background: #fff; border-radius: 14px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.8); }
.tfa-qr svg { width: 100%; height: 100%; display: block; }
.tfa-secret { display: inline-block; margin-top: 6px; font-size: 13px; letter-spacing: 0.06em; user-select: all; }
.tfa-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 18px; padding: 14px 18px; margin: 0 0 10px; background: #07090c; border: 1px solid var(--border-2); border-radius: var(--radius-sm); font-size: 14px; letter-spacing: 0.05em; user-select: all; }
.tfa-actions { display: flex; gap: 8px; justify-content: flex-end; margin: 10px 0 4px; }
.tfa-actions.left { justify-content: flex-start; margin-bottom: 14px; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.acct-row:last-child { border-bottom: 0; }
.acct-row .pill { margin-left: 6px; height: 21px; }

/* ---------- toasts */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; font-size: 13.5px;
  background: rgba(26, 30, 37, 0.96); backdrop-filter: blur(14px); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: var(--shadow-lg);
  animation: slide 0.2s ease-out;
}
.toast .icon { margin-top: 1px; color: var(--blue); }
.toast-success .icon { color: var(--green); }
.toast-error { border-color: rgba(242, 88, 94, 0.35); }
.toast-error .icon { color: var(--red); }

/* ---------- small screens */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { position: sticky; top: 0; z-index: 40; width: 100%; height: auto; flex-direction: row; align-items: center; gap: 6px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--border); overflow: visible; background: rgba(11, 13, 17, 0.92); backdrop-filter: blur(14px); }
  .sidebar .brand { padding: 0 6px 0 0; }
  .sidebar .brand-text, .side-label, .side-status, .side-groups, .version, .me-text, .me-chevron { display: none; }
  .side-nav { flex-direction: row; gap: 2px; }
  .side-nav a { height: 36px; padding: 0 9px; gap: 6px; }
  .side-nav a .nav-text, .side-nav a .nav-count:not(.busy) { display: none; }
  .side-nav a.active::before { left: 8px; right: 8px; top: auto; bottom: -8px; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .sidebar-foot { margin: 0 0 0 auto; padding: 0; }
  .me { padding: 3px; border: 0; background: none; }
  .me-menu .dropdown-menu { left: auto; right: 0; min-width: 200px; }
  .dropdown-menu.drop-up { top: calc(100% + 6px); bottom: auto; }
  .page { padding: 20px 16px 120px; }
  .live-banner { padding: 9px 16px; }
  .tiles { gap: 10px; }
  .tile { padding: 13px 14px; gap: 11px; }
  .tile-icon { width: 34px; height: 34px; }
  .tile-value { font-size: 21px; }
  .two-col { grid-template-columns: 1fr; }
  .machine-list, .cards { grid-template-columns: 1fr; }
  .search input { width: 100%; }
  .head-tools, .search { width: 100%; }
  .bulkbar { left: 50%; max-width: calc(100vw - 24px); bottom: 10px; }
  .group-stats { margin-left: 0; width: 100%; }
  .server-head { padding: 16px; }
  .hero-icon { display: none; }
  .sh-status { align-items: flex-start; width: 100%; }
  .action-bar { padding: 12px 16px; }
  .bar-label { display: none; }
  .hero-sub { flex-wrap: wrap; gap: 4px 10px; }
  .modal-editor { height: 90vh; }
  .link-fields { margin-left: 0; }
  .link-label { width: 90px; }
}
