:root {
  --dashboard-shell-gap: var(--space-3);
  --dashboard-sidebar-width: 320px;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
  min-height: 100vh;
  height: auto;
  overflow: visible;
}

@media (max-width: 960px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
    min-height: 0;
    height: auto;
  }
}

.dashboard-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 100vh;
  width: var(--dashboard-sidebar-width);
  transition: width 0.3s ease;
}

.sidebar-collapsed .dashboard-sidebar {
  width: 88px;
}

.sidebar-panel {
  position: relative;
  height: 100%;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  border-radius: 0;
  padding: var(--space-4);
  background:
    radial-gradient(520px 140px at 50% -32px, rgba(250, 204, 21, 0.10), transparent 65%),
    radial-gradient(320px 110px at 15% 0, rgba(217, 119, 6, 0.08), transparent 70%),
    radial-gradient(320px 110px at 85% 0, rgba(250, 204, 21, 0.08), transparent 70%),
    linear-gradient(
      to bottom,
      rgba(3, 6, 15, 0.92) 0%
    );
  border-left: 0;
  border-top: 0;
  border-bottom: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 -2px 16px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: padding 0.3s ease;
}

.sidebar-panel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(250, 204, 21, 0.55) 18%, var(--gold-500) 50%, rgba(250, 204, 21, 0.55) 82%, transparent 100%);
  pointer-events: none;
}

.sidebar-panel::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translateY(-50%) rotate(45deg);
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(250, 204, 21, 0.25);
}


.sidebar-panel__toggle {
  position: absolute;
  top: 50%;
  right: -32px;
  transform: translateY(-50%);
  z-index: 3;
}

.sidebar-panel__toggle-btn {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  color: #080b12;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
  transition: background 0.2s ease;
}

.sidebar-collapsed .sidebar-panel {
  padding: var(--space-3);
}

.sidebar-panel__brand-label,
.sidebar-panel__brand-name,
.sidebar-panel__brand-meta,
.sidebar-panel__link div,
.sidebar-panel__badge,
.sidebar-panel__support,
.sidebar-panel__support-text,
.sidebar-panel__support-link {
  transition: opacity 0.25s ease;
}

.sidebar-panel__link div {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  max-width: 400px;
  transition: width 0.3s ease, max-width 0.3s ease, opacity 0.2s ease;
}
.sidebar-panel__link div span {
  display: block;
  line-height: 1.2;
}

.sidebar-panel__link div small {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.58);
}


.sidebar-collapsed .sidebar-panel__brand-name,
.sidebar-collapsed .sidebar-panel__brand-meta,
.sidebar-collapsed .sidebar-panel__brand-label,
.sidebar-collapsed .sidebar-panel__link div,
.sidebar-collapsed .sidebar-panel__badge,
.sidebar-collapsed .sidebar-panel__support,
.sidebar-collapsed .sidebar-panel__support-text,
.sidebar-collapsed .sidebar-panel__support-link {
  opacity: 0;
  pointer-events: none;
}

.sidebar-panel__link div span,
.sidebar-panel__link div small {
  transition: opacity 0.2s ease;
}

.sidebar-collapsed .sidebar-panel__link div {
  max-width: 0;
  width: 0;
}

.sidebar-collapsed .sidebar-panel__link div span,
.sidebar-collapsed .sidebar-panel__link div small {
  display: none;
}

.sidebar-collapsed .sidebar-panel__logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  transition: width 0.3s ease, height 0.3s ease, border-radius 0.3s ease, background 0.3s ease;
}

.sidebar-collapsed .sidebar-panel__nav {
  margin-top: var(--space-2);
  align-items: center;
}

.sidebar-collapsed .sidebar-panel__link,
.sidebar-collapsed .sidebar-panel__link:is(a) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.35rem;
  border-radius: 999px;
}

.sidebar-collapsed .sidebar-panel__link-icon {
  margin: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-collapsed .sidebar-panel__badge {
  display: none;
}

.sidebar-collapsed .sidebar-panel__link.is-active {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.sidebar-collapsed .sidebar-panel__link.is-active .sidebar-panel__link-icon {
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.35);
  color: inherit;
}

.sidebar-panel__link,
.sidebar-panel__link-icon,
.sidebar-panel__logo {
  transition: all 0.3s ease;
}

.sidebar-panel__link div span {
  display: block;
  line-height: 1.2;
}

.sidebar-panel__link div small {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.58);
}

.sidebar-panel__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(147, 197, 253, 0.15), transparent 40%);
  opacity: 0.6;
  pointer-events: none;
}

.sidebar-panel__top {
  display: flex;
  justify-content: center;
  z-index: 1;
}

.sidebar-panel__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  z-index: 1;
}

.sidebar-panel__brand-button {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.sidebar-collapsed .sidebar-panel__brand {
  justify-content: center;
}

.sidebar-collapsed .sidebar-panel__brand-copy {
  display: none;
}

.sidebar-panel__logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(99, 102, 241, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-panel__brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sidebar-panel__brand-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
}

.sidebar-panel__brand-name {
  font-size: 1rem;
}

.sidebar-panel__brand-meta {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
}

.sidebar-panel__nav {
  flex: 1;
  margin-top: var(--space-4);
  overflow-y: auto;
  z-index: 1;
}

.sidebar-panel__brand-picker {
  margin-top: var(--space-2);
}

.sidebar-panel__brand-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-panel__brand-link {
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  font-size: 0.85rem;
}

.sidebar-panel__brand-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-panel__brand-empty {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.sidebar-collapsed .sidebar-panel__brand-picker {
  display: none;
}

.sidebar-panel__nav ul.flow > * + * {
  margin-top: var(--space-1);
}

.sidebar-panel__section + .sidebar-panel__section {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-panel__section-title {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-2);
  transition: opacity 0.2s ease, max-height 0.2s ease, margin 0.2s ease;
}

.sidebar-panel__link,
.sidebar-panel__link:is(a) {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-2);
  align-items: center;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  min-height: 44px;
}

.sidebar-panel__link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-panel__link:hover .sidebar-panel__link-icon {
  background: rgba(59, 130, 246, 0.24);
}

.sidebar-panel__link small {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
}

.sidebar-panel__link-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.12);
  display: grid;
  place-items: center;
}

.sidebar-panel__link.is-active {
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.sidebar-panel__link.is-disabled {
  opacity: 0.5;
}

.sidebar-panel__badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-panel__support {
  margin-top: var(--space-4);
  z-index: 1;
  padding: var(--space-3);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  max-height: 200px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease, border 0.3s ease;
}

.sidebar-panel__support-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.sidebar-panel__support-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}

.sidebar-panel__support-close {
  border: 0;
  background: transparent;
  color: rgba(248, 250, 252, 0.8);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.sidebar-panel__support-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.sidebar-panel__support-link {
  color: var(--blue-200);
  font-weight: 600;
}

/* Logout section */
.sidebar-panel__logout {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1;
}

.sidebar-panel__user-info {
  margin-bottom: var(--space-2);
}

.sidebar-panel__username {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  display: block;
}

.sidebar-panel__logout-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}

.sidebar-panel__logout-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.sidebar-panel__logout-icon {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Collapsed state for logout */
.sidebar-collapsed .sidebar-panel__logout {
  opacity: 0;
  pointer-events: none;
  padding: 0;
  margin-top: 0;
  border-top-color: transparent;
}

.sidebar-panel__section-title {
  transition: opacity 0.25s ease;
}

.sidebar-collapsed .sidebar-panel__support {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  padding: 0;
  border-color: transparent;
  pointer-events: none;
}

.sidebar-collapsed .sidebar-panel__section-title {
  opacity: 0;
  max-height: 0;
  margin: 0;
}

@media (max-width: 960px) {
  .dashboard-sidebar {
    position: static;
    height: auto;
  }

  .sidebar-panel {
    height: auto;
  }
}

.sidebar-nav {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 12, 28, 0.55);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-section + .sidebar-section {
  margin-top: var(--space-3);
}

.sidebar-section-title {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: var(--space-2);
}

.sidebar-link,
.sidebar-link:is(a) {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-2);
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  color: inherit;
  font-weight: 500;
  text-decoration: none;
  align-items: center;
  transition: background 0.15s ease, border 0.15s ease;
}

.sidebar-link small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.58);
}

.sidebar-link-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue-200);
}

.sidebar-link-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-link:hover:not(.is-disabled) {
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-link.is-active {
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.sidebar-link.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sidebar-support {
  text-align: left;
}

.sidebar-support-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.sidebar-support-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
}

.sidebar-support-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--blue-200);
}

.dashboard-main {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  height: auto;
  overflow: visible;
}

.dashboard-navbar {
  background: #000000;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: flex-start;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  position: sticky;
  top: 0;
  z-index: 5;
  position: relative;
}

.dashboard-navbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.dashboard-navbar::after {
  content: none;
}

.topbar-left {
  flex: 1;
  min-width: 220px;
}

.topbar-tenant {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.5rem;
}

.topbar-title {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 700;
}

.topbar-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 0.35rem;
}

.topbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: flex-end;
}

.topbar-search {
  position: relative;
  flex: 1 1 240px;
}

.topbar-search input {
  width: 100%;
  border-radius: var(--radius);
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
}

.topbar-search svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.5);
}

.topbar-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.topbar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(147, 197, 253, 0.2));
  display: grid;
  place-items: center;
  font-weight: 700;
}

.dashboard-scroll {
  display: flex;
  flex-direction: column;
  overflow: visible;
  border-radius: 0;
  border: none;
  background: transparent;
}

.dashboard-body {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-3);
  padding-bottom: var(--space-4);
  overflow: visible;
  background: #0d0d0d;
}

.dashboard-body-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.deployments-hero {
  position: relative;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.deployments-orbit {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 10% 0%, rgba(59, 130, 246, 0.35), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.3), transparent 50%);
  opacity: 0.4;
  pointer-events: none;
}

.deployments-core {
  position: relative;
  display: grid;
  gap: var(--space-2);
  max-width: 30rem;
}

.deployments-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.deployments-core h2 {
  font-size: 1.35rem;
}

.deployments-core p {
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.8);
}

.deployments-note {
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.9);
}

.deployments-grid {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

@media (min-width: 768px) {
  .deployments-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.deployments-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: var(--space-3);
  background: rgba(15, 23, 42, 0.9);
}

.deployments-card h3 {
  margin-bottom: var(--space-2);
}

.dashboard-footer {
  position: static;
}

.dashboard-footer .ui-footer {
  margin-top: 0;
}

.dashboard-alert-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.dashboard-alert {
  display: flex;
  gap: var(--space-2);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.dashboard-alert-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  align-self: center;
  background: var(--blue-400);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
}

.dashboard-alert.is-error .dashboard-alert-dot {
  background: #f87171;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.6);
}

.dashboard-alert.is-success .dashboard-alert-dot {
  background: #4ade80;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.5);
}

.dashboard-alert-text {
  font-size: 0.95rem;
}

.dashboard-metrics {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.metric-card {
  border-radius: var(--radius-xl);
  padding: var(--space-3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 14, 34, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 60px rgba(0, 0, 0, 0.35);
}

.metric-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.metric-value {
  font-size: 2.1rem;
  font-weight: 700;
}

.metric-meta {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.25rem;
}

.dashboard-panel {
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.dashboard-panel + .dashboard-panel {
  margin-top: var(--space-3);
}

.panel-header {
  padding: 0 0 var(--space-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.panel-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
}

.panel-body {
  padding: var(--space-3) 0;
}

.panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.toolbar-filters select,
.toolbar-filters .select {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
}

.server-table {
  width: 100%;
  border-collapse: collapse;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.server-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  color: rgba(255, 255, 255, 0.65);
  padding: 0.5rem 0.75rem;
}

.server-table td {
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.server-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.server-name {
  font-weight: 600;
}

.server-meta {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-status.is-running { color: #4ade80; border-color: rgba(74, 222, 128, 0.4); }
.badge-status.is-configuring { color: var(--blue-300); border-color: rgba(59, 130, 246, 0.4); }
.badge-status.is-deploying { color: var(--gold-400); border-color: rgba(234, 179, 8, 0.4); }
.badge-status.is-stopped { color: rgba(255, 255, 255, 0.7); }
.badge-status.is-failed { color: #f87171; border-color: rgba(248, 113, 113, 0.4); }
.badge-status.is-deleting { color: #fb923c; border-color: rgba(251, 146, 60, 0.4); }

.server-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.server-action-form {
  margin: 0;
}

.btn-compact {
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 999px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.55rem 0.85rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  font-family: var(--font-ui);
  transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
}

.form-checkbox {
  width: 1rem;
  height: 1rem;
}

.grid {
  display: grid;
  gap: var(--space-3);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.grid-span-2 {
  grid-column: span 2;
}

.align-end {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tab-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tab-buttons button {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.15s ease;
}

.tab-buttons button:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.tab-buttons button.is-active {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
  color: #e0f2fe;
}

.stash-builder {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.stash-row {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.02);
}

.errorlist {
  list-style: none;
  margin: 0 0 0.35rem;
  padding: 0;
  color: #fda4af;
  font-size: 0.8rem;
}

.errorlist li + li {
  margin-top: 0.15rem;
}

.form-field .errorlist,
.detail-table-value .errorlist {
  margin-top: 0;
}

.errorlist + .form-input,
.errorlist + .form-select,
.errorlist + textarea,
.errorlist + select {
  border-color: #f87171;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.25);
}

.form-input[disabled],
.form-select[disabled],
select.form-select:disabled,
textarea.form-input[disabled],
input.form-input[disabled] {
  background: rgba(26, 33, 54, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.55);
  cursor: not-allowed;
  box-shadow: none;
}

.detail-note {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid rgba(255, 255, 255, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
}

.detail-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.detail-card {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 18, 38, 0.9);
  padding: var(--space-3);
}

.detail-section-title {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 0.5rem;
}

.detail-key-value {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--space-2);
  font-size: 0.9rem;
}

.detail-key-value span {
  color: rgba(255, 255, 255, 0.65);
}

.detail-stack {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.detail-section-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.detail-table {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.01);
}

.detail-table li {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: var(--space-2);
  padding: 0.6rem 0.85rem;
  align-items: center;
}

.detail-table li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-table-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.detail-table-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  display: block;
}

.detail-table--code li {
  align-items: flex-start;
}

.detail-table--code .connection-block {
  margin: 0;
}

.detail-table--languages .detail-table-value {
  font-weight: 500;
}

.detail-table--form li {
  align-items: flex-start;
}

.detail-table--form .detail-table-value {
  width: 100%;
}

.detail-table--form .detail-table-value > * + * {
  margin-top: 0.35rem;
}

.language-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.language-download-field {
  width: 100%;
}

@media (max-width: 640px) {
  .detail-table li {
    grid-template-columns: 1fr;
  }
}

.detail-key-value--status {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
}

.detail-key-value--status > div {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
}

.connection-block {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.5rem;
}

.log-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.log-card {
  padding: var(--space-2);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.log-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.log-card p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.description-text {
  margin-top: var(--space-3);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72);
}

.realm-quick-list ul {
  list-style: none;
  padding: 0;
  margin-top: var(--space-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.realm-quick-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto auto;
  gap: var(--space-2);
  align-items: center;
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
}

.realm-quick-list li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.realm-quick-list li.is-disabled {
  opacity: 0.6;
}

.realm-mode-pill,
.realm-state-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
}

.realm-mode-pill.is-pvp {
  color: var(--gold-400);
  border-color: rgba(250, 204, 21, 0.35);
}

.realm-mode-pill.is-pve {
  color: var(--blue-200);
  border-color: rgba(96, 165, 250, 0.35);
}

.realm-state-pill.is-active {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
}

.realm-state-pill.is-inactive {
  color: rgba(255, 255, 255, 0.6);
  border-style: dashed;
}

@media (max-width: 640px) {
  .realm-quick-list li {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 0.35rem;
  }

  .realm-quick-list li span:nth-child(3),
  .realm-quick-list li span:nth-child(4) {
    justify-self: flex-start;
  }
}

.language-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.language-state.is-enabled {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.4);
}

.language-state.is-disabled {
  color: rgba(255, 255, 255, 0.6);
  border-style: dashed;
}

.language-link {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  word-break: break-all;
}

.language-link:hover {
  color: rgba(255, 255, 255, 0.72);
}

.sensitive-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.45rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
}

.stat-card {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 8, 15, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.stat-card p {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.35rem;
}

.stat-card h3 {
  font-size: 1.5rem;
  margin: 0;
  color: #f5f5f5;
}

.stat-card span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.stat-card.is-up span {
  color: #4ade80;
}

.stat-card.is-down span {
  color: #f87171;
}

.data-chart {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.data-chart__sparkline {
  position: relative;
  width: 100%;
  height: 88px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.data-chart__sparkline svg {
  width: 100%;
  height: 100%;
}

.data-chart__sparkline polyline {
  fill: none;
  stroke: var(--gold-400);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 12px rgba(250, 204, 21, 0.2));
}

.data-chart__legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.table-compact {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.table-compact th,
.table-compact td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.table-compact th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.table-compact tbody tr:last-child td {
  border-bottom: 0;
}

.form-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.form-card {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 19, 39, 0.86);
  padding: var(--space-3);
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-2);
}

.language-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: var(--space-2);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.language-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.language-card-name {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.dashboard-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 720px) {
  .topbar-right {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
.sidebar-collapsed .sidebar-panel__section-title {
  opacity: 0;
  max-height: 0;
  margin: 0;
}
.detail-table--compact li {
  padding: 0.45rem 0.75rem;
}

/* In-game control rows */
.ingame-action-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ingame-action-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ingame-action-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.ingame-action-desc {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--muted, rgba(255, 255, 255, 0.72));
}

.ingame-action-cta {
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .ingame-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ingame-action-cta {
    margin-top: var(--space-2);
  }
}
