:root {
  color-scheme: dark;
  --bg: #07101e;
  --surface: #111c2c;
  --surface-2: #19283b;
  --surface-3: #213247;
  --line: #2b3c52;
  --text: #edf4ff;
  --muted: #8da0ba;
  --blue: #397df6;
  --cyan: #19c6e8;
  --red: #ef3340;
  --green: #24c875;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background:
  radial-gradient(circle at 78% 4%, #1a3d68 0, transparent 30%),
  radial-gradient(circle at 12% 82%, #102f4c 0, transparent 28%),
  var(--bg); color: var(--text); font: 14px Inter, ui-sans-serif, system-ui, sans-serif; }
body::before, body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(58px);
  opacity: .48;
  animation: orb-float 12s ease-in-out infinite;
}
body::before { width: 360px; height: 360px; right: -90px; top: 90px; background: #1bbcff55; }
body::after { width: 430px; height: 430px; left: -150px; bottom: -120px; background: #7c4dff44; animation-delay: -5s; }
button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }
.hidden { display: none !important; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(430px, 100%); padding: 40px; border: 1px solid var(--line); border-radius: 22px; background: rgba(17, 28, 44, .94); box-shadow: 0 30px 80px #0007; }
.brand-mark { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, var(--cyan), var(--blue)); font-size: 24px; font-weight: 900; margin-bottom: 30px; }
.eyebrow { margin: 0 0 7px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; }
h1 { font-size: 30px; margin-bottom: 10px; }
h2 { font-size: 22px; }
.muted { color: var(--muted); line-height: 1.6; }
label { display: grid; gap: 8px; color: #b9c8dc; font-weight: 700; margin: 24px 0; }
input, textarea, select { width: 100%; color: var(--text); background: #0b1523; border: 1px solid var(--line); border-radius: 9px; padding: 13px 14px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #397df622; }
.primary, .secondary, .ghost, .start, .restart, .stop { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 8px; padding: 0 18px; color: white; font-weight: 800; }
.primary, .start { background: var(--blue); }
.secondary, .restart { background: #53677e; }
.ghost { color: #b9c8dc; background: transparent; border: 1px solid var(--line); }
.stop { background: var(--red); }
button:disabled { cursor: wait; opacity: .62; }
button.loading { position: relative; overflow: hidden; }
button.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 0 35%, #ffffff33 50%, transparent 65% 100%); transform: translateX(-100%); animation: button-shine .9s linear infinite; }
.wide { width: 100%; }
.error { min-height: 20px; color: #ff7d86; }
header { height: 66px; display: grid; grid-template-columns: 200px 1fr 200px; align-items: center; padding: 0 5vw; border-bottom: 1px solid #3e587733; background: linear-gradient(180deg, #101b2af5, #0d1828e8); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(18px); box-shadow: 0 18px 55px #0004; }
.brand {
  position: relative;
  width: max-content;
  color: transparent;
  text-decoration: none;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -.03em;
  background: linear-gradient(90deg, #ffffff, #55dcff, #397df6, #b68cff, #ffffff);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 12px #19c6e866);
  animation: brand-flow 4.5s linear infinite;
}
.brand::after {
  content: "";
  position: absolute;
  left: 2px;
  right: -8px;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--blue), transparent);
  opacity: .8;
  box-shadow: 0 0 18px #19c6e8;
}
.brand-button {
  border: 0;
  padding: 0;
  text-align: left;
  background: linear-gradient(90deg, #ffffff, #55dcff, #397df6, #b68cff, #ffffff);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
}
header nav { height: 100%; display: flex; justify-content: center; gap: 34px; }
header nav button { position: relative; color: var(--muted); background: none; }
header nav button.active { color: white; }
header nav button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--cyan); }
header > :last-child { justify-self: end; }
main { width: min(1280px, 92vw); margin: 38px auto 70px; }
.maintenance-banner { width: min(1280px, 92vw); margin: 22px auto -12px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid #397df688; border-radius: 14px; color: #dce9ff; background: linear-gradient(135deg, #172b48e8, #0d1c30e8); box-shadow: inset 0 1px 0 #ffffff10, 0 18px 50px #0003, 0 0 32px #397df622; }
.maintenance-banner span { width: 36px; height: 36px; display: grid; place-items: center; flex: none; border-radius: 11px; background: #397df633; box-shadow: 0 0 18px #397df666; }
.maintenance-banner strong { font-size: 15px; }
.maintenance-banner small { color: #9eb3ce; font-weight: 700; }
.title-row, .toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; }
.power-buttons { display: flex; gap: 9px; }
.promo-banner { position: relative; display: flex; align-items: center; gap: 14px; width: min(620px, 100%); margin: 0 0 24px; padding: 13px 15px; overflow: hidden; border: 1px solid #2c89ff66; border-radius: 14px; color: var(--text); text-decoration: none; background: linear-gradient(135deg, #172b48e8, #0d1c30e8); box-shadow: 0 16px 45px #0003, inset 0 1px 0 #ffffff10; }
.promo-banner::before { content: ""; position: absolute; inset: -60px auto auto -40px; width: 160px; height: 160px; border-radius: 50%; background: #25a8ff55; filter: blur(30px); animation: orb-float 8s ease-in-out infinite; }
.promo-banner:hover { border-color: #35d8ff; transform: translateY(-1px); box-shadow: 0 18px 50px #0005, 0 0 26px #19c6e822; }
.promo-badge { position: relative; z-index: 1; width: 42px; height: 42px; display: grid; place-items: center; flex: none; border-radius: 13px; color: white; background: linear-gradient(135deg, #2aa9ff, #397df6); font-weight: 950; box-shadow: 0 0 22px #25a8ff66; }
.promo-banner span:not(.promo-badge) { position: relative; z-index: 1; display: grid; gap: 2px; }
.promo-banner strong { font-size: 15px; }
.promo-banner small { color: #9eb3ce; }
.promo-banner em { position: relative; z-index: 1; margin-left: auto; padding: 8px 11px; border-radius: 999px; color: #dff7ff; background: #19c6e81f; font-style: normal; font-size: 12px; font-weight: 900; }
.console-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.terminal-card { height: 650px; min-height: 650px; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) 48px; border: 1px solid var(--line); border-radius: 8px; background: #080f18; }
.terminal { min-height: 0; height: 100%; padding: 18px; overflow: auto; overscroll-behavior: contain; white-space: pre-wrap; word-break: break-word; scrollbar-color: #36506d #080f18; scrollbar-width: thin; font: 12px/1.55 Consolas, monospace; }
.terminal-line { display: block; }
.terminal-muted { color: #697b91; }
.terminal-daemon { color: #9fd9ff; }
.terminal-success { color: #91f7bd; }
.terminal-warning { color: #ffd36a; }
.terminal-error { color: #ff7d86; text-shadow: 0 0 12px #ef334044; }
.ansi-black { color: #1f2937; }
.ansi-red { color: #ef4444; }
.ansi-green { color: #22c55e; }
.ansi-yellow { color: #eab308; }
.ansi-blue { color: #3b82f6; }
.ansi-magenta { color: #d946ef; }
.ansi-cyan { color: #06b6d4; }
.ansi-white { color: #e5e7eb; }
.ansi-bright-black { color: #6b7280; }
.ansi-bright-red { color: #ff7d86; }
.ansi-bright-green { color: #86efac; }
.ansi-bright-yellow { color: #fde047; }
.ansi-bright-blue { color: #93c5fd; }
.ansi-bright-magenta { color: #f0abfc; }
.ansi-bright-cyan { color: #67e8f9; }
.ansi-bright-white { color: #ffffff; }
.ansi-bold { font-weight: 800; }
.command-bar { display: flex; align-items: center; gap: 12px; padding: 0 14px; border-top: 1px solid var(--line); background: #121f2f; }
.command-bar span { color: var(--cyan); font-size: 25px; }
.command-bar input { padding: 0; border: 0; background: transparent; box-shadow: none; font-family: Consolas, monospace; }
.stats { display: grid; align-content: start; gap: 14px; }
.stats article { min-height: 82px; display: flex; align-items: center; gap: 15px; padding: 14px; background: linear-gradient(135deg, #19283bf2, #142236f2); border: 1px solid #36506d; border-radius: 10px; box-shadow: inset 0 1px 0 #ffffff09, 0 14px 35px #0002; }
.stat-icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 12px; color: #dce9f8; background: linear-gradient(135deg, #213247, #1a2c42); font-size: 11px; font-weight: 900; }
.stats small { display: block; color: var(--muted); font-weight: 700; margin-bottom: 5px; }
.stats strong { display: block; max-width: 220px; font-size: 16px; line-height: 1.25; word-break: normal; overflow-wrap: anywhere; }
.stats article > div { min-width: 0; flex: 1; }
.status-card { background: linear-gradient(135deg, #19283b, #152a43); }
.status-dot::before { content: ""; width: 15px; height: 15px; border-radius: 50%; background: #74859a; box-shadow: 0 0 0 7px #74859a22; }
.status-dot.online::before { background: var(--green); box-shadow: 0 0 0 7px #24c87522, 0 0 22px #24c875aa; }
.status-dot.offline::before { background: var(--red); box-shadow: 0 0 0 7px #ef334022, 0 0 18px #ef334088; }
.status-dot.restart::before { background: #ffc247; box-shadow: 0 0 0 7px #ffc24722, 0 0 18px #ffc24799; animation: pulse 1s ease-in-out infinite; }
.icon-ip, .icon-chip, .icon-ram, .icon-disk, .icon-net { position: relative; overflow: hidden; }
.icon-ip::before { content: ""; width: 21px; height: 21px; border: 3px solid #55dcff; border-radius: 50% 50% 50% 8px; transform: rotate(-45deg); box-shadow: 0 0 18px #19c6e899; animation: pin-bob 1.8s ease-in-out infinite; }
.icon-ip::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #eaf8ff; box-shadow: 0 0 12px #fff, 0 19px 0 -2px #55dcff66; animation: pin-dot 1.8s ease-in-out infinite; }
.icon-chip::before { content: "CPU"; width: 28px; height: 24px; display: grid; place-items: center; border: 2px solid #55dcff; border-radius: 7px; color: #eaf8ff; font-size: 9px; font-weight: 950; box-shadow: 0 0 16px #19c6e866; animation: chip-glow 1.35s ease-in-out infinite; }
.icon-chip::after { content: ""; position: absolute; inset: 11px 7px; border-left: 2px solid #55dcff88; border-right: 2px solid #55dcff88; box-shadow: -6px 0 0 #55dcff55, 6px 0 0 #55dcff55; animation: pin-blink 1s steps(2, end) infinite; }
.icon-ram::before { content: "RAM"; width: 31px; height: 18px; display: grid; place-items: center; border: 2px solid #65f0bc; border-radius: 5px; color: #eafff7; font-size: 9px; font-weight: 950; box-shadow: 0 0 16px #24c87577; animation: ram-pulse 1.55s ease-in-out infinite; }
.icon-ram::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 12px; height: 4px; background: repeating-linear-gradient(90deg, #65f0bc 0 3px, transparent 3px 6px); animation: ram-flow .9s linear infinite; }
.icon-disk::before { content: ""; width: 32px; height: 23px; border-radius: 8px; background: linear-gradient(145deg, #293d54, #0f1c2d); border: 2px solid #ffbd59; box-shadow: inset 0 0 0 3px #ffbd591a, 0 0 18px #ffb23d77; animation: drive-glow 1.8s ease-in-out infinite; }
.icon-disk::after { content: ""; position: absolute; width: 21px; height: 3px; top: 18px; border-radius: 999px; background: linear-gradient(90deg, #ffbd59, #ffd88a); box-shadow: 0 8px 0 -1px #ffbd5988, 12px 8px 0 -2px #eaf8ff; animation: drive-led 1.1s ease-in-out infinite; }
.icon-net::before { content: ""; width: 31px; height: 31px; border-radius: 50%; border: 3px solid transparent; border-top-color: #55dcff; border-left-color: #55dcff; transform: rotate(45deg); box-shadow: 0 0 16px #19c6e888; animation: wifi-wave 1.5s ease-in-out infinite; }
.icon-net::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 3px solid transparent; border-top-color: #eaf8ff; border-left-color: #eaf8ff; transform: translateY(8px) rotate(45deg); box-shadow: 0 0 12px #eaf8ff77; animation: wifi-wave 1.5s ease-in-out infinite reverse; }
.stat-clock { position: relative; }
.stat-clock::before { content: ""; width: 24px; height: 24px; border: 3px solid #dce9f8; border-radius: 50%; opacity: .95; }
.stat-clock i { position: absolute; width: 3px; height: 14px; left: 50%; top: 15px; border-radius: 999px; background: var(--cyan); transform-origin: 50% 10px; animation: spin 3s linear infinite; }
.stat-network { position: relative; overflow: hidden; }
.stat-network::before, .stat-network::after { content: ""; position: absolute; inset: 13px 19px; border-radius: 999px; border: 2px solid #dce9f8; border-left-color: transparent; border-right-color: transparent; opacity: .9; }
.stat-network::after { inset: 19px 13px; transform: rotate(90deg); border-color: var(--cyan); border-left-color: transparent; border-right-color: transparent; }
.stat-network i { width: 5px; height: 5px; border-radius: 50%; background: white; box-shadow: 0 0 12px white; animation: float-dot 1.6s ease-in-out infinite; }
.stat-network i:nth-child(2) { animation-delay: -.8s; }
.mini-meter { display: block; height: 5px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #0b1523; }
.mini-meter b { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--blue)); transition: width .35s ease; }
@keyframes bars { 0%, 100% { transform: scaleY(.7); opacity: .75; } 50% { transform: scaleY(1.15); opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(.9); } 50% { transform: scale(1.1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float-dot { 0%, 100% { transform: translate(-8px, 7px); } 50% { transform: translate(8px, -7px); } }
@keyframes brand-flow { to { background-position: 260% 0; } }
@keyframes orb-float { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(26px, -18px, 0) scale(1.08); } }
@keyframes pin-bob { 0%, 100% { transform: translateY(-2px) rotate(-45deg); } 50% { transform: translateY(3px) rotate(-45deg); } }
@keyframes pin-dot { 0%, 100% { transform: translateY(-2px); opacity: .95; } 50% { transform: translateY(3px); opacity: 1; } }
@keyframes chip-glow { 0%, 100% { transform: scale(.96); box-shadow: 0 0 10px #19c6e855; } 50% { transform: scale(1.04); box-shadow: 0 0 22px #19c6e8cc; } }
@keyframes pin-blink { 50% { opacity: .45; } }
@keyframes ram-pulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes ram-flow { to { background-position: 6px 0; } }
@keyframes drive-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.22); } }
@keyframes drive-led { 0%, 100% { opacity: .55; transform: translateX(-2px); } 50% { opacity: 1; transform: translateX(3px); } }
@keyframes wifi-wave { 0%, 100% { opacity: .55; scale: .9; } 50% { opacity: 1; scale: 1.04; } }
@keyframes button-shine { to { transform: translateX(100%); } }
.toolbar > div:last-child { display: flex; gap: 10px; }
.upload-label { display: inline-flex; margin: 0; color: white; }
.breadcrumbs { color: #9db3cc; font-family: Consolas, monospace; }
.file-list { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.file-row { min-height: 57px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 25px; padding: 0 17px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.file-row-message { grid-template-columns: 1fr auto; padding: 16px 17px; }
.file-row.clickable-row { cursor: pointer; }
.file-row.clickable-row:hover { background: #24374e; }
.file-row:last-child { border: 0; }
.file-name { display: flex; align-items: center; gap: 12px; color: #bed1e8; }
.file-name button { color: inherit; background: transparent; text-align: left; }
.file-meta { color: var(--muted); font-size: 12px; }
.backup-row { grid-template-columns: minmax(0, 1fr) auto auto 42px; }
.backup-name span:last-child { display: grid; gap: 4px; min-width: 0; }
.backup-name small { color: var(--muted); font-size: 11px; font-family: Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backup-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: #dce9f8; background: #263a52; }
.backup-icon.created { color: #94ffc0; background: #143d2b; }
.backup-icon.creating { color: #ffe08a; background: #463717; }
.backup-icon.failed { color: #ff9aa2; background: #4a1b22; }
.backup-icon.locked { color: #cbd5e1; background: #39465a; }
.backup-state { padding: 5px 9px; border-radius: 999px; color: #dce9f8; background: #33465e; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.backup-state.created { color: #94ffc0; background: #143d2b; }
.backup-state.creating { color: #ffe08a; background: #463717; }
.backup-state.failed { color: #ff9aa2; background: #4a1b22; }
.backup-state.locked { color: #cbd5e1; background: #39465a; }
.row-menu-button { width: 34px; height: 34px; border-radius: 8px; color: #b8c8dc; background: transparent; font-size: 17px; font-weight: 900; }
.row-menu-button:hover { color: white; background: #2a3d55; }
.danger-text { color: #ff727b; background: transparent; }
.panel-card { padding: 22px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; }
.startup-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 30px; }
pre { white-space: pre-wrap; color: #c9d8eb; background: #0b1523; border-radius: 8px; padding: 18px; line-height: 1.6; }
.startup-save { width: 100%; margin-top: 12px; }
#dockerImageSelect { margin-top: 8px; border-color: #397df688; background: #0b1523; font-weight: 800; }
.variable-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.variable-card { padding: 17px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px; }
.variable-card label { margin: 0; }
.variable-card small { color: var(--muted); font-weight: 400; }
.python-card { border-color: #397df6aa; background: linear-gradient(135deg, #172b48, #142236); box-shadow: 0 16px 38px #0002, inset 0 1px 0 #ffffff0a; }
.python-card label::before { content: "🐍 Python"; display: inline-flex; width: max-content; margin-bottom: 10px; padding: 5px 9px; border-radius: 999px; color: #cfefff; background: #397df633; font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.python-version-select { margin-top: 12px; border-color: #397df688; background: #0b1523; }
.variable-hint { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
dialog { width: min(1000px, 92vw); padding: 0; border: 1px solid var(--line); border-radius: 12px; color: white; background: var(--surface); }
dialog::backdrop { background: #000a; }
.dialog-card { padding: 22px; }
.dialog-card textarea { height: 60vh; resize: vertical; font: 13px/1.5 Consolas, monospace; }
#toast { position: fixed; right: 24px; bottom: 24px; max-width: 360px; z-index: 20; padding: 14px 18px; border-radius: 9px; color: white; background: #1c3048; box-shadow: 0 15px 50px #0007; transform: translateY(100px); opacity: 0; transition: .25s; }
#toast.show { transform: none; opacity: 1; }
.context-menu { position: fixed; z-index: 30; min-width: 180px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #f4f7fb; color: #243142; box-shadow: 0 18px 50px #0007; }
.context-menu button { display: block; width: 100%; padding: 10px 12px; border-radius: 7px; background: transparent; color: inherit; text-align: left; }
.context-menu button:hover { background: #e8eef7; }
.server-picker { min-height: 100vh; background: radial-gradient(circle at 78% 10%, #1d65d955, transparent 34%), radial-gradient(circle at 0% 80%, #613dff44, transparent 32%), var(--bg); }
.server-picker-main { width: min(1180px, 92vw); margin: 44px auto 70px; }
.picker-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.picker-heading h1 { margin-bottom: 0; font-size: clamp(34px, 5vw, 58px); letter-spacing: -.05em; }
.server-cards { display: grid; gap: 14px; }
.server-card { position: relative; width: 100%; overflow: hidden; padding: 18px 20px; border: 1px solid #5e91ff38; border-radius: 18px; background: linear-gradient(135deg, rgba(24, 42, 78, .84), rgba(8, 15, 31, .78)); color: var(--text); text-align: left; box-shadow: inset 0 1px 0 #ffffff0b, 0 24px 70px #0004; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.server-card::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 5px; background: linear-gradient(#2f7cff, #2ee59d); opacity: .85; }
.server-card:hover { transform: translateY(-2px); border-color: #68a1ff88; background: linear-gradient(135deg, rgba(31, 56, 104, .92), rgba(10, 19, 38, .82)); }
.server-card-top { display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.server-node-icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 999px; color: #7bb7ff; background: #67a1ff1d; border: 1px solid #67a1ff2e; font-size: 22px; }
.server-card h3 { margin: 0 0 6px; font-size: 18px; }
.server-meta { color: var(--muted); }
.server-pill { padding: 6px 10px; border-radius: 999px; background: #33465e; color: #c9d8eb; font-size: 12px; }
.server-pill.danger { background: #5e2632; color: #ffb2bd; }
.server-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.server-grid small { display: block; color: var(--muted); margin-bottom: 4px; }
.server-open { margin-top: 14px; color: var(--cyan); font-weight: 800; }
.access-denied { padding: 26px; border: 1px solid #ff526566; border-radius: 18px; background: linear-gradient(135deg, #351321cc, #101827cc); }
.access-denied strong { display: block; margin-bottom: 7px; font-size: 22px; }
.access-denied span { color: var(--muted); }
.users-layout { display: grid; grid-template-columns: minmax(340px, 430px) 1fr; gap: 20px; align-items: start; }
.invite-card { display: grid; gap: 16px; }
.permission-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.permission-presets button { padding: 9px 11px; border-radius: 10px; color: #b7cdf5; background: #67a1ff18; border: 1px solid #67a1ff30; font-weight: 800; }
.permission-list { display: grid; gap: 12px; max-height: 520px; overflow: auto; padding-right: 4px; }
.permission-group { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #0b152399; }
.permission-group h3 { margin: 0; padding: 12px 14px; background: #142236; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.permission-item { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; margin: 0; padding: 10px 14px; border-top: 1px solid #ffffff08; }
.permission-item input { width: auto; }
.permission-item small { grid-column: 2; color: var(--muted); font-size: 11px; }
.user-list { display: grid; gap: 12px; }
.user-row { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.user-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(135deg, #3577ff, #7c5cff); font-weight: 1000; }
.user-row small { display: block; color: var(--muted); }
.user-row em { margin-left: auto; color: #7ee8ff; font-style: normal; font-weight: 900; }
.server-checklist { display: grid; gap: 10px; margin-top: 8px; }
.server-check { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #0b1523; }
.server-check input { width: auto; }
.server-check span { display: grid; }
.server-check small { color: var(--muted); }
.empty-state { padding: 24px; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.server-picker {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(90deg, #050c18 0 258px, transparent 258px),
    radial-gradient(circle at 86% 16%, #246fff55, transparent 34%),
    radial-gradient(circle at 0% 78%, #6c3cff55, transparent 34%),
    linear-gradient(180deg, #071120, #050b15);
}
.portal-side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  padding: 28px 12px 16px;
  border-right: 1px solid #28405f80;
  background: linear-gradient(180deg, #07101fcc, #050915e8);
  box-shadow: inset -1px 0 0 #ffffff08;
}
.portal-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  color: white;
  text-decoration: none;
  font-size: 21px;
  font-weight: 950;
}
.portal-logo span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #3a86ff, #775dff);
  box-shadow: 0 0 28px #3a86ff88;
}
.portal-logo strong {
  background: linear-gradient(90deg, #fff, #69dcff, #9b7cff);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brand-flow 4s linear infinite;
}
.portal-menu { display: grid; align-content: start; gap: 8px; }
.portal-menu a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  color: #a9b7cb;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
}
.portal-menu a:hover,
.portal-menu a.active {
  color: #72b3ff;
  background: linear-gradient(90deg, #123060, #0d244688);
}
.portal-menu span { width: 15px; color: #7d8da6; }
.portal-user-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #2b3f5b;
  border-radius: 14px;
  background: #111a2a;
}
.portal-avatar,
.portal-profile-glow {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: radial-gradient(circle at 35% 25%, #7edfff, #397df6 55%, #31206f);
  font-weight: 1000;
  box-shadow: 0 0 24px #397df688;
}
.portal-user-card small { display: block; color: var(--muted); font-size: 11px; }
.portal-user-card button {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #afbdd0;
  background: #1a2638;
}
.portal-main {
  width: min(1500px, calc(100vw - 310px));
  margin: 0 auto;
  padding: 42px 48px 72px;
}
.portal-topline,
.portal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.portal-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #2c4160;
  border-radius: 999px;
  background: #101a2caa;
}
.portal-profile-glow {
  width: 34px;
  height: 34px;
  border-radius: 999px;
}
.portal-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 34px 0 32px;
}
.portal-stat {
  position: relative;
  min-height: 162px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid #2b4162;
  border-radius: 16px;
  background: linear-gradient(145deg, #0e1a2dec, #0a1222d9);
  box-shadow: inset 0 1px 0 #ffffff09, 0 25px 65px #0003;
}
.portal-stat::after {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: #397df622;
  filter: blur(30px);
}
.portal-stat-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 17px;
  border-radius: 11px;
  color: #fff;
  font-weight: 1000;
}
.portal-stat-icon.green { background: #14b86d33; color: #39f399; }
.portal-stat-icon.blue { background: #397df633; color: #6db0ff; }
.portal-stat-icon.orange { background: #ffad3330; color: #ffc260; }
.portal-stat-icon.violet { background: #8057ff33; color: #b598ff; }
.portal-stat small,
.portal-stat em { display: block; color: var(--muted); font-style: normal; font-weight: 800; }
.portal-stat strong { display: block; margin: 10px 0 8px; font-size: 28px; }
.portal-stat em { color: #5fa9ff; }
.portal-title-row { margin: 18px 0; }
.portal-title-row h1 { margin: 0 0 6px; font-size: 34px; letter-spacing: -.04em; }
.portal-create { min-width: 174px; text-decoration: none; box-shadow: 0 14px 38px #397df633; }
.server-picker .server-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}
.server-picker .server-card {
  min-height: 196px;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(20, 39, 72, .92), rgba(7, 15, 29, .94));
}
.server-picker .server-card-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}
.server-picker .server-node-icon {
  border-radius: 14px;
  color: #8bc4ff;
  background: linear-gradient(135deg, #397df633, #19c6e81d);
  box-shadow: 0 0 22px #397df644;
}
.server-picker .server-card h3 { font-size: 21px; }
.server-picker .server-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 18px;
  padding: 0 14px;
  border-radius: 10px;
  color: #dff7ff;
  background: #19c6e81b;
}
.dashboard-empty {
  display: grid;
  place-items: center;
  min-height: 250px;
  text-align: center;
  background: linear-gradient(145deg, #0d1829cc, #080f1dcc);
}
.dashboard-empty strong { color: var(--text); font-size: 24px; }
.dashboard-empty span { margin-top: 8px; }
.admin-main { display: grid; grid-template-columns: 390px 1fr; gap: 28px; align-items: start; }
.admin-form label { margin: 18px 0; }
.new-key { margin-top: 20px; padding: 15px; border: 1px solid #2d9e69; border-radius: 8px; background: #102d25; word-break: break-all; }
.new-key code { display: block; margin: 10px 0; font-size: 14px; color: #7ff0ba; }
@media (max-width: 850px) {
  header { grid-template-columns: 1fr auto; padding: 0 18px; }
  header nav { position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: 58px; gap: 0; justify-content: space-around; background: #101b2a; border-top: 1px solid var(--line); }
  header nav button { flex: 1; }
  header .ghost { display: none; }
  main { width: min(94vw, 700px); margin-top: 25px; }
  .console-layout, .startup-grid, .variable-grid, .admin-main { grid-template-columns: 1fr; }
  .server-picker { display: block; }
  .portal-side { position: static; height: auto; }
  .portal-main { width: min(94vw, 700px); padding: 26px 0 90px; }
  .portal-stat-grid { grid-template-columns: 1fr 1fr; }
  .portal-title-row, .portal-topline { align-items: flex-start; flex-direction: column; }
  .server-picker .server-cards { grid-template-columns: 1fr; }
  .server-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; order: -1; }
  .terminal-card { height: 500px; min-height: 500px; }
  .title-row, .toolbar { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
  .auth-card { padding: 28px 22px; }
  .stats { grid-template-columns: 1fr; }
  .power-buttons { width: 100%; }
  .power-buttons button { flex: 1; }
}
