/* ==========================================================================
   Panel de clientes (app.sitar.com.ar). Mobile-first: lo usan desde el celular.
   Los colores repiten la paleta de site.css a propósito: el panel es otra superficie
   (otro host, sin la web comercial) y no carga ese archivo. Si cambia la marca, cambiar
   los dos.
   ========================================================================== */

:root {
  --navy: #003f5c;
  --teal: #008c9e;
  --teal-strong: #00758a; /* contraste AA con texto blanco */
  --coral: #ff5c5c;
  --danger: #b42318;

  --ink: #0b2a38;
  --muted: #4b6371;
  --line: #d9e3e8;
  --paper: #f4f7f9;
  --surface: #ffffff;

  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  line-height: 1.2;
}

p {
  margin: 0 0 14px;
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 8px 16px;
  background: var(--navy);
  color: #ffffff;
}

/* Sobre el azul de la barra, el foco teal no contrasta: blanco. */
.bar :focus-visible {
  outline-color: #ffffff;
}

.bar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.bar__brand img {
  width: auto;
  height: 28px;
  filter: brightness(0) invert(1);
}

.panel {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.card {
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card--narrow {
  max-width: 420px;
  margin: 0 auto;
}

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

.small {
  font-size: 0.9rem;
}

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

.alert {
  padding: 10px 14px;
  border-radius: 10px;
  background: #fde8e7;
  color: var(--danger);
  font-weight: 600;
}

.form {
  display: grid;
  gap: 16px;
  margin: 18px 0;
}

.field {
  margin-bottom: -10px;
  font-weight: 600;
}

.field__help {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.field__input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #b9c7cf;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--teal-strong);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button--soft {
  border: 2px solid var(--teal-strong);
  background: var(--surface);
  color: var(--ink);
}

.actions {
  display: grid;
  gap: 10px;
}

.link-button {
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  background: none;
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.list__item {
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.list__title {
  font-size: 1.1rem;
  font-weight: 700;
}

/* --- Editar una mascota (etapa B) ------------------------------------------- */

h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.panel > .card,
.panel > .form > .card {
  margin-top: 16px;
}

.panel > .form {
  margin-top: 0;
}

.bar__link {
  color: #ffffff;
  font-weight: 600;
}

.notice {
  padding: 10px 14px;
  border-radius: 10px;
  background: #e3f4ec;
  color: #0b5d3b;
  font-weight: 600;
}

.card--lost {
  border-color: var(--danger);
  background: var(--danger);
  color: #ffffff;
}

.button--danger {
  background: var(--danger);
}

.button--light {
  background: #ffffff;
  color: var(--danger);
}

.button--sticky {
  position: sticky;
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: 100%;
  margin-top: 8px;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
}

.field__input--area {
  min-height: 72px;
  resize: vertical;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 8px;
  font-weight: 600;
}

.check input {
  width: 22px;
  height: 22px;
}

a.list__item {
  color: var(--ink);
  text-decoration: none;
}

.list__action {
  margin-top: 6px;
  color: var(--teal-strong);
  font-weight: 700;
}

/* Dentro de las secciones del perfil, cada campo con su aire. */
.form .card .field {
  display: block;
  margin: 16px 0 6px;
}

.form .card .field:first-of-type {
  margin-top: 4px;
}

.form .card .field__help {
  margin: 6px 0 0;
}

/* Texto libre escrito en varios renglones: se respetan los saltos de línea. */
.pre-line {
  white-space: pre-line;
}

/* Sobre el rojo del aviso, el foco teal no contrasta: blanco. */
.card--lost :focus-visible {
  outline-color: #ffffff;
}

.field__input[aria-invalid="true"] {
  border: 2px solid var(--danger);
}

/* --- La foto de la mascota (etapa C) --------------------------------------- */
.pet-photo {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1;
  margin: 12px 0 16px;
  border-radius: var(--radius);
  object-fit: cover;
}

.link-button--danger {
  padding-left: 0;
  color: var(--danger);
}

.confirm {
  margin-top: 8px;
}

.confirm summary {
  min-height: 44px;
  padding: 10px 0;
  color: var(--danger);
  font-weight: 600;
  cursor: pointer;
}
