@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=DM+Mono:wght@400;500&display=swap');

/* ─── Design Tokens ─────────────────────────────────────────────── */
:root {
  --bg:         #070d1a;
  --bg-2:       #0b1221;
  --surface:    #0f1929;
  --surface-2:  #14213a;
  --surface-3:  #192947;
  --border:     rgba(255,255,255,0.07);
  --border-2:   rgba(255,255,255,0.12);
  --border-3:   rgba(90,169,255,0.35);

  --text:       #eef2ff;
  --text-2:     #94a8c9;
  --text-3:     #5a6e8c;

  --accent:     #5b9cf6;
  --accent-2:   #3b7de8;
  --accent-glow:rgba(91,156,246,0.2);

  --ok:         #34d38e;
  --ok-muted:   rgba(52,211,142,0.12);
  --danger:     #f96464;
  --danger-muted:rgba(249,100,100,0.12);
  --warn:       #f8c441;
  --warn-muted: rgba(248,196,65,0.1);

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;

  --font:       'DM Sans', sans-serif;
  --font-mono:  'DM Mono', monospace;

  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:    cubic-bezier(0.64, 0, 0.78, 0);

  --sidebar-w:  260px;
}

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

html, body {
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

/* ─── App Shell ──────────────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: linear-gradient(160deg, #0e1a30 0%, #080f1d 100%);
  padding: 20px 14px;
  overflow-y: auto;
  z-index: 100;
}

/* subtle star-field shimmer on sidebar */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1px 1px at 30% 20%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 80%, rgba(255,255,255,0.15) 0%, transparent 100%);
  pointer-events: none;
}

/* ─── Brand ──────────────────────────────────────────────────────── */
.brand {
  padding: 4px 8px 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.site-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  opacity: 0.85;
}

.brand h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand p {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 3px;
}

/* ─── Nav ────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.nav button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13.5px;
  font-family: var(--font);
  font-weight: 400;
  transition: all 0.18s var(--ease-out);
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
}

.nav button::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-3);
  flex-shrink: 0;
  transition: all 0.18s var(--ease-out);
}

.nav button:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

.nav button:hover::before {
  background: var(--accent);
}

.nav button.active {
  color: var(--text);
  background: rgba(91,156,246,0.1);
  border-color: rgba(91,156,246,0.25);
  font-weight: 500;
}

.nav button.active::before {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ─── Sidebar Footer ─────────────────────────────────────────────── */
.sidebar-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.whoami {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
  padding: 0 4px;
}

.whoami strong {
  display: block;
  font-weight: 500;
  color: var(--text-2);
  font-size: 13px;
}

.logout-btn {
  border: 1px solid rgba(249,100,100,0.3);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--danger-muted);
  color: var(--danger);
  font-weight: 500;
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s var(--ease-out);
  text-align: left;
}

.logout-btn:hover {
  background: rgba(249,100,100,0.2);
  border-color: rgba(249,100,100,0.5);
}

/* ─── Main Content ───────────────────────────────────────────────── */
.main {
  padding: 28px 32px;
  min-width: 0;
  animation: fadeUp 0.4s var(--ease-out) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Topbar ─────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.topbar h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}

.topbar p {
  margin-top: 5px;
  color: var(--text-3);
  font-size: 13.5px;
}

.status {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  color: var(--text-3);
  font-size: 12.5px;
  font-family: var(--font-mono);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── Panel ──────────────────────────────────────────────────────── */
.panel {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color 0.2s;
}

.panel:hover {
  border-color: var(--border-2);
}

/* ─── Section Title ──────────────────────────────────────────────── */
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

/* ─── Grid & Card ────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.card {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all 0.22s var(--ease-out);
  cursor: default;
}

.card:hover {
  border-color: var(--border-2);
  background: var(--surface-3);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  font-size: 11.5px;
  font-weight: 500;
  font-family: var(--font-mono);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  color: var(--text-3);
  background: rgba(255,255,255,0.03);
}

/* ─── Toolbar ────────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.toolbar-left, .toolbar-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13.5px;
  font-family: var(--font);
  font-weight: 500;
  transition: all 0.18s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(91,156,246,0.06);
}

.btn:active {
  transform: scale(0.97);
}

.btn.primary {
  background: var(--accent);
  color: #050d1e;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(91,156,246,0.25);
}

.btn.primary:hover {
  background: var(--accent-2);
  box-shadow: 0 0 28px rgba(91,156,246,0.4);
}

.btn.danger {
  background: var(--danger-muted);
  color: var(--danger);
  border-color: rgba(249,100,100,0.3);
}

.btn.danger:hover {
  background: rgba(249,100,100,0.22);
  border-color: rgba(249,100,100,0.5);
}

.btn.ok {
  background: var(--ok-muted);
  color: var(--ok);
  border-color: rgba(52,211,142,0.3);
}

/* ─── Forms ──────────────────────────────────────────────────────── */
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--border-2);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 10px 13px;
  font-size: 13.5px;
  font-family: var(--font);
  outline: none;
  transition: all 0.18s var(--ease-out);
}

.textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 13px;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  background: rgba(91,156,246,0.05);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.select option {
  background: var(--surface-2);
  color: var(--text);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ─── Table ──────────────────────────────────────────────────────── */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  table-layout: fixed;
}

th, td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13.5px;
  vertical-align: top;
}

th {
  background: rgba(0,0,0,0.25);
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

th:last-child, td:last-child {
  text-align: center;
  width: 120px;
}

tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: rgba(91,156,246,0.025);
}

/* ─── Tags / Badges ──────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.04);
  color: var(--text-3);
  white-space: nowrap;
}

.tag::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.tag.ok     { color: var(--ok);     border-color: rgba(52,211,142,0.3);  background: var(--ok-muted); }
.tag.off    { color: var(--danger); border-color: rgba(249,100,100,0.3); background: var(--danger-muted); }
.tag.admin  { color: var(--accent); border-color: rgba(91,156,246,0.35); background: rgba(91,156,246,0.08); }
.tag.operador { color: var(--warn); border-color: rgba(248,196,65,0.3);  background: var(--warn-muted); }

/* ─── Row Actions ────────────────────────────────────────────────── */
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.mini-btn {
  border: 1px solid var(--border-2);
  background: var(--surface-3);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font);
  font-weight: 500;
  transition: all 0.16s var(--ease-out);
}

.mini-btn:hover        { border-color: var(--accent); color: var(--text); }
.mini-btn.warn         { border-color: rgba(248,196,65,0.35); color: var(--warn); }
.mini-btn.danger       { border-color: rgba(249,100,100,0.35); color: var(--danger); }

/* ─── Subpanel ───────────────────────────────────────────────────── */
.subpanel {
  margin-top: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 16px;
}

/* ─── Misc ───────────────────────────────────────────────────────── */
.hidden  { display: none !important; }
.muted   { color: var(--text-3); }
.msg     { margin-top: 10px; font-size: 13px; color: var(--danger); }

.empty {
  color: var(--text-3);
  padding: 32px 20px;
  text-align: center;
  font-size: 13.5px;
}

/* ─── Skeleton loader (optional reuse) ───────────────────────────── */
@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position:  200% center; }
}

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .form-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 100%; }

  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 16px 12px;
  }

  .sidebar::before { display: none; }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .nav button {
    width: auto;
    flex: 1 1 120px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .nav button::before { display: none; }

  .sidebar-footer {
    flex-direction: row;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
  }

  .whoami { flex: 1; }

  .logout-btn { white-space: nowrap; }

  .main {
    padding: 20px 16px;
  }

  .topbar {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
  }

  .topbar h2 { font-size: 22px; }

  .status { align-self: flex-start; }

  table { min-width: 700px; }

  .form-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .brand h1 { font-size: 16px; }
  .nav button { font-size: 12.5px; padding: 8px 10px; }
  .main { padding: 16px 12px; }
  .panel { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-left, .toolbar-right { justify-content: flex-start; }
  .topbar h2 { font-size: 20px; }
}



/* Kal Tire corporate theme */
:root {
  --kt-orange: #f36f21;
  --kt-orange-dark: #d9570f;
  --kt-black: #111111;
  --kt-yellow: #f1c40f;
  --kt-red: #e74c3c;

  --bg:         #080808;
  --bg-2:       #101010;
  --surface:    #151515;
  --surface-2:  #1d1d1d;
  --surface-3:  #262626;

  --border:     rgba(255,255,255,0.08);
  --border-2:   rgba(255,255,255,0.14);
  --border-3:   rgba(243,111,33,0.42);

  --text:       #f5f5f5;
  --text-2:     #c9c9c9;
  --text-3:     #898989;

  --accent:     var(--kt-orange);
  --accent-2:   var(--kt-orange-dark);
  --accent-glow: rgba(243,111,33,0.22);

  --ok:         #34d38e;
  --ok-muted:   rgba(52,211,142,0.12);
  --danger:     var(--kt-red);
  --danger-muted: rgba(231,76,60,0.13);
  --warn:       var(--kt-yellow);
  --warn-muted: rgba(241,196,15,0.12);
}

html,
body {
  background:
    radial-gradient(circle at 12% 8%, rgba(243,111,33,0.12), transparent 28%),
    linear-gradient(135deg, #050505 0%, #101010 52%, #161616 100%);
  color: var(--text);
}

.sidebar {
  background:
    linear-gradient(180deg, #111111 0%, #080808 100%);
  border-right: 1px solid rgba(255,255,255,0.08);
  box-shadow: 18px 0 44px rgba(0,0,0,0.34);
}

.sidebar::before {
  display: none;
}

.kt-sidebar-logo-wrap {
  width: 100%;
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 18px;
  box-shadow: 0 16px 34px rgba(0,0,0,0.28);
}

.kt-sidebar-logo {
  display: block;
  width: 100%;
  max-height: 58px;
  object-fit: contain;
}

.brand {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-kicker {
  color: var(--kt-orange);
}

.brand h1 {
  color: #ffffff;
}

.brand p {
  color: rgba(255,255,255,0.52);
}

.nav button {
  color: rgba(255,255,255,0.68);
}

.nav button::before {
  background: rgba(255,255,255,0.28);
}

.nav button:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
}

.nav button.active {
  color: #ffffff;
  background: rgba(243,111,33,0.14);
  border-color: rgba(243,111,33,0.34);
  box-shadow:
    inset 3px 0 0 var(--kt-orange),
    0 12px 28px rgba(0,0,0,0.18);
}

.nav button.active::before {
  background: var(--kt-orange);
  box-shadow: 0 0 9px rgba(243,111,33,0.75);
}

.topbar h2 {
  color: #ffffff;
}

.topbar p {
  color: var(--text-3);
}

.status,
.panel,
.card,
.table-wrap {
  background: rgba(21,21,21,0.94);
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 20px 50px rgba(0,0,0,0.24);
}

.panel:hover,
.card:hover {
  border-color: rgba(243,111,33,0.24);
}

.card:hover {
  background: #1d1d1d;
}

.btn {
  background: #1d1d1d;
  color: var(--text-2);
  border-color: rgba(255,255,255,0.12);
}

.btn:hover {
  color: #ffffff;
  background: rgba(243,111,33,0.10);
  border-color: rgba(243,111,33,0.38);
}

.btn.primary {
  background: linear-gradient(135deg, var(--kt-orange), #ff9b54);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(243,111,33,0.25);
}

.btn.primary:hover {
  background: linear-gradient(135deg, var(--kt-orange-dark), var(--kt-orange));
  box-shadow: 0 18px 38px rgba(243,111,33,0.32);
}

.input,
.select,
.textarea {
  background: #111111;
  color: #ffffff;
  border-color: rgba(255,255,255,0.14);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--kt-orange);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

th {
  background: #101010;
  color: var(--text-3);
}

td {
  color: var(--text-2);
}

tr:hover td {
  background: rgba(243,111,33,0.035);
}

.tag.admin {
  color: var(--kt-orange);
  border-color: rgba(243,111,33,0.34);
  background: rgba(243,111,33,0.10);
}

.tag.operador {
  color: var(--kt-yellow);
  border-color: rgba(241,196,15,0.32);
  background: rgba(241,196,15,0.10);
}

.logout-btn {
  background: rgba(231,76,60,0.10);
  color: #ff8a7f;
  border-color: rgba(231,76,60,0.28);
}

.logout-btn:hover {
  background: rgba(231,76,60,0.18);
  border-color: rgba(231,76,60,0.44);
}

/* Ajuste logo Kal Tire: contenedor más fino */
.kt-sidebar-logo-wrap {
  padding: 5px 7px;
  border-radius: 10px;
  margin-bottom: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}

.kt-sidebar-logo {
  max-height: 48px;
  border-radius: 6px;
}

/* Recorte sutil del borde negro interno del JPG */
.kt-sidebar-logo {
  clip-path: inset(5% 2.5% 5% 2.5% round 6px);
  transform: scale(1.025);
}

/* Logo Kal Tire: borde horizontal casi cero */
.kt-sidebar-logo-wrap {
  padding: 1px 2px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.kt-sidebar-logo {
  width: 100% !important;
  height: 72px !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 4px !important;
  clip-path: inset(19% 0.5% 19% 0.5% round 4px) !important;
  transform: scale(1.045) !important;
}

/* FIX logo Kal Tire: sin recorte lateral */
.kt-sidebar-logo-wrap {
  padding: 0 !important;
  border-radius: 9px !important;
  overflow: hidden !important;
  height: auto !important;
  min-height: 0 !important;
  background: #ffffff !important;
  display: block !important;
  box-shadow: 0 10px 24px rgba(0,0,0,0.22) !important;
}

.kt-sidebar-logo {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 0 !important;
  clip-path: none !important;
  transform: none !important;
}


/* ===== alerts-dashboard-clean-final:start ===== */

@media (min-width: 761px) {
  .alerts-dashboard-table-wrap {
    overflow-x: visible !important;
  }

  .alerts-dashboard-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    font-size: 13px;
  }

  .alerts-dashboard-table th,
  .alerts-dashboard-table td {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  /* Columnas ocultas en tabla, disponibles en Ver */
  .alerts-dashboard-table th:nth-child(9),
  .alerts-dashboard-table td:nth-child(9),
  .alerts-dashboard-table th:nth-child(10),
  .alerts-dashboard-table td:nth-child(10),
  .alerts-dashboard-table th:nth-child(11),
  .alerts-dashboard-table td:nth-child(11),
  .alerts-dashboard-table th:nth-child(12),
  .alerts-dashboard-table td:nth-child(12) {
    display: none !important;
  }

  .alerts-dashboard-table th:nth-child(1),
  .alerts-dashboard-table td:nth-child(1) { width: 3%; }

  .alerts-dashboard-table th:nth-child(2),
  .alerts-dashboard-table td:nth-child(2) { width: 7%; }

  .alerts-dashboard-table th:nth-child(3),
  .alerts-dashboard-table td:nth-child(3) { width: 4%; }

  .alerts-dashboard-table th:nth-child(4),
  .alerts-dashboard-table td:nth-child(4) { width: 10%; }

  .alerts-dashboard-table th:nth-child(5),
  .alerts-dashboard-table td:nth-child(5) { width: 6%; }

  .alerts-dashboard-table th:nth-child(6),
  .alerts-dashboard-table td:nth-child(6) { width: 8%; }

  .alerts-dashboard-table th:nth-child(7),
  .alerts-dashboard-table td:nth-child(7) { width: 18%; }

  .alerts-dashboard-table th:nth-child(8),
  .alerts-dashboard-table td:nth-child(8) { width: 15%; }

  .alerts-dashboard-table th:nth-child(13),
  .alerts-dashboard-table td:nth-child(13) { width: 13%; }

  .alerts-dashboard-table th:nth-child(14),
  .alerts-dashboard-table td:nth-child(14) { width: 10%; }

  .alerts-dashboard-table th.alerts-detail-th,
  .alerts-dashboard-table td.alerts-detail-cell {
    width: 6%;
    text-align: right !important;
  }

  .alerts-detail-cell {
    position: relative;
    overflow: visible !important;
  }

  .alerts-row-details {
    display: inline-block;
    position: relative;
  }

  .alerts-row-details summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
    min-width: 42px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.045);
    color: rgba(255,255,255,.78);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-align: center;
  }

  .alerts-row-details summary::-webkit-details-marker {
    display: none;
  }

  .alerts-row-details[open] .alerts-detail-grid {
    position: absolute;
    right: 0;
    top: 28px;
    z-index: 100;
    width: 380px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    background: #111827;
    box-shadow: 0 18px 40px rgba(0,0,0,.4);
    text-align: left;
  }

  .alerts-detail-item {
    display: grid;
    grid-template-columns: 125px 1fr;
    gap: 8px;
    padding: 7px 0;
    border-top: 1px solid rgba(255,255,255,.07);
  }

  .alerts-detail-item:first-child {
    border-top: 0;
  }

  .alerts-detail-label {
    color: rgba(255,255,255,.48);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .alerts-detail-value {
    color: rgba(255,255,255,.84);
    font-size: 12px;
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .alerts-detail-th,
  .alerts-detail-cell {
    display: none !important;
  }
}

/* ===== alerts-dashboard-clean-final:end ===== */

/* ===== Detalles popup header final ===== */

@media (min-width: 761px) {
  .alerts-dashboard-table th.alerts-detail-th,
  .alerts-dashboard-table td.alerts-detail-cell {
    width: 8% !important;
    min-width: 96px !important;
    padding-right: 18px !important;
    text-align: center !important;
  }

  .alerts-detail-cell {
    position: relative;
    overflow: visible !important;
  }

  .alerts-row-details {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    position: relative;
  }

  .alerts-row-details summary {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
  }

  .alerts-row-details[open] .alerts-detail-grid {
    padding: 14px 24px 14px 14px !important;
  }

  .alerts-detail-head {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .alerts-detail-title {
    padding-right: 28px;
    color: rgba(255,255,255,.78);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .alerts-detail-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.78);
    cursor: pointer;
    font-size: 20px;
    line-height: 22px;
  }

  .alerts-detail-close:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
  }
}



/* ===== Estado badges bonitos ===== */

@media (min-width: 761px) {
  .alerts-dashboard-table th:nth-child(14),
  .alerts-dashboard-table td:nth-child(14) {
    width: 15% !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
}

.estado-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: help;
}

.estado-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: .95;
}

.estado-badge-green {
  color: #41d88a;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.35);
}

.estado-badge-orange {
  color: #ff8a3d;
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.35);
}

.estado-badge-red {
  color: #ff6b57;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.35);
}

.estado-badge-blue {
  color: #4dd4c6;
  background: rgba(20, 184, 166, 0.14);
  border-color: rgba(20, 184, 166, 0.35);
}

.estado-badge-neutral {
  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
}

