/* ============================================================
   🐾 ADOPTAPET — SISTEMA DE DISEÑO PROFESIONAL v2
   ============================================================
   Sistema de estilos moderno, accesible y responsive
   ============================================================ */

/* ── VARIABLES GLOBALES ── */
:root {
  /* Colores principales */
  --primary-900: #203d31;
  --primary-800: #2c5540;
  --primary-700: #3a6a4f;
  --primary-600: #568267;
  --primary-300: #a6c0a8;
  --primary-200: #dce9dd;
  --primary-100: #eff5ef;

  --secondary-500: #bd684a;
  --secondary-100: #f8eee8;

  --accent-600: #526b7a;
  --accent-100: #edf2f4;

  --success-700: #16a34a;
  --success-100: #dcfce7;

  --warning-600: #d97706;
  --warning-100: #fef3c7;

  --danger-600: #dc2626;
  --danger-100: #fee2e2;

  /* Escalas de grises */
  --gray-950: #202b25;
  --gray-900: #26352d;
  --gray-800: #35443b;
  --gray-700: #4d5b52;
  --gray-600: #657168;
  --gray-500: #7e8981;
  --gray-400: #a2aaa3;
  --gray-300: #c8cec8;
  --gray-200: #e0e4de;
  --gray-100: #edf0eb;
  --gray-50: #f6f7f3;
  --white: #ffffff;

  /* Tipografía */
  --font-display: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Espaciado */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Border radius */
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 18px;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-xs: 0 1px 2px rgba(32, 52, 40, 0.04);
  --shadow-sm: 0 2px 8px rgba(32, 52, 40, 0.06);
  --shadow-md: 0 6px 18px rgba(32, 52, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(32, 52, 40, 0.12);
  --shadow-xl: 0 18px 44px rgba(32, 52, 40, 0.15);

  /* Transiciones */
  --transition-fast: 150ms ease;
  --transition: 200ms ease;
  --transition-slow: 300ms ease;

  /* Compatibilidad con versión anterior */
  --green-900: #203d31;
  --green-800: #2c5540;
  --green-700: #3a6a4f;
  --green-600: #568267;
  --green-200: #dce9dd;
  --green-100: #eff5ef;
  --orange-500: #bd684a;
  --orange-100: #f8eee8;
  --blue-600: #526b7a;
  --blue-100: #edf2f4;
  --purple-600: #6c6682;
  --purple-100: #f0eef4;
  --red-600: #b64f49;
  --red-100: #f8ecea;
}

/* ── RESET Y BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.logout-form { display: contents; }
.logout-form > button { font: inherit; cursor: pointer; }
.nav-dropdown__menu .logout-form > button { width: 100%; padding: 10px 16px; text-align: left; border: 0; background: transparent; }

.app-install-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(92vw, 560px);
  z-index: 1200;
}

.app-install-banner[hidden] {
  display: none;
}

.app-install-banner__content {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.94);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
}

.app-install-banner__content p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
}

.app-install-banner__close {
  margin-left: auto;
  color: var(--white);
  font-size: 1.25rem;
  line-height: 1;
}

body.is-standalone .env-chip {
  display: none;
}

body.is-standalone .app-install-banner {
  display: none;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  color: var(--gray-800);
  background: linear-gradient(180deg, #fafbfd 0%, #f4f6fa 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
textarea { resize: vertical; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── TYPOGRAFÍA MEJORADA ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--gray-900);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin: 0 0 var(--space-md) 0; }
small { font-size: 0.875rem; }

/* ── Container ── */
.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 20px; }

/* ── BOTONES PROFESIONALES ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.8rem;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-600) 100%);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-700) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.4);
}

.btn--secondary {
  background: var(--gray-100);
  color: var(--gray-800);
  border-color: var(--gray-200);
}

.btn--secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-300);
}

.btn--outline {
  background: transparent;
  color: var(--primary-700);
  border-color: var(--primary-700);
}

.btn--outline:hover {
  background: var(--primary-100);
  color: var(--primary-800);
}

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn--outline-white:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--white);
}

.btn--ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: transparent;
}

.btn--ghost:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.btn--danger {
  background: var(--danger-600);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.btn--danger:hover {
  background: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

.btn--success {
  background: var(--success-700);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.btn--success:hover {
  background: #15803d;
  transform: translateY(-2px);
}

.btn--info {
  background: #0ea5e9;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.btn--info:hover {
  background: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
}

.btn--lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn--sm { padding: 7px 14px; font-size: 0.82rem; }
.btn--xs { padding: 4px 10px; font-size: 0.78rem; border-radius: var(--radius-sm); }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn:focus-visible { outline: 3px solid rgba(20, 184, 166, 0.28); outline-offset: 2px; }
.btn i { transition: transform var(--transition); }
.btn:hover i { transform: translateX(2px); }

/* ── Formularios ── */
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--white); color: var(--gray-800); font-size: 0.93rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(37,99,255,.16); }
.form-control[readonly] { background: var(--gray-50); color: var(--gray-500); cursor: default; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 0.87rem; font-weight: 600; color: var(--gray-700); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-group--full { grid-column: 1 / -1; }
.form-hint { font-size: 0.8rem; color: var(--gray-500); }
.required { color: var(--red-600); }
.char-counter { font-size: 0.78rem; color: var(--gray-400); text-align: right; }
.input-password-wrap { position: relative; }
.input-password-wrap .form-control { padding-right: 44px; }
.btn-show-pass { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); padding: 4px; }
.btn-show-pass:hover { color: var(--gray-700); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 0.78rem; font-weight: 600; text-transform: capitalize;
}
.badge--success  { background: var(--green-200); color: var(--green-800); }
.badge--warning  { background: #fef3c7; color: #92400e; }
.badge--danger   { background: var(--red-100); color: var(--red-600); }
.badge--primary  { background: var(--blue-100); color: var(--blue-600); }
.badge--info     { background: #e0f2fe; color: #0369a1; }
.badge--lg  { font-size: 0.87rem; padding: 5px 14px; }
.badge--sm  { font-size: 0.72rem; padding: 2px 7px; }

/* ── Tags ── */
.tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 500; }
.tag--green  { background: var(--green-100); color: var(--green-800); }
.tag--blue   { background: var(--blue-100); color: var(--blue-600); }
.tag--orange { background: var(--orange-100); color: var(--orange-500); }

/* ── Alerts ── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px; border-radius: var(--radius-md);
  font-size: 0.9rem; border: 1px solid transparent;
}
.alert--success { background: var(--green-100); color: var(--green-800); border-color: var(--green-200); }
.alert--error   { background: var(--red-100); color: var(--red-600); border-color: #fecaca; }
.alert--warning { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.alert--info    { background: var(--blue-100); color: var(--blue-600); border-color: #bfdbfe; }

/* ── Flash messages ── */
.flash {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-radius: var(--radius-lg);
  font-weight: 500; font-size: 0.92rem; z-index: 9999;
  box-shadow: var(--shadow-lg); min-width: 0; max-width: min(600px, calc(100vw - 24px)); width: max-content;
  animation: slideDown 0.3s ease;
}
.flash--success { background: var(--green-700); color: var(--white); }
.flash--error   { background: var(--red-600); color: var(--white); }
.flash__close { margin-left: auto; background: none; border: none; color: inherit; font-size: 1.2rem; cursor: pointer; opacity: 0.7; line-height: 1; }
.flash__close:hover { opacity: 1; }
@keyframes slideDown { from { opacity: 0; transform: translateX(-50%) translateY(-20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ── Environment chip ── */
.env-chip {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 10001;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  box-shadow: var(--shadow-md);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.env-chip strong { font-family: var(--font-display); letter-spacing: 0.06em; }
.env-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}
.env-chip--qa {
  background: #fff4d6;
  color: #9a3412;
  border-color: #f59e0b;
}
.env-chip--development {
  background: #dcf2ff;
  color: #0c4a6e;
  border-color: #0ea5e9;
}
.env-chip--production {
  background: #dbfee8;
  color: #14532d;
  border-color: #22c55e;
}
.env-chip--unknown {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #8b5cf6;
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--gray-200); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table thead th { background: var(--gray-50); padding: 12px 16px; font-weight: 600; text-align: left; color: var(--gray-700); border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
.table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--gray-50); }
.table--sm thead th, .table--sm tbody td { padding: 9px 12px; font-size: 0.85rem; }
.tr--highlight { background: #fef9c3 !important; }

/* ── Pagination ── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pagination__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-md);
  border: 1.5px solid var(--gray-200); font-weight: 600; font-size: 0.87rem;
  color: var(--gray-700); transition: all var(--transition);
}
.pagination__btn:hover, .pagination__btn.active {
  background: var(--green-700); color: var(--white); border-color: var(--green-700);
}

/* ── Empty states ── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state__icon { font-size: 3.5rem; display: block; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.3rem; color: var(--gray-700); margin-bottom: 8px; }
.empty-state p { color: var(--gray-500); margin-bottom: 20px; }
.empty-state--centered { display: flex; flex-direction: column; align-items: center; }
.empty-state--sm { padding: 30px 20px; }

/* ── Error pages ── */
.error-page { padding: 60px 0 80px; }
.error-card {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 36px 24px;
  box-shadow: var(--shadow-md);
}
.error-card__icon {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 8px;
}
.error-card__code {
  font-family: var(--font-display);
  font-size: 2.1rem;
  letter-spacing: 0.06em;
  color: var(--green-700);
  margin-bottom: 6px;
}
.error-card__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.02em;
  color: var(--gray-900);
  margin-bottom: 10px;
}
.error-card__text {
  color: var(--gray-600);
  margin-bottom: 22px;
}

/* ── Animals grid ── */
.animals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.animal-card {
  border-radius: var(--radius-lg); border: 1.5px solid var(--gray-200);
  overflow: hidden; transition: all var(--transition); background: var(--white);
  text-decoration: none; color: inherit; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.animal-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-md); transform: translateY(-5px); }
.animal-card__photo { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--gray-100); min-height: 230px; }
.animal-card__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.animal-card:hover .animal-card__photo img { transform: scale(1.05); }
.animal-card__no-photo { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3.5rem; background: linear-gradient(135deg, #edf1f7, #dfe5ee); }
.animal-card__species-badge { position: absolute; top: 12px; left: 12px; background: rgba(14,15,20,0.85); color: var(--white); font-size: 0.68rem; padding: 5px 10px; border-radius: var(--radius-full); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; backdrop-filter: blur(4px); }
.animal-card__status-badge { position: absolute; top: 12px; right: 12px; z-index: 2; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.64rem; border: 1px solid rgba(255,255,255,0.28); backdrop-filter: blur(4px); }
.animal-card__status-badge.badge--success { background: rgba(15, 118, 110, 0.9); color: #fff; }
.animal-card__status-badge.badge--warning { background: rgba(217, 119, 6, 0.9); color: #fff; }
.animal-card__status-badge.badge--danger { background: rgba(220, 38, 38, 0.9); color: #fff; }
.animal-card__vacc { position: absolute; bottom: 10px; right: 10px; background: var(--green-700); color: var(--white); font-size: 0.65rem; padding: 4px 8px; border-radius: var(--radius-full); font-weight: 700; text-transform: uppercase; }
.animal-card__body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.animal-card__body h3 { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: 0.02em; line-height: 0.95; color: var(--gray-900); text-transform: uppercase; }
.animal-card__meta { font-size: 0.88rem; color: var(--gray-500); }
.animal-card__center { font-size: 0.84rem; color: var(--gray-700); font-weight: 600; }
.animal-card__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.animal-card__cta { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--green-700); }
.animal-card__actions { display: flex; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--gray-100); }

/* ── Centers grid ── */
.centers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.center-card { border: 1.5px solid var(--gray-200); border-radius: var(--radius-lg); padding: 20px; display: flex; align-items: center; gap: 14px; transition: all var(--transition); }
.center-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-sm); }
.center-card__logo img { width: 56px; height: 56px; border-radius: var(--radius-md); object-fit: cover; }
.center-card__logo-placeholder { width: 56px; height: 56px; border-radius: var(--radius-md); background: var(--green-700); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; }
.center-card__info h3 { font-size: 0.95rem; font-weight: 700; color: var(--gray-900); }
.center-card__info p { font-size: 0.82rem; color: var(--gray-500); margin: 2px 0; }

/* ── Notifications ── */
.notif-list { display: flex; flex-direction: column; gap: 2px; }
.notif-item { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); transition: background var(--transition); }
.notif-item:hover { background: var(--gray-50); }
.notif-item--unread { background: var(--green-100); }
.notif-item__icon { font-size: 1.5rem; flex-shrink: 0; width: 36px; text-align: center; }
.notif-item__body { flex: 1; }
.notif-item__title { font-weight: 600; font-size: 0.92rem; color: var(--gray-900); }
.notif-item__msg { font-size: 0.85rem; color: var(--gray-600); margin-top: 3px; }
.notif-item__time { font-size: 0.78rem; color: var(--gray-400); margin-top: 5px; display: block; }
.notif-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--red-600); color: var(--white);
  border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 700;
}

/* ── Utilities ── */
.mt-1 { margin-top: 4px; }  .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; } .mb-4 { margin-bottom: 24px; }
.ml-2 { margin-left: 8px; }
.py-5 { padding-top: 48px; padding-bottom: 48px; }
.mx-4 { margin-left: 16px; margin-right: 16px; }
.mt-4 { margin-top: 16px; }
.d-none { display: none !important; }
.text-muted  { color: var(--gray-500); font-size: 0.87rem; }
.text-success { color: var(--green-700); }
.text-danger  { color: var(--red-600); }
.page-title { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; line-height: 0.94; color: var(--gray-900); margin-bottom: 24px; }

.animal-card__cta i {
  transition: transform 180ms ease;
}

.animal-card:hover .animal-card__cta i {
  transform: translateX(4px);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 255, 0.28);
  outline-offset: 2px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .animals-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .env-chip {
    right: 10px;
    bottom: 10px;
    padding: 6px 10px;
    font-size: 0.67rem;
  }
}

@media (max-width: 520px) {
  .animals-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 1.65rem; }
  .error-card { padding: 28px 16px; }
  .error-card__code { font-size: 1.8rem; }
  .error-card__title { font-size: 1.5rem; }
}

/* ── Refinamiento transversal de interacción y accesibilidad ── */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--primary-600);
  outline-offset: 3px;
}

.form-control,
.form-group input,
.form-group select,
.form-group textarea {
  min-height: 44px;
  border-radius: var(--radius-md);
}

.form-control:hover,
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--gray-400);
}

.form-control:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-700);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.btn,
.badge,
.alert,
.form-card,
.dashboard-card {
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Identidad visual compartida: web, paneles y app instalada ── */
html {
  color-scheme: light;
  scroll-padding-top: 76px;
}

body {
  color: var(--gray-800);
  background: #f7f7f2;
  font-size: 0.96rem;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--gray-900);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-transform: none;
}

p { line-height: 1.65; }

.btn {
  min-height: 40px;
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn--primary,
.btn--primary:hover {
  background: var(--primary-800);
  color: #fff;
}

.btn--primary { box-shadow: 0 2px 5px rgba(32, 61, 49, 0.16); }
.btn--primary:hover { background: var(--primary-900); box-shadow: 0 4px 10px rgba(32, 61, 49, 0.18); transform: translateY(-1px); }
.btn--outline { color: var(--primary-800); border-color: var(--primary-700); }
.btn--outline:hover { color: var(--primary-900); border-color: var(--primary-800); background: var(--primary-100); }
.btn--danger, .btn--success, .btn--info { box-shadow: none; }
.btn--danger:hover, .btn--success:hover, .btn--info:hover { transform: translateY(-1px); box-shadow: none; }
.btn--lg { min-height: 48px; border-radius: 8px; }
.btn--xs { min-height: 32px; }

.form-control,
.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid var(--gray-300);
  border-radius: 7px;
  background-color: #fff;
  color: var(--gray-900);
  font-size: 0.94rem;
}

.form-control:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-700);
  box-shadow: 0 0 0 3px rgba(58, 106, 79, 0.14);
}

.table-wrap {
  border-color: var(--gray-200);
  border-radius: 9px;
}

.table thead th {
  background: #f3f5f0;
  color: var(--gray-700);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.table tbody tr:hover { background: #f8f9f5; }

.card,
.form-card,
.dashboard-card,
.admin-card,
.filters-panel,
.auth-form {
  box-shadow: var(--shadow-sm);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline-color: rgba(58, 106, 79, 0.55);
}

@media (max-width: 640px) {
  body { font-size: 0.94rem; }
  .btn { min-height: 44px; }
  .btn--xs { min-height: 36px; }
}
