/* =====================================================
   ENTERAL NUTRITION SUPPORT – CLINICAL LIGHT UI
   ===================================================== */

:root {
  --bg: #F8FAFC;
  --panel: #FFFFFF;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --primary: #38BDF8;          /* Azul celeste */
  --primary-hover: #0EA5E9;    /* Azul celeste fuerte */
  --text: #0F172A;
  --muted: #64748B;
  --success: #16A34A;
  --warning: #F59E0B;
  --danger: #DC2626;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(14,165,233,0.06);
}

/* ================= BASE ================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.wrap {
  max-width: 1150px;
  margin: auto;
  padding: 2.5rem 1.2rem 3rem;
}

/* ================= HEADER ================= */

.page-header {
  margin-bottom: 2rem;
}

.page-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.page-header p {
  color: var(--muted);
  font-size: 0.95rem;
}

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

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

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

/* ================= INPUT ================= */

label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  display: block;
}

input[type="number"] {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.2s ease;
}

input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.2);
}

/* ================= GRID RESULTS ================= */

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

.result {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
}

.result b {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--success);
}

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

/* ================= TABLES ================= */

.tabla-enterales {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.tabla-enterales thead {
  background: #F1F5F9;
}

.tabla-enterales th {
  font-weight: 600;
  padding: 0.9rem 0.8rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.tabla-enterales td {
  padding: 0.85rem 0.7rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.tabla-enterales tbody tr {
  transition: background 0.2s ease;
}

.tabla-enterales tbody tr:hover {
  background: rgba(56,189,248,0.08);
}

.tabla-enterales tbody tr:nth-child(even) {
  background: #F8FAFC;
}

/* ================= DEFICIT COLORS ================= */

.deficit {
  font-weight: 600;
}

.deficit-warning {
  color: var(--warning);
}

.deficit-danger {
  color: var(--danger);
}

/* ================= NOTE ================= */

.note {
  background: #E0F2FE;
  border: 1px solid rgba(14,165,233,0.3);
  padding: 1.4rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ================= BREADCRUMB ================= */

.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 1.8rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--primary-hover);
}

/* ================= LANGUAGE SWITCHER ================= */

.language-switcher {
  text-align: right;
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
}

.language-switcher a {
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.language-switcher a.active,
.language-switcher a[aria-current="page"] {
  color: var(--primary-hover);
  font-weight: 600;
}

.language-switcher a:hover {
  color: var(--primary);
}

/* ================= FOOTER ================= */

.site-footer {
  margin-top: 3.5rem;
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--border);
  background: #FFFFFF;
  text-align: center;
}

.footer-nav a {
  color: var(--primary-hover);
  text-decoration: none;
  margin: 0 0.5rem;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1rem;
}

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

@media (max-width: 768px) {

  .wrap {
    padding: 1.8rem 1rem;
  }

  .page-header h2 {
    font-size: 1.5rem;
  }

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

  .tabla-enterales {
    font-size: 0.8rem;
  }

}
