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

:root {
  --bg:            #080808;
  --surface:       #111111;
  --surface2:      #191919;
  --surface3:      #202020;
  --border:        #2e2e2e;
  --border-mid:    #3a3a3a;
  --border-strong: #505050;
  --accent:        #3b7de8;
  --accent-dim:    rgba(59, 125, 232, 0.15);
  --green:         #4caf7d;
  --red:           #e05c5c;
  --orange:        #d4854a;
  --text:          #ececec;
  --text-secondary:#909090;
  --text-muted:    #585858;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

html, body { height: 100%; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.4;
}

/* ── Auth overlay (modal, hidden by default) ─────────────────────── */

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.auth-overlay.open {
  display: flex;
}

.auth-modal {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  padding: 32px;
  width: 360px;
  max-width: 90vw;
  position: relative;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: all 0.15s;
}
.auth-close:hover { color: var(--text); background: var(--surface3); }

.auth-message {
  text-align: center;
  color: var(--orange);
  font-size: 12px;
  margin-bottom: 12px;
  min-height: 0;
}
.auth-message:empty { display: none; }

.auth-logo {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  letter-spacing: -0.3px;
}
.auth-logo span { color: var(--accent); }

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
  margin-bottom: 24px;
}

.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  overflow: hidden;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.auth-tab.active {
  background: var(--accent);
  color: #fff;
}

.auth-error {
  color: var(--red);
  font-size: 12px;
  margin-bottom: 10px;
  min-height: 16px;
}

.auth-submit {
  width: 100%;
  padding: 9px;
  font-size: 13px;
}

/* ── Header ─────────────────────────────────────────────────────────── */

header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: 52px;
  background: var(--surface);
  border-bottom: 2px solid var(--border-mid);
  flex-shrink: 0;
}

.logo {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.logo span { color: var(--accent); }

.divider {
  width: 1px;
  height: 18px;
  background: var(--border-mid);
}

.logo-tag {
  font-size: 11px;
  color: var(--text-muted);
}

.spacer { flex: 1; }

.ws-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.ws-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

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

#usernameDisplay {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0 2px;
}

.btn-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  padding: 0 10px;
  height: 26px;
  line-height: 1;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-header:hover { background: var(--surface3); color: var(--text); border-color: var(--border-mid); }

.btn-header-accent {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.btn-header-accent:hover { background: #2f6fd4; border-color: transparent; }

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2f6fd4; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-mid);
}
.btn-ghost:hover { background: var(--surface3); color: var(--text); }

.btn-subtle {
  background: var(--surface3);
  color: var(--text);
  border: 1px solid var(--border-mid);
}
.btn-subtle:hover { background: #2a2a2a; }

.btn-sm {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 5px;
}

/* ── Endpoint actions / dropdown ────────────────────────────────────── */

.endpoint-actions {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
}

.endpoint-actions .btn-primary {
  font-size: 11px;
  padding: 0 10px;
  height: 26px;
  line-height: 26px;
  border-radius: 5px 0 0 5px;
}

.btn-dropdown {
  background: var(--accent);
  color: #fff;
  border: none;
  border-left: 1px solid rgba(255,255,255,0.18);
  border-radius: 0 5px 5px 0;
  height: 26px;
  width: 22px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.btn-dropdown:hover { background: #2f6fd4; }

.btn-dropdown svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
}

.endpoint-dropdown.open + .btn-dropdown svg,
.endpoint-actions:has(.endpoint-dropdown.open) .btn-dropdown svg {
  transform: rotate(180deg);
}

.endpoint-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  overflow: hidden;
}

.endpoint-dropdown.open { display: block; }

.dropdown-header {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border-mid);
}

.dropdown-list {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-mid) transparent;
}

.dropdown-empty {
  padding: 20px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.dropdown-item:last-child { border-bottom: none; }

.dropdown-item:hover { background: var(--surface2); }

.dropdown-item.active {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  padding-left: 11px;
}

.dropdown-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-item-id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
}

.dropdown-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.ep-expired { color: var(--red); }

.dropdown-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s;
  flex-shrink: 0;
}

.dropdown-item:hover .dropdown-item-remove { opacity: 1; }
.dropdown-item-remove:hover { color: var(--red); background: rgba(224, 92, 92, 0.12); }

/* ── Layout ─────────────────────────────────────────────────────────── */

#appWrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.container {
  display: grid;
  grid-template-columns: 320px 1fr;
  flex: 1;
  min-height: 0;
}

/* ── Sidebar ────────────────────────────────────────────────────────── */

.sidebar {
  background: var(--surface);
  border-right: 2px solid var(--border-mid);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.url-section {
  padding: 16px;
  border-bottom: 2px solid var(--border-mid);
}

.field-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 7px;
}

.url-bar {
  display: flex;
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
}

.url-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-secondary);
  min-width: 0;
}

.copy-btn {
  background: var(--surface2);
  border: none;
  border-left: 1px solid var(--border);
  padding: 0 12px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.copy-btn:hover { background: var(--surface3); color: var(--text); }

/* ── Share dropdown ────────────────────────────────────────────────── */

.share-dropdown-wrap {
  position: relative;
}

.share-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  overflow: hidden;
}

.share-dropdown.open { display: block; }

.share-dd-section { padding: 12px 14px; }

.share-dd-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.share-dd-link-row {
  display: flex;
  gap: 6px;
}

.share-dd-input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-secondary);
  outline: none;
}

.share-dd-divider {
  height: 1px;
  background: var(--border-mid);
  margin-bottom: 12px;
}

.share-dd-vis-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.visibility-control {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.toggle {
  position: relative;
  width: 34px;
  height: 18px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--surface3);
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid var(--border-mid);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 12px;
  height: 12px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all 0.2s;
}

.toggle input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(16px);
  background: #fff;
}

.vis-label {
  font-size: 11px;
  color: var(--text-secondary);
  min-width: 44px;
}

.share-dd-collab { margin-top: 4px; }

.share-dd-collab-add {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 8px;
}

.share-dd-collab-add input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 8px;
  font-family: var(--font);
  font-size: 11px;
  color: var(--text);
  outline: none;
}
.share-dd-collab-add input:focus { border-color: var(--accent); }

.collab-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.collab-item button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s;
}
.collab-item button:hover { color: var(--red); background: rgba(224, 92, 92, 0.12); }

/* ── API Keys dropdown ─────────────────────────────────────────────── */

.apikeys-dropdown-wrap {
  position: relative;
}

.apikeys-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 360px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  overflow: hidden;
}

.apikeys-dropdown.open { display: block; }

.apikeys-list {
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-mid) transparent;
}

.apikeys-empty {
  padding: 16px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.apikeys-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}

.apikeys-item:last-child { border-bottom: none; }

.apikeys-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.apikeys-item-id {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
}

.apikeys-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.apikeys-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s;
  flex-shrink: 0;
}

.apikeys-item:hover .apikeys-item-remove { opacity: 1; }
.apikeys-item-remove:hover { color: var(--red); background: rgba(224, 92, 92, 0.12); }

.apikeys-create {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid var(--border-mid);
}

.apikeys-create input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 8px;
  font-family: var(--font);
  font-size: 11px;
  color: var(--text);
  outline: none;
}

.apikeys-create input:focus { border-color: var(--accent); }

.apikeys-secret-box {
  padding: 12px 14px;
  border-top: 1px solid var(--accent);
  background: rgba(59, 125, 232, 0.05);
}

.apikeys-secret-warning {
  font-size: 11px;
  font-weight: 600;
  color: var(--orange);
  margin-bottom: 10px;
}

.apikeys-secret-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.apikeys-secret-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.apikeys-secret-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.apikeys-secret-field code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  word-break: break-all;
  user-select: all;
}

.apikeys-secret-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.apikeys-secret-hint code {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-secondary);
  background: var(--surface3);
  padding: 1px 4px;
  border-radius: 3px;
}

/* ── Tabs ───────────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  border-bottom: 2px solid var(--border-mid);
  padding: 0 16px;
  background: var(--surface);
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 11px 8px;
  margin-right: 4px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: -2px;
}

.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }

.req-badge {
  background: var(--surface3);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
}

.tab-btn.active .req-badge {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ── Request list ───────────────────────────────────────────────────── */

.request-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-mid) transparent;
}

.empty-state {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.9;
}

.request-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border-mid);
  cursor: pointer;
  transition: background 0.1s;
}

.request-item:hover { background: var(--surface2); }

.request-item.active {
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  padding-left: 13px;
}

.method-pill {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.method-GET     { background: rgba(76, 175, 125, 0.12); color: #5ab88a; }
.method-POST    { background: rgba(59, 125, 232, 0.12); color: #5c9ae8; }
.method-PUT     { background: rgba(212, 133, 74, 0.12);  color: #d4924f; }
.method-DELETE  { background: rgba(224, 92, 92, 0.12);   color: #e06a6a; }
.method-PATCH   { background: rgba(160, 120, 220, 0.12); color: #a07ad4; }
.method-HEAD    { background: rgba(160, 160, 160, 0.12); color: #999; }
.method-OPTIONS { background: rgba(59, 125, 232, 0.08);  color: #6898d4; }

.req-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s;
  flex-shrink: 0;
}

.request-item:hover .req-delete { opacity: 1; }
.req-delete:hover { color: var(--red); background: rgba(224, 92, 92, 0.12); }

.req-info { flex: 1; min-width: 0; }

.req-path {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
}

.req-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  line-height: 1.3;
}

/* ── Config panel ───────────────────────────────────────────────────── */

.config-panel {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-mid) transparent;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  outline: none;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  resize: vertical;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }

.form-group textarea { min-height: 80px; }

.sidebar-footer {
  padding: 10px 16px;
  border-top: 2px solid var(--border-mid);
  background: var(--surface);
}

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

.footer-spacer { flex: 1; }

/* ── Main / Detail ──────────────────────────────────────────────────── */

.main {
  background: var(--bg);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-mid) transparent;
}

.detail-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 10px;
}

.detail-empty svg { opacity: 0.2; }
.detail-empty p { font-size: 13px; }

.detail-view { padding: 20px; max-width: 860px; }

.detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border-mid);
}

.detail-path { font-family: var(--mono); font-size: 13px; color: var(--text); flex: 1; }
.detail-time { font-size: 12px; color: var(--text-muted); }

/* ── Sections ───────────────────────────────────────────────────────── */

.section {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-mid);
}

.section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
}

/* ── Tables ─────────────────────────────────────────────────────────── */

.kv-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  overflow: hidden;
}

.kv-table tr:not(:last-child) td { border-bottom: 1px solid var(--border-mid); }

.kv-table td {
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--mono);
  vertical-align: top;
  line-height: 1.4;
}

.kv-table td:first-child {
  color: var(--text-secondary);
  width: 32%;
  border-right: 1px solid var(--border-mid);
  background: var(--surface);
}

.kv-table td:last-child { color: var(--text); word-break: break-all; background: var(--bg); }

.body-block {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 300px;
  overflow-y: auto;
  line-height: 1.5;
}

/* ── Toast ──────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface2);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.toast.show { opacity: 1; transform: translateY(0); }

/* ── Scrollbar ──────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 4px; }

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    grid-template-rows: 45vh 1fr;
  }
  .sidebar { border-right: none; border-bottom: 2px solid var(--border-mid); }
}
