:root {
  --bs-sidebar-width: 260px;
}

body {
  min-height: 100vh;
  background-color: #f4f6f9;
}

.view-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a5f 0%, #0d2137 50%, #1a4a6e 100%);
}

.view-login .card {
  max-width: 420px;
  width: 100%;
  border: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--bs-sidebar-width);
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e8e8e8;
  padding-top: 56px;
}

.app-sidebar .nav-link {
  color: #333;
  border-radius: 0.35rem;
  margin: 0.15rem 0.5rem;
  padding: 0.55rem 0.85rem;
}

.app-sidebar .nav-link:hover {
  background: #f0f4f8;
}

.app-sidebar .nav-link.active {
  background: #e7f1ff;
  color: #0d6efd;
  font-weight: 600;
}

.sidebar-scroll {
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-divider {
  border: 0;
  border-top: 1px solid #e8e8e8;
  opacity: 1;
}

.sidebar-group-title {
  font-weight: 600;
  letter-spacing: 0.04em;
}

pre.explorer-out {
  max-height: min(480px, 55vh);
  min-height: 120px;
}

textarea.explorer-body {
  font-size: 0.8rem;
}

.app-main {
  flex: 1;
  min-width: 0;
  padding-top: 56px;
}

.app-content {
  padding: 1.25rem;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.toast-container {
  z-index: 1090;
}

pre.json-preview {
  font-size: 0.8rem;
  max-height: 360px;
  overflow: auto;
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem;
  border-radius: 0.5rem;
}

.data-hub-accordion .accordion-button {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

.data-hub-accordion .list-group-item {
  font-size: 0.875rem;
  padding: 0.35rem 0.75rem;
}

.data-browse-table-wrap {
  max-height: min(560px, 62vh);
  overflow: auto;
}

.data-browse-table-wrap th,
.data-browse-table-wrap td {
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

@media (max-width: 767.98px) {
  .app-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    z-index: 1040;
    transition: left 0.2s ease;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
  }

  .app-sidebar.show {
    left: 0;
  }

  .app-main {
    width: 100%;
  }
}
