
:root {
  --primary-rose: #f43f5e;
  --primary-rose-hover: #e11d48;
  --primary-gold: #fbbf24;
  --primary-gold-hover: #f59e0b;
  --bg-card: rgba(20, 20, 25, 0.75);
  --border-glass: rgba(255, 255, 255, 0.08);
  --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --wife-color: #f43f5e;
  --husband-color: #fbbf24;
  font-family: 'Outfit', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: #09090b;
  background: radial-gradient(circle at top, #1e1b18 0%, #09090b 100%);
  color: #f8fafc;
  min-height: 100vh;
  padding-bottom: 80px;
  overflow-x: hidden;
}

/* ===== ANIMATIONS ===== */
@keyframes flappy-head {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(-1deg); }
}
@keyframes flappy-chin {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
@keyframes shake-urgent {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-3px, -2px) rotate(-1deg); }
  30% { transform: translate(3px, 2px) rotate(1deg); }
  50% { transform: translate(-2px, 3px) rotate(-0.5deg); }
  70% { transform: translate(2px, 1px) rotate(1.5deg); }
  90% { transform: translate(-1px, -2px) rotate(-1deg); }
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slide-up-bounce {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes pulse-rose {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4); }
  50% { box-shadow: 0 0 12px 6px rgba(244, 63, 94, 0); }
}
@keyframes modal-appear {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.animate-flappy-top { animation: flappy-head 0.22s infinite ease-in-out; transform-origin: 50% 100%; }
.animate-flappy-bottom { animation: flappy-chin 0.22s infinite ease-in-out; transform-origin: 50% 0%; }
.animate-shake { animation: shake-urgent 0.4s infinite; }
.animate-pulse { animation: pulse-rose 1.5s infinite; }

/* ===== UTILITY ===== */
.hidden { display: none !important; }

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  box-shadow: var(--shadow-premium);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-panel:hover { border-color: rgba(255, 255, 255, 0.14); }
.title-font { font-family: 'Fredoka', sans-serif; }

/* ===== APP CONTAINER ===== */
.app-container { max-width: 700px; margin: 0 auto; padding: 20px 16px; }

/* ===== HEADER ===== */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.header-logo { display: flex; align-items: center; gap: 12px; }
.logo-box {
  font-size: 28px; padding: 8px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: 14px; line-height: 1;
}
.logo-title { font-family: 'Fredoka', sans-serif; font-size: 22px; font-weight: 700; line-height: 1.1; }
.logo-subtitle { font-size: 11px; color: var(--primary-rose); font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; }

/* ===== NAV TABS ===== */
.nav-tabs {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 24px;
  align-items: center;
}
.tab-btn {
  background: transparent;
  border: none;
  color: #a1a1aa;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}
.tab-btn.active {
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.25);
}
.hamburger-btn {
  background: transparent;
  border: 1px solid #27272a;
  color: white;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Outfit', sans-serif;
  flex-shrink: 0;
}
.hamburger-btn:hover { background: #27272a; }
.badge {
  background: var(--primary-rose);
  color: white; font-size: 9px; font-weight: 900;
  padding: 2px 5px; border-radius: 50%;
  position: absolute; top: -4px; right: -4px;
  animation: pulse-rose 2s infinite;
}

/* ===== TAB VIEWS ===== */
.tab-view { animation: fade-in 0.3s ease-out; }

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed; top: 0; left: 0;
  height: 100vh; width: 260px;
  background: rgba(14, 14, 18, 0.99);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid #27272a;
  z-index: 300;
  transition: transform 0.3s ease;
  display: flex; flex-direction: column;
}
.sidebar.hidden { transform: translateX(-100%); }
.sidebar-header {
  padding: 24px 20px 18px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #27272a;
}
.sidebar-header h3 { font-family: 'Fredoka', sans-serif; color: var(--primary-rose); font-size: 20px; }
.close-sidebar {
  background: rgba(255,255,255,0.05);
  border: 1px solid #3f3f46; color: #a1a1aa;
  font-size: 16px; width: 32px; height: 32px;
  border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.close-sidebar:hover { background: rgba(255,255,255,0.1); color: white; }

.sidebar-nav { list-style: none; padding: 10px 0; margin: 0; display: flex; flex-direction: column; }

/* Botones del sidebar — estilo LIMPIO tipo lista de menu nativa */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  padding: 15px 20px;
  text-align: left;
  color: #d4d4d8;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Outfit', sans-serif;
}
.sidebar-link:hover {
  background: rgba(244, 63, 94, 0.07);
  border-left-color: var(--primary-rose);
  color: white;
}
.sidebar-icon { font-size: 20px; width: 26px; text-align: center; flex-shrink: 0; }

.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  z-index: 299; display: none;
}
.sidebar-overlay.active { display: block; }

/* ===== CALENDAR ===== */
.calendar-layout { display: flex; flex-direction: column; gap: 20px; }
.calendar-grid-card { padding: 20px; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.calendar-title { font-family: 'Fredoka', sans-serif; font-size: 20px; }
.nav-btn {
  background: #27272a; border: none; color: white;
  padding: 8px 12px; border-radius: 8px; cursor: pointer;
  font-family: 'Outfit', sans-serif; transition: background 0.2s;
}
.nav-btn:hover { background: #3f3f46; }
.calendar-nav-buttons { display: flex; gap: 6px; }

.calendar-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; font-size: 11px; color: #71717a;
  font-weight: 700; margin-bottom: 8px;
}
.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }

.day-cell {
  background: rgba(20, 20, 20, 0.4);
  border: 1px solid #1f1f23;
  border-radius: 10px;
  /* Altura dinámica para que quepan los chips de título */
  min-height: 62px;
  height: auto;
  padding: 5px 4px;
  display: flex; flex-direction: column;
  justify-content: flex-start; align-items: flex-start;
  color: #d4d4d8; cursor: pointer; transition: all 0.2s;
  font-family: 'Outfit', sans-serif;
  overflow: hidden;
}
@media (min-width: 400px) { .day-cell { min-height: 72px; } }
@media (min-width: 600px) { .day-cell { min-height: 84px; } }
.day-cell:hover { background: rgba(60, 60, 60, 0.5); border-color: #3f3f46; }
.day-cell.selected { background: rgba(244, 63, 94, 0.15); border: 2px solid var(--primary-rose); color: #fda4af; }
.day-cell.today { box-shadow: inset 0 0 0 2px var(--primary-gold); }
.day-number { font-size: 12px; font-weight: 700; line-height: 1; margin-bottom: 3px; flex-shrink: 0; }

/* Chips de título de eventos (estilo Google Calendar) */
.day-chips { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.day-chip {
  font-size: 9px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  border-radius: 4px;
  padding: 1px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.5;
  letter-spacing: 0.01em;
}
@media (min-width: 400px) { .day-chip { font-size: 10px; padding: 2px 5px; } }
@media (min-width: 600px) { .day-chip { font-size: 11px; padding: 2px 6px; border-radius: 5px; } }
.chip-wife    { background: rgba(244, 63, 94, 0.25); color: #fda4af; border-left: 2px solid var(--primary-rose); }
.chip-husband { background: rgba(234, 179, 8, 0.2);  color: #fde047; border-left: 2px solid var(--primary-gold); }
.chip-key     { background: rgba(139, 92, 246, 0.25); color: #c4b5fd; border-left: 2px solid #8b5cf6; }
.chip-done    { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border-left: 2px solid #10b981; text-decoration: line-through; opacity: 0.7; }
.chip-more    { background: rgba(100, 100, 120, 0.3); color: #a1a1aa; border-radius: 4px; font-size: 9px; text-align: center; }

/* Compatibilidad: mantener regla de empty-cell */
.empty-cell { background: rgba(0,0,0,0.1); border-radius: 10px; min-height: 62px; opacity: 0.3; }
@media (min-width: 400px) { .empty-cell { min-height: 72px; } }
@media (min-width: 600px) { .empty-cell { min-height: 84px; } }

.calendar-details-card { padding: 20px; display: flex; flex-direction: column; }
.details-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.details-title { font-size: 17px; font-weight: 700; }
.add-event-toggle-btn {
  background: var(--primary-rose); border: none; color: white;
  padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 800;
  cursor: pointer; font-family: 'Outfit', sans-serif; transition: background 0.2s; white-space: nowrap;
}
.add-event-toggle-btn:hover { background: var(--primary-rose-hover); }

/* Events list */
.events-list { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; }
.event-item {
  padding: 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  display: flex; justify-content: space-between; align-items: flex-start;
}
.event-item.wife { background: rgba(244, 63, 94, 0.05); border-color: rgba(244, 63, 94, 0.15); }
.event-item.husband { background: rgba(251, 191, 36, 0.03); border-color: rgba(251, 191, 36, 0.1); }
.event-item.completed { opacity: 0.5; background: rgba(16, 185, 129, 0.05); border-color: rgba(16, 185, 129, 0.15); }
.event-item-info { flex: 1; min-width: 0; }
.item-badge { font-size: 8px; font-weight: 900; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; display: inline-block; margin-bottom: 5px; }
.event-item.wife .item-badge { background: rgba(244, 63, 94, 0.15); color: #fda4af; }
.event-item.husband .item-badge { background: rgba(251, 191, 36, 0.15); color: #fde047; }
.item-title { font-size: 13px; font-weight: 700; }
.event-item.completed .item-title { text-decoration: line-through; }
.item-desc { font-size: 11px; color: #a1a1aa; margin-top: 2px; }
.item-meta { display: flex; gap: 8px; font-size: 9px; color: #52525b; margin-top: 6px; flex-wrap: wrap; }
.item-actions { display: flex; gap: 4px; flex-shrink: 0; }
.btn-complete-event, .btn-delete-event {
  background: transparent; border: none; cursor: pointer;
  padding: 6px; border-radius: 6px; font-size: 14px; color: #71717a;
}
.btn-complete-event:hover { color: #10b981; background: rgba(16,185,129,0.1); }
.btn-delete-event:hover { color: var(--primary-rose); background: rgba(244,63,94,0.1); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 14px; }
.form-group label, .form-row label {
  font-size: 11px; color: #71717a; font-weight: 700;
  margin-bottom: 5px; display: block;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #3f3f46;
  border-radius: 10px;
  padding: 11px 14px;
  color: white; font-size: 14px; outline: none;
  font-family: 'Outfit', sans-serif; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary-rose); }
.form-group select option { background: #18181b; }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-submit {
  background: var(--primary-rose); border: none; color: white;
  font-weight: 700; font-size: 13px; padding: 11px 18px; border-radius: 10px;
  cursor: pointer; font-family: 'Outfit', sans-serif; transition: background 0.2s;
}
.btn-submit:hover { background: var(--primary-rose-hover); }
.btn-cancel {
  background: transparent; border: 1px solid #3f3f46; color: #a1a1aa;
  font-size: 13px; font-weight: 600; cursor: pointer; padding: 11px 16px;
  border-radius: 10px; font-family: 'Outfit', sans-serif; transition: all 0.2s;
}
.btn-cancel:hover { background: rgba(255,255,255,0.05); color: white; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; }
.alert-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: #18181b; border: 1px solid #27272a; color: #a1a1aa;
  padding: 5px 10px; border-radius: 20px; font-size: 11px;
  cursor: pointer; font-family: 'Outfit', sans-serif; transition: all 0.2s;
}
.chip.active { background: rgba(244,63,94,0.15); border-color: var(--primary-rose); color: #fda4af; }
.dates-form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 480px) { .dates-form-grid { grid-template-columns: 1fr 1fr; } }

/* ===== MODAL OVERLAY ===== */
/* El modal siempre es display:flex cuando visible, display:none cuando .hidden */
.setup-modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 16px;
  overflow-y: auto;
}
/* .hidden ya aplica display:none !important — tiene prioridad */
.setup-modal-content {
  width: 100%; max-width: 420px;
  padding: 24px;
  animation: modal-appear 0.25s ease-out;
  margin: auto; /* centra verticalmente cuando hay espacio */
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.modal-title { font-family: 'Fredoka', sans-serif; font-size: 20px; color: var(--primary-gold); }
.modal-close-btn {
  background: rgba(255,255,255,0.06); border: 1px solid #3f3f46; color: #a1a1aa;
  width: 34px; height: 34px; border-radius: 8px; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0;
}
.modal-close-btn:hover { background: rgba(255,255,255,0.12); color: white; }
.modal-day-label {
  font-size: 12px; color: #a1a1aa; margin-bottom: 18px;
  padding: 8px 12px; background: rgba(255,255,255,0.04);
  border-radius: 8px; border-left: 3px solid var(--primary-rose);
}

/* Auth modal heading */
.setup-modal-content h3 {
  font-family: 'Fredoka', sans-serif; font-size: 22px;
  text-align: center; color: var(--primary-rose); margin-bottom: 6px;
}
.setup-modal-content > p {
  font-size: 13px; color: #a1a1aa; text-align: center; line-height: 1.5; margin-bottom: 12px;
}

/* ===== TIME WHEEL PICKER ===== */
.time-wheel-wrap {
  display: flex; justify-content: center; align-items: stretch;
  height: 130px; position: relative;
  background: #000; border-radius: 14px; border: 1px solid #27272a;
  overflow: hidden; user-select: none;
}
.time-wheel-fade {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.85) 100%);
  pointer-events: none; z-index: 2;
}
.time-wheel-bar {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 100%; height: 44px;
  border-top: 1px solid rgba(244, 63, 94, 0.3);
  border-bottom: 1px solid rgba(244, 63, 94, 0.3);
  pointer-events: none; z-index: 1;
}
.wheel-column {
  width: 72px; overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
}
.wheel-column::-webkit-scrollbar { display: none; }
.wheel-column div {
  height: 44px; line-height: 44px; text-align: center;
  font-size: 26px; font-weight: 700; color: #3f3f46;
  scroll-snap-align: center; cursor: pointer;
  transition: color 0.15s, transform 0.15s;
}
.wheel-column div.active { color: white; transform: scale(1.05); }
.wheel-separator {
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; color: white;
  z-index: 3; padding: 0 4px; flex-shrink: 0;
}

/* ===== WEEK SELECTOR ===== */
.week-selector { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.week-selector label {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: #27272a; color: #71717a;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all 0.2s; user-select: none; position: relative;
}
.week-selector input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.week-selector input[type="checkbox"]:checked ~ span,
.week-selector label:has(input:checked) {
  background: var(--primary-rose); color: white;
}

/* ===== URGENT MESSAGES ===== */
.urgent-layout { display: flex; flex-direction: column; gap: 20px; }
.urgent-sender-card, .urgent-history-card { padding: 20px; }
.urgent-warning {
  background: rgba(244, 63, 94, 0.06); border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: 12px; padding: 12px; font-size: 12px; color: #fda4af;
  margin: 12px 0 16px 0; line-height: 1.5;
}
.urgent-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-send-alert {
  width: 100%; margin-top: 12px;
  background: var(--primary-rose); border: none; color: white;
  padding: 13px; border-radius: 12px; font-weight: 800; font-size: 14px;
  cursor: pointer; font-family: 'Outfit', sans-serif; transition: background 0.2s;
}
.btn-send-alert:hover { background: var(--primary-rose-hover); }
.btn-record-audio {
  width: 100%; padding: 14px; margin-top: 0;
  background: #3f3f46; color: white;
  border: 2px dashed #71717a; border-radius: 12px;
  font-weight: 700; font-size: 13px; cursor: pointer;
  font-family: 'Outfit', sans-serif; transition: all 0.2s;
}
.btn-record-audio.recording { background: rgba(244, 63, 94, 0.2); border-color: var(--primary-rose); color: var(--primary-rose); animation: pulse-rose 1.5s infinite; }
.urgent-history-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; max-height: 380px; overflow-y: auto; }
.history-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 1px solid rgba(255,255,255,0.05); border-radius: 14px; }
.history-item.unread { background: rgba(244, 63, 94, 0.08); border-color: rgba(244, 63, 94, 0.3); }
.history-item.read { background: rgba(20,20,20,0.4); opacity: 0.7; }
.history-item-body { display: flex; align-items: center; gap: 12px; }
.history-avatar { font-size: 20px; }
.history-text-box h4 { font-size: 11px; color: #71717a; }
.history-text-box p { font-size: 13px; font-weight: 700; margin-top: 2px; }
.history-status-badge { font-size: 9px; font-weight: 800; padding: 2px 8px; border-radius: 12px; flex-shrink: 0; }
.history-item.unread .history-status-badge { background: rgba(244, 63, 94, 0.2); color: #fda4af; animation: pulse-rose 1.5s infinite; }
.history-item.read .history-status-badge { background: rgba(16, 185, 129, 0.15); color: #34d399; }

/* ===== STICKER EDITOR ===== */
.stickers-settings-container { display: flex; flex-direction: column; gap: 20px; }
.sticker-editor-card { padding: 20px; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 520px) { .sticker-editor-card { flex-direction: row; align-items: flex-start; } }
.editor-visual { display: flex; flex-direction: column; align-items: center; gap: 12px; flex-shrink: 0; }

/* Preview del sticker — silueta libre (la IA recorta la forma real de la persona).
   El sticker dinámico (divs split-top/split-bottom) se renderiza dentro del .sticker-clip-circle.
   NO forzamos border-radius:50% porque la forma es la de la cara/cuerpo real. */
.editor-preview-box {
  width: 160px; height: 160px; position: relative;
  flex-shrink: 0;
  /* Fondo en tablero de ajedrez para ver la transparencia del sticker */
  background-image:
    linear-gradient(45deg, #2a2a2a 25%, transparent 25%),
    linear-gradient(-45deg, #2a2a2a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a2a2a 75%),
    linear-gradient(-45deg, transparent 75%, #2a2a2a 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  border-radius: 12px;
  border: 1px solid #27272a;
}
.sticker-clip-circle {
  width: 160px; height: 160px;
  overflow: visible; /* La silueta irregular puede sobresalir ligeramente */
  position: relative;
  /* El PNG ya tiene la forma; le damos una sombra suave para que resalte */
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.7)) drop-shadow(0 0 6px rgba(251,191,36,0.3));
}

.split-top, .split-bottom {
  position: absolute; left: 0; right: 0; background-repeat: no-repeat;
}
.split-top { top: 0; background-position: top left; }
.split-bottom { bottom: 0; background-position: bottom left; }

.editor-actions { display: flex; gap: 8px; }
.upload-btn {
  background: #27272a; border: none; color: white;
  padding: 8px 16px; font-size: 12px; font-weight: 700; border-radius: 8px;
  cursor: pointer; font-family: 'Outfit', sans-serif; transition: background 0.2s;
}
.upload-btn:hover { background: #3f3f46; }
.reset-btn {
  background: transparent; border: 1px solid #27272a; color: #71717a;
  padding: 8px 12px; border-radius: 8px; font-size: 12px;
  font-family: 'Outfit', sans-serif; cursor: pointer; transition: all 0.2s;
}
.reset-btn:hover { color: white; border-color: #52525b; }
.hidden-input { display: none; }
.editor-controls { flex: 1; width: 100%; display: flex; flex-direction: column; gap: 14px; }
.slider-input { width: 100%; height: 6px; background: #18181b; border-radius: 3px; outline: none; -webkit-appearance: none; accent-color: var(--primary-rose); margin-top: 8px; }
.help-text { font-size: 11px; color: #52525b; margin-top: 4px; display: block; line-height: 1.4; }
.btn-test-talk {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: white;
  padding: 11px; border-radius: 12px; font-weight: 800; font-size: 13px; cursor: pointer;
  font-family: 'Outfit', sans-serif; transition: all 0.2s;
}
.btn-test-talk:hover { background: rgba(255,255,255,0.12); }

/* ===== EXTRA DATES (en Ajustes) ===== */
.extra-dates-card { padding: 20px; }
.extra-date-form-inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.extra-date-form-inline .form-group { margin-bottom: 0; }
.extra-date-form-inline .fg-title { flex: 2; min-width: 140px; }
.extra-date-form-inline .fg-date { flex: 1; min-width: 140px; }

/* ===== ALARMS VIEW ===== */
.alarms-panel { padding: 20px; }
.alarm-form-card { margin-bottom: 24px; }

/* ===== SHARED DATES ===== */
.shared-dates-card { padding: 20px; margin-bottom: 20px; }

/* ===== URGENT ALERT MODAL ===== */
.urgent-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px); z-index: 600;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.urgent-modal-content {
  width: 100%; max-width: 440px; padding: 28px;
  border: 2px solid var(--primary-rose);
  display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
}
.urgent-modal-badge {
  background: rgba(244,63,94,0.15); border: 1px solid var(--primary-rose); color: #fda4af;
  font-size: 10px; font-weight: 900; padding: 4px 14px; border-radius: 20px; letter-spacing: 2px;
}
.urgent-modal-avatar-box { width: 150px; height: 150px; position: relative; }
.urgent-modal-speech { background: #18181b; border: 1px solid #27272a; border-radius: 16px; padding: 16px; position: relative; width: 100%; text-align: left; }
.speech-tip { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%) rotate(45deg); width: 12px; height: 12px; background: #18181b; border-left: 1px solid #27272a; border-top: 1px solid #27272a; }
.speech-sender { font-size: 9px; font-weight: 800; color: #71717a; text-transform: uppercase; }
.speech-text { font-size: 16px; font-weight: 700; color: white; margin-top: 4px; }
.btn-ack-urgent {
  width: 100%; background: var(--primary-rose); border: none; color: white;
  padding: 15px; border-radius: 14px; font-weight: 900; font-size: 14px; cursor: pointer;
  font-family: 'Outfit', sans-serif; box-shadow: 0 8px 16px rgba(244,63,94,0.4); transition: background 0.2s;
}
.btn-ack-urgent:hover { background: var(--primary-rose-hover); }

/* ===== TOAST ===== */
.toast-reminder {
  position: fixed; bottom: 20px; right: 16px; left: 16px; z-index: 400;
  background: var(--bg-card); backdrop-filter: blur(12px);
  border: 1px solid var(--primary-rose); padding: 14px 16px; border-radius: 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  animation: slide-up-bounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 400px; margin: 0 auto;
}
@media (min-width: 460px) { .toast-reminder { left: auto; width: 340px; } }
.toast-avatar { width: 48px; height: 48px; flex-shrink: 0; }
.toast-content { flex: 1; min-width: 0; }
.toast-tag { font-size: 8px; font-weight: 900; color: var(--primary-rose); text-transform: uppercase; letter-spacing: 1px; }
.toast-title-text { font-size: 13px; font-weight: 700; color: white; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast-time-text { font-size: 10px; color: #71717a; }
.toast-close { background: transparent; border: none; color: #71717a; font-size: 14px; cursor: pointer; padding: 4px; flex-shrink: 0; }

/* ===== AUTH TABS ===== */
.auth-tabs { display: flex; gap: 8px; margin: 16px 0; }
.auth-tabs .tab-btn { flex: 1; text-align: center; }

/* ===== FOOTER ===== */
.app-footer { margin-top: 48px; padding: 16px 0; text-align: center; font-size: 11px; color: #3f3f46; }

/* ===== CROP MODAL ===== */
.crop-stage-wrap {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 14px;
  background: #000;
  cursor: grab;
  touch-action: none;
}
.crop-stage-wrap:active { cursor: grabbing; }

#crop-canvas {
  display: block;
  width: 300px;
  height: 300px;
  position: relative;
  z-index: 1;
}

/* Guía de encuadre — crosshair central para centrar la cara */
.crop-guide-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  /* Dos líneas centrales (horizontal y vertical) sutiles */
  background:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px) center / 1px 100% no-repeat,
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px) center / 100% 1px no-repeat;
  /* Óvalo de referencia (no es el corte real, es la guia para centrar la cara) */
  box-shadow: inset 0 0 0 2px rgba(244, 63, 94, 0.4);
  border-radius: 50%;
  margin: 12px;
}

.crop-zoom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

