/* =============================================================================
   Material Design 3 — Custom CSS Framework
   Dark theme with surface tonal palette
   ============================================================================= */

/* =============================================================================
   Material Symbols Outlined — SELF-HOSTED (no Google Fonts dependency)
   The FireCube WebView doesn't load fonts.googleapis.com, so icons were
   showing as raw text ("dns", "chat", ...). Hosting the woff2 locally fixes it.
   ============================================================================= */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/MaterialSymbolsOutlined.woff2') format('woff2');
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* App Footer */
.app-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--md-outline-variant);
  font-size: 0.75rem;
  color: var(--md-on-surface-variant);
  text-align: center;
}

.app-footer__heart {
  color: var(--md-error);
  padding: 0 0.25em;
  font-size: 0.9em;
}

.app-footer a {
  color: var(--md-primary);
  text-decoration: none;
  font-weight: 500;
}

.app-footer a:hover {
  text-decoration: underline;
}

:root {
  /* MD3 Color Tokens - Dark Theme */
  --md-primary: #a8c7fa;
  --md-on-primary: #062e6f;
  --md-primary-container: #1b4a92;
  --md-on-primary-container: #d3e3fd;
  --md-secondary: #bec6dc;
  --md-on-secondary: #283141;
  --md-secondary-container: #3e4759;
  --md-on-secondary-container: #dae2f9;
  --md-tertiary: #d9bce3;
  --md-on-tertiary: #3d2847;
  --md-error: #f2b8b5;
  --md-on-error: #601410;
  --md-error-container: #8c1d18;
  --md-on-error-container: #f9dedc;
  --md-surface: #131318;
  --md-surface-dim: #131318;
  --md-surface-bright: #39393f;
  --md-surface-container-lowest: #0e0e13;
  --md-surface-container-low: #1b1b21;
  --md-surface-container: #1f1f25;
  --md-surface-container-high: #2a2a30;
  --md-surface-container-highest: #35353b;
  --md-on-surface: #e4e1e9;
  --md-on-surface-variant: #c7c5d0;
  --md-outline: #918f9a;
  --md-outline-variant: #46464f;
  --md-inverse-surface: #e4e1e9;
  --md-inverse-on-surface: #313036;
  --md-success: #a8d5a2;
  --md-warning: #ffd599;

  /* Shape */
  --md-radius-xs: 4px;
  --md-radius-sm: 8px;
  --md-radius-md: 12px;
  --md-radius-lg: 16px;
  --md-radius-xl: 28px;
  --md-radius-full: 9999px;

  /* Elevation */
  --md-elevation-1:
    0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
  --md-elevation-2:
    0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
  --md-elevation-3:
    0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.3);

  /* Typography */
  --md-font: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --md-nav-width: 280px;
  --md-nav-collapsed-width: 72px;
  --md-top-bar-height: 64px;
}

/* =============================================================================
   Reset & Base
   ============================================================================= */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
.md-body {
  font-family: var(--md-font);
  background: var(--md-surface);
  color: var(--md-on-surface);
  min-height: 100vh;
  display: flex;
  line-height: 1.5;
}

/* =============================================================================
   Navigation Drawer
   ============================================================================= */

.md-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--md-nav-width);
  height: 100vh;
  background: var(--md-surface-container-low);
  border-right: 1px solid var(--md-outline-variant);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
  overflow-y: auto;
}

.md-nav-drawer__header {
  padding: 1.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--md-outline-variant);
}

.md-nav-drawer__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--md-radius-md);
}

.md-nav-drawer__title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--md-on-surface-variant);
  text-align: center;
}

.md-nav-drawer__items {
  flex: 1;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.md-nav-drawer__footer {
  padding: 0.75rem;
  border-top: 1px solid var(--md-outline-variant);
}

.md-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--md-radius-full);
  text-decoration: none;
  color: var(--md-on-surface-variant);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition:
    background 0.2s,
    color 0.2s;
  cursor: pointer;
}

.md-nav-item:hover {
  background: rgba(168, 199, 250, 0.08);
  color: var(--md-on-surface);
}

.md-nav-item--active {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
}

.md-nav-item--active:hover {
  background: var(--md-secondary-container);
}

.md-nav-divider {
  height: 1px;
  background: var(--md-outline-variant);
  margin: 0.5rem 1rem;
}

/* =============================================================================
   Main Content
   ============================================================================= */

.md-main {
  flex: 1;
  margin-left: var(--md-nav-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.2, 0, 0, 1);
}

/* =============================================================================
   Top App Bar
   ============================================================================= */

.md-top-app-bar {
  position: sticky;
  top: 0;
  height: var(--md-top-bar-height);
  background: var(--md-surface-container);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.5rem;
  z-index: 50;
  border-bottom: 1px solid var(--md-outline-variant);
}

.md-top-app-bar__title {
  font-size: 1.375rem;
  font-weight: 400;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.md-top-app-bar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.md-top-app-bar__user {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--md-on-surface-variant);
}

/* =============================================================================
   Content Area
   ============================================================================= */

.md-content {
  flex: 1;
  padding: 1.5rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* =============================================================================
   Cards
   ============================================================================= */

.md-card {
  background: var(--md-surface-container);
  border-radius: var(--md-radius-lg);
  overflow: hidden;
}

.md-card--elevated {
  box-shadow: var(--md-elevation-1);
}

.md-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--md-outline-variant);
  flex-wrap: wrap;
}

.md-card__header-icon {
  color: var(--md-primary);
  font-size: 24px;
}

.md-card__title {
  font-size: 1.25rem;
  font-weight: 500;
  flex: 1;
}

.md-card__header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.md-card__content {
  padding: 1.5rem;
}

.md-card__content--table {
  padding: 0;
}

.md-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 1.5rem;
}

/* =============================================================================
   Buttons
   ============================================================================= */

.md-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--md-radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--md-font);
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    opacity 0.2s;
  white-space: nowrap;
  line-height: 1.4;
}

.md-button .material-symbols-outlined {
  font-size: 18px;
}

.md-button--filled {
  background: var(--md-primary);
  color: var(--md-on-primary);
}

.md-button--filled:hover {
  box-shadow: var(--md-elevation-1);
  opacity: 0.92;
}

.md-button--filled-tonal {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
}

.md-button--filled-tonal:hover {
  box-shadow: var(--md-elevation-1);
  opacity: 0.92;
}

.md-button--outlined {
  background: transparent;
  border: 1px solid var(--md-outline);
  color: var(--md-primary);
}

.md-button--outlined:hover {
  background: rgba(168, 199, 250, 0.08);
}

.md-button--text {
  background: transparent;
  color: var(--md-primary);
  padding: 0.625rem 0.75rem;
}

.md-button--text:hover {
  background: rgba(168, 199, 250, 0.08);
}

.md-button--error {
  color: var(--md-error);
}

.md-button--filled.md-button--error {
  background: var(--md-error);
  color: var(--md-on-error);
}

.md-button--outlined.md-button--error {
  border-color: var(--md-error);
  color: var(--md-error);
}

.md-button--full-width {
  width: 100%;
  justify-content: center;
}

/* =============================================================================
   Icon Buttons
   ============================================================================= */

.md-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--md-radius-full);
  background: transparent;
  border: none;
  color: var(--md-on-surface-variant);
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.md-icon-button:hover {
  background: rgba(228, 225, 233, 0.08);
}

.md-icon-button--error {
  color: var(--md-error);
}

.md-icon-button--error:hover {
  background: rgba(242, 184, 181, 0.08);
}

/* =============================================================================
   Text Fields
   ============================================================================= */

.md-text-field {
  position: relative;
  margin-bottom: 1.25rem;
}

.md-text-field__input {
  width: 100%;
  padding: 1rem 1rem 0.75rem;
  background: var(--md-surface-container-highest);
  border: none;
  border-radius: var(--md-radius-xs) var(--md-radius-xs) 0 0;
  color: var(--md-on-surface);
  font-size: 1rem;
  font-family: var(--md-font);
  line-height: 1.5;
  outline: none;
  transition: background 0.2s;
}

.md-text-field--outlined .md-text-field__input {
  background: transparent;
  border: 1px solid var(--md-outline);
  border-radius: var(--md-radius-xs);
  padding: 1rem;
}

.md-text-field--outlined .md-text-field__input:focus {
  border-color: var(--md-primary);
  border-width: 2px;
  padding: calc(1rem - 1px);
}

.md-text-field__textarea {
  resize: vertical;
  min-height: 120px;
}

.md-text-field__label {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--md-on-surface-variant);
  font-size: 1rem;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  pointer-events: none;
  background: transparent;
}

.md-text-field--textarea .md-text-field__label {
  top: 1rem;
  transform: none;
}

.md-text-field__input:focus ~ .md-text-field__label,
.md-text-field__input:not(:placeholder-shown) ~ .md-text-field__label {
  top: 0.25rem;
  transform: none;
  font-size: 0.75rem;
  color: var(--md-primary);
}

.md-text-field--outlined .md-text-field__input:focus ~ .md-text-field__label,
.md-text-field--outlined
  .md-text-field__input:not(:placeholder-shown)
  ~ .md-text-field__label {
  top: -0.5rem;
  left: 0.75rem;
  padding: 0 0.25rem;
  background: var(--md-surface-container);
}

.md-text-field__indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--md-primary);
  transform: scaleX(0);
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.md-text-field__input:focus ~ .md-text-field__indicator {
  transform: scaleX(1);
}

.md-text-field--outlined .md-text-field__indicator {
  display: none;
}

.md-text-field__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--md-on-surface-variant);
  font-size: 20px;
}

.md-text-field:has(.md-text-field__icon) .md-text-field__input {
  padding-left: 2.75rem;
}

.md-text-field:has(.md-text-field__icon) .md-text-field__label {
  left: 2.75rem;
}

.md-text-field__toggle {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
}

/* =============================================================================
   Tables
   ============================================================================= */

.md-table-container {
  overflow-x: auto;
}

.md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.md-table thead {
  border-bottom: 1px solid var(--md-outline-variant);
}

.md-table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 500;
  color: var(--md-on-surface-variant);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.md-table td {
  padding: 0.875rem 1rem;
  color: var(--md-on-surface);
  border-bottom: 1px solid var(--md-surface-container-highest);
  vertical-align: middle;
}

.md-table tbody tr:hover {
  background: rgba(228, 225, 233, 0.04);
}

.md-table__actions-col {
  width: 120px;
  text-align: center;
}

.md-table__actions {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
}

.md-table__mono {
  font-family: "Roboto Mono", monospace;
  font-size: 0.8125rem;
}

/* =============================================================================
   Chips
   ============================================================================= */

.md-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--md-radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--md-surface-container-highest);
  color: var(--md-on-surface-variant);
}

.md-chip .material-symbols-outlined {
  font-size: 16px;
}

.md-chip--small {
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
}

.md-chip--primary {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}

.md-chip--success {
  background: rgba(168, 213, 162, 0.15);
  color: var(--md-success);
}

.md-chip--warning {
  background: rgba(255, 213, 153, 0.15);
  color: var(--md-warning);
}

.md-chip--info {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}

.md-chip--error {
  background: var(--md-error-container);
  color: var(--md-on-error-container);
}

/* =============================================================================
   Analytics Dashboard
   ============================================================================= */

.md-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.md-stat-card {
  padding: 1.5rem;
}

.md-stat-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.md-stat-card__label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--md-on-surface-variant);
}

.md-stat-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--md-radius-full);
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}

.md-stat-card__value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--md-primary);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.md-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .md-analytics-grid {
    grid-template-columns: 1fr;
  }
}

.md-client-map {
  width: 100%;
  height: 320px;
  border-radius: var(--md-radius-md);
  overflow: hidden;
  background: var(--md-surface-container-highest);
}

.md-client-map .leaflet-tile-pane {
  filter: saturate(0.85) brightness(0.9);
}

.md-country-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.md-country-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--md-outline-variant);
}

.md-country-list__item:last-child {
  border-bottom: none;
}

.md-country-list__count {
  font-weight: 600;
  color: var(--md-on-surface);
}

.md-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.md-bar-chart__row {
  display: grid;
  grid-template-columns: minmax(80px, 160px) 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

.md-bar-chart__label {
  font-size: 0.8125rem;
  color: var(--md-on-surface-variant);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.md-bar-chart__track {
  height: 20px;
  border-radius: var(--md-radius-full);
  background: var(--md-surface-container-highest);
  overflow: hidden;
}

.md-bar-chart__fill {
  height: 100%;
  min-width: 4px;
  border-radius: var(--md-radius-full);
  background: var(--md-primary);
  transition: width 0.3s ease;
}

.md-bar-chart__value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--md-on-surface);
  text-align: right;
  min-width: 2.5rem;
}

/* =============================================================================
   Alerts
   ============================================================================= */

.md-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--md-radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.md-alert .material-symbols-outlined {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.md-alert--error {
  background: var(--md-error-container);
  color: var(--md-on-error-container);
}

.md-alert--warning {
  background: rgba(255, 213, 153, 0.12);
  color: var(--md-warning);
  border: 1px solid rgba(255, 213, 153, 0.3);
}

.md-alert--success {
  background: rgba(168, 213, 162, 0.12);
  color: var(--md-success);
  border: 1px solid rgba(168, 213, 162, 0.3);
}

.md-alert--info {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}

/* =============================================================================
   Dialog
   ============================================================================= */

.md-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--md-surface-container-high);
  border-radius: var(--md-radius-xl);
  padding: 1.5rem;
  min-width: 320px;
  max-width: 90vw;
  z-index: 1000;
  border: none;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  box-shadow: var(--md-elevation-3);
}

.md-dialog[open] {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.md-dialog__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.md-dialog__icon {
  color: var(--md-error);
  font-size: 28px;
}

.md-dialog__title {
  font-size: 1.25rem;
  font-weight: 500;
  text-align: center;
}

.md-dialog__content {
  color: var(--md-on-surface-variant);
  font-size: 0.875rem;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.md-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.md-dialog__scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.md-dialog__scrim.active {
  opacity: 1;
  pointer-events: auto;
}

/* =============================================================================
   Snackbar
   ============================================================================= */

#snackbarContainer {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.md-snackbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--md-inverse-surface);
  color: var(--md-inverse-on-surface);
  border-radius: var(--md-radius-xs);
  font-size: 0.875rem;
  box-shadow: var(--md-elevation-3);
  animation: snackbarIn 0.3s cubic-bezier(0.2, 0, 0, 1);
  max-width: 90vw;
}

.md-snackbar--success {
  background: #2e4a2e;
  color: var(--md-success);
}

.md-snackbar--error {
  background: var(--md-error-container);
  color: var(--md-on-error-container);
}

@keyframes snackbarIn {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes snackbarOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(1rem);
  }
}

/* =============================================================================
   Empty State
   ============================================================================= */

.md-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 1.5rem;
  text-align: center;
}

.md-empty-state__icon {
  font-size: 48px;
  color: var(--md-outline);
}

.md-empty-state__text {
  color: var(--md-on-surface-variant);
  font-size: 0.875rem;
}

/* =============================================================================
   Divider with text
   ============================================================================= */

.md-divider-text {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--md-on-surface-variant);
  font-size: 0.8125rem;
}

.md-divider-text::before,
.md-divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--md-outline-variant);
}

/* =============================================================================
   Helper text
   ============================================================================= */

.md-helper-text {
  font-size: 0.8125rem;
  color: var(--md-on-surface-variant);
  margin-top: 0.25rem;
}

.md-helper-text--inline {
  margin-top: 0;
  margin-left: 0.25rem;
}

.md-helper-text--warning {
  color: var(--md-warning);
}

.md-helper-text--error {
  color: var(--md-error);
}

/* =============================================================================
   Info Grid — label/value pairs for read-only detail views (e.g. license
   status). Mirrors the visual weight of md-stat-card without the large
   numeral, for facts that are informational rather than a headline metric.
   ============================================================================= */

.md-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  padding: 1rem 0 1.5rem;
}

.md-info-grid__item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.md-info-grid__label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--md-on-surface-variant);
}

.md-info-grid__value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--md-on-surface);
}

/* =============================================================================
   Chip Group — wrapping row of chips (e.g. licensed features)
   ============================================================================= */

.md-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
}

/* =============================================================================
   Links
   ============================================================================= */

.md-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--md-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.md-link:hover {
  opacity: 0.8;
}

.md-link .material-symbols-outlined {
  font-size: 18px;
}

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 1024px) {
  .md-nav-drawer {
    transform: translateX(-100%);
  }

  .md-nav-drawer.open {
    transform: translateX(0);
    box-shadow: var(--md-elevation-3);
  }

  .md-main {
    margin-left: 0;
  }

  .md-top-app-bar__title {
    font-size: 1.125rem;
  }

  .md-button__label {
    display: none;
  }

  .md-button .material-symbols-outlined {
    margin: 0;
  }

  .md-button--full-width .md-button__label {
    display: inline;
  }
}

@media (min-width: 1025px) {
  #menuToggle {
    display: none;
  }
}

@media (max-width: 600px) {
  .md-content {
    padding: 1rem;
  }

  .md-card__header {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .md-table {
    font-size: 0.8125rem;
  }

  .md-table th,
  .md-table td {
    padding: 0.625rem 0.5rem;
  }
}
