/* VPS Hub / workspace 02 — local styles, no runtime CSS framework. */
:root {
  color-scheme: dark;
  --bg: #101315;
  --surface: #171b1e;
  --raised: #1d2327;
  --hover: #22292d;
  --line: #2b3338;
  --text: #ecf0ed;
  --muted: #9ba7ae;
  --accent: #b8decc;
  --accent-ink: #16251e;
  --red: #ffb1a7;
  --red-bg: #362320;
  --amber: #e7c68c;
  --green: #b8decc;
  --shadow: 0 18px 60px #0005;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f2;
  --surface: #fff;
  --raised: #eef1ed;
  --hover: #e9ede8;
  --line: #d7ded8;
  --text: #1d2a23;
  --muted: #5d6d64;
  --accent: #285b45;
  --accent-ink: #fff;
  --red: #a43527;
  --red-bg: #fff0ed;
  --amber: #875b14;
  --green: #285b45;
  --shadow: 0 18px 60px #1830261c;
}
* {
  box-sizing: border-box;
}
html {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: auto;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  padding: 10px 12px;
  min-width: 0;
  max-width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}
label {
  display: block;
  font-size: 13px;
}
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.svg-sprite {
  display: none;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1.25;
}
h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
p + p {
  margin-top: 8px;
}
strong {
  font-weight: 600;
}
.muted {
  color: var(--muted);
}
.caption {
  font-size: 11px;
}
.mono,
code,
pre,
kbd {
  font-family: var(--mono);
}
.eyebrow {
  font: 10px/1.5 var(--mono);
  letter-spacing: 1.7px;
  color: var(--muted);
}
.inline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.min-zero {
  min-width: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
.button,
.icon-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  min-height: 38px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.button:hover,
.icon-button:hover {
  background: var(--hover);
  border-color: var(--muted);
}
.button.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.button.primary:hover {
  filter: brightness(0.94);
}
.button.danger {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red);
}
.button.small {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}
.icon-button {
  width: 38px;
  padding: 8px;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px;
  min-height: 32px;
}
.text-button:hover {
  color: var(--accent);
}
kbd {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 10px;
  color: var(--muted);
}
.primary kbd {
  border-color: currentColor;
  color: inherit;
  opacity: 0.7;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.brand-mark {
  font: 600 20px var(--mono);
  color: var(--accent);
  letter-spacing: -3px;
  margin-right: 4px;
}
.version {
  font: 9px var(--mono);
  padding: 2px 5px;
  border: 1px solid var(--line);
  color: var(--muted);
  letter-spacing: 0;
}
.login-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.login-story {
  padding: 40px 10%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  gap: 60px;
}
.login-story h1 {
  font-size: clamp(42px, 5vw, 76px);
  line-height: 1.1;
  letter-spacing: -3px;
  margin: 18px 0 25px;
}
.login-story p.muted {
  max-width: 330px;
  line-height: 1.8;
}
.login-lines {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  width: min(100%, 320px);
}
.login-lines span {
  font: 11px var(--mono);
  color: var(--muted);
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.login-form-wrap {
  display: grid;
  place-items: center;
  padding: 40px;
}
.login-form {
  width: 100%;
  max-width: 340px;
}
.login-form h2 {
  font-size: 25px;
  letter-spacing: -0.8px;
  margin-top: 10px;
  margin-bottom: 8px;
}
.login-form label {
  margin-top: 30px;
  margin-bottom: 8px;
}
.login-form input {
  width: 100%;
  height: 46px;
}
.login-form > .button {
  width: 100%;
  margin-top: 20px;
  justify-content: space-between;
  height: 44px;
}
.login-form > .caption {
  margin-top: 22px;
  line-height: 1.8;
}
.error-text {
  color: var(--red);
  font-size: 12px;
  margin-top: 12px;
}
.workspace {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 15px 0;
  z-index: 30;
}
.sidebar > .brand {
  padding: 0 10px;
}
.host-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 10px;
  margin: 30px 0 25px;
}
.host-square {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--raised);
  width: 30px;
  height: 30px;
  font: 12px var(--mono);
  flex-shrink: 0;
}
.host-card strong {
  display: block;
  font-size: 11px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 125px;
}
.host-card span.caption {
  display: block;
  font-size: 9px;
}
.nav-label {
  font: 9px var(--mono);
  color: var(--muted);
  letter-spacing: 1.3px;
  padding: 0 12px 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 5px;
  padding: 10px 12px;
  margin: 3px 0;
  color: var(--muted);
  font-size: 12px;
  position: relative;
}
.nav-item:hover {
  background: var(--hover);
  color: var(--text);
}
.nav-item.active {
  background: var(--raised);
  color: var(--text);
}
.nav-item.active:before {
  content: "";
  width: 3px;
  position: absolute;
  left: -15px;
  top: 9px;
  bottom: 9px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.nav-item.active svg {
  color: var(--accent);
}
.nav-count {
  margin-left: auto;
  font: 10px var(--mono);
  color: var(--muted);
}
.sidebar nav {
  overflow-y: auto;
  min-height: 0;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 15px;
}
.command-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 10px;
  padding: 8px 9px;
  color: var(--muted);
}
.session-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 17px;
  padding: 17px 0;
}
.avatar {
  width: 27px;
  height: 27px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 50%;
  font: 10px var(--mono);
  display: grid;
  place-items: center;
}
.session-row strong {
  font-size: 10px;
  display: block;
}
.session-row .caption {
  display: block;
  font-size: 9px;
}
.session-row .text-button {
  margin-left: auto;
  font-size: 10px;
}
.main-shell {
  min-width: 0;
}
.topbar {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  gap: 15px;
  background: var(--bg);
  font-size: 11px;
}
.topbar-brand {
  color: var(--muted);
}
.topbar-divider {
  height: 20px;
  border-left: 1px solid var(--line);
}
.topbar .icon-button {
  border: 0;
  background: transparent;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font: 10px var(--mono);
  color: var(--muted);
}
.status:before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--muted);
  border-radius: 50%;
  flex-shrink: 0;
}
.status.good {
  color: var(--green);
}
.status.good:before {
  background: var(--green);
}
.status.bad {
  color: var(--red);
}
.status.bad:before {
  background: var(--red);
}
.status.pending {
  color: var(--amber);
}
.status.pending:before {
  background: var(--amber);
}
main {
  max-width: 1560px;
  margin: auto;
  padding: 32px;
  outline: none;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading h1 {
  margin: 6px 0 8px;
}
.page-heading p.muted {
  font-size: 12px;
}
.heading-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}
.refresh-select {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.refresh-select select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface, #171b1e);
  color: var(--text, #ecf0ed);
  border: 1px solid var(--line, #2b3338);
  border-radius: 6px;
  height: 38px;
  padding: 0 32px 0 12px;
  font: 500 12px/38px var(--mono);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: all 0.15s ease;
}
.refresh-select select:hover {
  background: var(--hover, #22292d);
  border-color: var(--muted, #9ba7ae);
}
.refresh-select select:focus-visible {
  outline: 2px solid var(--accent, #10b981);
  outline-offset: -1px;
}
.refresh-select::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted, #9ba7ae);
  pointer-events: none;
}
.refresh-select select option {
  background: #171b1e;
  color: #ecf0ed;
  font: 12px var(--mono);
  padding: 8px;
}
:root[data-theme="light"] .refresh-select select {
  background: #ffffff;
  color: #171b1e;
  border-color: #d1d5db;
}
:root[data-theme="light"] .refresh-select select option {
  background: #ffffff;
  color: #171b1e;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  font: 9px var(--mono);
  letter-spacing: 0.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 16px;
  gap: 10px;
}
.mobile-only {
  display: none;
}
.notice {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  padding: 12px 15px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.notice.error {
  border-color: var(--red);
  background: var(--red-bg);
  color: var(--red);
}
.notice.warning {
  color: var(--amber);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.metric {
  min-width: 0;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}
.metric:last-child {
  border-right: 0;
}
.metric-label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.metric-number {
  font: 500 32px/1.3 var(--mono);
  letter-spacing: -1.5px;
  margin: 13px 0 9px;
}
.metric-number small {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 3px;
  letter-spacing: 0;
}
.metric .caption {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meter {
  height: 3px;
  background: var(--line);
  margin-top: 14px;
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  background: var(--accent);
  max-width: 100%;
}
.meter.high i {
  background: var(--red);
}
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.charts-grid .panel-wide {
  grid-column: 1 / -1;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.credential-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.credential-header {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}
.credential-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
}
.credential-sub {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  min-width: 0;
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}
.panel-header h2 {
  font-size: 13px;
}
.panel-body {
  padding: 20px;
}
.chart {
  height: 170px;
  width: 100%;
  display: block;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  font: 9px var(--mono);
  color: var(--muted);
  padding: 0 0 8px;
}
.chart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font: 9px var(--mono);
  color: var(--muted);
}
.legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend:before {
  content: "";
  width: 7px;
  height: 2px;
  background: var(--accent);
}
.legend.secondary:before {
  background: var(--amber);
}

/* Enhanced VPS Hub Real-Time Monitoring Charts */
.chart-panel {
  display: flex;
  flex-direction: column;
}
.chart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.chart-header-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chart-header-title h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.chart-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  color: var(--muted);
}
.btop-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
}
:root[data-theme="light"] .btop-tag {
  background: rgba(0, 0, 0, 0.05);
}
.chart-quick-stats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 11px var(--mono);
  flex-wrap: wrap;
}
.btop-stat-bracket {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.btop-stat-bracket strong {
  color: var(--text);
  font-weight: 600;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.stat-pill strong {
  color: var(--text);
  font-weight: 600;
}
.chart-hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
  gap: 14px;
  flex-wrap: wrap;
}
.chart-hero-main {
  display: flex;
  flex-direction: column;
}
.chart-hero-val {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text);
  line-height: 1.1;
}
.chart-hero-val small {
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 2px;
}
.chart-hero-sub {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  margin-top: 4px;
}
.chart-legend-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 11px var(--mono);
  color: var(--muted);
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.cpu-dot {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}
.legend-dot.ram-dot {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}
.legend-dot.rx-dot {
  background: #06b6d4;
  box-shadow: 0 0 6px rgba(6, 182, 212, 0.5);
}
.legend-dot.tx-dot {
  background: #8b5cf6;
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.5);
}

.chart-stage {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 220px;
  background: #090d13;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
  margin-bottom: 8px;
  padding: 10px 14px 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
:root[data-theme="light"] .chart-stage {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}
.chart-svg-wrap {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
}
.chart-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.chart-hit-rect {
  cursor: crosshair;
}

/* Tooltip */
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 30;
  background: rgba(18, 22, 25, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  padding: 8px 12px;
  font: 11px/1.45 var(--mono);
  color: var(--text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  transition: opacity 0.12s ease;
}
:root[data-theme="light"] .chart-tooltip {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}
.chart-tooltip.tt-center {
  transform: translate(-50%, -115%);
}
.chart-tooltip.tt-left {
  transform: translate(6px, -115%);
}
.chart-tooltip.tt-right {
  transform: translate(calc(-100% - 6px), -115%);
}
.chart-tooltip .tt-time {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.chart-tooltip .tt-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
}
.chart-tooltip .tt-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* Network stat cards */
.net-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}
.net-stat-box {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.net-stat-box.rx-box {
  border-left: 3px solid #06b6d4;
}
.net-stat-box.tx-box {
  border-left: 3px solid #8b5cf6;
}
.net-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.net-stat-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.rx-tag { color: #06b6d4; }
.tx-tag { color: #8b5cf6; }
.net-stat-peak {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--mono);
}
.net-stat-num {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text);
  line-height: 1.2;
}
.net-stat-sub {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  margin-top: 3px;
}


.host-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.host-facts dt,
.facts dt {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
}
.host-facts dd,
.facts dd {
  font: 11px var(--mono);
  margin: 0;
  overflow-wrap: anywhere;
}
.host-facts {
  margin: 0;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.toolbar input[type="search"] {
  flex: 1;
  min-width: 140px;
  font-size: 12px;
  max-width: 360px;
  padding: 8px 11px;
  background: var(--bg);
}
.toolbar select {
  font-size: 11px;
  padding: 8px;
}
.toolbar label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}
.toolbar .push {
  margin-left: auto;
}
.table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll:focus-visible {
  outline-offset: -3px;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: left;
}
th {
  color: var(--muted);
  font: 9px/1.5 var(--mono);
  letter-spacing: 0.7px;
  text-transform: uppercase;
  background: var(--surface);
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
}
td {
  font-size: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  max-width: 360px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--hover);
}
td code {
  font-size: 11px;
}
td .subline {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
td .row-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row-title svg {
  color: var(--muted);
  width: 17px;
}
.row-title strong {
  font-weight: 500;
}
.row-actions {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
}
.row-actions .button {
  font-size: 10px;
  min-height: 30px;
  padding: 5px 8px;
}
.row-actions .button svg {
  width: 12px;
  height: 12px;
}
.row-link {
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.row-link:hover {
  text-decoration: underline;
  color: var(--accent);
}
.badge {
  font: 9px var(--mono);
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 7px;
  white-space: nowrap;
  color: var(--muted);
}
.badge.good {
  color: var(--green, #10b981);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
}
.badge.bad {
  color: var(--red, #ef4444);
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}
.empty {
  text-align: center;
  padding: 45px 20px;
  color: var(--muted);
  white-space: normal;
}
.empty h3 {
  color: var(--text);
  font-size: 14px;
  margin-bottom: 6px;
}
.empty p {
  font-size: 12px;
  max-width: 440px;
  margin: auto;
}
.empty .button {
  margin-top: 16px;
}
.skeleton {
  height: 180px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font: 11px var(--mono);
  color: var(--muted);
}
.sort-button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  text-align: left;
}
.sort-button:hover {
  color: var(--accent);
}
.path-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.path-form input {
  flex: 1;
  font: 11px var(--mono);
  padding: 9px;
}
.breadcrumbs {
  display: flex;
  gap: 5px;
  padding: 12px 20px;
  overflow: auto;
  color: var(--muted);
  font: 10px var(--mono);
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.breadcrumbs button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 2px 3px;
}
.breadcrumbs button:hover {
  color: var(--accent);
}
.file-drop.dragging {
  outline: 2px dashed var(--accent);
  outline-offset: -5px;
}
.upload-progress {
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  font: 11px var(--mono);
  color: var(--accent);
}
.database-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
}
.db-sidebar .panel-body {
  padding: 14px;
}
.db-sidebar select {
  width: 100%;
  font-size: 12px;
}
.table-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}
.table-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 11px var(--mono);
  text-align: left;
  gap: 8px;
}
.table-list button.active,
.table-list button:hover {
  background: var(--raised);
  color: var(--accent);
}
.table-list button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subtabs {
  display: flex;
  gap: 5px;
}
.subtabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 11px;
}
.subtabs button.active {
  color: var(--accent);
  background: var(--raised);
}
.data-table td {
  font: 11px var(--mono);
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table th {
  position: sticky;
  top: 0;
}
.db-data-scroll {
  max-height: 440px;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.sql-editor {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.sql-editor label {
  margin-bottom: 8px;
  font-size: 11px;
}
.sql-editor textarea {
  display: block;
  width: 100%;
  min-height: 110px;
  font: 12px/1.7 var(--mono);
  resize: vertical;
}
.sql-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.sql-actions p {
  font-size: 10px;
  max-width: 450px;
}
.sql-result {
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  font: 11px/1.7 var(--mono);
  padding: 15px;
  background: var(--bg);
  border: 1px solid var(--line);
  margin-top: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.split-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}
.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.external-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 12px;
}
.external-link small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.external-link svg {
  width: 14px;
}
/* Terminal Multi-Tab System */
.terminal-panel-card {
  display: flex;
  flex-direction: column;
}
.terminal-tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--line);
  padding: 8px 14px 0 14px;
  gap: 10px;
  overflow-x: auto;
}
:root[data-theme="light"] .terminal-tab-bar {
  background: rgba(0, 0, 0, 0.04);
}
.terminal-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.terminal-tabs-scroll::-webkit-scrollbar {
  display: none;
}
.term-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  color: var(--muted);
  font: 12px/1.2 var(--mono);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
:root[data-theme="light"] .term-tab {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}
.term-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}
:root[data-theme="light"] .term-tab:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}
.term-tab.active {
  background: #090d13;
  color: var(--text);
  border-color: var(--line);
  border-bottom: 1px solid #090d13;
  margin-bottom: -1px;
  font-weight: 600;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.35);
}
:root[data-theme="light"] .term-tab.active {
  background: #ffffff;
  border-bottom-color: #ffffff;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.06);
}
.term-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background: #6b7280;
  transition: background 0.2s ease;
}
.term-tab-dot.good {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}
.term-tab-dot.pending {
  background: #f59e0b;
  box-shadow: 0 0 5px rgba(245, 158, 11, 0.5);
}
.term-tab-dot.bad {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}
.term-tab-title {
  display: inline-block;
  pointer-events: none;
}
.term-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  line-height: 1;
  opacity: 0.65;
  transition: all 0.12s ease;
}
.term-tab-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  opacity: 1;
}
.terminal-add-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--line);
  border-radius: 5px;
  color: var(--muted);
  font: 11px var(--mono);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.terminal-add-tab-btn:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: #00f0ff;
  color: #00f0ff;
}
:root[data-theme="light"] .terminal-add-tab-btn:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
  color: #10b981;
}
.terminal-pane-stack {
  position: relative;
  width: 100%;
}
.terminal-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.terminal-panel-header .inline {
  flex-wrap: wrap;
  gap: 8px;
}
.terminal-panel-header .button.small svg {
  width: 13px;
  height: 13px;
}
.terminal-panel {
  padding: 14px;
  background: #090d13;
  color: #e1e8e3;
  min-width: 0;
}
.terminal-container {
  height: clamp(280px, 54dvh, 650px);
  min-width: 0;
  overflow: hidden;
}
.terminal-note {
  padding: 12px 20px;
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.terminal-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}
.terminal-keys button {
  min-width: 42px;
  min-height: 34px;
  font: 10px var(--mono);
}
.terminal-command {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}
.terminal-command input {
  flex: 1;
  font: 12px var(--mono);
}

/* ==========================================================================
   TERMINAL FULLSCREEN MODE
   ========================================================================== */
#terminal-panel-root.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  z-index: 10000 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #090d13 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
#terminal-panel-root.is-fullscreen .terminal-panel {
  flex: 1 1 0% !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 8px 14px 4px !important;
  overflow: hidden !important;
}
#terminal-panel-root.is-fullscreen #terminal-containers-wrap {
  flex: 1 1 0% !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
}
#terminal-panel-root.is-fullscreen .terminal-container {
  flex: 1 1 0% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
}
#terminal-panel-root.is-fullscreen .terminal-container .xterm {
  height: 100% !important;
}
#terminal-panel-root.is-fullscreen .terminal-container .xterm-screen {
  height: 100% !important;
}
#terminal-panel-root.is-fullscreen .terminal-note {
  display: none !important;
}

.dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  padding: 0;
  box-shadow: var(--shadow);
  width: min(1000px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
}
.dialog::backdrop {
  background: #0009;
  backdrop-filter: blur(3px);
}
.dialog.compact {
  width: min(440px, calc(100vw - 32px));
}
.dialog-header,
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 20px;
  flex-shrink: 0;
}
.dialog-header {
  border-bottom: 1px solid var(--line);
}
.dialog-header h2 {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.dialog-footer {
  border-top: 1px solid var(--line);
}
.dialog-footer > .caption {
  margin-right: auto;
}
.dialog-footer .button:first-child {
  margin-left: auto;
}
.dialog-body {
  padding: 22px;
}
.dialog-body p {
  font-size: 12px;
  margin-bottom: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.dialog-body label {
  font-size: 11px;
  margin-bottom: 7px;
}
.dialog-body input {
  width: 100%;
}
.editor-dialog[open] {
  display: flex;
  flex-direction: column;
  height: min(740px, calc(100dvh - 40px));
}
.editor-dialog .notice {
  border-radius: 0;
  margin: 0;
}
.code-editor {
  width: 100%;
  flex: 1;
  min-height: 150px;
  resize: none;
  border: 0;
  border-radius: 0;
  font: 12px/1.8 var(--mono);
  tab-size: 2;
  background: var(--bg);
  padding: 22px;
  white-space: pre;
  overflow: auto;
  outline-offset: -3px;
}
.editor-dialog .dialog-header h2 {
  font: 12px var(--mono);
  max-width: 650px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editor-dialog .eyebrow {
  font-size: 8px;
}
.logs-dialog[open] {
  display: flex;
  flex-direction: column;
  height: min(700px, calc(100dvh - 40px));
}
.logs-dialog .toolbar {
  padding: 12px 20px;
}
.log-content {
  flex: 1;
  min-height: 150px;
  margin: 0;
  padding: 22px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 11px/1.8 var(--mono);
  background: var(--bg);
}
.commands-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 15px;
}
.commands-list a {
  padding: 9px;
  border-radius: 5px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.commands-list a:hover {
  background: var(--raised);
}
.toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  border: 1px solid var(--line);
  background: var(--raised);
  box-shadow: var(--shadow);
  border-radius: 7px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
  pointer-events: auto;
}
.toast.error {
  border-color: var(--red);
  color: var(--red);
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: #0008;
  border: 0;
  z-index: 29;
}
.spin svg {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1500px) {
  main {
    padding: 40px 48px;
  }
  .metric {
    padding: 24px 28px;
  }
}
@media (max-width: 1150px) {
  .workspace {
    grid-template-columns: 196px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .sidebar > .brand {
    font-size: 15px;
  }
  .nav-item {
    padding: 9px 10px;
    font-size: 11px;
    gap: 9px;
  }
  .nav-item.active:before {
    left: -12px;
  }
  .host-card {
    padding: 10px 8px;
  }
  .host-card strong {
    max-width: 105px;
  }
  main {
    padding: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .metric {
    padding: 18px;
  }
  .metric-number {
    font-size: 27px;
  }
  .charts-grid {
    grid-template-columns: 1fr 1fr;
  }
  .database-layout {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  td,
  th {
    padding-left: 16px;
    padding-right: 16px;
  }
  .host-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 248px;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    padding: 25px 16px 0;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar .nav-item {
    font-size: 13px;
    padding: 11px 12px;
  }
  .sidebar .host-card strong {
    max-width: 165px;
  }
  .mobile-only {
    display: inline-flex;
  }
  .topbar {
    height: 60px;
    padding: 0 22px;
  }
  .topbar-brand {
    display: none;
  }
  main {
    padding: 25px 22px;
  }
  .nav-item.active:before {
    left: -16px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .refresh-select select {
    padding-left: 0;
  }
  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .metric {
    padding: 17px 15px;
  }
  .metric-number {
    font-size: 25px;
  }
  .login-story {
    padding: 35px;
  }
  .login-form-wrap {
    padding: 35px;
  }
  .login-story h1 {
    font-size: 54px;
  }
}
@media (max-width: 640px) {
  body {
    font-size: 13px;
  }
  .topbar {
    padding: 0 14px;
  }
  .topbar .inline {
    gap: 9px;
  }
  main {
    padding: 24px 16px;
  }
  .page-heading {
    display: block;
    margin-bottom: 22px;
  }
  .page-heading h1 {
    font-size: 28px;
  }
  .heading-actions {
    margin-top: 18px;
    justify-content: space-between;
  }
  .heading-actions .button {
    min-height: 38px;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric {
    padding: 17px;
  }
  .metric:nth-child(2) {
    border-right: 0;
  }
  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .metric-number {
    font-size: 29px;
    margin: 10px 0 7px;
  }
  .charts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .charts-grid .panel-wide {
    grid-column: auto;
  }
  .chart {
    height: 155px;
  }
  .chart-stage {
    height: auto;
  }
  .net-stat-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .chart-quick-stats {
    gap: 6px;
  }
  .stack {
    gap: 16px;
  }
  .panel-header {
    padding: 15px 16px;
    gap: 10px;
  }
  .panel-header h2 {
    font-size: 12px;
  }
  .panel-body {
    padding: 16px;
  }
  .panel-header .inline {
    gap: 6px;
  }
  .panel-header .caption {
    font-size: 9px;
  }
  .toolbar {
    padding: 12px 16px;
    gap: 8px;
  }
  .toolbar input[type="search"] {
    max-width: none;
    min-width: 130px;
  }
  .toolbar .push {
    margin-left: 0;
  }
  .toolbar label {
    font-size: 10px;
  }
  .toolbar .button {
    font-size: 10px;
    padding: 8px;
  }
  .path-form {
    padding: 12px;
  }
  .path-form input {
    font-size: 10px;
  }
  .path-form .button {
    padding: 8px 10px;
  }
  .breadcrumbs {
    padding: 10px 12px;
  }
  .database-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .db-sidebar .table-list {
    max-height: 160px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .table-list button {
    padding: 10px 14px;
  }
  .pagination {
    padding: 12px;
    flex-wrap: wrap;
    font-size: 10px;
  }
  .sql-editor {
    padding: 14px;
  }
  .sql-actions {
    align-items: flex-start;
  }
  .sql-actions p {
    max-width: 60%;
  }
  .facts {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .page-footer {
    font-size: 8px;
    margin-top: 24px;
  }
  .host-facts dd {
    font-size: 10px;
  }
  .terminal-panel {
    padding: 8px 3px;
  }
  .terminal-container {
    height: 50dvh;
  }
  .terminal-note {
    padding: 12px 14px;
    font-size: 10px;
  }
  .terminal-command {
    padding: 0 12px 12px;
  }
  .terminal-command input {
    font-size: 16px;
  }
  .terminal-keys {
    padding: 10px 12px;
  }
  .login-screen {
    display: flex;
    flex-direction: column;
  }
  .login-story {
    padding: 25px 28px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 38px;
  }
  .login-story h1 {
    font-size: 40px;
    letter-spacing: -1.8px;
    margin: 12px 0 16px;
  }
  .login-story p.muted {
    font-size: 12px;
    max-width: 300px;
  }
  .login-story .login-lines,
  .login-story > .caption {
    display: none;
  }
  .login-form-wrap {
    padding: 34px 28px 50px;
  }
  .login-form {
    max-width: 420px;
  }
  .login-form h2 {
    font-size: 23px;
  }
  .login-form label {
    margin-top: 22px;
  }
  .dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 8px;
  }
  .editor-dialog[open],
  .logs-dialog[open] {
    height: calc(100dvh - 16px);
  }
  .dialog-header,
  .dialog-footer {
    padding: 12px 14px;
    gap: 8px;
  }
  .dialog-header h2 {
    max-width: 230px;
  }
  .code-editor {
    font-size: 13px;
    padding: 15px;
  }
  .dialog-footer .caption {
    font-size: 9px;
  }
  .dialog-footer kbd {
    display: none;
  }
  .dialog-footer .button {
    min-height: 40px;
  }
  .logs-dialog .toolbar {
    padding: 10px;
  }
  .logs-dialog .toolbar input {
    flex-basis: 100%;
  }
  .toasts {
    right: 16px;
    bottom: 16px;
  }
  .row-actions .button {
    min-height: 34px;
  }
  .button,
  .icon-button {
    min-height: 40px;
  }
  .file-name {
    min-width: 150px;
    max-width: 230px;
  }
  .topbar-divider {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.core-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px 22px;
  padding: 20px;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}
.core-item {
  display: grid;
  grid-template-columns: 45px 1fr 30px;
  align-items: center;
  gap: 9px;
  font: 9px var(--mono);
  color: var(--muted);
}
.core-item .meter {
  margin: 0;
}
summary {
  cursor: pointer;
}
summary::marker {
  color: var(--muted);
}
.table-dialog {
  width: calc(100vw - 32px);
  max-width: 1600px;
}
.table-dialog .db-data-scroll {
  max-height: calc(100dvh - 140px);
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

/* ==========================================================================
   TERMINAL MULTI-TAB NAVIGATION
   ========================================================================== */
.terminal-tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--raised, #1d2327);
  border-bottom: 1px solid var(--line, #2b3338);
  overflow-x: auto;
}
.terminal-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface, #171b1e);
  border: 1px solid var(--line, #2b3338);
  border-radius: 6px 6px 0 0;
  color: var(--muted, #9ba7ae);
  font-size: 12px;
  font-family: var(--mono);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.terminal-tab:hover {
  background: var(--hover, #22292d);
  color: var(--text, #ecf0ed);
}
.terminal-tab.active {
  background: #0d1113;
  border-color: var(--accent, #10b981);
  border-bottom-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 -2px 8px rgba(16, 185, 129, 0.15);
}
.terminal-tab-icon {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
}
.terminal-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  background: transparent;
  color: inherit;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  padding: 0;
  margin-left: 2px;
}
.terminal-tab-close:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

/* ==========================================================================
   HIGH-DEFINITION RESPONSIVE MONITORING CHARTS (NON-SQUASHED, CLEAN TYPOGRAPHY)
   ========================================================================== */
.chart-stage {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 220px;
  background: #090d12;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
  margin-bottom: 8px;
  padding: 10px 14px 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
:root[data-theme="light"] .chart-stage {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.05);
}

.vps-chart-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  position: relative;
}

.vps-chart-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font: 400 11px var(--mono);
  color: var(--muted);
  flex-wrap: wrap;
}
:root[data-theme="light"] .vps-chart-controls {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.vps-chart-ctrl-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vps-range-caption {
  font-size: 11px;
  color: var(--muted);
}
.vps-range-select {
  min-height: 26px;
  padding: 2px 8px;
  background: var(--surface, #171b1e);
  color: var(--text, #ecf0ed);
  border: 1px solid var(--line, #2b3338);
  border-radius: 4px;
  font: 400 11px var(--mono);
  cursor: pointer;
}
.vps-series {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vps-series-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line, #2b3338);
  background: transparent;
  color: var(--text, #ecf0ed);
  padding: 3px 8px;
  border-radius: 4px;
  font: 400 11px var(--mono);
  cursor: pointer;
  min-height: 26px;
  transition: all 0.15s ease;
}
.vps-series-btn:hover {
  background: var(--hover, #22292d);
}
.vps-series-btn[aria-pressed="false"] {
  opacity: 0.4;
  text-decoration: line-through;
  filter: grayscale(0.8);
}
.vps-series-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Inner Stage: Y-Axis + Plot */
.vps-chart-stage-inner {
  display: flex;
  align-items: stretch;
  height: 150px;
  gap: 8px;
  position: relative;
}

/* HTML Y-Axis: Always sharp, never squashed, normal weight */
.vps-chart-y-axis {
  width: 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
  font: 400 11px/1 var(--mono);
  color: var(--muted);
  user-select: none;
  flex-shrink: 0;
  padding: 2px 0;
}

/* Plot Box */
.vps-chart-plot-box {
  flex: 1;
  position: relative;
  height: 100%;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  overflow: hidden;
  cursor: crosshair;
}
:root[data-theme="light"] .vps-chart-plot-box {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.vps-chart-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.vps-grid {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}
:root[data-theme="light"] .vps-grid {
  stroke: rgba(0, 0, 0, 0.08);
}

.vps-path-line {
  transition: d 0.28s ease-out;
}
.vps-path-glow {
  transition: d 0.28s ease-out;
}
.vps-path-area {
  transition: d 0.28s ease-out;
}

/* Head glowing dots */
.vps-chart-head-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.vps-head-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot-color);
  border: 2px solid #ffffff;
  box-shadow: 0 0 8px var(--dot-color);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: left 0.28s ease-out, top 0.28s ease-out;
}

/* Crosshair indicator */
.vps-crosshair {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1px dashed rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 10;
}
:root[data-theme="light"] .vps-crosshair {
  border-left-color: rgba(0, 0, 0, 0.5);
}

/* HTML X-Axis */
.vps-chart-x-axis {
  margin-left: 60px;
  display: flex;
  justify-content: space-between;
  font: 400 11px/1 var(--mono);
  color: var(--muted);
  user-select: none;
  padding-top: 4px;
}

/* Tooltip */
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 40;
  background: rgba(14, 18, 22, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 8px 12px;
  font: 400 11px/1.4 var(--mono);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
}
:root[data-theme="light"] .chart-tooltip {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.chart-tooltip .tt-time {
  font-size: 10px;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 3px;
  margin-bottom: 5px;
}
.chart-tooltip .tt-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-tooltip .tt-row strong {
  margin-left: auto;
  font-weight: 600;
  color: var(--text);
}
.chart-tooltip .tt-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.chart-live-pulse {
  animation: none !important;
}
@media (max-width: 600px) {
  .vps-chart-x-axis span:nth-child(2),
  .vps-chart-x-axis span:nth-child(4) {
    display: none;
  }
}
@media (max-width: 480px) {
  .vps-chart-stage-inner { height: 130px; }
  .vps-chart-controls { flex-wrap: wrap; gap: 4px; }
  .vps-chart-y-axis { width: 40px; font-size: 9.5px; }
  .vps-chart-x-axis { margin-left: 48px; font-size: 9.5px; }
}

/* Hide Real-Time Live Status Badge & Refresh Button */
.realtime-badge,
#refresh {
  display: none !important;
}

/* ============================================================
   AI SYSTEM DIAGNOSTIC SUMMARY (HARMONIOUS PALETTE)
   ============================================================ */

.ai-diagnostics-panel {
  margin-bottom: 2px;
}
.ai-panel-header {
  padding: 14px 18px;
}
.ai-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-icon {
  width: 17px;
  height: 17px;
  color: var(--accent);
  flex-shrink: 0;
}
.ai-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-diagnostics-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ai-diag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.ai-diag-col {
  padding: 14px;
  border-radius: 6px;
  background: var(--raised);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
:root[data-theme="light"] .ai-diag-col {
  background: var(--raised);
}
.ai-diag-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.ai-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ai-status-dot.good {
  background: var(--green);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}
.ai-status-dot.bad {
  background: var(--red);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}
.ai-status-dot.pending {
  background: var(--amber);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}
.ai-diag-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}
.ai-diag-desc strong {
  color: var(--text);
  font-weight: 600;
}
.ai-diag-desc code {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--text);
}
:root[data-theme="light"] .ai-diag-desc code {
  background: #eaeee9;
}
.ai-diag-summary {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 6px;
  background: rgba(184, 222, 204, 0.05);
  border: 1px solid rgba(184, 222, 204, 0.16);
  font-size: 12.5px;
  line-height: 1.5;
}
:root[data-theme="light"] .ai-diag-summary {
  background: rgba(40, 91, 69, 0.04);
  border-color: rgba(40, 91, 69, 0.16);
}
.ai-summary-label {
  font: 700 10.5px/1.4 var(--mono);
  color: var(--accent);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.ai-summary-text {
  color: var(--text);
}
.ai-summary-text strong {
  color: var(--accent);
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION (<= 768px)
   ========================================================================== */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--surface, #171b1e);
  border-top: 1px solid var(--line, #2b3338);
  z-index: 90;
  padding: 0 4px;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
}
@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
  }
  main {
    padding-bottom: 80px !important;
  }
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  height: 100%;
  color: var(--muted, #9ba7ae);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.15s ease;
  user-select: none;
}
.mobile-nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}
.mobile-nav-item:hover,
.mobile-nav-item:focus {
  color: var(--text, #ecf0ed);
}
.mobile-nav-item.active {
  color: var(--accent, #10b981);
}
.mobile-nav-item.active svg {
  stroke: var(--accent, #10b981);
}

/* ==========================================================================
   QUICK ACTIONS & PRESET SCRIPT RUNNER
   ========================================================================== */
.quick-actions-panel {
  margin-top: 2px;
}
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 16px;
}
.quick-act-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px;
  background: var(--raised, #1d2327);
  border: 1px solid var(--line, #2b3338);
  border-radius: 8px;
  color: var(--text, #ecf0ed);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.1s ease, background 0.15s ease;
  font-family: inherit;
}
.quick-act-card:hover {
  background: var(--hover, #22292d);
  border-color: var(--accent, #10b981);
  transform: translateY(-1px);
}
.quick-act-card:active {
  transform: translateY(0);
}
.quick-act-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #ecf0ed);
}
.quick-act-icon {
  width: 16px;
  height: 16px;
  stroke: var(--accent, #10b981);
  fill: none;
  flex-shrink: 0;
}
.quick-act-desc {
  font-size: 11.5px;
  color: var(--muted, #9ba7ae);
  line-height: 1.4;
  margin: 0;
}
.quick-act-desc code {
  font-family: var(--mono);
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--text, #ecf0ed);
}

/* ==========================================================================
   VISUAL .ENV MANAGER DIALOG
   ========================================================================== */
.env-dialog {
  width: min(840px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
}
.env-dialog-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}
.env-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line, #2b3338);
}
.env-project-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 240px;
}
.env-project-select-wrap select {
  flex: 1;
  min-height: 34px;
  background: var(--surface, #171b1e);
  color: var(--text, #ecf0ed);
  border: 1px solid var(--line, #2b3338);
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13px;
}
.env-view-mode-toggle {
  display: flex;
  gap: 6px;
}
.env-view-mode-toggle button.active {
  background: var(--accent, #10b981);
  color: #0b1511;
  font-weight: 600;
  border-color: var(--accent, #10b981);
}
.env-visual-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 52dvh;
  overflow-y: auto;
  padding-right: 4px;
}
.env-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.env-row-comment {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted, #9ba7ae);
  padding: 4px 6px;
  font-style: italic;
  opacity: 0.8;
}
.env-key-input {
  width: 200px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
}
.env-val-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
}
.env-val-input {
  width: 100%;
  font-family: var(--mono);
  font-size: 12px;
  padding-right: 34px;
}
.env-mask-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--muted, #9ba7ae);
  cursor: pointer;
}
.env-mask-btn:hover {
  color: var(--text, #ecf0ed);
}
.env-mask-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
}
.env-delete-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.env-add-btn-wrap {
  margin-top: 6px;
}
.env-raw-textarea {
  width: 100%;
  min-height: 340px;
  max-height: 55dvh;
  font: 12px/1.6 var(--mono);
  background: var(--bg, #0f1214);
  color: var(--text, #ecf0ed);
  border: 1px solid var(--line, #2b3338);
  border-radius: 6px;
  padding: 14px;
  resize: vertical;
  white-space: pre;
  overflow: auto;
}
.env-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--line, #2b3338);
}
.env-restart-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted, #9ba7ae);
  cursor: pointer;
  user-select: none;
}
.env-restart-label input[type="checkbox"] {
  cursor: pointer;
}

/* ==========================================================================
   DEPLOY & GIT PULL DIALOG
   ========================================================================== */
.deploy-output-box {
  background: var(--bg, #0f1214);
  border: 1px solid var(--line, #2b3338);
  border-radius: 6px;
  padding: 16px;
  font: 11px/1.6 var(--mono);
  color: var(--text, #ecf0ed);
  max-height: 55dvh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 14px 0;
}

/* ==========================================================================
   GIT LENS / VERSION CONTROL STYLES
   ========================================================================== */
.git-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.git-topbar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.git-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.git-repo-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 280px;
}
.git-repo-select {
  font-weight: 600;
  min-width: 220px;
  max-width: 400px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
}
.git-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.git-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--text);
}
.git-chip svg {
  width: 14px;
  height: 14px;
}
.git-chip.chip-branch {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(184, 222, 204, 0.08);
}
.git-chip.chip-clean {
  color: #5ad88c;
  border-color: rgba(90, 216, 140, 0.3);
  background: rgba(90, 216, 140, 0.08);
}
.git-chip.chip-dirty {
  color: var(--amber);
  border-color: rgba(231, 198, 140, 0.3);
  background: rgba(231, 198, 140, 0.08);
}
.git-chip.chip-ahead {
  color: #79c0ff;
  border-color: rgba(121, 192, 255, 0.3);
  background: rgba(121, 192, 255, 0.08);
}
.git-chip.chip-behind {
  color: #f0883e;
  border-color: rgba(240, 136, 62, 0.3);
  background: rgba(240, 136, 62, 0.08);
}
.git-chip.chip-conflict {
  color: var(--red);
  border-color: var(--red);
  background: var(--red-bg);
  animation: pulse-border 2s infinite ease-in-out;
}
@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 177, 167, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(255, 177, 167, 0); }
}

.git-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.git-actions-row .button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
}
.git-actions-row .button svg {
  width: 15px;
  height: 15px;
}
.btn-git-pull {
  background: var(--accent) !important;
  color: var(--accent-ink) !important;
  font-weight: 600 !important;
  border: none !important;
}
.btn-git-merge {
  background: #388bfd !important;
  color: #fff !important;
  font-weight: 600 !important;
  border: none !important;
}
.btn-git-merge:hover {
  background: #2b77e5 !important;
}

.git-subtabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  overflow-x: auto;
}
.git-subtab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}
.git-subtab-btn:hover {
  color: var(--text);
  background: var(--hover);
}
.git-subtab-btn.active {
  color: var(--text);
  background: var(--raised);
  font-weight: 600;
}
.git-subtab-count {
  background: var(--line);
  color: var(--text);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 12px;
}

/* Changes Layout */
.git-changes-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .git-changes-layout {
    grid-template-columns: 1fr;
  }
}
.git-file-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}
.git-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--raised);
  border-bottom: 1px solid var(--line);
}
.git-section-title {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.git-file-list {
  display: flex;
  flex-direction: column;
}
.git-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  transition: background 0.1s ease;
}
.git-file-row:last-child {
  border-bottom: none;
}
.git-file-row:hover {
  background: var(--hover);
}
.git-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.git-file-name {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.git-file-name:hover {
  text-decoration: underline;
  color: var(--accent);
}
.git-file-dir {
  color: var(--muted);
  font-size: 11px;
}
.git-badge-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}
.tag-m { background: rgba(231, 198, 140, 0.2); color: var(--amber); }
.tag-a { background: rgba(184, 222, 204, 0.2); color: var(--accent); }
.tag-d { background: rgba(255, 177, 167, 0.2); color: var(--red); }
.tag-u { background: rgba(121, 192, 255, 0.2); color: #79c0ff; }
.tag-c { background: rgba(255, 100, 100, 0.25); color: #ff5555; }

.git-file-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.git-file-actions .button {
  padding: 4px 8px;
  font-size: 11px;
}

/* Commit Dock */
.git-commit-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  position: sticky;
  top: 70px;
}
.git-commit-panel h3 {
  font-size: 14px;
  margin: 0 0 12px 0;
}
.git-commit-input {
  width: 100%;
  min-height: 90px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text);
  resize: vertical;
  margin-bottom: 12px;
}
.git-commit-input:focus {
  border-color: var(--accent);
  outline: none;
}
.git-commit-options {
  margin-bottom: 14px;
}
.git-commit-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.git-commit-btns .button {
  width: 100%;
  justify-content: center;
}

/* Timeline & Commits */
.git-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.git-commit-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: all 0.15s ease;
}
.git-commit-item:hover {
  background: var(--raised);
  border-color: var(--muted);
}
.git-commit-node {
  margin-top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(184, 222, 204, 0.15);
  flex-shrink: 0;
}
.git-commit-content {
  flex: 1;
  min-width: 0;
}
.git-commit-msg {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
  word-break: break-word;
}
.git-commit-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.git-commit-hash-pill {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
}
.git-commit-hash-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.git-ref-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(184, 222, 204, 0.15);
  color: var(--accent);
  border: 1px solid rgba(184, 222, 204, 0.3);
}

/* Diff Viewer */
.git-diff-dialog {
  width: min(1100px, calc(100vw - 32px)) !important;
  max-width: 1100px !important;
}
.git-diff-container {
  max-height: 65vh;
  overflow: auto;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
}
.git-diff-view {
  display: table;
  width: 100%;
  border-collapse: collapse;
  white-space: pre;
}
.diff-line {
  display: table-row;
  user-select: text;
}
.diff-line:hover {
  filter: brightness(1.15);
}
.diff-num-old,
.diff-num-new {
  display: table-cell;
  width: 45px;
  min-width: 45px;
  padding: 0 8px;
  text-align: right;
  color: var(--muted);
  user-select: none;
  font-size: 11px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  opacity: 0.6;
}
.diff-text {
  display: table-cell;
  padding: 0 12px;
  word-break: break-all;
}
.diff-line-add {
  background: rgba(90, 216, 140, 0.12);
}
.diff-line-add .diff-text {
  color: #5ad88c;
}
.diff-line-add .diff-num-new {
  color: #5ad88c;
  opacity: 0.9;
}
.diff-line-del {
  background: rgba(255, 100, 100, 0.14);
}
.diff-line-del .diff-text {
  color: #ff8585;
}
.diff-line-del .diff-num-old {
  color: #ff8585;
  opacity: 0.9;
}
.diff-line-hunk {
  background: rgba(121, 192, 255, 0.08);
  font-weight: 600;
}
.diff-line-hunk .diff-text {
  color: #79c0ff;
  font-style: italic;
}
.diff-line-meta {
  color: var(--muted);
  font-style: italic;
  background: var(--surface);
}

/* Branch List in Git Lens */
.git-branch-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}
.git-branch-card-header {
  padding: 14px 18px;
  background: var(--raised);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
