:root {
  --bg: #0b0e0d;
  --panel: #111513;
  --panel-2: #151a17;
  --panel-3: #1b211e;
  --line: #252c28;
  --line-soft: #1d2420;
  --text: #f2f7f3;
  --muted: #87928b;
  --muted-2: #606a64;
  --green: #70e18e;
  --green-strong: #50d778;
  --green-dim: #1b3f27;
  --red: #ff7272;
  --blue: #61a6ff;
  --purple: #aa80ff;
  --orange: #f2aa5c;
  --radius: 14px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, .switch { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 20%, rgba(80, 215, 120, .11), transparent 28%),
    radial-gradient(circle at 18% 90%, rgba(97, 166, 255, .06), transparent 35%),
    #090c0a;
}

.login-grid {
  position: absolute;
  inset: -20%;
  opacity: .24;
  transform: perspective(700px) rotateX(64deg) rotateZ(-12deg) translateY(24%);
  background-image:
    linear-gradient(rgba(112, 225, 142, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 225, 142, .14) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse, black, transparent 65%);
}

.login-card {
  width: min(470px, 100%);
  position: relative;
  padding: 42px;
  border: 1px solid #263029;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(22, 28, 24, .96), rgba(13, 17, 15, .98));
  box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.025);
}

.brand { display: flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 850; letter-spacing: .12em; }
.brand-home { padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.brand-home:hover { color: var(--green); }
.brand-login { margin-bottom: 48px; }
.brand-mark { width: 29px; height: 29px; position: relative; display: inline-block; transform: rotate(30deg); }
.brand-mark i { position: absolute; width: 14px; height: 14px; background: var(--green); border-radius: 2px; box-shadow: 0 0 20px rgba(112,225,142,.26); }
.brand-mark i:nth-child(1) { left: 7px; top: 0; }
.brand-mark i:nth-child(2) { left: 0; top: 12px; opacity: .62; }
.brand-mark i:nth-child(3) { right: 0; top: 12px; opacity: .82; }
.eyebrow { margin: 0 0 11px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.login-card h1 { margin: 0; font-size: clamp(38px, 8vw, 53px); line-height: 1.02; letter-spacing: -.055em; }
.login-card h1 span { color: var(--green); }
.login-copy { color: #909b94; line-height: 1.65; margin: 22px 0 34px; max-width: 390px; }
label { display: block; color: #b9c2bc; font-size: 12px; font-weight: 700; margin: 18px 0 8px; }
input, select, textarea {
  width: 100%;
  border: 1px solid #2a332e;
  border-radius: 10px;
  background: #0d110f;
  color: var(--text);
  outline: none;
  padding: 14px 15px;
  transition: border .18s, box-shadow .18s, background .18s;
}
input::placeholder, textarea::placeholder { color: #535d57; }
input:focus, select:focus, textarea:focus { border-color: #4b9d62; box-shadow: 0 0 0 3px rgba(80,215,120,.1); background: #101512; }
textarea { resize: vertical; line-height: 1.55; }
.password-field { position: relative; }
.password-field input { padding-right: 88px; }
.reveal-button { position: absolute; right: 8px; top: 8px; height: calc(100% - 16px); border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.form-error { color: var(--red); font-size: 12px; min-height: 18px; margin: 11px 0 2px; }
.primary-button, .action-button, .secondary-button {
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .15s, filter .15s, opacity .15s;
}
.primary-button { background: var(--green); color: #07110a; padding: 14px 17px; }
.primary-button:hover, .action-button:hover, .secondary-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary-button:disabled, .action-button:disabled { opacity: .45; cursor: wait; transform: none; }
.login-button { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.login-button b { font-size: 21px; }
.secure-note { color: var(--muted-2); font-size: 11px; text-align: center; margin: 25px 0 -10px; }
.secure-note span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-right: 5px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 18px 18px;
  border-right: 1px solid var(--line-soft);
  background: #0d110f;
  z-index: 20;
}
.sidebar-top { min-height: 52px; display: flex; align-items: flex-start; justify-content: space-between; padding: 2px 8px; }
.server-heading { display: flex; justify-content: space-between; align-items: center; padding: 28px 8px 10px; color: var(--muted); text-transform: uppercase; font-size: 10px; letter-spacing: .14em; font-weight: 800; }
.server-heading > div { display: flex; align-items: center; gap: 7px; }
.add-server-mini { width: 22px; height: 22px; padding: 0; border: 1px solid #304638; border-radius: 7px; background: rgba(80,215,120,.08); color: var(--green); cursor: pointer; font-size: 14px; line-height: 1; }
.add-server-mini:hover { background: rgba(80,215,120,.16); }
.count-badge { background: #202721; color: #aeb8b1; min-width: 23px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; }
.search-box { margin: 0 0 12px; position: relative; }
.search-box span { position: absolute; left: 12px; top: 9px; color: var(--muted); font-size: 20px; }
.search-box input { padding: 10px 10px 10px 35px; border-radius: 9px; font-size: 12px; background: #111613; }
.server-list { flex: 1; overflow: auto; scrollbar-width: thin; padding-right: 3px; }
.server-item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  padding: 11px 10px;
  display: grid;
  grid-template-columns: 10px minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  margin-bottom: 3px;
}
.server-item:hover { background: #141916; }
.server-item.active { background: #18201a; border-color: #263c2d; box-shadow: inset 3px 0 var(--green); }
.server-dot { width: 7px; height: 7px; border-radius: 50%; background: #46504a; box-shadow: 0 0 0 3px rgba(70,80,74,.12); }
.server-dot.online, .server-dot.starting { background: var(--green); box-shadow: 0 0 10px rgba(112,225,142,.65); }
.server-item-copy { min-width: 0; }
.server-item-copy strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-item-copy small { color: var(--muted-2); font-size: 10px; }
.server-size { color: var(--muted); font-size: 10px; }
.sidebar-summary { padding: 16px 10px 5px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; }
.summary-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 7px; }
.sidebar-summary strong { color: #dce4df; }
.storage-line { display: flex; justify-content: space-between; margin-top: 13px; }
.sidebar-credit { padding: 13px 10px 1px; display: flex; justify-content: space-between; align-items: center; color: #465149; font-size: 9px; letter-spacing: .04em; }
.sidebar-credit b { color: #748078; font-weight: 700; }

.main-column { min-width: 0; }
.topbar { height: 76px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; padding: 0 clamp(20px, 4vw, 50px); background: rgba(11,14,13,.86); backdrop-filter: blur(20px); position: sticky; top: 0; z-index: 10; }
.crumbs { display: flex; gap: 10px; align-items: center; color: var(--muted-2); font-size: 12px; }
.crumbs strong { color: #cdd5d0; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; position: relative; }
.system-health { display: flex; align-items: stretch; border: 1px solid var(--line-soft); border-radius: 9px; background: rgba(18,23,20,.72); overflow: hidden; }
.system-health > div { min-width: 74px; padding: 7px 10px 6px; border-right: 1px solid var(--line-soft); }
.system-health > div:last-child { border-right: 0; min-width: 96px; }
.system-health span, .system-health strong { display: block; white-space: nowrap; }
.system-health span { color: #58635c; font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.system-health strong { margin-top: 3px; color: #cbd6cf; font-size: 10px; font-variant-numeric: tabular-nums; }
.system-health > div:first-child strong { color: var(--green); }
.users-nav, .profile-button { border: 0; background: transparent; cursor: pointer; }
.users-nav { color: var(--muted); font-size: 12px; padding: 9px 12px; border-radius: 8px; }
.users-nav:hover { background: var(--panel-2); color: var(--text); }
.users-icon { letter-spacing: -3px; color: var(--green); margin-right: 7px; font-size: 9px; }
.profile-button { display: flex; align-items: center; gap: 9px; text-align: left; padding: 5px 8px; border-left: 1px solid var(--line); margin-left: 4px; }
.avatar { width: 33px; height: 33px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(145deg, #326141, #162b1d); color: var(--green); font-weight: 800; }
.profile-copy strong, .profile-copy small { display: block; }
.profile-copy strong { font-size: 12px; }.profile-copy small { font-size: 9px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .1em; }
.profile-menu { position: absolute; right: 0; top: 51px; min-width: 130px; padding: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); }
.profile-menu button { width: 100%; border: 0; background: transparent; cursor: pointer; padding: 9px 12px; text-align: left; border-radius: 6px; color: #d6ddd9; }
.profile-menu button:hover { background: #222a25; }
.icon-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.menu-button, .mobile-close { display: none; }

.content { padding: 38px clamp(20px, 4vw, 52px) 56px; max-width: 1500px; margin: 0 auto; }
.welcome-view { padding-top: clamp(50px, 8vw, 105px); }
.welcome-hero { min-height: 365px; display: flex; align-items: center; justify-content: space-between; gap: 60px; padding: clamp(35px, 5vw, 68px); border: 1px solid #243229; border-radius: 22px; overflow: hidden; background: radial-gradient(circle at 83% 24%, rgba(80,215,120,.12), transparent 31%), linear-gradient(145deg, #131a15, #0d110f); box-shadow: var(--shadow); }
.welcome-hero > div:first-child { position: relative; z-index: 1; max-width: 700px; }
.welcome-hero h1 { margin: 0; font-size: clamp(42px, 6.2vw, 76px); line-height: .98; letter-spacing: -.06em; }
.welcome-hero h1 span { color: var(--green); }
.welcome-hero p:not(.eyebrow) { max-width: 660px; margin: 24px 0 30px; color: #919d95; font-size: 15px; line-height: 1.7; }
.welcome-create { min-width: 180px; }
.welcome-mark { width: clamp(180px, 25vw, 320px); aspect-ratio: 1; position: relative; flex: 0 0 auto; transform: rotate(30deg); opacity: .92; filter: drop-shadow(0 30px 45px rgba(29,112,51,.25)); }
.welcome-mark i { position: absolute; width: 48%; height: 48%; border-radius: 12%; background: var(--green); }
.welcome-mark i:nth-child(1) { top: 0; left: 26%; }
.welcome-mark i:nth-child(2) { left: 0; top: 44%; opacity: .48; }
.welcome-mark i:nth-child(3) { right: 0; top: 44%; opacity: .78; }
.welcome-stats { margin-top: 15px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.welcome-stats article { min-height: 120px; padding: 22px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: #111513; }
.welcome-stats span, .welcome-stats small { display: block; color: var(--muted); font-size: 10px; }
.welcome-stats strong { display: block; margin: 9px 0 5px; font-size: 24px; }
.welcome-credit { margin: 25px 2px 0; color: #4e5952; font-size: 10px; text-align: right; }
.welcome-credit b { color: #77837b; }
.server-hero { display: flex; justify-content: space-between; gap: 28px; align-items: flex-end; margin-bottom: 28px; }
.status-row { display: flex; gap: 9px; align-items: center; min-height: 24px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 5px; padding: 5px 8px; font-size: 9px; font-weight: 900; letter-spacing: .12em; background: #222824; color: #919b95; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.online, .status-pill.starting { color: var(--green); background: rgba(80,215,120,.1); }
.managed-pill { color: #748078; font-size: 10px; }
.hero-copy h1 { font-size: clamp(34px, 4.2vw, 53px); margin: 10px 0 5px; letter-spacing: -.055em; }
.hero-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.server-address { display: inline-flex; align-items: center; gap: 9px; margin-top: 14px; padding: 8px 11px; border: 1px solid rgba(105,226,143,.22); border-radius: 8px; background: rgba(105,226,143,.055); color: #c9d5cd; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.server-address:hover { border-color: rgba(105,226,143,.52); background: rgba(105,226,143,.1); }
.server-address code { font: 700 12px/1 ui-monospace, SFMono-Regular, Consolas, monospace; color: #e8f2ec; }
.server-address > span:last-child { color: var(--accent); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.server-address-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(105,226,143,.55); }
.hero-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.action-button { padding: 11px 15px; background: var(--panel-3); border: 1px solid var(--line); font-size: 12px; }
.action-button.start { background: var(--green); color: #061008; border-color: var(--green); }
.action-button.stop { background: rgba(255,114,114,.1); color: var(--red); border-color: rgba(255,114,114,.22); }
.action-button.neutral { color: #bdc6c0; }
.action-button.danger { color: #dc8f8f; border-color: rgba(255,114,114,.18); }
.action-button.danger:hover { color: var(--red); border-color: rgba(255,114,114,.42); background: rgba(255,114,114,.08); }
.action-button span { margin-right: 6px; }
.play-icon { font-size: 9px; }
.refresh-button { width: 37px; height: 37px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 15px; }
.metric-card { min-height: 105px; padding: 20px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: linear-gradient(145deg, #141916, #101411); display: flex; align-items: center; gap: 14px; }
.accent-card { border-color: #2c4132; background: linear-gradient(145deg, #17251b, #101712); }
.metric-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: var(--green); border-radius: 9px; background: rgba(112,225,142,.1); }
.metric-icon.blue { color: var(--blue); background: rgba(97,166,255,.1); }
.metric-icon.purple { color: var(--purple); background: rgba(170,128,255,.1); }
.metric-icon.orange { color: var(--orange); background: rgba(242,170,92,.1); }
.metric-card span, .metric-card small { display: block; }
.metric-card span { color: var(--muted); font-size: 10px; }
.metric-card strong { display: block; font-size: 18px; margin: 5px 0 3px; }
.metric-card small { color: var(--muted-2); font-size: 9px; }
.autostart-card { gap: 12px; }
.autostart-copy { flex: 1; min-width: 0; }
.autostart-copy span { color: #cbd3ce; font-size: 12px; font-weight: 750; margin-bottom: 5px; }
.switch { position: relative; margin: 0; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 40px; height: 22px; border-radius: 11px; background: #303833; display: block; transition: background .2s; position: relative; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; top: 3px; left: 3px; background: #8b958e; border-radius: 50%; transition: transform .2s, background .2s; }
.switch input:checked + span { background: rgba(80,215,120,.3); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--green); }

.workspace-card { border: 1px solid var(--line-soft); border-radius: var(--radius); background: #0e1210; overflow: hidden; min-height: 460px; }
.tabs { height: 57px; display: flex; align-items: stretch; padding: 0 19px; border-bottom: 1px solid var(--line-soft); }
.tab { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; padding: 0 14px; font-size: 11px; font-weight: 750; }
.tab.active { color: var(--text); border-bottom-color: var(--green); }
.live-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--green); margin: 0 0 1px 5px; box-shadow: 0 0 8px var(--green); }
.crash-indicator { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 5px; border-radius: 50%; background: rgba(255,114,114,.14); color: var(--red); font-size: 9px; }
.console-toolbar { min-height: 42px; display: flex; align-items: center; padding: 0 18px; border-bottom: 1px solid #1b211e; color: var(--muted-2); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.console-toolbar > span { display: flex; gap: 5px; margin-right: 12px; }.console-toolbar i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #38413c; }.console-toolbar i:first-child { background: #4d7d59; }
.console-toolbar > div { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.console-toolbar button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; }
.console-output, .crash-output { margin: 0; white-space: pre-wrap; word-break: break-word; color: #a9b7ad; font: 11px/1.6 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; scrollbar-width: thin; }
.console-output { height: 325px; overflow: auto; padding: 20px 22px; background: #090c0a; }
.command-line { min-height: 50px; display: flex; align-items: center; padding: 7px 10px 7px 20px; border-top: 1px solid #1c231f; background: #0c100e; }
.command-line > span { color: var(--green); font: 14px ui-monospace, monospace; margin-right: 11px; }
.command-line input { border: 0; box-shadow: none; background: transparent; padding: 8px 2px; font: 11px ui-monospace, monospace; }
.command-line input:focus { box-shadow: none; background: transparent; }
.command-line button { border: 1px solid var(--line); border-radius: 7px; background: #171d19; color: var(--muted); font-size: 9px; padding: 8px 10px; cursor: pointer; white-space: nowrap; }
.command-line b { color: var(--green); margin-left: 7px; }.console-hint { margin: 0; padding: 7px 20px 10px; color: #515a54; font-size: 9px; background: #0c100e; }
.crash-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 25px 26px 18px; }
.crash-kicker { color: var(--red); font-weight: 800; font-size: 9px; letter-spacing: .15em; }
.crash-header h2 { margin: 8px 0 4px; font-size: 18px; }.crash-header p { margin: 0; color: var(--muted); font-size: 11px; }
.secondary-button { padding: 9px 12px; background: var(--panel-3); border: 1px solid var(--line); font-size: 10px; }
.crash-output { max-height: 365px; min-height: 300px; overflow: auto; padding: 20px 24px; background: #090c0a; border-top: 1px solid var(--line-soft); }

.files-toolbar { min-height: 70px; padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line-soft); }
.file-breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-width: 0; }
.file-breadcrumbs button { border: 0; background: transparent; color: var(--muted); padding: 5px 3px; cursor: pointer; font-size: 11px; }
.file-breadcrumbs button:hover { color: var(--green); }
.file-breadcrumbs b { color: #3e4842; font-weight: 500; }
.file-breadcrumbs button:last-child { color: #d5ddd8; font-weight: 750; }
.file-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.files-table { min-height: 340px; background: #0b0f0d; }
.files-table-head, .file-row { display: grid; grid-template-columns: minmax(260px, 1fr) 110px 165px 150px; align-items: center; gap: 14px; padding: 0 20px; }
.files-table-head { min-height: 38px; border-bottom: 1px solid var(--line-soft); color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.file-row { min-height: 52px; border-bottom: 1px solid #171d1a; color: #aeb8b1; font-size: 11px; }
.file-row:hover { background: #111613; }
.file-entry { display: flex; align-items: center; gap: 10px; min-width: 0; border: 0; background: transparent; color: #d6ded9; text-align: left; cursor: default; padding: 0; }
.file-entry.directory { cursor: pointer; }
.file-entry.directory:hover strong { color: var(--green); }
.file-entry-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 7px; background: rgba(97,166,255,.09); color: var(--blue); flex: 0 0 auto; font-size: 13px; }
.file-entry.directory .file-entry-icon { color: var(--green); background: rgba(80,215,120,.09); }
.file-entry.link .file-entry-icon { color: var(--orange); background: rgba(242,170,92,.09); }
.file-entry strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.file-row-time, .file-row-size { color: var(--muted-2); }
.file-row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.file-row-actions button { width: 30px; height: 28px; border: 1px solid var(--line); border-radius: 7px; background: #131815; color: var(--muted); cursor: pointer; }
.file-row-actions button:hover { color: var(--text); border-color: #3c4841; }
.file-row-actions button.danger:hover { color: var(--red); border-color: #583333; }
.files-empty { min-height: 280px; display: grid; place-items: center; color: var(--muted-2); font-size: 12px; text-align: center; padding: 30px; }
.files-note { margin: 0; padding: 10px 19px; border-top: 1px solid var(--line-soft); color: #58625c; font-size: 9px; }
.upload-progress { height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 20px; background: rgba(80,215,120,.07); color: var(--green); font-size: 10px; overflow: hidden; }
.upload-progress span { width: 14px; height: 14px; border: 2px solid rgba(112,225,142,.25); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.settings-layout { display: grid; grid-template-columns: minmax(220px,.8fr) minmax(360px,1.2fr); gap: 38px 48px; padding: 36px; min-height: 400px; }
.settings-kicker { color: var(--green); font-size: 9px; font-weight: 850; letter-spacing: .15em; }
.settings-intro h2 { margin: 10px 0 8px; font-size: 24px; letter-spacing: -.03em; }
.settings-intro p { max-width: 330px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.settings-form { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: #111613; align-self: start; }
.settings-form label:first-child { margin-top: 0; }
.settings-form .primary-button { width: 100%; margin-top: 10px; }
.memory-field { position: relative; }
.memory-field input { padding-right: 55px; }
.memory-field span { position: absolute; right: 15px; top: 15px; color: var(--muted-2); font-size: 10px; }
.settings-hint { color: var(--muted-2); font-size: 10px; line-height: 1.5; margin: 8px 0 15px; }
.properties-card { grid-column: 1 / -1; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: #101512; }
.properties-header, .properties-footer, .editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.properties-header { margin-bottom: 15px; }
.properties-header h3 { margin: 6px 0 0; font-size: 18px; }
.properties-status { color: var(--muted-2); font-size: 10px; }
.properties-status.ready { color: var(--green); }
.properties-status.error { color: var(--orange); }
.properties-card textarea, .editor-modal-card textarea { width: 100%; border-radius: 9px; background: #090c0a; color: #c6d2ca; font: 11px/1.65 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; tab-size: 2; }
.properties-card textarea { min-height: 350px; resize: vertical; }
.properties-footer { margin-top: 14px; }
.properties-footer p { margin: 0; color: var(--muted-2); font-size: 10px; }
.properties-footer .primary-button { flex: 0 0 auto; }
.modal-copy { color: var(--muted); font-size: 12px; margin: -14px 0 22px; line-height: 1.55; }
.directory-preview { padding: 10px 12px; margin-top: 9px; border: 1px dashed #334139; border-radius: 8px; color: var(--green); background: rgba(80,215,120,.04); font: 11px ui-monospace, monospace; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.page-heading h1 { font-size: 44px; letter-spacing: -.05em; margin: 0 0 5px; }.page-heading > div > p:last-child { color: var(--muted); margin: 0; }
.primary-button.compact { font-size: 12px; }
.users-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.users-table-header, .user-row { display: grid; grid-template-columns: 1.35fr .65fr .85fr .9fr auto; align-items: center; gap: 16px; padding: 16px 22px; }
.users-table-header { color: var(--muted-2); text-transform: uppercase; letter-spacing: .1em; font-size: 9px; border-bottom: 1px solid var(--line); }
.user-row { min-height: 72px; border-bottom: 1px solid var(--line-soft); font-size: 12px; color: #bcc6c0; }.user-row:last-child { border-bottom: 0; }
.user-actions { display: flex; justify-content: flex-end; gap: 7px; }
.user-action { border: 1px solid var(--line); border-radius: 7px; background: #151b17; color: #bcc6c0; cursor: pointer; padding: 7px 10px; font-size: 10px; font-weight: 750; }
.user-action:hover { border-color: #46534b; color: #fff; }
.user-action.danger { color: #ffaaaa; border-color: rgba(255,114,114,.22); }
.user-action:disabled { opacity: .35; cursor: not-allowed; }
#user-role-field label { display: block; }
.user-identity { display: flex; align-items: center; gap: 12px; }.user-identity .avatar { width: 34px; height: 34px; }.user-identity strong { color: var(--text); }
.role-badge { width: max-content; padding: 5px 8px; border-radius: 5px; color: var(--green); background: rgba(80,215,120,.09); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }.role-badge.operator { color: var(--blue); background: rgba(97,166,255,.09); }

.modal-layer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(2,5,3,.76); backdrop-filter: blur(10px); padding: 20px; }
.modal-card { position: relative; width: min(450px,100%); background: #141916; border: 1px solid #2b342f; border-radius: 17px; padding: 30px; box-shadow: var(--shadow); }
.modal-card h2 { margin: 5px 0 23px; }.modal-close { position: absolute; top: 13px; right: 14px; border: 0; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; }.modal-card .primary-button { width: 100%; margin-top: 8px; }
.danger-modal { border-color: rgba(255,114,114,.3); }
.danger-text { color: var(--red); }
.danger-modal .modal-copy strong { color: #ffd1d1; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.danger-button { background: #ba4d4d; color: white; }
.danger-button:hover:not(:disabled) { background: #d45a5a; }
.editor-modal-card { width: min(980px, 96vw); max-height: 92vh; overflow: auto; }
.editor-modal-card h2 { margin-bottom: 7px; }
.editor-path { display: block; margin-bottom: 17px; color: var(--green); font-size: 11px; overflow-wrap: anywhere; }
.editor-modal-card textarea { min-height: min(58vh, 560px); resize: vertical; }
.editor-footer { margin-top: 12px; }
.editor-footer span { color: var(--muted-2); font-size: 10px; }
.editor-footer .primary-button { width: auto; margin: 0; min-width: 140px; }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 270px; max-width: 380px; border: 1px solid #304137; border-radius: 10px; background: #172019; color: #dce7df; padding: 13px 15px; box-shadow: var(--shadow); font-size: 12px; animation: toast-in .2s ease-out; }
.toast.error { border-color: #593332; color: #ffc0c0; background: #241515; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.loading-bar { position: fixed; z-index: 100; left: 0; top: 0; height: 2px; width: 0; background: var(--green); box-shadow: 0 0 12px var(--green); transition: width .2s, opacity .2s; opacity: 0; }
.loading-bar.active { width: 72%; opacity: 1; }.loading-bar.done { width: 100%; opacity: 0; }

@media (max-width: 1080px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .welcome-mark { width: 210px; }
  .system-health > div { min-width: 54px; padding-inline: 8px; }
  .system-health > div:last-child { min-width: 66px; }
  .system-health strong { font-size: 9px; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; width: min(300px, 88vw); transform: translateX(-105%); transition: transform .22s; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .menu-button, .mobile-close { display: inline-grid; place-items: center; }
  .mobile-close { font-size: 23px; }.menu-button { margin-right: 12px; }
  .users-nav { font-size: 0; }.users-icon { font-size: 9px; }
  .system-health { display: none; }
  .profile-copy, .profile-button > span:last-child { display: none; }
  .content { padding-top: 25px; }
  .server-hero, .page-heading { display: block; }
  .welcome-hero { min-height: 0; padding: 35px 25px; }
  .welcome-mark { display: none; }
  .welcome-stats { grid-template-columns: 1fr; }
  .hero-actions { justify-content: flex-start; margin-top: 22px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 90px; }
  .users-table-header { display: none; }.user-row { grid-template-columns: 1fr auto; }.user-row > span:nth-child(n+3):not(.user-actions) { display: none; }.user-actions { grid-column: 1 / -1; justify-content: stretch; }.user-actions .user-action { flex: 1; }
  .files-toolbar { align-items: flex-start; flex-direction: column; }
  .file-actions { width: 100%; overflow-x: auto; }
  .files-table-head { display: none; }
  .file-row { grid-template-columns: minmax(0,1fr) auto; padding: 10px 14px; }
  .file-row-size, .file-row-time { display: none; }
  .settings-layout { grid-template-columns: 1fr; gap: 18px; padding: 24px 18px; }
  .properties-footer, .editor-footer { align-items: stretch; flex-direction: column; }
  .properties-footer .primary-button, .editor-footer .primary-button { width: 100%; }
}

@media (max-width: 480px) {
  .login-card { padding: 30px 23px; }
  .brand-login { margin-bottom: 38px; }
  .topbar { padding: 0 15px; }.crumbs > span, .crumbs > b { display: none; }
  .content { padding-left: 14px; padding-right: 14px; }
  .hero-actions .action-button { flex: 1 1 auto; }
  .tabs { padding: 0 8px; }.tab { padding: 0 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
