:root {
    --bg-color: #fdf2f8; 
    --card-bg: #ffffff; 
    --text-main: #2d3436; 
    --text-secondary: #636e72;
    --color-menses: #ff7675; 
    --color-follicular: #74b9ff; 
    --color-ovulation: #fbc531; 
    --color-luteal: #a29bfe; 
    --accent-color: #e84393;
    --nav-height: 90px;
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background-color: var(--bg-color); 
    margin: 0; padding: 0; 
    height: 100dvh; width: 100vw; 
    overflow: hidden; 
    -webkit-tap-highlight-color: transparent; 
    user-select: none; 
}

.hidden { display: none !important; }

/* SPLASH SCREEN */
.splash-screen {
    position: fixed; inset: 0; background: var(--bg-color); z-index: 10000; 
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s ease;
}
.splash-content { text-align: center; animation: pulse 2s infinite; }
.splash-logo { font-size: 5rem; margin-bottom: 10px; }
.splash-text { font-size: 1.5rem; font-weight: 800; color: var(--text-main); }
.splash-screen.fade-out { opacity: 0; pointer-events: none; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* LOGIN */
.login-screen { position: fixed; inset: 0; background: var(--bg-color); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; }
.login-card { background: white; padding: 40px 30px; border-radius: 30px; box-shadow: 0 20px 50px rgba(0,0,0,0.1); width: 100%; max-width: 320px; }
.login-title { font-size: 2rem; font-weight: 800; color: var(--text-main); margin-bottom: 10px; }
.login-subtitle { color: var(--text-secondary); margin-bottom: 30px; }
.auth-input { width: 100%; padding: 15px; margin-bottom: 12px; border: 1px solid #ddd; border-radius: 15px; font-size: 1rem; box-sizing: border-box; outline: none; background: #fafafa; }
.auth-input:focus { border-color: var(--accent-color); background: #fff; }

/* VISTAS */
.view-container { 
    height: 100dvh; 
    overflow-y: auto; 
    padding: 20px 20px 140px 20px; 
    box-sizing: border-box; 
    display: none; 
    padding-top: 50px; 
    -webkit-overflow-scrolling: touch;
}
.view-container.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* HEADER */
header { text-align: center; margin-bottom: 15px; }
.top-credits { font-size: 0.65rem; color: #b2bec3; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; font-weight: 600; }
.greeting { font-size: 1rem; color: var(--text-secondary); }
.app-version { font-size: 0.7rem; color: #fab1a0; font-weight: 700; margin-top: 2px; }
.date-display { font-size: 1.8rem; font-weight: 800; color: var(--text-main); margin-top: 5px; }

/* RUEDA */
.cycle-widget { 
    background: transparent; padding: 10px; 
    display: flex; flex-direction: column; align-items: center; 
    margin-bottom: 25px; position: relative; overflow: visible; 
    z-index: 10; 
}
.wheel-container { 
    width: 240px; height: 240px; position: relative; margin: 20px 0; border-radius: 50%;
    box-shadow: -10px -10px 20px #ffffff, 10px 10px 20px rgba(174, 174, 192, 0.4), inset 0 0 0 5px rgba(255,255,255,0.5);
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-color); border: 4px solid var(--bg-color);
}
.wheel { 
    width: 100%; height: 100%; border-radius: 50%; 
    background: conic-gradient(var(--color-menses) 0deg 64deg, var(--color-follicular) 64deg 154deg, var(--color-ovulation) 154deg 205deg, var(--color-luteal) 205deg 360deg); 
    box-shadow: inset 0 0 15px rgba(0,0,0,0.1); 
}
.wheel::after { 
    content: ''; position: absolute; inset: 40px; 
    background: var(--bg-color); border-radius: 50%; 
    box-shadow: inset 4px 4px 8px rgba(174, 174, 192, 0.2), inset -4px -4px 8px #ffffff;
}

/* ETIQUETAS */
.phase-label { 
    position: absolute; font-size: 0.75rem; font-weight: 700; 
    color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px;
    background: rgba(255,255,255,0.95); 
    padding: 6px 12px; border-radius: 12px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    white-space: nowrap; z-index: 20; cursor: pointer; 
    border: 1px solid rgba(0,0,0,0.05);
}
.phase-label:active { transform: scale(0.9); background: #eee; }
.phase-label::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.label-menses { top: -10px; right: -20px; } .label-menses::before { background: var(--color-menses); }
.label-follicular { bottom: 40px; right: -30px; } .label-follicular::before { background: var(--color-follicular); }
.label-ovulation { bottom: -30px; left: 50%; transform: translateX(-50%); } .label-ovulation::before { background: var(--color-ovulation); }
.label-luteal { top: 40px; left: -30px; } .label-luteal::before { background: var(--color-luteal); }

.indicator-arm { position: absolute; top: 0; left: 50%; width: 2px; height: 50%; transform-origin: bottom center; z-index: 5; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.indicator-dot { width: 18px; height: 18px; background: #fff; border: 4px solid var(--accent-color); border-radius: 50%; position: absolute; top: 5px; left: -10px; box-shadow: 0 3px 6px rgba(0,0,0,0.3); }
.center-info { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; z-index: 10; width: 100px; }
.day-label { font-size: 0.6rem; text-transform: uppercase; color: #aaa; letter-spacing: 1px; margin-bottom: 2px;}
.day-counter { font-size: 3rem; font-weight: 900; color: var(--text-main); line-height: 1; }

.insight-card { 
    background: #fff; border-radius: 25px; padding: 25px; width: 100%; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); margin-bottom: 25px; 
    border-left: 8px solid #ccc; box-sizing: border-box; 
    position: relative; z-index: 10;
}
.insight-title { font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; color: var(--text-main); display: flex; align-items: center; gap: 10px;}
.insight-body { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 15px; }
.insight-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.tag { background: #f8f9fa; padding: 8px 14px; border-radius: 12px; font-size: 0.8rem; font-weight: 600; color: #555; display: flex; align-items: center; gap: 6px; }

/* NUEVOS ESTILOS V46 - MINI CARDS */
.tips-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: 25px;
}
.tip-card {
    background: #fff;
    border-radius: 18px;
    padding: 15px 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    border-left: 5px solid #ccc;
    animation: slideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.tip-header { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text-main); font-size: 0.95rem; }
.tip-body { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4; padding-left: 5px; }
/* -------------------------------- */

.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; width: 100%; margin-bottom: 30px; position: relative; z-index: 10; }
.action-card { 
    background: #fff; padding: 20px; border-radius: 20px; text-align: center; border: none; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); font-size: 1rem; font-weight: 600; color: var(--text-main); 
    cursor: pointer; transition: transform 0.1s;
}
.action-card:active { transform: scale(0.96); box-shadow: inset 0 5px 10px rgba(0,0,0,0.05); }

/* CALENDARIO */
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.cal-nav-btn { background: #fff; border: none; width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,0.05);}
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; background: #fff; padding: 15px; border-radius: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.day-name { text-align: center; font-size: 0.75rem; font-weight: 700; color: #b2bec3; margin-bottom: 10px; }
.day-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.95rem; position: relative; font-weight: 500; cursor: pointer; transition: background 0.2s; }
.day-cell:active { background: #eee; }
.day-cell.today { border: 2px solid var(--text-main); font-weight: 800; }

.day-cell.phase-menses { background-color: var(--color-menses); color: white; }
.day-cell.phase-follicular { background-color: var(--color-follicular); color: white; }
.day-cell.phase-ovulation { background-color: var(--color-ovulation); color: white; }
.day-cell.phase-luteal { background-color: var(--color-luteal); color: white; }
.day-cell.is-predicted { opacity: 0.6; }

.settings-group { background: #fff; border-radius: 20px; overflow: hidden; margin-bottom: 25px; box-shadow: 0 5px 20px rgba(0,0,0,0.04); }
.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #f9f9f9; }
.setting-input { width: 70px; padding: 10px; border: 1px solid #eee; border-radius: 10px; text-align: center; font-size: 1.1rem; font-weight: bold; background: #fafafa; }

/* NAVBAR */
.tab-bar { 
    position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-height); 
    background: rgba(255,255,255,0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); 
    display: flex; justify-content: space-around; align-items: flex-start; 
    border-radius: 30px 30px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,0.05); 
    padding-top: 15px; z-index: 1000; 
}
.tab-btn { background: none; border: none; display: flex; flex-direction: column; align-items: center; color: #b2bec3; cursor: pointer; width: 60px; }
.tab-btn.active { color: var(--accent-color); }
.tab-icon { font-size: 1.5rem; margin-bottom: 4px; }
.tab-text { font-size: 0.7rem; font-weight: 700; }

/* MODALES */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: none; backdrop-filter: blur(4px); }
.modal-overlay.active { display: block; }

.modal-sheet { 
    position: fixed; left: 0; right: 0; bottom: 0; 
    background: #fff; border-radius: 30px 30px 0 0; padding: 30px 25px 50px 25px; 
    transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1); 
    z-index: 3000; max-width: 600px; margin: 0 auto; 
    max-height: 85vh; overflow-y: auto; 
}
.modal-sheet.active { transform: translateY(0); }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; position: relative; }
.modal-title { font-size: 1.4rem; font-weight: 800; color: var(--text-main); margin:0; }
.close-btn { background: #f1f2f6; border: none; width: 35px; height: 35px; border-radius: 50%; font-weight: bold; cursor: pointer; color: #636e72; display: flex; align-items: center; justify-content: center;}

.modal-center { 
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); 
    background: #fff; padding: 25px; border-radius: 25px; width: 85%; max-width: 320px; 
    z-index: 3000; opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); 
    box-shadow: 0 20px 60px rgba(0,0,0,0.2); text-align: center; 
    max-height: 80vh; 
    display: flex; flex-direction: column;
}
.modal-center.active { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }

.modal-scroll-area {
    overflow-y: auto; flex: 1; margin-bottom: 15px; text-align: left;
    padding: 10px; background: #fdfdfd; border-radius: 12px; border: 1px solid #f2f2f2;
    -webkit-overflow-scrolling: touch; 
}
.modal-scroll-area::-webkit-scrollbar { width: 6px; }
.modal-scroll-area::-webkit-scrollbar-track { background: transparent; }
.modal-scroll-area::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.2); border-radius: 10px; }

.modal-info-body { font-size: 1rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 15px; }
.daily-note-display { background: #fff; padding: 12px; border-radius: 12px; font-style: italic; color: #636e72; border-left: 4px solid var(--accent-color); margin-top:15px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

.section-label { font-size: 0.9rem; color: #888; margin-bottom: 10px; font-weight: 600; margin-top: 25px; }
.note-input { width: 100%; border: 1px solid #ddd; border-radius: 15px; padding: 15px; font-family: inherit; font-size: 1rem; box-sizing: border-box; min-height: 100px; resize: vertical; background: #fafafa; }
.note-input:focus { outline: none; border-color: var(--accent-color); background: #fff; }

.btn-primary:disabled { background-color: #b2bec3 !important; cursor: not-allowed; }
.btn-primary { width: 100%; background: var(--text-main); color: white; padding: 18px; border-radius: 18px; border: none; font-size: 1rem; font-weight: 700; cursor: pointer; box-shadow: 0 10px 20px rgba(0,0,0,0.1); transition: transform 0.1s; margin-top: auto; }
.btn-primary:active { transform: scale(0.98); }
.chip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 5px; }
.chip { background: #fff; border: 2px solid #f1f2f6; padding: 15px; border-radius: 16px; text-align: center; font-size: 0.8rem; color: #888; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: all 0.2s; cursor: pointer; font-weight: 600; }
.chip.selected { background: #fff0f6; border-color: var(--accent-color); color: var(--accent-color); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(232, 67, 147, 0.2); }
#toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px); background: #2d3436; color: white; padding: 12px 25px; border-radius: 50px; font-size: 0.9rem; font-weight: 600; z-index: 7000; transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
#toast.show { transform: translateX(-50%) translateY(50px); }

/* ... (Todo lo anterior igual) ... */

/* AGREGAR A V47: Estilos para etiquetas dentro de los tips */
.tip-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #eee; /* Una línea sutil para separar */
}

.mini-tag {
    background: #f1f2f6;
    color: #636e72;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}
/* Pequeño punto de color decorativo en la etiqueta */
.mini-tag::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #b2bec3;
    border-radius: 50%;
}