/* ═══════════════════════════════════════════
   MONKK — Estilos estructurales básicos
   Sin colores de marca, solo layout y tipografía
═══════════════════════════════════════════ */

/* Reset básico */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

/* ─── HEADER ─────────────────────────────── */
.site-header {
    border-bottom: 1px solid #ddd;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #111;
    text-decoration: none;
}

.site-logo:hover {
    text-decoration: none;
}

.header-logo-img {
    height: 42px;
    width: auto;
    display: block;
}

.header-greeting {
    font-size: 0.9rem;
    color: #555;
}

.header-right nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-right nav a {
    font-size: 0.9rem;
    color: #333;
}

.header-right nav a:hover {
    color: #000;
}

/* Enlace activo en el nav de escritorio */
.nav-active {
    color: #000 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* Enlace activo en el menú móvil */
.nav-active-mobile {
    color: #000 !important;
    font-weight: 700 !important;
}

.btn-logout {
    background: none;
    border: 1px solid #aaa;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    color: #333;
}

.btn-logout:hover {
    background: #f0f0f0;
}

.mobile-menu .btn-mobile-logout-text {
    display: block;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: #000;
    font-weight: 700;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    width: 100%;
}

/* Menú móvil */
.btn-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: flex;
    flex-direction: column;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    border-top: 1px solid transparent;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.3s ease, border-color 0.3s ease;
}

.mobile-menu a,
.mobile-menu button {
    display: block;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: #333;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    width: 100%;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mobile-menu.open {
    max-height: 380px;
    opacity: 1;
    padding: 0.75rem 0;
    border-color: #eee;
}

.mobile-menu.open a,
.mobile-menu.open button {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open a:nth-child(1) { transition-delay: 0.04s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.08s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.12s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.16s; }
.mobile-menu.open a:nth-child(5) { transition-delay: 0.20s; }
.mobile-menu.open button { transition-delay: 0.24s; }

@media (max-width: 768px) {
    .header-right {
        display: none !important;
    }
    .header-greeting {
        display: none;
    }
    .btn-hamburger {
        display: block;
    }
    .site-header {
        padding: 0 1rem;
    }
    .site-main {
        padding: 0.25rem 1.25rem 1.5rem 1.25rem;
    }
    .messages-container {
        margin-top: 0.5rem !important;
        margin-bottom: 1.25rem !important;
    }
    .plan-banner {
        margin-bottom: 0.85rem !important;
    }
    .db-wrapper {
        padding-top: 0.85rem !important;
    }
    .auth-container {
        margin-top: 0.25rem !important;
    }
    .about-container {
        margin-top: 0.25rem !important;
    }
    .vr-wrapper {
        padding-top: 0.25rem !important;
    }
    .el-wrapper {
        margin-top: 0.25rem !important;
    }
    .hi-wrapper {
        padding-top: 0.25rem !important;
    }
    .dr-wrapper {
        padding-top: 0.25rem !important;
    }
}

/* ─── CONTENIDO PRINCIPAL ─────────────────── */
.site-main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0.25rem 2rem 2rem 2rem;
}

/* ─── FOOTER ─────────────────────────────── */
.site-footer {
    border-top: 1px solid #ddd;
    padding: 2.5rem 2rem 1.5rem;
    margin-top: auto;
    font-size: 0.875rem;
    color: #555;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .footer-columns .footer-col:first-child {
        grid-column: span 2;
    }
}

.footer-col h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #111;
    margin-bottom: 0.75rem;
}

.footer-col p,
.footer-col li {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.7;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-col a {
    color: #555;
}

.footer-col a:hover {
    color: #000;
}

.footer-social-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.15s ease-in-out;
}

.footer-social-links a:hover {
    text-decoration: none;
}

.footer-social-links a:hover span {
    text-decoration: underline;
}

.footer-social-links svg {
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid #ddd;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
}

/* ─── DASHBOARD: SELECCIÓN DE PLANTILLAS ─── */
.plantillas-header {
    text-align: center;
    margin-bottom: 2rem;
}

.plantillas-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.plantillas-header p {
    font-size: 0.95rem;
    color: #555;
}

.plantillas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.plantilla-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.plantilla-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.plantilla-card .plantilla-descripcion {
    font-size: 0.875rem;
    color: #555;
    line-height: 1.5;
}

.plantilla-card .plantilla-duracion {
    font-size: 0.85rem;
    font-weight: 600;
}

.plantilla-actividades {
    margin-top: 0.5rem;
}

.plantilla-actividades h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #333;
    margin-bottom: 0.35rem;
}

.plantilla-actividades ul {
    list-style: disc;
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.plantilla-actividades li {
    font-size: 0.82rem;
    color: #444;
}

.plantilla-card .btn-seleccionar {
    display: inline-block;
    margin-top: auto;
    padding: 0.5rem 1rem;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: #333;
}

.plantilla-card .btn-seleccionar:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.crear-desde-cero {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid #ddd;
    margin-top: 1rem;
}

.crear-desde-cero a {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: 2px dashed #aaa;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: #444;
    text-decoration: none;
}

.crear-desde-cero a:hover {
    border-color: #333;
    color: #111;
    text-decoration: none;
}

/* ─── CONFIGURAR RUTINA ─────────────────────── */

.config-page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.config-page-header small {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin-bottom: 0.4rem;
}

.config-page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.config-page-header p {
    font-size: 0.9rem;
    color: #555;
}

.config-form {
    max-width: 880px;
    margin: 0 auto;
}

/* Fila superior: Duración + Fecha lado a lado */
.config-row-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 3rem;
}

/* Fila de actividades: NN + Flex lado a lado */
.config-row-activities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 3rem;
}

@media (max-width: 640px) {
    .config-row-top,
    .config-row-activities {
        grid-template-columns: 1fr;
    }
}

/* Sección mitad: hereda los estilos base de config-section */
.config-section--half {
    border-top: 1px solid #ddd;
    padding: 1.5rem 0;
}

.config-section {
    border-top: 1px solid #ddd;
    padding: 1.75rem 0;
}

.config-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.config-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #666;
    margin: 1.2rem 0 0.6rem;
}

.section-desc {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

/* Duración: opciones como tarjetas */
.duration-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.duration-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: border-color 0.15s;
}

.duration-option:hover {
    border-color: #333;
}

.duration-option input[type="radio"] {
    margin: 0;
}

.duration-option:has(input:checked) {
    border-color: #111;
    font-weight: 700;
}

/* Campo de duración personalizada */
#grupo-duracion-personalizada {
    margin-top: 1rem;
}

#grupo-duracion-personalizada label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #444;
}

#grupo-duracion-personalizada input {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    width: 160px;
}

/* Fecha */
.config-section input[type="date"] {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Lista de actividades disponibles */
.activities-available {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.75rem;
}

.activity-item label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.35rem 0.25rem;
    border-radius: 4px;
}

.activity-item label:hover {
    background: #f5f5f5;
}

.activity-item input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* Lista de actividades seleccionadas */
.activities-selected {
    min-height: 48px;
    border: 1px dashed #ccc;
    border-radius: 6px;
    padding: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
}

.activities-selected .empty-msg {
    font-size: 0.82rem;
    color: #aaa;
    font-style: italic;
    margin: 0;
    width: 100%;
}

/* Tags de actividades seleccionadas */
.selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 99px;
    padding: 0.25rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Campo de actividades propias */
.custom-activity-input {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
}

.custom-activity-input:focus {
    outline: 2px solid #333;
    outline-offset: 1px;
}

/* Errores */
.form-errors {
    background-color: #fdf2f2;
    border: 1px solid #f5c2c2;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    color: #9b1c1c;
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-errors-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #9b1c1c;
    font-size: 0.9rem;
}

.form-errors ul {
    margin: 0;
    padding-left: 1.25rem;
}

.form-errors li {
    margin-top: 0.25rem;
    line-height: 1.4;
}

.field-error {
    font-size: 0.78rem;
    color: #9b1c1c;
    margin-top: 0.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Django default ul.errorlist styling */
ul.errorlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.errorlist li {
    font-size: 0.78rem;
    color: #9b1c1c;
    font-weight: 600;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

ul.errorlist li::before {
    content: "⚠️";
    font-size: 0.75rem;
}

/* Botón principal de creación */
.form-submit {
    padding: 2rem 0 1rem;
    text-align: center;
}

.form-submit button {
    font-size: 1rem;
    font-weight: 700;
    padding: 0.85rem 3rem;
    border: 2px solid #111;
    border-radius: 6px;
    background: #111;
    color: #fff;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.15s, color 0.15s;
}

.form-submit button:hover {
    background: #fff;
    color: #111;
}

.config-back {
    text-align: center;
    padding-bottom: 1.5rem;
    font-size: 0.875rem;
}

/* ─── AUTH PAGES (LOGIN / REGISTER) ─────── */
.auth-container {
    max-width: 560px;
    margin: 1rem auto 3rem auto;
    padding: 0 1.5rem;
}

.auth-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
    text-align: center;
    display: block;
}

.form-group input {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fafafa;
    color: #111;
    transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.form-group input:focus {
    outline: none;
    border-color: #111;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.05);
}

.form-group input:disabled {
    background-color: #eaeaea;
    color: #666666;
    cursor: not-allowed;
    border-color: #cccccc;
    opacity: 0.85;
}

.form-group .field-help {
    font-size: 0.75rem;
    color: #888;
    text-align: center;
    margin-top: 0.2rem;
}

.form-group .field-errors {
    font-size: 0.75rem;
    color: #c0392b;
    text-align: center;
    margin-top: 0.2rem;
}

/* Custom checkbox group for register and profile */
.form-group-checkbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 360px;
    margin: 0.5rem auto;
    padding: 0.25rem 0;
}

.form-group-checkbox label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4b5563;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-align: left !important;
    cursor: pointer;
    margin: 0;
    line-height: 1.4;
    display: inline-block !important;
}

.form-group-checkbox input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    background-color: #fafafa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease-in-out;
    margin: 0;
    flex-shrink: 0;
}

.form-group-checkbox input[type="checkbox"]:checked {
    background-color: #111;
    border-color: #111;
}

.form-group-checkbox input[type="checkbox"]:checked::before {
    content: "✔";
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.form-group-checkbox input[type="checkbox"]:focus {
    box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.15);
    border-color: #111;
}


.auth-submit-btn {
    width: 100%;
    max-width: 360px;
    margin: 0.5rem auto 0;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.85rem;
    border: 2px solid #111;
    border-radius: 6px;
    background: #111;
    color: #fff;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.auth-submit-btn:hover {
    background: #fff;
    color: #111;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #555;
}

.auth-footer a {
    color: #111;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-errors {
    background-color: #fdf2f2;
    border: 1px solid #f8b4b4;
    color: #9b1c1c;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.auth-errors ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ─── SOBRE NOSOTROS (ABOUT) ─────────────── */
.about-container {
    max-width: 900px;
    margin: 1rem auto 3rem auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 4.5rem;
}

.about-hero {
    text-align: center;
}

.about-main-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: #111;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
}

.about-main-title .accent-text {
    background: #111;
    color: #fff;
    padding: 0.1rem 0.6rem;
    border-radius: 4px;
}

.about-subtitle {
    font-size: 1.15rem;
    color: #555;
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto;
}

.about-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.about-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111;
    text-align: center;
    letter-spacing: -0.01em;
}

.about-content-box {
    width: 100%;
    max-width: 760px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 2.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
}

.about-content-box p {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.65;
}

.about-info-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 0.5rem;
    text-align: center;
}

.about-info-highlight .highlight-emoji {
    font-size: 2rem;
}

.about-info-highlight h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 0.5rem;
}

.about-info-highlight p {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.6;
}

/* Steps grid */
.about-steps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 760px;
}

@media (max-width: 600px) {
    .about-steps-grid {
        grid-template-columns: 1fr;
    }
}

.step-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.step-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #888;
    background: #f0f0f0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.step-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111;
}

.step-card p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

/* Evaluation Grid: Red (Failed) first, Yellow (Warning) second, Green (Success) third */
.evaluation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 760px;
}

@media (max-width: 768px) {
    .evaluation-grid {
        grid-template-columns: 1fr;
    }
}

.evaluation-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.evaluation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.status-emoji {
    font-size: 2.25rem;
}

.evaluation-card h3 {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.evaluation-card p {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.5;
}

/* Status variants */
.status-failed {
    border-top: 4px solid #e74c3c;
    background: #fdf2f2;
}

.status-failed h3 {
    color: #c0392b;
}

.status-warning {
    border-top: 4px solid #f1c40f;
    background: #fefdf0;
}

.status-warning h3 {
    color: #b78a00;
}

.status-success {
    border-top: 4px solid #2ecc71;
    background: #f0fdf4;
}

.status-success h3 {
    color: #1e7e34;
}

.about-footer-btn {
    text-align: center;
    margin-top: 1rem;
}

.about-footer-btn a {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.85rem 2.5rem;
    border: 2px solid #111;
    border-radius: 6px;
    background: #111;
    color: #fff;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    text-decoration: none;
}

.about-footer-btn a:hover {
    background: #fff;
    color: #111;
    text-decoration: none;
}

/* Opcion mostrar contraseña */
.password-wrapper {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    max-width: 100% !important;
    margin: 0 !important;
    padding-right: 2.75rem !important;
}

.toggle-password-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    transition: color 0.15s ease-in-out;
    z-index: 10;
}

.toggle-password-btn:hover {
    color: #111;
}

.toggle-password-btn svg {
    display: block;
    pointer-events: none;
}

/* Boton para remover tag de seleccionadas */
.selected-tag .remove-tag-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    color: #888;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem;
    border-radius: 50%;
    transition: color 0.15s, background-color 0.15s;
    margin-left: 0.25rem;
    width: 16px;
    height: 16px;
}

.selected-tag .remove-tag-btn:hover {
    color: #c0392b;
    background-color: rgba(192, 57, 43, 0.1);
}

/* ═══════════════════════════════════════════
   DASHBOARD — Rutina activa
═══════════════════════════════════════════ */

.db-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── Encabezado del día ── */
.db-header {
    text-align: center;
}

.db-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
}

.db-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    opacity: 0.55;
    text-transform: capitalize;
}

/* ── Cuerpo: gráfico + lista ── */
.db-body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
}

/* ── Columna derecha: grilla + donut ── */
.db-chart-aside {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
    justify-content: flex-start;
}

/* Contenedor de la grilla con su título */
.db-day-grid-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.db-day-grid-title {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.4;
    margin: 0;
    text-align: center;
}

/* Grilla de días del Monk Mode */
.db-day-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    width: 120px;
}

.db-day-cell {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    display: block;
}

.db-cell-success  { background: var(--monk-green,  #2ecc71); opacity: 0.9; }
.db-cell-mid      { background: var(--monk-yellow, #f1c40f); opacity: 0.9; }
.db-cell-fail     { background: var(--monk-accent, #e74c3c); opacity: 0.9; }
.db-cell-today    { outline: 2px dashed var(--monk-text, #000); transform: scale(1.15); box-shadow: 0 0 4px rgba(128, 128, 128, 0.25); z-index: 1; }
.db-cell-future   { background: rgba(128, 128, 128, 0.12); }
.db-cell-viewed   { outline: 2px dashed rgba(128, 128, 128, 0.85); transform: scale(1.15); box-shadow: 0 0 4px rgba(128, 128, 128, 0.25); z-index: 1; }

.db-donut-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.db-donut-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.db-donut-bg {
    stroke: currentColor;
    opacity: 0.1;
    color: #888;
}

.db-donut-arc {
    stroke: currentColor;
    transition: stroke-dasharray 0.5s ease;
}

/* Colores del arco según el estado del día */
.stroke-monk-accent { color: var(--monk-accent, #e74c3c); }
.stroke-monk-yellow  { color: var(--monk-yellow,  #f1c40f); }
.stroke-monk-green   { color: var(--monk-green,   #2ecc71); }

.db-donut-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.db-donut-pct {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}

/* Colores del porcentaje según estado */
.text-monk-accent { color: var(--monk-accent, #e74c3c); }
.text-monk-yellow  { color: var(--monk-yellow,  #f1c40f); }
.text-monk-green   { color: var(--monk-green,   #2ecc71); }

.db-donut-caption {
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.55;
    font-weight: 700;
    text-align: center;
    max-width: 80px;
    line-height: 1.1;
}

/* ── Lista de actividades ── */
.db-activities {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    grid-row: 1;
    grid-column: 1;
}

.db-activity-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.db-group-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    opacity: 0.9;
    margin: 0.5rem 0;
}

.db-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Contenedor-tarjeta de cada actividad (es un <button> que ocupa todo el ancho) */
.db-activity-list li {
    margin: 0;
    padding: 0;
}

.db-activity-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.4rem;
    background: rgba(128, 128, 128, 0.06);
    border: 1px solid rgba(128, 128, 128, 0.14);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    transition: background 0.15s, border-color 0.15s, opacity 0.2s;
}

.db-activity-card:hover {
    background: rgba(128, 128, 128, 0.12);
    border-color: rgba(128, 128, 128, 0.25);
}

.db-activity-done {
    opacity: 0.45;
}

.db-activity-done .db-activity-name {
    text-decoration: line-through;
}

.db-check-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 1.1rem;
    text-align: center;
}

.db-activity-name {
    font-size: 0.95rem;
}

.db-activity-empty {
    font-size: 0.85rem;
    opacity: 0.45;
    padding: 0.5rem 0;
}

/* ── Mensaje de completado ── */
.db-complete-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0 0;
    text-align: center;
}

.db-complete-msg span {
    font-size: 2rem;
}

.db-complete-msg p {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

.db-footer {
    text-align: center;
    padding-top: 0;
}

.db-view-full-btn {
    display: inline-block;
    padding: 0.7rem 2rem;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.15s, border-color 0.15s;
}

.db-view-full-btn:hover {
    background: rgba(128, 128, 128, 0.1);
    border-color: rgba(128, 128, 128, 0.5);
}

/* ── Responsive: móvil ── */
@media (max-width: 768px) {
    .site-main {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    .db-wrapper,
    .hi-wrapper,
    .dr-wrapper,
    .vr-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        align-items: stretch !important;
    }
    .db-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }
    .db-header > div {
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .db-title {
        justify-content: center !important;
        text-align: center !important;
    }
    .db-subtitle {
        text-align: center !important;
    }
    .db-body {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        align-items: stretch !important;
        width: 100% !important;
    }
    .db-activities,
    .db-activity-group,
    .db-activity-list {
        width: 92% !important;
        max-width: 92% !important;
        margin-left: 1.25rem !important;
        margin-right: auto !important;
        align-items: stretch !important;
    }
    .db-group-title {
        text-align: left !important;
        padding-left: 0.25rem !important;
    }
    .db-activity-list li,
    .db-activity-card {
        width: 100% !important;
    }
    .hi-list,
    .dr-days-list,
    .vr-days-list {
        width: 92% !important;
        max-width: 92% !important;
        margin-left: 1.25rem !important;
        margin-right: auto !important;
        align-items: stretch !important;
    }
    .hi-card,
    .dr-day-item,
    .vr-day-card {
        width: 100% !important;
    }
    .db-chart-aside {
        flex-direction: row;
        justify-content: center;
        gap: 2.5rem;
        width: 100%;
    }
}

/* ── Ver Día: cabecera reestructurada (vd-header-*) ── */
/* Sobreescribe el flex horizontal del .db-header streak badge
   para este caso específico donde no hay streak */
.vd-header {
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.vd-header-text {
    text-align: center;
}

.vd-header-nav {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 0.2rem;
}

.vd-back {
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0.45;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: opacity 0.15s;
}

.vd-back:hover {
    opacity: 0.85;
}


/* ═══════════════════════════════════════════
   VER RUTINA — Lista de días del Monk Mode
═══════════════════════════════════════════ */

.vr-wrapper {
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem 1.25rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* ── Encabezado ── */
.vr-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.vr-back {
    align-self: flex-start;
    font-size: 0.82rem;
    opacity: 0.5;
    text-decoration: none;
    transition: opacity 0.15s;
    margin-bottom: 0.75rem;
}

.vr-back:hover {
    opacity: 1;
}

.vr-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
}

.vr-frase {
    font-size: 1rem;
    font-style: italic;
    opacity: 0.6;
    margin: 0.25rem 0 0;
    max-width: 460px;
}

.vr-meta {
    font-size: 0.8rem;
    opacity: 0.4;
    margin: 0;
    text-transform: capitalize;
}

/* ── Lista de días ── */
.vr-days-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vr-days-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.vr-day-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(128, 128, 128, 0.15);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    cursor: pointer;
}

.vr-day-card:hover {
    background: rgba(128, 128, 128, 0.07);
    transform: translateX(3px);
}

/* Punto de color */
.vr-day-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.vr-dot-neutral { background: rgba(128, 128, 128, 0.35); }
.vr-dot-success { background: var(--monk-green,  #2ecc71); }
.vr-dot-mid     { background: var(--monk-yellow, #f1c40f); }
.vr-dot-fail    { background: var(--monk-accent, #e74c3c); }

/* Número y fecha */
.vr-day-label {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.1rem;
}

.vr-day-num {
    font-size: 0.9rem;
    font-weight: 600;
}

.vr-day-date {
    font-size: 0.75rem;
    opacity: 0.45;
}

/* Badge "Hoy" */
.vr-day-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    border: 1px solid rgba(128, 128, 128, 0.4);
    opacity: 0.7;
}

/* Flecha */
.vr-day-arrow {
    font-size: 1.1rem;
    opacity: 0.3;
    flex-shrink: 0;
}

/* ── Zona de peligro ── */
.vr-danger-zone {
    border: 1px solid rgba(231, 76, 60, 0.35);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.vr-danger-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vr-danger-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--monk-accent, #e74c3c);
}

.vr-danger-desc {
    font-size: 0.85rem;
    opacity: 0.65;
    margin: 0;
    line-height: 1.55;
}

.vr-danger-btn-wrap {
    display: flex;
    justify-content: center;
    padding-top: 0.25rem;
}

/* Botón estilo GitHub "delete repo" */
.vr-delete-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--monk-accent, #e74c3c);
    border-radius: 8px;
    color: var(--monk-accent, #e74c3c);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.15s, color 0.15s;
}

.vr-delete-btn:hover {
    background: var(--monk-accent, #e74c3c);
    color: #fff;
}


/* ═══════════════════════════════════════════
   ELIMINAR RUTINA — Confirmación de eliminación
═══════════════════════════════════════════ */

.el-wrapper {
    max-width: 480px;
    margin: 1rem auto 3.5rem auto;
    padding: 0 1.25rem;
}

.el-card {
    background: #fff;
    border: 1px solid rgba(231, 76, 60, 0.35);
    border-radius: 12px;
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.04);
}

.el-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-align: center;
}

.el-alert-icon {
    font-size: 2.5rem;
    color: var(--monk-accent, #e74c3c);
    line-height: 1;
}

.el-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--monk-accent, #e74c3c);
    margin: 0;
    letter-spacing: -0.2px;
}

.el-body {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.el-warning-text {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
    margin: 0;
}

.el-consequences {
    background: rgba(231, 76, 60, 0.04);
    border-left: 3px solid var(--monk-accent, #e74c3c);
    padding: 0.85rem 1rem;
    border-radius: 4px;
    font-size: 0.82rem;
}

.el-danger-title {
    font-weight: 700;
    color: var(--monk-accent, #e74c3c);
    margin: 0 0 0.4rem;
}

.el-consequences ul {
    margin: 0;
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    opacity: 0.75;
}

.el-prompt-text {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0.5rem 0 0;
}

.el-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.el-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.el-input:focus {
    border-color: var(--monk-accent, #e74c3c);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.el-delete-btn {
    width: 100%;
    padding: 0.75rem;
    background: rgba(128, 128, 128, 0.1);
    color: rgba(128, 128, 128, 0.5);
    border: 1px solid rgba(128, 128, 128, 0.15);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: not-allowed;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.el-delete-btn.active {
    background: var(--monk-accent, #e74c3c);
    color: #fff;
    border-color: var(--monk-accent, #e74c3c);
    cursor: pointer;
}

.el-delete-btn.active:hover {
    background: #c0392b;
    border-color: #c0392b;
}

.el-footer {
    text-align: center;
    margin-top: 0.5rem;
}

.el-cancel-link {
    font-size: 0.85rem;
    opacity: 0.55;
    text-decoration: none;
    transition: opacity 0.15s;
}

.el-cancel-link:hover {
    opacity: 1;
    text-decoration: underline;
}


/* ═══════════════════════════════════════════
   HISTORIAL — Lista de Monk Modes completados
═══════════════════════════════════════════ */

.hi-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 1rem 1.25rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hi-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hi-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hi-subtitle {
    font-size: 0.9rem;
    opacity: 0.55;
    max-width: 440px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ── Lista de tarjetas ── */
.hi-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hi-card {
    display: block;
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    cursor: pointer;
}

.hi-card:hover {
    border-color: rgba(128, 128, 128, 0.5);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.hi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.12);
}

.hi-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.hi-card-dates {
    font-size: 0.82rem;
    opacity: 0.55;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.hi-arrow {
    opacity: 0.4;
}

.hi-view-btn {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.4;
    white-space: nowrap;
    transition: opacity 0.15s;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.hi-card:hover .hi-view-btn {
    opacity: 0.85;
}

/* ── Actividades dentro de la tarjeta ── */
.hi-card-activities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
}

.hi-activity-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.hi-activity-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.4;
    margin: 0 0 0.2rem;
}

.hi-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.hi-activity-list li {
    font-size: 0.82rem;
    opacity: 0.7;
    line-height: 1.4;
}

/* ── Estado vacío ── */
.hi-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    padding: 3rem 1.5rem;
}

.hi-empty-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

.hi-empty-title {
    font-size: 1.05rem;
    font-weight: 700;
    opacity: 0.65;
    margin: 0;
}

.hi-empty-text {
    font-size: 0.85rem;
    opacity: 0.45;
    max-width: 340px;
    line-height: 1.6;
    margin: 0;
}

/* ── Footer de navegación ── */
.hi-footer {
    text-align: center;
}

.hi-back-link {
    font-size: 0.85rem;
    opacity: 0.45;
    text-decoration: none;
    transition: opacity 0.15s;
}

.hi-back-link:hover {
    opacity: 1;
}

@media (max-width: 540px) {
    .hi-card-activities {
        grid-template-columns: 1fr;
    }
    .hi-card-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}


/* ═══════════════════════════════════════════
   DETALLE RUTINA HISTÓRICA — dr-*
═══════════════════════════════════════════ */

.dr-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 1rem 1.25rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dr-header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.dr-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0.4rem 0 0;
}

.dr-dates {
    font-size: 0.85rem;
    opacity: 0.5;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ── Grilla de estadísticas ── */
.dr-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.dr-stat-card {
    border: 1px solid rgba(128, 128, 128, 0.18);
    border-radius: 10px;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    text-align: center;
}

.dr-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.dr-stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.45;
    font-weight: 600;
}

.dr-val--green { color: var(--monk-green, #2ecc71); }
.dr-val--yellow { color: var(--monk-yellow, #f1c40f); }
.dr-val--red { color: var(--monk-accent, #e74c3c); }

@media (max-width: 540px) {
    .dr-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Desglose de días ── */
.dr-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dr-breakdown-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.4;
    margin: 0;
}

.dr-days-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.dr-day-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s;
    font-size: 0.88rem;
}

.dr-day-item:hover {
    background: rgba(128, 128, 128, 0.06);
    border-color: rgba(128, 128, 128, 0.15);
    text-decoration: none;
    color: inherit;
}

.dr-day-dot {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    flex-shrink: 0;
}

.dr-day--success .dr-day-dot { background: var(--monk-green, #2ecc71); }
.dr-day--mid     .dr-day-dot { background: var(--monk-yellow, #f1c40f); }
.dr-day--fail    .dr-day-dot { background: var(--monk-accent, #e74c3c); }

.dr-day-num {
    font-weight: 700;
    min-width: 48px;
}

.dr-day-date {
    opacity: 0.45;
    font-size: 0.82rem;
}

.dr-day-status {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.5;
}

.dr-day--success .dr-day-status { color: var(--monk-green, #2ecc71); opacity: 0.85; }
.dr-day--mid     .dr-day-status { color: var(--monk-yellow, #f1c40f); opacity: 0.85; }
.dr-day--fail    .dr-day-status { color: var(--monk-accent, #e74c3c); opacity: 0.85; }


/* ═══════════════════════════════════════════
   DASHBOARD: Streak Counter  (db-streak-*)
═══════════════════════════════════════════ */

/* db-header needs flex to position streak on the right */
.db-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.db-streak {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(241, 196, 15, 0.08);
    border: 1px solid rgba(241, 196, 15, 0.25);
    border-radius: 20px;
    padding: 0.35rem 0.8rem;
    flex-shrink: 0;
}

.db-streak-icon {
    font-size: 1rem;
    line-height: 1;
}

.db-streak-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--monk-yellow, #f1c40f);
    letter-spacing: 0.02em;
}


/* ═══════════════════════════════════════════
   DASHBOARD: Grid cells as clickable links
═══════════════════════════════════════════ */

a.db-day-cell {
    display: block;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.1s;
}

a.db-day-cell:hover {
    transform: scale(1.18);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    z-index: 1;
    position: relative;
}


/* ═══════════════════════════════════════════
   DASHBOARD: Journal / Diario  (db-journal-*)
═══════════════════════════════════════════ */

.db-journal-box {
    margin-top: 1.5rem;
    border: 1px solid rgba(128, 128, 128, 0.15);
    border-radius: 12px;
    padding: 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.db-journal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.db-journal-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.5;
    margin: 0;
}

.db-journal-textarea {
    width: 100%;
    min-height: 90px;
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
    font-family: inherit;
    line-height: 1.55;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.db-journal-textarea:focus {
    outline: none;
    border-color: rgba(128, 128, 128, 0.5);
}

/* Estados del Autoguardado */
.db-journal-status {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(128, 128, 128, 0.4);
    transition: color 0.15s;
    letter-spacing: 0.02em;
}

.db-journal-status--typing {
    color: rgba(128, 128, 128, 0.7);
}

.db-journal-status--saving {
    color: var(--monk-yellow, #f1c40f);
}

.db-journal-status--ok {
    color: rgba(128, 128, 128, 0.75);
}

.db-journal-status--err {
    color: var(--monk-accent, #e74c3c);
}

.db-journal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.25rem;
}

.db-journal-counter {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(128, 128, 128, 0.65);
    letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════
   CONFIRMACIÓN DE LOGOUT (MODAL)
   ═══════════════════════════════════════════ */
.logout-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: logoutFadeIn 0.2s ease-out;
}

.logout-modal-content {
    background: #fff;
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 14px;
    padding: 2.25rem 2.5rem;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    animation: logoutScaleUp 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logout-modal-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111;
    margin: 0;
    letter-spacing: -0.02em;
}

.logout-modal-content p {
    font-size: 0.92rem;
    color: #666;
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

.logout-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.btn-modal-cancel {
    background: #fff;
    border: 1px solid rgba(128, 128, 128, 0.25);
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-modal-cancel:hover {
    background: rgba(128, 128, 128, 0.05);
    color: #111;
    border-color: rgba(128, 128, 128, 0.4);
}

.btn-modal-confirm {
    background: #000;
    border: 1px solid #000;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    transition: background 0.15s, border-color 0.15s;
}

.btn-modal-confirm:hover {
    background: #333;
    border-color: #333;
}

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

@keyframes logoutScaleUp {
    from { transform: scale(0.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ─── BOTÓN DE GOOGLE OAUTH ─── */
.auth-divider {
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eee;
}

.auth-divider::before {
    margin-right: 10px;
}

.auth-divider::after {
    margin-left: 10px;
}

.auth-google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    border: 1px solid #ccc;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    transition: background 0.15s, border-color 0.15s;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.auth-google-btn:hover {
    background: #fbfbfb;
    border-color: #999;
    text-decoration: none;
    color: #111;
}

/* Reordenamiento móvil para priorizar Google Login arriba y mantener la baja abajo */
@media (max-width: 768px) {
    .auth-card {
        display: flex;
        flex-direction: column;
    }
    
    .auth-title {
        order: 1;
    }
    
    .auth-google-btn {
        order: 2;
        margin-top: 0.5rem;
        margin-bottom: 0;
    }
    
    .auth-divider {
        order: 3;
        margin: 1.25rem 0;
    }
    
    .auth-form {
        order: 4;
    }
    
    .perfil-cancellation-section {
        order: 5;
    }
    
    .auth-footer {
        order: 6;
    }
}

/* ─── ALERTAS Y MENSAJES (DJANGO FLASH MESSAGES) ─── */
.messages-container {
    max-width: 800px;
    margin: 1.5rem auto 1.25rem auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: alertSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.95rem 1.25rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.45;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.025);
    border: 1px solid;
    position: relative;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-icon {
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.alert-close-btn {
    background: none;
    border: none;
    font-size: 1.15rem;
    color: inherit;
    opacity: 0.45;
    cursor: pointer;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s;
}

.alert-close-btn:hover {
    opacity: 0.85;
}

/* Colores curados premium */
.alert-success {
    background-color: #f0fdf4;
    border-color: #dcfce7;
    color: #14532d;
}

.alert-warning, .alert-info {
    background-color: #fffbeb;
    border-color: #fef3c7;
    color: #78350f;
}

.alert-error {
    background-color: #fef2f2;
    border-color: #fee2e2;
    color: #7f1d1d;
}

.alert-default {
    background-color: #f8fafc;
    border-color: #f1f5f9;
    color: #0f172a;
}

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



