/* ============================================================================
   TEMA ALERT — LPR Dashboard
   Layout Alerts con Sidebar
   ========================================================================== */

:root {
  --bg-main: #0d0d0d;
  --bg-secondary: #141414;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.09);

  --text-primary: #eaeaea;
  --text-secondary: #b5b5b5;
  --text-dim: #7c7c7c;

  --accent: #6cd3ff;
  --accent-glow: rgba(108, 211, 255, 0.5);

  --alert-red: #912020;
  --alert-red-soft: rgba(145, 32, 32, 0.16);
  --alert-gray: #b4b4b4;

  --shadow-soft: 0 10px 28px rgba(0,0,0,0.55);
  --shadow-strong: 0 16px 40px rgba(0,0,0,0.8);
}

/* ============================
   BACKGROUND GLOBAL
============================= */

body {
  background: linear-gradient(135deg, #b4b4b4 0%, #141414 40%, #912025 100%);
  color: #f90000;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
}

/* ============================
   TOP BAR
============================= */

.topbar-st {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #205a91;
  background: linear-gradient(135deg, #b4b4b4 0%, #141414 40%, #912020 100%);
  padding: 0 24px;
  height: 56px;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.logo img {
  height: 120px;
  margin-top: 10px;
  transition: opacity 0.25s ease;
}

.logo img:hover {
  opacity: 0.85;
}

/* ============================
   NAV
============================= */

.main-nav {
  display: flex;
}

.nav-item {
  position: relative;
  color: #b4b4b4;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.18s ease;
  padding-bottom: 6px;
}

.nav-item:hover {
  color: var(--accent);
}

.nav-item.active {
  color: #912020;
}

.nav-item.active::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 3px;
  bottom: -2px;
  left: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #912020, #912020);
}

/* ============================
   ALERTS LAYOUT
============================= */

.alerts-layout {
  max-width: 1600px;
  margin: 22px auto 40px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

/* ============================
   SIDEBAR
============================= */

.alerts-sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  background: rgba(20,20,20,0.82);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.sidebar-hero {
  background: linear-gradient(180deg, rgba(145,32,32,0.16), rgba(255,255,255,0.03));
  border-color: rgba(145,32,32,0.26);
  margin-top: 10px;
}

.sidebar-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-hero h1 {
  margin: 0;
  color: #ffb1b1;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.sidebar-hero p {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.sidebar-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #ffb1b1;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.sidebar-field:last-child {
  margin-bottom: 0;
}

.sidebar-field label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.sidebar-field select {
  background: var(--bg-card);
  border: 1px solid rgba(145,32,32,0.45);
  color: var(--alert-gray);
  padding: 9px 12px;
  border-radius: 10px;
  outline: none;
  background-color:rgba(20, 20, 20, 0.82);
}

.sidebar-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-stat__label {
  color: var(--text-secondary);
  font-size: 12px;
}

.sidebar-stat strong {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: 0.18s ease;
  background: rgba(255,255,255,0.03);
}

.sidebar-links a:hover {
  background: rgba(145,32,32,0.16);
  color: #ffb1b1;
}

/* ============================
   MAIN CONTENT
============================= */

.alerts-main {
  min-width: 0;
}

.alerts-hero {
  background: rgba(20,20,20,0.82);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
}

.alerts-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.alerts-hero__text h2 {
  margin: 0;
  color: #ffb1b1;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.alerts-hero__text p {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ============================
   CONTAINER
============================= */

.container {
  max-width: 100%;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ============================
   ALERT CARDS
============================= */

.event-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  transition: 0.2s ease;
  backdrop-filter: blur(8px);
}

.event-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}

.card-image {
  width: 160px;
  margin-top: 8px;
  height: 110px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.card-image-alert {
  width: 160px;
  margin-top: 15px;
  height: 110px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.card-image-alert img,
.card-image img {
  width: 100%;
  height: 110%;
  object-fit: cover;
  transition: 0.25s ease;
}

.card-image img:hover {
  transform: scale(1.05);
}

.card-info {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 6px 18px;
  min-width: 0;
}

.alert-head {
  grid-column: span 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.timestamp {
  grid-column: span 2;
  color: var(--text-secondary);
  font-size: 13px;
}

.event-plate {
  font-size: 22px;
  font-weight: 700;
  color: #ffb1b1;
  text-shadow: 0 0 8px rgba(145,32,32,0.45);
}

.card-field {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  opacity: 0.85;
}

.card-field i {
  color: #ffb1b1;
}

.alert-desc {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  opacity: 0.9;
}

.alert-desc i {
  color: #ffb1b1;
}

/* ============================
   BADGES / BUTTONS
============================= */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-status-active {
  background: rgba(145,32,32,0.22);
  color: #ffb1b1;
  border: 1px solid rgba(145,32,32,0.48);
}

.badge-status-ack {
  background: rgba(180,180,180,0.18);
  color: #e0e0e0;
  border: 1px solid rgba(180,180,180,0.4);
}

.badge-status-closed {
  background: rgba(80,80,80,0.20);
  color: #c8c8c8;
  border: 1px solid rgba(120,120,120,0.35);
}

.badge-sev-high {
  background: rgba(255,59,48,0.18);
  color: #ff8c86;
  border: 1px solid rgba(255,59,48,0.36);
}

.badge-sev-medium {
  background: rgba(255,149,0,0.18);
  color: #ffc266;
  border: 1px solid rgba(255,149,0,0.36);
}

.alert-actions {
  grid-column: span 2;
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.btn-mini {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  color: #ffffff;
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 12px;
  cursor: pointer;
  transition: 0.18s ease;
}

.btn-mini:hover:not(:disabled) {
  background: rgba(145,32,32,0.18);
  border-color: rgba(145,32,32,0.45);
  color: #ffb1b1;
}

.btn-mini:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ============================
   IMPORT CARD
============================= */

.chart-card {
  background: rgba(20,20,20,0.82);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.chart-header-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.chart-header-line h3 {
  color: #ffb1b1;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.helper-text {
  color: var(--text-secondary);
  font-size: 12px;
}

/* ============================
   MODAL IMAGE
============================= */

.expanded {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: 0.25s ease;
  z-index: 9999;
}

.expanded.visible {
  visibility: visible;
  opacity: 1;
}

.expanded img {
  max-width: 50%;
  border-radius: 12px;
  box-shadow: 0 0 24px #912020;
}

.close-btn {
  position: absolute;
  top: 150px;
  right: 300px;
  font-size: 28px;
  cursor: pointer;
  background: rgba(255,255,255,0.08);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #912020;
  color: #912020;
  transition: 0.2s;
}

.close-btn:hover {
  background: #912020;
  color: #000;
}

/* ============================
   RESPONSIVE
============================= */

@media (max-width: 1280px) {
  .alerts-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .alerts-layout {
    grid-template-columns: 1fr;
  }

  .alerts-sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .alert-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .event-card {
    flex-direction: column;
  }

  .card-image-alert,
  .card-image {
    width: 100%;
    height: 180px;
    margin-top: 0;
  }

  .card-info {
    grid-template-columns: 1fr;
  }

  .timestamp,
  .alert-desc,
  .alert-actions,
  .alert-head {
    grid-column: span 1;
  }

  .expanded img {
    max-width: 90%;
  }

  .close-btn {
    right: 24px;
    top: 24px;
  }
}