/* =====================================================
   monchomania - Hoja de estilos personalizada
   Rojo elegante (#C0392B) + tipografías con personalidad
   ===================================================== */

:root {
    --mm-primary: #C0392B;
    --mm-primary-dark: #96281B;
    --mm-primary-darker: #7B2115;
    --mm-primary-soft: #FBEFED;

    --mm-accent: #D4A017;          /* dorado cálido */
    --mm-accent-soft: #FBF3E0;

    --mm-dark: #2C3E50;
    --mm-muted: #7F8C8D;
    --mm-light: #F8F9FA;
    --mm-border: #E9ECEF;

    --mm-radius: 1rem;
    --mm-shadow: 0 8px 24px rgba(44, 62, 80, 0.08);
    --mm-shadow-hover: 0 14px 34px rgba(44, 62, 80, 0.15);

    --font-brand: 'Bungee', 'Titan One', cursive;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

/* ---------- Base ---------- */
body {
    font-family: var(--font-body);
    background: var(--mm-light);
    color: var(--mm-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

a { color: var(--mm-primary); }
a:hover { color: var(--mm-primary-dark); }

/* ---------- Marca / tipografía del título ---------- */
.mm-brand {
    font-family: var(--font-brand);
    font-size: 1.3rem;
    color: #fff !important;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 8px;
    background: var(--mm-accent);
    color: #fff;
    border-radius: 50%;
    font-size: 1.1rem;
}

.mm-brand-lg {
    font-family: var(--font-brand);
    font-size: 2.3rem;
    color: var(--mm-primary);
    line-height: 1.1;
}

.mm-brand-sm {
    font-family: var(--font-brand);
    font-size: 1.1rem;
    color: var(--mm-primary);
}

.display-title {
    font-family: var(--font-brand);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    letter-spacing: 1px;
}

/* ---------- Navbar ---------- */
.mm-navbar {
    background: linear-gradient(135deg, #B71C1C 0%, var(--mm-primary) 55%, var(--mm-primary-dark) 100%);
    box-shadow: 0 4px 14px rgba(123, 33, 21, 0.25);
}

.mm-navbar .nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
}
.mm-navbar .nav-link:hover { color: #fff !important; }

.mm-navbar .dropdown-menu {
    border: none;
    border-radius: 0.75rem;
    box-shadow: var(--mm-shadow-hover);
}

.nav-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 7px;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.mm-btn-outline {
    border-radius: 50rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--mm-primary) !important;
}

/* ---------- Hero (landing) ---------- */
.mm-hero {
    background:
        radial-gradient(ellipse at 20% 10%, rgba(212, 160, 23, 0.35), transparent 45%),
        linear-gradient(135deg, #B71C1C 0%, var(--mm-primary) 50%, var(--mm-primary-dark) 100%);
}

.mm-feature-icon {
    font-size: 3rem;
}

/* ---------- Contenedor de autenticación ---------- */
.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background:
        radial-gradient(ellipse at 80% 10%, rgba(212, 160, 23, 0.18), transparent 40%),
        linear-gradient(180deg, var(--mm-primary-soft) 0%, var(--mm-light) 60%);
}

/* ---------- Tarjetas ---------- */
.mm-card {
    border: none;
    border-radius: var(--mm-radius);
    box-shadow: var(--mm-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mm-card:hover {
    box-shadow: var(--mm-shadow-hover);
}
.mm-card-header {
    background: var(--mm-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--mm-radius) var(--mm-radius) 0 0 !important;
}

/* ---------- Botones ---------- */
.btn-primary {
    background: var(--mm-primary);
    border-color: var(--mm-primary);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--mm-primary-dark);
    border-color: var(--mm-primary-dark);
}
.btn-outline-primary {
    color: var(--mm-primary);
    border-color: var(--mm-primary);
}
.btn-outline-primary:hover {
    background: var(--mm-primary);
    border-color: var(--mm-primary);
}
.btn-outline-danger { color: var(--mm-primary); border-color: var(--mm-primary); }
.btn-outline-danger:hover { background: var(--mm-primary); border-color: var(--mm-primary); }
.btn-outline-success { color: #1E8449; border-color: #1E8449; }
.btn-outline-success:hover { background: #1E8449; border-color: #1E8449; }

/* ---------- Calendario ---------- */
.mm-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mm-muted);
    margin-bottom: 0.5rem;
}

.mm-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.mm-day {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    border: 1px solid var(--mm-border);
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    font-weight: 500;
    color: var(--mm-dark);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.mm-day.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.mm-day .day-num { font-size: 1.05rem; }

.mm-day.today {
    border: 2px solid var(--mm-primary);
    background: #fff;
}

.mm-day.has-birthday {
    background: linear-gradient(160deg, #FDF0EE, #FBDFDC);
    border-color: #F3C1BA;
    cursor: pointer;
}
.mm-day.has-birthday:hover {
    transform: translateY(-3px);
    box-shadow: var(--mm-shadow-hover);
}

.mm-day.multi {
    background: linear-gradient(160deg, #FDEBD9, #F8D9B8);
    border-color: #F0C48D;
}

.mm-day .bday-dot {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 7px;
    height: 7px;
    background: var(--mm-accent);
    border-radius: 50%;
}

.mm-day .bday-count {
    font-size: 0.62rem;
    background: var(--mm-primary);
    color: #fff;
    border-radius: 20px;
    padding: 1px 7px;
    margin-top: 2px;
}

.mm-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    font-size: 0.82rem;
    color: var(--mm-muted);
}
.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}
.legend-birthday { background: #F3C1BA; }
.legend-today { background: var(--mm-primary); }
.legend-gold { background: var(--mm-accent); }

/* ---------- Tarjeta de persona en el modal ---------- */
.mm-person-card {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    border: 1px solid var(--mm-border);
    border-radius: 0.85rem;
    padding: 0.75rem;
    background: #fff;
    height: 100%;
}
.mm-person-card img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--mm-primary-soft);
}

/* ---------- Comentarios ---------- */
.mm-comments {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.mm-comment {
    display: flex;
    gap: 0.6rem;
}
.mm-comment img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.mm-comment .bubble {
    background: var(--mm-light);
    border-radius: 0 12px 12px 12px;
    padding: 0.5rem 0.8rem;
    font-size: 0.88rem;
    display: inline-block;
    word-break: break-word;
}

/* ---------- Noticias ---------- */
.mm-news-card { overflow: hidden; }
.mm-news-card:hover { transform: none; }
.mm-news-media img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}
.mm-news-media video {
    width: 100%;
    display: block;
}
.mm-quote {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-style: italic;
    font-weight: 500;
    color: var(--mm-dark);
    background: var(--mm-primary-soft);
    border-left: 5px solid var(--mm-accent);
}

/* ---------- Avatar ---------- */
.mm-avatar-lg {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: var(--mm-shadow);
}

/* ---------- Badges ---------- */
.mm-badge-active {
    background: #D5F5E3;
    color: #1E8449;
    font-weight: 600;
}
.mm-badge-inactive {
    background: #FADBD8;
    color: var(--mm-primary-darker);
    font-weight: 600;
}
.mm-badge-role {
    background: var(--mm-primary-soft);
    color: var(--mm-primary-dark);
    font-weight: 600;
}
.mm-zone {
    background: var(--mm-accent-soft);
    color: #8A6D1B;
    font-weight: 600;
}

/* ---------- Tablas ---------- */
.mm-table td img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}
.mm-tabs .nav-link {
    color: var(--mm-muted);
    font-family: var(--font-heading);
    font-weight: 600;
}
.mm-tabs .nav-link.active {
    color: var(--mm-primary);
    border-color: var(--mm-primary) var(--mm-primary) transparent;
}

/* ---------- Header de modales ---------- */
.mm-modal-header {
    background: linear-gradient(135deg, #B71C1C, var(--mm-primary-dark));
    color: #fff;
}

/* ---------- Footer ---------- */
.mm-footer {
    background: #fff;
    border-top: 1px solid var(--mm-border);
}

/* ---------- Botón ojito (mostrar/ocultar contraseña) ---------- */
.password-toggle {
    color: var(--mm-muted);
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    z-index: 5;
}
.password-toggle:hover { color: var(--mm-primary); }
.password-toggle:focus { box-shadow: none; color: var(--mm-primary); }
.password-toggle svg { width: 18px; height: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 576px) {
    .mm-day .day-num { font-size: 0.9rem; }
    .mm-day .bday-count { padding: 0 5px; font-size: 0.55rem; }
    .mm-person-card img { width: 52px; height: 52px; }
}
