/* Canonical UI tables and list panels */

.table-wrap {
  border-radius: 18px;
  border-color: rgba(148, 163, 184, 0.12);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.02), transparent 24%),
    linear-gradient(180deg, rgba(10, 16, 28, 0.92), rgba(7, 12, 21, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 18px 32px rgba(2, 6, 23, 0.14);
}

thead th {
  color: rgba(191, 219, 254, 0.76);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.table-action-link {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .01em;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.list-card {
  padding: 14px 16px;
  border-radius: 18px;
  border-color: rgba(148, 163, 184, 0.1);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.02), transparent 22%),
    linear-gradient(180deg, rgba(11, 17, 29, 0.86), rgba(8, 13, 22, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 14px 26px rgba(2, 6, 23, 0.12);
}

.list-card strong {
  color: #f8fafc;
  letter-spacing: -.01em;
}

.list-card span {
  color: rgba(191, 219, 254, 0.68);
}

.list-card--account,
.list-card--camera {
  gap: 7px;
}

.list-card--account strong,
.list-card--camera strong {
  font-size: 14px;
  line-height: 1.25;
}

.diagnostic-log-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.04), transparent 28%),
    rgba(255, 255, 255, 0.028);
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 16px 30px rgba(2, 6, 23, 0.14);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.diagnostic-log-card[open] {
  border-color: rgba(214, 187, 24, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(214, 187, 24, 0.08),
    0 22px 36px rgba(2, 6, 23, 0.18);
}

.diagnostic-log-card:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 187, 24, 0.16);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 22px 38px rgba(2, 6, 23, 0.2);
}

.diagnostic-log-card__actions .table-action-link {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.events-filter-panel .filters-grid {
  margin-top: 4px;
}

.events-stat-grid .stat-card {
  min-height: 124px;
}

.stat-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.02), transparent 28%),
    linear-gradient(180deg, rgba(12, 18, 31, 0.94), rgba(8, 13, 24, 0.98));
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.18);
  color: inherit;
}

.stat-card::before {
  background: linear-gradient(180deg, var(--brand), rgba(214, 187, 24, 0)) !important;
  opacity: .9;
}

.stat-label {
  color: var(--muted);
}

.stat-note {
  color: var(--muted);
}

.events-results-panel .panel-header {
  margin-bottom: 18px;
}

.events-results-panel .button-row {
  row-gap: 10px;
  column-gap: 10px;
}

.events-results-panel .table-wrap {
  margin-top: 2px;
}

.events-results-panel td strong {
  font-size: 14px;
  line-height: 1.35;
}

.events-results-panel .table-subtext {
  line-height: 1.5;
}

@media (max-width: 760px) {
  .table-wrap {
    border-radius: 16px;
  }

  .list-card {
    padding: 12px 13px;
    border-radius: 16px;
  }

  .events-filter-panel .filters-actions,
  .events-results-panel .panel-header.between .button-row {
    width: 100%;
    justify-content: flex-start;
  }

  .events-results-panel .button-row > * {
    flex: 1 1 100%;
  }
}

@media (max-width: 560px) {
  .table-action-link {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 11px;
  }

  .diagnostic-log-card__actions.button-row,
  .events-results-panel .button-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .events-stat-grid .stat-card {
    min-height: 0;
  }

  .events-results-panel td strong {
    font-size: 13px;
  }
}

@media (max-width: 760px) {
  .table-wrap {
    border-radius: 14px;
  }

  .list-card {
    padding: 10px 11px;
    border-radius: 14px;
  }

  .list-card--account,
  .list-card--camera {
    gap: 5px;
  }

  .list-card--account strong,
  .list-card--camera strong {
    font-size: 13px;
  }

  .table-action-link {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 10px;
  }

  .events-results-panel .panel-header {
    margin-bottom: 10px;
  }
}

body[data-theme-mode="light"][data-user-theme="true"] .table-wrap {
  border-color: var(--ui-surface-card-border, rgba(15, 23, 42, 0.1));
  background:
    radial-gradient(circle at top left, rgba(var(--user-theme-accent-rgb, 56, 189, 248), 0.05), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(var(--user-theme-panel-rgb, 244, 247, 251), 0.94));
  box-shadow: var(--ui-surface-card-shadow, 0 18px 32px rgba(15, 23, 42, 0.08));
}

body[data-theme-mode="light"][data-user-theme="true"] thead th {
  color: var(--ui-text-subtle, rgba(51, 65, 85, 0.78));
}

body[data-theme-mode="light"][data-user-theme="true"] .list-card {
  border-color: var(--ui-surface-card-border, rgba(15, 23, 42, 0.1));
  background: var(--ui-surface-soft-bg, rgba(255, 255, 255, 0.82));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.68),
    0 12px 24px rgba(15, 23, 42, 0.08);
}

body[data-theme-mode="light"][data-user-theme="true"] .list-card strong {
  color: var(--ui-text-strong, #0f172a);
}

body[data-theme-mode="light"][data-user-theme="true"] .list-card span {
  color: var(--ui-text-muted, rgba(15, 23, 42, 0.68));
}

body[data-theme-mode="light"][data-user-theme="true"] .stat-card {
  border-color: var(--ui-surface-card-border, rgba(15, 23, 42, 0.1));
  background:
    radial-gradient(circle at top left, rgba(var(--user-theme-accent-rgb, 56, 189, 248), 0.06), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(var(--user-theme-panel-rgb, 244, 247, 251), 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 14px 30px rgba(15, 23, 42, 0.08);
}

body[data-theme-mode="light"][data-user-theme="true"] .stat-card--neutral {
  background:
    radial-gradient(circle at top left, rgba(148, 163, 184, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.94));
}

body[data-theme-mode="light"][data-user-theme="true"] .stat-card--info {
  background:
    radial-gradient(circle at top left, rgba(var(--user-theme-accent-rgb, 56, 189, 248), 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(239, 246, 255, 0.96));
}

body[data-theme-mode="light"][data-user-theme="true"] .stat-card--success {
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(240, 253, 244, 0.96));
}

body[data-theme-mode="light"][data-user-theme="true"] .stat-card--warning {
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 251, 235, 0.96));
}

body[data-theme-mode="light"][data-user-theme="true"] .stat-card::before {
  opacity: 0.42;
}

body[data-theme-mode="light"][data-user-theme="true"] .stat-value,
body[data-theme-mode="light"][data-user-theme="true"] .stat-card strong {
  color: var(--ui-text-strong, #0f172a);
}

body[data-theme-mode="light"][data-user-theme="true"] .stat-label,
body[data-theme-mode="light"][data-user-theme="true"] .stat-note {
  color: var(--ui-text-subtle, rgba(51, 65, 85, 0.78));
}
