/*! envstore panel v2 */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; background: #f4f4f5; color: #111827; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
a.btn:hover { text-decoration: none; }
header.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #e4e4e7;
  background: #fff;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.topbar-start {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.topbar-brand {
  flex-shrink: 0;
  color: #111827;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition-property: color, opacity;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.topbar-brand:hover {
  color: #1d4ed8;
  text-decoration: none;
  opacity: 0.92;
}
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.35rem 0.7rem;
  border-radius: 0.5rem;
  color: #52525b;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition-property: color, background-color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.topbar-link:hover {
  color: #111827;
  background: #f4f4f5;
  text-decoration: none;
}
.topbar-link-primary {
  color: #1d4ed8;
  background: #eff6ff;
}
.topbar-link-primary:hover {
  color: #1e40af;
  background: #dbeafe;
}
.topbar-logout { display: inline-flex; margin: 0; }
.topbar-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.35rem 0.7rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: #52525b;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
  transition-property: color, background-color, scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.topbar-logout-btn:hover {
  color: #111827;
  background: #f4f4f5;
}
.topbar-logout-btn:active { scale: 0.96; }
.breadcrumb {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #71717a;
  font-size: 0.8125rem;
}
.breadcrumb::before {
  content: "/";
  margin-right: 0.75rem;
  color: #a1a1aa;
  font-weight: 400;
}
.app-shell { max-width: 1440px; margin: 0 auto; padding: 0 1rem; }
.app-body { display: flex; gap: 1.5rem; align-items: flex-start; padding-top: 1.5rem; padding-bottom: 2rem; min-height: calc(100vh - 3.5rem); }
.sidebar { flex: 0 0 240px; background: #fff; border: 1px solid #e4e4e7; border-radius: 0.75rem; padding: 0.75rem; position: sticky; top: calc(3.5rem + 0.75rem); max-height: calc(100vh - 3.5rem - 1.5rem); overflow-y: auto; }
.sidebar-group { margin-bottom: 0.75rem; }
.sidebar-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #71717a; padding: 0.25rem 0.5rem; }
.sidebar-link { display: block; padding: 0.4rem 0.5rem; border-radius: 0.5rem; font-size: 0.875rem; color: #111827; }
.sidebar-link:hover { background: #f4f4f5; text-decoration: none; }
.sidebar-link.active { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.main-content { flex: 1; min-width: 0; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.text-sm { font-size: 0.875rem; }
.text-muted { color: #6b7280; }
.card { background: #fff; border-radius: 0.75rem; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 1px 2px oklch(0 0 0 / 0.06), 0 4px 12px oklch(0 0 0 / 0.04); }
.card-compact { padding: 0.75rem 1rem; }
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid #e5e7eb; margin: -0.25rem -0.25rem 1rem; padding: 0 0.25rem; }
.tab-panel[hidden] { display: none; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { border-bottom: 1px solid #e5e7eb; padding: 0.5rem; text-align: left; vertical-align: top; }
th { background: #f9fafb; font-weight: 600; position: sticky; top: 0; z-index: 1; }
.table-compact th, .table-compact td { padding: 0.35rem 0.5rem; }
.tabular { font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], textarea, select {
  width: 100%; padding: 0.5rem; border: 1px solid #d1d5db; border-radius: 0.5rem;
}
input[readonly] { background: #f9fafb; cursor: text; }
input[type=checkbox] { width: auto; cursor: pointer; }
label { cursor: pointer; }
button, .btn {
  display: inline-block; padding: 0.5rem 0.75rem; border-radius: 0.5rem; border: none;
  background: #2563eb; color: #fff; cursor: pointer; font-size: 0.875rem;
  transition-property: background-color, scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
button:active, .btn:active { scale: 0.96; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary, .btn.secondary { background: #e5e7eb; color: #111827; }
button.danger { background: #dc2626; }
button.tab, .tab {
  padding: 0.5rem 0.75rem; margin-bottom: -1px; border: none; border-bottom: 2px solid transparent;
  background: none; color: #6b7280; font-size: 0.875rem; font-weight: 500; border-radius: 0.5rem 0.5rem 0 0;
  transition: color 0.15s ease, background 0.15s ease;
}
button.tab:hover, .tab:hover { color: #111827; background: #f9fafb; scale: none; }
button.tab[aria-selected="true"], .tab[aria-selected="true"], button.tab.active, .tab.active { color: #1d4ed8; border-bottom-color: #2563eb; background: none; }
button:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #2563eb; outline-offset: 2px;
}
.alert { padding: 0.75rem; border-radius: 0.5rem; margin-bottom: 1rem; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-ok { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.75rem; background: #e5e7eb; color: #374151; }
.badge-warn { background: #fef3c7; color: #92400e; }
.reveal-btn { padding: 0.2rem 0.5rem; font-size: 0.75rem; margin-left: 0.25rem; vertical-align: middle; }
.diff-added td { background: #f0fdf4; }
.diff-changed td { background: #fffbeb; }
.diff-removed td { background: #fef2f2; }
.mono { font-family: ui-monospace, monospace; font-size: 0.8rem; word-break: break-all; }
.masked { filter: blur(4px); user-select: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 1023px) {
  .app-body { flex-direction: column; }
  .sidebar { flex: none; width: 100%; position: static; max-height: none; }
}
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .topbar-brand,
  .topbar-link,
  .topbar-logout-btn,
  button,
  .btn { transition: none; }
  .topbar-logout-btn:active,
  button:active,
  .btn:active { scale: none; }
}
