/* ──────────────── Reset & base ──────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f7fa;
  color: #333;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}

/* ──────────────── Contenedor principal ──────────────── */
.container {
  background: #fff;
  width: 100%;
  max-width: 430px;
  padding: 2.25rem;
  border-radius: 1rem;
  box-shadow: 0 9px 26px rgba(0, 0, 0, 0.08);
}

/* ──────────────── Tipografía ──────────────── */
h1,
h2,
h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  text-align: center;
}

p {
  margin: 0.5rem 0 1.25rem;
  text-align: center;
  line-height: 1.45;
}

/* ──────────────── Inputs ──────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1.2rem;
  border: 1px solid #d7dfe7;
  border-radius: 10px;
  transition: border 0.25s, box-shadow 0.25s;
  font-size: 1rem;
}

input:focus,
select:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
}

/* ──────────────── Botones ──────────────── */
button {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 0.4rem;
  transition: background 0.3s, transform 0.08s;
}

button:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: #3498db;
  color: #fff;
}

.btn-primary:hover {
  background-color: #2980b9;
}

/* ──────────────── Panel Paciente ──────────────── */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f6f9fc;
  color: #1c1c1e;
}

.container {
  max-width: 400px;
  margin: auto;
  padding: 20px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar h1 {
  font-size: 24px;
}

.fecha {
  font-size: 14px;
  color: #607080;
}

.bluetooth-btn {
  margin-top: 10px;
  display: flex;
  align-items: center;
  background: #e4e9f0;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
}

.bluetooth-btn img {
  height: 18px;
  margin-right: 8px;
}

h2 {
  font-size: 18px;
  margin-top: 24px;
}

.grid-salud {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.card p {
  font-size: 14px;
  color: #5a5a5a;
}

.card h3 {
  margin-top: 8px;
  font-size: 20px;
}

.med-lista .med {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.med-lista span {
  font-size: 13px;
  color: #607080;
}

.btn-secundario {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  background-color: #e4e9f0;
  border: none;
  border-radius: 8px;
  font-weight: 600;
}

.estudio {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.btn-ver {
  background-color: #d4ddea;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
}

.ia-chat {
  margin-top: 20px;
  text-align: center;
}

.btn-ia {
  background-color: #007AFF;
  color: white;
  padding: 12px;
  width: 100%;
  border: none;
  border-radius: 8px;
  font-weight: bold;
}

.nav-bar {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: white;
  display: flex;
  justify-content: space-around;
  border-top: 1px solid #ccc;
  padding: 10px 0;
}

.nav-bar a {
  text-decoration: none;
  color: #1c1c1e;
  font-size: 14px;
}

.nav-bar a.active {
  font-weight: bold;
  color: #007AFF;
}

/* ──────────────── Navegación ──────────────── */
.nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: white;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  z-index: 999;
}

.nav-item {
  background: none;
  border: none;
  font-size: 13px;
  color: #555;
  cursor: pointer;
}

.nav-item.active {
  color: #007bff;
  font-weight: bold;
}

/* ──────────────── Responsive ──────────────── */
@media (max-width: 480px) {
  .container, .panel {
    padding: 1.2rem;
  }
}
