/* =========================================================
   CSC-CR MONITOREO - ESTILO TACTICAL / SWAT
   ========================================================= */

/* Inter desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Paleta tactical */
  --navy-deep:    #0a0e1a;
  --navy-dark:    #111827;
  --navy-mid:     #1e293b;
  --navy:         #1a2747;
  --navy-light:   #334155;

  --accent:       #3b82f6;
  --accent-glow:  #60a5fa;

  --green:        #10b981;
  --yellow:       #f59e0b;
  --red:          #ef4444;

  --text-bright:  #f8fafc;
  --text-mute:    #cbd5e1;
  --text-dim:     #94a3b8;

  --border:       #1e293b;
  --border-hot:   #334155;

  --shadow:       0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow:  0 0 40px rgba(59, 130, 246, 0.15);
}

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

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 500;
  background: var(--navy-deep);
  color: var(--text-bright);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* =========================================================
   PANTALLA DE LOGIN
   ========================================================= */

.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at top, rgba(30, 41, 59, 0.5) 0%, transparent 60%),
    radial-gradient(ellipse at bottom, rgba(26, 39, 71, 0.3) 0%, transparent 60%),
    var(--navy-deep);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.login-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}

.login-screen::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}

.login-box {
  width: 100%;
  max-width: 440px;
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  box-shadow: var(--shadow), var(--shadow-glow);
  padding: 2.75rem 2.25rem;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
  border-radius: 4px;
}

.login-header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.login-logo {
  max-width: 280px;
  width: 100%;
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
  filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
}

.login-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text-mute);
  text-transform: uppercase;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-mute);
  text-transform: uppercase;
}

.form-input {
  background: var(--navy-deep);
  border: 1px solid var(--border-hot);
  color: var(--text-bright);
  padding: 0.9rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
  outline: none;
  border-radius: 3px;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 20px rgba(59, 130, 246, 0.2);
}

.form-input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

.btn-login {
  background: var(--navy);
  color: var(--text-bright);
  border: 1px solid var(--accent);
  padding: 1rem 1rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
  border-radius: 3px;
}

.btn-login:hover {
  background: var(--accent);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.alert {
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-left: 3px solid;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

.alert-error {
  border-color: var(--red);
  color: #fca5a5;
}

.alert-warning {
  border-color: var(--yellow);
  color: #fcd34d;
}

.login-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.login-footer .status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard {
  min-height: 100vh;
  background: var(--navy-deep);
}

.topbar {
  background: var(--navy-dark);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.topbar-brand img {
  height: 34px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.9rem;
}

.topbar-user .user-name {
  color: var(--text-bright);
  font-weight: 600;
}

.topbar-user .user-role {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin-top: 2px;
}

.topbar-user a {
  color: var(--text-mute);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.topbar-user a:hover {
  color: var(--accent);
}

.dashboard-main {
  padding: 2.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.welcome-card {
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  padding: 2rem;
  text-align: center;
  border-radius: 4px;
}

.welcome-card h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
}

.welcome-card p {
  color: var(--text-mute);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 480px) {
  .login-box { padding: 2rem 1.5rem; }
  .login-logo { max-width: 220px; }
  .login-title { font-size: 1.5rem; }
}

/* =========================================================
   APP SHELL (layout completo del dashboard)
   ========================================================= */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy-deep);
}

.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* === Topbar mejorada === */
.topbar {
  background: var(--navy-dark);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  height: 72px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  justify-self: start;
}

.topbar-brand img {
  height: 38px;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--text-bright);
  line-height: 1;
}

.brand-sub {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 4px;
}

.topbar-clock {
  text-align: center;
  justify-self: center;
}

.clock-time {
  font-size: 1.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-bright);
  letter-spacing: 0.05em;
  line-height: 1;
}

.clock-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  justify-self: end;
}

.user-info {
  text-align: right;
}

.user-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1;
}

.user-role {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-top: 4px;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--border-hot);
  color: var(--text-mute);
  text-decoration: none;
  font-size: 1.1rem;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(239, 68, 68, 0.08);
}

/* === Sidebar === */
.sidebar {
  width: 240px;
  background: var(--navy-dark);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-mute);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 3px;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  position: relative;
}

.nav-item:hover {
  background: rgba(59, 130, 246, 0.06);
  color: var(--text-bright);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--text-bright);
  border-left-color: var(--accent);
}

.nav-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.nav-item.disabled:hover {
  background: transparent;
  color: var(--text-mute);
}

.nav-icon {
  font-size: 1.05rem;
  width: 22px;
  text-align: center;
  color: var(--accent);
  opacity: 0.85;
}

.nav-item.disabled .nav-icon {
  color: var(--text-dim);
}

.nav-label {
  flex: 1;
}

.nav-badge {
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--navy-light);
  color: var(--text-dim);
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0.5rem 0.75rem;
}

.nav-section {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  text-transform: uppercase;
  padding: 0 1rem 0.5rem;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-green {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.status-blue {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* === Content === */
.content {
  flex: 1;
  padding: 2rem 2.5rem;
  overflow-y: auto;
  min-width: 0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  gap: 1rem;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-bright);
}

.page-sub {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-top: 6px;
}

.btn-refresh {
  background: var(--navy-mid);
  border: 1px solid var(--border-hot);
  color: var(--text-bright);
  padding: 0.65rem 1.1rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-refresh:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.refresh-icon {
  font-size: 1rem;
}

/* === Cards de resumen === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border);
  border-left-width: 3px;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.card-green  { border-left-color: var(--green);  }
.card-yellow { border-left-color: var(--yellow); }
.card-red    { border-left-color: var(--red);    }
.card-grey   { border-left-color: var(--text-dim); }

.card-number {
  font-size: 2.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-bright);
  line-height: 1;
}

.card-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-top: 0.75rem;
}

.card-loading .card-skeleton {
  height: 60px;
  background: linear-gradient(90deg, var(--navy-mid) 0%, var(--border-hot) 50%, var(--navy-mid) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 3px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === Panel (caja con título) === */
.panel {
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.panel-header {
  padding: 1.1rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-bright);
  text-transform: uppercase;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auto-refresh {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* === Lista de operadores === */
.operators-list {
  display: flex;
  flex-direction: column;
}

.op-row {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  padding: 1rem 1.5rem;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.op-row:last-child {
  border-bottom: none;
}

.op-row:hover {
  background: rgba(59, 130, 246, 0.04);
}

.op-status {
  display: flex;
  justify-content: center;
}

.op-dot {
  font-size: 1.4rem;
  line-height: 1;
}

.op-green  .op-dot { color: var(--green);    text-shadow: 0 0 12px var(--green); }
.op-yellow .op-dot { color: var(--yellow);   text-shadow: 0 0 12px var(--yellow); }
.op-red    .op-dot { color: var(--red);      text-shadow: 0 0 12px var(--red); }
.op-grey   .op-dot { color: var(--text-dim); }

.op-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
}

.op-estado {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

.op-green  .op-estado { color: var(--green);   }
.op-yellow .op-estado { color: var(--yellow);  }
.op-red    .op-estado { color: var(--red);     }
.op-grey   .op-estado { color: var(--text-dim); }

.op-time {
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-mute);
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-weight: 500;
}

/* === Responsive === */
@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
    height: auto;
    padding: 0.75rem 1rem;
  }
  .topbar-clock { display: none; }
  .sidebar { width: 64px; }
  .nav-label, .nav-badge, .nav-section, .status-line span:last-child { display: none; }
  .nav-item { justify-content: center; padding: 0.85rem; }
  .content { padding: 1.5rem 1rem; }
}

/* =========================================================
   BOTONES
   ========================================================= */

.btn-primary {
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover {
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-mute);
  border: 1px solid var(--border-hot);
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--text-bright);
}

.btn-danger-full {
  background: var(--red);
  color: white;
  border: 1px solid var(--red);
  padding: 0.7rem 1.3rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.btn-danger-full:hover:not(:disabled) {
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.4);
}

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

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--border-hot);
  color: var(--text-mute);
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 3px;
  transition: all 0.15s ease;
  cursor: pointer;
  margin: 0 2px;
}

.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-icon.btn-danger:hover {
  border-color: var(--red);
  color: var(--red);
}

/* =========================================================
   TABLA DE DATOS
   ========================================================= */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table thead th {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.9rem 1.25rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.data-table thead th.th-actions {
  text-align: right;
}

.data-table tbody td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.data-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.04);
}

.data-table tbody tr.row-inactive {
  opacity: 0.5;
}

.cell-name {
  font-weight: 700;
  color: var(--text-bright);
}

.cell-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 3px;
}

.cell-empty {
  color: var(--text-dim);
  font-style: italic;
}

.cell-time {
  font-variant-numeric: tabular-nums;
  color: var(--text-mute);
  font-size: 0.85rem;
}

.td-actions {
  text-align: right;
  white-space: nowrap;
}

code {
  background: var(--navy-deep);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--text-mute);
}

/* === Badges === */

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 3px;
  border: 1px solid;
}

.badge-admin {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--accent);
  color: var(--accent-glow);
}

.badge-monitoreo {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--yellow);
  color: var(--yellow);
}

.badge-operador {
  background: rgba(16, 185, 129, 0.10);
  border-color: var(--green);
  color: var(--green);
}

.badge-active {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--green);
  color: var(--green);
}

.badge-inactive {
  background: rgba(100, 116, 139, 0.12);
  border-color: var(--text-dim);
  color: var(--text-dim);
}

/* =========================================================
   FORMULARIO BODY (interno de panel)
   ========================================================= */

.form-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

select.form-input {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%2394a3b8' d='M6 9L1 4h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-help {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.4;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.pass-mode {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.radio-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-mute);
  cursor: pointer;
}

.radio-line input[type="radio"] {
  accent-color: var(--accent);
}

.pass-preview {
  background: var(--navy-deep);
  border: 1px solid var(--border-hot);
  padding: 1rem;
  border-radius: 3px;
}

.pass-preview-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.pass-preview-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-glow);
  background: transparent;
  border: none;
  padding: 0;
  letter-spacing: 0.05em;
  word-break: break-all;
}

/* =========================================================
   BANNER de contraseña generada
   ========================================================= */

.password-banner {
  border-left: 3px solid var(--yellow);
  background: rgba(245, 158, 11, 0.08);
  color: var(--text-bright);
}

.pass-banner-title {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 0.75rem;
}

.pass-banner-user {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.pass-banner-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.pass-banner-pass {
  flex: 1;
  min-width: 200px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--yellow);
  padding: 0.75rem 1rem;
  border-radius: 3px;
  letter-spacing: 0.05em;
  word-break: break-all;
}

.btn-copy {
  background: var(--yellow);
  color: var(--navy-deep);
  border: none;
  padding: 0.6rem 1.2rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 3px;
  cursor: pointer;
}

.pass-banner-warn {
  font-size: 0.8rem;
  color: var(--text-mute);
}

.alert-success {
  border-color: var(--green);
  color: #6ee7b7;
}

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

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal {
  width: 100%;
  max-width: 480px;
  background: var(--navy-dark);
  border: 1px solid var(--red);
  border-top: 3px solid var(--red);
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(239, 68, 68, 0.15);
}

.modal-title {
  padding: 1.25rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  border-bottom: 1px solid var(--border);
}

.modal-body {
  padding: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-mute);
  line-height: 1.5;
}

.modal-body p {
  margin-bottom: 0.75rem;
}

.modal-warn {
  color: var(--yellow);
  font-weight: 600;
  font-size: 0.85rem;
}

.modal-actions {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
}

/* =========================================================
   ALERTAS
   ========================================================= */

/* --- Botón "Nueva alerta" en header --- */
.btn-alert-new {
  background: var(--red);
  color: white;
  border: 1px solid var(--red);
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 3px;
  transition: all 0.2s ease;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.25);
}

.btn-alert-new:hover {
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

/* --- Listado de alertas --- */
.panel-hot {
  border-left: 3px solid var(--red);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.1);
}

.panel-hot .panel-title {
  color: var(--red);
}

.pulse-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--red);
  border-radius: 50%;
  margin-right: 10px;
  box-shadow: 0 0 12px var(--red);
  animation: pulse-hot 1.2s infinite;
  vertical-align: middle;
}

@keyframes pulse-hot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.alertas-list {
  display: flex;
  flex-direction: column;
}

.alerta-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  padding: 1.1rem 1.5rem;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.15s ease;
}

.alerta-row:last-child { border-bottom: none; }

.alerta-row:hover {
  background: rgba(59, 130, 246, 0.04);
}

.alerta-row-activa:hover {
  background: rgba(239, 68, 68, 0.06);
}

.alerta-num {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.alerta-row-activa .alerta-num {
  color: var(--red);
}

.alerta-titulo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-bright);
}

.alerta-emoji { margin-right: 4px; }

.alerta-ubi {
  color: var(--text-mute);
  font-weight: 500;
  margin-left: 4px;
}

.alerta-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 4px;
  font-weight: 500;
}

.stat-pill {
  display: inline-block;
  padding: 5px 10px;
  background: var(--navy-deep);
  border: 1px solid var(--border-hot);
  border-radius: 3px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-mute);
  white-space: nowrap;
}

.stat-pill.stat-green {
  border-color: var(--green);
  color: var(--green);
  background: rgba(16, 185, 129, 0.08);
}

.empty-state-large {
  padding: 4rem 2rem;
  text-align: center;
}

.empty-state-large .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-large h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

.empty-state-large p {
  color: var(--text-mute);
  font-size: 0.9rem;
}

/* =========================================================
   FORMULARIO DE NUEVA ALERTA
   ========================================================= */

.alert-form {
  display: flex;
  flex-direction: column;
}

/* --- Grid de tipos --- */
.tipo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  padding: 1.25rem;
}

.tipo-btn {
  background: var(--navy-deep);
  border: 2px solid var(--border-hot);
  color: var(--text-bright);
  padding: 1.5rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.tipo-btn:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.tipo-btn.selected {
  border-color: var(--red);
  background: rgba(239, 68, 68, 0.12);
  color: var(--text-bright);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
}

.tipo-emoji {
  font-size: 2rem;
  line-height: 1;
}

.tipo-nombre {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Grid de ubicaciones --- */
.ubi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  padding: 1.25rem;
}

.ubi-btn {
  background: var(--navy-deep);
  border: 2px solid var(--border-hot);
  color: var(--text-bright);
  padding: 1.1rem 1.25rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
}

.ubi-btn:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.ubi-btn.selected {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.15);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.ubi-pin {
  font-size: 1.2rem;
}

.ubi-nombre {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.ubi-coords {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* --- Barra inferior de ACTIVAR --- */
.activate-bar {
  position: sticky;
  bottom: 0;
  background: var(--navy-dark);
  border: 1px solid var(--red);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.activate-summary {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-mute);
  flex: 1;
  min-width: 0;
}

.btn-activate {
  background: var(--red);
  color: white;
  border: 2px solid var(--red);
  padding: 1.1rem 2rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s ease;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.3);
  white-space: nowrap;
}

.btn-activate:hover:not(:disabled) {
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.6);
  transform: translateY(-1px);
}

.btn-activate:disabled {
  background: var(--navy-mid);
  border-color: var(--border-hot);
  color: var(--text-dim);
  box-shadow: none;
  cursor: not-allowed;
}

/* --- Modal de alerta --- */
.modal-alert {
  border-color: var(--red);
  border-top-color: var(--red);
}

.modal-alert .modal-title {
  color: var(--red);
}

.confirm-summary {
  background: var(--navy-deep);
  border: 1px solid var(--border-hot);
  padding: 1rem 1.25rem;
  border-radius: 3px;
  font-size: 1.05rem;
  color: var(--text-bright);
  margin: 1rem 0;
}

.btn-activate-confirm {
  background: var(--red);
  color: white;
  border: 1px solid var(--red);
  padding: 0.8rem 1.5rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.btn-activate-confirm:hover:not(:disabled) {
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.5);
}

.btn-activate-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =========================================================
   DETALLE DE ALERTA
   ========================================================= */

.badge-status {
  display: inline-block;
  padding: 5px 12px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 3px;
  margin-left: 0.5rem;
  vertical-align: middle;
  border: 1px solid;
}

.badge-status-active {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--red);
  color: var(--red);
}

.badge-status-closed {
  background: rgba(100, 116, 139, 0.12);
  border-color: var(--text-dim);
  color: var(--text-dim);
}

.alert-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.25rem;
}

.alert-info-body {
  padding: 0.5rem 0;
}

.info-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  padding: 0.85rem 1.5rem;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.info-row:last-child { border-bottom: none; }

.info-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  padding-top: 3px;
}

.info-value {
  font-size: 0.95rem;
  color: var(--text-bright);
  font-weight: 600;
}

.info-coords {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

.info-desc {
  font-weight: 500;
  color: var(--text-mute);
  white-space: pre-wrap;
  line-height: 1.5;
}

.btn-nav {
  display: inline-block;
  background: var(--navy-deep);
  border: 1px solid var(--border-hot);
  color: var(--text-bright);
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 3px;
  margin-right: 0.5rem;
  transition: all 0.15s ease;
}

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

.panel-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.btn-close-alert {
  width: 100%;
  background: var(--navy-mid);
  color: var(--text-bright);
  border: 1px solid var(--yellow);
  padding: 0.9rem 1.25rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.btn-close-alert:hover {
  background: var(--yellow);
  color: var(--navy-deep);
}

/* --- Cards de respuestas --- */
.resp-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.resp-card {
  background: var(--navy-deep);
  border: 1px solid var(--border);
  border-left-width: 3px;
  padding: 0.85rem 0.75rem;
  border-radius: 3px;
  text-align: center;
}

.resp-card-green  { border-left-color: var(--green);    }
.resp-card-yellow { border-left-color: var(--yellow);   }
.resp-card-red    { border-left-color: var(--red);      }
.resp-card-grey   { border-left-color: var(--text-dim); }

.resp-card-num {
  font-size: 1.6rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-bright);
  line-height: 1;
}

.resp-card-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-top: 6px;
}

.resp-list {
  display: flex;
  flex-direction: column;
}

@media (max-width: 1000px) {
  .alert-detail-grid { grid-template-columns: 1fr; }
  .resp-cards { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   CENTRO DE MANDO - SISTEMA DE ESTADOS
   ========================================================= */

/* Variables por nivel */
:root {
  --estado-verde:    #10b981;
  --estado-amarillo: #f59e0b;
  --estado-naranja:  #f97316;
  --estado-rojo:     #ef4444;
}

/* ===== Shell principal: 3 columnas ===== */
.estado-shell {
  display: grid;
  grid-template-columns: 220px 1fr 320px;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  min-height: 320px;
}

/* === Columna izquierda: controles === */
.estado-controles {
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.control-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.control-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.ctrl-btn {
  background: var(--navy-deep);
  border: 2px solid var(--border-hot);
  color: var(--text-bright);
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: all 0.15s ease;
}

.ctrl-btn:hover:not(:disabled):not(.current) {
  transform: translateX(2px);
}

.ctrl-btn.current {
  cursor: default;
  opacity: 0.95;
}

.ctrl-btn:disabled:not(.current) {
  opacity: 0.45;
  cursor: not-allowed;
}

.ctrl-verde:hover:not(:disabled)    { border-color: var(--estado-verde);    box-shadow: 0 0 18px rgba(16,185,129,0.25); }
.ctrl-amarillo:hover:not(:disabled) { border-color: var(--estado-amarillo); box-shadow: 0 0 18px rgba(245,158,11,0.25); }
.ctrl-naranja:hover:not(:disabled)  { border-color: var(--estado-naranja);  box-shadow: 0 0 18px rgba(249,115,22,0.25); }
.ctrl-rojo:hover:not(:disabled)     { border-color: var(--estado-rojo);     box-shadow: 0 0 22px rgba(239,68,68,0.3); }

.ctrl-btn.current.ctrl-verde    { border-color: var(--estado-verde);    background: rgba(16,185,129,0.10); }
.ctrl-btn.current.ctrl-amarillo { border-color: var(--estado-amarillo); background: rgba(245,158,11,0.10); }
.ctrl-btn.current.ctrl-naranja  { border-color: var(--estado-naranja);  background: rgba(249,115,22,0.12); }
.ctrl-btn.current.ctrl-rojo     { border-color: var(--estado-rojo);     background: rgba(239,68,68,0.12); }

.ctrl-emoji  { font-size: 1.5rem; line-height: 1; }
.ctrl-nombre { flex: 1; text-align: left; }

/* === Columna central: bandera ===*/
.estado-bandera {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.4s ease;
}

.bandera-color {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.5rem;
  position: relative;
  text-align: center;
  transition: all 0.4s ease;
}

.bandera-pulse {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

/* Colores por nivel */
.estado-shell-verde .bandera-color {
  background: linear-gradient(180deg, rgba(16,185,129,0.18), rgba(16,185,129,0.06));
}
.estado-shell-amarillo .bandera-color {
  background: linear-gradient(180deg, rgba(245,158,11,0.22), rgba(245,158,11,0.08));
}
.estado-shell-naranja .bandera-color {
  background: linear-gradient(180deg, rgba(249,115,22,0.25), rgba(249,115,22,0.10));
}
.estado-shell-rojo .bandera-color {
  background: linear-gradient(180deg, rgba(239,68,68,0.30), rgba(239,68,68,0.12));
}

.estado-shell-rojo .bandera-pulse {
  opacity: 1;
  background: radial-gradient(circle at center, rgba(239,68,68,0.25) 0%, transparent 70%);
  animation: bandera-pulse 1.4s infinite;
}

@keyframes bandera-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.05); }
}

.bandera-emoji {
  font-size: 5rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 20px rgba(0,0,0,0.4));
  z-index: 1;
}

.bandera-nombre {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--text-bright);
  z-index: 1;
  margin-bottom: 0.4rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.bandera-desc {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-mute);
  letter-spacing: 0.05em;
  z-index: 1;
}

.bandera-meta {
  padding: 0.85rem 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.bandera-num {
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.bandera-since {
  color: var(--text-mute);
  font-weight: 600;
}

/* === Columna derecha: info === */
.estado-info {
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.info-titulo {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.info-row-v {
  padding: 0.65rem 0;
  border-bottom: 1px dashed var(--border);
}

.info-row-v:last-child { border-bottom: none; }

.info-row-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.info-row-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.4;
  word-break: break-word;
}

.info-texto {
  font-weight: 500;
  color: var(--text-mute);
  white-space: pre-wrap;
}

.info-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
}

.info-empty-icon {
  font-size: 3rem;
  color: var(--estado-verde);
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.info-empty-text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.info-empty-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ===== Checklist de pasos ===== */
.panel-checklist {
  margin-bottom: 1.25rem;
}

.pasos-progreso {
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-bright);
  letter-spacing: 0.05em;
  background: var(--navy-deep);
  padding: 4px 12px;
  border-radius: 3px;
  border: 1px solid var(--border-hot);
}

.checklist {
  padding: 0.5rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.check-row:hover {
  background: rgba(59, 130, 246, 0.05);
}

.check-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-hot);
  border-radius: 3px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s ease;
}

.check-row:hover .check-box {
  border-color: var(--accent);
}

.check-row.check-done .check-box {
  background: var(--accent);
  border-color: var(--accent);
}

.check-row.check-done .check-box::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  color: white;
  font-size: 14px;
  font-weight: 900;
}

.check-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  flex: 1;
}

.check-row.check-done .check-text {
  text-decoration: line-through;
  color: var(--text-dim);
  font-weight: 500;
}

/* ===== Panel de respuestas (rojo) ===== */
.panel-respuestas {
  border-left: 3px solid var(--estado-rojo);
}

.panel-respuestas .panel-title {
  color: var(--estado-rojo);
}

/* ===== Modal grande ===== */
.modal-large {
  max-width: 560px;
}

.modal-info {
  color: var(--text-mute);
  margin-bottom: 1rem;
}

.btn-confirmar {
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
  padding: 0.8rem 1.5rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.btn-confirmar:hover:not(:disabled) {
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
}

.btn-confirmar:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.estado-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .estado-shell {
    grid-template-columns: 1fr;
  }
  .estado-controles, .estado-info {
    min-height: auto;
  }
  .control-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .ctrl-btn {
    flex: 1;
    min-width: 140px;
  }
}

/* =========================================================
   CENTRO DE MANDO - DISEÑO DE EMERGENCIA
   Botones grandes, colores plenos, texto legible bajo estrés.
   ========================================================= */

/* === FONDO DE PANTALLA por estado === */
body.body-estado-verde,
body.body-estado-amarillo,
body.body-estado-naranja,
body.body-estado-rojo {
  transition: background 0.6s ease;
}

body.body-estado-verde {
  background:
    radial-gradient(ellipse at top left, rgba(16,185,129,0.18) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(16,185,129,0.10) 0%, transparent 50%),
    var(--navy-deep);
}
body.body-estado-amarillo {
  background:
    radial-gradient(ellipse at top, rgba(245,158,11,0.25) 0%, transparent 55%),
    radial-gradient(ellipse at bottom, rgba(245,158,11,0.12) 0%, transparent 55%),
    #1a1408;
}
body.body-estado-naranja {
  background:
    radial-gradient(ellipse at top, rgba(249,115,22,0.30) 0%, transparent 55%),
    radial-gradient(ellipse at bottom, rgba(249,115,22,0.14) 0%, transparent 55%),
    #1a0d05;
}
body.body-estado-rojo {
  background:
    radial-gradient(ellipse at top, rgba(239,68,68,0.40) 0%, transparent 60%),
    radial-gradient(ellipse at bottom, rgba(239,68,68,0.18) 0%, transparent 55%),
    #1a0808;
  animation: rojo-pulse 2.5s ease-in-out infinite;
}

@keyframes rojo-pulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.18); }
}

/* La capa estado-bg ya no la necesitamos como elemento separado, pero la dejamos invisible */
.estado-bg { display: none; }

/* =========================================================
   HERO BANNER (la "bandera" gigante)
   ========================================================= */
.hero-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid;
  position: relative;
  overflow: hidden;
}

body.body-estado-verde    .hero-banner { border-color: var(--estado-verde);    box-shadow: 0 0 50px rgba(16,185,129,0.25); }
body.body-estado-amarillo .hero-banner { border-color: var(--estado-amarillo); box-shadow: 0 0 50px rgba(245,158,11,0.35); }
body.body-estado-naranja  .hero-banner { border-color: var(--estado-naranja);  box-shadow: 0 0 50px rgba(249,115,22,0.40); }
body.body-estado-rojo     .hero-banner {
  border-color: var(--estado-rojo);
  box-shadow: 0 0 60px rgba(239,68,68,0.50);
  animation: hero-rojo 1.5s ease-in-out infinite;
}

@keyframes hero-rojo {
  0%, 100% { box-shadow: 0 0 60px rgba(239,68,68,0.50); }
  50%      { box-shadow: 0 0 90px rgba(239,68,68,0.85); }
}

.hero-emoji {
  font-size: 8rem;
  line-height: 1;
  filter: drop-shadow(0 0 25px rgba(0,0,0,0.4));
}

.hero-info { min-width: 0; }

.hero-label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.5rem;
}

.hero-nombre {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: white;
  text-shadow: 0 3px 20px rgba(0,0,0,0.5);
}

body.body-estado-verde    .hero-nombre { color: #6ee7b7; }
body.body-estado-amarillo .hero-nombre { color: #fcd34d; }
body.body-estado-naranja  .hero-nombre { color: #fdba74; }
body.body-estado-rojo     .hero-nombre { color: #fca5a5; }

.hero-desc {
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.02em;
}

.hero-meta {
  text-align: right;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
}

.hero-meta-num {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: white;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.hero-meta-time {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
}

/* =========================================================
   INFO BAR del evento
   ========================================================= */
.evento-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 2rem;
}

.evt-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.evt-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.evt-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
  word-break: break-word;
}

/* =========================================================
   BIGBOARD - botones gigantes de cambio
   ========================================================= */
.bigboard-section {
  margin-bottom: 2rem;
}

.bigboard-label {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-align: center;
}

.bigboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.bigbtn {
  background: rgba(0,0,0,0.4);
  border: 3px solid;
  color: white;
  padding: 2rem 1rem;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  min-height: 160px;
  position: relative;
  overflow: hidden;
}

.bigbtn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.bigbtn-verde    { border-color: var(--estado-verde);    }
.bigbtn-amarillo { border-color: var(--estado-amarillo); }
.bigbtn-naranja  { border-color: var(--estado-naranja);  }
.bigbtn-rojo     { border-color: var(--estado-rojo);     }

.bigbtn-verde::before    { background: radial-gradient(circle, rgba(16,185,129,0.30), transparent 70%); }
.bigbtn-amarillo::before { background: radial-gradient(circle, rgba(245,158,11,0.30), transparent 70%); }
.bigbtn-naranja::before  { background: radial-gradient(circle, rgba(249,115,22,0.30), transparent 70%); }
.bigbtn-rojo::before     { background: radial-gradient(circle, rgba(239,68,68,0.35),  transparent 70%); }

.bigbtn:hover:not(:disabled)::before {
  opacity: 1;
}

.bigbtn:hover:not(:disabled) {
  transform: translateY(-4px);
}

.bigbtn-verde:hover:not(:disabled)    { box-shadow: 0 10px 40px rgba(16,185,129,0.45); }
.bigbtn-amarillo:hover:not(:disabled) { box-shadow: 0 10px 40px rgba(245,158,11,0.50); }
.bigbtn-naranja:hover:not(:disabled)  { box-shadow: 0 10px 40px rgba(249,115,22,0.55); }
.bigbtn-rojo:hover:not(:disabled)     { box-shadow: 0 10px 50px rgba(239,68,68,0.65); }

.bigbtn.current {
  cursor: default;
  opacity: 0.55;
  transform: none;
}

.bigbtn.current::before {
  opacity: 0.6;
}

.bigbtn.current::after {
  content: 'ACTUAL';
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.85);
  color: #000;
  padding: 3px 8px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  border-radius: 3px;
  z-index: 2;
}

.bigbtn:disabled:not(.current) {
  opacity: 0.3;
  cursor: not-allowed;
}

.bigbtn-emoji {
  font-size: 3.5rem;
  line-height: 1;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 12px rgba(0,0,0,0.4));
}

.bigbtn-name {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  position: relative;
  z-index: 1;
}

/* =========================================================
   PROCEDIMIENTOS - Checklist gigante
   ========================================================= */
.procedimientos-section {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.proc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.proc-titulo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: white;
}

.proc-progreso {
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: white;
  background: rgba(255,255,255,0.12);
  padding: 8px 18px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
}

.proc-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.proc-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255,255,255,0.15);
  color: white;
  padding: 1.1rem 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  font-family: inherit;
  width: 100%;
}

.proc-item:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255,255,255,0.4);
}

.proc-item.proc-done {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--estado-verde);
}

.proc-check {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.proc-done .proc-check {
  background: var(--estado-verde);
  border-color: var(--estado-verde);
}

.proc-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: 1;
}

.proc-done .proc-text {
  text-decoration: line-through;
  opacity: 0.7;
}

/* =========================================================
   RESPUESTAS - Big cards y lista de personas
   ========================================================= */
.respuestas-section {
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid var(--estado-rojo);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.resp-titulo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: white;
  margin-bottom: 1.25rem;
  text-align: center;
}

.resp-bigcards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.resp-bigcard {
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid;
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-align: center;
}

.resp-bc-green  { border-color: var(--estado-verde);    }
.resp-bc-yellow { border-color: var(--estado-amarillo); }
.resp-bc-red    { border-color: var(--estado-rojo);     }
.resp-bc-grey   { border-color: rgba(255,255,255,0.3);  }

.resp-bc-num {
  font-size: 3rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: white;
  line-height: 1;
}

.resp-bc-label {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  margin-top: 0.6rem;
}

.resp-people-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
}

.resp-person {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255,255,255,0.05);
  border: 2px solid;
  border-radius: 6px;
  padding: 0.9rem 1rem;
}

.pers-green  { border-color: var(--estado-verde);    background: rgba(16,185,129,0.10); }
.pers-yellow { border-color: var(--estado-amarillo); background: rgba(245,158,11,0.10); }
.pers-red    { border-color: var(--estado-rojo);     background: rgba(239,68,68,0.10); }
.pers-grey   { border-color: rgba(255,255,255,0.25);                                     }

.pers-icon { font-size: 1.5rem; }

.pers-name {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  color: white;
}

.pers-status {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.85);
}

.resp-empty {
  padding: 2rem;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
}

/* =========================================================
   MODAL GRANDE - Botones grandes, sin desplegables
   ========================================================= */
.modal-big {
  background: rgba(10, 14, 26, 0.97);
  border: 3px solid;
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
}

.modal-big-verde     { border-color: var(--estado-verde);    box-shadow: 0 30px 80px rgba(16,185,129,0.25); }
.modal-big-amarillo  { border-color: var(--estado-amarillo); box-shadow: 0 30px 80px rgba(245,158,11,0.35); }
.modal-big-naranja   { border-color: var(--estado-naranja);  box-shadow: 0 30px 80px rgba(249,115,22,0.40); }
.modal-big-rojo      { border-color: var(--estado-rojo);     box-shadow: 0 30px 80px rgba(239,68,68,0.50);  }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 1.7rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: rgba(255,255,255,0.18);
  transform: rotate(90deg);
}

.modal-big-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.modal-big-emoji {
  font-size: 4.5rem;
  line-height: 1;
}

.modal-big-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.modal-big-title {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: white;
  line-height: 1;
}

.modal-big-amarillo .modal-big-title { color: #fcd34d; }
.modal-big-naranja  .modal-big-title { color: #fdba74; }
.modal-big-rojo     .modal-big-title { color: #fca5a5; }
.modal-big-verde    .modal-big-title { color: #6ee7b7; }

.modal-step { margin-bottom: 1.5rem; }
.modal-step:last-of-type { margin-bottom: 1.5rem; }

.modal-step-label {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

/* === Razones como botones grandes === */
.razones-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.razon-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.18);
  color: white;
  padding: 1.1rem 1.25rem;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  text-align: left;
}

.razon-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.4);
}

.razon-btn.selected {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.3);
}

.modal-big-amarillo .razon-btn.selected {
  background: rgba(245,158,11,0.18);
  border-color: var(--estado-amarillo);
  box-shadow: 0 0 25px rgba(245,158,11,0.35);
}

.modal-big-naranja .razon-btn.selected {
  background: rgba(249,115,22,0.18);
  border-color: var(--estado-naranja);
  box-shadow: 0 0 25px rgba(249,115,22,0.4);
}

.modal-big-rojo .razon-btn.selected {
  background: rgba(239,68,68,0.22);
  border-color: var(--estado-rojo);
  box-shadow: 0 0 30px rgba(239,68,68,0.5);
}

.razon-text { flex: 1; letter-spacing: 0.02em; }

.razon-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  padding: 4px 9px;
  border-radius: 3px;
}

/* === Lugares como botones === */
.lugares-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem;
}

.lugar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.18);
  color: white;
  padding: 1rem 0.75rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.lugar-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.4);
}

.lugar-btn.selected {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.lugar-pin { font-size: 1.5rem; }

.lugar-nombre {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* === Textarea grande === */
.big-textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.2);
  color: white;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 6px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease;
}

.big-textarea:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
}

.big-textarea::placeholder { color: rgba(255,255,255,0.4); }

.step-help {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
}

/* === BOTÓN MEGA CONFIRM === */
.btn-mega-confirm {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  padding: 1.4rem;
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-top: 1rem;
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.35);
}

.modal-big-amarillo .btn-mega-confirm { background: var(--estado-amarillo); color: #1a1408; box-shadow: 0 6px 25px rgba(245,158,11,0.45); }
.modal-big-naranja  .btn-mega-confirm { background: var(--estado-naranja);  box-shadow: 0 6px 25px rgba(249,115,22,0.55); }
.modal-big-rojo     .btn-mega-confirm { background: var(--estado-rojo);     box-shadow: 0 6px 30px rgba(239,68,68,0.65); }

.btn-mega-green {
  background: var(--estado-verde) !important;
  box-shadow: 0 6px 25px rgba(16,185,129,0.45) !important;
}

.btn-mega-confirm:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-mega-confirm:disabled {
  background: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.4) !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

/* === Responsive === */
@media (max-width: 900px) {
  .hero-banner { grid-template-columns: 1fr; text-align: center; padding: 1.5rem 1rem; }
  .hero-emoji { font-size: 5rem; }
  .hero-nombre { font-size: 2.5rem; }
  .bigboard-grid { grid-template-columns: repeat(2, 1fr); }
  .bigbtn { min-height: 130px; padding: 1.5rem 0.75rem; }
  .bigbtn-emoji { font-size: 2.5rem; }
  .bigbtn-name { font-size: 1rem; }
  .resp-bigcards { grid-template-columns: repeat(2, 1fr); }
  .modal-big-title { font-size: 1.8rem; }
  .proc-text { font-size: 1rem; }
}

/* =========================================================
   MAPA Y PINES (Leaflet)
   ========================================================= */

.mapa-section {
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid var(--estado-rojo);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.mapa-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.mapa-titulo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: white;
}

.mapa-info {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.08);
  padding: 6px 14px;
  border-radius: 4px;
}

.mapa-canvas {
  width: 100%;
  height: 480px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  overflow: hidden;
  background: #1a1a1a;
}

.mapa-leyenda {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.leyenda-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
}

.leyenda-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.leyenda-evento   { background: var(--estado-rojo); box-shadow: 0 0 8px var(--estado-rojo); }
.leyenda-operador { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* Pines personalizados */
.mapa-pin-evento, .mapa-pin-operador {
  background: transparent !important;
  border: none !important;
}

.pin-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 3px solid white;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  transform: translate(0, -10px);
}

.pin-icon-evento {
  background: var(--estado-rojo);
  animation: pin-pulse-evento 1.2s infinite;
  width: 44px;
  height: 44px;
}

@keyframes pin-pulse-evento {
  0%, 100% { box-shadow: 0 4px 14px rgba(0,0,0,0.5), 0 0 0 0 rgba(239,68,68,0.7); }
  50%      { box-shadow: 0 4px 14px rgba(0,0,0,0.5), 0 0 0 18px rgba(239,68,68,0); }
}

.pin-icon-operador {
  background: var(--accent);
}

/* Quitar fondo blanco que Leaflet a veces pone en tooltips */
.leaflet-popup-content-wrapper {
  background: rgba(10, 14, 26, 0.95);
  color: white;
  border-radius: 6px;
}
.leaflet-popup-content {
  color: white;
  font-weight: 600;
}
.leaflet-popup-tip {
  background: rgba(10, 14, 26, 0.95);
}

/* ETA inline en lista de operadores */
.pers-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pers-eta {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--green);
  letter-spacing: 0.02em;
  margin-top: 4px;
}

.pers-eta-wait {
  color: rgba(255,255,255,0.55);
  font-weight: 600;
}

/* Ajuste de la disposición de resp-person para ETA */
.resp-person {
  align-items: flex-start;
}
.pers-icon { padding-top: 2px; }

/* =========================================================
   PLANTILLAS, EQUIPOS, MI CUENTA
   ========================================================= */

.info-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-mute);
  line-height: 1.5;
}

.info-box code {
  background: rgba(0,0,0,0.3);
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 0.85em;
  color: var(--accent);
}

.plantilla-desc {
  font-size: 0.9rem;
  color: var(--text-mute);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.plantilla-vars {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
}

.plantilla-vars code {
  background: rgba(0,0,0,0.3);
  padding: 2px 7px;
  border-radius: 3px;
  color: var(--accent);
}

.plantilla-textarea {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace !important;
  font-size: 0.88rem !important;
  line-height: 1.5;
  resize: vertical;
}

.plantilla-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-right: auto;
}

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

.miembro-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  background: var(--navy-deep);
  border: 1px solid var(--border-hot);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.92rem;
  color: var(--text-bright);
}

.miembro-check:hover {
  border-color: var(--accent);
}

.miembro-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.texto-ref {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-mute);
  white-space: pre-wrap;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  line-height: 1.5;
}

.radio-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-bright);
  cursor: pointer;
}

.radio-line input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.user-info-link {
  text-decoration: none;
  transition: opacity 0.15s ease;
  cursor: pointer;
}

.user-info-link:hover {
  opacity: 0.75;
}

.cell-empty {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-style: italic;
}

.op-dron .op-dot { color: var(--accent); text-shadow: 0 0 12px var(--accent); }
.op-dron .op-estado { color: var(--accent); }
