:root {
  --azul: #0f7c80;
  --lado: #12393d;
  --fondo: #eef3f2;
  --borde: #d5e0de;
}

.marca-logo { background: linear-gradient(180deg, #34c3b5, #0f7c80); }
.menu a.activo { background: rgba(52, 195, 181, 0.2); }
.btn:hover { border-color: #a9c4c0; }

.agenda-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.agenda-nav strong { font-family: "Montserrat", sans-serif; margin: 0 6px; }
.agenda { overflow-x: auto; }
.agenda table { min-width: 720px; table-layout: fixed; }
.agenda th { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--tinta); }
.agenda th small { display: block; color: var(--suave); font-weight: 400; }
.agenda th:first-child, .agenda td:first-child { width: 64px; color: var(--suave); font-size: 13px; }
.agenda td { padding: 3px 4px; height: 44px; border-bottom: 1px solid #e6eeec; }
.celda-libre {
  width: 100%; height: 36px; border: 1px dashed transparent; border-radius: 8px;
  background: transparent; color: transparent; cursor: pointer;
}
.celda-libre:hover { border-color: var(--azul); color: var(--azul); }
.celda-no { height: 36px; border-radius: 8px; background: repeating-linear-gradient(45deg, #f1f4f3, #f1f4f3 6px, #e8eeec 6px, #e8eeec 12px); }
.turno {
  width: 100%; height: 36px; border-radius: 8px; border: 0; cursor: pointer;
  text-align: left; padding: 3px 8px; font-size: 12.5px; line-height: 1.2; overflow: hidden;
  border-left: 4px solid; display: flex; flex-direction: column; justify-content: center;
}
.turno b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.turno small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.8; }
.e-pendiente { background: #fbf3e2; border-color: #d39b2a; color: #6b4b10; }
.e-confirmado { background: #e3eefc; border-color: #2f74d0; color: #163f75; }
.e-espera { background: #efe7fb; border-color: #7b4fd1; color: #45297d; }
.e-atendido { background: #e2f4ec; border-color: #1f8a5b; color: #135437; }
.e-ausente { background: #fbe7e4; border-color: #b3402f; color: #6e2318; }
.e-cancelado { background: #eef0f2; border-color: #9aa3ad; color: #6b7480; text-decoration: line-through; }
.leyenda { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; }
.leyenda span { padding: 2px 8px; border-radius: 999px; border-left: 4px solid; }

.estado { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; border-left: 4px solid; }
.acciones-turno { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.detalle-turno { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.detalle-turno dt { color: var(--suave); }
.detalle-turno dd { margin: 0; }

.pestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--borde); margin-bottom: 14px; overflow-x: auto; }
.pestanas button { border: 0; background: none; padding: 8px 12px; cursor: pointer; color: var(--suave); border-bottom: 2px solid transparent; white-space: nowrap; }
.pestanas button.activa { color: var(--azul); border-bottom-color: var(--azul); font-weight: 500; }
.ficha-cab { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #d8efec; color: var(--azul); font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 18px; flex: 0 0 52px; }
.ficha-cab p { margin: 2px 0 0; color: var(--suave); font-size: 14px; }
.alergia { display: inline-block; margin-top: 4px; background: #fbe7e4; color: var(--rojo); border-radius: 6px; padding: 2px 8px; font-size: 12px; }
.consulta { border: 1px solid var(--borde); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.consulta-cab { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--suave); }
.consulta h4 { margin: 6px 0 4px; font-size: 15px; }
.consulta p { margin: 2px 0; font-size: 14px; }

.odontograma { display: grid; gap: 10px; justify-content: center; }
.arcada { display: flex; gap: 14px; justify-content: center; }
.cuadrante { display: flex; gap: 3px; }
.diente {
  width: 40px; height: 52px; border-radius: 8px 8px 14px 14px; border: 1.5px solid #b9c9c6;
  background: #fff; cursor: pointer; font-size: 11px; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; padding-bottom: 3px; position: relative;
}
.diente::before { content: ""; position: absolute; top: 7px; width: 22px; height: 22px; border-radius: 50%; background: var(--color, #f3f6f5); border: 1px solid rgba(0, 0, 0, 0.12); }
.diente.ausente { opacity: 0.45; }
.diente.ausente::after { content: "✕"; position: absolute; top: 3px; font-size: 18px; color: var(--rojo); }
.leyenda-dientes { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 12px; font-size: 12px; color: var(--suave); }
.leyenda-dientes i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: -2px; border: 1px solid rgba(0, 0, 0, 0.12); }

.receta { background: #fff; border: 1px solid #cfdcd9; border-radius: 6px; padding: 22px; font-size: 14px; min-height: 420px; display: flex; flex-direction: column; }
.receta-cab { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--azul); padding-bottom: 10px; }
.receta-cab h3 { font-size: 18px; color: var(--azul); }
.receta-cab p { margin: 2px 0; font-size: 13px; color: var(--suave); }
.receta-pac { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid #e3ebe9; font-size: 13px; }
.rp { font-family: "Montserrat", sans-serif; font-size: 22px; color: var(--azul); margin: 14px 0 6px; }
.receta-texto { white-space: pre-wrap; line-height: 1.6; flex: 1; }
.firma { margin: 40px 0 0 auto; width: 240px; border-top: 1px solid var(--tinta); text-align: center; padding-top: 6px; font-size: 13px; }

textarea {
  border: 1px solid var(--borde); background: #fff; border-radius: 10px; padding: 8px 10px; font: inherit; min-height: 80px; resize: vertical;
}
.sala { display: flex; flex-direction: column; gap: 8px; }
.sala-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--borde); }
.sala-item small { display: block; color: var(--suave); }
.ocupacion { display: grid; gap: 10px; }
.ocupacion div { font-size: 14px; }
.ocupacion .barrita { height: 8px; background: #e3ebe9; border-radius: 99px; margin-top: 4px; overflow: hidden; }
.ocupacion .barrita i { display: block; height: 100%; background: linear-gradient(90deg, #34c3b5, #0f7c80); }
.dias { display: flex; gap: 6px; flex-wrap: wrap; }
.dias label { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--tinta); }

@media (max-width: 900px) {
  .receta-pac { grid-template-columns: 1fr; }
  .diente { width: 26px; height: 36px; font-size: 9px; }
  .diente::before { width: 12px; height: 12px; }
  .arcada { gap: 6px; }
  .cuadrante { gap: 2px; }
}

@media print {
  .receta { border: 0; min-height: 0; }
}
