/* Flax Cloud dashboard — dark, dev-infra aesthetic (Vercel/Supabase/Daytona inspired). */

:root {
  --bg: #08080a;
  --bg-elev: #0e0e11;
  --panel: #1a1a1f;
  --panel-2: #141417;
  --border: #232329;
  --border-strong: #2e2e36;
  --text: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --accent: #34d399;
  --accent-strong: #10b981;
  --accent-dim: rgba(52, 211, 153, 0.12);
  --blue: #60a5fa;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 10px;
  --radius-sm: 7px;
  --sidebar-w: 244px;
  --topbar-h: 60px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas,
    monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica,
    Arial, sans-serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

/* Author display rules below would otherwise beat the UA [hidden] rule. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
}

.muted {
  color: var(--text-3);
}

/* ---------- Brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(150deg, var(--accent), var(--accent-strong));
  position: relative;
  flex: none;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.25), 0 2px 10px rgba(16, 185, 129, 0.35);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1.8px solid #06281d;
  border-radius: 3px;
  clip-path: polygon(50% 0, 100% 27%, 100% 73%, 50% 100%, 0 73%, 0 27%);
}
.brand-word {
  font-family: var(--mono);
  font-weight: 600;
}
.brand-dim {
  color: var(--text-3);
}
.brand-lg {
  font-size: 19px;
}
.brand-lg .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

/* ---------- Connect screen ---------- */
.connect {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 40px 20px;
  background: radial-gradient(
      900px 500px at 50% -10%,
      rgba(52, 211, 153, 0.08),
      transparent 70%
    ),
    var(--bg);
}
.connect-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.connect-card h1 {
  font-size: 21px;
  margin: 22px 0 8px;
  letter-spacing: -0.02em;
}
.connect-card p {
  margin: 0 0 22px;
  font-size: 13.5px;
}
.connect-card label {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 7px;
}
.storage-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.connect-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 6px;
  color: var(--text-2);
  font-size: 12px;
}
.connect-or::before,
.connect-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.connect-hint {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.connect-hint code {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--text-2);
  word-break: break-all;
}
.connect-footer {
  font-size: 12px;
}

/* ---------- App shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100%;
}
.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.sidebar .brand {
  padding: 4px 8px 0;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  cursor: pointer;
}
.nav-item:hover {
  background: var(--panel-2);
  color: var(--text);
}
.nav-item.active {
  background: var(--panel);
  color: var(--text);
}
.nav-item.active .nav-ico {
  color: var(--accent);
}
.nav-ico {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--text-3);
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.nav-ico[data-ico="grid"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E"); }
.nav-ico[data-ico="box"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.7l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.7l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpath d='m3.3 7 8.7 5 8.7-5'/%3E%3Cpath d='M12 22V12'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.7l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.7l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpath d='m3.3 7 8.7 5 8.7-5'/%3E%3Cpath d='M12 22V12'/%3E%3C/svg%3E"); }
.nav-ico[data-ico="chart"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='20' x2='12' y2='10'/%3E%3Cline x1='18' y1='20' x2='18' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='16'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='20' x2='12' y2='10'/%3E%3Cline x1='18' y1='20' x2='18' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='16'/%3E%3C/svg%3E"); }
.nav-ico[data-ico="key"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='5.5'/%3E%3Cpath d='m21 2-9.6 9.6'/%3E%3Cpath d='m15.5 7.5 3 3L22 7l-3-3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='5.5'/%3E%3Cpath d='m21 2-9.6 9.6'/%3E%3Cpath d='m15.5 7.5 3 3L22 7l-3-3'/%3E%3C/svg%3E"); }
.nav-ico[data-ico="cog"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E"); }
.nav-ico[data-ico="shield"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E"); }
.nav-ico[data-ico="docs"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E"); }
.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-badge {
  font-size: 11.5px;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  background: var(--panel-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.plan-badge b {
  color: var(--text);
  text-transform: capitalize;
}

/* ---------- Main / topbar ---------- */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}
.topbar {
  height: var(--topbar-h);
  flex: none;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  background: rgba(8, 8, 10, 0.7);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.topbar h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
#page-sub {
  font-size: 12.5px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-2);
}
.view {
  padding: 26px;
  overflow-y: auto;
  flex: 1;
}
.view-wrap {
  max-width: 1040px;
  margin: 0 auto;
}

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-transform: capitalize;
}
.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill-muted { color: var(--text-3); }
.pill-green { color: var(--accent); background: var(--accent-dim); border-color: transparent; }
.pill-blue { color: var(--blue); background: rgba(96, 165, 250, 0.12); border-color: transparent; }
.pill-amber { color: var(--amber); background: rgba(251, 191, 36, 0.12); border-color: transparent; }
.pill-red { color: var(--red); background: rgba(248, 113, 113, 0.12); border-color: transparent; }
.pill-gray { color: var(--text-3); background: var(--panel); border-color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s, transform 0.04s;
  white-space: nowrap;
}
.btn:hover { background: #202028; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: #04130d;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-danger {
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.07);
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.14); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--panel-2); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; margin-top: 16px; }

/* ---------- Inputs ---------- */
input,
select,
textarea {
  font-family: inherit;
  font-size: 13.5px;
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 11px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
input::placeholder,
textarea::placeholder { color: var(--text-3); }
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
textarea { resize: vertical; }
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 6px;
}
.field .hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.form-error {
  color: var(--red);
  font-size: 12.5px;
  margin-top: 10px;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 6px;
  padding: 8px 10px;
}

/* ---------- Cards / panels ---------- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-head h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin: 26px 0 12px;
  font-weight: 600;
}
.grid {
  display: grid;
  gap: 14px;
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}

/* Stat card */
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-label {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 7px;
}
.stat-value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.stat-value small { font-size: 14px; color: var(--text-3); font-weight: 500; }

/* Progress bar */
.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--panel);
  overflow: hidden;
  margin-top: 12px;
}
.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.bar.warn > span { background: linear-gradient(90deg, var(--amber), #f59e0b); }
.bar.danger > span { background: linear-gradient(90deg, var(--red), #ef4444); }

/* ---------- Tables ---------- */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  font-weight: 600;
  padding: 11px 16px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; transition: background 0.1s; }
tbody tr.clickable:hover { background: var(--panel-2); }
td .mono,
.mono { font-family: var(--mono); color: var(--text); }
.t-right { text-align: right; }

/* ---------- Terminal / file output ---------- */
.terminal {
  background: #050507;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  padding: 14px 16px;
  max-height: 340px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d4d4d8;
}
.terminal .t-cmd { color: var(--accent); }
.terminal .t-err { color: var(--red); }
.terminal .t-meta { color: var(--text-3); }
.terminal .t-block { padding: 6px 0; border-bottom: 1px dashed #18181d; }
.terminal .t-block:last-child { border-bottom: none; }

.run-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.run-row .prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0 12px;
}
.run-row .prompt:focus-within {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.run-row .prompt span { color: var(--accent); font-family: var(--mono); }
.run-row .prompt input {
  border: none;
  background: transparent;
  padding: 9px 0;
  font-family: var(--mono);
}
.run-row .prompt input:focus { box-shadow: none; }

/* ---------- File list ---------- */
.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.file-row:last-child { border-bottom: none; }
.file-row .name { flex: 1; font-family: var(--mono); color: var(--text); }
.file-row .size { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.file-ico { color: var(--text-3); font-family: var(--mono); }

/* ---------- Interactive terminal ---------- */
.term-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.xterm-host {
  height: 400px;
  background: #050507;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  overflow: hidden;
}
.xterm-host .xterm { height: 100%; }
.xterm-host .xterm-viewport { background: transparent !important; }

/* ---------- File tree ---------- */
.tree { font-size: 13px; }
.tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 0;
  border-radius: 6px;
}
.tree-row.dir { cursor: pointer; }
.tree-row:hover { background: var(--panel-2); }
.tree-row .tw { width: 12px; color: var(--text-3); font-size: 10px; text-align: center; }
.tree-row .t-ico { width: 14px; color: var(--text-3); font-family: var(--mono); }
.tree-row .t-name { flex: 1; font-family: var(--mono); color: var(--text); }
.tree-row.file .t-name { cursor: pointer; }
.tree-row.file .t-name:hover { color: var(--accent); }
.tree-row .t-size {
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.tree-row .btn-sm { opacity: 0; padding: 2px 8px; }
.tree-row:hover .btn-sm,
.tree-row:focus-within .btn-sm { opacity: 1; }
.tree-loading { color: var(--text-3); font-size: 12.5px; padding: 6px 0; }
.file-view {
  background: #050507;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  max-height: 60vh;
  overflow: auto;
  white-space: pre;
  color: var(--text);
}

/* ---------- Empty / loading ---------- */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-3);
}
.empty .empty-ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--panel);
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty h3 { color: var(--text); font-size: 15px; margin: 0 0 6px; }
.skeleton {
  background: linear-gradient(90deg, var(--panel-2), var(--panel), var(--panel-2));
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
  animation: fade 0.12s ease;
}
.modal {
  width: 100%;
  max-width: 460px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  animation: pop 0.14s ease;
}
.modal-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-body { padding: 20px; }
.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.99); } }

.key-reveal {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  word-break: break-all;
}

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 11px 15px;
  font-size: 13px;
  min-width: 240px;
  max-width: 360px;
  box-shadow: var(--shadow);
  animation: slidein 0.18s ease;
}
.toast.err { border-left-color: var(--red); }
.toast.title { font-weight: 600; margin-bottom: 2px; }
@keyframes slidein { from { opacity: 0; transform: translateX(12px); } }

.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.inline-flex { display: inline-flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 6px; }
.mt-0 { margin-top: 0; }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; font-size: 13px; }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; color: var(--text); font-family: var(--mono); word-break: break-all; }
