/* ========================================================
   FAMILYHUB - CSS MODERNO Y RESPONSIVO (1280x800 KIOSK & MOBILE)
   ======================================================== */

:root {
  --bg-main: #0a0f1d;
  --bg-card: rgba(19, 27, 46, 0.85);
  --bg-card-hover: rgba(28, 38, 64, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.2);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --color-primary: #38bdf8;
  --color-accent: #818cf8;
  --color-gold: #f59e0b;
  --color-gold-light: #fef3c7;
  --color-green: #10b981;
  --color-red: #ef4444;
  --color-purple: #a855f7;

  --member-father: #3b82f6;
  --member-mother: #ec4899;
  --member-kid1: #10b981;
  --member-kid2: #f59e0b;
  --member-soto: #0284c7;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;

  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.25);
  --font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

input, textarea, select {
  user-select: text;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(129, 140, 248, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.04) 0%, transparent 50%);
}

/* Scrollbars sutiles */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hidden {
  display: none !important;
}

/* ========================================================
   MODO NOCHE OVERLAY
   ======================================================== */
.night-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.5s ease;
}

.night-clock {
  text-align: center;
  color: #334155;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.05));
}

.night-time {
  font-size: 6rem;
  font-weight: 800;
  letter-spacing: -2px;
  color: #475569;
}

.night-date {
  font-size: 1.5rem;
  margin-top: 0.5rem;
  color: #334155;
}

.night-hint {
  font-size: 0.9rem;
  margin-top: 2rem;
  color: #1e293b;
}

/* ========================================================
   ALARMA A CENAR BANNER FULLSCREEN
   ======================================================== */
.alarm-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(239, 68, 68, 0.95);
  backdrop-filter: blur(16px);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseAlarm 1.5s infinite;
}

@keyframes pulseAlarm {
  0%, 100% { background: rgba(239, 68, 68, 0.95); transform: scale(1); }
  50% { background: rgba(220, 38, 38, 0.98); transform: scale(1.01); }
}

.alarm-content {
  text-align: center;
  color: white;
  padding: 2.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-lg);
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  max-width: 500px;
  width: 90%;
}

.alarm-icon {
  font-size: 5rem;
  animation: ringBell 0.8s ease infinite alternate;
}

@keyframes ringBell {
  0% { transform: rotate(-15deg); }
  100% { transform: rotate(15deg); }
}

.alarm-text h2 {
  font-size: 3rem;
  font-weight: 800;
  margin: 1rem 0 0.5rem;
  letter-spacing: 1px;
}

.alarm-text p {
  font-size: 1.3rem;
  color: #fee2e2;
  margin-bottom: 2rem;
}

.alarm-close-btn {
  background: white;
  color: #b91c1c;
  font-size: 1.5rem;
  font-weight: 800;
  padding: 1rem 3rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.alarm-close-btn:active {
  transform: scale(0.95);
}

/* ========================================================
   CONTENEDOR PRINCIPAL & ESTRUCTURA
   ======================================================== */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  width: 100vw;
  padding: 10px 14px 10px 14px;
  gap: 10px;
  overflow: hidden;
}

/* ========================================================
   CABECERA SUPERIOR
   ======================================================== */
.top-header {
  position: relative;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 16px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.location-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.clock-block {
  display: flex;
  align-items: baseline;
}

.clock-time {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -1px;
}

.clock-seconds {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 2px;
}

.clock-date {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  border-left: 1px solid var(--border-glass);
  padding-left: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.clock-date:hover {
  color: var(--color-primary);
}

/* WIDGET CLIMA */
.weather-card {
  position: relative;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.weather-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.weather-current {
  display: flex;
  align-items: center;
  gap: 10px;
}

.weather-icon {
  font-size: 2rem;
}

.temp-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.weather-temp {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.weather-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.weather-details {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.weather-details b {
  color: var(--text-muted);
}

.forecast-toggle-hint {
  color: var(--color-primary);
  font-weight: 600;
}

/* Desplegable 7 días Clima */
/* Desplegable Clima (Horas + 7 días) */
.weather-week {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #090e1a;
  border: 2px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 580px;
  max-width: 92vw;
}

.weather-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.weather-popup-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #38bdf8;
}

.weather-popup-close {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.weather-popup-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.weather-section-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.weather-hourly-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px 2px;
  scrollbar-width: thin;
}

.hourly-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 52px;
  padding: 6px 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  text-align: center;
  flex-shrink: 0;
}

.hourly-item.current {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
}

.hourly-time {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hourly-item.current .hourly-time {
  color: #38bdf8;
  font-weight: 700;
}

.hourly-icon {
  font-size: 1.25rem;
}

.hourly-temp {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.hourly-rain {
  font-size: 0.68rem;
  color: #38bdf8;
  font-weight: 600;
}

.weather-days-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
}

.forecast-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 54px;
  padding: 6px 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  text-align: center;
}

.forecast-day-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.forecast-day-icon {
  font-size: 1.25rem;
  margin: 2px 0;
}

.forecast-day-temps {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.forecast-day-temps small {
  color: var(--text-dim);
  font-weight: 400;
}

.forecast-day-rain {
  font-size: 0.68rem;
  color: #38bdf8;
  font-weight: 600;
  min-height: 14px;
}

/* HEADER RIGHT ACCIONES */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-pill:active {
  transform: scale(0.96);
}

.icon-only-pill {
  padding: 8px 11px;
  font-size: 1.05rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.icon-only-pill:hover {
  background: rgba(255, 255, 255, 0.16);
}

.icon-only-pill.muted {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.bell-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.bell-btn:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.night-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--border-glass);
}

.night-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.admin-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--border-glass);
}

.admin-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ========================================================
   CUERPO PRINCIPAL (PANTALLAS GRANDES MANEJABLES CON DOCK)
   ======================================================== */
.main-grid {
  display: flex !important;
  flex: 1;
  min-height: 0;
  width: 100%;
  gap: 0;
}

/* TARJETAS CONTENEDORAS DE PANTALLA COMPLETA */
.grid-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 20px;
  width: 100%;
  height: 100%;
  flex: 1;
}

/* Control de pantallas activas */
.main-grid > .grid-card {
  display: none !important;
}

.main-grid[data-mobile-view="calendar"] .calendar-card {
  display: flex !important;
}

.main-grid[data-mobile-view="tasks"] .tasks-card {
  display: flex !important;
}

.main-grid[data-mobile-view="rewards"] .right-panel-card,
.main-grid[data-mobile-view="menu"] .right-panel-card,
.main-grid[data-mobile-view="shopping"] .right-panel-card,
.main-grid[data-mobile-view="photos"] .right-panel-card,
.main-grid[data-mobile-view="more"] .right-panel-card {
  display: flex !important;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.screen-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-shrink: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.screen-action-btn {
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.title-with-icon .icon {
  font-size: 1.5rem;
}

.title-with-icon h2 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #fff;
  white-space: nowrap;
}

.card-btn-add {
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}

.card-btn-add:hover {
  background: rgba(56, 189, 248, 0.25);
}

/* ========================================================
   COLUMNA 1: CALENDARIOS & EVENTOS
   ======================================================== */
.member-pills-bar {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-glass);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.filter-pill.active {
  background: #ffffff;
  color: #0f172a;
  border-color: #ffffff;
  font-weight: 700;
}

.filter-father.active { background: var(--member-father); color: white; border-color: var(--member-father); }
.filter-mother.active { background: var(--member-mother); color: white; border-color: var(--member-mother); }
.filter-kid1.active { background: var(--member-kid1); color: white; border-color: var(--member-kid1); }
.filter-kid2.active { background: var(--member-kid2); color: white; border-color: var(--member-kid2); }
.filter-soto.active { background: var(--member-soto); color: white; border-color: var(--member-soto); }

.events-scroll-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}

.events-day-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.events-day-header {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.events-day-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-glass);
}

.event-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.event-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.event-time-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.07);
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.event-info {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-member-badge {
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.event-delete-btn {
  opacity: 0.4;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
}

.event-item:hover .event-delete-btn {
  opacity: 1;
}

/* ========================================================
   COLUMNA 2: TAREAS & OBJETIVOS (GAMIFICACIÓN)
   ======================================================== */
.member-selector {
  display: flex;
  gap: 6px;
}

.member-tab-btn {
  background: transparent;
  border: 1px solid var(--border-glass);
  font-size: 1.1rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  filter: grayscale(0.5);
  opacity: 0.7;
}

.member-tab-btn.active {
  filter: grayscale(0);
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

.member-progress-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(234, 88, 12, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  flex-shrink: 0;
}

.member-progress-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-avatar-big {
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.1);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-name-role h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.member-name-role span,
.points-label {
  display: none !important;
}

.member-points-box {
  text-align: right;
  display: flex;
  align-items: center;
}

.points-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-gold);
  line-height: 1;
}

.tasks-scroll-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  cursor: pointer;
}

.task-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.task-item.completed {
  opacity: 0.6;
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.2);
}

.task-checkbox-custom {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-active);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-item.completed .task-checkbox-custom {
  background: var(--color-green);
  border-color: var(--color-green);
  color: white;
  transform: scale(1.05);
}

.task-body {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-item.completed .task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-points-pill {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.task-delete-btn {
  opacity: 0.3;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.task-item:hover .task-delete-btn {
  opacity: 1;
}

.card-footer-action {
  margin-top: 8px;
  flex-shrink: 0;
}

/* ========================================================
   COLUMNA 3: PANEL PESTAÑAS (PREMIOS, MENÚ, COMPRA, CÁMARAS, CORCHO)
   ======================================================== */
.right-panel-card {
  display: flex;
  flex-direction: column;
}

.panel-nav-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  margin-bottom: 12px;
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.4) rgba(0, 0, 0, 0.2);
}

.panel-nav-tabs::-webkit-scrollbar {
  height: 4px;
}
.panel-nav-tabs::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.panel-nav-tabs::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 4px;
}
.panel-nav-tabs::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.7);
}

.panel-tab {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.panel-tab.active {
  background: var(--bg-card-hover);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-weight: 700;
}

.tab-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pane-header-info {
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* PREMIOS GRID */
.rewards-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-right: 4px;
}

.reward-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.reward-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.reward-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reward-icon {
  font-size: 1.8rem;
}

.reward-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.reward-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.reward-claim-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
  transition: all 0.15s ease;
}

.reward-claim-btn:active {
  transform: scale(0.95);
}

.reward-claim-btn:disabled {
  background: #334155;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
}

/* MENÚ SEMANAL */
.today-menu-box {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(129, 140, 248, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.menu-meal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.menu-meal-row:last-child {
  margin-bottom: 0;
}

.menu-meal-label {
  font-weight: 700;
  color: var(--color-primary);
  min-width: 65px;
}

.menu-meal-value {
  color: #fff;
  font-weight: 500;
}

.weekly-menu-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.menu-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
}

.menu-day-name {
  font-weight: 700;
  color: var(--text-muted);
  width: 80px;
}

.menu-day-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* LISTA DE LA COMPRA */
.shopping-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.shopping-input-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.shopping-scroll-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.shopping-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.shopping-item.checked {
  opacity: 0.5;
}

.shopping-item.checked .shopping-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.shopping-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid var(--border-active);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: transparent;
}

.shopping-item.checked .shopping-checkbox {
  background: var(--color-green);
  border-color: var(--color-green);
  color: white;
}

.shopping-text {
  flex: 1;
  font-size: 0.85rem;
  color: #fff;
  font-weight: 500;
}

.shopping-category {
  font-size: 0.7rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.shopping-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

.btn-clear-checked {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
}

/* TABLÓN DE ANUNCIOS (CORCHO FAMILIAR) */
.cork-board {
  flex: 1;
  overflow-y: auto;
  background: #2a1f18;
  border: 2px solid #4a382c;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
}

.cork-note {
  position: relative;
  padding: 12px 14px;
  border-radius: 4px;
  color: #1e293b;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.4);
  font-size: 0.85rem;
  line-height: 1.4;
  font-weight: 600;
}

.cork-pin {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
}

.cork-note-author {
  margin-top: 6px;
  font-size: 0.7rem;
  text-align: right;
  font-style: italic;
  opacity: 0.8;
}

.cork-note-delete {
  position: absolute;
  top: 4px;
  right: 6px;
  border: none;
  background: transparent;
  color: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  font-size: 0.8rem;
}

/* CÁMARAS TAPO */
.cameras-grid {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.camera-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.camera-card:hover {
  border-color: var(--color-primary);
}

.camera-preview-wrapper {
  position: relative;
  width: 100%;
  height: 120px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-offline-placeholder {
  color: var(--text-dim);
  font-size: 0.8rem;
  text-align: center;
}

.camera-card-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
}

.camera-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.camera-ip-badge {
  font-size: 0.7rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

/* MODAL CAMARA COMPLETA */
.camera-modal-card {
  background: #0b0f19;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 800px;
  overflow: hidden;
}

.camera-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-glass);
}

.camera-modal-body {
  padding: 16px;
}

.camera-stream-wrapper {
  position: relative;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-full-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.camera-live-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(239, 68, 68, 0.85);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.camera-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 8px;
  text-align: center;
}

/* ========================================================
   MODALES Y POPUPS
   ======================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #111827;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.small-modal {
  max-width: 440px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-glass);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}

.modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.modal-body label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.modal-body input, .modal-body select, .modal-body textarea {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  color-scheme: dark;
}

select option {
  background-color: #0f172a !important;
  color: #ffffff !important;
  padding: 8px 12px;
}

.modal-body input:focus, .modal-body select:focus, .modal-body textarea:focus {
  border-color: var(--color-primary);
}

.row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ADMIN MODAL COMPLETO */
.admin-modal-card {
  background: #0f172a;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 750px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-header-title span {
  font-size: 1.3rem;
}

.admin-section {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}

.admin-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.pin-login-box {
  display: flex;
  gap: 10px;
  max-width: 380px;
  margin: 10px 0;
}

.pin-login-box input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 2px;
}

.login-error {
  color: var(--color-red);
  font-size: 0.85rem;
  margin-top: 8px;
}

.admin-tabs-nav {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.admin-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}

.admin-tab-btn.active {
  background: var(--color-primary);
  color: #0f172a;
  border-color: var(--color-primary);
  font-weight: 700;
}

.admin-tab-pane h4 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 4px;
}

/* REMOTE ACTION GRID */
.remote-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.remote-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.remote-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--color-primary);
}

.remote-btn .icon {
  font-size: 1.8rem;
}

.remote-btn b {
  font-size: 0.88rem;
}

.remote-btn small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.remote-msg-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
}

.remote-msg-box h5 {
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.msg-input-row {
  display: flex;
  gap: 8px;
}

.msg-input-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #fff;
  font-size: 0.85rem;
}

.admin-members-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-member-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-list-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.add-reward-form, .add-camera-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.add-reward-form input, .add-camera-form input {
  flex: 1;
  min-width: 140px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #fff;
  font-size: 0.85rem;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.settings-form input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #fff;
  font-size: 0.85rem;
}

.time-range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========================================================
   BOTONES GENERALES
   ======================================================== */
.btn-primary {
  background: var(--color-primary);
  color: #0f172a;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid var(--border-glass);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.full-width {
  width: 100%;
}

/* CANVAS CONFETI */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9995;
}

/* ========================================================
   RESPONSIVE DESIGN (PARA MÓVILES DE LOS PADRES)
   ======================================================== */
@media (max-width: 900px) {
  body {
    overflow-y: auto;
    height: auto;
  }

  .app-container {
    height: auto;
    min-height: 100vh;
    padding: 10px;
    gap: 12px;
  }

  .top-header {
    flex-direction: column;
    height: auto;
    padding: 12px;
    gap: 10px;
  }

  .header-left {
    flex-wrap: wrap;
    justify-content: center;
  }

  .clock-date {
    border-left: none;
    padding-left: 0;
  }

  .main-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
  }

  .grid-card {
    max-height: 550px;
  }

  .weather-week {
    min-width: 320px;
    overflow-x: auto;
  }
}


/* ========================================================
   FOTOS DE PERFIL Y CUMPLEAÑOS
   ======================================================== */
.profile-photo-editor {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.profile-photo-circle {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  border: 3px solid var(--color-primary);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  background-color: rgba(255, 255, 255, 0.08);
}

.photo-upload-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.member-avatar-big {
  overflow: hidden;
}

.member-avatar-big img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-full);
}

.member-tab-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filter-pill img {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  vertical-align: middle;
  margin-right: 4px;
  object-fit: cover;
}

.bday-highlight {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(245, 158, 11, 0.15)) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  border-left-color: #ec4899 !important;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.2);
  animation: bdayGlow 3s ease infinite alternate;
}

@keyframes bdayGlow {
  0% { box-shadow: 0 0 8px rgba(236, 72, 153, 0.2); }
  100% { box-shadow: 0 0 18px rgba(245, 158, 11, 0.4); }
}

.member-progress-banner {
  cursor: default;
  position: relative;
}

.member-edit-btn {
  display: none !important;
}


/* ========================================================
   POSPONER ALARMA DE CENA
   ======================================================== */
.alarm-snooze-row {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.snooze-title {
  font-size: 0.9rem;
  color: #fee2e2;
  font-weight: 600;
}

.snooze-btns {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.snooze-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.snooze-btn:hover {
  background: rgba(0, 0, 0, 0.65);
  border-color: #fff;
  transform: scale(1.05);
}

.snooze-btn:active {
  transform: scale(0.95);
}

/* ========================================================
   CALENDARIO MENSUAL POPUP INTERACTIVO
   ======================================================== */
.calendar-month-modal {
  background: #0f172a;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
}

.month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.month-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  text-transform: capitalize;
}

.month-nav-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.month-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.month-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}

.weekday-header {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
  padding: 6px 0;
  text-transform: uppercase;
}

.month-day-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.month-day-cell:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--color-primary);
}

.month-day-cell.other-month {
  opacity: 0.25;
}

.month-day-cell.today {
  border-color: var(--color-primary);
  background: rgba(56, 189, 248, 0.25);
  color: #fff;
}

.month-day-cell.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
}

.month-day-cell.has-birthday::after {
  background: #ec4899;
}

/* ========================================================
   MODAL CONTROL HARDWARE (BRILLO, VOLUMEN, WIFI)
   ======================================================== */
.device-controls-card {
  background: #0f172a;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px;
  max-width: 440px;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.device-slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.device-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.device-slider {
  width: 100%;
  accent-color: var(--color-primary);
  cursor: pointer;
  height: 8px;
}

/* ========================================================
   BOTONES DE EDICIÓN (TAREAS Y EVENTOS)
   ======================================================== */
.event-edit-btn,
.task-edit-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.event-edit-btn:hover,
.task-edit-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: var(--color-primary);
  border-color: rgba(56, 189, 248, 0.4);
}

/* ========================================================
   PANTALLA DE ACCESO Y SEGURIDAD PADRES (PIN)
   ======================================================== */
.parent-auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 17, 32, 0.98);
  backdrop-filter: blur(20px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.parent-auth-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.parent-auth-icon {
  font-size: 2.8rem;
  margin-bottom: 4px;
}

.parent-auth-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.parent-auth-subtitle {
  font-size: 0.95rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 2px;
}

.parent-auth-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 6px;
  line-height: 1.35;
}

.pin-display {
  display: flex;
  gap: 16px;
  margin: 10px 0 4px 0;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
}

.pin-dot.filled {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 12px var(--color-primary);
  transform: scale(1.15);
}

.pin-error-msg {
  color: #ef4444;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.15);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 280px;
}

.pin-key {
  height: 56px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-key:active {
  background: var(--color-primary);
  color: #000;
  transform: scale(0.92);
}

.pin-key-action {
  font-size: 1.15rem;
  color: var(--text-muted);
}

.pin-key-submit {
  background: var(--color-primary);
  color: #0b1120;
  border-color: var(--color-primary);
}

.remember-device-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  margin-top: 4px;
}

.auth-kiosk-link {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: underline;
  cursor: pointer;
  margin-top: 8px;
  transition: color 0.15s;
}

.auth-kiosk-link:hover {
  color: var(--color-primary);
}

/* ========================================================
   BARRA DE NAVEGACIÓN INFERIOR (DOCK UNIVERSAL TABLET & MÓVIL)
   ======================================================== */
.bottom-dock-nav,
.mobile-bottom-nav {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 56px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 6px 8px;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 999;
}

.bottom-dock-nav .mobile-nav-btn,
.mobile-bottom-nav .mobile-nav-btn {
  flex: 1;
  height: 100%;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0 10px;
  transition: all 0.18s ease;
  font-family: inherit;
  user-select: none;
}

.bottom-dock-nav .mobile-nav-btn:hover,
.mobile-bottom-nav .mobile-nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.bottom-dock-nav .mobile-nav-btn.active,
.mobile-bottom-nav .mobile-nav-btn.active {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.bottom-dock-nav .mobile-nav-btn .mob-icon,
.mobile-bottom-nav .mobile-nav-btn .mob-icon {
  font-size: 1.25rem;
}

.bottom-dock-nav .mobile-nav-btn .mob-label,
.mobile-bottom-nav .mobile-nav-btn .mob-label {
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ========================================================
   ESTILOS ESPECÍFICOS DE LAS PANTALLAS EN PANTALLA COMPLETA
   ======================================================== */
/* 1. Calendario Split (Mes 330px a la izquierda + Eventos a la derecha) */
.calendar-split-body {
  display: flex;
  gap: 16px;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.inline-month-panel {
  width: 330px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
}

.inline-calendar-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inline-today-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.inline-today-btn:hover {
  background: #0284c7;
  color: #fff;
}

.inline-month-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inline-month-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.inline-month-subheading {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.2px;
  text-transform: capitalize;
}

.month-days-grid.compact-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  text-align: center;
}

.compact-grid .weekday-header {
  font-size: 0.72rem;
  padding: 2px 0;
  color: var(--text-dim);
}

.compact-grid .month-day-cell {
  aspect-ratio: 1.15;
  font-size: 0.82rem;
  border-radius: 6px;
}

.compact-grid .month-day-cell.has-event::after {
  bottom: 2px;
  width: 4px;
  height: 4px;
}

.inline-day-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  margin-top: 4px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #38bdf8;
}

/* 2. Tareas en cuadrícula grande de 2 columnas */
.tasks-scroll-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  flex: 1;
  overflow-y: auto;
  align-content: start;
  padding-right: 6px;
}

.task-item {
  min-height: 58px;
  padding: 12px 14px;
  border-radius: 14px;
}

.task-checkbox-custom {
  width: 28px;
  height: 28px;
  font-size: 1.1rem;
}

/* Tarjetas de miembros en la cabecera de Tareas y Premios */
.member-card-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.member-card-tab:hover {
  background: rgba(255, 255, 255, 0.1);
}

.member-card-tab.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--color-primary);
  color: #ffffff;
  transform: scale(1.04);
}

.member-card-tab .member-tab-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 1.1rem;
}

.member-card-tab .member-tab-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-card-tab .member-tab-name {
  font-size: 0.86rem;
  font-weight: 700;
}

.member-card-tab .member-tab-points {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--color-gold);
}

/* 3. Premios en cuadrícula de 3 columnas */
.rewards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  flex: 1;
  overflow-y: auto;
  align-content: start;
  padding-right: 6px;
}

.reward-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
}

.reward-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.reward-icon {
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reward-claim-btn {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* 4. Menú Semanal (7 días en cuadrícula de 4 columnas) */
.weekly-menu-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  flex: 1;
  align-content: stretch;
}

.menu-day-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.menu-day-card.today {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.menu-day-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.menu-day-card-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-gold);
}

.menu-day-card.today .menu-day-card-name {
  color: #38bdf8;
}

.menu-meal-block {
  margin: 4px 0;
  font-size: 0.85rem;
}

.menu-meal-block b {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* 5. Lista de la Compra en cuadrícula de 3 columnas */
.shopping-scroll-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  flex: 1;
  overflow-y: auto;
  align-content: start;
  padding-right: 6px;
}

.shopping-item {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
}

/* 6. Fotos del Marco */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  flex: 1;
  overflow-y: auto;
  align-content: start;
  padding-right: 6px;
}

/* ========================================================
   OPTIMIZACIÓN MÓVIL RESPONSIVE (< 900px)
   ======================================================== */
@media (max-width: 900px) {
  body {
    overflow-x: hidden;
  }

  .app-container {
    height: auto;
    min-height: 100vh;
    padding: 10px 12px calc(76px + env(safe-area-inset-bottom)) 12px;
    gap: 12px;
  }

  .calendar-split-body {
    flex-direction: column;
  }

  .inline-month-panel {
    width: 100%;
  }

  .tasks-scroll-list,
  .rewards-grid,
  .weekly-menu-list,
  .shopping-scroll-list {
    grid-template-columns: 1fr;
  }

  .bottom-dock-nav,
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(62px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .bottom-dock-nav .mobile-nav-btn,
  .mobile-bottom-nav .mobile-nav-btn {
    flex-direction: column;
    gap: 3px;
    padding: 6px 0;
  }

  .bottom-dock-nav .mobile-nav-btn .mob-label,
  .mobile-bottom-nav .mobile-nav-btn .mob-label {
    font-size: 0.72rem;
  }

  .mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 6px 0;
    transition: all 0.15s ease;
    font-family: inherit;
  }

  .mobile-nav-btn .mob-icon {
    font-size: 1.35rem;
    transition: transform 0.15s;
  }

  .mobile-nav-btn .mob-label {
    font-size: 0.72rem;
    font-weight: 600;
  }

  .mobile-nav-btn.active {
    color: var(--color-primary);
  }

  .mobile-nav-btn.active .mob-icon {
    transform: scale(1.15);
  }
}

/* ========================================================
   SALVAPANTALLAS / MARCO DE FOTOS EN PANTALLA COMPLETA
   ======================================================== */
.screensaver-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 9999;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screensaver-ambient {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(35px) brightness(0.45);
  transform: scale(1.1);
  transition: background-image 1.2s ease-in-out;
}

.screensaver-slide-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screensaver-img {
  position: absolute;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.4s ease-in-out, transform 18s ease-out;
  transform: scale(1);
}

.screensaver-img.active {
  opacity: 1;
  transform: scale(1.05);
}

.screensaver-hud {
  position: absolute;
  bottom: 24px;
  left: 28px;
  z-index: 10;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.hud-time {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  color: #fff;
}

.hud-date {
  font-size: 0.95rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 4px;
}

.hud-weather {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.hud-caption, #screensaver-caption {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

.screensaver-exit-hint {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 500;
  pointer-events: none;
}

/* ========================================================
   GESTIÓN DE FOTOS EN PANEL DERECHO
   ======================================================== */
.photos-panel-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.photos-header-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.photos-actions-row {
  display: flex;
  gap: 10px;
}

.upload-photo-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.photos-upload-progress {
  padding: 8px 12px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 10px;
  padding-right: 6px;
  max-height: calc(100vh - 275px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.photos-grid::-webkit-scrollbar {
  width: 6px;
}

.photos-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

.photos-grid::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 4px;
}

.photos-grid::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

.photo-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #1e293b;
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.photo-card:hover img {
  transform: scale(1.05);
}

.photo-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.85);
  border: none;
  color: #fff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.photo-delete-btn:hover {
  background: #ef4444;
  transform: scale(1.1);
}

.photo-empty-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px 16px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.weather-loc-tag {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.75rem;
}

/* ========================================================
   SELECTOR DE ICONOS TÁCTIL (EMOJI PICKER)
   ======================================================== */
.emoji-picker-wrap {
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.emoji-picker-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
}

.emoji-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 125px;
  overflow-y: auto;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}

.emoji-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 1.35rem;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.emoji-btn:hover, .emoji-btn:focus {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.6);
  transform: scale(1.1);
}

.emoji-btn.selected {
  background: rgba(56, 189, 248, 0.35);
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
  transform: scale(1.15);
}

.add-reward-card-form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 16px;
}

.add-reward-fields {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

/* --- BOTÓN DE PELIGRO / ELIMINAR --- */
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-1px);
}

/* --- BADGES DE FRECUENCIA EN TAREAS --- */
.task-freq-pill {
  display: none !important;
}

/* --- BOTÓN EDITAR EN RECOMPENSAS --- */
.reward-edit-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.reward-edit-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: var(--color-primary);
}

/* --- GESTOR DE FOTOS EN PANEL DE PADRES --- */
.admin-photo-upload-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
  border: 1px dashed rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.admin-photo-upload-card:hover {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
}
.upload-icon-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.upload-texts b {
  display: block;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 4px;
}
.upload-texts small {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.upload-buttons-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}
.upload-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

/* Previsualización de subida en Admin */
.admin-pending-upload-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
}
.pending-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  font-weight: 600;
  color: #fff;
}
.pending-thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}
.pending-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #000;
}
.pending-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pending-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #ef4444;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
}
.upload-status-bar {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

/* Galería activa en Admin */
.admin-active-photos-wrap {
  margin-top: 14px;
}
.active-photos-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.active-photos-title-row h5 {
  font-size: 0.95rem;
  color: #fff;
  margin: 0;
}
.admin-photos-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.admin-photos-gallery-grid::-webkit-scrollbar {
  width: 6px;
}
.admin-photos-gallery-grid::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 4px;
}
.admin-photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}
.admin-photo-item:hover {
  transform: scale(1.03);
  border-color: rgba(56, 189, 248, 0.5);
}
.admin-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-photo-del-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.85);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}
.admin-photo-del-btn:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.1);
}

/* Detalle de eventos en modal de calendario mensual */
.month-selected-day-details {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.day-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.day-details-header h4 {
  font-size: 0.92rem;
  color: #fff;
  margin: 0;
}
.month-day-events-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}
.month-day-event-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--color-primary);
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.month-day-event-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Botón lápiz para editar menú semanal */
.menu-edit-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all 0.2s ease;
  line-height: 1;
}
.menu-edit-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: scale(1.1);
}

/* Botón directo de añadir tarea en perfil */
.member-add-task-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.member-add-task-btn:hover {
  background: #0284c7;
  color: #fff;
  border-color: #0284c7;
}
