/* =============================================
   IMPORTS
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&family=Azeret+Mono:wght@300;400;500&display=swap');

/* =============================================
   VARIABLES — LIGHT PASTEL RETRO PIXEL
   ============================================= */
:root {
  /* PALETA PRIMARIA: Rosa, Azul, Violeta, Amarillo */
  --primary-pink:    #FF6BDE;
  --primary-blue:    #5DADE2;
  --primary-violet:  #9B59B6;
  --primary-yellow:  #F9D56E;
  --primary-orange:  #E68455;

  /* FONDOS — Light Mode Pastel */
  --bg:             #FAF7F5;    /* Crema casi-blanco */
  --bg-card:        #EFE8E0;    /* Beige claro */
  --bg-card-2:      #E8DFD7;    /* Beige más oscuro */
  --bg-input:       #E0D4C8;    /* Beige input */
  --bg-subtle:      #F5F0EC;    /* Sutilísimo highlight */

  /* BORDES 3D */
  --shadow-outer:   #C9A999;    /* Marrón claro (sombra externa) */
  --shadow-inner:   #FFFFFF;    /* Blanco (highlight interno) */
  --highlight:      #FFFBF8;    /* Blanco con matiz */

  /* PALETA COLORES (con variantes) */
  --pink:           #FF6BDE;
  --pink-light:     #FFB3E6;
  --pink-dim:       #E551C7;
  --pink-glow:      rgba(255, 107, 222, 0.2);

  --blue:           #5DADE2;
  --blue-light:     #8BC5E8;
  --blue-dim:       #4096C7;
  --blue-glow:      rgba(93, 173, 226, 0.2);

  --violet:         #9B59B6;
  --violet-light:   #B88FCC;
  --violet-dim:     #7D3FA0;
  --violet-glow:    rgba(155, 89, 182, 0.2);

  --yellow:         #F9D56E;
  --yellow-light:   #FCEAA8;
  --yellow-dim:     #F0C941;
  --yellow-glow:    rgba(249, 213, 110, 0.2);

  --orange:         #E68455;
  --orange-light:   #EFB089;
  --orange-dim:     #D96C3E;
  --orange-glow:    rgba(230, 132, 85, 0.2);

  /* TEXTOS */
  --text:           #2C1E2E;    /* Marrón muy oscuro */
  --text-dim:       #5C4E5D;    /* Gris-marrón */
  --text-muted:     #8B7E8C;    /* Gris-marrón más claro */
  --text-disabled:  #B5ADB3;    /* Gris-marrón deshabilitado */

  /* OLED (emotion preview) */
  --oled-bg:        #000000;
  --oled-pixel:     #E0E0E0;
  --oled-border:    #5DADE2;
  --oled-glow:      rgba(93, 173, 226, 0.3);

  /* BORDES Y SEPARADORES */
  --border:         rgba(155, 89, 182, 0.12);
  --border-hover:   rgba(155, 89, 182, 0.25);

  /* ESTADOS */
  --success:        #4CAF50;
  --error:          #E74C3C;
  --warning:        #F39C12;

  /* RADIUS */
  --radius:         18px;
  --radius-sm:      10px;
  --radius-xs:      6px;

  /* TIPOGRAFÍA */
  --font-pixel:     'Silkscreen', monospace;
  --font-body:      'Azeret Mono', monospace;

  /* TRANSICIONES */
  --transition:     0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background: linear-gradient(135deg, var(--bg) 0%, #F5F0EC 50%, var(--bg) 100%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;

  background-attachment: fixed;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
}

.hidden { display: none !important; }

a       { color: var(--violet); text-decoration: none; }
img     { display: block; max-width: 100%; }
button  { cursor: pointer; font-family: var(--font-body); }
input, textarea { font-family: var(--font-body); }

/* =============================================
   LOADING / DENIED SCREENS
   ============================================= */
.screen-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  gap: 1.5rem;
  text-align: center;
  padding: 2rem;
}

.screen-center .pixel-title {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--primary-violet);
  letter-spacing: 0.05em;
}

.loader {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary-violet);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   LAYOUT PRINCIPAL
   ============================================= */
#app {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* =============================================
   NAVEGACIÓN: TABS
   ============================================= */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 245, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.75rem 0;
  border-bottom: 2px solid var(--shadow-outer);
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 2px solid var(--shadow-outer);
  border-right-color: var(--shadow-inner);
  border-bottom-color: var(--shadow-inner);
  border-radius: 50px;
  padding: 4px;
  box-shadow: 
    inset 1px 1px 0 rgba(255,255,255,0.8),
    2px 2px 4px rgba(0, 0, 0, 0.1);
}

.tab {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 50px;
  background: transparent;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  text-transform: lowercase;
}

.tab.active {
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-orange) 100%);
  color: white;
  box-shadow: 
    0 2px 8px var(--pink-glow),
    inset 1px 1px 0 rgba(255,255,255,0.3),
    inset -1px -1px 0 rgba(0,0,0,0.2);
  transform: translateY(-1px);
  animation: tabSlideIn 0.3s ease-out;
}

.tab:hover:not(.active) {
  color: var(--text-dim);
  background: rgba(155,89,182,0.05);
  transform: translateY(-1px);
}

@keyframes tabSlideIn {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(-1px);
  }
}

.btn-push-nav {
  font-size: 1rem;
  background: var(--bg-card);
  border: 2px solid var(--shadow-outer);
  border-right-color: var(--shadow-inner);
  border-bottom-color: var(--shadow-inner);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
  box-shadow: 
    inset 1px 1px 0 rgba(255,255,255,0.5),
    2px 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-push-nav:hover {
  color: var(--primary-pink);
  transform: translateY(-1px);
}

.btn-push-nav:active {
  transform: translateY(1px);
  box-shadow: 
    inset 1px 1px 0 rgba(255,255,255,0.5),
    inset 0 0 4px rgba(0, 0, 0, 0.1);
}

.btn-push-nav.active {
  border-color: var(--primary-pink);
  color: var(--primary-pink);
  box-shadow: 
    inset 1px 1px 0 rgba(255,255,255,0.8),
    0 0 12px var(--pink-glow);
}

/* =============================================
   VISTA ACTUAL — GRID DE USUARIOS
   ============================================= */
.users-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: start;
}

.user-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.user-label {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  text-align: center;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

/* =============================================
   TARJETA DE EMOCIÓN (OLED preview)
   ============================================= */
.emotion-card {
  position: relative;
}

.emotion-card::before {
  content: '';
  position: absolute;
  inset: -8px;
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-orange) 100%);
  border-radius: 12px;
  border: 3px solid;
  border-top-color: var(--highlight);
  border-left-color: var(--highlight);
  border-right-color: var(--shadow-outer);
  border-bottom-color: var(--shadow-outer);
  box-shadow: 
    5px 5px 15px rgba(0, 0, 0, 0.15),
    inset 1px 1px 0 rgba(255, 255, 255, 0.4),
    inset -2px -2px 0 rgba(0, 0, 0, 0.1);
  z-index: -1;
}

.oled-preview {
  background: var(--oled-bg);
  border: 3px solid var(--oled-border);
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 0 12px var(--oled-glow),
    inset 0 0 16px rgba(0, 0, 0, 0.8),
    inset 1px 1px 0 rgba(255, 255, 255, 0.2);
  aspect-ratio: 2 / 1;
  overflow: hidden;
  position: relative;
  image-rendering: pixelated;
}

.oled-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 1px,
    rgba(0, 0, 0, 0.15) 1px,
    rgba(0, 0, 0, 0.15) 2px
  );
  pointer-events: none;
  z-index: 1;
}

.oled-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.oled-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.05em;
}

.btn-edit {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--primary-orange);
  background: linear-gradient(135deg, #E68455 0%, #D96C3E 100%);
  color: white;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 2;
  box-shadow: 
    2px 2px 6px rgba(0, 0, 0, 0.2),
    inset 1px 1px 0 rgba(255, 255, 255, 0.4),
    inset -1px -1px 0 rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.btn-edit:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 
    4px 4px 8px rgba(0, 0, 0, 0.2),
    inset 1px 1px 0 rgba(255, 255, 255, 0.5),
    inset -1px -1px 0 rgba(0, 0, 0, 0.1);
}

.btn-edit:active {
  transform: scale(0.95) translateY(1px);
  box-shadow: 
    1px 1px 4px rgba(0, 0, 0, 0.2),
    inset 1px 1px 0 rgba(255, 255, 255, 0.3),
    inset -1px -1px 0 rgba(0, 0, 0, 0.3);
}

/* =============================================
   TARJETA DE MENSAJE
   ============================================= */
.message-card {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--blue-dim) 100%);
  border: 3px solid;
  border-top-color: var(--highlight);
  border-left-color: var(--highlight);
  border-right-color: var(--shadow-outer);
  border-bottom-color: var(--shadow-outer);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  transition: var(--transition);
  box-shadow: 
    4px 4px 12px rgba(0, 0, 0, 0.1),
    inset 1px 1px 0 rgba(255, 255, 255, 0.3);
  transform: rotate(-0.5deg);
}

.message-card:has(.btn-edit:not(.hidden)) {
  padding-right: 2.5rem;
}

.message-text {
  font-size: 0.8rem;
  color: white;
  word-break: break-word;
  flex: 1;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.message-text.empty {
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  font-weight: 400;
}

/* =============================================
   CENTRO: CONTADORES
   ============================================= */
.counters-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.counter-display {
  background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--orange) 100%);
  border: 3px solid;
  border-top-color: var(--highlight);
  border-left-color: var(--highlight);
  border-right-color: #A65A2F;
  border-bottom-color: #A65A2F;
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  text-align: center;
  min-width: 120px;
  box-shadow: 
    6px 6px 16px rgba(0, 0, 0, 0.15),
    inset 1px 1px 0 rgba(255, 255, 255, 0.4),
    inset -2px -2px 0 rgba(0, 0, 0, 0.15);
  position: relative;
  transform: perspective(500px) rotateX(2deg);
}

.counter-display .count-label {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.counter-nums {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.count-val  { color: white; font-weight: bold; }
.count-sep  { color: rgba(255, 255, 255, 0.9); margin: 0 0.3rem; font-size: 0.7rem; }

.counter-btns {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.btn-counter {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  letter-spacing: 0.05em;
  padding: 0.6rem 0.85rem;
  border-radius: 50px;
  border: 3px solid;
  background: linear-gradient(135deg, transparent, transparent);
  transition: var(--transition-bounce);
  white-space: nowrap;
  text-transform: uppercase;
  font-weight: bold;
  box-shadow: 
    4px 4px 10px rgba(0, 0, 0, 0.15),
    inset 1px 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  cursor: pointer;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-counter:nth-child(1) {
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--pink-dim) 100%);
  border-color: var(--shadow-outer);
  border-right-color: var(--highlight);
  border-bottom-color: var(--highlight);
  color: white;
}

.btn-counter:nth-child(2) {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--blue-dim) 100%);
  border-color: var(--shadow-outer);
  border-right-color: var(--highlight);
  border-bottom-color: var(--highlight);
  color: white;
}

.btn-counter:hover {
  transform: translateY(-3px);
  box-shadow: 
    6px 6px 14px rgba(0, 0, 0, 0.2),
    inset 1px 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-counter:active {
  transform: translateY(1px);
  box-shadow: 
    2px 2px 6px rgba(0, 0, 0, 0.15),
    inset 1px 1px 0 rgba(255, 255, 255, 0.2),
    inset -1px -1px 0 rgba(0, 0, 0, 0.2);
}

.btn-counter:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* =============================================
   SECCIÓN MASCOTA
   ============================================= */
.pet-section {
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-violet) 100%);
  border: 6px solid;
  border-top-color: var(--highlight);
  border-left-color: var(--highlight);
  border-right-color: #8B3A8B;
  border-bottom-color: #8B3A8B;
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 
    8px 8px 24px rgba(0, 0, 0, 0.2),
    inset 2px 2px 0 rgba(255, 255, 255, 0.3),
    inset -4px -4px 0 rgba(0, 0, 0, 0.2);
}

.pet-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 100%, rgba(135, 195, 255, 0.3), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.pet-section > * {
  position: relative;
  z-index: 1;
}

.pet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.pet-name {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: white;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  font-weight: bold;
}

.btn-pet-actions {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transition: var(--transition-bounce);
  text-transform: uppercase;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 
    2px 2px 6px rgba(0, 0, 0, 0.2),
    inset 1px 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-pet-actions:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 
    4px 4px 10px rgba(0, 0, 0, 0.2),
    inset 1px 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-pet-actions:active {
  transform: translateY(1px);
  box-shadow: 
    1px 1px 4px rgba(0, 0, 0, 0.2),
    inset 1px 1px 0 rgba(255, 255, 255, 0.2),
    inset -1px -1px 0 rgba(0, 0, 0, 0.2);
}

/* =============================================
   ANIMACIÓN DE MASCOTA
   ============================================= */
.pet-stage {
  position: relative;
  height: 120px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: linear-gradient(180deg, #87C3FF 0%, #B3E5FC 100%);
  border-radius: 12px;
  border: 3px solid;
  border-top-color: rgba(255, 255, 255, 0.6);
  border-left-color: rgba(255, 255, 255, 0.6);
  border-right-color: rgba(100, 150, 200, 0.4);
  border-bottom-color: rgba(100, 150, 200, 0.4);
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.4),
    inset -2px -2px 0 rgba(0, 0, 0, 0.1);
}

.pet-sprite-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 100px;
  animation: petWalk 12s linear infinite;
  will-change: left, transform;
  animation: petWalkNew 10s linear infinite;
}

.pet-sprite-wrap.pet-dead {
  animation: none;
  left: 50% !important;
  transform: translateX(-50%);
  opacity: 0.4;
  filter: grayscale(1);
}

.pet-sprite-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

.pet-emoji-placeholder {
  font-size: 4rem;
  line-height: 100px;
  text-align: center;
}

@keyframes petWalk {
  0%   { left: 0;                  transform: scaleX(1);  }
  47%  { left: calc(100% - 100px); transform: scaleX(1);  }
  50%  { left: calc(100% - 100px); transform: scaleX(-1); }
  97%  { left: 0;                  transform: scaleX(-1); }
  100% { left: 0;                  transform: scaleX(1);  }
}

@keyframes petWalkNew {
  0%   { left: 0;                  transform: scaleX(1) translateY(0);  }
  45%  { left: calc(100% - 100px); transform: scaleX(1) translateY(-2px);  }
  50%  { left: calc(100% - 100px); transform: scaleX(-1) translateY(-2px); }
  95%  { left: 0;                  transform: scaleX(-1) translateY(0); }
  100% { left: 0;                  transform: scaleX(1) translateY(0);  }
}

/* Info de barras */
.pet-info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.bar-row .bar-icon { 
  width: 1.2rem; 
  text-align: center; 
  font-size: 1rem;
}

.bar-track {
  flex: 1;
  height: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.15);
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.4);
}

.bar-fill.hunger    { 
  background: linear-gradient(90deg, #FF6B6B 0%, #FF9999 100%);
  animation: barPulse 1.5s ease-in-out infinite;
}

.bar-fill.happiness { 
  background: linear-gradient(90deg, #FF6BDE 0%, #FFB3E6 100%);
  animation: barPulse 1.5s ease-in-out infinite;
}

.bar-fill.critical {
  animation: criticalPulse 1.2s ease-in-out infinite;
}

@keyframes criticalPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px rgba(255, 107, 107, 0.6); }
  50%      { opacity: 0.5; box-shadow: 0 0 8px rgba(255, 107, 107, 1); }
}

@keyframes barPulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.1); }
}

.bar-val {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  min-width: 3rem;
  text-align: right;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: bold;
}

.pet-days {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  margin-top: 0.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 600;
}

.pet-dead-msg {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  padding: 0.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* =============================================
   VISTA HISTORIAL
   ============================================= */
.historial-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.week-label {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--primary-violet);
  flex: 1;
  text-align: center;
  letter-spacing: 0.1em;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-week {
  background: var(--bg-card);
  border: 2px solid var(--shadow-outer);
  border-right-color: var(--shadow-inner);
  border-bottom-color: var(--shadow-inner);
  border-radius: var(--radius-xs);
  color: var(--text-dim);
  width: 36px;
  height: 36px;
  font-size: 1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.4),
    2px 2px 4px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.btn-week:hover {
  border-color: var(--primary-violet);
  color: var(--primary-violet);
  transform: translateY(-1px);
}

.btn-week:active {
  transform: translateY(1px);
}

.btn-user-toggle {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 2px solid var(--primary-blue);
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--blue-dim) 100%);
  color: white;
  transition: var(--transition-bounce);
  box-shadow: 
    4px 4px 10px rgba(0, 0, 0, 0.1),
    inset 1px 1px 0 rgba(255, 255, 255, 0.3);
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
}

.btn-user-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 
    6px 6px 12px rgba(0, 0, 0, 0.15),
    inset 1px 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-user-toggle:active {
  transform: translateY(1px);
}

.historial-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.25rem;
  align-items: start;
}

/* Stats box */
.stats-box {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-subtle) 100%);
  border: 2px solid var(--shadow-outer);
  border-right-color: var(--shadow-inner);
  border-bottom-color: var(--shadow-inner);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 
    4px 4px 10px rgba(0, 0, 0, 0.08),
    inset 1px 1px 0 rgba(255, 255, 255, 0.4);
}

/* Etiqueta dinámica del mes en stats */
.stats-month-label {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
  text-align: right;
  font-weight: bold;
}

.stats-box .stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.stats-box .stat-row:last-child { border-bottom: none; }

.stats-box .stat-val {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--primary-pink);
  font-weight: bold;
}

/* Calendario semanal */
.calendar-grid {
  background: var(--bg-card);
  border: 2px solid var(--shadow-outer);
  border-right-color: var(--shadow-inner);
  border-bottom-color: var(--shadow-inner);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 
    4px 4px 10px rgba(0, 0, 0, 0.08),
    inset 1px 1px 0 rgba(255, 255, 255, 0.4);
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}

.cal-day-header {
  font-family: var(--font-pixel);
  font-size: 0.35rem;
  letter-spacing: 0.1em;
  color: white;
  text-align: center;
  padding: 0.6rem 0.25rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  font-weight: bold;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--blue-dim) 100%);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.cal-day {
  min-height: 80px;
  padding: 0.4rem;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: white;
}

.cal-day:nth-child(7n) { border-right: none; }
.cal-day.today {
  background: linear-gradient(135deg, #F9D56E 0%, #FFE5A0 100%);
  box-shadow: inset 0 0 8px rgba(249, 213, 110, 0.3);
}

.cal-day-num {
  font-family: var(--font-pixel);
  font-size: 0.35rem;
  color: var(--text-muted);
  margin-bottom: 2px;
  font-weight: bold;
}

.cal-thumb {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  background: var(--oled-bg);
  border-radius: 3px;
  image-rendering: pixelated;
  border: 2px solid rgba(93, 173, 226, 0.3);
  cursor: zoom-in;
  transition: var(--transition);
}

.cal-thumb:hover {
  border-color: var(--oled-border);
  box-shadow: 0 0 8px var(--oled-glow);
}

/* Historial de mascotas */
.pet-history-box {
  background: var(--bg-card);
  border: 2px solid var(--shadow-outer);
  border-right-color: var(--shadow-inner);
  border-bottom-color: var(--shadow-inner);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 
    4px 4px 10px rgba(0, 0, 0, 0.08),
    inset 1px 1px 0 rgba(255, 255, 255, 0.4);
}

.pet-history-title {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: white;
  letter-spacing: 0.1em;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, var(--primary-violet) 0%, var(--violet-dim) 100%);
  text-transform: uppercase;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.pet-history-list {
  display: flex;
  flex-direction: column;
}

.pet-history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.pet-history-item:last-child { border-bottom: none; }
.pet-history-item:hover {
  background: linear-gradient(135deg, var(--bg-subtle) 0%, var(--bg-card) 100%);
}

.pet-hist-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: var(--oled-bg);
  border-radius: 4px;
  image-rendering: pixelated;
  flex-shrink: 0;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.pet-hist-info { flex: 1; }

.pet-hist-name {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--text);
  display: block;
  font-weight: bold;
}

.pet-hist-dates {
  font-size: 0.65rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.15rem;
}

.pet-hist-days {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--violet);
}

/* =============================================
   MODALES
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(250, 247, 245, 0.8) 0%, rgba(240, 230, 220, 0.9) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-subtle) 100%);
  border: 3px solid;
  border-top-color: var(--highlight);
  border-left-color: var(--highlight);
  border-right-color: var(--shadow-outer);
  border-bottom-color: var(--shadow-outer);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow:
    8px 8px 24px rgba(0, 0, 0, 0.15),
    inset 1px 1px 0 rgba(255, 255, 255, 0.4);
  animation: slideUp 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUp {
  from { 
    transform: translateY(30px) scale(0.95); 
    opacity: 0; 
  }
  to { 
    transform: translateY(0) scale(1); 
    opacity: 1; 
  }
}

.modal-title {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--primary-violet);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--pink-dim) 100%);
  border: 2px solid var(--shadow-outer);
  border-right-color: var(--highlight);
  border-bottom-color: var(--highlight);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: white;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 
    2px 2px 6px rgba(0, 0, 0, 0.1),
    inset 1px 1px 0 rgba(255, 255, 255, 0.3);
  cursor: pointer;
  font-weight: bold;
}

.btn-close-modal:hover {
  transform: scale(1.1) rotate(-90deg);
  box-shadow: 
    4px 4px 8px rgba(0, 0, 0, 0.15),
    inset 1px 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-close-modal:active {
  transform: scale(0.95) rotate(-90deg);
}

/* Modal imagen — preview grande */
.oled-preview-lg {
  background: var(--oled-bg);
  border: 2px solid var(--oled-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 20px var(--oled-glow);
  width: 100%;
  aspect-ratio: 2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 1rem;
  image-rendering: pixelated;
  position: relative;
}

.oled-preview-lg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 1px,
    rgba(0, 0, 0, 0.15) 1px,
    rgba(0, 0, 0, 0.15) 2px
  );
  pointer-events: none;
}

.preview-placeholder {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: rgba(255,255,255,0.15);
  text-align: center;
  padding: 1rem;
  letter-spacing: 0.05em;
}

#preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.btn-file-label {
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 0.7rem 1.2rem;
  border-radius: 50px;
  border: 2px dashed var(--primary-violet);
  color: var(--primary-violet);
  cursor: pointer;
  transition: var(--transition-bounce);
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.05) 0%, rgba(155, 89, 182, 0.02) 100%);
  font-weight: bold;
  text-transform: uppercase;
}

.btn-file-label:hover {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.15) 0%, rgba(155, 89, 182, 0.08) 100%);
  transform: scale(1.02);
  border-color: var(--primary-violet);
}

.file-name-display {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.75rem;
  word-break: break-all;
  background: rgba(0, 0, 0, 0.02);
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.btn-confirm {
  flex: 1;
  padding: 0.7rem 1.2rem;
  border-radius: 50px;
  border: 2px solid;
  border-color: var(--shadow-outer);
  border-right-color: var(--highlight);
  border-bottom-color: var(--highlight);
  background: linear-gradient(135deg, var(--primary-violet) 0%, var(--violet-dim) 100%);
  color: white;
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  letter-spacing: 0.05em;
  transition: var(--transition-bounce);
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 
    4px 4px 10px rgba(0, 0, 0, 0.1),
    inset 1px 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 
    6px 6px 12px rgba(0, 0, 0, 0.15),
    inset 1px 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-confirm:active {
  transform: translateY(1px);
  box-shadow: 
    2px 2px 6px rgba(0, 0, 0, 0.1),
    inset 1px 1px 0 rgba(255, 255, 255, 0.15),
    inset -1px -1px 0 rgba(0, 0, 0, 0.15);
}

.btn-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-discard {
  padding: 0.7rem 1.2rem;
  border-radius: 50px;
  border: 2px solid var(--shadow-outer);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  letter-spacing: 0.05em;
  transition: var(--transition);
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 
    2px 2px 6px rgba(0, 0, 0, 0.08),
    inset 1px 1px 0 rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.btn-discard:hover {
  border-color: var(--text);
  color: var(--text);
  background: var(--bg-card);
  transform: translateY(-1px);
}

.btn-discard:active {
  transform: translateY(1px);
}

/* =============================================
   MODAL MASCOTA — acciones y crear nueva
   ============================================= */
.pet-action-btns {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.btn-pet-action {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 2px solid;
  border-color: var(--shadow-outer);
  border-right-color: var(--highlight);
  border-bottom-color: var(--highlight);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-subtle) 100%);
  color: var(--text);
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
  font-weight: bold;
  transition: var(--transition-bounce);
  box-shadow: 
    3px 3px 8px rgba(0, 0, 0, 0.08),
    inset 1px 1px 0 rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.btn-pet-action:hover {
  border-color: var(--primary-violet);
  border-right-color: var(--highlight);
  border-bottom-color: var(--highlight);
  color: var(--primary-violet);
  transform: translateY(-1px);
  box-shadow: 
    4px 4px 10px rgba(0, 0, 0, 0.12),
    inset 1px 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-pet-action:active {
  transform: translateY(1px);
  box-shadow: 
    1px 1px 4px rgba(0, 0, 0, 0.08),
    inset 1px 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-pet-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.create-pet-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.form-label {
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  font-weight: bold;
}

.form-input {
  width: 100%;
  background: linear-gradient(135deg, var(--bg-input) 0%, var(--bg-subtle) 100%);
  border: 2px solid;
  border-top-color: var(--highlight);
  border-left-color: var(--highlight);
  border-right-color: var(--shadow-outer);
  border-bottom-color: var(--shadow-outer);
  border-radius: var(--radius-xs);
  color: var(--text);
  padding: 0.7rem 0.8rem;
  font-size: 0.8rem;
  transition: var(--transition);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.3);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-violet);
  border-right-color: var(--highlight);
  border-bottom-color: var(--highlight);
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 3px rgba(155, 89, 182, 0.2);
}

/* =============================================
   MODAL MENSAJE
   ============================================= */
.msg-textarea {
  width: 100%;
  background: linear-gradient(135deg, var(--bg-input) 0%, var(--bg-subtle) 100%);
  border: 2px solid;
  border-top-color: var(--highlight);
  border-left-color: var(--highlight);
  border-right-color: var(--shadow-outer);
  border-bottom-color: var(--shadow-outer);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.8rem;
  font-size: 0.85rem;
  resize: vertical;
  min-height: 90px;
  margin-bottom: 0.75rem;
  line-height: 1.5;
  transition: var(--transition);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.3);
  font-family: var(--font-body);
}

.msg-textarea:focus {
  outline: none;
  border-color: var(--primary-violet);
  border-right-color: var(--highlight);
  border-bottom-color: var(--highlight);
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 3px rgba(155, 89, 182, 0.2);
}

.char-count {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(250, 247, 245, 0.95) 0%, rgba(240, 220, 200, 0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  cursor: zoom-out;
  animation: fadeIn 0.15s ease;
  backdrop-filter: blur(4px);
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  image-rendering: pixelated;
  border: 4px solid;
  border-top-color: var(--highlight);
  border-left-color: var(--highlight);
  border-right-color: var(--shadow-outer);
  border-bottom-color: var(--shadow-outer);
  border-radius: var(--radius-sm);
  box-shadow: 
    0 0 40px rgba(93, 173, 226, 0.4),
    8px 8px 32px rgba(0, 0, 0, 0.2),
    inset 1px 1px 0 rgba(255, 255, 255, 0.3);
  background: white;
  padding: 8px;
}

/* =============================================
   TOAST
   ============================================= */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-subtle) 100%);
  border: 2px solid;
  border-top-color: var(--highlight);
  border-left-color: var(--highlight);
  border-right-color: var(--shadow-outer);
  border-bottom-color: var(--shadow-outer);
  border-radius: 50px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  letter-spacing: 0.05em;
  color: var(--text);
  z-index: 999;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  box-shadow: 
    4px 4px 12px rgba(0, 0, 0, 0.15),
    inset 1px 1px 0 rgba(255, 255, 255, 0.3);
  font-weight: bold;
  text-transform: uppercase;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
}

.toast.success { 
  border-top-color: rgba(255, 255, 255, 0.5);
  border-left-color: rgba(255, 255, 255, 0.5);
  color: #4CAF50;
  background: linear-gradient(135deg, #F0F8F0 0%, #E8F5E8 100%);
}

.toast.error { 
  border-top-color: rgba(255, 255, 255, 0.5);
  border-left-color: rgba(255, 255, 255, 0.5);
  color: #E74C3C;
  background: linear-gradient(135deg, #FFF5F5 0%, #FFEDEB 100%);
}

/* =============================================
   EXPORT BUTTON
   ============================================= */
.btn-export {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.9rem;
  border-radius: 50px;
  border: 2px solid;
  border-color: var(--shadow-outer);
  border-right-color: var(--highlight);
  border-bottom-color: var(--highlight);
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--blue-dim) 100%);
  color: white;
  transition: var(--transition);
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 
    2px 2px 6px rgba(0, 0, 0, 0.1),
    inset 1px 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.btn-export:hover {
  transform: translateY(-1px);
  box-shadow: 
    4px 4px 8px rgba(0, 0, 0, 0.15),
    inset 1px 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-export:active {
  transform: translateY(1px);
  box-shadow: 
    1px 1px 4px rgba(0, 0, 0, 0.1),
    inset 1px 1px 0 rgba(255, 255, 255, 0.15);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 640px) {
  .users-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .counters-center {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    order: -1;
  }

  .historial-layout {
    grid-template-columns: 1fr;
  }

  .modal-box {
    max-width: 100%;
    margin: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .modal-overlay {
    align-items: flex-end;
  }
}