/* Design System Tokens */
:root {
  /* Light Mode (Default) */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  --border-color: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.1);
  
  /* Category Colors */
  --color-inotropos: #a855f7;       /* Purple */
  --color-inotropos-light: #f3e8ff;
  --color-inotropos-glow: rgba(168, 85, 247, 0.08);
  
  --color-anticonvulsivos: #06b6d4;  /* Cyan */
  --color-anticonvulsivos-light: #ecfeff;
  --color-anticonvulsivos-glow: rgba(6, 182, 212, 0.08);
  
  --color-respiratorio: #f59e0b;     /* Amber */
  --color-respiratorio-light: #fef3c7;
  --color-respiratorio-glow: rgba(245, 158, 11, 0.08);
  
  /* Warning & Success */
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.15);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  --info: #0ea5e9;
  
  /* Broselow Tape Colors */
  --broselow-grey: #9ca3af;
  --broselow-pink: #ec4899;
  --broselow-red: #ef4444;
  --broselow-purple: #a855f7;
  --broselow-yellow: #eab308;
  --broselow-white: #ffffff;
  --broselow-blue: #3b82f6;
  --broselow-orange: #f97316;
  --broselow-green: #22c55e;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 12px 24px rgba(15, 23, 42, 0.08);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Class */
body.dark-theme {
  --bg-main: #0b0f19;
  --bg-card: #161f30;
  --bg-input: #1f2a40;
  --border-color: #2e3c56;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-inverse: #111827;
  
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.15);
  
  --color-inotropos-glow: rgba(168, 85, 247, 0.15);
  --color-anticonvulsivos-glow: rgba(6, 182, 212, 0.15);
  --color-respiratorio-glow: rgba(245, 158, 11, 0.15);
  
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar */
.sidebar {
  width: 300px;
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 10;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 4px;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.logo-brand:active {
  transform: scale(0.97);
}

.logo-brand:hover {
  opacity: 0.95;
}

.logo-icon {
  background: linear-gradient(135deg, var(--danger), var(--primary));
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.logo-brand:hover .logo-icon {
  transform: scale(1.06) rotate(3deg);
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.45);
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(to right, #3b82f6, #06b6d4, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Theme Toggle Button (Top next to title, icon only) */
.theme-toggle-btn-top {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.theme-toggle-btn-top:hover {
  background: var(--bg-input);
  color: var(--primary);
}

/* Weight Calculator Section */
.weight-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.weight-section h3 {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.weight-input-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.weight-num-input {
  width: 100%;
  background: var(--bg-input);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 32px;
  font-weight: 800;
  padding: 8px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  transition: var(--transition);
}

.weight-num-input:focus {
  outline: none;
  box-shadow: 0 0 10px var(--primary-glow);
}

.weight-unit {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.weight-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-input);
  outline: none;
  margin: 10px 0;
}

.weight-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.weight-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Broselow Quick Buttons */
.broselow-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.broselow-btn {
  border: none;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.broselow-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.broselow-btn span.weight-val {
  font-size: 14px;
  font-weight: 800;
}

/* Broselow Colors mapping */
.btn-grey { background-color: #6b7280; color: white; }
.btn-pink { background-color: #ec4899; color: white; }
.btn-red { background-color: #ef4444; color: white; }
.btn-purple { background-color: #a855f7; color: white; }
.btn-yellow { background-color: #eab308; color: black; }
.btn-white { background-color: #ffffff; color: black; border: 1px solid #cbd5e1; }
.btn-blue { background-color: #3b82f6; color: white; }
.btn-orange { background-color: #f97316; color: white; }
.btn-green { background-color: #22c55e; color: white; }

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

/* Navigation Tabs */
.tabs-container {
  display: none !important;
  justify-content: space-between;
  align-items: center;
  border-bottom: none;
  padding-bottom: 16px;
  margin-bottom: 12px;
}

/* Custom Navigation Dropdown */
.custom-dropdown {
  position: relative;
  min-width: 250px;
  z-index: 100;
}

.dropdown-trigger {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.dropdown-trigger:hover {
  background: var(--bg-input);
  border-color: var(--primary);
}

.trigger-icon-text {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trigger-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.trigger-text {
  text-align: left;
}

.trigger-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.custom-dropdown.open .trigger-chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: 6px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  flex-direction: column;
  gap: 4px;
  z-index: 101;
  max-height: 400px;
  overflow-y: auto;
}

.dropdown-menu.show {
  display: flex;
}

.dropdown-item {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-family: inherit;
}

.dropdown-item svg {
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}

.dropdown-item span {
  white-space: nowrap;
}

.dropdown-item:hover {
  background: var(--bg-input);
}

.dropdown-item:hover svg {
  color: var(--primary);
}

.dropdown-item.active {
  background: var(--primary);
  color: #ffffff;
}

.dropdown-item.active svg {
  color: #ffffff;
}

.action-buttons {
  display: flex;
  gap: 12px;
}

.action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-btn:hover {
  background: var(--border-color);
}

.action-btn.primary-btn {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.action-btn.primary-btn:hover {
  background: var(--primary-hover);
}

/* Notification banner for vital emergency context */
.emergency-banner {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  border-left: 4px solid var(--danger);
  padding: 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.emergency-banner .banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.emergency-banner .banner-icon {
  font-size: 20px;
  color: var(--danger);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

/* Drugs Grid & Cards */
.drugs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.drug-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.drug-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.drug-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--card-glow-color, var(--primary));
}

/* Card Categories styling */
.drug-card.card-inotropos {
  --card-glow-color: var(--color-inotropos);
  background: linear-gradient(180deg, var(--bg-card) 90%, var(--color-inotropos-glow) 100%);
}
.drug-card.card-inotropos::before { background-color: var(--color-inotropos); }

.drug-card.card-anticonvulsivos {
  --card-glow-color: var(--color-anticonvulsivos);
  background: linear-gradient(180deg, var(--bg-card) 90%, var(--color-anticonvulsivos-glow) 100%);
}
.drug-card.card-anticonvulsivos::before { background-color: var(--color-anticonvulsivos); }

.drug-card.card-respiratorio {
  --card-glow-color: var(--color-respiratorio);
  background: linear-gradient(180deg, var(--bg-card) 90%, var(--color-respiratorio-glow) 100%);
}
.drug-card.card-respiratorio::before { background-color: var(--color-respiratorio); }

/* Card Header */
.card-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.drug-name-container {
  display: flex;
  flex-direction: column;
}

.drug-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drug-category {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 12px;
  width: max-content;
  margin-top: 4px;
}

.cat-inotropos { background-color: var(--color-inotropos-glow); color: var(--color-inotropos); }
.cat-anticonvulsivos { background-color: var(--color-anticonvulsivos-glow); color: var(--color-anticonvulsivos); }
.cat-respiratorio { background-color: var(--color-respiratorio-glow); color: var(--color-respiratorio); }

.drug-presentation {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: right;
  background: var(--bg-input);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* Card Body Section - Doses & Math */
.card-dose-section {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dose-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dose-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.dose-val {
  font-size: 15px;
  font-weight: 700;
}

.dose-calculated {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.dose-calculated span.unit {
  font-size: 12px;
  font-weight: 700;
}

/* Preparation steps */
.prep-step-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prep-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.prep-text {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.01);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--primary);
}

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

.prep-text.saline-only {
  border-left-color: var(--danger);
  background: rgba(239, 68, 68, 0.03);
}

.prep-text.saline-only strong {
  color: var(--danger);
}

/* Infusion / Administration row */
.admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.admin-icon {
  font-size: 20px;
  color: var(--success);
}

.admin-details {
  display: flex;
  flex-direction: column;
}

.admin-title {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.admin-rate {
  font-size: 16px;
  font-weight: 800;
  color: var(--success);
  font-family: 'JetBrains Mono', monospace;
}

/* Warning & Alerts inside cards */
.warning-box {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fee2e2;
  border: 1px solid #fee2e2;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
}

body.dark-theme .warning-box {
  background: var(--danger-glow);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.warning-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Printable reference chart tab styles */
.print-options-bar {
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.poster-preview-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 12px;
}

.poster-wrapper {
  background: #ffffff;
  color: #111827;
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.poster-header {
  border-bottom: 3px solid #111827;
  padding-bottom: 16px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.poster-title-area h2 {
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  color: #111827;
  letter-spacing: -0.5px;
}

.poster-title-area p {
  font-size: 12px;
  color: #4b5563;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.poster-logo {
  font-weight: 800;
  font-size: 16px;
  border: 2px solid #111827;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Poster tables */
.poster-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 16px;
}

.poster-table th,
.poster-table td {
  border: 1px solid #9ca3af;
  padding: 8px 10px;
  text-align: left;
}

.poster-table th {
  background-color: #f3f4f6;
  font-weight: 800;
  color: #111827;
  text-transform: uppercase;
  font-size: 11px;
}

.poster-table tr:nth-child(even) td {
  background-color: #f9fafb;
}

.poster-table td strong {
  color: #000000;
  font-weight: 750;
}

.poster-table .weight-col {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 13px;
  text-align: center;
  background-color: #e5e7eb !important;
  width: 70px;
}

.poster-table .dose-col {
  font-weight: 600;
}

.poster-footer {
  font-size: 11px;
  color: #4b5563;
  border-top: 1px solid #d1d5db;
  padding-top: 12px;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
}

.poster-footnote {
  max-width: 70%;
  line-height: 1.4;
}

.poster-footnote strong {
  color: #dc2626;
}

.poster-signature {
  text-align: right;
  font-weight: 600;
}

/* Print Layout setup via CSS Media Queries */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  
  .sidebar,
  .tabs-container,
  .print-options-bar,
  .emergency-banner {
    display: none !important;
  }
  
  .app-container {
    display: block;
  }
  
  .main-content {
    padding: 0 !important;
    margin: 0 !important;
    display: block;
  }
  
  .tab-panel {
    display: none !important;
  }
  
  .tab-panel#charts-tab {
    display: block !important;
  }
  
  .poster-wrapper {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 0 50px 0 !important;
    page-break-after: always;
    max-width: 100% !important;
    width: 100% !important;
  }

  .poster-wrapper:last-child {
    page-break-after: avoid;
  }
  
  .poster-table th {
    background-color: #e5e7eb !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .poster-table .weight-col {
    background-color: #d1d5db !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .broselow-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .drugs-grid {
    grid-template-columns: 1fr;
  }
  
  .tabs-container {
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
  }
  
  .custom-dropdown {
    width: 100%;
    min-width: 100%;
  }
  
  .action-buttons {
    width: 100%;
  }
  
  .theme-toggle-btn {
    width: 100%;
    justify-content: center;
  }
}

/* PWA Core Modules Styling Extensions */

/* 1. RCP Dashboard */
.rcp-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.rcp-timer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  position: relative;
}

.rcp-clock {
  font-size: 72px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary);
  line-height: 1;
  text-shadow: 0 0 10px var(--primary-glow);
}

.rcp-clock.active {
  color: var(--success);
  text-shadow: 0 0 15px var(--success-glow);
}

.rcp-phase-banner {
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100%;
  text-align: center;
  transition: var(--transition);
}

.rcp-phase-banner.flash-rhythm {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
  animation: flashAlert 1s infinite alternate;
}

.rcp-phase-banner.flash-adrenaline {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
  animation: flashAlert 0.8s infinite alternate;
}

@keyframes flashAlert {
  from { box-shadow: 0 0 4px rgba(220, 38, 38, 0.2); opacity: 0.8; }
  to { box-shadow: 0 0 20px rgba(220, 38, 38, 0.6); opacity: 1; }
}

.rcp-controls-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.rcp-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.rcp-btn:hover {
  background: var(--border-color);
}

.rcp-btn.btn-play {
  background: var(--success);
  border-color: var(--success);
  color: white;
}
.rcp-btn.btn-play:hover { background: #059669; }

.rcp-btn.btn-pause {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}
.rcp-btn.btn-pause:hover { background: #dc2626; }

.rcp-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cpr-drugs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cpr-drugs-table th, .cpr-drugs-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.cpr-drugs-table th {
  color: var(--text-muted);
  font-weight: 700;
}

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

.cpr-drugs-table td strong {
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary);
}

/* 2. Vía Aérea */
.airway-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.airway-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.airway-card h3 {
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.airway-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.airway-label {
  color: var(--text-muted);
}

.airway-value {
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary);
}

/* 3. Scores / Algoritmos */
.score-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  width: 100%;
}

.score-menu-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
}

.score-menu-btn:hover {
  background: var(--bg-input);
  color: var(--text-main);
  border-color: var(--primary);
}

.score-menu-btn.active {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 12px var(--primary-glow);
}

@media (max-width: 600px) {
  .score-menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding-bottom: 12px;
  }
  
  .score-menu-btn {
    padding: 8px;
    font-size: 11px;
    line-height: 1.2;
    min-height: 40px;
  }
}

.score-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.score-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.score-criteria-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

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

.criteria-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.score-options {
  display: flex;
  gap: 8px;
}

.score-opt-btn {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 6px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  text-align: center;
}

.score-opt-btn:hover {
  background: var(--border-color);
  color: var(--text-main);
}

.score-opt-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.score-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: max-content;
}

.score-number-display {
  font-size: 64px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  line-height: 1;
}

.score-severity-tag {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  padding: 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.severity-mild { background-color: rgba(16, 185, 129, 0.15); color: var(--success); }
.severity-mod { background-color: rgba(245, 158, 11, 0.15); color: var(--color-respiratorio); }
.severity-severe { background-color: rgba(239, 68, 68, 0.15); color: var(--danger); animation: pulseAlert 1.5s infinite; }

@keyframes pulseAlert {
  0% { opacity: 0.9; }
  50% { opacity: 1; box-shadow: 0 0 10px rgba(239, 68, 68, 0.3); }
  100% { opacity: 0.9; }
}

/* Timeline */
.timeline-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.timeline-steps {
  position: relative;
  border-left: 2px solid var(--border-color);
  padding-left: 20px;
  margin-left: 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-step {
  position: relative;
}

.timeline-step::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
  border: 2px solid var(--bg-card);
}

.timeline-step.active::before {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.step-time {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

.step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}

.step-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 4. Fluids & Electrolytes */
.fluids-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

/* 5. Toxicology */
.toxicology-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

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

.symptoms-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.symptom-category-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

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

/* Weight/Age Segmented Controls */
.segmented-control {
  display: flex;
  background: var(--bg-input);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  margin-bottom: 0px;
}

.segmented-control-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.segmented-control-btn:hover {
  color: var(--text-main);
}

.segmented-control-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-weight: 800;
}

/* Broselow Suggesed Badge */
.broselow-suggested-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  border: 1px solid rgba(0,0,0,0.1);
  text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* Responsive adjustments for tables in PWA on mobile screens */
@media (max-width: 768px) {
  /* Prevent horizontal overflow of the CPR medication table by converting rows into card-like blocks */
  .cpr-drugs-table, 
  .cpr-drugs-table thead, 
  .cpr-drugs-table tbody, 
  .cpr-drugs-table th, 
  .cpr-drugs-table td, 
  .cpr-drugs-table tr { 
    display: block; 
  }
  
  .cpr-drugs-table thead tr { 
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  .cpr-drugs-table tr { 
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    margin-bottom: 16px;
    padding: 12px;
    box-shadow: var(--shadow-sm);
  }
  
  .cpr-drugs-table td { 
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05); 
    position: relative;
    padding: 8px 0 8px 45%; 
    font-size: 13.5px;
    text-align: right;
  }
  
  body.dark-theme .cpr-drugs-table td {
    border-bottom-color: rgba(255, 255, 255, 0.05);
  }
  
  .cpr-drugs-table td:last-child {
    border-bottom: none;
  }
  
  .cpr-drugs-table td:before { 
    position: absolute;
    top: 8px;
    left: 6px;
    width: 40%; 
    padding-right: 10px; 
    white-space: nowrap;
    text-align: left;
    font-weight: 700;
    color: var(--text-muted);
  }
  
  .cpr-drugs-table td:nth-of-type(1):before { content: "Fármaco"; }
  .cpr-drugs-table td:nth-of-type(2):before { content: "Dosis Guía"; }
  .cpr-drugs-table td:nth-of-type(3):before { content: "Dosis Paciente"; }
  .cpr-drugs-table td:nth-of-type(4):before { content: "Volumen (ml)"; }
  .cpr-drugs-table td:nth-of-type(5):before { content: "Observaciones"; }

  /* Style specific cells for readability */
  .cpr-drugs-table td:nth-of-type(1) {
    font-size: 15px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
    margin-bottom: 6px;
    text-align: right;
  }
  
  .cpr-drugs-table td:nth-of-type(4) {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
  }

  .cpr-drugs-table td:nth-of-type(5) {
    text-align: left;
    padding-left: 0;
    margin-top: 8px;
    padding-top: 24px; /* Give space for the absolute header above */
  }
  
  .cpr-drugs-table td:nth-of-type(5):before {
    top: 0;
    width: 100%;
  }
}

/* 4. Vademécum */
.vademecum-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vademecum-search-bar {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  padding: 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px var(--primary-glow);
}

#vademecumSearch {
  width: 100%;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  color: var(--text-main);
  padding: 14px 45px 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  outline: none;
  font-family: inherit;
  transition: all 0.25s ease-in-out;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

#vademecumSearch:focus {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
  background: var(--bg-card);
}

.vademecum-weight-indicator {
  background: var(--primary-glow);
  border: 1px solid var(--primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vademecum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.vademecum-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.vademecum-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--border-hover);
}

.vademecum-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.vademecum-card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
}

.vademecum-card-category {
  font-size: 10.5px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.cat-antibioticos { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.cat-analgesicos { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.cat-corticoides { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.cat-respiratorios { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.cat-gastrointestinales { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.cat-cardio { background: rgba(236, 72, 153, 0.15); color: #ec4899; }
.cat-sedantes { background: rgba(20, 184, 166, 0.15); color: #14b8a6; }
.cat-otros { background: rgba(107, 114, 128, 0.15); color: #9ca3af; }

.vademecum-calc-box {
  background: var(--bg-input);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vademecum-calc-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vademecum-calc-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
}

.vademecum-info-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.vademecum-info-label {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.vademecum-info-content {
  color: var(--text-main);
  line-height: 1.4;
}

.vademecum-warning-box {
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid #ef4444;
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-main);
}

/* Toxicology Guide Styles */
.toxicology-guide-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

.toxicology-guide-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid var(--border-color);
  padding-right: 20px;
}

@media (max-width: 768px) {
  .toxicology-guide-grid {
    grid-template-columns: 1fr;
  }
  .toxicology-guide-sidebar {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
  }
}

/* Dashboard Styles */
.dashboard-nav-card {
  transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}
.dashboard-nav-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.search-result-item {
  transition: background-color 0.15s ease;
}
.search-result-item:hover {
  background-color: var(--bg-input) !important;
}

#dashboardSearchInput:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 10px var(--primary-glow) !important;
  background: var(--bg-card) !important;
}

/* Configuration Side Drawer */
.config-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.config-drawer-overlay.show {
  display: block;
  opacity: 1;
}

.config-drawer {
  position: fixed;
  top: 0;
  left: -420px;
  width: 420px;
  max-width: 100%;
  height: 100%;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  z-index: 2000;
  transition: left 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}
.config-drawer.open {
  left: 0;
}

.config-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}
.config-drawer-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.8px;
}
.config-drawer-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.config-drawer-close:hover {
  background: var(--bg-input);
  color: var(--danger);
}

.config-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 🧪 LABORATORY MODULE STYLES */
.lab-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lab-header {
  margin-bottom: 10px;
}

.lab-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
}

.lab-header p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.lab-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
  position: relative;
}

.lab-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.lab-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.lab-table th {
  text-align: left;
  padding: 6px 8px;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.5px;
}

.lab-table td {
  padding: 8px;
  border-bottom: 1px dashed var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

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

.lab-age-pill {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
}

.pill-rn {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

body.dark-theme .pill-rn {
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
}

.pill-lactante {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}

body.dark-theme .pill-lactante {
  background: rgba(6, 182, 212, 0.25);
  color: #22d3ee;
}

.pill-nino {
  background: rgba(37, 99, 235, 0.15);
  color: #2563eb;
}

body.dark-theme .pill-nino {
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
}

.lab-card-footer {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  background: var(--bg-input);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  margin-top: auto;
}

.lab-card-footer.warning-footer {
  border-left-color: var(--danger);
  background: rgba(239, 68, 68, 0.04);
}

body.dark-theme .lab-card-footer.warning-footer {
  background: rgba(239, 68, 68, 0.08);
}

/* Calculator specific styles */
.lab-calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-input);
  padding: 12px;
  border-radius: var(--radius-sm);
}

.lab-input-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.lab-input-group label {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 600;
}

.lab-input-group input {
  width: 80px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: 4px;
  outline: none;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  transition: var(--transition);
}

.lab-input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.lab-calc-output {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--success);
  background: rgba(16, 185, 129, 0.03);
  padding: 12px;
  border-radius: var(--radius-sm);
}

body.dark-theme .lab-calc-output {
  background: rgba(16, 185, 129, 0.06);
}

.lab-output-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lab-output-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.lab-output-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--success);
  font-family: 'JetBrains Mono', monospace;
}

.lab-output-text {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.4;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

/* Laboratory search bar */
.lab-search-bar {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  padding: 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px var(--primary-glow);
}

#laboratorioSearch {
  width: 100%;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  color: var(--text-main);
  padding: 14px 45px 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  outline: none;
  font-family: inherit;
  transition: all 0.25s ease-in-out;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

#laboratorioSearch:focus {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
  background: var(--bg-card);
}



