/* ====== phpAdmon — Modern phpMyAdmin-style dense admin ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root,
[data-bs-theme="dark"] {
  --bg: #0e1210;
  --sidebar-bg: #121816;
  --surface: #171d1a;
  --surface-hover: rgba(143, 188, 110, 0.08);
  --surface-active: rgba(143, 188, 110, 0.14);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #e8efe4;
  --text-secondary: #cfd9c8;
  --text-muted: #859480;
  --accent: #8fbc6e;
  --accent-light: #c5e0b0;
  --accent-ink: #0f1a0c;
  --success: #7dcea0;
  --danger: #e89090;
  --warning: #e8c87a;
  --scrollbar: rgba(255, 255, 255, 0.1);
  --scrollbar-hover: rgba(255, 255, 255, 0.18);
  --topbar-h: 48px;
  --sidebar-w: 260px;
  --focus-ring: rgba(143, 188, 110, 0.35);
  --radius: 6px;
  --radius-sm: 4px;
  --ease: 140ms ease;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Consolas", monospace;
  /* legacy aliases */
  --glass: var(--surface);
  --glass-hover: var(--surface-hover);
  --glass-border: var(--border);
  --glass-border-hover: rgba(143, 188, 110, 0.25);
  --glass-shadow: none;
  --glass-shadow-hover: none;
}

[data-bs-theme="light"] {
  --bg: #eef1ec;
  --sidebar-bg: #f7f9f5;
  --surface: #ffffff;
  --surface-hover: rgba(90, 122, 72, 0.07);
  --surface-active: rgba(90, 122, 72, 0.12);
  --border: rgba(20, 35, 18, 0.1);
  --border-strong: rgba(20, 35, 18, 0.16);
  --text: #152018;
  --text-secondary: #243028;
  --text-muted: #667564;
  --accent: #5a7a48;
  --accent-light: #3d5632;
  --accent-ink: #ffffff;
  --success: #2f7a52;
  --danger: #b85454;
  --warning: #9a7420;
  --scrollbar: rgba(20, 35, 18, 0.14);
  --scrollbar-hover: rgba(20, 35, 18, 0.22);
  --focus-ring: rgba(90, 122, 72, 0.28);
  --glass: var(--surface);
  --glass-hover: var(--surface-hover);
  --glass-border: var(--border);
  --glass-border-hover: rgba(90, 122, 72, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

html,
body {
  height: 100%;
}

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

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--ease);
  cursor: pointer;
}

a:hover {
  color: var(--accent);
}

/* ====== App frame (phpMyAdmin-like) ====== */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.app-sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  z-index: 30;
}

.app-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
}

.app-topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.85rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.app-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.85rem 1rem 1.25rem;
}

/* ====== Sidebar ====== */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  min-height: var(--topbar-h);
}

.sidebar-brand-mark {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface-active);
  color: var(--accent);
  flex-shrink: 0;
}

.sidebar-brand-mark i {
  font-size: 0.95rem;
}

.sidebar-brand-text {
  min-width: 0;
}

.sidebar-brand-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}

.sidebar-brand-text span {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.sidebar-filter {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-filter input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.78rem;
  padding: 0.35rem 0.55rem;
  min-height: 32px;
}

.sidebar-filter input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.sidebar-section {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.35rem 0;
}

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem 0.3rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.sidebar-heading a {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
}

.sidebar-heading a:hover {
  color: var(--accent);
}

.nav-tree {
  list-style: none;
  margin: 0;
  padding: 0 0.35rem 0.5rem;
}

.nav-tree a,
.nav-tree-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.25;
  min-height: 30px;
  transition: background var(--ease), color var(--ease);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-tree a:hover,
.nav-tree-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.nav-tree a.active,
.nav-tree-item.active,
.nav-tree a.open {
  background: var(--surface-active);
  color: var(--accent);
  font-weight: 600;
}

.nav-tree .tree-icon {
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.85;
  font-size: 0.78rem;
}

.nav-tree .tree-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-tree .tree-meta {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.nav-tree .tree-action {
  flex-shrink: 0;
  opacity: 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0 0.15rem;
}

.nav-tree a:hover .tree-action,
.nav-tree a.active .tree-action,
.nav-tree a.open .tree-action {
  opacity: 1;
}

.nav-tree a.open .tree-action {
  color: var(--danger);
}

.sidebar-empty {
  padding: 0.75rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 0.45rem 0.55rem;
  flex-shrink: 0;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

/* ====== Topbar ====== */
.topbar-toggle {
  display: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.topbar-path {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
}

.topbar-path a {
  color: var(--text-muted);
  font-weight: 500;
}

.topbar-path a:hover {
  color: var(--accent);
}

.topbar-path .sep {
  opacity: 0.45;
}

.topbar-path .current {
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.app-user {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0 0.25rem;
}

#paletteSelect {
  width: 128px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  padding: 0.2rem 0.4rem;
  min-height: 30px;
}

#paletteSelect:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
  outline: none;
}

/* ====== Page chrome (dense) ====== */
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.page-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.page-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Dense data table for overviews */
.data-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-panel .table {
  margin: 0;
  font-size: 0.8rem;
}

.data-panel thead th {
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.65rem;
  white-space: nowrap;
}

.data-panel tbody td {
  border-color: var(--border);
  padding: 0.4rem 0.65rem;
  vertical-align: middle;
  color: var(--text);
}

.data-panel tbody tr {
  cursor: pointer;
  transition: background var(--ease);
}

.data-panel tbody tr:hover td {
  background: var(--surface-hover);
}

.data-panel .name-cell {
  font-weight: 600;
  color: var(--text);
}

.data-panel .name-cell i {
  color: var(--accent);
  margin-right: 0.35rem;
}

.data-panel .meta-cell {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 1.75rem;
  color: var(--accent);
  opacity: 0.7;
  display: block;
  margin-bottom: 0.65rem;
}

/* Resource list (fallback / connections with actions) */
.resource-list {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.resource-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: background var(--ease);
}

.resource-list > .resource-item:last-child .resource-row,
.resource-list > a.resource-row:last-child {
  border-bottom: none;
}

.resource-row:hover {
  background: var(--surface-hover);
  color: inherit;
  padding-left: 0.75rem;
}

.resource-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-active);
  color: var(--accent);
  font-size: 0.85rem;
}

.resource-icon.is-db {
  background: rgba(125, 206, 160, 0.12);
  color: var(--success);
}

.resource-body {
  flex: 1 1 auto;
  min-width: 0;
}

.resource-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-meta {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.resource-chevron {
  color: var(--text-muted);
  opacity: 0.45;
}

.resource-item {
  position: relative;
}

.resource-item .edit-conn-btn {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  opacity: 0;
}

.resource-item:hover .edit-conn-btn {
  opacity: 1;
}

/* ====== Legacy bridges ====== */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.glass-inset {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.glass-icon,
.glass-icon-sm,
.glass-icon-db {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-active);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--accent);
}

.con-card {
  background: transparent;
  border: none;
}

.btn-glass {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.78rem;
  padding: 0.28rem 0.65rem;
  min-height: 30px;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.btn-glass:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-glass:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.btn-glass.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn-glass.active:hover {
  filter: brightness(1.06);
  color: var(--accent-ink);
}

.btn-glass.btn-sm {
  min-height: 28px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
}

.badge-glass {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 0;
  font-weight: 600;
  font-size: 0.9rem;
  backdrop-filter: none;
}

.breadcrumb-glass {
  display: none; /* path lives in topbar */
}

/* Tables */
.table-glass {
  border-radius: var(--radius);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
}

.table-glass table {
  margin-bottom: 0;
  font-size: 0.8rem;
}

.table-glass thead th {
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.45rem 0.55rem;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table-glass tbody td {
  color: var(--text);
  font-size: 0.8rem;
  border-color: var(--border);
  padding: 0.35rem 0.55rem;
  vertical-align: middle;
}

.table-glass tbody tr:hover td {
  background: var(--surface-hover);
}

.table-glass th.sortable {
  cursor: pointer;
  user-select: none;
}

.table-glass code {
  color: var(--accent-light);
  background: var(--surface-active);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  font-size: 0.78em;
  font-family: var(--mono);
}

.pagination-glass .page-link {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm) !important;
  color: var(--text-muted);
  margin: 0 1px;
  min-width: 30px;
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
}

.pagination-glass .page-link:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.pagination-glass .active .page-link {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.pagination-glass .disabled .page-link {
  opacity: 0.35;
}

/* Tabs — compact underline */
.nav-glass {
  border-bottom: 1px solid var(--border);
  gap: 0 !important;
  background: var(--surface);
  padding: 0 0.25rem;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}

.nav-glass .nav-link {
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  color: var(--text-muted);
  padding: 0.4rem 0.7rem !important;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: -1px;
}

.nav-glass .nav-link:hover {
  color: var(--text);
}

.nav-glass .nav-link.active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--accent) !important;
}

.tab-close {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 0 0.35rem;
  margin-bottom: -1px;
  cursor: pointer;
}

.tab-close:hover {
  color: var(--danger);
}

.tab-close.tab-close-active {
  border-bottom-color: var(--accent);
}

.table-tabs-wrap {
  margin-bottom: 0;
}

.table-tabs-wrap + #tableContainer .page-toolbar,
.table-tabs-wrap ~ #tableContainer > .page-toolbar {
  border: 1px solid var(--border);
  border-top: none;
  background: var(--surface);
  margin: 0;
  padding: 0.55rem 0.75rem;
}

.table-tabs-wrap ~ #tableContainer > .table-glass,
.table-tabs-wrap ~ #tableContainer > form,
.table-tabs-wrap ~ #tableContainer > .alert {
  border-radius: 0 0 var(--radius) var(--radius);
}

/* Old sidebar list items (unused but kept) */
.table-list-item {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.45rem;
}

.table-list-item:hover {
  background: var(--surface-hover);
  transform: none;
}

.table-list-item.open {
  background: var(--surface-active);
}

.table-list-item .table-name {
  font-size: 0.78rem;
  font-weight: 500;
}

.table-list-item .table-name.open-text {
  color: var(--accent);
}

.table-list-item .table-meta {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.sidebar-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
}

.table-list-container {
  max-height: none;
}

/* Forms */
.form-field {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.4rem 0.65rem;
  min-height: 34px;
  font-size: 0.82rem;
}

.form-field:focus {
  background: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
  color: var(--text);
}

.form-field::placeholder {
  color: var(--text-muted);
  opacity: 0.55;
}

.form-label {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.form-control:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--focus-ring) !important;
}

textarea.form-field {
  min-height: 110px;
  resize: vertical;
  line-height: 1.45;
  tab-size: 2;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.modal-backdrop.show {
  opacity: 0.5;
}

.modal-content.glass {
  background: var(--surface) !important;
  border: 1px solid var(--border-strong);
}

.row-action-column {
  width: 1%;
  white-space: nowrap;
}

.row-view-btn {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.row-view-modal {
  background: var(--surface);
}

.row-view-modal .modal-header,
.row-view-modal .modal-footer {
  border-color: var(--border);
}

.row-view-modal .record-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.row-view-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.row-view-modal .modal-header,
.row-view-modal .modal-footer {
  flex-shrink: 0;
}

.row-view-form {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 0.75rem;
}

.row-view-field {
  display: flex;
  flex-direction: column;
}

.row-view-field .form-field {
  min-height: 34px;
}

.record-alert {
  color: var(--text);
  background: rgba(125, 206, 160, 0.12);
  border: 1px solid rgba(125, 206, 160, 0.28);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
}

.record-alert-error {
  background: rgba(232, 144, 144, 0.12);
  border-color: rgba(232, 144, 144, 0.3);
}

.cell-trunc {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

hr {
  border-color: var(--border);
  opacity: 0.6;
}

.saved-query-item {
  border-radius: var(--radius-sm);
}

.saved-query-item:hover {
  background: var(--surface-hover);
}

.dropdown-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
}

.dropdown-menu .dropdown-item {
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
}

.dropdown-menu .dropdown-item:hover {
  background: var(--surface-hover);
  color: var(--text) !important;
}

.btn-close {
  filter: invert(1) grayscale(100%) brightness(180%);
  opacity: 0.5;
}

[data-bs-theme="light"] .btn-close {
  filter: none;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-hover);
}

/* Auth */
.auth-panel,
.login-card,
.auth-card {
  width: 100%;
  max-width: 380px;
  padding: 1.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-panel .auth-mark,
.auth-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface-active);
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.auth-mark i {
  font-size: 1.2rem;
}

/* Mobile */
.sidebar-backdrop {
  display: none;
}

@media (max-width: 991.98px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(var(--sidebar-w), 86vw);
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.35);
  }

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

  body.sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 25;
  }

  .topbar-toggle {
    display: inline-flex;
  }

  .resource-item .edit-conn-btn {
    opacity: 1;
  }

  .app-content {
    padding: 0.75rem;
  }
}
