﻿/* =========================================================
   Mi Red - Contactos / Buscar docentes
   Archivo dedicado: wwwroot/css/people.css
========================================================= */

.mired-content .mired-page-header {
    margin-bottom: 22px !important;
}

    .mired-content .mired-page-header h1 {
        margin: 0 !important;
        color: #ffffff !important;
        font-size: clamp(2.2rem, 4vw, 3.25rem) !important;
        font-weight: 950 !important;
        letter-spacing: -0.055em !important;
    }

    .mired-content .mired-page-header p {
        margin: 10px 0 0 !important;
        color: #a9bbd4 !important;
        font-size: 1.02rem !important;
        line-height: 1.55 !important;
    }

/* ===== KPIs superiores ===== */

.mired-kpi-card {
    position: relative !important;
    overflow: hidden !important;
    min-height: 132px !important;
    padding: 22px !important;
    border-radius: 26px !important;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 42%), linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96)) !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
}

    .mired-kpi-card::before {
        content: "" !important;
        position: absolute !important;
        inset: 0 !important;
        pointer-events: none !important;
        background: linear-gradient(90deg, rgba(56, 189, 248, 0.14), transparent 46%, rgba(37, 99, 235, 0.12)) !important;
        opacity: 0.8 !important;
    }

    .mired-kpi-card .mired-muted {
        position: relative !important;
        z-index: 1 !important;
        display: block !important;
        color: #9fb3cf !important;
        font-weight: 850 !important;
        letter-spacing: 0.01em !important;
    }

.mired-kpi {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 14px !important;
    color: #ffffff !important;
    font-size: 2.45rem !important;
    line-height: 1 !important;
    font-weight: 950 !important;
    letter-spacing: -0.06em !important;
}

/* ===== Tabs ===== */

.mired-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: center !important;
}

.mired-tab {
    position: relative !important;
    min-height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    padding: 12px 18px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    color: #c7d2e5 !important;
    background: rgba(15, 23, 42, 0.66) !important;
    font-weight: 950 !important;
    cursor: pointer !important;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease !important;
}

    .mired-tab:hover {
        transform: translateY(-1px) !important;
        color: #ffffff !important;
        border-color: rgba(96, 165, 250, 0.50) !important;
        background: rgba(30, 64, 175, 0.26) !important;
    }

    .mired-tab.active {
        color: #ffffff !important;
        border-color: rgba(56, 189, 248, 0.72) !important;
        background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.30), transparent 48%), linear-gradient(135deg, rgba(37, 99, 235, 0.58), rgba(14, 165, 233, 0.28)) !important;
        box-shadow: 0 16px 42px rgba(14, 165, 233, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    }

.mired-nav-badge {
    min-width: 24px !important;
    height: 24px !important;
    display: inline-grid !important;
    place-items: center !important;
    padding: 0 7px !important;
    border-radius: 999px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #ef4444, #f97316) !important;
    border: 1px solid rgba(254, 202, 202, 0.34) !important;
    font-size: 0.78rem !important;
    font-weight: 950 !important;
}

/* ===== Buscador ===== */

.mired-search-card {
    border-radius: 28px !important;
    padding: 24px !important;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.15), transparent 42%), rgba(15, 23, 42, 0.76) !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
}

    .mired-search-card label {
        display: block !important;
        margin-bottom: 12px !important;
        color: #bcd0ec !important;
        font-weight: 950 !important;
    }

.mired-search-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: center !important;
}

    .mired-search-row .mired-input {
        min-height: 48px !important;
        border-radius: 16px !important;
        border: 1px solid rgba(148, 163, 184, 0.24) !important;
        background: rgba(2, 6, 23, 0.74) !important;
        color: #e5edf8 !important;
        padding-inline: 16px !important;
        font-weight: 750 !important;
    }

        .mired-search-row .mired-input:focus {
            outline: none !important;
            border-color: rgba(56, 189, 248, 0.72) !important;
            box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12) !important;
        }

/* ===== Resultados / filas de usuarios ===== */

.mired-user-results {
    display: grid !important;
    gap: 14px !important;
}

.mired-user-row {
    position: relative !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-columns: 64px minmax(0, 1fr) auto !important;
    gap: 16px !important;
    align-items: center !important;
    padding: 18px !important;
    border-radius: 26px !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.13), transparent 42%), linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94)) !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease !important;
}

    .mired-user-row:hover {
        transform: translateY(-2px) !important;
        border-color: rgba(56, 189, 248, 0.38) !important;
        box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(56, 189, 248, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
    }

    .mired-user-row::after {
        content: "" !important;
        position: absolute !important;
        inset: auto 0 0 0 !important;
        height: 2px !important;
        background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.52), transparent) !important;
        opacity: 0 !important;
        transition: opacity 0.16s ease !important;
    }

    .mired-user-row:hover::after {
        opacity: 1 !important;
    }

.mired-avatar-button {
    width: 58px !important;
    height: 58px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 22px !important;
    border: 1px solid rgba(125, 211, 252, 0.30) !important;
    color: #ffffff !important;
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.34), transparent 58%), linear-gradient(145deg, rgba(37, 99, 235, 0.64), rgba(14, 165, 233, 0.28)) !important;
    font-size: 1rem !important;
    font-weight: 950 !important;
    cursor: pointer !important;
    box-shadow: 0 16px 36px rgba(14, 165, 233, 0.16) !important;
}

    .mired-avatar-button:hover {
        border-color: rgba(125, 211, 252, 0.64) !important;
        transform: translateY(-1px) !important;
    }

.mired-user-info {
    min-width: 0 !important;
}

.mired-author-link {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #ffffff !important;
    font-size: 1.08rem !important;
    font-weight: 950 !important;
    text-align: left !important;
    cursor: pointer !important;
}

    .mired-author-link:hover {
        color: #7dd3fc !important;
        text-decoration: underline !important;
        text-underline-offset: 4px !important;
    }

.mired-user-info p {
    margin: 5px 0 0 !important;
    color: #9fb3cf !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere !important;
}

.mired-contact-unread {
    width: fit-content !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: 10px !important;
    padding: 7px 11px !important;
    border-radius: 999px !important;
    color: #bbf7d0 !important;
    background: rgba(34, 197, 94, 0.12) !important;
    border: 1px solid rgba(34, 197, 94, 0.26) !important;
    font-size: 0.82rem !important;
    font-weight: 950 !important;
}

.mired-user-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    gap: 10px !important;
}

    .mired-user-actions .mired-action-button {
        min-height: 42px !important;
        border-radius: 15px !important;
        padding-inline: 15px !important;
        font-weight: 950 !important;
    }

.mired-action-added,
.mired-action-button:disabled {
    opacity: 0.72 !important;
    cursor: not-allowed !important;
    border-color: rgba(34, 197, 94, 0.30) !important;
    background: rgba(34, 197, 94, 0.14) !important;
    color: #bbf7d0 !important;
}

/* ===== Estados vacíos ===== */

.mired-user-results > .mired-card {
    border-radius: 28px !important;
    padding: 28px !important;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 40%), rgba(15, 23, 42, 0.74) !important;
    border: 1px solid rgba(148, 163, 184, 0.17) !important;
}

    .mired-user-results > .mired-card h2 {
        margin-top: 0 !important;
        color: #ffffff !important;
        font-size: 1.45rem !important;
        font-weight: 950 !important;
    }

/* ===== Alertas dentro de Contactos ===== */

.mired-content > .mired-alert {
    border-radius: 18px !important;
    padding: 14px 16px !important;
    margin-bottom: 18px !important;
    font-weight: 850 !important;
}

/* ===== Responsive ===== */

@media (max-width: 1100px) {
    .mired-search-row {
        grid-template-columns: 1fr !important;
    }

        .mired-search-row .mired-action-button {
            width: 100% !important;
        }

    .mired-user-row {
        grid-template-columns: 58px minmax(0, 1fr) !important;
    }

    .mired-user-actions {
        grid-column: 1 / -1 !important;
        justify-content: flex-start !important;
        padding-left: 74px !important;
    }
}

@media (max-width: 760px) {
    .mired-content .mired-page-header h1 {
        font-size: 2.05rem !important;
    }

    .mired-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding-bottom: 8px !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x !important;
    }

    .mired-tab {
        flex: 0 0 auto !important;
        min-width: max-content !important;
    }

    .mired-user-row {
        grid-template-columns: 52px minmax(0, 1fr) !important;
        padding: 15px !important;
        border-radius: 22px !important;
    }

    .mired-avatar-button {
        width: 50px !important;
        height: 50px !important;
        border-radius: 18px !important;
    }

    .mired-user-actions {
        padding-left: 0 !important;
        justify-content: stretch !important;
    }

        .mired-user-actions .mired-action-button {
            flex: 1 1 150px !important;
        }

    .mired-kpi-card {
        min-height: 108px !important;
    }

    .mired-kpi {
        font-size: 2rem !important;
    }
}

/* =========================================================
   Mi Red - Contactos: modo claro
   Mantener al final de people.css
========================================================= */

html[data-theme="light"] .mired-content,
body[data-theme="light"] .mired-content,
html.light .mired-content,
body.light .mired-content,
html.theme-light .mired-content,
body.theme-light .mired-content,
[data-bs-theme="light"] .mired-content {
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.10), transparent 34%), linear-gradient(180deg, #f8fbff, #eaf2fb) !important;
}

    html[data-theme="light"] .mired-content .mired-page-header h1,
    body[data-theme="light"] .mired-content .mired-page-header h1,
    html.light .mired-content .mired-page-header h1,
    body.light .mired-content .mired-page-header h1,
    html.theme-light .mired-content .mired-page-header h1,
    body.theme-light .mired-content .mired-page-header h1,
    [data-bs-theme="light"] .mired-content .mired-page-header h1 {
        color: #0f172a !important;
        text-shadow: none !important;
    }

    html[data-theme="light"] .mired-content .mired-page-header p,
    body[data-theme="light"] .mired-content .mired-page-header p,
    html.light .mired-content .mired-page-header p,
    body.light .mired-content .mired-page-header p,
    html.theme-light .mired-content .mired-page-header p,
    body.theme-light .mired-content .mired-page-header p,
    [data-bs-theme="light"] .mired-content .mired-page-header p {
        color: #64748b !important;
    }

/* KPIs claros */

html[data-theme="light"] .mired-kpi-card,
body[data-theme="light"] .mired-kpi-card,
html.light .mired-kpi-card,
body.light .mired-kpi-card,
html.theme-light .mired-kpi-card,
body.theme-light .mired-kpi-card,
[data-bs-theme="light"] .mired-kpi-card {
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 42%), linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.96)) !important;
    border-color: rgba(148, 163, 184, 0.26) !important;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

    html[data-theme="light"] .mired-kpi-card::before,
    body[data-theme="light"] .mired-kpi-card::before,
    html.light .mired-kpi-card::before,
    body.light .mired-kpi-card::before,
    html.theme-light .mired-kpi-card::before,
    body.theme-light .mired-kpi-card::before,
    [data-bs-theme="light"] .mired-kpi-card::before {
        background: linear-gradient(90deg, rgba(14, 165, 233, 0.12), transparent 50%, rgba(37, 99, 235, 0.08)) !important;
    }

    html[data-theme="light"] .mired-kpi-card .mired-muted,
    body[data-theme="light"] .mired-kpi-card .mired-muted,
    html.light .mired-kpi-card .mired-muted,
    body.light .mired-kpi-card .mired-muted,
    html.theme-light .mired-kpi-card .mired-muted,
    body.theme-light .mired-kpi-card .mired-muted,
    [data-bs-theme="light"] .mired-kpi-card .mired-muted {
        color: #527097 !important;
    }

html[data-theme="light"] .mired-kpi,
body[data-theme="light"] .mired-kpi,
html.light .mired-kpi,
body.light .mired-kpi,
html.theme-light .mired-kpi,
body.theme-light .mired-kpi,
[data-bs-theme="light"] .mired-kpi {
    color: #0f172a !important;
}

/* Contenedor de tabs */

html[data-theme="light"] .mired-card,
body[data-theme="light"] .mired-card,
html.light .mired-card,
body.light .mired-card,
html.theme-light .mired-card,
body.theme-light .mired-card,
[data-bs-theme="light"] .mired-card {
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.10), transparent 42%), rgba(255, 255, 255, 0.86) !important;
    border-color: rgba(148, 163, 184, 0.26) !important;
    box-shadow: 0 18px 52px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
}

/* Tabs claros */

html[data-theme="light"] .mired-tab,
body[data-theme="light"] .mired-tab,
html.light .mired-tab,
body.light .mired-tab,
html.theme-light .mired-tab,
body.theme-light .mired-tab,
[data-bs-theme="light"] .mired-tab {
    color: #334155 !important;
    background: rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(148, 163, 184, 0.34) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
}

    html[data-theme="light"] .mired-tab:hover,
    body[data-theme="light"] .mired-tab:hover,
    html.light .mired-tab:hover,
    body.light .mired-tab:hover,
    html.theme-light .mired-tab:hover,
    body.theme-light .mired-tab:hover,
    [data-bs-theme="light"] .mired-tab:hover {
        color: #0f172a !important;
        background: rgba(239, 246, 255, 0.96) !important;
        border-color: rgba(37, 99, 235, 0.38) !important;
    }

    html[data-theme="light"] .mired-tab.active,
    body[data-theme="light"] .mired-tab.active,
    html.light .mired-tab.active,
    body.light .mired-tab.active,
    html.theme-light .mired-tab.active,
    body.theme-light .mired-tab.active,
    [data-bs-theme="light"] .mired-tab.active {
        color: #ffffff !important;
        background: radial-gradient(circle at top left, rgba(125, 211, 252, 0.34), transparent 48%), linear-gradient(135deg, #2563eb, #0ea5e9) !important;
        border-color: rgba(37, 99, 235, 0.42) !important;
        box-shadow: 0 18px 42px rgba(37, 99, 235, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
    }

/* Buscador claro */

html[data-theme="light"] .mired-search-card,
body[data-theme="light"] .mired-search-card,
html.light .mired-search-card,
body.light .mired-search-card,
html.theme-light .mired-search-card,
body.theme-light .mired-search-card,
[data-bs-theme="light"] .mired-search-card {
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.10), transparent 42%), rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
}

    html[data-theme="light"] .mired-search-card label,
    body[data-theme="light"] .mired-search-card label,
    html.light .mired-search-card label,
    body.light .mired-search-card label,
    html.theme-light .mired-search-card label,
    body.theme-light .mired-search-card label,
    [data-bs-theme="light"] .mired-search-card label {
        color: #1e3a8a !important;
    }

html[data-theme="light"] .mired-search-row .mired-input,
body[data-theme="light"] .mired-search-row .mired-input,
html.light .mired-search-row .mired-input,
body.light .mired-search-row .mired-input,
html.theme-light .mired-search-row .mired-input,
body.theme-light .mired-search-row .mired-input,
[data-bs-theme="light"] .mired-search-row .mired-input {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(148, 163, 184, 0.36) !important;
}

/* Filas de contactos claras */

html[data-theme="light"] .mired-user-row,
body[data-theme="light"] .mired-user-row,
html.light .mired-user-row,
body.light .mired-user-row,
html.theme-light .mired-user-row,
body.theme-light .mired-user-row,
[data-bs-theme="light"] .mired-user-row {
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.10), transparent 42%), linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.96)) !important;
    border-color: rgba(148, 163, 184, 0.30) !important;
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

    html[data-theme="light"] .mired-user-row:hover,
    body[data-theme="light"] .mired-user-row:hover,
    html.light .mired-user-row:hover,
    body.light .mired-user-row:hover,
    html.theme-light .mired-user-row:hover,
    body.theme-light .mired-user-row:hover,
    [data-bs-theme="light"] .mired-user-row:hover {
        border-color: rgba(37, 99, 235, 0.36) !important;
        box-shadow: 0 22px 60px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(37, 99, 235, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
    }

html[data-theme="light"] .mired-author-link,
body[data-theme="light"] .mired-author-link,
html.light .mired-author-link,
body.light .mired-author-link,
html.theme-light .mired-author-link,
body.theme-light .mired-author-link,
[data-bs-theme="light"] .mired-author-link {
    color: #0f172a !important;
}

    html[data-theme="light"] .mired-author-link:hover,
    body[data-theme="light"] .mired-author-link:hover,
    html.light .mired-author-link:hover,
    body.light .mired-author-link:hover,
    html.theme-light .mired-author-link:hover,
    body.theme-light .mired-author-link:hover,
    [data-bs-theme="light"] .mired-author-link:hover {
        color: #2563eb !important;
    }

html[data-theme="light"] .mired-user-info p,
body[data-theme="light"] .mired-user-info p,
html.light .mired-user-info p,
body.light .mired-user-info p,
html.theme-light .mired-user-info p,
body.theme-light .mired-user-info p,
[data-bs-theme="light"] .mired-user-info p {
    color: #64748b !important;
}

/* Tarjetas vacías claras */

html[data-theme="light"] .mired-user-results > .mired-card,
body[data-theme="light"] .mired-user-results > .mired-card,
html.light .mired-user-results > .mired-card,
body.light .mired-user-results > .mired-card,
html.theme-light .mired-user-results > .mired-card,
body.theme-light .mired-user-results > .mired-card,
[data-bs-theme="light"] .mired-user-results > .mired-card {
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.10), transparent 42%), rgba(255, 255, 255, 0.90) !important;
    border-color: rgba(148, 163, 184, 0.26) !important;
}

    html[data-theme="light"] .mired-user-results > .mired-card h2,
    body[data-theme="light"] .mired-user-results > .mired-card h2,
    html.light .mired-user-results > .mired-card h2,
    body.light .mired-user-results > .mired-card h2,
    html.theme-light .mired-user-results > .mired-card h2,
    body.theme-light .mired-user-results > .mired-card h2,
    [data-bs-theme="light"] .mired-user-results > .mired-card h2 {
        color: #0f172a !important;
    }

html[data-theme="light"] .mired-muted,
body[data-theme="light"] .mired-muted,
html.light .mired-muted,
body.light .mired-muted,
html.theme-light .mired-muted,
body.theme-light .mired-muted,
[data-bs-theme="light"] .mired-muted {
    color: #64748b !important;
}
