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

/* ==============================
   DESIGN TOKENS
   ============================== */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.6);
  --bg-card-hover: rgba(25, 35, 55, 0.8);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(99, 179, 237, 0.15);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #64748b;

  --accent-cyan: #22d3ee;
  --accent-blue: #3b82f6;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-green: #34d399;
  --accent-amber: #fbbf24;
  --accent-red: #f87171;

  --gradient-main: linear-gradient(135deg, #22d3ee, #3b82f6, #a855f7);
  --gradient-card: linear-gradient(135deg, rgba(34,211,238,0.08), rgba(59,130,246,0.04));
  --gradient-success: linear-gradient(135deg, #34d399, #22d3ee);
  --gradient-warning: linear-gradient(135deg, #fbbf24, #f97316);
  --gradient-danger: linear-gradient(135deg, #f87171, #ec4899);
  --gradient-info: linear-gradient(135deg, #3b82f6, #a855f7);

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow-cyan: 0 0 30px rgba(34,211,238,0.15);
  --shadow-glow-blue: 0 0 30px rgba(59,130,246,0.15);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --sidebar-width: 300px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==============================
   RESET & BASE
   ============================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { font-size: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==============================
   AMBIENT BACKGROUND
   ============================== */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-ambient .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: orbFloat 20s ease-in-out infinite alternate;
}

.bg-ambient .orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(34,211,238,0.12), transparent 70%);
  top: -15%; right: -10%;
  animation-delay: 0s;
}

.bg-ambient .orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(168,85,247,0.1), transparent 70%);
  bottom: -10%; left: -5%;
  animation-delay: -7s;
}

.bg-ambient .orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(59,130,246,0.08), transparent 70%);
  top: 40%; left: 30%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -20px) scale(1.05); }
  66%  { transform: translate(-20px, 15px) scale(0.95); }
  100% { transform: translate(10px, -10px) scale(1.02); }
}

/* ==============================
   LOGIN SCREEN
   ============================== */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.login-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.4)), url('../assets/bg-final-3d.png');
  background-size: cover;
  background-position: center;
  filter: blur(5px); /* Desenfoque del fondo */
  transform: scale(1.1); /* Evita bordes blancos por el blur */
  z-index: -1;
}

.login-card {
  position: relative;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(25px);
  padding: 3rem 2.5rem;
  border-radius: var(--radius-xl);
  width: 400px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: loginAppear 0.8s var(--transition-smooth) forwards;
}

.login-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-xl);
  background: var(--gradient-main);
  z-index: -1;
  opacity: 0.15;
}

@keyframes loginAppear {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -1px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
}

.login-input {
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 8px;
  font-weight: 600;
  outline: none;
  transition: var(--transition-fast);
  margin-bottom: 1.5rem;
}

.login-input.user-input {
  letter-spacing: 0 !important;
  text-align: left !important;
  font-size: 0.95rem;
  padding: 12px 20px;
  font-weight: 500;
}

.login-input::placeholder {
  letter-spacing: 0;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.login-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.1);
}

.login-error {
  color: var(--accent-red);
  font-size: 0.8rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  display: none;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

#login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
}

.g_id_signin {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  margin: 0 auto !important;
  text-align: center;
}

.g_id_signin > div,
.g_id_signin iframe {
  margin: 0 auto !important;
}

.local-login-wrapper {
  margin-top: 1.2rem;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-glass);
}

.hidden-form {
  display: none;
}

.hidden-form.visible {
  display: block;
}

.btn-block {
  width: 100%;
  margin-top: 0.5rem;
}

/* ==============================
   BUTTONS
   ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  outline: none;
}

.btn-primary {
  background: var(--gradient-main);
  color: white;
  box-shadow: 0 4px 15px rgba(34,211,238,0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(34,211,238,0.3);
}

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

.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
  border-radius: 10px;
}

.btn-block { width: 100%; }

.btn-danger {
  background: var(--gradient-danger);
  color: white;
}

/* ==============================
   FORMS & INPUTS
   ============================== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.search-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-input {
  max-width: 500px;
  border-radius: 50px;
  padding-left: 1.5rem;
}

/* ==============================
   FILTER CHIPS
   ============================== */
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.chip.active {
  background: rgba(34, 211, 238, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ==============================
   ADMIN SPECIFIC
   ============================== */
.auth-input-container {
  display: flex;
  gap: 10px;
  margin-bottom: 1.25rem;
}

/* ==============================
   APP LAYOUT
   ============================== */
.app-shell {
  display: none;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.app-shell.visible {
  display: grid;
}

/* ==============================
   SIDEBAR
   ============================== */
.sidebar {
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(30px);
  border-right: 1px solid var(--border-glass);
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.5px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0 0.75rem;
  margin-bottom: 0.4rem;
}

.sidebar-tagline {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 0.75rem;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.7;
}

.nav-section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  padding: 0 0.75rem;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
}

.nav-item:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(34,211,238,0.08);
  color: var(--accent-cyan);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 0 4px 4px 0;
  background: var(--gradient-main);
}

.nav-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: rgba(248,113,113,0.15);
  color: var(--accent-red);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

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

.sidebar-footer-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.sidebar-footer-text .highlight {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* ==============================
   MAIN CONTENT
   ============================== */
.main-content {
  padding: 2rem 2.5rem;
  overflow-y: auto;
  height: 100vh;
  width: 100%;
  max-width: 100%; /* Asegurar que use todo el ancho */
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

.page-actions {
  display: flex;
  gap: 10px;
}

.page-header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.page-header-tools .page-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.presence-shell {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 0 1.5rem auto;
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: rgba(10, 14, 26, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 10px 32px rgba(2, 6, 23, 0.32);
  backdrop-filter: blur(18px);
}

.page-header-tools .presence-shell {
  position: static;
  top: auto;
  margin: 0;
  flex-shrink: 0;
}

.presence-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  white-space: nowrap;
}

.presence-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: #d1fae5;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.presence-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-green);
  box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.12);
  flex: 0 0 auto;
}

.presence-summary {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
}

.presence-bubbles {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-left: 0.35rem;
}

.presence-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
  text-transform: uppercase;
}

.presence-avatar + .presence-avatar {
  margin-left: -10px;
}

.presence-avatar.is-self {
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.28), var(--shadow-sm);
}

.presence-avatar-more {
  background: rgba(30, 41, 59, 0.92);
  color: var(--text-primary);
}

.presence-avatar-count {
  position: absolute;
  right: -2px;
  bottom: -2px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid var(--bg-primary);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-primary);
  font-size: 0.62rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ==============================
   STAT CARDS
   ============================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  width: 100%;
}

.stat-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.stat-card .stat-icon.cyan  { background: rgba(34,211,238,0.1); }
.stat-card .stat-icon.green { background: rgba(52,211,153,0.1); }
.stat-card .stat-icon.amber { background: rgba(251,191,36,0.1); }
.stat-card .stat-icon.red   { background: rgba(248,113,113,0.1); }
.stat-card .stat-icon.blue  { background: rgba(59,130,246,0.1); }
.stat-card .stat-icon.purple { background: rgba(168,85,247,0.1); }

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

.stat-value.cyan   { color: var(--accent-cyan); }
.stat-value.green  { color: var(--accent-green); }
.stat-value.amber  { color: var(--accent-amber); }
.stat-value.red    { color: var(--accent-red); }
.stat-value.blue   { color: var(--accent-blue); }
.stat-value.purple { color: var(--accent-purple); }

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

.stat-card .stat-glow {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.15;
}

.stat-glow.cyan   { background: var(--accent-cyan); }
.stat-glow.green  { background: var(--accent-green); }
.stat-glow.amber  { background: var(--accent-amber); }
.stat-glow.red    { background: var(--accent-red); }

/* ==============================
   SECTION TITLE
   ============================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.section-count {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.section-summary-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.dash-device-breakdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.dash-breakdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1;
}

.dash-breakdown-pill strong {
  color: var(--text-primary);
  font-size: 0.78rem;
}

.report-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.report-tab {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  padding: 0.85rem 1.1rem;
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.report-tab:hover {
  border-color: rgba(34,211,238,0.35);
  color: var(--text-primary);
}

.report-tab.active {
  background: linear-gradient(135deg, rgba(34,211,238,0.16), rgba(59,130,246,0.14));
  border-color: rgba(34,211,238,0.35);
  color: var(--accent-cyan);
  box-shadow: 0 12px 26px rgba(2, 132, 199, 0.12);
}

.report-search-shell {
  margin-bottom: 1rem;
}

.report-view {
  display: none;
}

.report-view.active {
  display: block;
}

.report-mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.report-mini-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 0.95rem 1rem;
}

.report-mini-stat strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.1;
}

.report-mini-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.protocol-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 1.1rem 1.1rem 1rem;
}

.protocol-card h3 {
  margin-bottom: 0.55rem;
  font-size: 1rem;
}

.protocol-card p {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.55;
}

.report-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.report-badge.manual {
  background: rgba(59,130,246,0.12);
  color: #93c5fd;
}

.report-badge.inferido {
  background: rgba(251,191,36,0.12);
  color: var(--accent-amber);
}

.report-muted {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ==============================
   DEVICE CARDS
   ============================== */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.device-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition-smooth);
  overflow: hidden;
  animation: cardSlideIn 0.5s ease forwards;
  opacity: 0;
  display: flex;
  flex-direction: column;
}

.device-card:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.kit-logistico-header {
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.kit-logistico-header .page-title {
  font-size: clamp(1.7rem, 2vw, 2.25rem);
}

.kit-panel-note,
.kit-comments-field span {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.kit-delivery-panel {
  margin-bottom: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at top right, rgba(124,58,237,0.12), transparent 34%),
    linear-gradient(135deg, rgba(15,23,42,0.86), rgba(17,24,39,0.68));
}

.kit-delivery-panel-head,
.kit-delivery-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.kit-delivery-panel-head {
  margin-bottom: 0.8rem;
}

.kit-delivery-panel-head .section-title {
  margin: 0;
  font-size: 1rem;
}

.kit-panel-note {
  margin: 0.2rem 0 0;
  text-transform: none;
  font-weight: 600;
}

.kit-delivery-launch-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 36%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(20, 27, 40, 0.78));
  box-shadow: 0 18px 48px rgba(2, 8, 23, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.kit-delivery-launch-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.28;
}

.kit-launch-icon,
.kit-launch-copy,
.kit-launch-action {
  position: relative;
  z-index: 1;
}

.kit-launch-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 241, 254, 0.56);
  border-radius: var(--radius-sm);
  background: rgba(0, 241, 254, 0.09);
  color: var(--accent-cyan);
  box-shadow: 0 0 22px rgba(0, 241, 254, 0.12);
}

.kit-launch-icon .material-symbols-outlined {
  font-size: 25px;
}

.kit-launch-copy .section-title {
  margin: 0;
  font-size: 1.05rem;
}

.kit-launch-action {
  min-width: 170px;
  min-height: 46px;
}

.kit-pro-plus-modal {
  --kit-cyan: #00f1fe;
  --kit-green: #34d399;
  width: min(1000px, 94vw);
  max-width: 1000px;
  padding: 1.1rem;
  border: 1px solid rgba(0, 241, 254, 0.22);
  border-radius: 10px;
  background:
    radial-gradient(circle at 10% 0%, rgba(0, 241, 254, 0.12), transparent 28%),
    radial-gradient(circle at 100% 12%, rgba(34, 197, 94, 0.08), transparent 24%),
    linear-gradient(135deg, rgba(18, 21, 30, 0.98), rgba(13, 15, 22, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.kit-pro-plus-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.kit-pro-plus-head .modal-title {
  margin: 0 0 0.25rem;
  font-size: 1.18rem;
  font-weight: 850;
}

.kit-pro-plus-head .modal-subtitle {
  margin: 0;
  color: rgba(199, 210, 230, 0.68);
  font-size: 0.78rem;
}

.kit-pro-plus-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.kit-pro-plus-head-actions .btn {
  min-height: 34px;
  padding: 0.46rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.065);
  color: rgba(231, 237, 248, 0.82);
  font-size: 0.78rem;
}

.kit-pro-plus-head-actions .material-symbols-outlined {
  font-size: 17px;
}

.kit-pro-plus-form {
  display: grid;
  gap: 0.9rem;
}

.kit-pro-plus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.kit-pro-plus-block {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.72rem;
  min-height: 170px;
  padding: 1.05rem 0.85rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(25, 28, 38, 0.92), rgba(19, 21, 29, 0.92));
}

.kit-pro-plus-block::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0, 241, 254, 0.05), transparent 52%);
}

.kit-pro-plus-accessories::after {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.05), transparent 52%);
}

.kit-pro-plus-badge {
  position: absolute;
  top: -0.52rem;
  left: 0.8rem;
  z-index: 2;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #060a11;
  color: var(--kit-cyan);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.kit-pro-plus-field {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.38rem;
}

.kit-pro-plus-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  color: rgba(213, 222, 237, 0.78);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.kit-pro-plus-label em {
  color: var(--kit-cyan);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
}

.kit-pro-plus-accessories .kit-pro-plus-label em {
  color: rgba(213, 222, 237, 0.68);
}

.kit-input-with-check,
.kit-input-with-icon {
  position: relative;
  display: block;
}

.kit-input-with-check .form-input,
.kit-input-with-icon .form-input {
  min-height: 42px;
  padding-right: 2.55rem;
  border-radius: 7px;
  background: rgba(3, 7, 18, 0.52);
  border-color: rgba(148, 163, 184, 0.16);
}

.kit-input-with-check .form-input:focus,
.kit-input-with-icon .form-input:focus {
  border-color: var(--kit-cyan);
  background: rgba(6, 24, 34, 0.72);
  box-shadow: 0 0 0 2px rgba(0, 241, 254, 0.1), 0 0 22px rgba(0, 241, 254, 0.1);
}

.kit-input-with-check .material-symbols-outlined,
.kit-input-with-icon .material-symbols-outlined {
  position: absolute;
  right: 0.78rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(148, 163, 184, 0.58);
  font-size: 18px;
  pointer-events: none;
}

.kit-input-with-check.is-resolved .material-symbols-outlined {
  color: var(--kit-cyan);
  text-shadow: 0 0 14px rgba(0, 241, 254, 0.55);
}

.kit-pro-plus-block .delivery-kit-status {
  position: relative;
  z-index: 1;
  min-height: 20px;
  margin-top: 0;
  font-size: 0.68rem;
}

.kit-resolved-person-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.62rem;
  min-height: 54px;
  padding: 0.54rem 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.44);
  color: rgba(199, 210, 230, 0.78);
}

.kit-resolved-person-card .material-symbols-outlined {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.12);
  color: rgba(199, 210, 230, 0.74);
  font-size: 20px;
}

.kit-resolved-person-card strong,
.kit-resolved-person-card small {
  display: block;
  min-width: 0;
}

.kit-resolved-person-card strong {
  color: var(--text-primary);
  font-size: 0.76rem;
  line-height: 1.15;
}

.kit-resolved-person-card small {
  margin-top: 0.16rem;
  color: rgba(148, 246, 211, 0.78);
  font-size: 0.64rem;
  font-weight: 800;
}

.kit-resolved-person-card.is-resolved {
  border-color: rgba(0, 241, 254, 0.32);
  background: linear-gradient(135deg, rgba(0, 241, 254, 0.12), rgba(34, 197, 94, 0.1));
}

.kit-resolved-person-card.is-resolved .material-symbols-outlined {
  background: rgba(0, 241, 254, 0.16);
  color: var(--kit-cyan);
}

.kit-pro-plus-validation-row {
  margin: 0;
  padding: 0.82rem 0.9rem;
  border-radius: 8px;
  background: rgba(7, 11, 19, 0.66);
}

.kit-pro-plus-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.22fr);
  gap: 1rem;
  align-items: end;
}

.kit-pro-plus-footer .kit-comments-field {
  gap: 0.42rem;
}

.kit-pro-plus-footer .kit-comments-field span {
  font-size: 0.68rem;
}

.kit-pro-plus-submit {
  min-height: 44px;
  border: 1px solid rgba(0, 241, 254, 0.34);
  background:
    linear-gradient(135deg, rgba(0, 216, 255, 0.96), rgba(92, 115, 255, 0.96) 54%, rgba(168, 85, 247, 0.96));
  font-weight: 850;
}

.kit-pro-plus-submit:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.kit-delivery-form {
  display: grid;
  gap: 0.8rem;
}

.kit-recipient-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1.5fr);
  gap: 0.75rem;
  align-items: start;
}

.kit-hh-validation {
  min-height: 100%;
  margin: 0;
  padding: 0.76rem 0.85rem;
}

.kit-hh-validation .delivery-hh-validation-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kit-scan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
}

.kit-scan-field {
  min-width: 0;
  display: grid;
  gap: 0.42rem;
}

.kit-scan-field .form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.78rem;
}

.kit-scan-field .form-label span {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.kit-scan-field .form-input,
.kit-comments-field .form-input {
  min-height: 44px;
  padding: 0.7rem 0.85rem;
}

.kit-scan-field .delivery-kit-status {
  min-height: 34px;
  margin-top: 0;
}

.kit-delivery-bottom {
  align-items: flex-end;
}

.kit-comments-field {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 0.42rem;
}

.kit-delivery-bottom .btn-primary {
  min-width: 210px;
  min-height: 44px;
}

.kit-delivery-bottom .btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.kit-logistico-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.kit-logistico-toolbar {
  align-items: center;
  margin-bottom: 1rem;
}

.kit-logistico-toolbar .hh-pro-filter-chips {
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.kit-logistico-toolbar .hh-pro-filter-chips::-webkit-scrollbar {
  display: none;
}

.kit-logistico-toolbar .chip {
  flex: 0 0 auto;
  padding: 7px 13px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.kit-logistico-toolbar .chip .material-symbols-outlined {
  font-size: 16px;
}

.kit-logistico-tools {
  flex: 0 0 auto;
  min-width: 0;
  flex-wrap: nowrap;
}

.kit-logistico-search {
  width: 280px;
  min-width: 240px;
  max-width: 300px;
}

.kit-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.kit-summary-label {
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 700;
}

.kit-summary-card strong {
  color: var(--accent-cyan);
  font-size: 1.2rem;
}

.logistic-kit-card .device-id .icon {
  color: var(--accent-cyan);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.kit-empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-align: center;
}

#section-kit-logistico #kit-logistico-grid.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  align-items: start;
  gap: 1rem;
}

#section-kit-logistico #kit-logistico-grid.view-simple {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  align-items: start;
  gap: 0.9rem;
}

#section-kit-logistico #kit-logistico-grid.view-simple .logistic-kit-card {
  min-height: 142px;
  padding: 1rem;
}

#section-kit-logistico #kit-logistico-grid.view-simple .device-details .detail-row:nth-child(n+4) {
  display: none;
}

#section-kit-logistico #kit-logistico-grid.view-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  align-items: start;
  gap: 0.8rem;
}

#section-kit-logistico #kit-logistico-grid.view-mosaic .mosaic-card {
  min-height: 112px;
  justify-content: center;
  border-color: color-mix(in srgb, var(--asset-pro-accent) 18%, transparent);
  border-radius: 12px;
  background:
    radial-gradient(circle at 78% 0, var(--asset-pro-accent-soft), transparent 45%),
    rgba(18, 20, 27, 0.86);
}

#section-kit-logistico #kit-logistico-grid.view-mosaic .mosaic-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--asset-pro-accent) 25%, transparent);
  border-radius: 10px;
  background: var(--asset-pro-accent-soft);
  color: var(--asset-pro-accent);
}

#section-kit-logistico #kit-logistico-grid.view-mosaic .mosaic-id {
  max-width: 100%;
  overflow: hidden;
  color: var(--hh-pro-text);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#section-kit-logistico #kit-logistico-grid.view-list {
  overflow-x: auto;
  border: 1px solid color-mix(in srgb, var(--asset-pro-accent) 20%, rgba(144, 143, 160, 0.16));
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(0, 241, 254, 0.08), transparent 38%),
    rgba(15, 17, 24, 0.72);
}

#section-kit-logistico #kit-logistico-grid.view-list .compact-list-table {
  min-width: 940px;
}

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

.device-card .status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
}

.status-bar.operando  { background: var(--gradient-success); }
.status-bar.garantia  { background: var(--gradient-info); }
.status-bar.reserva   { background: linear-gradient(135deg, #6366f1, #a855f7); }
.status-bar.ti        { background: var(--gradient-warning); }
.status-bar.baja      { background: var(--gradient-danger); }

.device-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.device-id {
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-id .icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(255,255,255,0.04);
}

.device-id .id-text {
  font-weight: 700;
  font-size: 1rem;
}

.device-id .id-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.status-chip {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 20px;
}

.status-chip.operando {
  background: rgba(52,211,153,0.1);
  color: var(--accent-green);
}

.status-chip.garantia {
  background: rgba(59,130,246,0.1);
  color: var(--accent-blue);
}

.status-chip.reserva {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
}

.status-chip.ti {
  background: rgba(251,191,36,0.1);
  color: var(--accent-amber);
}

.status-chip.baja {
  background: rgba(248,113,113,0.1);
  color: var(--accent-red);
}

.device-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.detail-row .detail-icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.6;
}

.detail-row .detail-value {
  color: var(--text-primary);
  font-weight: 500;
}

.device-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.device-actions .btn {
  flex: 1;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  width: 1em;
  min-width: 1em;
  max-width: 1em;
  height: 1em;
  flex: 0 0 auto;
  overflow: hidden;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'liga';
}

/* ==============================
   HANDHELDS PRO — Stitch MCP Pass
   ============================== */
.handhelds-pro {
  --hh-pro-cyan: #00f1fe;
  --hh-pro-violet: #8083ff;
  --hh-pro-green: #4ade80;
  --hh-pro-amber: #d97721;
  --hh-pro-red: #ff5f7e;
  --hh-pro-surface: rgba(17, 19, 25, 0.58);
  --hh-pro-surface-strong: rgba(25, 27, 34, 0.86);
  --hh-pro-border: rgba(144, 143, 160, 0.2);
  --hh-pro-text: #e2e2eb;
  --hh-pro-muted: #c7c4d7;
  --dash-cyan: var(--hh-pro-cyan);
  --dash-text: var(--hh-pro-text);
  --dash-muted: var(--hh-pro-muted);
}

.handhelds-pro-header {
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.35rem;
}

.handhelds-pro-header .page-title {
  color: var(--hh-pro-text);
  font-size: clamp(2rem, 2.6vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.handhelds-pro-header .page-actions .btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 8px;
}

.handhelds-pro-header .page-actions .material-symbols-outlined {
  font-size: 20px;
}

.handhelds-command-tools {
  align-items: center;
  gap: 1rem;
}

.handhelds-pro .presence-shell {
  min-height: 42px;
  padding: 0.4rem 0.65rem;
  border-color: rgba(144, 143, 160, 0.26);
  background: rgba(30, 31, 38, 0.44);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.18);
}

.handhelds-pro .presence-avatar {
  width: 30px;
  height: 30px;
  font-size: 0.68rem;
}

.hh-command-search-control {
  min-width: 260px;
}

.hh-pro-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.hh-pro-kpi-card {
  position: relative;
  min-height: 142px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 1.2rem;
  border: 1px solid var(--hh-pro-border);
  border-radius: 12px;
  background:
    radial-gradient(circle at top right, rgba(0, 241, 254, 0.08), transparent 42%),
    var(--hh-pro-surface);
  color: var(--hh-pro-text);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.hh-pro-kpi-card:hover {
  border-color: rgba(0, 241, 254, 0.42);
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0, 241, 254, 0.11);
}

.hh-pro-kpi-card.active {
  border-color: currentColor;
  transform: translateY(-2px);
  box-shadow: 0 0 22px color-mix(in srgb, currentColor 28%, transparent);
}

.hh-pro-kpi-card::after {
  content: '';
  position: absolute;
  inset: auto -24px -34px auto;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: currentColor;
  filter: blur(44px);
  opacity: 0.08;
}

.hh-pro-kpi-card.available { color: var(--hh-pro-green); }
.hh-pro-kpi-card.in-use { color: var(--hh-pro-amber); }
.hh-pro-kpi-card.repair { color: var(--hh-pro-red); }
.hh-pro-kpi-card.total { color: var(--hh-pro-violet); }

.hh-pro-kpi-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: color-mix(in srgb, currentColor 12%, transparent);
  text-align: center;
}

.hh-pro-kpi-icon .material-symbols-outlined {
  width: 22px;
  height: 22px;
  display: block;
  font-size: 22px;
  line-height: 22px;
  text-align: center;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.hh-pro-kpi-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.24rem 0.48rem;
  border: 1px solid currentColor;
  border-radius: 5px;
  background: color-mix(in srgb, currentColor 10%, transparent);
  color: currentColor;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hh-pro-kpi-card strong {
  color: var(--hh-pro-text);
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 0.95;
  font-weight: 900;
}

.hh-pro-kpi-card small {
  color: var(--hh-pro-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.hh-pro-kpi-value-row {
  width: 100%;
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hh-pro-kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 0.16rem;
  margin-bottom: 0.18rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.hh-pro-kpi-delta .material-symbols-outlined {
  font-size: 15px;
}

.hh-pro-kpi-delta.positive {
  color: var(--hh-pro-cyan);
}

.hh-pro-kpi-delta.neutral {
  color: var(--hh-pro-muted);
}

.hh-pro-kpi-percent {
  margin-bottom: 0.18rem;
  color: currentColor;
  font-size: 0.82rem;
  font-weight: 900;
}

.hh-pro-progress {
  width: 100%;
  height: 5px;
  margin-top: 0.2rem;
  border-radius: 999px;
  background: rgba(144, 143, 160, 0.18);
  overflow: hidden;
}

.hh-pro-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.hh-pro-toolbar {
  position: relative;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--hh-pro-border);
  border-radius: 12px;
  background: var(--hh-pro-surface);
  backdrop-filter: blur(20px);
}

.hh-pro-filter-chips {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hh-pro-filter-chips .chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.hh-pro-filter-chips .chip .material-symbols-outlined {
  font-size: 18px;
}

.hh-pro-tools {
  position: relative;
  z-index: 110;
  min-width: min(620px, 100%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hh-view-dropdown {
  position: relative;
  z-index: 120;
}

.hh-view-toggle {
  min-width: 238px;
  min-height: 44px;
  justify-content: space-between;
  padding: 0.42rem 0.66rem;
  border-color: rgba(0, 241, 254, 0.18);
  border-radius: 10px;
  background:
    radial-gradient(circle at 0 0, rgba(0, 241, 254, 0.14), transparent 52%),
    rgba(12, 14, 20, 0.72);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.24);
}

.hh-view-toggle > .material-symbols-outlined:first-child {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 241, 254, 0.24);
  border-radius: 8px;
  background: rgba(0, 241, 254, 0.08);
  color: var(--hh-pro-cyan);
  font-size: 19px;
}

.hh-view-toggle .view-dd-arrow.material-symbols-outlined {
  color: var(--hh-pro-muted);
  font-size: 21px;
}

.hh-view-toggle-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 1px;
  text-align: left;
}

.hh-view-toggle-copy small {
  color: rgba(199, 196, 215, 0.58);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hh-view-toggle-copy strong {
  overflow: hidden;
  color: var(--hh-pro-text);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hh-view-menu {
  min-width: 270px;
  padding: 0.45rem;
  border-color: rgba(0, 241, 254, 0.2);
  border-radius: 12px;
  background:
    radial-gradient(circle at 16% 0, rgba(0, 241, 254, 0.12), transparent 45%),
    rgba(14, 17, 25, 0.96);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(0, 241, 254, 0.05);
}

.hh-view-menu.open {
  z-index: 6000;
}

.hh-view-menu .view-option {
  min-height: 58px;
  gap: 0.75rem;
  padding: 0.62rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 9px;
}

.hh-view-menu .view-option:hover {
  border-color: rgba(0, 241, 254, 0.12);
  background: rgba(0, 241, 254, 0.06);
}

.hh-view-menu .view-option.active {
  border-color: rgba(0, 241, 254, 0.18);
  background: linear-gradient(135deg, rgba(0, 241, 254, 0.15), rgba(128, 131, 255, 0.08));
}

.hh-view-menu .view-opt-icon {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0, 241, 254, 0.14);
  background: rgba(0, 241, 254, 0.08);
  color: var(--hh-pro-cyan);
}

.view-opt-icon .material-symbols-outlined {
  font-size: 20px;
}

.hh-view-menu .view-opt-label,
.hh-view-menu .view-opt-desc {
  display: block;
}

.hh-pro-search {
  min-width: 280px;
  flex: 1;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(144, 143, 160, 0.32);
  border-radius: 8px;
  background: rgba(12, 14, 20, 0.62);
  color: var(--hh-pro-muted);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.26);
}

.hh-pro-search .material-symbols-outlined {
  font-size: 20px;
}

.hh-pro-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--hh-pro-text);
  font: inherit;
  font-size: 0.85rem;
}

.hh-pro-search input::placeholder {
  color: rgba(199, 196, 215, 0.54);
}

#section-handhelds #hh-grid.view-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
}

#section-handhelds #hh-grid.view-simple {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  align-items: start;
}

#section-handhelds #hh-grid.view-simple .hh-pro-device-card {
  min-height: 138px;
  padding: 1rem;
}

#section-handhelds #hh-grid.view-simple .hh-pro-device-head {
  margin-bottom: 0.85rem;
}

#section-handhelds #hh-grid.view-simple .hh-pro-device-card .id-text {
  max-width: 180px;
}

#section-handhelds #hh-grid.view-simple .hh-pro-device-state {
  max-width: 45%;
}

#section-handhelds #hh-grid.view-simple .hh-pro-priority {
  display: none;
}

#section-handhelds #hh-grid.view-simple .device-actions {
  padding-top: 0.75rem;
}

#section-handhelds #hh-grid.view-mosaic {
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  align-items: start;
  gap: 0.8rem;
}

#section-handhelds #hh-grid.view-mosaic .mosaic-card {
  min-height: 112px;
  justify-content: center;
  border-color: rgba(0, 241, 254, 0.12);
  border-radius: 12px;
  background:
    radial-gradient(circle at 78% 0, rgba(0, 241, 254, 0.12), transparent 45%),
    rgba(18, 20, 27, 0.86);
}

#section-handhelds #hh-grid.view-mosaic .mosaic-card:hover {
  border-color: rgba(0, 241, 254, 0.34);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28), 0 0 22px rgba(0, 241, 254, 0.08);
}

#section-handhelds #hh-grid.view-mosaic .mosaic-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 241, 254, 0.2);
  border-radius: 10px;
  background: rgba(0, 241, 254, 0.08);
  color: var(--hh-pro-cyan);
}

#section-handhelds #hh-grid.view-mosaic .mosaic-icon .material-symbols-outlined {
  font-size: 24px;
}

#section-handhelds #hh-grid.view-mosaic .mosaic-id {
  max-width: 100%;
  overflow: hidden;
  color: var(--hh-pro-text);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#section-handhelds #hh-grid.view-mosaic .mosaic-tooltip {
  border-color: rgba(0, 241, 254, 0.24);
  background: rgba(11, 14, 22, 0.98);
}

#section-handhelds #hh-grid.view-mosaic .mosaic-tooltip .tt-row > span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

#section-handhelds #hh-grid.view-mosaic .tt-icon {
  color: var(--hh-pro-cyan);
  font-size: 15px;
}

#section-handhelds #hh-grid.view-list {
  overflow-x: auto;
  border: 1px solid var(--hh-pro-border);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(0, 241, 254, 0.08), transparent 38%),
    rgba(15, 17, 24, 0.72);
}

#section-handhelds #hh-grid.view-list .compact-list-table {
  min-width: 880px;
}

#section-handhelds #hh-grid.view-list .compact-list-table thead tr {
  background: rgba(0, 241, 254, 0.045);
}

#section-handhelds #hh-grid.view-list .compact-list-table th.sort-active {
  color: var(--hh-pro-cyan);
}

#section-handhelds #hh-grid.view-list .cell-icon.material-symbols-outlined,
#section-handhelds #hh-grid.view-list .sort-indicator-icon.material-symbols-outlined {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hh-pro-cyan);
  font-size: 17px;
  line-height: 18px;
  vertical-align: middle;
}

#section-handhelds #hh-grid.view-list .sort-indicator-icon.material-symbols-outlined {
  margin-left: 0.35rem;
  font-size: 14px;
}

#section-handhelds #hh-grid.view-list .cell-actions .btn {
  min-height: 30px;
  padding: 0.32rem 0.55rem;
}

.hh-pro-grid-header {
  justify-content: flex-end;
  min-height: 0;
  margin: -0.35rem 0 0.25rem;
}

.hh-pro-grid-header .section-count {
  border-radius: 999px;
  background: rgba(30, 31, 38, 0.56);
}

.hh-pro-device-card {
  min-height: 204px;
  align-self: start;
  padding: 1.25rem;
  border-color: var(--hh-pro-border);
  border-radius: 12px;
  background:
    radial-gradient(circle at 102% -16%, rgba(0, 241, 254, 0.08), transparent 38%),
    var(--hh-pro-surface-strong);
  box-shadow: none;
}

.hh-pro-device-card.tone-active .status-bar {
  background: linear-gradient(135deg, var(--hh-pro-cyan), var(--hh-pro-green));
}

.hh-pro-device-card.tone-warning .status-bar {
  background: linear-gradient(135deg, var(--hh-pro-amber), #facc15);
}

.hh-pro-device-card.tone-danger .status-bar {
  background: linear-gradient(135deg, var(--hh-pro-red), #ec4899);
}

.hh-pro-device-card.status-in-use {
  background:
    radial-gradient(circle at 102% -16%, rgba(217, 119, 33, 0.12), transparent 38%),
    var(--hh-pro-surface-strong);
}

.hh-pro-device-card.status-repair,
.hh-pro-device-card.status-down {
  background:
    radial-gradient(circle at 102% -16%, rgba(255, 95, 126, 0.12), transparent 38%),
    var(--hh-pro-surface-strong);
}

.status-bar.en-uso { background: linear-gradient(135deg, var(--hh-pro-amber), #facc15); }
.status-chip.en-uso {
  background: rgba(217, 119, 33, 0.12);
  color: var(--hh-pro-amber);
}

.hh-pro-device-head {
  align-items: flex-start;
  margin-bottom: 1rem;
}

.hh-pro-device-icon {
  color: var(--hh-pro-cyan);
  border: 1px solid rgba(0, 241, 254, 0.18);
  background: rgba(0, 241, 254, 0.08);
}

.hh-pro-device-icon .material-symbols-outlined {
  font-size: 24px;
}

.hh-pro-device-card .id-text {
  color: var(--hh-pro-text);
  font-size: 1rem;
  line-height: 1.18;
  max-width: 220px;
}

.hh-pro-device-card .id-sub {
  margin-top: 0.12rem;
  color: rgba(199, 196, 215, 0.68);
  font-size: 0.72rem;
  font-weight: 800;
}

.hh-pro-device-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.42rem;
  max-width: 48%;
}

.hh-pro-status-line {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  width: 100%;
}

.hh-pro-connectivity {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(0, 241, 254, 0.22);
  background: rgba(0, 241, 254, 0.08);
  color: var(--hh-pro-cyan);
  text-align: center;
}

.hh-pro-connectivity .material-symbols-outlined {
  width: 18px;
  height: 18px;
  display: block;
  font-size: 18px;
  line-height: 18px;
  text-align: center;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

.hh-pro-device-card.status-in-use .hh-pro-connectivity {
  border-color: rgba(217, 119, 33, 0.3);
  background: rgba(217, 119, 33, 0.1);
  color: var(--hh-pro-amber);
}

.hh-pro-device-card.status-repair .hh-pro-connectivity,
.hh-pro-device-card.status-down .hh-pro-connectivity {
  border-color: rgba(255, 95, 126, 0.3);
  background: rgba(255, 95, 126, 0.1);
  color: var(--hh-pro-red);
}

.hh-pro-device-card .status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 0.64rem;
  line-height: 1;
  min-height: 28px;
  white-space: nowrap;
}

.hh-pro-device-card .status-chip i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.hh-pro-device-card .status-chip.ti,
.hh-pro-device-card .status-chip.garantia {
  background: rgba(255, 95, 126, 0.1);
  color: var(--hh-pro-red);
}

.hh-pro-priority {
  position: static;
  align-self: flex-end;
  padding: 0.18rem 0.42rem;
  border-radius: 5px;
  background: var(--hh-pro-red);
  color: #111319;
  font-size: 0.56rem;
  line-height: 1.1;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 0 14px rgba(255, 95, 126, 0.32);
}

.hh-pro-device-details {
  gap: 0.78rem;
}

.hh-pro-health {
  display: grid;
  gap: 0.38rem;
}

.hh-pro-health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: rgba(199, 196, 215, 0.76);
  font-size: 0.82rem;
  font-weight: 800;
}

.hh-pro-health-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.hh-pro-health-row-value-only {
  justify-content: flex-end;
  min-height: 18px;
}

.hh-pro-health-row .material-symbols-outlined,
.hh-pro-device-card .detail-icon.material-symbols-outlined {
  width: 18px;
  font-size: 17px;
  color: rgba(199, 196, 215, 0.72);
  opacity: 1;
}

.hh-pro-health-row strong {
  color: var(--hh-pro-cyan);
}

.hh-pro-health-row strong.battery-high {
  color: var(--hh-pro-cyan);
}

.hh-pro-health-row strong.battery-medium {
  color: var(--hh-pro-amber);
}

.hh-pro-health-row strong.battery-low {
  color: var(--hh-pro-amber);
}

.hh-pro-health-row strong.battery-critical {
  color: var(--hh-pro-red);
}

.hh-pro-health-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(144, 143, 160, 0.24);
  overflow: hidden;
}

.hh-pro-health-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.hh-pro-health-track.battery-high i {
  background: var(--hh-pro-cyan);
  box-shadow: 0 0 8px rgba(0, 241, 254, 0.68);
}

.hh-pro-health-track.battery-medium i {
  background: var(--hh-pro-amber);
  box-shadow: 0 0 8px rgba(217, 119, 33, 0.58);
}

.hh-pro-health-track.battery-low i {
  background: #ffb4ab;
  box-shadow: 0 0 8px rgba(255, 180, 171, 0.62);
}

.hh-pro-health-track.battery-critical i {
  background: var(--hh-pro-red);
  box-shadow: 0 0 8px rgba(255, 95, 126, 0.62);
}

.hh-pro-health-track i.healthy { background: var(--hh-pro-cyan); box-shadow: 0 0 10px var(--hh-pro-cyan); }
.hh-pro-health-track i.assigned { background: var(--hh-pro-amber); box-shadow: 0 0 10px var(--hh-pro-amber); }
.hh-pro-health-track i.warning { background: #facc15; box-shadow: 0 0 10px rgba(250, 204, 21, 0.6); }
.hh-pro-health-track i.danger { background: var(--hh-pro-red); box-shadow: 0 0 10px rgba(255, 95, 126, 0.6); }

.hh-pro-location {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(144, 143, 160, 0.18);
  border-radius: 8px;
  background: rgba(12, 14, 20, 0.46);
  color: var(--hh-pro-text);
  font-size: 0.84rem;
  font-weight: 700;
}

.hh-pro-note {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(144, 143, 160, 0.18);
  border-radius: 8px;
  background: rgba(12, 14, 20, 0.38);
  color: var(--hh-pro-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.hh-pro-note .material-symbols-outlined {
  color: var(--hh-pro-cyan);
  font-size: 17px;
}

.hh-pro-note.is-repair {
  border-color: rgba(255, 95, 126, 0.22);
  background: rgba(255, 95, 126, 0.05);
  color: rgba(255, 180, 171, 0.92);
}

.hh-pro-note.is-repair .material-symbols-outlined {
  color: var(--hh-pro-red);
}

.hh-pro-location.is-storage {
  color: rgba(199, 196, 215, 0.9);
  font-style: italic;
}

.hh-pro-location .material-symbols-outlined {
  color: var(--hh-pro-cyan);
  font-size: 18px;
}

.hh-pro-device-card .detail-row {
  font-size: 0.84rem;
}

.hh-pro-device-card .device-actions {
  padding-top: 0.85rem;
  border-top: 1px solid rgba(144, 143, 160, 0.18);
}

.hh-pro-action {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
  border-radius: 8px;
  font-weight: 800;
}

.confirm-detail-grid {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.confirm-detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(144, 143, 160, 0.14);
}

.confirm-detail-row span {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
}

.confirm-detail-row strong {
  color: var(--text-primary);
  font-size: 0.86rem;
  text-align: right;
}

.confirm-hh-detail-card {
  --hh-detail-cyan: #00f1fe;
  --hh-detail-violet: #8083ff;
  --hh-detail-green: #4ade80;
  --hh-detail-amber: #d97721;
  --hh-detail-red: #ff5f7e;
  width: min(640px, 94vw) !important;
  max-width: 640px !important;
  padding: 0 !important;
  border: 1px solid rgba(144, 143, 160, 0.22) !important;
  border-radius: 24px !important;
  background:
    linear-gradient(rgba(226, 226, 235, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 226, 235, 0.024) 1px, transparent 1px),
    radial-gradient(circle at 84% 0%, rgba(128, 131, 255, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(17, 19, 25, 0.98), rgba(20, 24, 34, 0.98)) !important;
  background-size: 32px 32px, 32px 32px, auto, auto !important;
  color: #e2e2eb !important;
  text-align: left !important;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(0, 241, 254, 0.08) inset !important;
}

.confirm-hh-detail-card #confirm-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 1.25rem 1.45rem 0 !important;
  border: 1px solid var(--hh-detail-cyan);
  border-radius: 10px;
  background: rgba(0, 241, 254, 0.1);
  color: var(--hh-detail-cyan);
  font-size: 0 !important;
  box-shadow: 0 0 20px rgba(0, 241, 254, 0.12);
}

.confirm-hh-detail-card #confirm-icon .material-symbols-outlined {
  font-size: 24px;
}

.confirm-hh-detail-card #confirm-title {
  margin: -2.72rem 1.45rem 1.45rem 5.2rem;
  color: #e2e2eb;
  font-size: 1.36rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.confirm-hh-detail-card #confirm-msg {
  margin: 0 !important;
  color: inherit !important;
}

.hh-detail-pro {
  display: grid;
  gap: 1rem;
  padding: 0.05rem 1.45rem 1.22rem;
}

.hh-detail-pro-hero {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 1.08rem;
  border: 1px solid rgba(0, 241, 254, 0.22);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 241, 254, 0.08), transparent 36%),
    rgba(25, 27, 34, 0.74);
}

.hh-detail-pro-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 10px;
  color: var(--hh-detail-cyan);
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.hh-detail-pro-icon .material-symbols-outlined {
  font-size: 23px;
}

.hh-detail-pro-title span,
.hh-detail-pro-metric small {
  display: block;
  color: rgba(199, 196, 215, 0.68);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hh-detail-pro-title {
  min-width: 0;
  display: grid;
  gap: 0.24rem;
}

.hh-detail-pro-title strong {
  display: block;
  color: #e2e2eb;
  font-size: 1.45rem;
  line-height: 1.05;
  font-weight: 900;
}

.hh-detail-pro-title small {
  display: block;
  color: rgba(199, 196, 215, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
}

.hh-detail-pro .status-chip {
  white-space: nowrap;
}

.hh-detail-pro-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.hh-detail-pro-metric {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
  padding: 0.82rem;
  border: 1px solid rgba(144, 143, 160, 0.2);
  border-radius: 12px;
  background: rgba(25, 27, 34, 0.68);
}

.hh-detail-pro-metric > .material-symbols-outlined {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 241, 254, 0.28);
  border-radius: 9px;
  color: var(--hh-detail-cyan);
  background: rgba(0, 241, 254, 0.08);
  font-size: 20px;
}

.hh-detail-pro-metric strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #e2e2eb;
  font-size: 0.96rem;
  line-height: 1.2;
}

.hh-detail-pro-metric strong.battery-high { color: var(--hh-detail-cyan); }
.hh-detail-pro-metric strong.battery-medium { color: var(--hh-detail-amber); }
.hh-detail-pro-metric strong.battery-low { color: var(--hh-detail-amber); }
.hh-detail-pro-metric strong.battery-critical { color: var(--hh-detail-red); }

.hh-detail-pro-track {
  display: block;
  height: 4px;
  margin-top: 0.42rem;
  border-radius: 999px;
  background: rgba(144, 143, 160, 0.18);
  overflow: hidden;
}

.hh-detail-pro-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--hh-detail-cyan);
  box-shadow: 0 0 10px currentColor;
}

.hh-detail-pro-track.battery-medium i,
.hh-detail-pro-track.battery-low i {
  background: var(--hh-detail-amber);
}

.hh-detail-pro-track.battery-critical i {
  background: var(--hh-detail-red);
}

.hh-detail-pro-grid {
  display: grid;
  gap: 0.5rem;
}

.hh-detail-pro-row {
  display: grid;
  grid-template-columns: 32px minmax(96px, 0.62fr) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  min-height: 44px;
  padding: 0.64rem 0.75rem;
  border: 1px solid rgba(144, 143, 160, 0.16);
  border-radius: 10px;
  background: rgba(17, 19, 25, 0.5);
}

.hh-detail-pro-row .material-symbols-outlined {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--hh-detail-cyan);
  background: rgba(0, 241, 254, 0.08);
  font-size: 18px;
}

.hh-detail-pro-row span:not(.material-symbols-outlined) {
  color: rgba(199, 196, 215, 0.72);
  font-size: 0.78rem;
  font-weight: 900;
}

.hh-detail-pro-row strong {
  min-width: 0;
  color: #e2e2eb;
  font-size: 0.86rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.confirm-hh-detail-card .modal-actions {
  margin: 0 1.45rem 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(144, 143, 160, 0.16);
}

.confirm-hh-detail-card .modal-actions .btn {
  min-height: 44px;
  border-radius: 9px;
}

.confirm-hh-detail-card .modal-actions.hh-detail-single-action {
  justify-content: stretch;
}

.confirm-hh-detail-card .modal-actions .btn-primary {
  flex: 1.35;
  border: 1px solid rgba(0, 241, 254, 0.36);
  background: linear-gradient(135deg, rgba(0, 216, 255, 0.98), rgba(92, 115, 255, 0.98) 52%, rgba(168, 85, 247, 0.98));
  color: #fff;
  font-weight: 850;
  box-shadow: 0 14px 34px rgba(0, 216, 255, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.confirm-hh-detail-card .modal-actions.hh-detail-single-action .btn-primary {
  justify-content: center;
  flex: 1 1 100%;
}

@media (max-width: 560px) {
  .confirm-hh-detail-card {
    width: 96vw !important;
    border-radius: 18px !important;
  }

  .hh-detail-pro {
    padding: 0 1rem 1rem;
  }

  .hh-detail-pro-hero,
  .hh-detail-pro-metrics {
    grid-template-columns: 1fr;
  }

  .hh-detail-pro-row {
    grid-template-columns: 30px minmax(82px, 0.5fr) minmax(0, 1fr);
  }

  .confirm-hh-detail-card .modal-actions {
    margin: 0 1rem 1rem;
    flex-direction: column-reverse;
  }
}

.hh-pro-action .material-symbols-outlined {
  font-size: 17px;
}

.hh-pro-action.danger {
  color: var(--hh-pro-red);
}

.hh-pro-action.success {
  color: var(--hh-pro-green);
}

.hh-pro-empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.55rem;
  padding: 2rem;
  border: 1px dashed rgba(144, 143, 160, 0.28);
  border-radius: 12px;
  background: rgba(17, 19, 25, 0.46);
  color: var(--hh-pro-muted);
  text-align: center;
}

.hh-pro-empty-state .material-symbols-outlined {
  font-size: 34px;
  color: var(--hh-pro-cyan);
}

.hh-pro-empty-state strong {
  color: var(--hh-pro-text);
  font-size: 1rem;
}

.hh-pro-empty-state p {
  max-width: 360px;
  margin: 0;
  font-size: 0.86rem;
}

@media (max-width: 1180px) {
  .hh-pro-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hh-pro-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .hh-pro-tools {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
  }

  .hh-pro-search {
    flex: 1;
    min-width: 0;
  }

  #section-handhelds #hh-grid.view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .handhelds-pro-header .page-actions,
  .hh-pro-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .handhelds-pro-header .page-actions .btn,
  .hh-pro-tools .view-dropdown-wrapper,
  .hh-pro-tools .btn-view-toggle {
    width: 100%;
  }

  .hh-pro-kpi-grid,
  #section-handhelds #hh-grid.view-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================
   ASSET PRO — Radios / Cámaras / Llaves
   ============================== */
.asset-pro-section {
  --hh-pro-cyan: #00f1fe;
  --hh-pro-violet: #8083ff;
  --hh-pro-green: #4ade80;
  --hh-pro-amber: #d97721;
  --hh-pro-red: #ff5f7e;
  --hh-pro-surface: rgba(17, 19, 25, 0.58);
  --hh-pro-surface-strong: rgba(25, 27, 34, 0.86);
  --hh-pro-border: rgba(144, 143, 160, 0.2);
  --hh-pro-text: #e2e2eb;
  --hh-pro-muted: #c7c4d7;
  --asset-pro-accent: var(--hh-pro-cyan);
  --asset-pro-accent-soft: rgba(0, 241, 254, 0.12);
  --dash-cyan: var(--hh-pro-cyan);
  --dash-text: var(--hh-pro-text);
  --dash-muted: var(--hh-pro-muted);
}

.asset-pro-header {
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.35rem;
}

.asset-pro-title-block {
  display: grid;
  gap: 0.35rem;
}

.asset-pro-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  width: max-content;
  color: var(--asset-pro-accent);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.asset-pro-eyebrow .material-symbols-outlined {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--asset-pro-accent) 38%, transparent);
  border-radius: 7px;
  background: var(--asset-pro-accent-soft);
  font-size: 16px;
}

.asset-pro-command-tools {
  align-items: center;
  gap: 1rem;
}

.asset-pro-command-search {
  min-width: min(420px, 100%);
  border-color: rgba(144, 143, 160, 0.3);
}

.asset-pro-command-search:focus-within {
  border-color: color-mix(in srgb, var(--asset-pro-accent) 70%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--asset-pro-accent) 28%, transparent), 0 0 22px color-mix(in srgb, var(--asset-pro-accent) 12%, transparent);
}

.asset-pro-header .page-actions .btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 8px;
}

.asset-pro-header .page-actions .btn-primary {
  border-color: color-mix(in srgb, var(--asset-pro-accent) 48%, transparent);
  background: linear-gradient(135deg, #22d3ee, #5b7cfa 58%, #9b5cff);
  color: #111319;
  box-shadow: 0 16px 34px color-mix(in srgb, var(--asset-pro-accent) 20%, transparent);
}

.asset-pro-header .page-actions .material-symbols-outlined {
  font-size: 20px;
}

.asset-pro-kpi-grid .hh-pro-kpi-card {
  background:
    radial-gradient(circle at 96% 0, var(--asset-pro-accent-soft), transparent 42%),
    var(--hh-pro-surface);
}

.asset-pro-kpi-grid .hh-pro-kpi-card:hover {
  border-color: color-mix(in srgb, var(--asset-pro-accent) 42%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--asset-pro-accent) 12%, transparent);
}

.asset-pro-toolbar {
  border-color: color-mix(in srgb, var(--asset-pro-accent) 20%, rgba(144, 143, 160, 0.16));
}

.asset-pro-section .hh-pro-filter-chips .chip {
  color: rgba(199, 196, 215, 0.86);
}

.asset-pro-section .hh-pro-filter-chips .chip.active {
  border-color: color-mix(in srgb, var(--asset-pro-accent) 62%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--asset-pro-accent) 20%, transparent), rgba(128, 131, 255, 0.08));
  color: #eff6ff;
  box-shadow: 0 0 18px color-mix(in srgb, var(--asset-pro-accent) 12%, transparent);
}

.asset-pro-view-tools {
  min-width: min(270px, 100%);
}

.asset-pro-view-tools .hh-view-toggle > .material-symbols-outlined:first-child,
.asset-pro-view-tools .hh-view-menu .view-opt-icon,
.asset-pro-section .mosaic-icon,
.asset-pro-section .tt-icon,
.asset-pro-section .cell-icon.material-symbols-outlined,
.asset-pro-section .sort-indicator-icon.material-symbols-outlined {
  color: var(--asset-pro-accent);
}

#section-radios #radio-grid.view-grid,
#section-gopros #gopro-grid.view-grid,
#section-rodantes #rodante-grid.view-grid {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  align-items: start;
  gap: 1rem;
}

#section-radios #radio-grid.view-simple,
#section-gopros #gopro-grid.view-simple,
#section-rodantes #rodante-grid.view-simple {
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  align-items: start;
  gap: 0.9rem;
}

#section-radios #radio-grid.view-simple .asset-pro-device-card,
#section-gopros #gopro-grid.view-simple .asset-pro-device-card,
#section-rodantes #rodante-grid.view-simple .asset-pro-device-card {
  min-height: 148px;
  padding: 1rem;
}

#section-radios #radio-grid.view-simple .asset-pro-detail-row,
#section-gopros #gopro-grid.view-simple .asset-pro-detail-row,
#section-rodantes #rodante-grid.view-simple .asset-pro-detail-row,
#section-radios #radio-grid.view-simple .hh-pro-note,
#section-gopros #gopro-grid.view-simple .hh-pro-note,
#section-rodantes #rodante-grid.view-simple .hh-pro-note {
  display: none;
}

#section-radios #radio-grid.view-mosaic,
#section-gopros #gopro-grid.view-mosaic,
#section-rodantes #rodante-grid.view-mosaic {
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  align-items: start;
  gap: 0.8rem;
}

#section-radios #radio-grid.view-mosaic .mosaic-card,
#section-gopros #gopro-grid.view-mosaic .mosaic-card,
#section-rodantes #rodante-grid.view-mosaic .mosaic-card {
  min-height: 112px;
  justify-content: center;
  border-color: color-mix(in srgb, var(--asset-pro-accent) 18%, transparent);
  border-radius: 12px;
  background:
    radial-gradient(circle at 78% 0, var(--asset-pro-accent-soft), transparent 45%),
    rgba(18, 20, 27, 0.86);
}

#section-radios #radio-grid.view-mosaic .mosaic-card:hover,
#section-gopros #gopro-grid.view-mosaic .mosaic-card:hover,
#section-rodantes #rodante-grid.view-mosaic .mosaic-card:hover {
  border-color: color-mix(in srgb, var(--asset-pro-accent) 44%, transparent);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28), 0 0 22px color-mix(in srgb, var(--asset-pro-accent) 10%, transparent);
}

#section-radios #radio-grid.view-mosaic .mosaic-icon,
#section-gopros #gopro-grid.view-mosaic .mosaic-icon,
#section-rodantes #rodante-grid.view-mosaic .mosaic-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--asset-pro-accent) 25%, transparent);
  border-radius: 10px;
  background: var(--asset-pro-accent-soft);
}

#section-radios #radio-grid.view-mosaic .mosaic-icon .material-symbols-outlined,
#section-gopros #gopro-grid.view-mosaic .mosaic-icon .material-symbols-outlined,
#section-rodantes #rodante-grid.view-mosaic .mosaic-icon .material-symbols-outlined {
  font-size: 24px;
}

#section-radios #radio-grid.view-mosaic .mosaic-id,
#section-gopros #gopro-grid.view-mosaic .mosaic-id,
#section-rodantes #rodante-grid.view-mosaic .mosaic-id {
  max-width: 100%;
  overflow: hidden;
  color: var(--hh-pro-text);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#section-radios #radio-grid.view-mosaic .mosaic-tooltip,
#section-gopros #gopro-grid.view-mosaic .mosaic-tooltip,
#section-rodantes #rodante-grid.view-mosaic .mosaic-tooltip {
  border-color: color-mix(in srgb, var(--asset-pro-accent) 28%, transparent);
  background: rgba(11, 14, 22, 0.98);
}

#section-radios #radio-grid.view-mosaic .mosaic-tooltip .tt-row > span,
#section-gopros #gopro-grid.view-mosaic .mosaic-tooltip .tt-row > span,
#section-rodantes #rodante-grid.view-mosaic .mosaic-tooltip .tt-row > span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

#section-radios #radio-grid.view-list,
#section-gopros #gopro-grid.view-list,
#section-rodantes #rodante-grid.view-list {
  overflow-x: auto;
  border: 1px solid var(--hh-pro-border);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, var(--asset-pro-accent-soft), transparent 38%),
    rgba(15, 17, 24, 0.72);
}

#section-radios #radio-grid.view-list .compact-list-table,
#section-gopros #gopro-grid.view-list .compact-list-table,
#section-rodantes #rodante-grid.view-list .compact-list-table {
  min-width: 820px;
}

#section-radios #radio-grid.view-list .compact-list-table thead tr,
#section-gopros #gopro-grid.view-list .compact-list-table thead tr,
#section-rodantes #rodante-grid.view-list .compact-list-table thead tr {
  background: color-mix(in srgb, var(--asset-pro-accent) 6%, transparent);
}

#section-radios #radio-grid.view-list .compact-list-table th.sort-active,
#section-gopros #gopro-grid.view-list .compact-list-table th.sort-active,
#section-rodantes #rodante-grid.view-list .compact-list-table th.sort-active {
  color: var(--asset-pro-accent);
}

.asset-pro-device-card {
  min-height: 218px;
  background:
    radial-gradient(circle at 102% -16%, var(--asset-pro-accent-soft), transparent 38%),
    var(--hh-pro-surface-strong);
}

.asset-pro-device-card.status-in-use {
  background:
    radial-gradient(circle at 102% -16%, rgba(217, 119, 33, 0.12), transparent 38%),
    var(--hh-pro-surface-strong);
}

.asset-pro-device-card.status-repair,
.asset-pro-device-card.status-down {
  background:
    radial-gradient(circle at 102% -16%, rgba(255, 95, 126, 0.12), transparent 38%),
    var(--hh-pro-surface-strong);
}

.asset-pro-device-card .hh-pro-device-icon {
  border-color: color-mix(in srgb, var(--asset-pro-accent) 28%, transparent);
  background: var(--asset-pro-accent-soft);
  color: var(--asset-pro-accent);
}

.asset-pro-device-card .hh-pro-connectivity {
  border-color: color-mix(in srgb, var(--asset-pro-accent) 26%, transparent);
  background: var(--asset-pro-accent-soft);
  color: var(--asset-pro-accent);
}

.asset-pro-device-card .id-sub {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.asset-pro-detail-row {
  min-height: 36px;
  display: grid;
  grid-template-columns: 22px minmax(82px, 0.55fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(144, 143, 160, 0.18);
  border-radius: 8px;
  background: rgba(12, 14, 20, 0.38);
}

.asset-pro-detail-row .material-symbols-outlined {
  color: var(--asset-pro-accent);
  font-size: 17px;
}

.asset-pro-detail-row span:not(.material-symbols-outlined) {
  color: rgba(199, 196, 215, 0.68);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.asset-pro-detail-row strong {
  min-width: 0;
  color: var(--hh-pro-text);
  font-size: 0.82rem;
  line-height: 1.2;
  text-align: right;
  overflow-wrap: anywhere;
}

.asset-pro-section .hh-pro-health-row .material-symbols-outlined,
.asset-pro-section .hh-pro-location .material-symbols-outlined,
.asset-pro-section .hh-pro-note .material-symbols-outlined {
  color: var(--asset-pro-accent);
}

.asset-pro-section .hh-pro-health-row strong.battery-high {
  color: var(--hh-pro-cyan);
}

.asset-pro-section .hh-pro-health-row strong.battery-medium,
.asset-pro-section .hh-pro-health-row strong.battery-low {
  color: var(--hh-pro-amber);
}

.asset-pro-section .hh-pro-health-row strong.battery-critical {
  color: var(--hh-pro-red);
}

.asset-pro-section .hh-pro-health-track.battery-high i {
  background: var(--hh-pro-cyan);
  box-shadow: 0 0 8px rgba(0, 241, 254, 0.62);
}

.asset-pro-section .hh-pro-health-track.battery-medium i {
  background: var(--hh-pro-amber);
  box-shadow: 0 0 8px rgba(217, 119, 33, 0.62);
}

.asset-pro-section .hh-pro-health-track.battery-low i {
  background: #ffb4ab;
  box-shadow: 0 0 8px rgba(255, 180, 171, 0.62);
}

.asset-pro-section .hh-pro-health-track.battery-critical i {
  background: var(--hh-pro-red);
  box-shadow: 0 0 8px rgba(255, 95, 126, 0.62);
}

.asset-pro-loading {
  display: none;
  align-items: center;
  gap: 0.45rem;
  color: var(--asset-pro-accent);
  font-size: 0.8rem;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .asset-pro-command-tools,
  .asset-pro-command-tools .page-actions {
    width: 100%;
  }

  .asset-pro-command-tools {
    justify-content: flex-start;
  }

  #section-radios #radio-grid.view-grid,
  #section-gopros #gopro-grid.view-grid,
  #section-rodantes #rodante-grid.view-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

@media (max-width: 760px) {
  .asset-pro-header .page-actions,
  .asset-pro-command-tools,
  .asset-pro-view-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .asset-pro-command-search,
  .asset-pro-header .page-actions .btn,
  .asset-pro-view-tools,
  .asset-pro-view-tools .view-dropdown-wrapper,
  .asset-pro-view-tools .btn-view-toggle {
    width: 100%;
  }

  #section-radios #radio-grid.view-grid,
  #section-gopros #gopro-grid.view-grid,
  #section-rodantes #rodante-grid.view-grid,
  #section-radios #radio-grid.view-simple,
  #section-gopros #gopro-grid.view-simple,
  #section-rodantes #rodante-grid.view-simple {
    grid-template-columns: 1fr;
  }

  .asset-pro-device-card .hh-pro-device-state {
    max-width: 52%;
  }
}

/* ==============================
   MODAL
   ============================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.modal-overlay.visible {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 480px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.08);
}

.form-input[readonly] {
  background: rgba(255,255,255,0.02);
  color: var(--text-secondary);
  cursor: not-allowed;
  border-style: dashed;
}

.form-input[readonly]:focus {
  border-color: var(--border-glass);
  box-shadow: none;
}

.cedi-locked-field:disabled {
  opacity: 1;
  cursor: not-allowed;
  background: rgba(255,255,255,0.035);
  color: var(--text-secondary);
  border-style: dashed;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.cedi-salida-equipo-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-top: 1rem;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.cedi-salida-equipo-option:hover {
  border-color: rgba(34,211,238,0.32);
  background: rgba(34,211,238,0.06);
}

.cedi-salida-equipo-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cedi-salida-equipo-box {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 6px;
  background: rgba(2,8,23,0.35);
  transition: var(--transition-fast);
}

.cedi-salida-equipo-input:focus-visible + .cedi-salida-equipo-box {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

.cedi-salida-equipo-input:checked + .cedi-salida-equipo-box {
  border-color: var(--accent-cyan);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  box-shadow: 0 8px 22px rgba(34,211,238,0.18);
}

.cedi-salida-equipo-input:checked + .cedi-salida-equipo-box::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.cedi-salida-equipo-text {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}

.form-select {
  appearance: none;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.modal-card-kit {
  width: min(1040px, 94vw);
  max-width: 1040px;
}

.modal-card.kit-pro-plus-modal {
  container-type: inline-size;
  width: min(1000px, 94vw);
  max-width: 1000px;
  max-height: 92vh;
  padding: 1.1rem;
  border: 1px solid rgba(0, 241, 254, 0.22);
  border-radius: 10px;
  background:
    radial-gradient(circle at 10% 0%, rgba(0, 241, 254, 0.12), transparent 28%),
    radial-gradient(circle at 100% 12%, rgba(34, 197, 94, 0.08), transparent 24%),
    linear-gradient(135deg, rgba(18, 21, 30, 0.98), rgba(13, 15, 22, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.delivery-primary-scan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.delivery-primary-scan .btn {
  min-width: 190px;
}

.delivery-kit-status {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.35;
}

.delivery-kit-status.is-success {
  color: var(--accent-green);
}

.delivery-kit-status.is-warning {
  color: var(--accent-amber);
}

.delivery-kit-status.is-error {
  color: var(--accent-red);
}

.rodante-multi-delivery-panel {
  margin-top: 0.85rem;
  padding: 0.85rem;
  border: 1px solid rgba(217, 119, 33, 0.26);
  border-radius: 10px;
  background:
    radial-gradient(circle at 100% 0, rgba(217, 119, 33, 0.12), transparent 38%),
    rgba(17, 19, 25, 0.58);
}

.rodante-multi-delivery-panel[hidden] {
  display: none;
}

.rodante-multi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  color: rgba(199, 196, 215, 0.78);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rodante-multi-head strong {
  padding: 0.22rem 0.52rem;
  border: 1px solid rgba(217, 119, 33, 0.28);
  border-radius: 999px;
  background: rgba(217, 119, 33, 0.1);
  color: var(--delivery-amber);
  font-size: 0.68rem;
}

.rodante-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 38px;
}

.rodante-selected-empty {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: rgba(199, 196, 215, 0.54);
  font-size: 0.78rem;
}

.rodante-selected-chip {
  display: inline-grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.42rem;
  max-width: 100%;
  min-height: 38px;
  padding: 0.38rem 0.42rem 0.38rem 0.58rem;
  border: 1px solid rgba(217, 119, 33, 0.3);
  border-radius: 999px;
  background: rgba(217, 119, 33, 0.1);
  color: var(--delivery-amber);
}

.rodante-selected-chip > .material-symbols-outlined {
  font-size: 17px;
}

.rodante-selected-chip strong {
  color: var(--text-primary);
  font-size: 0.78rem;
}

.rodante-selected-chip small {
  min-width: 0;
  overflow: hidden;
  color: rgba(199, 196, 215, 0.62);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rodante-selected-chip button {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 119, 33, 0.3);
  border-radius: 999px;
  background: rgba(17, 19, 25, 0.56);
  color: rgba(226, 226, 235, 0.86);
  cursor: pointer;
}

.rodante-selected-chip button .material-symbols-outlined {
  font-size: 15px;
}

.rodante-multi-note {
  margin: 0.65rem 0 0;
  color: rgba(199, 196, 215, 0.58);
  font-size: 0.74rem;
  line-height: 1.35;
}

.delivery-kit-complements {
  display: grid;
  gap: 12px;
  margin: 1.4rem 0;
}

.delivery-kit-section-title {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.delivery-kit-section-note {
  margin: -4px 0 2px;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.delivery-kit-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.56);
}

.delivery-kit-row .delivery-kit-status {
  grid-column: 2 / 4;
  margin-top: -4px;
}

.delivery-kit-row-label {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 800;
}

.delivery-kit-optional {
  min-width: 112px;
  padding: 8px 18px;
  border: 1px solid rgba(168, 85, 247, 0.68);
  border-radius: 999px;
  background: rgba(88, 28, 135, 0.5);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 720px) {
  .kit-logistico-header,
  .kit-delivery-panel-head,
  .kit-delivery-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .kit-delivery-bottom .btn-primary {
    width: 100%;
    min-width: 0;
  }

  .kit-logistico-summary {
    grid-template-columns: 1fr;
  }

  .kit-recipient-grid,
  .kit-scan-grid {
    grid-template-columns: 1fr;
  }

  .delivery-primary-scan,
  .delivery-kit-row {
    grid-template-columns: 1fr;
  }

  .delivery-primary-scan .btn,
  .delivery-kit-optional {
    width: 100%;
    min-width: 0;
  }

  .delivery-kit-row .delivery-kit-status {
    grid-column: auto;
  }
}

@media (max-width: 920px) {
  .kit-delivery-launch-card,
  .kit-pro-plus-footer {
    grid-template-columns: 1fr;
  }

  .kit-launch-action,
  .kit-pro-plus-submit {
    width: 100%;
  }

  .kit-pro-plus-grid {
    grid-template-columns: 1fr;
  }

  .kit-logistico-toolbar,
  .kit-logistico-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .kit-logistico-toolbar .hh-pro-filter-chips,
  .kit-logistico-tools,
  .kit-logistico-tools .hh-view-dropdown,
  .kit-logistico-tools .hh-view-toggle,
  .kit-logistico-search {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

@container (max-width: 820px) {
  .kit-pro-plus-grid,
  .kit-pro-plus-footer {
    grid-template-columns: 1fr;
  }

  .kit-pro-plus-submit,
  .kit-comments-field,
  .kit-input-with-check,
  .kit-input-with-icon {
    width: 100%;
    min-width: 0;
  }

  .kit-pro-plus-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.18rem;
  }

  .kit-pro-plus-block {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .kit-pro-plus-modal {
    width: 94vw;
    padding: 0.9rem;
    max-height: 92vh;
  }

  .kit-pro-plus-head {
    align-items: stretch;
    flex-direction: column;
  }

  .kit-pro-plus-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .kit-pro-plus-head-actions .btn {
    flex: 1;
  }

  .kit-delivery-launch-card {
    gap: 0.75rem;
  }

  .kit-launch-icon {
    width: 42px;
    height: 42px;
  }
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 2rem;
}

.modal-actions .btn {
  flex: 1;
}

.ops-modal-card {
  width: min(560px, 92vw);
  padding: 1.55rem;
  border: 1px solid rgba(0, 241, 254, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(rgba(226, 226, 235, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 226, 235, 0.024) 1px, transparent 1px),
    radial-gradient(circle at 100% 0%, rgba(0, 241, 254, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(17, 19, 25, 0.98), rgba(20, 24, 34, 0.98));
  background-size: 28px 28px, 28px 28px, auto, auto;
  box-shadow: 0 28px 76px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.ops-modal-wide {
  width: min(900px, 94vw);
}

.ops-modal-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.ops-modal-head > div {
  min-width: 0;
  align-self: center;
}

.ops-modal-head > .ops-modal-icon {
  align-self: center;
  justify-self: center;
}

.ops-modal-icon,
.confirm-pro-card:not(.confirm-hh-detail-card) #confirm-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 241, 254, 0.42);
  border-radius: 10px;
  background: rgba(0, 241, 254, 0.09);
  color: var(--hh-pro-cyan);
  box-shadow: 0 0 24px rgba(0, 241, 254, 0.14);
}

.ops-modal-icon.material-symbols-outlined,
.confirm-pro-card:not(.confirm-hh-detail-card) #confirm-icon .material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  line-height: 1;
  text-align: center;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.ops-modal-icon.amber {
  border-color: rgba(217, 119, 33, 0.44);
  background: rgba(217, 119, 33, 0.1);
  color: var(--hh-pro-amber);
  box-shadow: 0 0 24px rgba(217, 119, 33, 0.14);
}

.ops-modal-icon.red {
  border-color: rgba(255, 95, 126, 0.44);
  background: rgba(255, 95, 126, 0.1);
  color: var(--hh-pro-red);
  box-shadow: 0 0 24px rgba(255, 95, 126, 0.14);
}

.ops-modal-kicker {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--hh-pro-cyan);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.ops-modal-card .modal-title,
.confirm-pro-card:not(.confirm-hh-detail-card) .modal-title {
  margin: 0;
  color: var(--hh-pro-text);
  font-size: 1.32rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.ops-modal-card .modal-subtitle {
  margin: 0.32rem 0 0;
  color: rgba(199, 196, 215, 0.7);
  font-size: 0.9rem;
  line-height: 1.35;
}

.ops-modal-card .form-label {
  color: rgba(199, 196, 215, 0.72);
  font-weight: 850;
  letter-spacing: 0.04em;
}

.ops-modal-card .form-input,
.ops-modal-card .form-select,
.ops-modal-card .form-textarea {
  min-height: 44px;
  border-color: rgba(144, 143, 160, 0.2);
  border-radius: 8px;
  background: rgba(12, 14, 20, 0.56);
}

.ops-modal-card .form-textarea {
  min-height: 104px;
}

.ops-modal-card .form-input:focus,
.ops-modal-card .form-select:focus,
.ops-modal-card .form-textarea:focus {
  border-color: rgba(0, 241, 254, 0.64);
  box-shadow: 0 0 0 1px rgba(0, 241, 254, 0.2), 0 0 24px rgba(0, 241, 254, 0.12);
}

.ops-modal-actions {
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(144, 143, 160, 0.14);
}

.ops-modal-actions.align-start {
  padding-top: 0;
  border-top: 0;
}

.ops-modal-actions .btn {
  min-height: 46px;
  border-radius: 8px;
  font-weight: 850;
}

.ops-modal-actions .material-symbols-outlined,
.rodante-admin-action .material-symbols-outlined,
.cedi-row-action .material-symbols-outlined,
.cedi-complete-pill .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
}

.confirm-pro-card:not(.confirm-hh-detail-card) {
  width: min(450px, 92vw);
  text-align: center;
}

.confirm-pro-card:not(.confirm-hh-detail-card) #confirm-icon {
  margin: 0 auto 1rem;
}

.confirm-pro-card:not(.confirm-hh-detail-card) #confirm-msg {
  margin: 0.85rem auto 0;
  max-width: 330px;
  color: rgba(199, 196, 215, 0.74);
  font-size: 0.95rem;
  line-height: 1.38;
}

.confirm-pro-card:not(.confirm-hh-detail-card) #confirm-msg b,
.confirm-pro-card:not(.confirm-hh-detail-card) #confirm-msg strong {
  color: var(--hh-pro-text);
}

.confirm-pro-card:not(.confirm-hh-detail-card) .ops-modal-actions {
  justify-content: center;
  margin-top: 1.35rem;
}

.confirm-pro-card:not(.confirm-hh-detail-card) .ops-modal-actions .btn {
  flex: 1 1 0;
}

.incident-pro-modal .btn-danger {
  border-color: rgba(255, 95, 126, 0.46);
  background: linear-gradient(135deg, rgba(255, 95, 126, 0.95), rgba(235, 69, 137, 0.94));
  box-shadow: 0 16px 34px rgba(255, 95, 126, 0.2);
}

.cedi-pro-datetime-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.cedi-extern-details-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(0, 241, 254, 0.18);
  border-radius: 12px;
  background: rgba(0, 241, 254, 0.045);
}

.rodante-admin-modal .section-header {
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
}

.rodante-admin-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

@media (max-width: 680px) {
  .ops-modal-card {
    padding: 1.2rem;
  }

  .ops-modal-head,
  .cedi-pro-datetime-grid {
    grid-template-columns: 1fr;
  }

  .ops-modal-icon {
    width: 44px;
    height: 44px;
  }

  .ops-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

.delivery-modal-actions {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.delivery-modal-actions .btn {
  flex: 0 0 auto;
  min-height: 46px;
  border-radius: var(--radius-sm);
}

.delivery-modal-actions .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
}

.delivery-cancel-action {
  min-width: 168px;
  color: rgba(199, 196, 215, 0.84);
  background: rgba(255, 255, 255, 0.035);
}

.delivery-submit-action {
  flex: 1 1 auto !important;
  min-width: 260px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 241, 254, 0.36);
  background:
    linear-gradient(135deg, rgba(0, 216, 255, 0.98), rgba(92, 115, 255, 0.98) 52%, rgba(168, 85, 247, 0.98));
  color: #fff;
  font-weight: 850;
  box-shadow: 0 14px 34px rgba(0, 216, 255, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.delivery-submit-action::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  opacity: 0;
  transform: translateX(-70%);
  transition: opacity 0.2s ease, transform 0.45s ease;
}

.delivery-submit-action:hover::before {
  opacity: 1;
  transform: translateX(70%);
}

.delivery-submit-action span {
  position: relative;
  z-index: 1;
}

.delivery-pro-card {
  --delivery-cyan: #00f1fe;
  --delivery-violet: #8083ff;
  --delivery-green: #4ade80;
  --delivery-amber: #d97721;
  --delivery-red: #ff5f7e;
  width: min(820px, calc(100vw - 2rem));
  max-width: 820px;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid rgba(144, 143, 160, 0.22);
  border-radius: 24px;
  background:
    linear-gradient(rgba(226, 226, 235, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 226, 235, 0.024) 1px, transparent 1px),
    radial-gradient(circle at 82% 0%, rgba(128, 131, 255, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(17, 19, 25, 0.98), rgba(20, 24, 34, 0.98));
  background-size: 32px 32px, 32px 32px, auto, auto;
  color: #e2e2eb;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(0, 241, 254, 0.08) inset;
  overflow: hidden;
}

#modal-delivery.modal-overlay {
  padding: 1rem;
  box-sizing: border-box;
  overflow: hidden;
}

.delivery-pro-hero {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(144, 143, 160, 0.16);
  background: linear-gradient(135deg, rgba(30, 31, 38, 0.72), rgba(17, 19, 25, 0.42));
}

.delivery-pro-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  border: 1px solid currentColor;
  border-radius: 10px;
  background: color-mix(in srgb, currentColor 12%, transparent);
  color: var(--delivery-cyan);
  box-shadow: 0 0 20px rgba(0, 241, 254, 0.12);
}

.delivery-pro-icon .material-symbols-outlined {
  font-size: 24px;
  font-variation-settings: 'FILL' 0, 'wght' 520, 'GRAD' 0, 'opsz' 24;
}

.delivery-pro-title-block {
  flex: 1;
  min-width: 0;
}

.delivery-pro-eyebrow {
  display: block;
  margin-bottom: 0.2rem;
  color: rgba(199, 196, 215, 0.72);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.delivery-pro-card .modal-title {
  margin: 0;
  color: #e2e2eb;
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.delivery-pro-card .modal-subtitle {
  margin: 0.35rem 0 0;
  color: rgba(199, 196, 215, 0.72);
  font-size: 0.86rem;
}

.delivery-pro-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  padding: 0 0.72rem;
  border: 1px solid rgba(0, 241, 254, 0.35);
  border-radius: 999px;
  background: rgba(0, 241, 254, 0.08);
  color: var(--delivery-cyan);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.delivery-pro-chip-dot,
.delivery-pro-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.delivery-pro-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(196px, 220px);
  gap: 0.85rem;
  padding: 1rem 1.25rem 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.delivery-pro-main {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
}

.delivery-pro-field,
.delivery-pro-kit-panel,
.delivery-pro-extern-panel {
  margin: 0;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(144, 143, 160, 0.2);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 241, 254, 0.06), transparent 36%),
    rgba(25, 27, 34, 0.74);
}

.delivery-pro-field-scan {
  border-color: rgba(0, 241, 254, 0.28);
  box-shadow: 0 0 18px rgba(0, 241, 254, 0.06);
}

.delivery-pro-label {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin-bottom: 0.42rem;
  color: rgba(199, 196, 215, 0.78);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.delivery-pro-label .material-symbols-outlined {
  color: var(--delivery-cyan);
  font-size: 18px;
}

.delivery-pro-card .form-input,
.delivery-pro-card .form-select,
.delivery-pro-card .form-textarea {
  min-height: 44px;
  border-color: rgba(144, 143, 160, 0.22);
  border-radius: 9px;
  background: rgba(17, 19, 25, 0.6);
  color: #e2e2eb;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.2);
}

.delivery-pro-card .form-input:focus,
.delivery-pro-card .form-select:focus,
.delivery-pro-card .form-textarea:focus {
  border-color: var(--delivery-cyan);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.22), 0 0 0 3px rgba(0, 241, 254, 0.12);
}

.delivery-pro-card .form-select:disabled {
  opacity: 1;
  color: rgba(226, 226, 235, 0.82);
  cursor: not-allowed;
  background: rgba(30, 31, 38, 0.68);
}

.delivery-pro-card .form-textarea {
  min-height: 70px;
}

.delivery-pro-card .delivery-primary-scan .btn {
  min-width: 164px;
  border-color: rgba(0, 241, 254, 0.28);
  color: rgba(226, 226, 235, 0.88);
  background: rgba(17, 19, 25, 0.42);
}

.delivery-pro-card .delivery-primary-scan .material-symbols-outlined {
  font-size: 18px;
}

.delivery-pro-card .delivery-kit-status,
.delivery-pro-card .delivery-identity-lock {
  margin-top: 0.55rem;
  color: rgba(199, 196, 215, 0.66);
  font-size: 0.76rem;
}

.delivery-pro-kit-panel {
  margin: 0;
}

.delivery-pro-extern-panel {
  margin-bottom: 0;
}

.delivery-pro-card .delivery-hh-validation {
  margin: 0;
  border-radius: 12px;
  border-color: rgba(0, 241, 254, 0.2);
  background: rgba(17, 19, 25, 0.56);
}

.delivery-pro-rail {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid rgba(144, 143, 160, 0.2);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(30, 31, 38, 0.7), rgba(17, 19, 25, 0.54));
}

.delivery-pro-rail-head,
.delivery-pro-step,
.delivery-pro-status-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
}

.delivery-pro-rail-head {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(144, 143, 160, 0.16);
}

.delivery-pro-rail-head > .material-symbols-outlined,
.delivery-pro-step > .material-symbols-outlined {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(144, 143, 160, 0.24);
  border-radius: 9px;
  color: rgba(199, 196, 215, 0.78);
  background: rgba(17, 19, 25, 0.42);
  font-size: 19px;
}

.delivery-pro-step {
  position: relative;
  padding: 0.15rem 0;
}

.delivery-pro-step.is-active > .material-symbols-outlined {
  border-color: var(--delivery-cyan);
  color: var(--delivery-cyan);
  box-shadow: 0 0 18px rgba(0, 241, 254, 0.14);
}

.delivery-pro-rail strong,
.delivery-pro-status-card strong {
  display: block;
  color: #e2e2eb;
  font-size: 0.84rem;
  line-height: 1.2;
}

.delivery-pro-rail small,
.delivery-pro-status-card small {
  display: block;
  margin-top: 0.18rem;
  color: rgba(199, 196, 215, 0.64);
  font-size: 0.72rem;
  line-height: 1.35;
}

.delivery-pro-status-card {
  margin-top: auto;
  padding: 0.82rem;
  border: 1px solid rgba(74, 222, 128, 0.22);
  border-radius: 10px;
  background: rgba(74, 222, 128, 0.07);
  color: var(--delivery-green);
}

.delivery-pro-card[data-delivery-type='radio'] .delivery-pro-icon,
.delivery-pro-card[data-delivery-type='radio'] .delivery-pro-chip,
.delivery-pro-card[data-delivery-type='radio'] .delivery-pro-label .material-symbols-outlined,
.delivery-pro-card[data-delivery-type='radio'] .delivery-pro-step.is-active > .material-symbols-outlined {
  color: var(--delivery-violet);
}

.delivery-pro-card[data-delivery-type='gopro'] .delivery-pro-icon,
.delivery-pro-card[data-delivery-type='gopro'] .delivery-pro-chip,
.delivery-pro-card[data-delivery-type='gopro'] .delivery-pro-label .material-symbols-outlined,
.delivery-pro-card[data-delivery-type='gopro'] .delivery-pro-step.is-active > .material-symbols-outlined {
  color: var(--delivery-cyan);
}

.delivery-pro-card[data-delivery-type='rodante'] .delivery-pro-icon,
.delivery-pro-card[data-delivery-type='rodante'] .delivery-pro-chip,
.delivery-pro-card[data-delivery-type='rodante'] .delivery-pro-label .material-symbols-outlined,
.delivery-pro-card[data-delivery-type='rodante'] .delivery-pro-step.is-active > .material-symbols-outlined {
  color: var(--delivery-amber);
}

.delivery-pro-card[data-delivery-type='rodante'] {
  width: min(960px, calc(100vw - 2rem));
  max-width: 960px;
}

.delivery-pro-card[data-delivery-type='kit'] .delivery-pro-icon,
.delivery-pro-card[data-delivery-type='kit'] .delivery-pro-chip,
.delivery-pro-card[data-delivery-type='kit'] .delivery-pro-label .material-symbols-outlined,
.delivery-pro-card[data-delivery-type='kit'] .delivery-pro-step.is-active > .material-symbols-outlined {
  color: var(--delivery-green);
}

.delivery-pro-card .delivery-modal-actions {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin: 0;
  padding: 0.85rem 1.25rem 1rem;
  border-top-color: rgba(144, 143, 160, 0.16);
  background:
    linear-gradient(180deg, rgba(20, 24, 34, 0.82), rgba(13, 15, 22, 0.98)),
    radial-gradient(circle at 72% 0%, rgba(0, 241, 254, 0.12), transparent 34%);
  box-shadow: 0 -18px 34px rgba(0, 0, 0, 0.28);
}

@media (max-height: 900px) {
  #modal-delivery.modal-overlay {
    padding: 0.5rem;
  }

  .delivery-pro-card {
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    border-radius: 18px;
  }

  .delivery-pro-hero {
    padding: 0.75rem 1rem;
  }

  .delivery-pro-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .delivery-pro-card .modal-title {
    font-size: 1.22rem;
  }

  .delivery-pro-card .modal-subtitle {
    margin-top: 0.18rem;
    font-size: 0.78rem;
  }

  .delivery-pro-shell {
    grid-template-columns: minmax(0, 1fr) minmax(196px, 220px);
    gap: 0.75rem;
    padding: 0.7rem 1rem 0;
  }

  .delivery-pro-main {
    gap: 0.58rem;
  }

  .delivery-pro-field,
  .delivery-pro-kit-panel,
  .delivery-pro-extern-panel {
    padding: 0.62rem 0.75rem;
  }

  .delivery-pro-label {
    margin-bottom: 0.35rem;
    font-size: 0.68rem;
  }

  .delivery-pro-card .form-input,
  .delivery-pro-card .form-select,
  .delivery-pro-card .form-textarea {
    min-height: 38px;
    padding: 9px 12px;
  }

  .delivery-pro-card .form-textarea {
    min-height: 58px;
  }

  .delivery-pro-card .delivery-kit-status,
  .delivery-pro-card .delivery-identity-lock {
    margin-top: 0.38rem;
    font-size: 0.7rem;
  }

  .delivery-pro-card .delivery-hh-validation {
    gap: 0.45rem;
    padding: 0.62rem 0.75rem;
  }

  .delivery-hh-validation-badge {
    min-height: 26px;
    padding: 0.28rem 0.65rem;
    font-size: 0.68rem;
  }

  .delivery-hh-validation-caption {
    font-size: 0.68rem;
  }

  .delivery-hh-validation-message {
    font-size: 0.76rem;
    line-height: 1.34;
  }

  .delivery-hh-validation-detail {
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .delivery-pro-rail {
    gap: 0.55rem;
    padding: 0.7rem;
  }

  .delivery-pro-rail-head {
    padding-bottom: 0.55rem;
  }

  .delivery-pro-step {
    padding: 0;
  }

  .delivery-pro-status-card {
    padding: 0.6rem;
  }

  .delivery-pro-card .delivery-modal-actions {
    padding: 0.65rem 1rem 0.75rem;
  }

  .delivery-modal-actions .btn {
    min-height: 40px;
  }
}

@media (max-width: 960px) {
  .delivery-pro-shell {
    grid-template-columns: 1fr;
  }

  .delivery-pro-rail {
    order: -1;
  }

  .delivery-pro-status-card {
    margin-top: 0;
  }
}

@media (max-width: 720px) {
  .delivery-pro-card {
    width: 96vw;
    border-radius: 18px;
  }

  .delivery-pro-hero {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 1rem;
  }

  .delivery-pro-chip {
    margin-left: 56px;
  }

  .delivery-pro-shell {
    padding: 1rem 1rem 0;
  }

  .delivery-primary-scan {
    grid-template-columns: 1fr;
  }

  .delivery-pro-card .delivery-modal-actions {
    margin: 1rem;
  }

  .delivery-modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .delivery-modal-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* ==============================
   CLICKABLE STAT CARDS
   ============================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card.clickable {
  cursor: pointer;
}

.stat-card.clickable:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-md), var(--shadow-glow-cyan);
}

.stat-card.clickable:active {
  transform: translateY(0) scale(0.98);
}

/* ==============================
   SEARCH BAR & FILTER CHIPS
   ============================== */
.search-bar {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-input {
  font-size: 0.95rem !important;
  padding: 14px 20px !important;
  border-radius: var(--radius-md) !important;
  background: rgba(255,255,255,0.03) !important;
}

.search-input:focus {
  background: rgba(255,255,255,0.06) !important;
}

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.chip:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}

.chip.active {
  background: rgba(34,211,238,0.12);
  color: var(--accent-cyan);
  border-color: rgba(34,211,238,0.3);
}

/* ==============================
   VALIDATION FEEDBACK
   ============================== */
.validation-msg {
  font-size: 0.78rem;
  margin-top: 4px;
  font-weight: 500;
}

.validation-msg.success {
  color: var(--accent-green);
}

.validation-msg.error {
  color: var(--accent-red);
}

/* ==============================
   SECTIONS
   ============================== */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: sectionFade 0.4s ease;
}

@keyframes sectionFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Validation Messages */
.validation-msg {
  font-size: 0.75rem;
  margin-top: 4px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.validation-msg.success { color: var(--accent-green); }
.validation-msg.error { color: var(--accent-red); }

/* Overdue Indicator */
.device-card.overdue {
  border-color: rgba(248, 113, 113, 0.4);
  box-shadow: 0 0 15px rgba(248, 113, 113, 0.1);
}

.device-card.overdue .status-chip.operando {
  background: rgba(248, 113, 113, 0.1);
  color: var(--accent-red);
  animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Modal Actions */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 2rem;
}

.delivery-modal-actions {
  justify-content: space-between;
}

/* Zebra Scanner helper */
input:focus {
  background: rgba(34, 211, 238, 0.08) !important;
}

/* Animations */
@keyframes toastSlide {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}


/* ==============================
   SCROLLBAR
   ============================== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.15);
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 1.5rem; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .devices-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; gap: 1rem; }
  .page-header-tools {
    width: 100%;
    justify-content: stretch;
  }
  .page-header-tools .page-actions {
    width: 100%;
  }
  .presence-shell {
    width: 100%;
    justify-content: space-between;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
  }
  .presence-meta {
    min-width: 0;
  }
  .presence-summary {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ==============================
   BITÁCORA / HISTORY TABLE
   ============================== */
.history-table tr {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}
.history-table tr:hover {
  background: rgba(255,255,255,0.02);
}
.history-table td {
  padding: 1rem;
}
.action-pill {
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}
.action-pill.entrega { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.action-pill.devolucion { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.action-pill.incidencia { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.action-pill.baja { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

/* ==============================
   LOGIN TOGGLE
   ============================== */
.login-toggle {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.3s;
}
.login-toggle:hover {
  color: var(--accent-cyan);
}
.hidden-form {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.hidden-form.visible {
  max-height: 300px;
  opacity: 1;
  margin-top: 1rem;
}

/* ==============================
   CHARTS
   ============================== */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 2rem;
}
.chart-container-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1rem;
  backdrop-filter: blur(10px);
  height: 200px;
  display: flex;
  flex-direction: column;
}
.chart-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
canvas {
  flex: 1;
  max-height: 140px !important;
  width: 100% !important;
}
@media (max-width: 900px) {
  .charts-row { grid-template-columns: 1fr; }
  .section-header {
    align-items: flex-start;
    gap: 0.75rem;
    flex-direction: column;
  }
  .section-summary-group,
  .dash-device-breakdown {
    justify-content: flex-start;
  }
}

/* ==============================
   ADMIN PANEL
   ============================== */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
}
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  height: fit-content;
}
.admin-card-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.admin-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.admin-card-icon.cyan { background: rgba(34, 211, 238, 0.1); color: var(--accent-cyan); }
.admin-card-icon.purple { background: rgba(168, 85, 247, 0.1); color: var(--accent-purple); }

.admin-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.admin-card-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
}

@media (max-width: 1100px) {
  .admin-grid { grid-template-columns: 1fr; }
}

/* ==============================
   AUTH TAGS
   ============================== */
.auth-input-container {
  display: flex;
  gap: 10px;
  margin-bottom: 1.5rem;
}
/* ==============================
   ADMIN PANEL
   ============================== */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.5rem;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition-smooth);
}

.admin-card:hover {
  border-color: var(--border-glow);
}

.admin-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.25rem;
}

.admin-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.admin-card-icon.cyan   { background: rgba(34,211,238,0.1); }
.admin-card-icon.amber  { background: rgba(251,191,36,0.1); }
.admin-card-icon.red    { background: rgba(248,113,113,0.1); }
.admin-card-icon.purple { background: rgba(168,85,247,0.1); }

.admin-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.admin-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.auth-input-container {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
}

.auth-input-container .form-input {
  flex: 1;
  user-select: text;
}

.auth-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 1rem;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  min-height: 100px;
  max-height: 128px;
  align-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.35) transparent;
}

.auth-tags-list::-webkit-scrollbar {
  width: 8px;
}

.auth-tags-list::-webkit-scrollbar-track {
  background: transparent;
}

.auth-tags-list::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.28);
  border-radius: 999px;
}

.auth-tags-list::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.42);
}

.auth-tag {
  background: rgba(34,211,238,0.08);
  color: var(--accent-cyan);
  border: 1px solid rgba(34,211,238,0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.auth-tag:hover {
  background: rgba(34,211,238,0.15);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.auth-tag-remove {
  cursor: pointer;
  font-weight: 800;
  font-size: 0.9rem;
  opacity: 0.7;
}

.auth-tag-remove:hover {
  opacity: 1;
  color: var(--accent-red);
}

/* ==============================
   SEARCH BAR TOP ROW
   ============================== */
.search-bar-top {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.search-bar-top .search-input {
  flex: 1;
  min-width: 0;
}

.search-bar-top .view-dropdown-wrapper {
  margin-left: auto;
}

/* ==============================
   VIEW DROPDOWN — Premium Button & Menu
   ============================== */
.view-dropdown-wrapper {
  position: relative;
  flex-shrink: 0;
}

.btn-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.btn-view-toggle:hover {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.3);
  color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.08);
}

.btn-view-toggle.open {
  background: rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.4);
  color: var(--accent-cyan);
}

.view-dd-arrow {
  font-size: 0.65rem;
  opacity: 0.7;
  transition: transform 0.25s ease;
}

.btn-view-toggle.open .view-dd-arrow {
  transform: rotate(180deg);
}

.view-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 3000;
  min-width: 250px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px;
  backdrop-filter: blur(30px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.03);
  display: none;
  animation: viewMenuSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-dropdown-menu.open {
  display: block;
}

@keyframes viewMenuSlide {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.view-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  text-align: left;
  transition: var(--transition-fast);
}

.view-option:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.view-option.active {
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent-cyan);
}

.view-option.active .view-opt-label {
  color: var(--accent-cyan);
}

.view-opt-icon {
  font-size: 1.3rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.view-opt-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.view-opt-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==============================
   DEVICE GRIDS PER VIEW MODE
   ============================== */

/* Default: Cuadrícula Completa */
.devices-grid,
#hh-grid.view-grid,
#radio-grid.view-grid,
#gopro-grid.view-grid,
#rodante-grid.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  justify-content: center;
  gap: 1.25rem;
}

/* Tarjetas Simples */
#hh-grid.view-simple,
#radio-grid.view-simple,
#gopro-grid.view-simple,
#rodante-grid.view-simple {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  justify-content: center;
  gap: 1rem;
}

#hh-grid.view-simple .device-card,
#radio-grid.view-simple .device-card,
#gopro-grid.view-simple .device-card,
#rodante-grid.view-simple .device-card {
  padding: 1.1rem 1.25rem;
}

#hh-grid.view-simple .device-details,
#radio-grid.view-simple .device-details,
#gopro-grid.view-simple .device-details,
#rodante-grid.view-simple .device-details {
  display: none;
}

#hh-grid.view-simple .device-actions,
#radio-grid.view-simple .device-actions,
#gopro-grid.view-simple .device-actions,
#rodante-grid.view-simple .device-actions {
  margin-top: 0.75rem;
}

/* Mosaico de Iconos */
#hh-grid.view-mosaic,
#radio-grid.view-mosaic,
#gopro-grid.view-mosaic,
#rodante-grid.view-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.85rem;
}

.mosaic-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.1rem 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: default;
  transition: var(--transition-smooth);
  overflow: visible;
}

.mosaic-card:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.mosaic-card .mosaic-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.mosaic-card .mosaic-id {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.2;
}

.mosaic-card .mosaic-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.3);
}

.mosaic-indicator.operando-libre { background: var(--accent-green); }
.mosaic-indicator.en-uso         { background: var(--accent-amber); animation: pulseIndicator 2s ease-in-out infinite; }
.mosaic-indicator.ti             { background: var(--accent-amber); }
.mosaic-indicator.baja           { background: var(--accent-red); }
.mosaic-indicator.garantia       { background: var(--accent-blue); }

@keyframes pulseIndicator {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(251,191,36,0); }
}

/* Tooltip en Mosaico */
.mosaic-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  min-width: 220px;
  background: rgba(10, 14, 26, 0.97);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.6;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.7);
  white-space: nowrap;
}

.mosaic-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(34, 211, 238, 0.2);
}

.mosaic-card:hover .mosaic-tooltip {
  opacity: 1;
}

.mosaic-tooltip strong {
  color: var(--text-primary);
  font-weight: 700;
}

.mosaic-tooltip .tt-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.mosaic-tooltip .tt-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Lista Compacta */
#hh-grid.view-list,
#radio-grid.view-list,
#gopro-grid.view-list,
#rodante-grid.view-list {
  display: block;
}

.compact-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.compact-list-table thead tr {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.compact-list-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.compact-list-table th:hover {
  color: var(--text-primary);
}

.compact-list-table th.sort-active {
  color: var(--accent-cyan);
}

.sort-indicator {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.7rem;
  opacity: 0.7;
}

.compact-list-table td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
  color: var(--text-secondary);
}

.compact-list-table tr:hover td {
  background: rgba(255,255,255,0.025);
  color: var(--text-primary);
}

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

.compact-list-table .cell-id {
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-list-table .cell-icon {
  font-size: 1rem;
}

.compact-list-table .cell-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.compact-list-table .cell-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.compact-list-table .cell-badge.operando { background: rgba(52,211,153,0.1); color: var(--accent-green); }
.compact-list-table .cell-badge.ti       { background: rgba(251,191,36,0.1);  color: var(--accent-amber); }
.compact-list-table .cell-badge.baja     { background: rgba(248,113,113,0.1); color: var(--accent-red); }
.compact-list-table .cell-badge.garantia { background: rgba(59,130,246,0.1);  color: var(--accent-blue); }
.compact-list-table .cell-badge.reserva  { background: rgba(99,102,241,0.1);  color: #818cf8; }

/* ==============================
   BITÁCORA PREMIUM
   ============================== */

.history-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.05rem;
  background:
    radial-gradient(circle at top left, rgba(34,211,238,0.08), transparent 34%),
    linear-gradient(135deg, rgba(15,23,42,0.88), rgba(17,24,39,0.72));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(2,8,23,0.22);
}

.history-toolbar-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.history-search-wrap {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.history-search-wrap-hero {
  min-height: 62px;
}

.history-search-icon {
  position: absolute;
  left: 18px;
  font-size: 1.16rem;
  opacity: 0.76;
  pointer-events: none;
}

.history-search-input {
  width: 100%;
  min-height: 62px;
  padding: 14px 20px 14px 56px;
  background: linear-gradient(180deg, rgba(17,24,39,0.66), rgba(15,23,42,0.84));
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 18px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 500;
  outline: none;
  transition: var(--transition-fast);
}

.history-search-input:focus {
  border-color: rgba(34,211,238,0.28);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.06);
}

.history-search-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.history-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.history-filter-popover {
  position: relative;
}

.history-filter-trigger {
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.042), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.history-filter-trigger:hover,
.history-filter-trigger.active {
  border-color: rgba(34,211,238,0.34);
  box-shadow: 0 0 0 4px rgba(34,211,238,0.06);
}

.history-filter-trigger.has-active-filters {
  border-color: rgba(34,211,238,0.26);
}

.history-filter-trigger-icon {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 7px;
}

.history-filter-trigger-icon span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 999px;
  position: relative;
}

.history-filter-trigger-icon span::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.1);
}

.history-filter-trigger-icon span:nth-child(1)::after { right: 2px; }
.history-filter-trigger-icon span:nth-child(2)::after { left: 8px; }
.history-filter-trigger-icon span:nth-child(3)::after { right: 8px; }

.history-filter-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: min(360px, 82vw);
  padding: 1rem;
  background: linear-gradient(180deg, rgba(15,23,42,0.98), rgba(17,24,39,0.96));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  box-shadow: 0 24px 55px rgba(2,8,23,0.48);
  display: none;
  z-index: 30;
}

.history-filter-panel.open {
  display: block;
}

.history-range-popover,
.cedi-filter-popover {
  position: relative;
}

.history-range-trigger {
  min-width: 84px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 15px;
  background: linear-gradient(180deg, rgba(255,255,255,0.042), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-fast);
}

.history-range-trigger:hover,
.history-range-trigger.active {
  border-color: rgba(34,211,238,0.24);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.05);
}

.history-range-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.history-range-chevron {
  font-size: 0.98rem;
  line-height: 1;
  color: var(--text-muted);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.history-range-trigger.active .history-range-chevron {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

.history-range-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 132px;
  padding: 0.45rem;
  background: linear-gradient(180deg, rgba(15,23,42,0.98), rgba(17,24,39,0.96));
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(2,8,23,0.46);
  display: none;
  z-index: 30;
}

.history-range-panel.open {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-filter-panel-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.history-filter-panel-group + .history-filter-panel-group {
  margin-top: 0.9rem;
}

.history-group-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.history-filter-options {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.history-filter-option,
.history-range-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.history-filter-option:hover,
.history-range-option:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.13);
}

.history-filter-option.active,
.history-range-option.active {
  background: rgba(34,211,238,0.12);
  color: var(--accent-cyan);
  border-color: rgba(34,211,238,0.32);
  box-shadow: inset 0 0 0 1px rgba(34,211,238,0.08);
}

.history-filter-clear {
  margin-top: 1rem;
  width: 100%;
  min-height: 40px;
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  border: 1px dashed rgba(255,255,255,0.14);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.history-filter-clear:hover {
  border-color: rgba(248,113,113,0.3);
  color: var(--accent-red);
}

.history-active-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.history-active-filters[hidden] {
  display: none;
}

.history-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
}

.history-active-chip button {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.86rem;
  line-height: 1;
  padding: 0;
}

.history-active-chip button:hover {
  background: rgba(248,113,113,0.16);
  color: var(--accent-red);
}

.btn-history-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.btn-history-filter:hover {
  background: rgba(255,255,255,0.07);
  color: var(--text-primary);
}

.history-count-badge {
  background: rgba(255,255,255,0.032);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.history-toolbar-soft {
  padding: 0.95rem 1rem;
  background:
    radial-gradient(circle at top left, rgba(34,211,238,0.06), transparent 30%),
    linear-gradient(180deg, rgba(18, 35, 52, 0.8), rgba(15, 23, 42, 0.72));
}

.history-search-wrap-soft {
  min-height: 56px;
}

.history-search-wrap-soft .history-search-input {
  min-height: 56px;
  padding: 12px 18px 12px 52px;
  font-size: 0.95rem;
}

.history-search-wrap-soft .history-search-icon {
  left: 17px;
  font-size: 1.08rem;
}

.history-range-trigger-soft {
  min-width: 112px;
  height: 56px;
  padding: 0 14px;
}

.history-toolbar-actions-soft {
  gap: 10px;
}

.cedi-records-toolbar .history-toolbar-top {
  align-items: stretch;
}

.cedi-records-toolbar .history-toolbar-actions {
  flex-wrap: wrap;
}

.cedi-filter-trigger {
  min-width: 136px;
}

.cedi-filter-trigger .material-symbols-outlined {
  color: var(--accent-cyan);
  font-size: 20px;
}

.cedi-filter-panel {
  min-width: 190px;
  padding: 0.62rem;
}

.cedi-filter-panel-title {
  display: block;
  padding: 0.35rem 0.45rem 0.45rem;
  color: rgba(199, 196, 215, 0.62);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cedi-filter-panel .history-range-option {
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  border-radius: 8px;
}

.cedi-filter-panel .material-symbols-outlined {
  font-size: 18px;
}

.cedi-page-size {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(144, 143, 160, 0.18);
  border-radius: 10px;
  background: rgba(17, 19, 25, 0.62);
  color: rgba(199, 196, 215, 0.76);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cedi-page-size select {
  height: 34px;
  min-width: 70px;
  border: 1px solid rgba(0, 241, 254, 0.22);
  border-radius: 8px;
  background: rgba(12, 14, 20, 0.74);
  color: var(--hh-pro-text);
  font: inherit;
  font-size: 0.82rem;
  text-transform: none;
  outline: none;
}

.cedi-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(144, 143, 160, 0.12);
  background: rgba(12, 14, 20, 0.38);
}

.cedi-pagination-summary {
  color: rgba(199, 196, 215, 0.68);
  font-size: 0.82rem;
  font-weight: 700;
}

.cedi-pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cedi-pagination-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 8px;
}

.cedi-pagination-actions .btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
}

.cedi-empty-row {
  padding: 2.5rem;
  text-align: center;
  color: rgba(199, 196, 215, 0.44);
}

.cedi-type-pill {
  font-size: 0.7rem;
}

.cedi-type-pill-internal {
  border: 1px solid rgba(128, 131, 255, 0.24);
  background: rgba(128, 131, 255, 0.12);
  color: #a9a7ff;
}

.cedi-type-pill-external {
  border: 1px solid rgba(0, 241, 254, 0.24);
  background: rgba(0, 241, 254, 0.1);
  color: var(--hh-pro-cyan);
}

.cedi-type-pill-companion {
  margin-left: 4px;
  border: 1px solid rgba(74, 222, 128, 0.24);
  background: rgba(74, 222, 128, 0.1);
  color: var(--hh-pro-green);
}

.cedi-row-action,
.cedi-complete-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.cedi-row-action {
  color: var(--hh-pro-amber);
  border-color: rgba(217, 119, 33, 0.28);
}

.cedi-complete-pill {
  color: rgba(199, 196, 215, 0.68);
  font-size: 0.8rem;
  font-weight: 800;
}

.cedi-complete-pill .material-symbols-outlined {
  color: var(--hh-pro-green);
}

@media (max-width: 1080px) {
  .history-toolbar {
    padding: 1rem;
  }

  .history-toolbar-actions {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .history-filter-trigger {
    width: 58px;
    height: 58px;
  }

  .history-range-trigger {
    height: 58px;
  }

  .history-search-input {
    min-height: 62px;
    font-size: 0.98rem;
  }
}

@media (max-width: 720px) {
  .history-filter-panel {
    right: auto;
    left: 0;
    width: min(100%, 92vw);
  }

  .history-range-panel,
  .cedi-filter-panel {
    right: 0;
    left: auto;
    width: min(180px, 78vw);
  }

  .cedi-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .cedi-pagination-actions {
    width: 100%;
  }

  .cedi-pagination-actions .btn {
    flex: 1;
  }
}

/* Tabla Bitácora */
.history-table-wrapper {
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.rodante-admin-table-wrapper {
  max-height: min(40vh, 360px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.35) transparent;
}

.rodante-admin-table-wrapper thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(26, 32, 44, 0.96);
  backdrop-filter: blur(10px);
}

.bitacora-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.bitacora-table thead tr {
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.bitacora-table th {
  padding: 13px 18px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-muted);
  white-space: nowrap;
}

.bitacora-table td {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
  color: var(--text-secondary);
}

.bitacora-table tbody tr:hover td {
  background: rgba(255,255,255,0.02);
}

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

/* Celdas específicas */
.bitacora-table .bita-date {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.82rem;
  line-height: 1.2;
}

.bitacora-table .bita-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.bitacora-table .bita-asset {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.82rem;
  line-height: 1.2;
}

.bitacora-table .bita-serial {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  margin-top: 2px;
}

.bitacora-table .bita-colab-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.82rem;
  line-height: 1.2;
}

.bitacora-table .bita-ficha {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.bitacora-table .bita-registrado {
  color: var(--accent-cyan);
  font-size: 0.82rem;
  font-weight: 500;
}

.bitacora-table .bita-comments {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Acción pills en la bitácora */
.action-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.action-pill.entrega {
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.action-pill.devolucion {
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(34, 211, 238, 0.2);
}

.action-pill.baja {
  background: rgba(248, 113, 113, 0.12);
  color: var(--accent-red);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.action-pill.reactivacion {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.action-pill.movimiento,
.action-pill.otro {
  background: rgba(168, 85, 247, 0.12);
  color: var(--accent-purple);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.action-pill.cedi-salida-equipo-pill {
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.24);
  margin-left: 4px;
}

/* Paginación de Bitácora */
.history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid rgba(144, 143, 160, 0.12);
  background: rgba(12, 14, 20, 0.42);
}

.history-pagination-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.history-page-size-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(199, 196, 215, 0.7);
  font-size: 0.8rem;
  font-weight: 500;
}

.history-page-size-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  outline: none;
}

.history-page-size-select option {
  background: #1a202c;
  color: #fff;
}

.history-pagination-summary {
  color: rgba(199, 196, 215, 0.7);
  font-size: 0.82rem;
  font-weight: 600;
}

.history-pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.history-pagination-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
}

.history-pagination-actions .btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
  box-shadow: none;
}

@media (max-width: 768px) {
  .history-pagination {
    flex-direction: column;
    align-items: stretch;
  }
  .history-pagination-actions {
    width: 100%;
    justify-content: space-between;
  }
}


/* ==============================
   ADMIN PANEL — Premium Layout
   ============================== */

/* Separador de sección */
.admin-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.admin-section-label span {
  font-size: 0.9rem;
}

/* Grilla de 3 columnas para roles */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 960px) {
  .roles-grid { grid-template-columns: 1fr; }
}

/* Tarjeta de rol */
.role-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  border-left: 3px solid transparent;
  transition: var(--transition-smooth);
}

.role-card:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-sm);
}

.role-card.role-base  { border-left-color: var(--accent-cyan); }
.role-card.role-op    { border-left-color: var(--accent-amber); }
.role-card.role-super { border-left-color: #a855f7; }

.role-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1.1rem;
}

.role-card-title {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin: 0;
}

/* Badges de rol */
.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.role-badge.base       { background: rgba(34,211,238,0.12); color: var(--accent-cyan); border: 1px solid rgba(34,211,238,0.2); }
.role-badge.operacion  { background: rgba(251,191,36,0.12);  color: var(--accent-amber); border: 1px solid rgba(251,191,36,0.2); }
.role-badge.superadmin { background: rgba(168,85,247,0.12);  color: #c084fc; border: 1px solid rgba(168,85,247,0.2); }

/* icono cyan para admin cards */
.admin-card-icon.cyan { color: var(--accent-cyan); }

/* Tab bar Interno / Externo */
.emp-tab-bar {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
  margin-bottom: 1.25rem;
}

.emp-tab {
  padding: 7px 20px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.emp-tab:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.emp-tab.active {
  background: rgba(34,211,238,0.12);
  color: var(--accent-cyan);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Form row horizontal */
.emp-form-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.emp-form-row .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.emp-panel {
  animation: fadeInPanel 0.2s ease;
}

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

/* ==============================
   HH ALERTS + EMPLOYEE ADMIN
   ============================== */
.dashboard-alerts-shell {
  margin-bottom: 2rem;
  padding: 1.15rem;
  background:
    radial-gradient(circle at top left, rgba(251,191,36,0.08), transparent 26%),
    linear-gradient(180deg, rgba(17,24,39,0.78), rgba(15,23,42,0.7));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  box-shadow: 0 18px 34px rgba(2, 8, 23, 0.22);
}

.dashboard-alerts-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.dashboard-alert-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 150px;
  padding: 1rem 1.05rem;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
}

.dashboard-alert-card.is-empty {
  justify-content: center;
}

.dashboard-alert-card strong {
  font-size: 0.94rem;
  line-height: 1.35;
}

.dashboard-alert-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.dashboard-alert-main p {
  margin-top: 0.3rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.45;
}

.dashboard-alert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.dashboard-alert-note {
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.15);
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.5;
}

.employee-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.employee-admin-grid > .admin-card {
  height: 100%;
}

.employee-admin-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.15rem;
}

.employee-admin-hero .admin-card-header {
  margin-bottom: 0;
}

.employee-admin-hero-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.employee-admin-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.employee-admin-hero-note {
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.07);
  background:
    radial-gradient(circle at top left, rgba(34,211,238,0.06), transparent 30%),
    linear-gradient(180deg, rgba(18, 35, 52, 0.52), rgba(15,23,42,0.34));
}

.employee-admin-hero-note-label {
  display: inline-flex;
  margin-bottom: 0.45rem;
  color: var(--accent-cyan);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.employee-admin-modal-card {
  width: 760px;
  max-width: 94vw;
}

.employee-admin-modal-head {
  margin-bottom: 1.2rem;
}

.employee-admin-modal-kicker {
  margin-bottom: 0.55rem;
  color: var(--accent-cyan);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.employee-admin-modal-grid {
  margin-bottom: 0.25rem;
}

.employee-admin-modal-toggle-row {
  margin-bottom: 0.75rem;
}

.employee-admin-modal-actions {
  justify-content: flex-end;
}

.employee-admin-modal-actions .btn {
  flex: 0 0 auto;
  min-width: 150px;
}

.employee-admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.employee-admin-toggle-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.employee-admin-tab-bar {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-admin-tab-bar .emp-tab {
  width: 100%;
}

.employee-admin-form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.employee-admin-hint {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.employee-admin-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.employee-admin-metrics .report-mini-stat {
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.employee-admin-focus {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 20px;
  border: 1px solid rgba(34,211,238,0.14);
  background:
    radial-gradient(circle at top left, rgba(34,211,238,0.08), transparent 28%),
    linear-gradient(180deg, rgba(8, 47, 73, 0.36), rgba(15,23,42,0.3));
}

.employee-admin-focus-copy {
  flex: 1 1 240px;
}

.employee-admin-focus h4 {
  margin-bottom: 0.4rem;
  font-size: 0.94rem;
}

.employee-admin-focus p {
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
  font-size: 0.81rem;
  line-height: 1.55;
}

.employee-admin-focus-actions {
  flex: 1 1 240px;
  align-self: stretch;
  margin-left: auto;
}

.employee-admin-toolbar-actions {
  justify-content: flex-end;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.employee-admin-filter-options {
  width: 100%;
}

.employee-admin-filter-popover {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.employee-admin-filter-summary {
  min-width: 118px;
  height: 56px;
  padding-inline: 1rem;
}

.employee-admin-filter-summary.has-active-filters {
  border-color: rgba(34,211,238,0.28);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.05);
}

.employee-admin-filter-summary.has-active-filters .history-range-label {
  color: var(--accent-cyan);
}

.employee-admin-filter-panel {
  right: 0;
  width: min(320px, 84vw);
}

.employee-admin-meta {
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.employee-admin-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.employee-admin-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
}

.employee-admin-pill.active {
  background: rgba(52,211,153,0.12);
  border-color: rgba(52,211,153,0.2);
  color: var(--accent-green);
}

.employee-admin-pill.inactive {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
  color: var(--text-secondary);
}

.employee-admin-pill.review {
  background: rgba(251,191,36,0.12);
  border-color: rgba(251,191,36,0.2);
  color: var(--accent-amber);
}

.employee-admin-pill.handheld {
  background: rgba(34,211,238,0.12);
  border-color: rgba(34,211,238,0.22);
  color: var(--accent-cyan);
}

.employee-admin-pill.locked {
  background: rgba(168,85,247,0.12);
  border-color: rgba(168,85,247,0.18);
  color: #c084fc;
}

.employee-admin-pill.audit {
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.2);
  color: var(--accent-blue);
}

.employee-admin-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.employee-admin-muted {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.employee-admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -0.85rem 0 1.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.58);
}

.employee-admin-page-size,
.employee-admin-page-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.employee-admin-page-size .form-select {
  width: 96px;
  min-height: 42px;
  padding: 0.55rem 0.9rem;
}

.employee-admin-page-summary {
  color: var(--text-secondary);
  white-space: nowrap;
}

.employee-admin-page-controls .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.delivery-identity-lock {
  margin-top: 0.55rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.delivery-hh-validation {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: -0.1rem 0 1.2rem;
  padding: 1rem 1.05rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(15,23,42,0.84), rgba(17,24,39,0.68));
}

.delivery-hh-validation[hidden] {
  display: none;
}

.delivery-hh-validation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.delivery-hh-validation-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.delivery-hh-validation-caption {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.delivery-hh-validation-message {
  color: var(--text-primary);
  font-size: 0.84rem;
  line-height: 1.55;
}

.delivery-hh-validation-detail {
  min-height: 1.05em;
  color: var(--text-muted);
  font-size: 0.77rem;
  line-height: 1.45;
}

.delivery-hh-validation-fields {
  display: grid;
  gap: 0.75rem;
}

.delivery-hh-validation-fields .form-group {
  margin-bottom: 0;
}

.delivery-hh-quick-reasons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.delivery-hh-quick-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: 0.15rem;
}

.hh-quick-reason-chip {
  appearance: none;
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.09);
  color: #fde68a;
  border-radius: 999px;
  padding: 0.34rem 0.78rem;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.hh-quick-reason-chip:hover {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.5);
  color: #fef3c7;
  transform: translateY(-1px);
}

.hh-quick-reason-chip.is-active {
  background: rgba(0, 241, 254, 0.16);
  border-color: rgba(0, 241, 254, 0.55);
  color: #67e8f9;
  box-shadow: 0 0 0 1px rgba(0, 241, 254, 0.14);
}

.delivery-hh-validation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.delivery-hh-validation.is-success {
  border-color: rgba(52,211,153,0.22);
  box-shadow: inset 0 0 0 1px rgba(52,211,153,0.04);
}

.delivery-hh-validation.is-success .delivery-hh-validation-badge {
  background: rgba(52,211,153,0.14);
  color: var(--accent-green);
}

.delivery-hh-validation.is-warning {
  border-color: rgba(251,191,36,0.22);
  box-shadow: inset 0 0 0 1px rgba(251,191,36,0.05);
}

.delivery-hh-validation.is-warning .delivery-hh-validation-badge {
  background: rgba(251,191,36,0.14);
  color: var(--accent-amber);
}

.delivery-hh-validation.is-error {
  border-color: rgba(248,113,113,0.24);
  box-shadow: inset 0 0 0 1px rgba(248,113,113,0.05);
}

.delivery-hh-validation.is-error .delivery-hh-validation-badge {
  background: rgba(248,113,113,0.14);
  color: var(--accent-red);
}

.delivery-hh-validation.is-loading {
  border-color: rgba(59,130,246,0.22);
}

.delivery-hh-validation.is-loading .delivery-hh-validation-badge {
  background: rgba(59,130,246,0.14);
  color: var(--accent-blue);
}

.delivery-hh-validation.is-neutral .delivery-hh-validation-badge {
  background: rgba(34,211,238,0.1);
  color: var(--accent-cyan);
}

/* ==============================
   DASHBOARD NEXT-GEN STITCH PASS
   ============================== */
:root {
  --sidebar-width: 260px;
}

.app-shell.visible {
  background: #111319;
}

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  justify-self: stretch;
  background:
    linear-gradient(rgba(226, 226, 235, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 226, 235, 0.018) 1px, transparent 1px),
    linear-gradient(180deg, #0c0e14 0%, #111319 58%, #0c0e14 100%);
  background-size: 32px 32px, 32px 32px, auto;
  border-right: 1px solid rgba(70, 69, 84, 0.78);
  box-shadow:
    inset -1px 0 0 rgba(0, 241, 254, 0.08),
    24px 0 64px rgba(0, 0, 0, 0.24);
  padding: 1.75rem 0.9rem 1rem;
  isolation: isolate;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 241, 254, 0.32), transparent);
  pointer-events: none;
}

.sidebar-logo {
  padding: 0 0.65rem;
  margin-bottom: 0.35rem;
  color: #e2e2eb;
  background: none;
  -webkit-text-fill-color: currentColor;
  letter-spacing: 0;
  font-size: 1.38rem;
  text-shadow: 0 0 18px rgba(0, 241, 254, 0.22);
}

.sidebar-logo span {
  color: #00f1fe;
}

.sidebar-tagline {
  padding: 0 0.65rem;
  margin-bottom: 1.8rem;
  color: #908fa0;
  font-size: 0.64rem;
  letter-spacing: 0.18em;
}

.nav-section-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.65rem;
  margin: 1.35rem 0 0.65rem;
  color: #908fa0;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.nav-section-label::after {
  content: '';
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(144, 143, 160, 0.2), transparent);
}

.nav-section-control {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 0.55rem;
  margin: 1.45rem 0 0.35rem;
  padding: 0.25rem 0.58rem;
  border: 0;
  border-radius: 0;
  color: #c7c4d7;
  background: transparent;
  font-family: inherit;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  cursor: pointer;
}

.nav-section-control::after {
  display: none;
}

.nav-section-control:hover {
  color: #e2e2eb;
}

.nav-section-control > .material-symbols-outlined:first-child {
  color: #c7c4d7;
  font-size: 1.05rem;
  font-variation-settings: 'FILL' 0, 'wght' 550, 'GRAD' 0, 'opsz' 24;
}

.nav-section-control > span:nth-child(2) {
  color: #c7c4d7;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.08;
}

.nav-section-count {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 180, 171, 0.16);
  border-radius: 999px;
  background: rgba(255, 180, 171, 0.12);
  color: #ffb4ab;
  box-shadow: 0 0 14px rgba(255, 180, 171, 0.28);
  font-size: 0.68rem;
  font-weight: 900;
}

.nav-section-chevron {
  color: #c7c4d7;
  font-size: 1rem;
  font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 24;
  transition: transform 0.18s ease;
}

.nav-list {
  gap: 0.25rem;
}

.nav-sub-list {
  position: relative;
  max-height: 360px;
  margin: 0.15rem 0 0.35rem 0.85rem;
  padding: 0.2rem 0 0.2rem 1.65rem;
  gap: 0.35rem;
  overflow: hidden;
  opacity: 1;
  transition:
    max-height 0.24s ease,
    opacity 0.18s ease,
    margin 0.24s ease,
    padding 0.24s ease;
}

.nav-sub-list::before {
  content: '';
  position: absolute;
  left: 0.46rem;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 1px;
  border-radius: 999px;
  background: rgba(144, 143, 160, 0.28);
}

.nav-sub-list:not(.is-open) {
  max-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
}

.nav-sub-list .nav-item {
  min-height: 32px;
  padding: 0.28rem 0.45rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #aeb0c3;
  font-size: 0.77rem;
  font-weight: 750;
}

.nav-sub-list .nav-item:hover {
  background: rgba(30, 31, 38, 0.46);
  border-color: transparent;
  color: #e2e2eb;
}

.nav-sub-list .nav-item.active {
  background: rgba(0, 241, 254, 0.07);
  border-color: transparent;
  color: #00f1fe;
  box-shadow: none;
}

.nav-sub-list .nav-item.active::before,
.nav-sub-list .nav-badge {
  display: none;
}

.nav-item {
  min-height: 40px;
  gap: 0.72rem;
  padding: 0.5rem 0.62rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #aeb0c3;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  overflow: hidden;
}

.nav-item:hover {
  background: rgba(30, 31, 38, 0.72);
  border-color: rgba(144, 143, 160, 0.16);
  color: #e2e2eb;
}

.nav-item.active {
  background:
    linear-gradient(90deg, rgba(0, 241, 254, 0.16), rgba(128, 131, 255, 0.08)),
    rgba(25, 27, 34, 0.86);
  border-color: rgba(0, 241, 254, 0.22);
  color: #00f1fe;
  box-shadow:
    inset 0 0 0 1px rgba(0, 241, 254, 0.05),
    0 0 28px rgba(0, 241, 254, 0.07);
}

.nav-item.active::before {
  left: 0;
  width: 3px;
  height: calc(100% - 16px);
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, #8083ff, #00f1fe);
  box-shadow: 0 0 16px rgba(0, 241, 254, 0.7);
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c7c4d7;
  font-size: 1rem;
  text-align: center;
  flex-shrink: 0;
}

.nav-icon.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-size: 1.02rem;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
}

.nav-item.active .nav-icon {
  border-color: transparent;
  background: transparent;
  color: #00f1fe;
  box-shadow: none;
}

.nav-badge {
  min-width: 24px;
  padding: 0.12rem 0.45rem;
  border: 1px solid rgba(255, 180, 171, 0.22);
  border-radius: 999px;
  background: rgba(255, 180, 171, 0.12);
  color: #ffb4ab;
  font-size: 0.68rem;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0.9rem 0.1rem 0;
  border-top: 1px solid rgba(70, 69, 84, 0.48);
}

.sidebar #btn-logout {
  min-height: 42px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(255, 180, 171, 0.18);
  border-radius: 8px;
  background: #b91016;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
}

.sidebar #btn-logout:hover {
  background: #d01920;
  border-color: rgba(255, 180, 171, 0.36);
  transform: none;
}

.sidebar #btn-logout .material-symbols-outlined {
  font-size: 1.08rem;
  font-variation-settings: 'FILL' 0, 'wght' 550, 'GRAD' 0, 'opsz' 24;
}

.sidebar-footer-text {
  margin-top: 0.85rem;
  color: #908fa0;
  font-size: 0.68rem;
  line-height: 1.4;
  text-align: center;
  opacity: 0.72;
}

/* ==============================
   COMPACT STITCH SIDEBAR
   ============================== */
:root {
  --sidebar-width: 170px;
}

.sidebar {
  --sidebar-logo-size: clamp(20px, calc(var(--sidebar-width) * 0.09), 22px);
  --sidebar-tagline-size: clamp(11.8px, calc(var(--sidebar-width) * 0.052), 12.8px);
  --sidebar-label-size: clamp(9px, calc(var(--sidebar-width) * 0.049), 10px);
  --sidebar-nav-size: clamp(11.2px, calc(var(--sidebar-width) * 0.06), 12.8px);
  --sidebar-nav-line-height: clamp(1.16, calc(var(--sidebar-width) / 145), 1.26);
  --sidebar-group-size: clamp(12.8px, calc(var(--sidebar-width) * 0.064), 13.6px);
  --sidebar-subnav-size: clamp(11.8px, calc(var(--sidebar-width) * 0.059), 12.8px);
  --sidebar-icon-size: clamp(16px, calc(var(--sidebar-width) * 0.078), 18px);
  --sidebar-count-size: clamp(9.2px, calc(var(--sidebar-width) * 0.042), 10.2px);
  --sidebar-chevron-size: clamp(16px, calc(var(--sidebar-width) * 0.073), 18px);
  --sidebar-logout-size: clamp(15px, calc(var(--sidebar-width) * 0.065), 16px);
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  position: sticky;
  padding: 17px 10px 14px;
  background:
    linear-gradient(rgba(226, 226, 235, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 226, 235, 0.012) 1px, transparent 1px),
    linear-gradient(180deg, #12151d 0%, #171a22 54%, #12151d 100%);
  background-size: 28px 28px, 28px 28px, auto;
  border-right: 1px solid rgba(70, 74, 88, 0.72);
  box-shadow:
    inset -1px 0 0 rgba(0, 241, 254, 0.07),
    12px 0 30px rgba(0, 0, 0, 0.22);
  overflow-x: hidden;
}

.sidebar-resizer {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 8;
  width: 12px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}

.sidebar-resizer span {
  width: 3px;
  height: 74px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, transparent, rgba(0, 241, 254, 0.48), transparent),
    rgba(144, 143, 160, 0.16);
  box-shadow: 0 0 18px rgba(0, 241, 254, 0.16);
  opacity: 0.58;
  transition:
    width 0.18s ease,
    opacity 0.18s ease,
    box-shadow 0.18s ease;
}

.sidebar-resizer:hover span,
.sidebar-resizer:focus-visible span,
.sidebar-resizer.is-dragging span {
  width: 5px;
  opacity: 1;
  box-shadow: 0 0 20px rgba(0, 241, 254, 0.36);
}

.sidebar-resizer:focus-visible {
  outline: 2px solid rgba(0, 241, 254, 0.48);
  outline-offset: -3px;
}

body.sidebar-resizing {
  cursor: col-resize;
  user-select: none;
}

.sidebar-logo {
  padding: 0 6px;
  margin-bottom: 5px;
  color: #00f1fe;
  font-size: var(--sidebar-logo-size);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 13px rgba(0, 241, 254, 0.28);
}

.sidebar-logo span {
  color: #00f1fe;
}

.sidebar-tagline {
  padding: 0 6px;
  margin-bottom: 31px;
  color: #c3c0d0;
  font-size: var(--sidebar-tagline-size);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.nav-section-label:not(.nav-section-control) {
  display: block;
  padding: 0 5px;
  margin: 0 0 8px;
  color: #b7b4c5;
  font-size: var(--sidebar-label-size);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.nav-section-label::after {
  display: none;
}

.nav-list {
  gap: 5px;
}

.sidebar > .nav-list:first-of-type {
  margin-bottom: 8px;
}

.nav-item {
  min-height: 28px;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #b9b7c8;
  font-size: var(--sidebar-nav-size);
  line-height: var(--sidebar-nav-line-height);
  font-weight: 700;
}

.sidebar > .nav-list:first-of-type .nav-item {
  margin-left: 2px;
  margin-right: 2px;
}

.nav-item:hover {
  background: rgba(29, 32, 42, 0.74);
  border-color: rgba(144, 143, 160, 0.12);
  color: #e2e2eb;
}

.nav-item.active {
  min-height: 36px;
  background:
    linear-gradient(90deg, rgba(0, 241, 254, 0.13), rgba(0, 241, 254, 0.055)),
    #163037;
  border-color: rgba(0, 241, 254, 0.18);
  color: #00f1fe;
  box-shadow:
    inset 0 0 0 1px rgba(0, 241, 254, 0.04),
    0 0 18px rgba(0, 241, 254, 0.06);
}

.nav-item.active::before {
  left: 0;
  width: 3px;
  height: calc(100% - 12px);
  border-radius: 0 999px 999px 0;
  background: #00f1fe;
  box-shadow: 0 0 14px rgba(0, 241, 254, 0.72);
}

.nav-icon {
  width: var(--sidebar-icon-size);
  height: var(--sidebar-icon-size);
  color: #c7c4d7;
  font-size: var(--sidebar-icon-size);
}

.nav-icon.material-symbols-outlined {
  font-size: var(--sidebar-icon-size);
  font-variation-settings: 'FILL' 0, 'wght' 550, 'GRAD' 0, 'opsz' 20;
}

.nav-item.active .nav-icon {
  color: #00f1fe;
}

.nav-section-control {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr) 25px 16px;
  align-items: center;
  gap: 4px;
  margin: 0 0 8px;
  padding: 0 6px 0 8px;
  border: 0;
  border-radius: 0;
  color: #c7c4d7;
  background: transparent;
}

.nav-section-control:hover {
  background: transparent;
  color: #e2e2eb;
}

.nav-section-control > .material-symbols-outlined:first-child {
  color: #c7c4d7;
  font-size: var(--sidebar-icon-size);
  font-variation-settings: 'FILL' 0, 'wght' 550, 'GRAD' 0, 'opsz' 20;
}

.nav-section-control > span:nth-child(2) {
  color: #c7c4d7;
  font-size: var(--sidebar-group-size);
  line-height: 1.08;
  font-weight: 800;
  margin-left: 8px;
  white-space: normal;
}

.nav-section-count {
  min-width: 20px;
  width: 22px;
  height: 22px;
  border-color: rgba(255, 180, 171, 0.16);
  background: rgba(255, 180, 171, 0.1);
  color: #ffb4ab;
  box-shadow:
    0 0 11px rgba(255, 180, 171, 0.36),
    0 0 22px rgba(255, 180, 171, 0.14);
  font-size: var(--sidebar-count-size);
  font-weight: 900;
}

.nav-section-chevron.material-symbols-outlined {
  color: #c7c4d7;
  font-size: var(--sidebar-chevron-size);
  font-variation-settings: 'FILL' 0, 'wght' 650, 'GRAD' 0, 'opsz' 20;
}

.nav-sub-list {
  position: relative;
  max-height: 205px;
  margin: 0 0 17px 9px;
  padding: 0 0 1px 40px;
  gap: 8px;
  overflow: hidden;
}

.nav-sub-list::before {
  left: 5px;
  top: 1px;
  bottom: 0;
  width: 1px;
  background: rgba(126, 129, 146, 0.42);
}

.nav-sub-list:not(.is-open) {
  max-height: 0;
  margin-top: 0;
  margin-bottom: 17px;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

.nav-sub-list .nav-item {
  min-height: 22px;
  padding: 3px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c2c0d0;
  font-size: var(--sidebar-subnav-size);
  line-height: 1.2;
  font-weight: 700;
}

.nav-sub-list .nav-item:hover,
.nav-sub-list .nav-item.active {
  background: transparent;
  color: #e2e2eb;
}

.nav-sub-list .nav-item.active::before,
.nav-sub-list .nav-badge {
  display: none;
}

.sidebar-footer {
  margin: auto -10px 0;
  padding: 16px 10px 0;
  border-top: 1px solid rgba(70, 74, 88, 0.46);
}

.sidebar-secondary-nav {
  gap: 0;
  margin-bottom: 14px;
}

.sidebar-cedi-item {
  min-height: 24px;
  padding: 0 9px;
  color: #b9b7c8;
  background: transparent;
  border: 0;
}

.sidebar-cedi-item:hover,
.sidebar-cedi-item.active {
  min-height: 24px;
  background: transparent;
  border: 0;
  color: #e2e2eb;
  box-shadow: none;
}

.sidebar-cedi-item.active::before {
  display: none;
}

.sidebar #btn-logout {
  min-height: 38px;
  width: calc(100% - 4px);
  margin-left: 2px;
  margin-right: 2px;
  padding: 8px 10px;
  border-radius: 5px;
  background: #7c0610;
  border-color: rgba(255, 180, 171, 0.22);
  color: #ffffff;
  font-size: var(--sidebar-logout-size);
  font-weight: 800;
}

.sidebar #btn-logout .material-symbols-outlined {
  font-size: clamp(17px, calc(var(--sidebar-width) * 0.075), 19px);
}

.sidebar-footer-text {
  display: none;
}

.dashboard-next {
  --dash-bg: #111319;
  --dash-surface: rgba(17, 19, 25, 0.58);
  --dash-surface-strong: rgba(25, 27, 34, 0.82);
  --dash-surface-soft: rgba(30, 31, 38, 0.56);
  --dash-border: rgba(144, 143, 160, 0.2);
  --dash-border-strong: rgba(0, 241, 254, 0.42);
  --dash-text: #e2e2eb;
  --dash-muted: #c7c4d7;
  --dash-cyan: #00f1fe;
  --dash-violet: #8083ff;
  --dash-green: #4ade80;
  --dash-amber: #facc15;
  --dash-orange: #d97721;
  --dash-red: #ffb4ab;
  position: relative;
  isolation: isolate;
  padding-bottom: 1.5rem;
}

.content-section.active.dashboard-next {
  display: flex;
  flex-direction: column;
}

.dashboard-command-bar { order: 1; }
.dashboard-filter-row { order: 2; }
.dashboard-kpi-grid { order: 3; }
.dashboard-ops-grid { order: 4; }
.dashboard-recent-panel { order: 5; }
.dashboard-alerts-shell { order: 6; }

.dashboard-next::before {
  content: '';
  position: absolute;
  inset: -2rem -2.5rem 0 -2.5rem;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(226, 226, 235, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 226, 235, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 92% 6%, rgba(128, 131, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(17, 19, 25, 0.2), transparent 34%);
  background-size: 32px 32px, 32px 32px, auto, auto;
}

.dashboard-command-bar {
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.dashboard-title-block .page-title {
  color: var(--dash-text);
  font-size: clamp(1.8rem, 2.4vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.14);
}

.dashboard-title-block .page-subtitle {
  color: var(--dash-muted);
  margin-top: 0.35rem;
}

.dashboard-command-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.dashboard-command-tools .page-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: nowrap;
}

.dashboard-command-tools .btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 8px;
  font-size: 0.82rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.dashboard-command-tools .btn-primary {
  color: #0d0096;
  background: linear-gradient(135deg, var(--dash-violet), var(--dash-cyan));
  box-shadow: 0 0 20px rgba(0, 241, 254, 0.28);
}

.dashboard-command-tools .btn-ghost {
  background: rgba(17, 19, 25, 0.34);
  border-color: rgba(144, 143, 160, 0.35);
}

.dashboard-search-control {
  width: min(320px, 30vw);
  min-width: 230px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(144, 143, 160, 0.34);
  border-radius: 8px;
  background: rgba(30, 31, 38, 0.42);
  color: var(--dash-muted);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.28);
  transition: border-color var(--transition-fast), width var(--transition-fast), box-shadow var(--transition-fast);
}

.dashboard-search-control:focus-within {
  width: min(380px, 34vw);
  border-color: var(--dash-cyan);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.28), 0 0 0 3px rgba(0, 241, 254, 0.1);
}

.dashboard-search-control input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--dash-text);
  font: inherit;
  font-size: 0.82rem;
}

.dashboard-search-control input::placeholder {
  color: rgba(199, 196, 215, 0.52);
}

.dashboard-shortcut {
  flex: 0 0 auto;
  padding: 0.14rem 0.35rem;
  border: 1px solid rgba(144, 143, 160, 0.35);
  border-radius: 4px;
  background: rgba(55, 57, 64, 0.5);
  color: var(--dash-muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.dashboard-next .presence-shell {
  min-height: 42px;
  padding: 0.4rem 0.65rem;
  border-color: rgba(144, 143, 160, 0.26);
  background: rgba(30, 31, 38, 0.44);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.18);
}

.dashboard-next .presence-avatar {
  width: 30px;
  height: 30px;
  font-size: 0.68rem;
}

.dashboard-filter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dashboard-filter-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(144, 143, 160, 0.24);
  border-radius: 8px;
  background: rgba(30, 31, 38, 0.34);
  color: var(--dash-muted);
}

.dashboard-filter-chip select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--dash-text);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.dashboard-kpi-grid {
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dashboard-next .stat-card {
  min-height: 132px;
  padding: 0.95rem;
  border-radius: 12px;
  background: var(--dash-surface);
  border-color: var(--dash-border);
  backdrop-filter: blur(20px);
  box-shadow: none;
}

.dashboard-next .stat-card:hover {
  border-color: var(--dash-border-strong);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 241, 254, 0.12);
}

.dashboard-next .stat-card.priority-alert {
  border-left: 2px solid var(--dash-amber);
}

.dashboard-next .stat-card .stat-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 0.7rem;
  border-radius: 8px;
  border: 1px solid currentColor;
  font-size: 1.15rem;
  box-shadow: 0 0 12px rgba(0, 241, 254, 0.08);
}

.dashboard-next .stat-card .stat-icon.cyan,
.dashboard-next .stat-value.cyan { color: var(--dash-cyan); }
.dashboard-next .stat-card .stat-icon.green,
.dashboard-next .stat-value.green { color: var(--dash-green); }
.dashboard-next .stat-card .stat-icon.amber,
.dashboard-next .stat-value.amber { color: var(--dash-orange); }
.dashboard-next .stat-card .stat-icon.red,
.dashboard-next .stat-value.red { color: var(--dash-red); }
.dashboard-next .stat-card .stat-icon.purple,
.dashboard-next .stat-value.purple { color: var(--dash-violet); }
.dashboard-next .stat-card .stat-icon.blue,
.dashboard-next .stat-value.blue { color: #7dd3fc; }

.dashboard-next .stat-value {
  font-size: clamp(1.7rem, 2vw, 2.1rem);
  letter-spacing: 0;
  text-shadow: 0 0 12px currentColor;
}

.dashboard-next .stat-label {
  max-width: 100%;
  color: var(--dash-muted);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

.stat-trend {
  position: absolute;
  right: 0.75rem;
  top: 3.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  max-width: calc(100% - 4.5rem);
  padding: 0.24rem 0.4rem;
  border-radius: 5px;
  border: 1px solid currentColor;
  background: rgba(51, 52, 59, 0.42);
  color: var(--dash-muted);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.stat-trend .material-symbols-outlined {
  font-size: 0.82rem;
}

.stat-trend.positive { color: var(--dash-green); background: rgba(74, 222, 128, 0.1); }
.stat-trend.negative { color: var(--dash-red); background: rgba(255, 180, 171, 0.1); }
.stat-trend.warning { color: var(--dash-amber); background: rgba(250, 204, 21, 0.1); }

.stat-glow.purple { background: var(--dash-violet); }
.stat-glow.blue { background: #7dd3fc; }

.dashboard-ops-grid {
  --dashboard-map-width: clamp(320px, 22vw, 480px);
  display: grid;
  grid-template-columns:
    minmax(280px, 0.95fr)
    minmax(400px, 1.18fr)
    12px
    minmax(280px, var(--dashboard-map-width));
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: stretch;
}

.dashboard-next .chart-container-card,
.dashboard-map-card,
.dashboard-recent-panel {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  backdrop-filter: blur(20px);
}

.dashboard-next .chart-container-card {
  height: auto;
  min-height: 0;
  height: 360px;
  padding: 1.25rem;
}

.dashboard-next canvas {
  max-height: none !important;
}

.dashboard-next .chart-title {
  margin-bottom: 0.45rem;
  color: var(--dash-text);
  font-size: 1rem;
  letter-spacing: 0;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.12);
}

.dashboard-flow-card {
  gap: 0.75rem;
}

.dashboard-flow-card canvas {
  min-height: 250px;
}

.dashboard-donut-shell {
  --donut-size: clamp(178px, 12vw, 196px);
  position: relative;
  width: var(--donut-size) !important;
  min-width: var(--donut-size);
  max-width: var(--donut-size);
  height: var(--donut-size) !important;
  min-height: var(--donut-size) !important;
  max-height: var(--donut-size);
  margin: 0.15rem auto 0.2rem;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  flex: 0 0 var(--donut-size);
}

.dashboard-donut-shell canvas {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1;
  display: block;
}

.dashboard-donut-center {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 999px;
  background: rgba(17, 19, 25, 0.62);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.56);
  pointer-events: none;
}

.dashboard-donut-center strong {
  color: var(--dash-text);
  font-size: 1.55rem;
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.dashboard-donut-center span {
  color: var(--dash-muted);
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-chart-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.dashboard-chart-legend button {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.38rem 0.5rem;
  border: 1px solid rgba(144, 143, 160, 0.14);
  border-radius: 8px;
  background: rgba(30, 31, 38, 0.28);
  color: var(--dash-muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.dashboard-chart-legend i,
.chart-mini-legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 3px;
  box-shadow: 0 0 8px currentColor;
}

.dashboard-chart-legend .cyan,
.chart-mini-legend .cyan { color: var(--dash-cyan); background: var(--dash-cyan); }
.dashboard-chart-legend .green { color: var(--dash-green); background: var(--dash-green); }
.dashboard-chart-legend .amber { color: var(--dash-orange); background: var(--dash-orange); }
.dashboard-chart-legend .red { color: var(--dash-red); background: var(--dash-red); }
.chart-mini-legend .purple { color: var(--dash-violet); background: var(--dash-violet); }

.chart-mini-legend {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  color: var(--dash-muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chart-mini-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dashboard-map-card {
  min-height: 0;
  height: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-map-resizer {
  width: 12px;
  min-width: 12px;
  height: 360px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(199, 196, 215, 0.36);
  cursor: col-resize;
  touch-action: none;
}

.dashboard-map-resizer span {
  width: 3px;
  height: 54px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, transparent, rgba(0, 241, 254, 0.5), transparent),
    rgba(144, 143, 160, 0.14);
  box-shadow: 0 0 18px rgba(0, 241, 254, 0.16);
  opacity: 0.72;
  transition:
    width 0.18s ease,
    opacity 0.18s ease,
    box-shadow 0.18s ease;
}

.dashboard-map-resizer:hover span,
.dashboard-map-resizer:focus-visible span,
.dashboard-map-resizer.is-dragging span {
  width: 5px;
  opacity: 1;
  box-shadow: 0 0 20px rgba(0, 241, 254, 0.35);
}

.dashboard-map-resizer:focus-visible {
  outline: 2px solid rgba(0, 241, 254, 0.48);
  outline-offset: 2px;
}

body.dashboard-map-resizing {
  cursor: col-resize;
  user-select: none;
}

.dashboard-map-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(144, 143, 160, 0.18);
  background: rgba(17, 19, 25, 0.42);
}

.dashboard-map-head div {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dashboard-map-head strong {
  color: var(--dash-text);
  font-size: 0.82rem;
}

.dashboard-map-head > span {
  flex: 0 0 auto;
  padding: 0.16rem 0.42rem;
  border: 1px solid rgba(0, 241, 254, 0.45);
  border-radius: 5px;
  background: rgba(0, 241, 254, 0.12);
  color: var(--dash-cyan);
  font-size: 0.62rem;
  font-weight: 900;
}

.dashboard-map-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(45, 49, 57, 0.72) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 49, 57, 0.72) 1px, transparent 1px),
    #0a0c10;
  background-size: 20px 20px;
  box-shadow: inset 0 0 44px rgba(0, 0, 0, 0.9);
}

.dashboard-tracking-map {
  --map-zoom: 1;
  --map-pan-x: 0px;
  --map-pan-y: 0px;
  isolation: isolate;
  border-top: 1px solid rgba(0, 241, 254, 0.08);
  cursor: grab;
  touch-action: none;
}

.dashboard-tracking-map.is-dragging {
  cursor: grabbing;
}

.dashboard-floorplan {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0.88;
  filter: saturate(1.1) contrast(1.05);
  transform: translate(var(--map-pan-x), var(--map-pan-y)) scale(var(--map-zoom));
  transform-origin: center;
  transition: transform 0.16s ease;
  will-change: transform;
}

.dashboard-map-wall-layer {
  position: absolute;
  inset: 12% 10%;
  z-index: 1;
  transform: translate(var(--map-pan-x), var(--map-pan-y)) scale(var(--map-zoom));
  transform-origin: center;
  transition: transform 0.16s ease;
  will-change: transform;
  pointer-events: none;
}

.dashboard-map-wall-layer::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 24% 64%, rgba(0, 241, 254, 0.12), transparent 18%),
    radial-gradient(circle at 72% 38%, rgba(94, 255, 152, 0.1), transparent 20%),
    rgba(4, 9, 13, 0.56);
  box-shadow: inset 0 0 38px rgba(0, 0, 0, 0.74);
}

.dashboard-map-wall {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 241, 254, 0.25), rgba(0, 241, 254, 0.95), rgba(94, 255, 152, 0.58));
  box-shadow:
    0 0 12px rgba(0, 241, 254, 0.42),
    0 0 28px rgba(0, 241, 254, 0.16);
}

.dashboard-map-wall-top,
.dashboard-map-wall-bottom {
  left: 0;
  right: 0;
  height: 4px;
}

.dashboard-map-wall-left,
.dashboard-map-wall-right {
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(0, 241, 254, 0.25), rgba(0, 241, 254, 0.95), rgba(94, 255, 152, 0.58));
}

.dashboard-map-wall-top {
  top: 0;
}

.dashboard-map-wall-right {
  right: 0;
}

.dashboard-map-wall-bottom {
  bottom: 0;
}

.dashboard-map-wall-left {
  left: 0;
}

.dashboard-map-marker-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform: translate(var(--map-pan-x), var(--map-pan-y)) scale(var(--map-zoom));
  transform-origin: center;
  transition: transform 0.16s ease;
  will-change: transform;
}

.dashboard-tracking-map.is-dragging .dashboard-floorplan,
.dashboard-tracking-map.is-dragging .dashboard-map-wall-layer,
.dashboard-tracking-map.is-dragging .dashboard-map-marker-layer {
  transition: none;
}

.dashboard-map-zoom-controls {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.24rem;
  border: 1px solid rgba(0, 241, 254, 0.22);
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.82);
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
}

.dashboard-map-zoom-controls button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(144, 143, 160, 0.18);
  border-radius: 6px;
  background: rgba(30, 31, 38, 0.72);
  color: var(--dash-text);
  cursor: pointer;
}

.dashboard-map-zoom-controls button:hover,
.dashboard-map-zoom-controls button:focus-visible {
  border-color: rgba(0, 241, 254, 0.56);
  color: var(--dash-cyan);
  outline: none;
}

.dashboard-map-zoom-controls .material-symbols-outlined {
  font-size: 1rem;
}

.dashboard-map-zoom-controls span:not(.material-symbols-outlined) {
  min-width: 42px;
  color: var(--dash-muted);
  font-size: 0.64rem;
  font-weight: 950;
  text-align: center;
}

.hh-map-marker {
  --marker-offset-x: 0px;
  --marker-offset-y: 0px;
  position: absolute;
  min-width: 24px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(0, 241, 254, 0.58);
  border-radius: 999px;
  background: rgba(7, 12, 18, 0.9);
  color: var(--dash-cyan);
  box-shadow:
    0 0 0 4px rgba(0, 241, 254, 0.08),
    0 0 18px rgba(0, 241, 254, 0.42);
  transform: translate(calc(-50% + var(--marker-offset-x)), calc(-50% + var(--marker-offset-y)));
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.hh-map-marker:hover,
.hh-map-marker:focus-visible,
.hh-map-marker.is-selected {
  z-index: 4;
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.08),
    0 0 26px currentColor;
  outline: none;
  transform: translate(calc(-50% + var(--marker-offset-x)), calc(-50% + var(--marker-offset-y))) scale(1.08);
}

.hh-map-marker .material-symbols-outlined {
  font-size: 0.92rem;
}

.hh-map-marker b,
.hh-map-marker small {
  display: none;
}

.hh-map-marker.is-cluster {
  min-width: 28px;
  width: 28px;
  height: 28px;
}

.hh-map-marker.is-cluster::after {
  content: attr(data-count);
  position: absolute;
  right: -0.32rem;
  top: -0.36rem;
  min-width: 1rem;
  height: 1rem;
  display: inline-grid;
  place-items: center;
  padding-inline: 0.16rem;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(7, 10, 15, 0.94);
  color: #f8fbff;
  font-size: 0.5rem;
  font-weight: 950;
  line-height: 1;
}

.dashboard-map-card .hh-map-marker {
  min-width: 18px;
  width: 18px;
  height: 18px;
  padding: 0;
}

.dashboard-map-card .hh-map-marker .material-symbols-outlined {
  font-size: 0.76rem;
}

.dashboard-map-card .hh-map-marker.is-cluster::after {
  right: -0.24rem;
  top: -0.28rem;
  min-width: 0.84rem;
  height: 0.84rem;
  font-size: 0.44rem;
}

.hh-map-marker.is-live {
  border-color: rgba(66, 229, 125, 0.72);
  color: var(--dash-green);
  box-shadow:
    0 0 0 4px rgba(66, 229, 125, 0.08),
    0 0 18px rgba(66, 229, 125, 0.42);
}

.hh-map-marker.is-low-battery {
  border-color: rgba(248, 113, 113, 0.82);
  color: #fb7185;
  box-shadow:
    0 0 0 4px rgba(248, 113, 113, 0.1),
    0 0 20px rgba(248, 113, 113, 0.45);
}

.hh-map-marker.is-wifi-unknown {
  border-color: rgba(250, 204, 21, 0.76);
  color: var(--dash-amber);
  box-shadow:
    0 0 0 4px rgba(250, 204, 21, 0.09),
    0 0 18px rgba(250, 204, 21, 0.4);
}

.hh-map-marker.is-stale {
  border-color: rgba(148, 163, 184, 0.52);
  color: #aab2c6;
  box-shadow:
    0 0 0 4px rgba(148, 163, 184, 0.06),
    0 0 16px rgba(148, 163, 184, 0.22);
}

.dashboard-map-empty {
  position: absolute;
  inset: 1rem;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 0.4rem;
  align-content: center;
  border: 1px dashed rgba(144, 143, 160, 0.2);
  border-radius: 9px;
  background: rgba(7, 10, 15, 0.58);
  color: var(--dash-muted);
  text-align: center;
}

.dashboard-map-empty[hidden] {
  display: none;
}

.dashboard-map-empty .material-symbols-outlined {
  color: var(--dash-cyan);
  opacity: 0.76;
}

.dashboard-map-empty strong {
  color: var(--dash-text);
  font-size: 0.82rem;
}

.dashboard-map-empty small {
  max-width: 280px;
  color: var(--dash-muted);
  font-size: 0.72rem;
}

.map-axis,
.map-ring,
.map-marker,
.map-sweep {
  position: absolute;
  pointer-events: none;
}

.axis-x {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(0, 241, 254, 0.16);
}

.axis-y {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(0, 241, 254, 0.16);
}

.map-ring {
  left: 50%;
  top: 50%;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.ring-one {
  width: 118px;
  height: 118px;
  border: 1px solid rgba(0, 241, 254, 0.42);
  background: rgba(0, 241, 254, 0.04);
}

.ring-two {
  width: 178px;
  height: 178px;
  border: 1px dashed rgba(0, 241, 254, 0.22);
}

.map-marker {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: 0 0 14px currentColor;
}

.marker-ok {
  top: 38%;
  left: 42%;
  color: var(--dash-green);
  background: var(--dash-green);
}

.marker-info {
  top: 61%;
  left: 54%;
  color: var(--dash-cyan);
  background: var(--dash-cyan);
}

.marker-warn {
  top: 29%;
  left: 70%;
  color: var(--dash-amber);
  background: var(--dash-amber);
}

.marker-warn b {
  position: absolute;
  left: -28px;
  top: -26px;
  padding: 0.14rem 0.35rem;
  border: 1px solid rgba(250, 204, 21, 0.42);
  border-radius: 4px;
  background: rgba(51, 52, 59, 0.88);
  color: var(--dash-amber);
  font-size: 0.52rem;
  white-space: nowrap;
}

.map-sweep {
  left: 50%;
  top: 50%;
  width: 178px;
  height: 178px;
  border-radius: 999px;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(0, 241, 254, 0.18) 78deg, transparent 82deg);
  transform: translate(-50%, -50%);
  animation: dashboardRadar 4s linear infinite;
}

@keyframes dashboardRadar {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.dashboard-map-card > .btn {
  margin: 0.75rem;
  justify-content: center;
}

.dashboard-map-full-card {
  width: min(1180px, 94vw);
  max-width: 94vw;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(144, 143, 160, 0.22);
  background:
    linear-gradient(rgba(226, 226, 235, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 226, 235, 0.022) 1px, transparent 1px),
    #111319;
  background-size: 32px 32px, 32px 32px, auto;
}

.dashboard-map-full-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(144, 143, 160, 0.16);
  background: rgba(17, 19, 25, 0.72);
}

.dashboard-map-full-header > div {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-map-full-header > div > .material-symbols-outlined {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(0, 241, 254, 0.42);
  border-radius: 10px;
  background: rgba(0, 241, 254, 0.08);
  color: var(--dash-cyan);
  font-size: 1.25rem;
}

.dashboard-map-full-header .modal-title {
  margin: 0;
  color: var(--dash-text);
  font-size: 1.15rem;
}

.dashboard-map-full-header .modal-subtitle {
  margin: 0.1rem 0 0;
  color: var(--dash-muted);
}

.dashboard-map-close {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(144, 143, 160, 0.18);
  border-radius: 9px;
  background: rgba(30, 31, 38, 0.54);
  color: var(--dash-muted);
  cursor: pointer;
}

.dashboard-map-full-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1rem;
  padding: 1rem;
}

.dashboard-map-full-stage {
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(144, 143, 160, 0.16);
  border-radius: 12px;
  background: rgba(12, 14, 20, 0.72);
}

.dashboard-map-canvas.is-full {
  width: 100%;
  height: 100%;
  min-height: 560px;
  background-size: 28px 28px;
}

.dashboard-map-canvas.is-full .ring-one {
  width: 260px;
  height: 260px;
}

.dashboard-map-canvas.is-full .ring-two {
  width: 420px;
  height: 420px;
}

.dashboard-map-canvas.is-full .ring-three {
  width: 620px;
  height: 620px;
  border: 1px dashed rgba(128, 131, 255, 0.18);
}

.dashboard-map-canvas.is-full .map-sweep {
  width: 420px;
  height: 420px;
}

.dashboard-map-canvas.is-full .map-marker {
  width: 12px;
  height: 12px;
}

.dashboard-map-canvas.is-full .marker-ok { top: 34%; left: 42%; }
.dashboard-map-canvas.is-full .marker-info { top: 62%; left: 55%; }
.dashboard-map-canvas.is-full .marker-warn { top: 28%; left: 73%; }
.dashboard-map-canvas.is-full .marker-stock {
  top: 50%;
  left: 29%;
  color: var(--dash-violet);
  background: var(--dash-violet);
}

.dashboard-map-canvas.is-full .map-marker b {
  position: absolute;
  left: 16px;
  top: -8px;
  padding: 0.16rem 0.42rem;
  border: 1px solid rgba(144, 143, 160, 0.2);
  border-radius: 5px;
  background: rgba(17, 19, 25, 0.86);
  color: var(--dash-text);
  font-size: 0.58rem;
  white-space: nowrap;
}

.map-zone-label {
  position: absolute;
  z-index: 1;
  padding: 0.18rem 0.5rem;
  border: 1px solid rgba(0, 241, 254, 0.22);
  border-radius: 6px;
  background: rgba(0, 241, 254, 0.08);
  color: var(--dash-cyan);
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.zone-north { top: 1rem; left: 1rem; }
.zone-staging { top: 1rem; right: 1rem; }
.zone-exit { right: 1rem; bottom: 1rem; }

.dashboard-map-full-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-map-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.dashboard-map-status-grid div,
.dashboard-map-feed {
  border: 1px solid rgba(144, 143, 160, 0.16);
  border-radius: 10px;
  background: rgba(30, 31, 38, 0.48);
}

.dashboard-map-status-grid div {
  min-height: 82px;
  padding: 0.75rem;
}

.dashboard-map-status-grid span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--dash-muted);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-map-status-grid strong {
  color: var(--dash-text);
  font-size: 1.35rem;
  line-height: 1;
}

.dashboard-map-feed {
  padding: 0.9rem;
}

.dashboard-map-selected {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid rgba(0, 241, 254, 0.22);
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 10%, rgba(0, 241, 254, 0.12), transparent 28%),
    rgba(18, 21, 30, 0.68);
}

.dashboard-map-selected > .material-symbols-outlined {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(0, 241, 254, 0.36);
  border-radius: 9px;
  color: var(--dash-cyan);
  background: rgba(0, 241, 254, 0.08);
}

.dashboard-map-selected strong,
.dashboard-map-selected small {
  display: block;
}

.dashboard-map-selected strong {
  color: var(--dash-text);
  font-size: 0.9rem;
  line-height: 1.2;
}

.dashboard-map-selected small {
  margin-top: 0.18rem;
  color: var(--dash-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.dashboard-map-detail-list {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.4rem 0.55rem;
  margin: 0.8rem 0 0;
}

.dashboard-map-detail-list dt,
.dashboard-map-detail-list dd {
  margin: 0;
  min-width: 0;
  font-size: 0.68rem;
  line-height: 1.25;
}

.dashboard-map-detail-list dt {
  color: var(--dash-muted);
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-map-detail-list dd {
  color: var(--dash-text);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.dashboard-map-feed h3 {
  margin-bottom: 0.8rem;
  color: var(--dash-text);
  font-size: 0.9rem;
}

.dashboard-map-feed-list {
  margin-top: 0.6rem;
  border-top: 1px solid rgba(144, 143, 160, 0.12);
}

.dashboard-map-feed-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0;
  border-top: 1px solid rgba(144, 143, 160, 0.12);
}

button.dashboard-map-feed-row {
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

button.dashboard-map-feed-row:hover,
button.dashboard-map-feed-row:focus-visible {
  outline: none;
  background: rgba(0, 241, 254, 0.05);
}

.dashboard-map-feed-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.dashboard-map-feed-row strong,
.dashboard-map-feed-row small {
  display: block;
}

.dashboard-map-feed-row strong {
  color: var(--dash-text);
  font-size: 0.8rem;
}

.dashboard-map-feed-row small {
  margin-top: 0.15rem;
  color: var(--dash-muted);
  font-size: 0.72rem;
}

.feed-dot {
  width: 10px;
  height: 10px;
  margin-top: 0.18rem;
  border-radius: 999px;
  box-shadow: 0 0 12px currentColor;
}

.feed-dot.cyan { color: var(--dash-cyan); background: var(--dash-cyan); }
.feed-dot.green { color: var(--dash-green); background: var(--dash-green); }
.feed-dot.amber { color: var(--dash-amber); background: var(--dash-amber); }
.feed-dot.live { color: var(--dash-green); background: var(--dash-green); }
.feed-dot.stale { color: #aab2c6; background: #aab2c6; }
.feed-dot.low-battery { color: #fb7185; background: #fb7185; }
.feed-dot.wifi-unknown { color: var(--dash-amber); background: var(--dash-amber); }

.dashboard-alerts-shell {
  margin-top: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(144, 143, 160, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 94% 30%, rgba(217, 119, 33, 0.09), transparent 18%),
    linear-gradient(180deg, rgba(17, 19, 25, 0.88), rgba(17, 19, 25, 0.74));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.012),
    0 18px 40px rgba(0, 0, 0, 0.2);
}

.dashboard-alerts-shell .section-header {
  margin-bottom: 1rem;
  padding: 0;
  border-bottom: 0;
}

.dashboard-alerts-shell .section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--dash-text);
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: 0;
}

.dashboard-alerts-shell .section-title::before {
  content: 'warning';
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(250, 204, 21, 0.42);
  border-radius: 8px;
  background: rgba(250, 204, 21, 0.1);
  color: #facc15;
  font-family: 'Material Symbols Outlined';
  font-size: 1.15rem;
  font-variation-settings: 'FILL' 0, 'wght' 560, 'GRAD' 0, 'opsz' 24;
  box-shadow:
    0 0 20px rgba(250, 204, 21, 0.28),
    inset 0 0 16px rgba(250, 204, 21, 0.08);
}

.dashboard-alerts-shell .section-count {
  min-height: 24px;
  padding: 0.2rem 0.65rem;
  border: 1px solid rgba(144, 143, 160, 0.12);
  border-radius: 999px;
  background: rgba(30, 31, 38, 0.62);
  color: #c7c4d7;
  font-size: 0.72rem;
  font-weight: 850;
}

.dashboard-alerts-shell .btn {
  min-height: 30px;
  padding: 0.35rem 0.85rem;
  border-color: rgba(144, 143, 160, 0.18);
  border-radius: 7px;
  background: rgba(30, 31, 38, 0.45);
  color: #e2e2eb;
  font-size: 0.75rem;
  font-weight: 850;
}

.dashboard-alerts-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  max-height: 580px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(250, 204, 21, 0.35) transparent;
}

.dashboard-alerts-list::-webkit-scrollbar {
  width: 6px;
}

.dashboard-alerts-list::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-alerts-list::-webkit-scrollbar-thumb {
  background: rgba(250, 204, 21, 0.35);
  border-radius: 999px;
}

.dashboard-alert-card {
  min-height: 128px;
  border-radius: 8px;
  border: 1px solid rgba(144, 143, 160, 0.13);
  background:
    radial-gradient(circle at 96% 24%, rgba(217, 119, 33, 0.06), transparent 24%),
    rgba(17, 19, 25, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018);
}

.dashboard-alert-card.is-empty {
  grid-column: 1 / -1;
  min-height: 194px;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.6rem;
  text-align: center;
}

.dashboard-alert-card strong {
  color: var(--dash-text);
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1.25;
}

.dashboard-alert-empty-icon {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(144, 143, 160, 0.12);
  border-radius: 999px;
  background: rgba(30, 31, 38, 0.26);
  color: rgba(199, 196, 215, 0.4);
}

.dashboard-alert-empty-icon .material-symbols-outlined {
  font-size: 1.28rem;
  font-variation-settings: 'FILL' 0, 'wght' 520, 'GRAD' 0, 'opsz' 24;
}

.dashboard-alert-main p,
.dashboard-alert-card.is-empty p,
.dashboard-alert-meta,
.dashboard-alert-note {
  color: var(--dash-muted);
}

.dashboard-alert-card.is-empty p {
  max-width: 380px;
  margin: 0;
  color: #c7c4d7;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.38;
}

.dashboard-alert-note {
  border-color: rgba(255, 180, 171, 0.18);
  border-radius: 8px;
  background: rgba(255, 180, 171, 0.08);
}

.dashboard-recent-panel {
  margin-top: 1rem;
  padding: 1rem;
}

.dashboard-recent-panel .section-header {
  margin-bottom: 0.85rem;
}

.dashboard-recent-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.dashboard-recent-grid .device-card {
  min-height: 76px;
  padding: 0.85rem;
  border-radius: 8px;
  background: rgba(30, 31, 38, 0.48);
  border-color: rgba(144, 143, 160, 0.2);
  animation: none;
  opacity: 1;
}

.dashboard-recent-grid .device-card:hover {
  border-color: rgba(0, 241, 254, 0.34);
  transform: translateY(-2px);
}

.dashboard-recent-grid .device-header {
  gap: 0.6rem;
  margin-bottom: 0;
}

.dashboard-recent-grid .device-id .icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  color: var(--dash-cyan);
  background: rgba(0, 241, 254, 0.08);
  border: 1px solid rgba(0, 241, 254, 0.22);
}

.dashboard-recent-grid .device-details,
.dashboard-recent-grid .device-actions {
  display: none;
}

.dashboard-recent-grid .status-chip {
  padding: 0.22rem 0.45rem;
  border-radius: 5px;
  font-size: 0.56rem;
  letter-spacing: 0;
}

@media (max-width: 1120px) {
  .dashboard-command-tools {
    flex-wrap: wrap;
  }

  .dashboard-search-control,
  .dashboard-search-control:focus-within {
    width: 100%;
    max-width: 420px;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-ops-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-map-resizer {
    display: none;
  }

  .dashboard-map-card {
    grid-column: 1 / -1;
    height: 300px;
  }

  .dashboard-recent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard-command-bar {
    flex-direction: column;
  }

  .dashboard-command-tools,
  .dashboard-command-tools .page-actions,
  .dashboard-search-control,
  .dashboard-search-control:focus-within {
    width: 100%;
    max-width: none;
  }

  .dashboard-command-tools .page-actions .btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .dashboard-filter-row {
    flex-wrap: wrap;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-ops-grid,
  .dashboard-recent-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-next .chart-container-card,
  .dashboard-map-card {
    height: 320px;
  }

  .dashboard-map-resizer {
    display: none;
  }

  .dashboard-next .dashboard-donut-card {
    height: 360px;
  }

  .dashboard-map-full-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-map-full-stage,
  .dashboard-map-canvas.is-full {
    min-height: 440px;
  }

  .dashboard-map-full-side {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar-resizer {
    display: none;
  }
}

@media (max-width: 560px) {
  .dashboard-next::before {
    inset: -1.5rem;
  }

  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-command-tools .page-actions {
    flex-direction: column;
  }

  .dashboard-filter-chip {
    width: 100%;
  }

  .dashboard-filter-chip select {
    width: 100%;
  }

  .dashboard-map-full-card {
    width: 96vw;
  }

  .dashboard-map-full-header {
    align-items: flex-start;
  }

  .dashboard-map-canvas.is-full .ring-one {
    width: 190px;
    height: 190px;
  }

  .dashboard-map-canvas.is-full .ring-two,
  .dashboard-map-canvas.is-full .map-sweep {
    width: 300px;
    height: 300px;
  }

  .dashboard-map-canvas.is-full .ring-three {
    width: 410px;
    height: 410px;
  }
}

@media (max-width: 1100px) {
  .employee-admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .dashboard-alerts-list,
  .employee-admin-form-grid,
  .employee-admin-toggle-row {
    grid-template-columns: 1fr;
  }

  .employee-admin-hero-actions,
  .employee-admin-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .employee-admin-focus {
    align-items: stretch;
  }

  .employee-admin-focus-actions {
    margin-left: 0;
  }

  .employee-admin-modal-actions .btn {
    width: 100%;
  }

  .employee-admin-toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .employee-admin-pagination,
  .employee-admin-page-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .employee-admin-page-size {
    width: 100%;
    justify-content: space-between;
  }

  .employee-admin-page-summary {
    white-space: normal;
  }

  .employee-admin-filter-popover {
    width: 100%;
    justify-content: space-between;
  }

  .employee-admin-filter-summary {
    flex: 1;
    min-width: 0;
  }

  .employee-admin-filter-panel {
    width: min(100%, 92vw);
  }

  .employee-admin-metrics {
    grid-template-columns: 1fr;
  }

  .employee-admin-filter-options,
  .employee-admin-actions {
    justify-content: flex-start;
  }

  .delivery-hh-validation-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .delivery-hh-validation-actions,
  .employee-admin-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==============================
   OPERATIVE PRO — módulos restantes con paleta HandHelds
   ============================== */
.ops-pro-section {
  --asset-pro-accent: var(--hh-pro-cyan);
  --asset-pro-accent-soft: rgba(0, 241, 254, 0.12);
  --ops-pro-panel: rgba(17, 19, 25, 0.62);
  --ops-pro-panel-strong: rgba(25, 27, 34, 0.86);
  --ops-pro-border: rgba(144, 143, 160, 0.2);
  --ops-pro-border-cyan: rgba(0, 241, 254, 0.24);
}

.ops-pro-header {
  align-items: flex-start;
  gap: 1.2rem;
  margin-bottom: 1.35rem;
}

.ops-pro-header .requests-header-actions {
  margin-left: auto;
  justify-content: flex-end;
}

.ops-pro-section .page-title {
  color: var(--hh-pro-text);
  letter-spacing: 0;
}

.ops-pro-section .page-subtitle {
  color: rgba(199, 196, 215, 0.72);
}

.ops-pro-header > .btn,
.ops-pro-header .page-actions .btn,
.ops-pro-section .kit-launch-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 8px;
  font-weight: 850;
}

.ops-pro-header > .btn-primary,
.ops-pro-header .page-actions .btn-primary,
.ops-pro-section .kit-launch-action {
  border-color: rgba(0, 241, 254, 0.38);
  background: linear-gradient(135deg, #22d3ee, #5b7cfa 58%, #9b5cff);
  color: #111319;
  box-shadow: 0 16px 34px rgba(0, 241, 254, 0.18);
}

.ops-pro-header .page-actions .btn-danger {
  border-color: rgba(255, 95, 126, 0.42);
  background: linear-gradient(135deg, rgba(255, 95, 126, 0.92), rgba(217, 119, 33, 0.82));
  color: #fff;
  box-shadow: 0 16px 34px rgba(255, 95, 126, 0.18);
}

.ops-pro-section .btn .material-symbols-outlined,
.ops-pro-section .kit-launch-action .material-symbols-outlined {
  font-size: 19px;
  line-height: 1;
}

.ops-pro-section .section-header {
  min-height: 48px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(144, 143, 160, 0.16);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(0, 241, 254, 0.07), transparent 42%),
    rgba(17, 19, 25, 0.46);
}

.ops-pro-section .section-title {
  color: var(--hh-pro-text);
  font-size: 1rem;
  letter-spacing: 0;
}

.ops-pro-section .section-count,
.ops-pro-section .history-count-badge {
  border-color: rgba(0, 241, 254, 0.18);
  background: rgba(0, 241, 254, 0.07);
  color: rgba(199, 196, 215, 0.86);
}

.ops-pro-section .history-toolbar,
.ops-pro-section .search-bar,
.ops-pro-section .kit-delivery-launch-card {
  border: 1px solid var(--ops-pro-border-cyan);
  border-radius: 12px;
  background:
    linear-gradient(rgba(226, 226, 235, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 226, 235, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 100% 0, rgba(0, 241, 254, 0.1), transparent 36%),
    var(--ops-pro-panel);
  background-size: 28px 28px, 28px 28px, auto, auto;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ops-pro-section .history-search-input,
.ops-pro-section .form-input {
  border-color: rgba(144, 143, 160, 0.2);
  background: rgba(12, 14, 20, 0.52);
  color: var(--hh-pro-text);
  border-radius: 8px;
}

.ops-pro-section .history-search-input:focus,
.ops-pro-section .form-input:focus {
  border-color: rgba(0, 241, 254, 0.56);
  box-shadow: 0 0 0 1px rgba(0, 241, 254, 0.2), 0 0 22px rgba(0, 241, 254, 0.1);
}

.ops-pro-section .history-filter-trigger,
.ops-pro-section .history-range-trigger,
.ops-pro-section .history-filter-panel,
.ops-pro-section .history-range-panel {
  border-color: rgba(144, 143, 160, 0.18);
  border-radius: 10px;
  background: rgba(17, 19, 25, 0.92);
}

.ops-pro-section .history-filter-trigger:hover,
.ops-pro-section .history-filter-trigger.active,
.ops-pro-section .history-range-trigger:hover,
.ops-pro-section .history-range-trigger.active {
  border-color: rgba(0, 241, 254, 0.44);
  box-shadow: 0 0 0 1px rgba(0, 241, 254, 0.14), 0 0 18px rgba(0, 241, 254, 0.08);
}

.ops-pro-section .history-filter-option.active,
.ops-pro-section .history-range-option.active,
.ops-pro-section .report-tab.active {
  border-color: rgba(0, 241, 254, 0.42);
  background: linear-gradient(135deg, rgba(0, 241, 254, 0.16), rgba(128, 131, 255, 0.12));
  color: var(--hh-pro-cyan);
}

.ops-pro-section .history-table-wrapper {
  border: 1px solid rgba(144, 143, 160, 0.18);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(128, 131, 255, 0.08), transparent 34%),
    rgba(17, 19, 25, 0.6);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.ops-pro-section .bitacora-table thead tr {
  background: rgba(0, 241, 254, 0.055);
  border-bottom-color: rgba(0, 241, 254, 0.14);
}

.ops-pro-section .bitacora-table th {
  color: rgba(199, 196, 215, 0.76);
}

.ops-pro-section .bitacora-table td {
  color: rgba(226, 226, 235, 0.78);
  border-bottom-color: rgba(144, 143, 160, 0.1);
}

.ops-pro-section .bitacora-table tbody tr:hover {
  background: rgba(0, 241, 254, 0.045);
}

.ops-pro-section .admin-card,
.ops-pro-section .role-card,
.ops-pro-section .report-mini-stat,
.ops-pro-section .protocol-card,
.ops-pro-section .kit-summary-card,
.ops-pro-section .stat-card,
.ops-pro-section .device-card {
  border: 1px solid rgba(144, 143, 160, 0.18);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(0, 241, 254, 0.075), transparent 38%),
    var(--ops-pro-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.ops-pro-section .admin-card:hover,
.ops-pro-section .role-card:hover,
.ops-pro-section .protocol-card:hover,
.ops-pro-section .kit-summary-card:hover,
.ops-pro-section .stat-card:hover,
.ops-pro-section .device-card:hover {
  border-color: rgba(0, 241, 254, 0.34);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24), 0 0 22px rgba(0, 241, 254, 0.08);
}

.ops-pro-section .stat-card .stat-icon,
.ops-pro-section .admin-card-icon,
.ops-pro-section .kit-launch-icon {
  border: 1px solid rgba(0, 241, 254, 0.28);
  border-radius: 9px;
  background: rgba(0, 241, 254, 0.09);
  color: var(--hh-pro-cyan);
}

.ops-pro-admin .admin-card-header {
  align-items: center;
}

.ops-pro-admin .admin-card-icon.material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  line-height: 1;
  padding: 0;
}

.ops-pro-section .stat-card .stat-icon.amber,
.ops-pro-section .admin-card-icon.amber {
  border-color: rgba(217, 119, 33, 0.34);
  background: rgba(217, 119, 33, 0.1);
  color: var(--hh-pro-amber);
}

.ops-pro-section .stat-card .stat-icon.red,
.ops-pro-section .admin-card-icon.red {
  border-color: rgba(255, 95, 126, 0.34);
  background: rgba(255, 95, 126, 0.1);
  color: var(--hh-pro-red);
}

.ops-pro-section .stat-card .stat-value.blue,
.ops-pro-section .stat-card .stat-value.cyan {
  color: var(--hh-pro-cyan);
}

.ops-pro-section .stat-card .stat-value.amber {
  color: var(--hh-pro-amber);
}

.ops-pro-section .stat-card .stat-value.red {
  color: var(--hh-pro-red);
}

.ops-pro-section .report-tab {
  border-radius: 10px;
  background: rgba(17, 19, 25, 0.62);
}

.ops-pro-section .report-mini-label,
.ops-pro-section .kit-summary-label,
.ops-pro-section .admin-card-desc {
  color: rgba(199, 196, 215, 0.68);
}

.ops-pro-section .report-mini-stat strong,
.ops-pro-section .kit-summary-card strong,
.ops-pro-section .admin-card-title,
.ops-pro-section .role-card-title {
  color: var(--hh-pro-text);
}

@media (max-width: 760px) {
  .ops-pro-header,
  .ops-pro-header .page-actions,
  .ops-pro-section .history-toolbar-top,
  .ops-pro-section .history-toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ops-pro-header > .btn,
  .ops-pro-header .page-actions .btn,
  .ops-pro-section .kit-launch-action {
    width: 100%;
  }
}
