/* HCT Order Hub — estilos base con la identidad de Home Care Technology.
   Colores tomados del logo y del tema de hctortopedicos.com. */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/open-sans-latin.woff2") format("woff2");
}

:root {
  --hct-azul: #004f72;
  --hct-azul-oscuro: #003a54;
  --hct-verde: #369e93;
  --hct-fondo-suave: #ecf5f5;
  --hct-borde: #c2d3da;
  --fondo: #fbfcff;
  --superficie: #ffffff;
  --texto: #1b2b33;
  --texto-suave: #55666e;
  --alerta: #8a5a00;
  --alerta-fondo: #fff4dc;
  --error: #9b2c2c;
  --error-fondo: #fdecec;
  --radio: 6px;
  --sombra: 0 1px 2px rgb(0 79 114 / 0.06), 0 8px 24px rgb(0 79 114 / 0.08);
  --fuente: "Open Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 16px;
  line-height: 1.55;
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
  color: var(--hct-azul);
  text-wrap: balance;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

p {
  margin: 0;
}

a {
  color: var(--hct-azul);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--hct-verde);
  outline-offset: 2px;
}

/* ---------- Barra superior ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(16px, env(safe-area-inset-left));
  background: var(--superficie);
  border-bottom: 3px solid var(--hct-verde);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.topbar__brand img {
  height: 36px;
  width: auto;
}

.topbar__app {
  padding-left: 14px;
  border-left: 1px solid var(--hct-borde);
  font-weight: 600;
  color: var(--hct-azul);
  white-space: nowrap;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.92rem;
}

.topbar__user form {
  margin: 0;
}

.topbar__name {
  color: var(--texto-suave);
}

@media (max-width: 640px) {
  .topbar__brand img {
    height: 28px;
  }
  .topbar__app,
  .topbar__name {
    display: none;
  }
}

/* ---------- Contenido ---------- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px max(16px, env(safe-area-inset-left)) 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  background: var(--superficie);
  border: 1px solid var(--hct-borde);
  border-radius: var(--radio);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card--soft {
  background: var(--hct-fondo-suave);
  border-color: transparent;
}

.muted {
  color: var(--texto-suave);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chip {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--hct-fondo-suave);
  color: var(--hct-azul);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radio);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--hct-azul);
  color: #fff;
}

.btn--primary:hover {
  background: var(--hct-azul-oscuro);
}

.btn--secondary {
  background: var(--superficie);
  border-color: var(--hct-borde);
  color: var(--hct-azul);
}

.btn--link {
  min-height: 0;
  padding: 0;
  background: none;
  color: var(--hct-azul);
  font-weight: 600;
  text-decoration: underline;
}

/* Botón de Google según sus pautas de marca: fondo blanco, borde gris, logo a color. */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid #747775;
  border-radius: var(--radio);
  color: #1f1f1f;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-google:hover {
  background: #f6f8f8;
}

.btn-google svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- Mensajes ---------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radio);
  background: var(--hct-fondo-suave);
  color: var(--hct-azul);
  font-size: 0.95rem;
}

.alert--warn {
  background: var(--alerta-fondo);
  color: var(--alerta);
}

.alert--error {
  background: var(--error-fondo);
  color: var(--error);
}

.messages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Pantallas de ingreso ---------- */
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background-color: var(--hct-fondo-suave);
  /* Trama de puntos verde agua; el centro se aclara (::before) y quedan las
     esquinas punteadas, como en el membrete de HCT. */
  background-image: radial-gradient(circle, rgb(54 158 147 / 0.35) 1.6px, transparent 2px);
  background-size: 14px 14px;
}

.auth::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 70% at 50% 50%,
    var(--hct-fondo-suave) 55%,
    rgb(236 245 245 / 0) 100%
  );
}

.auth__card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 40px 32px 32px;
  background: var(--superficie);
  border-radius: 10px;
  box-shadow: var(--sombra);
  border-top: 4px solid var(--hct-azul);
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.auth__logo {
  width: 220px;
  max-width: 80%;
  height: auto;
  margin: 0 auto 4px;
}

.auth__title {
  font-size: 1.4rem;
}

.auth__lead {
  color: var(--texto-suave);
  margin-top: -12px;
}

.auth__note {
  font-size: 0.85rem;
  color: var(--texto-suave);
}

.auth__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth__footer {
  padding-top: 16px;
  border-top: 1px solid var(--hct-borde);
  font-size: 0.8rem;
  color: var(--texto-suave);
}
