/* ===========================================================================
   Base: lo que vale para toda la página.

   Antes la generaba Tailwind (issue #28). Ahora es CSS escrito a mano. Va en
   este orden, y las hojas se cargan en este orden
   en App.razor: site, base, componentes, armazon, portada y diseno. Cambiarlo
   cambia qué regla gana.

   Las variables --tw-* del principio las siguen leyendo reglas que vinieron de
   Tailwind (opacidades de color, sombras y anillos). Ya no hay utilidades.
   =========================================================================== */

/* Las variables de la interfaz. Lo nuevo se escribe con estas; las --clinic-*
   de site.css son las de antes y se retiran conforme se limpia cada pantalla. */
:root {
  /* La única familia de la app. La jerarquía la dan el tamaño y el grosor;
     las cifras que se comparan llevan .cifras (ancho fijo), no otra letra. */
  --fuente: "Inter", "Segoe UI", system-ui, sans-serif;

  /* La app es clara. Las ventanas que dibuja el navegador —el calendario de
     una fecha, la de un campo de hora— la siguen aunque el sistema esté en
     tema oscuro; sin esto salían paneles negros en un formulario blanco. */
  color-scheme: light;

  --azul-apec:     #021838;
  --fondo:         #F4F6FA;
  --tarjeta:       #FFFFFF;
  --tinta:         #021838;
  --gris:          #5A6782;
  --gris-claro:    #8794A8;
  --linea:         #DCE1EB;
  --acento:        #136DAB;
  --acento-fuerte: #0F5586;
  --atencion:      #B5541B;
  --correcto:      #2E7D46;
  --peligro:       #B3261E;
  --ambiente:      #5B2A86;

  /* Tonos de apoyo: el fondo un poco más claro de los encabezados de tabla
     y el borde de un campo bajo el cursor. */
  --fondo-suave:   #F8FAFC;
  --linea-fuerte:  #B8C2D3;

  /* Tonos de categoría. Distinguen cosas que no son severidad: el tipo de
     nota, el turno, las marcas de un medicamento, la acción de una orden.
     Cada uno con su texto, su fondo tenue, su línea y su marca (la barra o el
     punto). El texto pasa 4.5:1 sobre su fondo y sobre blanco. No se usa el
     morado: es exclusivo de la franja de ambiente. */
  --tono-cielo:          #0B5F86;  --tono-cielo-tinte:     #E2F0F8;  --tono-cielo-linea:     #9CCBE6;  --tono-cielo-marca:     #4BA3D6;
  --tono-indigo:         #3B44A3;  --tono-indigo-tinte:    #E9EBFB;  --tono-indigo-linea:    #B3B8EE;  --tono-indigo-marca:    #7C84DC;
  --tono-verdeazul:      #0D6A62;  --tono-verdeazul-tinte: #DEF3F0;  --tono-verdeazul-linea: #9ED8D0;  --tono-verdeazul-marca: #3AB3A4;
  --tono-ciruela:        #8A2E6C;  --tono-ciruela-tinte:   #F8E8F2;  --tono-ciruela-linea:   #E0B3D1;  --tono-ciruela-marca:   #B9629D;
  --tono-ambar:          #7A5600;  --tono-ambar-tinte:     #FBF1D9;  --tono-ambar-linea:     #E6CC85;  --tono-ambar-marca:     #D9A441;
  --tono-durazno-marca:  #E8A36B;

  /* La escala de letra. Siete tamaños y ninguno más: un componente que
     necesite otro usa el más cercano. Las hojas impresas y la portada tienen
     sus propias medidas, calculadas para el papel y para la entrada. */
  --texto-menor: 12px;     /* rótulos, ayudas, etiquetas */
  --texto-base:  14px;     /* texto, tablas, campos */
  --texto-medio: 16px;     /* valores destacados */
  --texto-titulo: 18px;    /* títulos de sección */
  --texto-pantalla: 24px;  /* título de pantalla y cifras grandes */
  --texto-dato: 24px;
  --texto-paciente: 30px;  /* el nombre del paciente */

  /* La escala de espacios, en píxeles: márgenes, rellenos y separaciones
     salen de aquí y no de un valor a ojo. Quince pasos; el que no esté se
     redondea al más cercano. */
  --espacio-2: 2px;
  --espacio-4: 4px;
  --espacio-6: 6px;
  --espacio-8: 8px;
  --espacio-10: 10px;
  --espacio-12: 12px;
  --espacio-14: 14px;
  --espacio-16: 16px;
  --espacio-20: 20px;
  --espacio-24: 24px;
  --espacio-28: 28px;
  --espacio-32: 32px;
  --espacio-40: 40px;
  --espacio-48: 48px;
  --espacio-64: 64px;

  /* Geometría y tiempos. */
  --radio-casilla: 4px;
  /* Todo control —botón, lista, campo— mide lo mismo: un botón junto a una
     lista se ve del mismo juego. */
  --radio-control: 8px;
  --alto-control: 36px;
  --alto-control-chico: 32px;
  --radio-recuadro: 10px;   /* un recuadro dentro de una tarjeta */
  --radio-tarjeta: 12px;
  --campo-y: 7px;
  --campo-x: 10.5px;
  --interlinea-control: 1.2;
  --icono: 14px;
  --transicion: .2s;
  --sombra-campo: 0 1px 2px 0 rgb(2 24 56 / .05);
  --sombra-panel: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
  --sombra-ventana: 0 20px 25px -5px rgb(2 24 56 / .14), 0 8px 10px -6px rgb(2 24 56 / .12);
  --ancho-riel: 260px;
  --ancho-riel-contraido: 72px;
  --alto-barra: 64px;
}

*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(19 109 171 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(19 109 171 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: var(--linea);
  /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
     tab-size: 4;
  /* 3 */
  font-family: var(--fuente);
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: var(--fuente);
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  letter-spacing: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1;
  /* 1 */
  color: var(--gris-claro);
  /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: var(--gris-claro);
  /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}

/* La barra de desplazamiento de la página. La del sistema sale gris oscuro,
     con flechas y con su propio carril de lado a lado, también junto a la
     franja de ambiente: se ve como un parche pegado a la pantalla. Va delgada,
     sin carril y en el azul de la app, como la del riel. */

html {
  scrollbar-width: thin;
  scrollbar-color: rgb(2 24 56 / 0.28) transparent;
}

/* Se listaba `input[type="text"]`, `input[type="number"]` y demás. Pero en
     Razor un `<input @bind="algo" />` se renderiza SIN atributo `type`: es un
     campo de texto y no coincide con ninguno de esos selectores, así que salía
     sin recuadro. Eran 99 campos en el sistema, más de la mitad.

     Se invierte: se estilan todos menos los que tienen dibujo propio.

     La lista de excepciones va dentro de `:where()`, que no suma peso. Sin él
     el selector pesa más que cualquier clase, y entonces `.buscador input` o
     `.paginacion select` no podían corregir nada: la regla base les ganaba
     siempre. Así el peso es el de `input` a secas y una clase la vence. */

input:where(:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="color"])),
  select,
  textarea {
  /* Medidas exactas, no aproximadas: relleno 0.5rem por 0.75rem,
       altura de línea 1.2, borde de 1 px y radio de 6. Con esto el campo, el
       desplegable y el área de texto miden lo mismo; antes el `select` usaba
       el alto del navegador y quedaba disparejo junto a un input. */
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--clinic-line);
  border-radius: var(--radio-control);
  background-color: #fff;
  /* 7 px por 10.5 px. Escrito en rem con raíz de 14 px serían 0.5rem por
       0.75rem, pero la nuestra es de 16: copiar la cifra en vez de la medida
       daría un campo más alto. */
  padding: 0.4375rem 0.65625rem;
  font-size: var(--texto-base);
  /* Con 1.2 bastaría en InterDisplay, pero es otra familia:
       el corte de display de Inter, con las métricas verticales más apretadas.
       Nosotros usamos Inter a secas, cuyo ascendente más descendente mide
       1.211 em: en 1.2 no cabe y Chrome recorta la panza de la g y de la j.
       Con 1.25 cabe, a cambio de 1.4 px más de alto. */
  line-height: 1.25;
  color: var(--clinic-ink);
  font-family: inherit;
  /* La sombra de un pixel que llevan todos los controles. */
  box-shadow: 0 1px 2px rgba(2, 24, 56, 0.05);
}

/* No se fija un alto. Los tres controles miden lo mismo porque
     comparten relleno, altura de línea y borde, no porque alguien les haya
     puesto una cifra: 7 + 16.8 + 7 + 2 = 32.8 px en los tres. Un alto fijo
     encima del relleno descuadra el texto en cuanto uno de ellos cambia. */

/* El desplegable dibuja su propia flecha: la del sistema es distinta en
     cada navegador y además cambia el alto del control. */

select {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  padding-right: 2.1875rem;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235A6782' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65625rem center;
}

/* Un `<input list="...">` es la otra forma de desplegable que hay en el
     sistema, y Chrome le dibuja un triángulo negro relleno que no se parece en
     nada a la flecha del `select`: por eso en el mismo formulario «Rol» y
     «Servicio» se veían distintos.

     No se esconde el indicador, se le cambia el dibujo: es el único punto por
     el que se abre la lista, y taparlo dejaría el catálogo sin manera de
     desplegarse. */

input[list] {
  padding-right: 2.1875rem;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235A6782' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65625rem center;
}

/* Chrome no hace caso cuando se le cambia el dibujo al indicador: se queda
     con su triángulo. Así que se vuelve transparente y la flecha la pinta el
     campo. El indicador sigue ahí, ocupando toda la orilla derecha, que es por
     donde se abre la lista: se ve distinto y se abre igual.

     El margen negativo es lo que lo pone DEBAJO de la flecha. El indicador se
     acomoda al final de la caja de contenido, y como el campo lleva relleno a
     la derecha para dejarle sitio al icono, quedaba un ancho de icono a la
     izquierda: el clic sobre la flecha caía en el relleno y no abría la lista.
     El margen le devuelve exactamente ese relleno. Es lo mismo que le pasaba a
     la fecha y a la hora, aquí abajo. */

input[list]::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 2.1875rem;
  height: 100%;
  margin: 0 -2.1875rem 0 0;
  padding: 0;
  cursor: pointer;
}

/* La fecha y la hora son el tercer desplegable del sistema, y el único que
     no se había normalizado: cada navegador dibuja el suyo. En Safari el valor
     sale centrado y el control mide distinto que el `select` de al lado, así
     que en el mismo renglón un campo se veía torcido respecto del otro.

     Se les da el mismo trato que al `select` y al `input[list]`: se apaga el
     dibujo del sistema, se alinea el valor a la izquierda y la flecha la pinta
     el campo. El indicador sigue ahí y sigue abriendo el calendario. */

input[type="date"], input[type="time"] {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  text-align: left;
  /* El mismo alto que el `select` y el campo de texto de al lado: la caja
       interna del navegador mide dos píxeles más que una línea de texto, y en
       un renglón de tres campos esa diferencia se ve. */
  height: 2.0625rem;
  padding-right: 2.1875rem;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235A6782' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65625rem center;
}

input[type="time"] {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235A6782' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

/* La zona que abre el calendario va ENCIMA del icono que pintamos, no donde
     el navegador la pondría. El indicador se acomoda al final de la caja de
     contenido, y como el campo lleva relleno a la derecha para dejarle sitio al
     icono, quedaba a un ancho de distancia: el clic sobre el icono caía en el
     relleno y no abría nada. Se ancla al borde derecho. */

input[type="date"], input[type="time"] {
  position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator,
  input[type="time"]::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  opacity: 0;
  width: 2.1875rem;
  height: auto;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

/* Safari mete su propio relleno dentro del control; sin esto el valor no se
     alinea con el de los campos de texto de al lado. */

input[type="date"]::-webkit-datetime-edit,
  input[type="time"]::-webkit-datetime-edit,
  input[type="date"]::-webkit-datetime-edit-fields-wrapper,
  input[type="time"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

/* Las dos cajas de la hora son angostas y llevan dos dígitos. La flecha del
     desplegable se pinta a la derecha del control, y como aquí el relleno es
     simétrico y estrecho, caía encima de los números. Se quita: con dos cifras
     y el separador «:» se entiende que son listas sin necesidad de flecha. */

/* El «…» entre saltos de página: ocupa lo mismo que un número para que la
     fila no baile al navegar. */

.paginacion .salto {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  --tw-text-opacity: 1;
  color: rgb(90 103 130 / var(--tw-text-opacity, 1));
}

.selector-hora select {
  background-image: none;
  padding-right: 0.5rem;
  text-align: center;
}

textarea {
  min-height: 4.5rem;
}

/* El anillo del navegador son dos o tres pixeles de azul brillante encima
     del borde, y se veía como un error. Se apaga y se pone uno propio: el
     borde toma el color de acento y alrededor va un halo suave. Se apaga el
     de fábrica solo porque hay uno que lo sustituye y se ve; sin sustituto,
     quien navega con el teclado deja de saber dónde está parado. */

input:where(:not([type="checkbox"]):not([type="radio"])):focus,
  select:focus,
  textarea:focus {
  outline: none;
  border-color: var(--clinic-accent);
  box-shadow: 0 0 0 2px rgb(19 109 171 / 0.14);
}

input[type="checkbox"]:focus-visible,
  input[type="radio"]:focus-visible {
  outline: none;
  border-color: var(--clinic-accent);
  box-shadow: 0 0 0 2px rgb(19 109 171 / 0.14);
}

input:disabled,
  select:disabled,
  textarea:disabled {
  background-color: rgb(90 103 130 / 0.1);
  --tw-text-opacity: 1;
  color: rgb(90 103 130 / var(--tw-text-opacity, 1));
}

::-moz-placeholder {
  --tw-text-opacity: 1;
  color: rgb(90 103 130 / var(--tw-text-opacity, 1));
}

::placeholder {
  --tw-text-opacity: 1;
  color: rgb(90 103 130 / var(--tw-text-opacity, 1));
}

/* Casillas y radios dibujados, no los del navegador.

     Con `accent-color` el navegador pinta el suyo: cada uno distinto, con su
     propio borde y su propia palomita. Aquí se dibujan, y así se ven iguales
     en Chrome, en Safari y en la tableta del piso.

     Miden 17.5 px; estuvieron en 22
     pensando en el dedo. El área que se toca no es la casilla: es la etiqueta
     entera, que va dentro de un <label>. */

input[type="checkbox"],
  input[type="radio"] {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  width: 1.09375rem;
  height: 1.09375rem;
  flex: none;
  display: inline-grid;
  place-content: center;
  border: 1px solid var(--clinic-line);
  background: #fff;
  /* Una sombra de un pixel. Casi no se ve y es lo que la
       despega del fondo blanco del formulario. */
  box-shadow: 0 1px 2px rgba(2, 24, 56, 0.05);
  cursor: pointer;
  vertical-align: middle;
}

input[type="checkbox"] {
  border-radius: 4px;
}

input[type="radio"]    {
  border-radius: 50%;
}

input[type="checkbox"]:hover,
  input[type="radio"]:hover {
  border-color: var(--clinic-accent);
}

input[type="checkbox"]:checked,
  input[type="radio"]:checked {
  background: var(--clinic-accent);
  border-color: var(--clinic-accent);
}

/* La palomita: dos lados de un cuadro, girados. */

input[type="checkbox"]:checked::before {
  content: "";
  width: 0.5rem;
  height: 0.25rem;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

input[type="radio"]:checked::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #fff;
}

input[type="checkbox"]:disabled,
  input[type="radio"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* La etiqueta de un campo, tal como la escribe el sistema anterior en sus
     109 formularios. */

label {
  font-size: var(--texto-base);
  line-height: 1.25rem;
  --tw-text-opacity: 1;
  color: rgb(2 24 56 / var(--tw-text-opacity, 1));
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--texto-base);
  line-height: 1.25rem;
}

thead tr {
  --tw-bg-opacity: 1;
  background-color: rgb(244 246 250 / var(--tw-bg-opacity, 1));
  text-align: left;
}

th {
  border-bottom-width: 1px;
  --tw-border-opacity: 1;
  border-color: rgb(220 225 235 / var(--tw-border-opacity, 1));
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-weight: 500;
  --tw-text-opacity: 1;
  color: rgb(2 24 56 / var(--tw-text-opacity, 1));
}

td {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  vertical-align: top;
}

tbody tr {
  border-bottom-width: 1px;
  --tw-border-opacity: 1;
  border-color: rgb(220 225 235 / var(--tw-border-opacity, 1));
}

tbody tr:last-child {
  border-width: 0px;
}

h1 {
  font-family: var(--fuente);
  font-size: var(--texto-pantalla);
  line-height: 2rem;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(2 24 56 / var(--tw-text-opacity, 1));
}

h2 {
  font-family: var(--fuente);
  font-size: var(--texto-titulo);
  line-height: 1.75rem;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(2 24 56 / var(--tw-text-opacity, 1));
}

h3 {
  font-family: var(--fuente);
  font-size: var(--texto-medio);
  line-height: 1.5rem;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(2 24 56 / var(--tw-text-opacity, 1));
}

