/* ================================================================
   LYRA — DESIGN SYSTEM v2
   ================================================================ */

@font-face {
  font-family: 'StageGrotesk';
  src: url('../fonts/StageGrotesk-Light.otf') format('opentype');
  font-weight: 300; font-style: normal;
}
@font-face {
  font-family: 'StageGrotesk';
  src: url('../fonts/StageGrotesk-Regular.otf') format('opentype');
  font-weight: 400; font-style: normal;
}
@font-face {
  font-family: 'StageGrotesk';
  src: url('../fonts/StageGrotesk-Medium.otf') format('opentype');
  font-weight: 500; font-style: normal;
}
@font-face {
  font-family: 'StageGrotesk';
  src: url('../fonts/StageGrotesk-Bold.otf') format('opentype');
  font-weight: 700; font-style: normal;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; }

:root {
  --bg:          #0C0D0C;
  --surface:     #131514;
  --surface-2:   #191B1A;
  --surface-3:   #1E2120;
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(255,255,255,0.10);
  --border-3:    rgba(255,255,255,0.15);
  --text:        #FFFFFF;
  --text-2:      #9BA89F;
  --text-3:      #5C6C65;
  --text-4:      #3D4D47;
  --accent:      #46FD9E;
  --accent-dim:  rgba(70, 253, 158, 0.07);
  --accent-dim2: rgba(70, 253, 158, 0.12);
  --accent-dim3: rgba(70, 253, 158, 0.22);
  --danger:      #FF6B6B;
  --danger-dim:  rgba(255, 107, 107, 0.12);
  --warning:     #FBBF24;
  --warning-dim: rgba(251, 191, 36, 0.12);
  --info:        #60A5FA;
  --info-dim:    rgba(96, 165, 250, 0.12);

  --font: 'StageGrotesk', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  --r:    12px;
  --r-lg: 16px;
  --r-sm: 8px;
  --r-xs: 6px;

  --sidebar-w: 220px;
  --header-h:  80px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.btn-primary { background: var(--accent); color: #0A1A12; border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { opacity: 0.88; }
.btn-primary-lg {
  background: var(--accent); color: #0A1A12; font-weight: 600;
  border-radius: var(--r); padding: 14px 28px; font-size: 15px; border: none;
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-primary-lg:hover { opacity: 0.88; }
.btn-outline {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-2);
  border-radius: var(--r-sm);
}
.btn-outline:hover { border-color: var(--border-3); color: var(--text); }
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-xs { padding: 4px 10px; font-size: 11.5px; }
.btn-icon { width: 34px; height: 34px; padding: 0; justify-content: center; }

/* ── INPUTS ──────────────────────────────────────────────── */
.input {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--text-4); }
.input.prefilled { color: var(--text-2); }
.select {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 10px 36px 10px 14px;
  font-family: var(--font);
  font-size: 14px;
  width: 100%;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235C6E67' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.15s;
}
.select:focus { border-color: var(--accent); }
.textarea {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 14px;
  width: 100%;
  outline: none;
  resize: vertical;
  min-height: 90px;
  transition: border-color 0.15s;
}
.textarea:focus { border-color: var(--accent); }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-label { font-size: 11px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
}
.card-sm { padding: 16px; }
.card-lg { padding: 28px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 14px; font-weight: 500; color: var(--text); }
.card-subtitle { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ── TAGS & BADGES ───────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  font-size: 12px; color: var(--text-2);
  white-space: nowrap;
}
.tag-accent { background: var(--accent-dim); border-color: rgba(70,253,158,0.25); color: var(--accent); }
.tag-remove { background: none; border: none; color: inherit; cursor: pointer; opacity: 0.6; padding: 0; font-size: 13px; line-height: 1; }
.tag-remove:hover { opacity: 1; }
.tags-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11.5px; font-weight: 500;
  white-space: nowrap;
}
.badge-success { background: var(--accent-dim); color: var(--accent); }
.badge-warning { background: var(--warning-dim); color: var(--warning); }
.badge-error   { background: var(--danger-dim); color: var(--danger); }
.badge-muted   { background: rgba(255,255,255,0.06); color: var(--text-3); }
.badge-info    { background: var(--info-dim); color: var(--info); }
.badge-dot::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; margin-right: 5px;
}

/* ── TABLES ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; padding: 11px 16px;
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3); border-bottom: 1px solid var(--border);
  background: var(--surface-2); white-space: nowrap;
}
.table td {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  font-size: 13.5px; color: var(--text-2); vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--surface-2); color: var(--text); }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ── TOGGLES ─────────────────────────────────────────────── */
.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  transition: 0.2s;
}
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--text-4); transition: 0.2s;
}
.toggle input:checked ~ .toggle-track { background: var(--accent-dim2); border-color: var(--accent); }
.toggle input:checked ~ .toggle-thumb { background: var(--accent); transform: translateX(18px); }

/* ── PROGRESS ────────────────────────────────────────────── */
.progress { width: 100%; height: 4px; background: rgba(255,255,255,0.08); border-radius: 100px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 100px; transition: width 0.4s; }
.progress-thin { height: 2px; }
.progress-lg { height: 6px; }

/* ── TABS ────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.tab {
  padding: 10px 16px; font-size: 13px; color: var(--text-3);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color 0.15s;
}
.tab:hover { color: var(--text-2); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── ONBOARDING LAYOUT ───────────────────────────────────── */
.ob-wrap { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }

.ob-topbar {
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ob-logo-group {
  display: flex; align-items: center; gap: 10px;
}
.ob-logo-img { width: 36px; height: 36px; object-fit: contain; }
.ob-logo-text { font-size: 17px; font-weight: 600; letter-spacing: 0.02em; color: var(--text); }

.ob-dots {
  display: flex; align-items: center; gap: 8px;
}
.ob-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.2s, transform 0.2s;
}
.ob-dot.done { background: rgba(70,253,158,0.5); }
.ob-dot.active { background: var(--accent); transform: scale(1.2); }

.ob-user {
  display: flex; align-items: center; gap: 10px;
}
.ob-user-av {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-3); border: 1.5px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--accent);
}
.ob-user-name { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.2; }
.ob-user-role { font-size: 11.5px; color: var(--text-3); }

.ob-main {
  flex: 1;
  padding: 60px 40px 40px;
  display: flex; flex-direction: column;
}
.ob-main-center {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ob-main-left {
  flex: 1; display: flex; flex-direction: column;
}

.ob-footer {
  height: 72px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  flex-shrink: 0;
  background: var(--bg);
}
.ob-footer-center {
  text-align: center;
}
.ob-footer-step {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent);
}
.ob-footer-hint { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.ob-footer-right { display: flex; gap: 10px; align-items: center; }

/* ── ADMIN LAYOUT ────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; z-index: 100;
}
.sidebar-brand {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-brand-img { width: 32px; height: 32px; object-fit: contain; }
.sidebar-brand-name { font-size: 16px; font-weight: 600; color: var(--text); }
.sidebar-firm-tag {
  padding: 0 20px 14px;
  font-size: 11px; font-weight: 500; color: var(--text-3);
  letter-spacing: 0.06em; text-transform: uppercase;
  padding-top: 12px;
}
.sidebar-nav { flex: 1; padding: 8px 12px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  font-size: 13.5px; color: var(--text-3);
  border-radius: var(--r-sm);
  transition: background 0.15s, color 0.15s;
  cursor: pointer; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-2); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); }

/* Sub-nav collapse — default closed so no flash on page load */
.nav-sub {
  padding: 0 0 0 14px; margin-left: 20px;
  border-left: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; gap: 1px;
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height 0.24s ease, opacity 0.2s ease, padding 0.2s ease;
}
.nav-sub.sb-open { max-height: 300px; opacity: 1; padding: 2px 0 6px 14px; }
.nav-sub-item {
  font-size: 12px; color: rgba(255,255,255,0.42); padding: 5px 10px;
  border-radius: 6px; text-decoration: none;
  transition: all 0.15s; display: flex; align-items: center; gap: 7px;
}
.nav-sub-item:hover { color: rgba(255,255,255,0.82); background: rgba(255,255,255,0.05); }
.nav-sub-item.active { color: var(--accent); background: rgba(70,253,158,0.08); }
.nav-chev {
  margin-left: auto; width: 10px; height: 10px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; opacity: 0.4;
  transition: transform 0.24s ease;
  transform: rotate(-90deg);
}
.nav-item.has-sub.sb-open-parent .nav-chev { transform: rotate(0deg); }

/* ── Sidebar collapse ── */
.sidebar { transition: left 0.28s cubic-bezier(0.4,0,0.2,1) !important; }
.main-content { transition: margin-left 0.28s cubic-bezier(0.4,0,0.2,1); }
.sb-collapsed .sidebar { left: calc(-1 * var(--sidebar-w)) !important; }
.sb-collapsed .main-content { margin-left: 0 !important; }
.sb-toggle-btn {
  position: fixed; top: 50%; transform: translateY(-50%);
  left: var(--sidebar-w);
  width: 20px; height: 44px;
  background: var(--surface); border: 1px solid var(--border-2); border-left: none;
  border-radius: 0 8px 8px 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 300; color: var(--text-3);
  transition: left 0.28s cubic-bezier(0.4,0,0.2,1), color 0.15s, background 0.15s;
}
.sb-toggle-btn:hover { color: var(--text); background: var(--surface-2); }
.sb-collapsed .sb-toggle-btn { left: 0 !important; border-left: 1px solid var(--border-2); }

.nav-icon {
  width: 16px; height: 16px; flex-shrink: 0;
  stroke: currentColor; fill: none; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.sidebar-bottom {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.sidebar-user:hover { background: rgba(255,255,255,0.04); }
.user-av {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-dim); border: 1.5px solid rgba(70,253,158,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--accent); flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 500; color: var(--text); }
.user-role { font-size: 11px; color: var(--text-3); }

.main-content { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.page-header {
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg);
  position: sticky; top: 0; z-index: 50;
}
.page-title { font-size: 16px; font-weight: 500; color: var(--text); }
.page-subtitle-line { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.page-actions { display: flex; align-items: center; gap: 10px; }
.page-body { flex: 1; padding: 32px; }

/* ── STAT CARDS ──────────────────────────────────────────── */
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px 22px;
}
.stat-value {
  font-size: 36px; font-weight: 300; letter-spacing: -0.02em;
  line-height: 1; margin-bottom: 6px; color: var(--text);
}
.stat-value.accent { color: var(--accent); }
.stat-label { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.stat-delta { font-size: 12px; margin-top: 6px; color: var(--accent); font-family: var(--font); }

/* ── ACTIVITY ────────────────────────────────────────────── */
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0; margin-top: 7px;
}
.activity-dot.info { background: var(--info); }
.activity-dot.warning { background: var(--warning); }
.activity-dot.muted { background: var(--text-4); }
.activity-text { font-size: 13px; color: var(--text-2); line-height: 1.5; flex: 1; }
.activity-time { font-size: 11px; color: var(--text-4); white-space: nowrap; font-family: var(--font); margin-left: auto; }

/* ── UPLOAD ──────────────────────────────────────────────── */
.upload-zone {
  border: 1.5px dashed var(--border-3);
  border-radius: var(--r);
  padding: 40px 20px; text-align: center; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.upload-zone:hover { border-color: var(--accent); background: var(--accent-dim); }
.upload-title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.upload-hint { font-size: 12.5px; color: var(--text-3); }
.upload-hint span { color: var(--accent); cursor: pointer; }
.upload-hint span:hover { text-decoration: underline; }

/* ── FILE ITEMS ──────────────────────────────────────────── */
.file-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.file-item:last-child { border-bottom: none; }
.file-icon-wrap {
  width: 32px; height: 32px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.file-icon-wrap svg { width: 15px; height: 15px; stroke: var(--text-3); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.file-name { font-size: 13px; color: var(--text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ── KB LIST SIDEBAR ─────────────────────────────────────── */
.kb-sidebar-item {
  padding: 14px 20px; cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.15s;
}
.kb-sidebar-item:hover { background: rgba(255,255,255,0.03); }
.kb-sidebar-item.active {
  border-left-color: var(--accent);
  background: var(--accent-dim);
}
.kb-item-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kb-item-name { font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.kb-sidebar-item.active .kb-item-name { color: var(--text); }
.kb-item-ready { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--accent); }
.kb-item-empty { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-4); }
.kb-item-docs { font-size: 11.5px; color: var(--text-4); margin-top: 4px; }

/* ── LOG ITEMS ───────────────────────────────────────────── */
.log-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--text-2);
}
.log-item:last-child { border-bottom: none; }
.log-time { color: var(--text-4); font-family: var(--font); white-space: nowrap; flex-shrink: 0; }
.log-icon { flex-shrink: 0; margin-top: 1px; }
.log-icon svg { width: 13px; height: 13px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.log-pulse {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); animation: pulse 1.5s ease-in-out infinite;
  margin-top: 3px; flex-shrink: 0;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.7)} }

/* ── GEO BARS ────────────────────────────────────────────── */
.geo-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.geo-label { width: 130px; font-size: 13px; color: var(--text-2); flex-shrink: 0; }
.geo-bar-track { flex: 1; height: 4px; background: rgba(255,255,255,0.07); border-radius: 100px; }
.geo-bar-fill { height: 100%; background: var(--accent); border-radius: 100px; }
.geo-pct { width: 34px; text-align: right; font-size: 12px; font-family: var(--font); color: var(--text-2); }

/* ── CONNECTOR CARDS ─────────────────────────────────────── */
.conn-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px;
}
.conn-card.connected { border-color: rgba(70,253,158,0.2); }
.conn-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.conn-logo {
  width: 40px; height: 40px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.conn-name { font-size: 14.5px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.conn-type { font-size: 11px; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.06em; }
.conn-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.55; margin-bottom: 10px; }
.conn-note {
  font-size: 12px; color: var(--text-3); font-style: italic;
  padding: 8px 12px;
  background: var(--surface-2); border-radius: var(--r-xs);
  border-left: 2px solid var(--accent-dim3); margin-bottom: 14px;
}
.conn-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--border);
}

/* ── SKILL ROWS ──────────────────────────────────────────── */
.skill-row {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 24px 0; border-bottom: 1px solid var(--border);
}
.skill-row:last-child { border-bottom: none; }
.skill-icon-box {
  width: 38px; height: 38px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.skill-icon-box svg { width: 17px; height: 17px; stroke: var(--accent); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skill-name { font-size: 15px; font-weight: 500; color: var(--text); margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.skill-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 12px; max-width: 540px; }
.skill-config {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 14px 16px;
  display: flex; flex-wrap: wrap; gap: 20px;
}
.skill-cfg-item { display: flex; flex-direction: column; gap: 5px; }
.skill-cfg-label { font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-4); }
.skill-num-input {
  background: var(--surface-3); border: 1px solid var(--border-2);
  border-radius: var(--r-xs); color: var(--text);
  padding: 5px 8px; font-family: var(--font); font-size: 13px;
  width: 60px; text-align: center; outline: none;
}
.skill-num-input:focus { border-color: var(--accent); }

/* ── GLASS ───────────────────────────────────────────────── */
.glass {
  background: rgba(255,255,255,0.035) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: rgba(255,255,255,0.09) !important;
}
.glass:hover { border-color: rgba(255,255,255,0.14) !important; }

/* ── EDITABLE ────────────────────────────────────────────── */
[contenteditable="true"] {
  outline: none;
  border-bottom: 1px dashed rgba(70,253,158,0.4);
  padding-bottom: 1px;
}
[contenteditable="true"]:focus {
  border-bottom-color: var(--accent);
}

/* ── DIVIDER ─────────────────────────────────────────────── */
.divider { width: 100%; height: 1px; background: var(--border); margin: 24px 0; }
.section-divider { display: flex; align-items: center; gap: 14px; margin: 28px 0 18px; }
.section-divider-title { font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.section-divider-line { flex: 1; height: 1px; background: var(--border); }

/* ── MISC ────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.t-accent { color: var(--accent); }
.t-muted { color: var(--text-3); }
.t-secondary { color: var(--text-2); }
.t-mono { font-family: var(--font); }

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-3); }
