/* ===== Design Tokens ===== */
:root{
  /* brand */
  --brand: #2563eb;         /* primary */
  --brand-600: #1d4ed8;
  --brand-700: #1e40af;

  /* neutrals */
  --bg: #0b0e14;            /* page background (dark mode elegant) */
  --panel: #11151e;         /* card surface */
  --muted: #64748b;         /* secondary text */
  --text: #e5e7eb;          /* primary text */
  --line: #1f2937;          /* borders/dividers */

  /* accents / states */
  --ok: #22c55e;
  --ok-600: #1d9f4b;
  --warn: #f59e0b;
  --bad: #ef4444;
  --bad-600: #d03d3d;

  /* radii, spacing, shadows */
  --radius: 14px;
  --radius-sm: 10px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 24px;
  --shadow-1: 0 6px 18px rgba(0,0,0,.25);
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}


a { text-decoration: none; color: white;}
a:hover { color: white; text-decoration: none;}


.container { margin: 0 auto; padding: var(--space-4); }

/* ===== Layout / Header ===== */
.app-header {
  display: flex;
  /*grid-template-columns: 2fr 3fr;*/
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.app-user-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  color: var(--muted);
  font-size: 12px;
  padding-right: 14px;
}


.brand {
  display: flex; gap: var(--space-2); align-items: center;
}
/*.brand .logo {*/
/*  width: 36px; height: 36px; border-radius: 8px;*/
/*  background: linear-gradient(135deg, var(--brand), var(--brand-700));*/
/*  box-shadow: var(--shadow-1);*/
/*}*/
.brand .logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  box-shadow: var(--shadow-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system;
  font-weight: 600;
  font-style: italic;
  font-size: 30px;
  color: white;
  letter-spacing: -1.5px;
  line-height: 1;
  padding-bottom: 2px;  /* Compensate for vertical offset */
  padding-right: 2px;   /* Compensate for italic slant pushing right */
}

.brand .logo::after {
  content: 'Tt';
}
.brand h1 { font-size: 20px; margin: 0; letter-spacing: .2px; }

/* ===== Card / Panel ===== */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

/* ===== Toolbar ===== */
.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
  padding: var(--space-3);
  border-bottom: 1px solid var(--line);
}
.input {
  width: 100%;
  background: #0d121a;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.2); }

.btn {
  background: var(--brand);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
}
.btn:hover { background: var(--brand-600); }

.btn-icon{
    font-size: 16px;
    padding: 6px 8px;
}

.icon-grey {
    color: var(--muted)
}
.icon-grey:hover {
    color: var(--text)
}

#btn-i { background: #0f1419; }
#btn-i:hover { background: var(--brand);}

#btn-warn-i { background: #0f1419;}
#btn-warn-i:hover { background: #f3bd00;}

#btn-ok-i { background: #0f1419;}
#btn-ok-i:hover { background: var(--ok);}

#btn-delete-i { background: #0f1419;}
#btn-delete-i:hover { background: var(--bad);}

#btn-delete { background: var(--bad);}
#btn-delete:hover { background: var(--bad-600);}

#btn-ok { background: var(--ok);}
#btn-ok:hover { background: var(--ok-600);}

/* ===== Table ===== */
.table-wrap { overflow: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
}
.table thead th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .2px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--panel);
}
.table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.table tr:hover td { background: #0f141d; }

/* ===== Badges / Status ===== */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  color: var(--text);
  background: #0e131b;
}
.badge.ok   { border-color: rgba(34,197,94,.4); color: #86efac; }
.badge.warn { border-color: rgba(245,158,11,.4); color: #facc15; }
.badge.bad  { border-color: rgba(239,68,68,.4); color: #fca5a5; }

/* ===== Utilities ===== */
.flex { display: flex; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.center { align-items: center; }
.muted { color: var(--muted); }
.right { text-align: right; }
.small { font-size: 12px; }

.page-title {
  margin-bottom: 1rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.kpi-box {
  padding: 1.5rem;
  border-radius: 12px;
  color: white;
  text-align: center;
  font-size: 1.2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  min-width: 0; max-width: 100%;
}

.kpi-box h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: normal;
  opacity: 0.85;
}

.kpi-blue   { background: linear-gradient(135deg, #4a90e2, #357ABD); }
.kpi-green  { background: linear-gradient(135deg, #50C878, #3DA164); }
.kpi-orange { background: linear-gradient(135deg, #FF9500, #E07A00); }
.kpi-purple { background: linear-gradient(135deg, #9B59B6, #7D3C98); }

.kpi-box span {
  font-size: 2rem;
  font-weight: bold;
}

.kpi-box {
  display: block;           /* makes <a> behave like a block card */
  text-decoration: none;    /* remove underline */
  padding: 1.5rem;
  border-radius: 12px;
  color: white;
  text-align: center;
  font-size: 1.2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  color: white;             /* keep text color fixed */
  background: rgba(255,255,255,0.15);
}

/* parent KPI box */
.kpi-value {
  font-size: 2.2rem;
  font-weight: 800;
  margin: .35rem 0 .6rem 0;
}

/* subgrid for mini boxes */
.kpi-subgrid {
  display: grid;
  /*grid-template-columns: repeat(2, 1fr);*/
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}

/* mini boxes */
.mini-box {
  display: grid;
  grid-template-rows: auto auto;
  gap: .25rem;
  text-decoration: none;
  padding: .6rem .75rem;
  border-radius: 10px;
  background: rgba(0,0,0,.15);
  color: white;           /* keep text white for anchors */
  border: 1px solid rgba(255,255,255,.15);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  min-width: 0;
}
.mini-box span { font-size: .85rem; opacity: .85; }
.mini-box strong { font-size: 1.15rem; line-height: 1; }

/* intent colors for minis */
.mini-ok   { background: rgba(210, 210, 210, 0.16);  border-color: rgba(199, 199, 199, 0.35); }
.mini-bad  { background: rgba(239,68,68,.16);  border-color: rgba(239,68,68,.35); }
.mini-warn { background: rgba(245,158,11,.16); border-color: rgba(245,158,11,.35); }

/* hover effects */
.kpi-box:hover  { transform: translateY(-4px); box-shadow: 0 4px 12px rgba(0,0,0,.25); color: white; }
.mini-box:hover { transform: translateY(-2px); background: rgba(255,255,255,.18);  color: white;  }

/* Split layout */
.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); /* ← key change */
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .dashboard { grid-template-columns: minmax(0, 1fr); } /* keep the fix on mobile too */
}
.dashboard > * { min-width: 0; }



/*.card {*/
/*  background: var(--panel);*/
/*  border: 1px solid var(--line);*/
/*  border-radius: var(--radius);*/
/*  box-shadow: var(--shadow-1);*/
/*}*/

/* Left: keep KPI grid responsive; force 2 per row on wide screens */
.kpi-grid.two-per-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
}
.kpi-grid.two-per-row > * { min-width: 0; }

/* Right column card fills height nicely */
.right-column .card {
  height: 100%;
}

/* Optional: make table a bit tighter in the dashboard context */
.right-column .table thead th,
.right-column .table tbody td {
  padding: 10px 12px;
}

/* Responsive fallback: stack on small screens */
@media (max-width: 900px) {
  .dashboard { grid-template-columns: 1fr; }
}

/* ===== Accessible helpers ===== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.sep { opacity: .5; }

/* ===== Pretty select (dark) ===== */
.tenant-switcher { display: inline-flex; align-items: center; gap: var(--space-2); }

.select {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: #0d121a;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  min-width: 180px;  /* comfy width; tweak if you like */
}

.select:hover { background: #0f141d; }
.select:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}

.select-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: transparent;
  color: var(--text);
  border: 0;
  outline: none;
  font: inherit;
  line-height: 1.3;
  padding: 8px 34px 8px 12px; /* room for chevron on the right */
  min-height: 36px;
  width: 100%;
  cursor: pointer;
}

.select-input:focus { outline: none; }
.select-input option { background: var(--panel); color: var(--text); }

/* Chevron icon */


/* Optional inline button (noscript fallback) */
.btn-inline {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #0d121a;
  color: var(--text);
}
.btn-inline:hover { border-color: var(--brand); color: var(--text); }

#btn-delete-inline { background: var(--bad);}
#btn-delete-inline:hover { background: var(--bad-600);}

#btn-ok-inline { background: var(--ok); border: 0;}
#btn-ok-inline:hover { background: var(--ok-600); border-color: transparent;}

/* hide any stray chevron from the previous attempt */


/* a11y helper */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.tenant-switcher { display: inline-flex; align-items: center; gap: var(--space-2); }

/* pretty dark select with built-in chevron */
.tenant-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #0d121a;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 36px 8px 12px;   /* space for chevron */
  line-height: 1.3;
  min-height: 36px;
  min-width: 180px;
  cursor: pointer;

  /* chevron as background image */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7l5 5 5-5' stroke='%2399a3b3' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

.tenant-select:hover { background-color: #0f141d; }
.tenant-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}
.tenant-select option { background: var(--panel); color: var(--text); }

/* ===== Top Navigation ===== */
.topnav {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 6px;                 /* +2px top padding helps */
  position: sticky; top: 0;
  z-index: 50;                       /* render above header */
  overflow-x: auto;                  /* <-- moved from UL to NAV */
  overflow-y: visible;               /* allow vertical overflow */
  margin-bottom: 20px;
}

.topnav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0; margin: 0;
  /* REMOVE the old overflow-x here */
  overflow: visible;                 /* ensure children can overflow up */
  white-space: nowrap;               /* keep items on one line */
}

.topnav .spacer { flex: 1 1 auto; }

.topnav a {
  position: relative;                /* enable z-index on hover */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .08s ease;
  will-change: transform;
}

.topnav a:hover {
  background: #0f141d;
  border-color: var(--line);
  transform: translateY(-1px);       /* or your -0.5px */
  z-index: 2;                        /* paint above neighbors */
}

.topnav a.active,
.topnav a[aria-current="page"] {
  background: linear-gradient(180deg, rgba(37,99,235,.20), rgba(37,99,235,.10));
  border-color: rgba(37,99,235,.45);
  color: #dbeafe; /* light blue */
}

/* tiny brand dot (icon placeholder) */
.topnav .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  box-shadow: 0 0 0 2px rgba(37,99,235,.18);
}

/* Narrow screens: tighten padding a bit */
@media (max-width: 760px) {
  .topnav a { padding: 7px 10px; }
}

/* ---------- Sidebar (mobile < 800px) ---------- */
.icon-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #0d121a;
  color: var(--text);
  border-radius: 10px;
  padding: 6px 8px;
  display: none; /* hidden on desktop, shown on mobile below */
  align-items: center;
  gap: 6px;
}
.icon-btn:hover { border-color: var(--brand); }

.icon-btn .bar { display: block; width: 18px; height: 2px; background: var(--text); margin: 3px 0; border-radius: 2px; }
.icon-btn.close-btn .bar { position: relative; width: 16px; }
.icon-btn.close-btn .bar.x1 { transform: rotate(45deg); top: 2px; }
.icon-btn.close-btn .bar.x2 { transform: rotate(-45deg); top: -2px; }

/* The drawer */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;         /* left side drawer */
  width: 300px;
  transform: translateX(-105%);
  transition: transform .18s ease;
  background: var(--panel);
  border-right: 1px solid var(--line);
  z-index: 90;
  display: flex;
  flex-direction: column;
  max-width: 85vw;
}
.sidebar.is-open { transform: translateX(0); }

/* Drawer header */
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
}
.sidebar-title { font-weight: 600; color: var(--text); }

.sidebar-content {
  padding: 12px;
  overflow-y: auto;
  display: grid; gap: 12px;
}

/* Move the existing nav + panel styles to fit inside drawer */
.sidebar .topnav {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  position: static;
  overflow: visible;
  margin: 0;
}
.sidebar .topnav-links { white-space: normal; flex-direction: column; gap: 4px; }
.sidebar .topnav a { width: 100%; }

/* Backdrop */
.sidebar-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 80;
}

/* Prevent body scroll when open */
body.no-scroll { overflow: hidden; }

/* ---------- Responsive rules ---------- */
@media (max-width: 800px) {
  /* header becomes brand + hamburger; hide desktop slots */
  .app-header {
    grid-template-columns: 1fr auto;
  }
  #header-actions-slot,
  #topnav-slot {
    display: none;
  }
  .sidebar-toggle {
    display: flex; /* show hamburger */
    flex-direction: column;
    gap: 0px;
  }
}

@media (min-width: 801px) {
  /* never show sidebar/backdrop on desktop */
  .sidebar,
  .sidebar-backdrop {
    display: none !important;
  }
  .sidebar-toggle {
    display: none !important;
  }
}

.input[aria-invalid="true"] {
  border-color: var(--bad);
  box-shadow: 0 0 0 3px rgba(239,68,68,.20);
}

.mini-card.tabs-mode{
  --h: 36px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  width: max(280px, 30%);
  min-width: 280px;
  max-width: 560px;
  height: var(--h);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card, #0f151d);
  box-shadow: 0 1px 0 rgba(0,0,0,.2) inset;
  overflow: hidden;
}

.mini-card.tabs-mode .tab{
  position: relative;
  z-index: 2;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 500 13px/var(--h) ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  padding: 0 10px;
  text-align: center;
  white-space: nowrap;
}

.mini-card.tabs-mode .tab.is-active{ color: var(--text-strong, #fff); }

.mini-card.tabs-mode .slider{
  position: absolute;
  z-index: 1;
  top: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  height: calc(var(--h) - 6px);
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset, 0 2px 8px rgba(0,0,0,.25);
  transform: translateX(0%);
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
}

/* Optional: put the mini-card inline with your toolbar */
.toolbar2 .mini-card.tabs-mode{ margin-left: auto; }

/* ===== RESPONSIVE TOOLBAR FIX ===== */

/* DESKTOP: Keep items on one line, prevent search from growing too much */
.toolbar .input {
  flex: 1 1 250px;  /* Grow, shrink, base 250px */
}

.toolbar .select {
  flex: 0 1 200px;  /* Don't grow, can shrink, base 200px */
}

.toolbar .btn {
  flex: 0 0 auto;   /* Don't grow or shrink */
  white-space: nowrap;
}

.toolbar .btn-inline {
  flex: 0 0 36px;   /* Fixed size */
}

/* MOBILE: Enable wrapping and adjust sizing */
@media (max-width: 720px) {
  /* NOW we enable wrapping on mobile only */
  .toolbar form.flex {
    flex-wrap: wrap;
    width: 100%;
  }

  /* Search input + square button stay side by side */
  .toolbar .input {
    flex: 1 1 200px;  /* Flex to fill, but allow button beside it */
    min-width: 0;     /* Allow shrinking below 200px if needed */
    max-width: none;  /* Remove desktop max-width restriction */
  }

  /* Dropdowns take full width (wrap to new line) */
  .toolbar .select {
    flex: 1 1 100%;
    min-width: 100%;
    width: 100%;
  }

  /* Regular buttons take full width (wrap to new line) */
  .toolbar .btn {
    flex: 1 1 auto;   /* ← Was: flex: 1 1 100%; width: 100%; */
    min-width: 0;     /*    Now: Flexes beside [+] button! */
  }

  /* Square buttons stay fixed size */
  .toolbar .btn-inline {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
  }
}

.toolbar .flex.gap-2.center .select {
  flex: 0 0 auto;
  min-width: 200px;
}

/* Mobile */
@media (max-width: 720px) {
  /* Enable wrapping for offroute toolbar */
  .toolbar .flex.gap-2.center {
    flex-wrap: wrap;
    width: 100%;
  }

  /* Dropdowns take full width */
  .toolbar .flex.gap-2.center .select {
    flex: 1 1 100%;
    width: 100%;
    min-width: 100%;
  }
}


.alert-bell{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  margin-right: 10px;
  color: var(--text, #e5e7eb);
  border-radius: 999px;
  transition: color .15s ease, background .15s ease;
}
.alert-bell:hover{ background: rgba(255,255,255,.06); }

/* When there are alerts, tint the bell a bit red */
.alert-bell.has-alerts{ color: #f87171; } /* tailwind-ish red-400 */

.alert-badge{
  position: absolute;
  top: 0; right: 0;
  transform: translate(35%,-35%); /* sit over the corner */
  min-width: 18px; height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;  /* red-500 */
  color: #fff;
  font-size: 11px; line-height: 18px; font-weight: 800;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(13,18,26,.95); /* dark “ring” like iOS */
}

/* optional: a gentle “ping” the first couple refreshes */
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(239,68,68,.45); }
  70%{ box-shadow: 0 0 0 10px rgba(239,68,68,0); }
  100%{ box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.alert-bell.has-alerts .alert-badge.ping {
  animation: ping 1.6s ease-out 2;
}

/* ===== Responsive Tables for Mobile ===== */
@media (max-width: 720px) {

  .card:has(.table) {
    background: transparent;
    border: none;
    box-shadow: none;
  }

  /* Keep the toolbar styling */
  .card:has(.table) .toolbar {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 16px;
  }
  /* Hide the table header on mobile */
  .table thead {
    display: none;
  }

  /* Make each table row a card */
  .table tbody tr {
    display: block;
    margin-bottom: 20px;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  /* Make each cell a row with label and data */
  .table tbody td {
    display: grid;
    grid-template-columns: 100px auto;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Make each cell a row with label and data */
  .table tbody td {
    display: grid;
    grid-template-columns: 100px minmax(0, auto);
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    align-items: start;
    justify-items: start;
  }

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

  /* Add the header label before each cell */
  .table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
  }

  /* Special handling for nested content in cells */
  .table tbody td > * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Hide cells that have no data-label (like toggle buttons) */
  .table tbody td:not([data-label]) {
    display: none;
  }

  /* Keep hover effects but don't override card background */
  .table tr:hover td {
    background: inherit;
  }

  /* Preserve row background colors for status-based rows (like alerts) */
  .table tbody tr.row-new,
  .table tbody tr.row-pending,
  .table tbody tr.row-resolved {
    border-width: 2px;
  }

  .table tbody tr.row-new {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
  }

  .table tbody tr.row-pending {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
  }

  .table tbody tr.row-resolved.row-ok {
    background: rgba(34, 197, 94, 0.05);
    border-color: rgba(34, 197, 94, 0.2);
  }

  .table tbody tr.row-resolved.row-bad {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
  }

  /* Ensure badges only take the space they need */
  .table tbody td .badge {
    display: inline-block;
    width: auto !important;
  }

  /* Ensure small text wraps properly */
  .table tbody td .small {
    display: inline-block;
  }
}