@font-face {
  font-family: "Ruda";
  src: url("/static/fonts/Ruda-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Ruda";
  src: url("/static/fonts/Ruda-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root,
:host {
  color-scheme: light;
  --sidebar: #0f172a;
  --sidebar-2: #162033;
  --side-text: #d5dbe6;
  --side-muted: #8b95a7;
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --cpu: #2563eb;
  --load: #d97706;
  --proc: #db2777;
  --up: #059669;
  --mem: #16a34a;
  --cache: #ea580c;
  --free: #7c3aed;
  --disk: #7c3aed;
  --danger: #dc2626;
  --ok: #059669;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
  --radius: 14px;
  --bs-body-font-family: "Ruda", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bs-font-sans-serif: "Ruda", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-primary-base: #4f46e5;
  --bs-primary-focus-ring: rgba(79, 70, 229, 0.25);
  --bs-border-color: var(--line);
  --bs-radius-5: 0.625rem;
  --bs-radius-7: 0.875rem;
  font-family: var(--bs-body-font-family);
}

html[data-theme="dark"],
html[data-bs-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1120;
  --card: #131c2e;
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --line: #233046;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--bs-body-font-family);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* Keep native Bootstrap 6 .btn & .form-control intact; style unclassed legacy elements gently */
button:not(.btn):not(.btn-close):not([class*="bs-"]),
.button:not(.btn) {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.45rem 0.85rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
button:not(.btn):not(.btn-close):hover,
.button:not(.btn):hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
html[data-theme="dark"] button:not(.btn):not(.btn-close):hover,
html[data-theme="dark"] .button:not(.btn):hover {
  background: #1e293b;
  border-color: #334155;
}
button.primary, .button.primary,
.btn-solid.theme-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: transparent;
}
button.primary:hover, .button.primary:hover,
.btn-solid.theme-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
}
button.danger:not(.btn) { color: var(--danger); border-color: rgba(220, 38, 38, 0.25); }
button.danger:not(.btn):hover { background: rgba(220, 38, 38, 0.08); }
button.ghost { width: 100%; margin-top: 0.6rem; }

label:not(.form-check-label):not(.form-label) { display: grid; gap: 0.35rem; font-size: 0.9rem; font-weight: 500; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(.form-control),
select:not(.form-control),
textarea:not(.form-control) {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:not([type="checkbox"]):not([type="radio"]):not(.form-control):focus,
select:not(.form-control):focus,
textarea:not(.form-control):focus,
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--bs-primary-focus-ring);
}
textarea { resize: vertical; }

.mark {
  width: 1.2rem; height: 1.2rem; display: inline-block; flex: none;
  background:
    linear-gradient(#818cf8, #818cf8) 0 0 / 44% 44% no-repeat,
    linear-gradient(#c7d2fe, #c7d2fe) 100% 0 / 44% 44% no-repeat,
    linear-gradient(#c7d2fe, #c7d2fe) 0 100% / 44% 44% no-repeat,
    linear-gradient(#6366f1, #6366f1) 100% 100% / 44% 44% no-repeat;
  border-radius: 3px;
}

.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: relative; width: 17.25rem; flex: none; min-height: 100vh;
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: var(--side-text);
  display: flex; flex-direction: column; padding: 1.1rem 0 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 1030;
}
.sidebar .brand {
  color: #ffffff; font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em;
  display: flex; gap: 0.65rem; align-items: center; padding: 0.25rem 1.25rem 1rem;
}
.brand-logo {
  max-height: 2rem;
  max-width: 11.5rem;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.brand-icon-img {
  width: 1.35rem;
  height: 1.35rem;
  object-fit: contain;
  border-radius: 4px;
  flex: none;
  display: block;
}
.brand-glyph {
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  color: #818cf8;
  flex: none;
}
.brand-glyph .glyph {
  width: 1.25rem;
  height: 1.25rem;
}
.menu-label {
  margin: 0.95rem 1.25rem 0.25rem; color: var(--side-muted);
  letter-spacing: 0.11em; font-size: 0.67rem; font-weight: 700; text-transform: uppercase;
}
.sidebar nav .menu-toggle {
  width: 100%;
  margin: 0.45rem 0 0.15rem;
  padding: 0.4rem 0.85rem;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--side-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-align: left;
  cursor: pointer;
}
.sidebar nav .menu-toggle:hover,
.sidebar nav .menu-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}
.menu-chevron {
  transition: transform 0.18s ease;
  opacity: 0.75;
  flex: none;
}
.menu-toggle[aria-expanded="true"] .menu-chevron {
  transform: rotate(90deg);
}
.menu-head-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.menu-ico {
  width: 1rem;
  height: 1rem;
  display: grid;
  place-items: center;
  flex: none;
  opacity: 0.85;
}
.menu-ico .glyph {
  width: 0.95rem;
  height: 0.95rem;
}
.nav-group-items {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-bottom: 0.2rem;
}
.sidebar nav {
  display: flex; flex-direction: column; gap: 0.1rem; overflow: visible; padding: 0 0.6rem 0.75rem;
}
.sidebar nav a {
  color: var(--side-text); display: flex; gap: 0.7rem; align-items: center;
  min-height: 2.55rem; padding: 0.35rem 0.85rem;
  border-radius: 10px; font-size: 0.9rem; font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}
.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}
.sidebar nav a.is-active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.22), rgba(99, 102, 241, 0.06));
  border-left-color: #818cf8;
  color: #ffffff;
  font-weight: 700;
}
.nav-ico { width: 1.35rem; height: 1.35rem; display: grid; place-items: center; flex: none; opacity: 0.9; }
.nav-ico .glyph { width: 1.1rem; height: 1.1rem; }
.nav-ico .brand-ico { width: 1.1rem; height: 1.1rem; display: block; }
.side-foot {
  margin-top: auto; padding: 0.9rem 1.25rem 0.2rem; color: var(--side-muted);
  font-size: 0.78rem; border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.main { flex: 1 1 auto; min-width: 0; margin-left: 0; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 3.85rem;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0 1.4rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1020;
}
html[data-theme="dark"] .topbar {
  background: rgba(11, 17, 32, 0.86);
}
.topbar h1 { font-size: 1.08rem; margin: 0; font-weight: 800; letter-spacing: -0.02em; }
.top-actions { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; }
.locale { display: flex; gap: 0.25rem; }
.locale button[aria-current="true"] {
  border-color: var(--accent); color: var(--accent); background: rgba(79, 70, 229, 0.08);
}
.content { padding: 1.4rem; display: grid; gap: 1.1rem; max-width: 1600px; width: 100%; }
.demo-banner, .impersonate, .flash, .notice { margin: 0.9rem 1.4rem 0; }
.demo-banner {
  background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa;
  border-radius: 12px; padding: 0.75rem 1rem; font-size: 0.9rem;
}
html[data-theme="dark"] .demo-banner { background: rgba(154, 52, 18, 0.22); border-color: rgba(253, 186, 116, 0.25); color: #fdba74; }
.impersonate {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 12px; padding: 0.75rem 1rem;
}
html[data-theme="dark"] .impersonate { background: rgba(79, 70, 229, 0.16); border-color: rgba(129, 140, 248, 0.25); }
.flash {
  border-radius: 12px; padding: 0.75rem 1rem; background: #ecfdf5;
  border: 1px solid #a7f3d0; color: var(--ok); font-weight: 500;
}
.flash-error { background: #fef2f2; border-color: #fecaca; color: var(--danger); }
html[data-theme="dark"] .flash { background: rgba(5, 150, 105, 0.16); border-color: rgba(16, 185, 129, 0.28); }
html[data-theme="dark"] .flash-error { background: rgba(220, 38, 38, 0.16); border-color: rgba(248, 113, 113, 0.28); color: #fca5a5; }
.notice { overflow-wrap: anywhere; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem 1rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.2rem 1.3rem; display: grid; gap: 0.85rem;
}
.card.narrow, .auth-card { max-width: 28rem; }
.guest {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background: radial-gradient(circle at top center, rgba(79, 70, 229, 0.08), transparent 60%), var(--bg);
}
.auth-card {
  width: min(28rem, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08); padding: 1.85rem;
}
.auth-card .brand { display: flex; gap: 0.55rem; align-items: center; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
html[data-theme="dark"] .auth-card .brand { color: #ffffff; }
html[data-theme="dark"] .mark { background-color: transparent; }
.auth-card h1 { margin: 0.45rem 0 0.25rem; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; }
.lead, .muted { color: var(--muted); }
.stack, .grid-form { display: grid; gap: 0.85rem; }
.grid-form { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); align-items: end; }
.check { display: flex; align-items: center; gap: 0.5rem; }
.check input { width: auto; }
.inline { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: end; }
.inline input, .inline select { width: auto; }
.links { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; }
.stats.three, .stats.services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.05rem 1.15rem; display: grid; gap: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.stat p { margin: 0; font-size: 0.84rem; color: var(--muted); font-weight: 600; }
.stat strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.section-title { font-size: 0.95rem; margin: 0.2rem 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.chip { background: #eceff5; border-radius: 999px; padding: 0.1rem 0.45rem; font-size: 0.75rem; }
.tone-cpu { color: var(--cpu); }
.tone-load { color: var(--load); }
.tone-proc { color: var(--proc); }
.tone-up { color: var(--up); }
.tone-mem { color: var(--mem); }
.tone-cache { color: var(--cache); }
.tone-free { color: var(--free); }
.tone-disk { color: var(--disk); }
.page-head, .row-between { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.pills { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pill { background: #eef1f6; border-radius: 999px; padding: 0.25rem 0.6rem; font-size: 0.78rem; display: inline-flex; gap: 0.45rem; }
.rx { color: var(--mem); }
.tx { color: var(--cpu); }
.table-wrap { overflow: auto; max-inline-size: 100%; container-type: inline-size; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead { position: sticky; inset-block-start: 0; z-index: 1; }
th { color: var(--muted); font-weight: 600; background: #f7f8fb; }
tbody th { position: sticky; inset-inline-start: 0; background: var(--card); color: var(--ink); }
html[data-theme="dark"] th { background: #151d2b; }
html[data-theme="dark"] tbody th { background: var(--card); }
.cmd { max-width: 28rem; overflow-wrap: anywhere; }
.badge { display: inline-block; background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 0.05rem 0.45rem; font-size: 0.75rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.crumbs { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.chart-card svg, svg.chart { width: 100%; height: auto; }
.sorts { display: flex; gap: 0.7rem; align-items: center; }
.sorts a[aria-current="true"] { font-weight: 700; }
.plain { margin: 0; padding-left: 1.1rem; }
.error-page { min-height: 100vh; display: grid; place-items: center; }
.icon-btn { display: none; }
h2 { margin: 0; font-size: 1.05rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kicker { margin: 0; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--muted); }
.dash-name { margin: 0.15rem 0 0; font-size: 1.65rem; letter-spacing: -0.03em; }
.hint { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.limit { color: var(--muted); font-size: 0.95rem; font-weight: 560; }
.stats.two { grid-template-columns: 1fr 1fr; }
.meter { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.95rem 1rem; display: grid; gap: 0.55rem; align-content: start; }
.meter-top { display: flex; justify-content: space-between; gap: 0.6rem; align-items: baseline; }
.meter-top p { margin: 0; }
.meter-top strong { font-size: 1.45rem; letter-spacing: -0.03em; }
.meter-track { height: 0.45rem; background: #eceff5; border-radius: 999px; overflow: hidden; }
html[data-theme="dark"] .meter-track { background: #243044; }
.meter-track > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.meter.is-full .meter-track > span { background: var(--load); }
.presets { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.presets button { min-height: 2.75rem; padding: 0.4rem 0.75rem; }
.presets button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.badge.ok { background: #ecfdf5; color: var(--ok); }
.badge.warn { background: #fff7ed; color: #9a3412; }
html[data-theme="dark"] .badge.ok { background: #12352c; color: #6ee7b7; }
html[data-theme="dark"] .badge.warn { background: #3b2414; color: #fdba74; }
.site { scroll-margin-top: 4.6rem; }
.site-list { display: grid; gap: 1rem; }
.site-tools { display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; align-items: end; padding-top: 0.2rem; border-top: 1px solid var(--line); }
.site-row { display: flex; justify-content: space-between; gap: 0.8rem; align-items: center; flex-wrap: wrap; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.site-row:last-child { border-bottom: 0; padding-bottom: 0; }
.site-row p { margin: 0.2rem 0 0; }
a.attention-row { display: flex; justify-content: space-between; gap: 0.8rem; align-items: center; flex-wrap: wrap; min-height: 2.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); color: inherit; }
a.attention-row:last-of-type { border-bottom: 0; }
a.attention-row:hover { color: var(--accent); }
details.danger-zone { border-top: 1px solid var(--line); padding-top: 0.7rem; }
details.danger-zone summary { cursor: pointer; color: var(--danger); min-height: 2.75rem; display: flex; align-items: center; }
.filter-label { display: grid; gap: 0.35rem; max-width: 28rem; }
.server-label { margin-top: 0.4rem; }
.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}
.search-input { flex: 1 1 18rem; min-inline-size: 0; }
.pagination { display: flex; justify-content: space-between; align-items: safe center; flex-wrap: wrap; gap: 0.8rem; }
.domain-link { color: var(--ink); }
.domain-link:hover { color: var(--accent); }
.site-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 0.7rem;
}
.site-tab {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.85rem 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--ink);
  text-align: left;
  min-inline-size: 0;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.site-tab:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.site-tab[aria-selected="true"] {
  border-color: var(--accent);
  background: rgba(79, 70, 229, 0.06);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.16);
}
html[data-theme="dark"] .site-tab[aria-selected="true"] {
  background: rgba(99, 102, 241, 0.15);
}
.site-tab-text {
  display: grid;
  gap: 0.15rem;
  min-inline-size: 0;
}
.site-tab-text strong {
  font-size: 0.94rem;
  line-height: 1.25;
}
.site-tab-text small {
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.site-tab-ico {
  width: 2.95rem;
  height: 2.95rem;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.ico-files { background: #eef2ff; color: #4f46e5; }
.ico-php { background: #eef2ff; color: #4f46e5; }
.ico-sftp { background: #ecfeff; color: #0891b2; }
.ico-docroot { background: #fffbeb; color: #d97706; }
.ico-ssl { background: #ecfdf5; color: #059669; }
.ico-mysql { background: #f5f3ff; color: #7c3aed; }
.ico-logs { background: #fdf2f8; color: #db2777; }
.ico-backups { background: #eff6ff; color: #2563eb; }
.ico-dns { background: #f0fdf4; color: #16a34a; }
.ico-apps { background: #fef3c7; color: #b45309; }
html[data-theme="dark"] .ico-files { background: #1e293b; color: #818cf8; }
html[data-theme="dark"] .ico-php { background: #1e1e38; color: #a5b4fc; }
html[data-theme="dark"] .ico-sftp { background: #16303c; color: #22d3ee; }
html[data-theme="dark"] .ico-docroot { background: #362815; color: #fbbf24; }
html[data-theme="dark"] .ico-ssl { background: #12352c; color: #34d399; }
html[data-theme="dark"] .ico-mysql { background: #291d47; color: #a78bfa; }
html[data-theme="dark"] .ico-logs { background: #3b192f; color: #f472b6; }
html[data-theme="dark"] .ico-backups { background: #172554; color: #60a5fa; }
html[data-theme="dark"] .ico-dns { background: #143323; color: #4ade80; }
html[data-theme="dark"] .ico-apps { background: #3a2e10; color: #fbbf24; }

.runtime-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-top: 0.5rem;
}
.runtime-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--line, #e2e8f0);
  background: var(--card-bg, #fff);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.runtime-card:has(input:checked) {
  border-color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
}
.runtime-card input[type="radio"] {
  margin: 0;
  accent-color: #0284c7;
}

.fm-shell { gap: 0.9rem; }
.fm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  padding: 0.7rem 0.85rem;
  background: rgba(107, 114, 128, 0.05);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.fm-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 560;
}
.fm-path-bar {
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.fm-crumbs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
.fm-dropzone {
  display: grid;
  gap: 0.75rem;
}
.fm-dropzone-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.fm-drop-ico {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
html[data-theme="dark"] .fm-drop-ico { background: #1e293b; color: #818cf8; }
.fm-drop-body {
  flex: 1 1 16rem;
  min-inline-size: 0;
  display: grid;
  gap: 0.35rem;
}
.fm-item-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-size: 0.93rem;
}
a.fm-item-link:hover { color: var(--accent); }
.fm-item-ico {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.fm-item-ico.is-dir { color: #d97706; background: #fffbeb; }
.fm-item-ico.is-zip { color: #7c3aed; background: #f5f3ff; }
.fm-item-ico.is-code { color: #2563eb; background: #eff6ff; }
.fm-item-ico.is-file { color: #64748b; background: #f1f5f9; }
html[data-theme="dark"] .fm-item-ico.is-dir { color: #fbbf24; background: #362815; }
html[data-theme="dark"] .fm-item-ico.is-zip { color: #a78bfa; background: #291d47; }
html[data-theme="dark"] .fm-item-ico.is-code { color: #60a5fa; background: #172554; }
html[data-theme="dark"] .fm-item-ico.is-file { color: #94a3b8; background: #1e293b; }
.fm-up-row td { background: rgba(107, 114, 128, 0.04); }
.fm-editor {
  border: 1.5px solid #2e3b52;
  border-radius: 14px;
  padding: 0;
  background: #0d131f;
  color: #e2e8f0;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(8, 12, 22, 0.28);
}
.prism-form {
  display: grid;
  gap: 0;
}
.prism-editor-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0.7rem 1rem;
  background: #141c2e;
  border-bottom: 1px solid #243048;
}
.prism-bar-left,
.prism-bar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.prism-dots {
  display: inline-flex;
  gap: 0.38rem;
  align-items: center;
}
.prism-dots i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  display: inline-block;
}
.prism-dots .dot-red { background: #ef4444; }
.prism-dots .dot-amber { background: #f59e0b; }
.prism-dots .dot-green { background: #10b981; }
.prism-file-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #f8fafc;
}
.prism-file-title code {
  background: rgba(148, 163, 184, 0.14);
  color: #f1f5f9;
  font-size: 0.85rem;
  padding: 0.18rem 0.5rem;
}
.prism-lang-badge {
  background: rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.prism-stats {
  color: #94a3b8;
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.prism-close-btn {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}
.prism-editor-stage {
  display: flex;
  position: relative;
  height: 30rem;
  min-block-size: 18rem;
  max-block-size: 48rem;
  resize: vertical;
  overflow: hidden;
  background: #0d131f;
}
.prism-line-numbers {
  width: 3.4rem;
  flex-shrink: 0;
  padding: 16px 10px 16px 6px;
  background: #101726;
  border-right: 1px solid #1e293b;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  line-height: 22px;
  text-align: right;
  user-select: none;
  overflow: hidden;
}
.prism-line-numbers span {
  display: block;
  height: 22px;
}
.prism-code-area {
  position: relative;
  flex: 1 1 auto;
  min-inline-size: 0;
  height: 100%;
  overflow: hidden;
  background: #0d131f;
}
.prism-textarea,
.prism-highlight,
.prism-highlight code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  font-size: 14px !important;
  line-height: 22px !important;
  tab-size: 4 !important;
  -moz-tab-size: 4 !important;
  letter-spacing: 0 !important;
  font-variant-ligatures: none !important;
  white-space: pre !important;
  word-spacing: normal !important;
  word-break: normal !important;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
}
.prism-textarea,
.prism-highlight {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  padding: 16px 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
  overflow: auto !important;
}
.prism-highlight {
  pointer-events: none;
  z-index: 1;
  color: #e2e8f0;
  background: transparent;
  scrollbar-width: none;
}
.prism-highlight::-webkit-scrollbar {
  display: none;
}
.prism-highlight code {
  display: block;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  color: inherit;
}
.prism-textarea {
  z-index: 2;
  color: transparent !important;
  background: transparent !important;
  caret-color: #38bdf8 !important;
  resize: none !important;
  outline: none !important;
}
.prism-textarea::selection {
  background: rgba(56, 189, 248, 0.28);
  color: transparent;
}
.prism-editor-foot {
  padding: 0.65rem 1rem;
  background: #141c2e;
  border-top: 1px solid #243048;
}
.prism-shortcut-hint {
  color: #94a3b8;
  font-size: 0.78rem;
}

/* Tema Prism Syntax Highlighting (One Dark / Dracula) */
.prism-highlight .token.comment,
.prism-highlight .token.prolog,
.prism-highlight .token.doctype,
.prism-highlight .token.cdata {
  color: #64748b;
  font-style: italic;
}
.prism-highlight .token.punctuation {
  color: #94a3b8;
}
.prism-highlight .token.delimiter.important {
  color: #f87171;
  font-weight: 700;
}
.prism-highlight .token.property,
.prism-highlight .token.tag,
.prism-highlight .token.boolean,
.prism-highlight .token.number,
.prism-highlight .token.constant,
.prism-highlight .token.symbol,
.prism-highlight .token.deleted {
  color: #fb923c;
}
.prism-highlight .token.selector,
.prism-highlight .token.attr-name,
.prism-highlight .token.string,
.prism-highlight .token.char,
.prism-highlight .token.builtin,
.prism-highlight .token.inserted {
  color: #4ade80;
}
.prism-highlight .token.operator,
.prism-highlight .token.entity,
.prism-highlight .token.url {
  color: #38bdf8;
}
.prism-highlight .token.atrule,
.prism-highlight .token.attr-value,
.prism-highlight .token.keyword {
  color: #c084fc;
  font-weight: 600;
}
.prism-highlight .token.function,
.prism-highlight .token.class-name {
  color: #60a5fa;
}
.prism-highlight .token.package {
  color: #fcd34d;
}
.prism-highlight .token.regex,
.prism-highlight .token.important,
.prism-highlight .token.variable {
  color: #38bdf8;
}
.prism-highlight .token.important,
.prism-highlight .token.bold {
  font-weight: 700;
}
dialog.fm-dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  width: min(28rem, 92vw);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
dialog.fm-dialog h3 { margin: 0; font-size: 1.05rem; }
dialog.fm-dialog::backdrop {
  background: rgba(15, 21, 32, 0.55);
  backdrop-filter: blur(2px);
}
.upload-box {
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  background: rgba(79, 70, 229, 0.03);
}
.log-box {
  margin: 0;
  padding: 0.8rem 0.9rem;
  background: #121a28;
  color: #d5dbe6;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  max-block-size: 16rem;
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.divider { border: 0; border-top: 1px solid var(--line); margin: 0.4rem 0; width: 100%; }
.code-stat { font-size: 0.95rem !important; font-family: monospace; overflow-wrap: anywhere; }
code { font-size: 0.86em; background: rgba(107, 114, 128, 0.12); padding: 0.12rem 0.35rem; border-radius: 6px; }

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.account-form-card {
  max-width: 58rem;
  padding: 1.5rem 1.65rem;
  gap: 1.35rem;
  border: 1px solid var(--line);
}
.form-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.form-hero-ico {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.14), rgba(59, 130, 246, 0.1));
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
html[data-theme="dark"] .form-hero-ico {
  background: rgba(99, 102, 241, 0.18);
  color: #818cf8;
}
.form-hero-text {
  display: grid;
  gap: 0.2rem;
}
.form-hero-text h2 {
  font-size: 1.15rem;
  margin: 0;
}
.form-hero-text p {
  margin: 0;
  font-size: 0.9rem;
}
.form-section {
  display: grid;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(107, 114, 128, 0.025);
}
html[data-theme="dark"] .form-section {
  background: rgba(15, 21, 32, 0.35);
}
.form-section-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}
.form-section-ico {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 9px;
  background: #eef2ff;
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
html[data-theme="dark"] .form-section-ico {
  background: #1e293b;
  color: #818cf8;
}
.form-section-head h3 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 650;
}
.form-section-head p {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.15rem;
  align-items: start;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.15rem;
  align-items: start;
}
.field-box {
  display: grid;
  gap: 0.4rem;
}
.field-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.field-box input,
.field-box select {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem 0.8rem;
  font-size: 0.94rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field-box input:hover,
.field-box select:hover {
  border-color: #cbd5e1;
}
html[data-theme="dark"] .field-box input:hover,
html[data-theme="dark"] .field-box select:hover {
  border-color: #475569;
}
.field-box input:focus,
.field-box select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.field-hint {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}
.ssh-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ssh-toggle-card:hover {
  border-color: var(--accent);
}
.ssh-toggle-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.ssh-toggle-text {
  display: grid;
  gap: 0.15rem;
}
.ssh-toggle-text strong {
  font-size: 0.94rem;
}
.ssh-toggle-text span {
  font-size: 0.82rem;
  color: var(--muted);
}
.ssh-toggle-card input[type="checkbox"] {
  width: 1.3rem;
  height: 1.3rem;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.form-footer .button,
.form-footer button {
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.range-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.range-pills {
  display: inline-flex;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.25rem;
  gap: 0.2rem;
  box-shadow: var(--shadow);
}
.range-pill {
  padding: 0.42rem 0.85rem;
  border-radius: 9px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.range-pill:hover {
  color: var(--ink);
}
.range-pill.is-active {
  background: var(--accent);
  color: white;
}
.charts-pro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}
.chart-card-pro {
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--line);
  gap: 1rem;
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.chart-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.chart-title-wrap h2 {
  color: var(--ink);
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.chart-title-wrap p {
  margin: 0.18rem 0 0;
  font-size: 0.8rem;
}
.chart-ico {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ico-cpu { background: #eff6ff; color: var(--cpu); }
.ico-load { background: #fffbeb; color: var(--load); }
.ico-mem { background: #f0fdf4; color: var(--mem); }
.ico-disk { background: #f5f3ff; color: var(--disk); }
.ico-net-rx { background: #fdf2f8; color: var(--proc); }
.ico-net-tx { background: #ecfdf5; color: var(--up); }
html[data-theme="dark"] .ico-cpu { background: #172554; color: #60a5fa; }
html[data-theme="dark"] .ico-load { background: #362815; color: #fbbf24; }
html[data-theme="dark"] .ico-mem { background: #143323; color: #4ade80; }
html[data-theme="dark"] .ico-disk { background: #291d47; color: #a78bfa; }
html[data-theme="dark"] .ico-net-rx { background: #3b192f; color: #f472b6; }
html[data-theme="dark"] .ico-net-tx { background: #12352c; color: #34d399; }

.chart-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(4.2rem, auto));
  gap: 0.45rem;
}
.chart-kpi {
  background: rgba(107, 114, 128, 0.05);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.35rem 0.6rem;
  display: grid;
  gap: 0.1rem;
  text-align: right;
}
.chart-kpi span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.chart-kpi strong {
  font-size: 0.86rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.chart-canvas {
  background: rgba(107, 114, 128, 0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem 0.5rem 0.35rem;
}
html[data-theme="dark"] .chart-canvas {
  background: rgba(15, 21, 32, 0.45);
}
.detailed-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart-grid-line {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.chart-grid-vline {
  stroke: var(--line);
  stroke-width: 1;
  stroke-opacity: 0.55;
}
.chart-axis-text {
  fill: var(--muted);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.chart-dot {
  fill: var(--card);
  stroke: currentColor;
  stroke-width: 2;
  cursor: pointer;
  transition: r 0.12s ease, fill 0.12s ease;
}
.chart-dot:hover {
  r: 5.5px;
  fill: currentColor;
}

.callout-card {
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: rgba(79, 70, 229, 0.05);
  border: 1px solid rgba(79, 70, 229, 0.2);
  color: var(--ink);
  display: grid;
  gap: 0.35rem;
}
.callout-card h4 { margin: 0; font-size: 0.95rem; }
.callout-card.warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
html[data-theme="dark"] .callout-card.warn {
  background: #2e210d;
  border-color: #5a3d0f;
  color: #fde68a;
}
.credential-stat {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.copy-pill-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
}
.copy-pill-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.terminal-shell {
  border-radius: 12px;
  background: #0d131f;
  border: 1px solid #1f293d;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: grid;
}
.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.95rem;
  background: #141c2e;
  border-bottom: 1px solid #1f293d;
  flex-wrap: wrap;
}
.terminal-dots {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}
.terminal-dots i {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  display: inline-block;
}
.terminal-title {
  color: #94a3b8;
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.terminal-output {
  margin: 0;
  padding: 0.95rem 1.1rem;
  background: #0a0f18;
  color: #38bdf8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 22rem;
  overflow-y: auto;
}
.terminal-prompt-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.95rem;
  background: #101726;
  border-top: 1px solid #1f293d;
}
.terminal-prompt-user {
  color: #34d399;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.terminal-prompt-input {
  background: transparent !important;
  border: none !important;
  color: #f8fafc !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  flex: 1 1 10rem;
  padding: 0.35rem 0.5rem;
  outline: none !important;
  box-shadow: none !important;
}
.terminal-quick-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  background: #0d131f;
  border-top: 1px dashed #1f293d;
}
.quick-cmd-pill {
  background: #172238;
  border: 1px solid #28354f;
  color: #a5b4fc;
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  cursor: pointer;
}
.quick-cmd-pill:hover {
  background: #233355;
  color: #c7d2fe;
}

@media (max-width: 1200px) {
  .charts-pro { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .stats, .stats.three, .stats.services, .stats.two, .split, .two-col, .charts { grid-template-columns: 1fr 1fr; }
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; overflow-y: auto; transform: translateX(-105%); transition: transform 0.2s ease; }
  .sidebar.is-open { transform: none; }
  .main { margin-left: 0; width: 100%; }
  .icon-btn { display: inline-flex; }
  .stats, .stats.three, .stats.services, .stats.two, .split, .two-col, .charts, .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .chart-kpis { grid-template-columns: repeat(2, 1fr); width: 100%; }
  .topbar h1 { font-size: 0.95rem; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
}

.title-with-icon { display: flex; align-items: center; gap: 0.85rem; }
.title-with-icon h2 { margin: 0; }
.tool-board { display: grid; gap: 0.85rem; }
.tool-groups { display: grid; gap: 1rem; }
.tool-group-title {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.7rem; }
.tool {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  row-gap: 0.12rem;
  align-items: center;
  min-height: 4.6rem;
  padding: 0.75rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: inherit;
}
.tool:hover { border-color: #6366f1; color: inherit; }
.tool-mark {
  grid-row: span 2;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f4f6fb;
  color: #334155;
}
.tool-mark .glyph, .tool-mark .brand-ico, .site-tab-ico img { width: 1.45rem; height: 1.45rem; display: block; }
.site-tab-ico img { width: 1.55rem; height: 1.55rem; }
.tool-name { font-weight: 680; font-size: 0.95rem; line-height: 1.25; }
.tool-desc { color: var(--muted); font-size: 0.8125rem; line-height: 1.35; }
.tone-sites { background: #eef2ff; color: #4338ca; }
.tone-files { background: #eef2ff; color: #4338ca; }
.tone-backups { background: #eff6ff; color: #1d4ed8; }
.tone-cloud { background: #f0f9ff; color: #0369a1; }
.tone-stats { background: #f5f3ff; color: #6d28d9; }
.tone-shield { background: #ecfdf5; color: #047857; }
.tone-accounts { background: #fff7ed; color: #c2410c; }
.tone-profile { background: #f8fafc; color: #334155; }
.tone-php, .tone-mysql, .tone-postgres, .tone-nodejs, .tone-python, .tone-ruby, .tone-rust, .tone-go, .tone-docker { background: #f8fafc; }
html[data-theme="dark"] .tool-mark { background: #121a28; color: #e2e8f0; }
html[data-theme="dark"] .tone-sites,
html[data-theme="dark"] .tone-files { background: #1e1b4b; color: #c7d2fe; }
html[data-theme="dark"] .tone-backups { background: #172554; color: #bfdbfe; }
html[data-theme="dark"] .tone-cloud { background: #0c4a6e; color: #bae6fd; }
html[data-theme="dark"] .tone-stats { background: #2e1065; color: #ddd6fe; }
html[data-theme="dark"] .tone-shield { background: #064e3b; color: #a7f3d0; }
html[data-theme="dark"] .tone-accounts { background: #7c2d12; color: #ffedd5; }
html[data-theme="dark"] .tone-profile { background: #1e293b; color: #e2e8f0; }
html[data-theme="dark"] .tone-php,
html[data-theme="dark"] .tone-mysql,
html[data-theme="dark"] .tone-postgres,
html[data-theme="dark"] .tone-nodejs,
html[data-theme="dark"] .tone-python,
html[data-theme="dark"] .tone-ruby,
html[data-theme="dark"] .tone-rust,
html[data-theme="dark"] .tone-go,
html[data-theme="dark"] .tone-docker { background: #121a28; }
.ico-php { background: #eeeaf8; }
.ico-mysql { background: #e7f0f7; }
.ico-postgres { background: #e7eefb; }
.ico-nodejs { background: #e7f6e8; }
.ico-python { background: #e7f1f8; }
.ico-ruby { background: #fdecec; }
.ico-rust { background: #f8ece6; }
.ico-go { background: #e6f7fb; }
.ico-docker { background: #e7f3fc; }
.ico-ssl { background: #e8eef6; }
html[data-theme="dark"] .ico-php { background: #2a2740; }
html[data-theme="dark"] .ico-mysql { background: #1a3044; }
html[data-theme="dark"] .ico-postgres { background: #1a2744; }
html[data-theme="dark"] .ico-nodejs { background: #16301c; }
html[data-theme="dark"] .ico-python { background: #163044; }
html[data-theme="dark"] .ico-ruby { background: #3f1d1d; }
html[data-theme="dark"] .ico-rust { background: #3a241c; }
html[data-theme="dark"] .ico-go { background: #12343c; }
html[data-theme="dark"] .ico-docker { background: #123044; }
html[data-theme="dark"] .ico-ssl { background: #172554; }

.runtime-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(107, 114, 128, 0.04);
}
.runtime-actions form { margin: 0; }
.runtime-actions-label { font-weight: 650; font-size: 0.88rem; margin-right: 0.25rem; }
.runtime-list { display: grid; }
.runtime-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.runtime-row:last-child { border-bottom: 0; padding-bottom: 0; }
.runtime-row p { margin: 0.15rem 0 0; }
.runtime-row.is-selected { background: rgba(79, 70, 229, 0.05); margin: 0 -0.4rem; padding-left: 0.4rem; padding-right: 0.4rem; border-radius: 10px; }
.runtime-logs { display: grid; gap: 0.55rem; border-top: 1px solid var(--line); padding-top: 0.9rem; }
.runtime-logs h3 { margin: 0; font-size: 1rem; }
.deps-output { max-height: 16rem; border-radius: 12px; }
.check .hint { display: block; }

.terminal-log {
  max-height: 22rem;
  overflow: auto;
  background: #0a0f18;
  padding: 0.95rem 1.1rem 0.4rem;
}
.terminal-log .terminal-output {
  max-height: none;
  padding: 0 0 0.85rem;
  background: transparent;
}
.terminal-line { margin: 0 0 0.35rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.82rem; }
.terminal-prompt { color: #4ade80; }
.terminal-cmd { color: #f8fafc; }
.terminal-output.is-fail { color: #fda4af; }
.terminal-hello, .terminal-pending {
  margin: 0 0 0.8rem;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
}
.terminal-prompt-user { display: inline; width: auto; margin: 0; }
.terminal-run, .terminal-clear { min-height: 2.75rem; }
.terminal-prompt-form.is-busy .terminal-prompt-input { opacity: 0.65; }
.terminal-hint {
  margin: 0;
  padding: 0.45rem 0.95rem 0.7rem;
  background: #101726;
  color: #94a3b8;
  font-size: 0.8125rem;
}
.terminal-quick-label { font-size: 0.8125rem; color: #94a3b8; align-self: center; }
.quick-cmd-pill { min-height: 2rem; }

/* Observabilidade Beszel Hub */
.observability-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.observability-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.observability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.observability-badge::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: pulse-live 2s infinite;
}
@keyframes pulse-live {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.observability-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.observability-frame-wrap {
  width: 100%;
  height: 780px;
  min-height: 650px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}
.observability-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.details-collapsible {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.85rem 1.15rem;
  margin-top: 1.5rem;
}
.details-collapsible summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  font-size: 0.95rem;
}
.details-collapsible[open] summary {
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  .site-tab, .sidebar, .tool { transition: none; }
  .site-tab:hover { transform: none; }
}

/* Bootstrap 6 Integration & Visual Polish */
.card {
  --bs-card-bg: var(--card);
  --bs-card-border-color: var(--line);
  --bs-card-border-radius: var(--radius);
  color: var(--ink);
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ink);
  --bs-table-border-color: var(--line);
  --bs-table-hover-bg: rgba(79, 70, 229, 0.04);
  margin-bottom: 0;
  font-variant-numeric: tabular-nums;
}
html[data-theme="dark"] .table {
  --bs-table-hover-bg: rgba(129, 140, 248, 0.08);
}
.table thead th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom-width: 1px;
  padding: 0.8rem 1rem;
  white-space: nowrap;
}
.table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
}

.form-control {
  background-color: var(--card);
  border-color: var(--line);
  color: var(--ink);
  border-radius: 10px;
}
.form-control:focus {
  background-color: var(--card);
  color: var(--ink);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--bs-primary-focus-ring);
}
.form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.btn {
  font-weight: 600;
  border-radius: 10px;
}
.btn-outline {
  border-color: var(--line);
  color: var(--ink);
  background: var(--card);
}
.btn-outline:hover {
  border-color: #cbd5e1;
  background: rgba(148, 163, 184, 0.1);
}
.btn-outline.theme-primary {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-outline.theme-primary:hover {
  background: var(--accent);
  color: #ffffff;
}
.btn-outline.theme-danger {
  border-color: rgba(220, 38, 38, 0.35);
  color: var(--danger);
}
.btn-outline.theme-danger:hover {
  background: var(--danger);
  color: #ffffff;
}
.badge {
  font-weight: 700;
  letter-spacing: 0.02em;
}
.alert {
  border-radius: 12px;
}

/* White-Label / Branding Studio */
.brand-option-card {
  cursor: pointer;
  transition: all 0.16s ease;
  border: 1.5px solid var(--line) !important;
  background: var(--card);
}
.brand-option-card:hover {
  border-color: #818cf8 !important;
  transform: translateY(-1px);
}
.brand-option-card:has(input:checked) {
  border-color: var(--accent) !important;
  background: rgba(79, 70, 229, 0.05);
  box-shadow: 0 0 0 3px var(--bs-primary-focus-ring);
}
.brand-icon-tile {
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1.5px solid var(--line) !important;
  background: var(--card);
  min-height: 2.75rem;
}
.brand-icon-tile:hover {
  border-color: #818cf8 !important;
}
.brand-icon-tile:has(input:checked) {
  border-color: var(--accent) !important;
  background: rgba(79, 70, 229, 0.08);
  box-shadow: 0 0 0 2px var(--bs-primary-focus-ring);
}
.brand-preview-sticky {
  position: sticky;
  top: 5rem;
}
.brand-preview-sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #162033 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.brand-preview-nav-ghost {
  height: 0.65rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}
.brand-preview-nav-ghost.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.45), rgba(99, 102, 241, 0.15));
  border-left: 3px solid #818cf8;
}
.brand-preview-login {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
}
.brand-preview-login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}


