/* NQ57 Dashboard — Common Styles */

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

:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --modal-z: 1000;
  --tooltip-z: 900;
  --transition-fast: 150ms ease;
  --transition-mid: 200ms ease;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.2);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }

/* Modal overlay */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: var(--modal-z);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition-mid);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-box {
  background: #fff; border-radius: var(--radius-lg);
  max-width: 900px; width: 95vw; max-height: 85vh;
  overflow-y: auto; padding: 24px;
  transform: scale(0.95);
  transition: transform var(--transition-mid);
}
.modal-overlay.active .modal-box { transform: scale(1); }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  cursor: pointer; font-size: 20px; opacity: 0.6;
}
.modal-close:hover { opacity: 1; }

/* Spinner */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Utilities */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.cursor-pointer { cursor: pointer; }

/* Back button (shared across all styles) */
.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-md);
  background: none; border: 1px solid currentColor;
  cursor: pointer; font-size: 14px; font-weight: 500;
  text-decoration: none; opacity: 0.7;
  transition: opacity var(--transition-fast);
}
.btn-back:hover { opacity: 1; }

/* Table base */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 10px 12px; font-weight: 600; border-bottom: 2px solid currentColor; }
.data-table td { padding: 8px 12px; border-bottom: 1px solid rgba(0,0,0,0.06); }
.data-table tr:hover td { background: rgba(0,0,0,0.02); }
