/* ═══════════════════════════════════════════════════════════
   PathSaaS 2.0 — Lab Management UI Stylesheet
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  --primary:       #1a5276;
  --primary-light: #2980b9;
  --primary-dark:  #0e3650;
  --accent:        #27ae60;
  --accent-light:  #2ecc71;
  --danger:        #e74c3c;
  --danger-light:  #ff6b6b;
  --warning:       #f39c12;
  --warning-light: #f1c40f;
  --info:          #3498db;

  --bg:            #f0f4f8;
  --bg-card:       #ffffff;
  --bg-sidebar:    #0e2a3d;
  --bg-header:     #ffffff;
  --bg-input:      #f7f9fc;

  --text:          #2c3e50;
  --text-light:    #7f8c8d;
  --text-muted:    #95a5a6;
  --text-sidebar:  #b0c4d8;
  --text-white:    #ffffff;

  --border:        #dce4ec;
  --border-light:  #e8eef3;

  --radius:        8px;
  --radius-sm:     4px;
  --radius-lg:     12px;

  --shadow:        0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:     0 8px 24px rgba(0,0,0,0.12);

  --sidebar-width: 240px;
  --header-height: 60px;

  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Utility ────────────────────────────────────────────── */
.hidden    { display: none !important; }
.flex      { display: flex; }
.flex-col  { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1  { gap: 4px; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.gap-6  { gap: 24px; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-sm  { font-size: 0.85rem; }
.text-xs  { font-size: 0.75rem; }
.text-lg  { font-size: 1.15rem; }
.text-xl  { font-size: 1.4rem; }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent); }
.text-warning { color: var(--warning); }
.text-success { color: var(--accent); }
.ml-2 { margin-left: 8px; }
.flex-wrap { flex-wrap: wrap; }
.font-bold { font-weight: 600; }
.font-mono { font-family: var(--font-mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.ml-auto { margin-left: auto; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.cursor-pointer { cursor: pointer; }

/* ── LOGIN PAGE ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 400px;
  max-width: 95vw;
}
.login-card .logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-card .logo h1 {
  font-size: 1.6rem;
  color: var(--primary);
  font-weight: 700;
}
.login-card .logo p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}
.login-card .error-msg {
  background: #ffeaea;
  color: var(--danger);
  border: 1px solid #ffc9c9;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

/* ── APP SHELL ──────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: var(--text-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 20px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand h2 {
  font-size: 1.2rem;
  color: var(--text-white);
  font-weight: 700;
}
.sidebar-brand small {
  font-size: 0.7rem;
  color: var(--text-sidebar);
  opacity: 0.6;
}
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}
.nav-section {
  padding: 0 12px;
  margin-bottom: 8px;
}
.nav-section-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(176,196,216,0.5);
  padding: 8px 12px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.9rem;
  color: var(--text-sidebar);
  margin-bottom: 2px;
}
.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-white);
}
.nav-item.active {
  background: var(--primary-light);
  color: var(--text-white);
  font-weight: 600;
}
.nav-item .icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}
.sidebar-user .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #fff;
  font-weight: 600;
  flex-shrink: 0;
}

/* ── MAIN CONTENT ───────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-light);
  padding: 0 28px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}
.page-header h1 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.page-body {
  padding: 24px 28px;
  flex: 1;
}

/* ── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}
.card-body {
  padding: 18px;
}
.card-body.no-pad { padding: 0; }

/* ── STAT CARDS ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-icon.blue    { background: #e8f4fd; color: var(--info); }
.stat-icon.green   { background: #e8f8ef; color: var(--accent); }
.stat-icon.orange  { background: #fef3e2; color: var(--warning); }
.stat-icon.red     { background: #fde8e8; color: var(--danger); }
.stat-icon.purple  { background: #f0e6f6; color: #8e44ad; }
.stat-card .stat-info h4 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}
.stat-card .stat-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── TABLES ─────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
table thead th {
  background: var(--bg);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  vertical-align: middle;
}
table tbody tr:hover {
  background: #f7fafd;
}
table tbody tr.clickable { cursor: pointer; }

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-green   { background: #e8f8ef; color: #1a7a4c; }
.badge-blue    { background: #e8f4fd; color: #1a6fb5; }
.badge-orange  { background: #fef3e2; color: #b37400; }
.badge-red     { background: #fde8e8; color: #c0392b; }
.badge-yellow  { background: #fef9e7; color: #b37400; }
.badge-gray    { background: #f0f0f0; color: #666; }
.badge-purple  { background: #f0e6f6; color: #7b2d8e; }

/* ── FORMS ──────────────────────────────────────────────── */
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="search"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-input);
  transition: border-color 0.15s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(41,128,185,0.12);
}
input::placeholder { color: var(--text-muted); }
textarea { resize: vertical; min-height: 60px; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-light);
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover:not(:disabled) {
  background: var(--accent-light);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover:not(:disabled) {
  background: var(--danger-light);
}
.btn-success {
  background: var(--accent);
  color: #fff;
}
.btn-success:hover:not(:disabled) {
  background: var(--accent-light);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--primary-light);
  color: var(--primary);
}
.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}
.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}
.btn-block {
  width: 100%;
}

/* ── TOOLBAR ────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-box {
  position: relative;
  flex: 1;
  max-width: 360px;
}
.search-box input {
  padding-left: 34px;
}
.search-box .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Reserve space for the fixed sidebar so the modal centers inside the
     visible content area instead of straddling/overlapping the menu. */
  padding: 20px 20px 20px calc(var(--sidebar-width) + 20px);
}
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 720px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-lg { width: 1100px; }
.modal-xl { width: 1320px; }
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}
.modal-close:hover { color: var(--text); }
.modal-body {
  padding: 22px;
}
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── TOAST NOTIFICATIONS ────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.25s ease;
  min-width: 280px;
  max-width: 420px;
}
.toast-success { background: #e8f8ef; color: #1a7a4c; border-left: 4px solid var(--accent); }
.toast-error   { background: #fde8e8; color: #c0392b; border-left: 4px solid var(--danger); }
.toast-info    { background: #e8f4fd; color: #1a6fb5; border-left: 4px solid var(--info); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.empty-state p {
  font-size: 0.9rem;
}

/* ── LOADING SPINNER ────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }

@keyframes spin { to { transform: rotate(360deg); } }

.loading-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 10px;
  color: var(--text-muted);
}

/* ── DETAIL PANELS ──────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}
.detail-item {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}
.detail-item .label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}
.detail-item .value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin-top: 1px;
}

/* ── RESULT FLAGS ───────────────────────────────────────── */
.flag-normal   { color: var(--accent); }
.flag-low      { color: var(--warning); }
.flag-high     { color: var(--warning); }
.flag-critical { color: var(--danger); font-weight: 700; }

/* ── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  /* Sidebar hidden on mobile -> drop the reserved left padding. */
  .modal-overlay { padding: 20px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* ── QUICK ACTION BUTTONS ───────────────────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.quick-action:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.quick-action .qa-icon {
  font-size: 1.6rem;
}
.quick-action .qa-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

/* ── TABS ───────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 16px;
  gap: 0;
}
.tab {
  padding: 10px 18px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ── ORDER WIZARD STEPS ─────────────────────────────────── */
.steps {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}
.step-indicator {
  flex: 1;
  text-align: center;
  padding: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-muted);
}
.step-indicator.active {
  background: var(--primary);
  color: #fff;
}
.step-indicator.done {
  background: #e8f8ef;
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════
   PLATFORM ADMIN — Scoped styles
   ═══════════════════════════════════════════════════════════ */

[x-cloak] { display: none !important; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* Summary strip — 4 large metric cards */
.platform-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.platform-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fadeInUp 0.4s ease both;
}
.platform-metric-card:nth-child(2) { animation-delay: 0.07s; }
.platform-metric-card:nth-child(3) { animation-delay: 0.14s; }
.platform-metric-card:nth-child(4) { animation-delay: 0.21s; }
.platform-metric-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.platform-metric-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.platform-metric-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.platform-metric-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* Status pill strip */
.platform-status-strip {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
  animation: fadeIn 0.5s ease both; animation-delay: 0.25s;
}
.platform-status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 600;
  border: 1px solid var(--border-light); background: var(--bg-card);
  transition: transform 0.15s ease;
}
.platform-status-pill:hover { transform: scale(1.05); }
.platform-status-pill .pill-count { font-weight: 700; font-size: 0.9rem; }

/* Collapsible section */
.platform-collapsible-header {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; padding: 14px 18px;
  background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius);
  transition: background 0.15s ease; user-select: none;
}
.platform-collapsible-header:hover { background: var(--bg); }
.platform-collapsible-chevron {
  transition: transform 0.25s ease; font-size: 0.8rem; color: var(--text-muted);
}
.platform-collapsible-chevron.open { transform: rotate(180deg); }

/* Sortable column headers */
.platform-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.platform-sortable:hover { color: var(--primary); }
.platform-sort-icon { margin-left: 4px; font-size: 0.7rem; opacity: 0.4; transition: opacity 0.15s; }
.platform-sort-icon.active { opacity: 1; color: var(--primary); }

/* Pagination */
.platform-pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; border-top: 1px solid var(--border-light);
  font-size: 0.82rem; color: var(--text-muted);
}
.platform-pagination-buttons { display: flex; gap: 4px; }
.platform-pagination-buttons button {
  padding: 5px 11px; border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  background: var(--bg-card); cursor: pointer; font-size: 0.8rem; transition: all 0.15s;
}
.platform-pagination-buttons button:hover:not(:disabled) { border-color: var(--primary-light); color: var(--primary); }
.platform-pagination-buttons button:disabled { opacity: 0.4; cursor: not-allowed; }
.platform-pagination-buttons button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Copy button */
.platform-copy-btn {
  background: none; border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  padding: 2px 6px; cursor: pointer; font-size: 0.7rem; color: var(--text-muted);
  margin-left: 4px; transition: all 0.15s;
}
.platform-copy-btn:hover { border-color: var(--primary-light); color: var(--primary); }

/* Card hover lift */
.platform-card-hover { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.platform-card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Tab enter animation */
.platform-tab-enter { animation: fadeInUp 0.3s ease both; }

/* Expand row */
.platform-expand-row td { padding: 0 !important; border: none !important; }
.platform-expand-content { background: var(--bg); padding: 16px 24px; border-bottom: 1px solid var(--border-light); }

/* ── Priority & Critical Row Highlighting ─────────────── */
.priority-urgent { background: #fffbf0 !important; border-left: 4px solid var(--warning) !important; }
.priority-urgent:hover { background: #fff3d6 !important; }
.priority-stat { background: #fff0f0 !important; border-left: 4px solid var(--danger) !important; }
.priority-stat:hover { background: #ffe0e0 !important; }
.critical-row { background: #fff5f5 !important; border-left: 4px solid var(--danger) !important; }
.critical-row:hover { background: #ffe0e0 !important; }
.critical-badge {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--danger); color: #fff; font-size: 0.7rem; font-weight: 700;
  padding: 2px 7px; border-radius: 10px; text-transform: uppercase;
  animation: criticalPulse 2s ease-in-out infinite;
}
@keyframes criticalPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.critical-stat-card {
  border: 2px solid var(--danger) !important;
  background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%) !important;
}
.critical-stat-card .stat-icon { background: var(--danger) !important; }

/* Responsive */
@media (max-width: 768px) {
  .platform-summary-strip { grid-template-columns: 1fr 1fr; }
  .platform-status-strip { justify-content: center; }
}

