﻿/* ADA — modern shell */

:root {
  --bg: #0b0d10;
  --bg-elev: #11141a;
  --bg-sidebar: #0e1014;
  --bg-soft: #161a22;
  --bg-input: #14181f;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #ebe8e2;
  --text-dim: #8b909a;
  --text-faint: #5c616b;
  --accent: #3ecf8e;
  --accent-dim: rgba(62, 207, 142, 0.14);
  --accent-border: rgba(62, 207, 142, 0.35);
  --warn: #e6a23c;
  --warn-dim: rgba(230, 162, 60, 0.12);
  --danger: #e85d5d;
  --sidebar-w: 210px;
  --topbar-h: 42px;
  --radius: 6px;
  --radius-sm: 5px;
  --font: "Sora", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  letter-spacing: -0.01em;
  font-size: 12.5px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 0% 0%, rgba(62, 207, 142, 0.09), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(230, 162, 60, 0.06), transparent 50%),
    linear-gradient(180deg, #0d1015 0%, #0b0d10 100%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

/* Shell */
.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  height: 100%;
}

#sidebar-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9000;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(14, 16, 20, 0.92);
  backdrop-filter: blur(12px);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

body.sidebar-collapsed #sidebar-toggle,
body.focus-mode #sidebar-toggle {
  display: flex;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 7500;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.sidebar-backdrop.visible {
  display: block;
  opacity: 1;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100%;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 8000;
  transition: transform 0.28s var(--ease), width 0.28s var(--ease), margin 0.28s var(--ease), opacity 0.2s;
  position: relative;
  overflow: hidden;
}

body.sidebar-collapsed .sidebar {
  width: 0;
  border-right-width: 0;
  opacity: 0;
  pointer-events: none;
}

body.focus-mode .topbar {
  height: 42px;
  padding-top: 0;
  padding-bottom: 0;
}

body.focus-mode .target-form,
body.focus-mode .status-live {
  display: none;
}

body.focus-mode .workspace-bar {
  padding: 0.35rem 0.75rem;
}

.sidebar-collapse {
  position: absolute;
  top: 1.2rem;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
}

.sidebar-collapse:hover {
  color: var(--accent);
  border-color: var(--accent-border);
}

body.sidebar-collapsed #sidebar-toggle {
  display: flex;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 2.2rem 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: linear-gradient(145deg, var(--accent) 0%, #2a9f6e 100%);
  color: #06140e;
  font-weight: 800;
  font-size: 0.52rem;
  letter-spacing: 0.02em;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px rgba(62, 207, 142, 0.22);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-text strong {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand-text span {
  font-size: 0.58rem;
  font-family: var(--mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.icon-btn:hover,
.icon-btn.active {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

.search-wrap {
  position: relative;
  margin: 0.55rem 0.7rem 0.35rem;
}

.search-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 0.75rem;
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.6rem 0.75rem 0.6rem 2.15rem;
  font: 500 0.8rem/1.2 var(--font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-wrap input::placeholder { color: var(--text-faint); }
.search-wrap input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.nav-home {
  margin: 0.35rem 0.85rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  font: 600 0.8rem/1 var(--font);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: calc(100% - 1.7rem);
  text-align: left;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-home:hover,
.nav-home.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent-border);
}

.mode-pill {
  margin: 0.25rem 0.85rem 0.65rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  font-family: var(--mono);
  color: var(--text-dim);
}

.mode-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.nav-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0.65rem 1rem;
}

.category-group { margin-bottom: 0.2rem; }

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0.55rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.category-header:hover { background: rgba(255, 255, 255, 0.03); }

.category-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.category-chevron {
  font-size: 0.55rem;
  color: var(--text-faint);
  transition: transform 0.2s var(--ease);
}

.category-group.expanded .category-chevron { transform: rotate(90deg); }

.cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cat-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-count {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-faint);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
}

.tool-list {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s var(--ease);
}

.category-group.expanded .tool-list { max-height: 2400px; }

.tool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0.42rem 0.55rem 0.42rem 1.55rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}

.tool-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.tool-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.tool-item.hidden { display: none; }

.tool-name-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tool-name-wrapper i {
  font-size: 0.65rem;
  opacity: 0.55;
  flex-shrink: 0;
}

.tool-name-wrapper span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-item-actions { display: flex; align-items: center; gap: 6px; }

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.status-indicator.empty {
  background: var(--warn);
  box-shadow: none;
}

.badge-empty {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  color: var(--warn);
  background: var(--warn-dim);
  border: 1px solid rgba(230, 162, 60, 0.28);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.75rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: #e8f5ef;
  letter-spacing: 0.06em;
  gap: 0.5rem;
  background: rgba(62, 207, 142, 0.06);
}

.sidebar-foot .maker-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sidebar-foot .maker-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  color: #c8e6d8;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.sidebar-foot .maker-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #7dffb8;
  text-transform: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 12px rgba(62, 207, 142, 0.35);
}

.sidebar-foot .ver {
  color: #b8f5d4;
  text-transform: uppercase;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.68rem;
}

/* Main */
.main {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 16, 0.72);
  backdrop-filter: blur(14px);
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
  min-width: 0;
}

.crumb button {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.crumb button:hover { color: var(--accent); }

.crumb .sep { color: var(--text-faint); }

#breadcrumb-current {
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.target-form {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.target-form:focus-within {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.target-form > i {
  padding-left: 12px;
  color: var(--text-faint);
  font-size: 0.75rem;
}

.target-form input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 0.55rem 0.65rem;
  font: 500 0.8rem/1.2 var(--mono);
  outline: none;
}

.target-form input::placeholder { color: var(--text-faint); }

.btn-sync {
  border: none;
  background: var(--accent);
  color: #06140e;
  font: 700 0.7rem/1 var(--font);
  letter-spacing: 0.02em;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s;
}

.btn-sync:hover { filter: brightness(1.08); }

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-toggle {
  display: flex;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.lang-toggle button {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font: 600 0.68rem/1 var(--mono);
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

.lang-toggle button.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.status-live {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
}

.status-live .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.8s ease infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(62, 207, 142, 0); }
}

/* Dashboard */
.dash {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: fadeUp 0.35s var(--ease);
}

.dash-head h1 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.dash-head .sub {
  margin-top: 0.2rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  max-width: 48ch;
}

.hero-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(62, 207, 142, 0.07) 0%, transparent 42%),
    linear-gradient(180deg, #141820 0%, #10141a 100%);
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.hero-brand {
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
  background: linear-gradient(90deg, #fff 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 46ch;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.metric {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.metric-val {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.quick {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font: 600 0.76rem/1 var(--mono);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.15s var(--ease);
}

.clock-block {
  text-align: right;
  padding: 0.65rem 0.85rem;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  min-width: 130px;
}

#hq-clock {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.dash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}

.dash-head h1 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.dash-head .sub {
  margin-top: 0.2rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  max-width: 48ch;
}

.dash-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: var(--radius);
}

.tab {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font: 600 0.72rem/1 var(--font);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
}

.tab:hover { color: var(--text); }
.tab.active {
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.overview {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(62, 207, 142, 0.07) 0%, transparent 42%),
    linear-gradient(180deg, #141820 0%, #10141a 100%);
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.hero-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% 20%, rgba(62, 207, 142, 0.1), transparent 35%);
  pointer-events: none;
}

.hero-copy, .hero-meta { position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}

.hero-brand {
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
  background: linear-gradient(90deg, #fff 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 46ch;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 7px;
  font: 600 0.76rem/1 var(--font);
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  transition: transform 0.15s var(--ease), filter 0.15s, background 0.15s;
}

.btn-primary {
  border: none;
  background: var(--accent);
  color: #06140e;
}

.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }

.btn-ghost {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.maker-card {
  text-align: right;
  padding: 0.7rem 0.9rem;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(62, 207, 142, 0.18), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(125, 255, 184, 0.45);
  min-width: 160px;
  box-shadow: 0 0 0 1px rgba(62, 207, 142, 0.12), 0 8px 24px rgba(0, 0, 0, 0.25);
}

.maker-card .meta-label {
  color: #d4f5e6;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.maker-card-name {
  display: block;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: #9dffc8;
  letter-spacing: 0.01em;
  margin-top: 2px;
  text-shadow: 0 0 14px rgba(62, 207, 142, 0.4);
}

.maker-card-sub {
  display: block;
  margin-top: 5px;
  font-size: 0.62rem;
  color: #c5e8d6;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

.clock-block {
  text-align: right;
  padding: 0.65rem 0.85rem;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  min-width: 130px;
}

.meta-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

#hq-clock {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

#hq-clock-date {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: var(--text-dim);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.metric {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: border-color 0.2s;
}

.metric:hover { border-color: var(--line-strong); }

.metric-val {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.metric-lab {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 500;
}

.target-metric .target-val {
  font-size: 0.85rem;
  font-family: var(--mono);
  font-weight: 500;
  word-break: break-all;
}

.target-metric .target-val.empty {
  color: var(--text-faint);
  font-size: 0.78rem;
}

.quick-block h3 {
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
  color: var(--text);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.45rem;
}

.quick {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font: 600 0.76rem/1 var(--mono);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.15s var(--ease);
}

.quick i { color: var(--accent); font-size: 0.8rem; }

.quick:hover {
  border-color: var(--accent-border);
  background: var(--accent-dim);
  transform: translateY(-1px);
}

/* Catalog */
.catalog-pane { display: flex; flex-direction: column; gap: 1rem; }

.catalog-pane[hidden] { display: none !important; }

.library-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.library-bar h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.library-bar p {
  margin-top: 0.35rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  max-width: 60ch;
}

.count-chip {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}

.catalog-search-wrap {
  position: relative;
  max-width: 420px;
}

.catalog-search-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 0.75rem;
}

.catalog-search-wrap input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.65rem 0.75rem 0.65rem 2.15rem;
  font: 500 0.82rem/1.2 var(--font);
  outline: none;
}

.catalog-search-wrap input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.catalog-category-section { margin-bottom: 1.35rem; }

.catalog-cat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.catalog-cat-title .n {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-faint);
}

.catalog-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.55rem;
}

.catalog-tool-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, transform 0.15s var(--ease);
}

.catalog-tool-card i {
  color: var(--text-faint);
  font-size: 0.7rem;
}

.catalog-tool-card:hover {
  border-color: var(--accent-border);
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.catalog-tool-card.is-empty {
  border-style: dashed;
  opacity: 0.85;
}

.catalog-tool-card.is-empty:hover {
  border-color: rgba(230, 162, 60, 0.45);
  background: var(--warn-dim);
}

.catalog-tool-card .card-empty {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--warn);
  letter-spacing: 0.04em;
}

.catalog-tool-card.hidden { display: none; }

/* Workspace */
.workspace {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.workspace.active { display: flex; }

.workspace-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 16, 20, 0.92);
}

.tool-tabs {
  flex-shrink: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 0.35rem 0.65rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 12, 16, 0.95);
}

.tool-tabs[hidden] { display: none !important; }

.tool-tab {
  display: inline-flex;
  align-items: stretch;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  overflow: hidden;
  flex-shrink: 0;
}

.tool-tab.active {
  border-color: rgba(62, 207, 142, 0.45);
  background: rgba(62, 207, 142, 0.12);
}

.tool-tab-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font: 600 0.68rem/1 var(--font);
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  max-width: 140px;
}

.tool-tab.active .tool-tab-main { color: #9dffc8; }

.tool-tab-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-tab-main i { font-size: 0.58rem; opacity: 0.8; }

.tool-tab-x {
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--text-faint);
  padding: 0 0.4rem;
  cursor: pointer;
}

.tool-tab-x:hover { color: #ff8f8f; background: rgba(232, 93, 93, 0.12); }

.ctrl-muted { opacity: 0.85; }

.iframe-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
  background: #0a0c10;
  overflow: hidden;
}

.iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  inset: 0;
  background: #0b0d10;
}

.workspace-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 600;
  font-size: 0.88rem;
}

.workspace-title i { color: var(--accent); }

.workspace-title .tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.workspace-title .tag.warn {
  color: var(--warn);
  background: var(--warn-dim);
  border-color: rgba(230, 162, 60, 0.3);
}

.workspace-controls { display: flex; gap: 6px; }

.ctrl {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text-dim);
  font: 600 0.72rem/1 var(--font);
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s, border-color 0.15s;
}

.ctrl:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.iframe-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
  background: #0a0c10;
}

.iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  inset: 0;
}

.empty-panel {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse 50% 40% at 50% 30%, rgba(230, 162, 60, 0.08), transparent 60%),
    var(--bg);
}

.empty-panel[hidden] { display: none !important; }

.empty-inner {
  text-align: center;
  max-width: 380px;
  animation: fadeUp 0.4s var(--ease);
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.15rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--warn-dim);
  border: 1px dashed rgba(230, 162, 60, 0.4);
  color: var(--warn);
  font-size: 1.4rem;
}

.empty-inner h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.55rem;
}

.empty-inner p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 1.15rem;
}

.empty-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--warn);
  background: var(--warn-dim);
  border: 1px solid rgba(230, 162, 60, 0.3);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}

/* Responsive */
@media (max-width: 1100px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .hero-band { grid-template-columns: 1fr; }
  .clock-block { text-align: left; width: fit-content; }
  .maker-card { text-align: left; width: fit-content; }
  .hero-meta { align-items: flex-start; }
}

@media (max-width: 860px) {
  #sidebar-toggle { display: flex; }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    transform: translateX(-105%);
    box-shadow: var(--shadow);
  }

  .sidebar.open { transform: translateX(0); }

  .topbar {
    padding-left: 4rem;
    flex-wrap: wrap;
    height: auto;
    min-height: var(--topbar-h);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .target-form {
    order: 3;
    max-width: none;
    width: 100%;
    flex: 1 1 100%;
  }

  .dash { padding: 0.65rem; }
  .hero-brand { font-size: 1.2rem; }
}

@media (max-width: 520px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .workspace-controls .ctrl span,
  .ctrl { font-size: 0; gap: 0; padding: 0.35rem; }
  .ctrl i { font-size: 0.75rem; }
}

/* ===== KOMPAKT YOĞUNLUK — menü / buton / bölüm ===== */
.brand { padding: 0.55rem 1.9rem 0.5rem 0.65rem; gap: 8px; }
.brand-mark { width: 26px; height: 26px; font-size: 0.58rem; border-radius: 6px; box-shadow: none; }
.brand-text strong { font-size: 0.75rem; }
.brand-text span { font-size: 0.52rem; }

.sidebar-collapse { top: 0.7rem; right: 6px; width: 22px; height: 22px; font-size: 0.58rem; }

.search-wrap { margin: 0.4rem 0.55rem 0.25rem; }
.search-wrap input { padding: 0.4rem 0.55rem 0.4rem 1.85rem; font-size: 0.7rem; }
.search-wrap i { font-size: 0.65rem; left: 10px; }

.nav-home {
  margin: 0.2rem 0.55rem;
  padding: 0.38rem 0.55rem;
  font-size: 0.7rem;
  gap: 7px;
  width: calc(100% - 1.1rem);
}

.mode-pill {
  margin: 0.15rem 0.55rem 0.4rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.58rem;
  gap: 6px;
}
.mode-pill .dot { width: 5px; height: 5px; }

.nav-content { padding: 0.15rem 0.45rem 0.65rem; }

.category-header { padding: 0.35rem 0.4rem; gap: 6px; }
.category-header-title { font-size: 0.65rem; gap: 6px; }
.category-chevron { font-size: 0.5rem; }
.cat-dot { width: 5px; height: 5px; }
.badge-count { font-size: 0.55rem; padding: 0.1rem 0.3rem; }

.tool-item {
  padding: 0.28rem 0.4rem 0.28rem 1.25rem;
  font-size: 0.68rem;
  gap: 6px;
}
.tool-name-wrapper { gap: 6px; }
.tool-name-wrapper i { font-size: 0.55rem; }

.sidebar-foot { padding: 0.55rem 0.75rem; font-size: 0.55rem; }
.sidebar-foot .maker-name { font-size: 0.72rem; }
.sidebar-foot .maker-label { font-size: 0.52rem; }

.topbar { padding: 0 0.75rem; gap: 0.65rem; }
.crumb { font-size: 0.7rem; gap: 6px; }
.target-form { max-width: 340px; }
.target-form input { padding: 0.4rem 0.5rem; font-size: 0.7rem; }
.target-form > i { font-size: 0.65rem; padding-left: 10px; }
.btn-sync { padding: 0.4rem 0.65rem; font-size: 0.62rem; }
.lang-toggle button { padding: 0.28rem 0.4rem; font-size: 0.6rem; }
.icon-btn { width: 28px; height: 28px; font-size: 0.7rem; }
.status-live { font-size: 0.62rem; gap: 5px; }
.status-live .pulse { width: 5px; height: 5px; }

.dash { padding: 0.75rem 0.85rem 1rem; gap: 0.55rem; }
.kicker { font-size: 0.58rem; margin-bottom: 0.2rem; }
.dash-head h1 { font-size: 1.05rem; }
.dash-head .sub { font-size: 0.72rem; margin-top: 0.15rem; }
.dash-tabs { padding: 2px; }
.tab { padding: 0.32rem 0.55rem; font-size: 0.65rem; gap: 5px; }

.hero-band { padding: 0.7rem 0.85rem; gap: 0.75rem; border-radius: 8px; min-height: 0; }
.eyebrow { font-size: 0.55rem; margin-bottom: 0.25rem; }
.hero-brand { font-size: clamp(1.15rem, 2vw, 1.4rem) !important; margin-bottom: 0.25rem; }
.hero-lead { font-size: 0.72rem; margin-bottom: 0.5rem; }
.btn-primary, .btn-ghost { padding: 0.38rem 0.65rem; font-size: 0.68rem; gap: 5px; border-radius: 6px; }
.clock-block { padding: 0.45rem 0.6rem; min-width: 110px; border-radius: 7px; }
.maker-card { padding: 0.5rem 0.7rem; min-width: 132px; border-radius: 7px; }
.maker-card-name { font-size: 0.82rem; }
.maker-card-sub { font-size: 0.55rem; }
#hq-clock { font-size: 1rem; }
#hq-clock-date { font-size: 0.6rem; }
.meta-label { font-size: 0.52rem; }

.metrics { gap: 0.4rem; }
.metric { padding: 0.45rem 0.6rem; gap: 0.1rem; }
.metric-val { font-size: 1rem; }
.metric-lab { font-size: 0.62rem; }
.target-metric .target-val { font-size: 0.75rem; }

.quick-block h3 { font-size: 0.7rem; margin-bottom: 0.4rem; }
.quick-grid { gap: 0.35rem; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.quick { padding: 0.4rem 0.55rem; font-size: 0.68rem; gap: 6px; }
.quick i { font-size: 0.7rem; }

.workspace-bar { padding: 0.28rem 0.6rem; }
.workspace-title { font-size: 0.75rem; gap: 7px; }
.workspace-title .tag { font-size: 0.52rem; padding: 0.12rem 0.35rem; }
.ctrl { padding: 0.28rem 0.5rem; font-size: 0.62rem; gap: 4px; }

.catalog-tool-card { padding: 0.45rem 0.55rem; font-size: 0.7rem; gap: 7px; }
.catalog-cat-title { font-size: 0.72rem; margin-bottom: 0.4rem; }
.library-bar h3 { font-size: 0.9rem; }
.library-bar p { font-size: 0.72rem; }

#sidebar-toggle { width: 34px; height: 34px; top: 8px; left: 8px; font-size: 0.8rem; }

@media (max-width: 860px) {
  .dash { padding: 0.65rem; }
  .hero-brand { font-size: 1.2rem !important; }
}

/* —— Legal acceptance modal —— */
.legal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 10, 8, 0.82);
  backdrop-filter: blur(8px);
}

.legal-overlay[hidden] { display: none !important; }

.legal-modal {
  width: min(520px, 100%);
  max-height: min(90vh, 640px);
  overflow: auto;
  padding: 1.25rem 1.35rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(125, 255, 184, 0.35);
  background: linear-gradient(165deg, #12241c 0%, #0b1511 55%, #0a1210 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(62, 207, 142, 0.08);
  color: #e8f5ef;
  position: relative;
}

.legal-lang {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  margin-bottom: 0.65rem;
}

.legal-lang-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: #c5e8d6;
  font: 700 0.68rem/1 var(--mono);
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
}

.legal-lang-btn.active {
  background: var(--accent);
  color: #06140e;
  border-color: transparent;
}

.legal-lang-btn:hover:not(.active) {
  border-color: rgba(125, 255, 184, 0.4);
  color: #fff;
}

.legal-badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #06140e;
  background: #7dffb8;
}

.legal-modal h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.55rem;
  color: #fff;
}

.legal-lead {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #c5e8d6;
  margin: 0 0 0.75rem;
}

.legal-points {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: #d4f5e6;
  font-size: 0.78rem;
  line-height: 1.55;
}

.legal-points code {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #9dffc8;
}

.legal-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: #e8f5ef;
  cursor: pointer;
}

.legal-check input {
  margin-top: 0.2rem;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  justify-content: flex-end;
}

.legal-link {
  font-size: 0.72rem;
  color: #9dffc8;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-right: auto;
}

.legal-link + .legal-link { margin-right: 0; margin-left: 0; }

#legal-accept:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  transform: none;
}


