<style>
    body {
        font-family: 'Inter', sans-serif;
        background-color: #f8fafc;
        margin: 0;
    }

    .chart-container {
        position: relative;
        width: 100%;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
        height: 350px;
        max-height: 450px;
    }
    .chart-container-sm {
        position: relative;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .card {
        background-color: white;
        border-radius: 0.75rem;
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),
                    0 2px 4px -2px rgb(0 0 0 / 0.1);
        padding: 2rem;
        margin-bottom: 2rem;
    }

    .panel {
        background-color: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        padding: 1.5rem;
        margin-top: 1rem;
        margin-bottom: 2rem;
    }
    .panel table {
        width: 100%;
        font-size: 0.875rem;
    }
    .panel th {
        text-align: left;
        padding: 0.75rem;
        background-color: #f3f4f6;
        border-bottom: 2px solid #e5e7eb;
    }
    .panel td {
        padding: 0.75rem;
        vertical-align: top;
        border-bottom: 1px solid #e5e7eb;
    }
    .panel tr:last-child td {
        border-bottom: none;
    }
    .panel ul {
        list-style-position: inside;
        padding-left: 0.5rem;
    }
    .panel a {
        color: #00529C;
        text-decoration: underline;
    }
    .panel a:hover {
        color: #003A70;
    }

    .mk-blue { color: #00529C; }
    .bg-mk-blue { background-color: #00529C; }
    .border-mk-blue { border-color: #00529C; }

    .mk-orange { color: #F5A623; }
    .bg-mk-orange { background-color: #F5A623; }
    .border-mk-orange { border-color: #F5A623; }

    .badge {
        display: inline-block;
        padding: 0.25em 0.6em;
        font-size: 75%;
        font-weight: 700;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
        vertical-align: baseline;
        border-radius: 0.375rem;
        color: white;
    }
    .b-info { background-color: #3B82F6; }
    .b-success { background-color: #10B981; }
    .b-warning { background-color: #F59E0B; }
    .b-danger { background-color: #EF4444; }

    .flex-2 {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    /* --- Extras para chat móvil --- */

    .page-wrap {
        max-width: 480px;
        margin: 1rem auto;
        padding: 0 1rem;
    }

    .chat-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1rem;
    }
    .chat-title {
        font-weight: 600;
        font-size: 1rem;
        color: #111827;
    }
    .chat-subtitle {
        font-size: 0.75rem;
        color: #6b7280;
    }

    .chip {
        display: inline-flex;
        align-items: center;
        padding: 0.25rem 0.6rem;
        border-radius: 999px;
        font-size: 0.7rem;
        background-color: #e5f0ff;
        color: #1d4ed8;
        gap: 0.25rem;
    }
    .chip-dot {
        width: 0.4rem;
        height: 0.4rem;
        border-radius: 999px;
        background-color: #10B981;
    }

    .chat-box {
        max-height: 420px;
        overflow-y: auto;
        border-radius: 0.5rem;
        border: 1px solid #e5e7eb;
        padding: 0.75rem;
        background-color: #f9fafb;
        margin-bottom: 0.75rem;
    }

    .message-row {
        display: flex;
        margin-bottom: 0.4rem;
    }
    .message-row.human {
        justify-content: flex-end;
    }
    .message-row.ai {
        justify-content: flex-start;
    }

    .message-bubble {
        max-width: 80%;
        padding: 0.5rem 0.75rem;
        border-radius: 0.75rem;
        font-size: 0.8rem;
        line-height: 1.35;
    }
    .message-bubble.human {
        background-color: #00529C;
        color: #ffffff;
        border-bottom-right-radius: 0.25rem;
    }
    .message-bubble.ai {
        background-color: #ffffff;
        border: 1px solid #e5e7eb;
        color: #111827;
        border-bottom-left-radius: 0.25rem;
    }
    .message-meta {
        font-size: 0.65rem;
        color: #9ca3af;
        margin-top: 0.15rem;
        text-align: right;
    }

    .chat-controls {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    .chat-input {
        flex: 1;
        border-radius: 999px;
        border: 1px solid #d1d5db;
        padding: 0.35rem 0.75rem;
        font-size: 0.8rem;
    }
    .btn {
        border-radius: 999px;
        padding: 0.35rem 0.9rem;
        border: none;
        font-size: 0.8rem;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        white-space: nowrap;
    }
    .btn-icon {
        width: 2.1rem;
        height: 2.1rem;
        padding: 0;
    }
    .btn-primary {
        background-color: #00529C;
        color: #ffffff;
    }
    .btn-secondary {
        background-color: #e5e7eb;
        color: #374151;
    }

    .chat-footer {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        font-size: 0.7rem;
        color: #6b7280;
        border-top: 1px solid #e5e7eb;
        padding-top: 0.5rem;
        margin-top: 0.5rem;
    }
    .meta-label {
        font-size: 0.65rem;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #9ca3af;
    }
    .meta-value {
        font-size: 0.75rem;
        font-weight: 600;
        color: #111827;
    }

    /* --- Extras para monitor escritorio --- */

    .layout-main {
        max-width: 1200px;
        margin: 1.5rem auto;
        padding: 0 1.5rem 2rem;
    }
    .layout-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    .layout-header-left {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }
    .layout-title {
        font-size: 1.05rem;
        font-weight: 600;
        color: #111827;
    }
    .layout-subtitle {
        font-size: 0.8rem;
        color: #6b7280;
    }
    .layout-header-right {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.75rem;
    }
    .btn-outline {
        background-color: white;
        border: 1px solid #d1d5db;
        color: #374151;
    }

    .transcript-list {
        max-height: 420px;
        overflow-y: auto;
        margin-top: 0.75rem;
    }
    .turn-row {
        display: grid;
        grid-template-columns: 70px 1fr 90px;
        gap: 0.5rem;
        padding: 0.35rem 0.5rem;
        border-radius: 0.4rem;
        font-size: 0.8rem;
        align-items: flex-start;
    }
    .turn-row:nth-child(odd) {
        background-color: #f3f4f6;
    }
    .turn-speaker {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #6b7280;
    }
    .turn-text {
        color: #111827;
    }
    .turn-tags {
        text-align: right;
        font-size: 0.7rem;
        color: #6b7280;
    }

    .pill-soft {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        padding: 0.25rem 0.6rem;
        border-radius: 999px;
        background-color: #e5f0ff;
        color: #1d4ed8;
        font-size: 0.7rem;
    }

    .meter {
        margin-top: 0.25rem;
        width: 100%;
        height: 0.4rem;
        border-radius: 999px;
        background-color: #e5e7eb;
        overflow: hidden;
    }
    .meter-fill {
        height: 100%;
        width: 0%;
        background: linear-gradient(90deg, #10B981, #F59E0B, #EF4444);
        transition: width 0.5s ease;
    }

    .chips {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-top: 0.25rem;
    }
    .chip-topic {
        padding: 0.2rem 0.55rem;
        border-radius: 999px;
        font-size: 0.7rem;
        background-color: #e5e7eb;
        color: #374151;
    }
    .chip-humano {
        background-color: #DCFCE7;
        color: #166534;
    }
    .chip-ia {
        background-color: #DBEAFE;
        color: #1D4ED8;
    }

    .alert-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.35rem 0.5rem;
        border-radius: 0.375rem;
        font-size: 0.75rem;
        background-color: #FEF2F2;
        color: #991B1B;
        border: 1px solid #FECACA;
    }
    .alert-row small {
        color: #6b7280;
    }

    @media (max-width: 900px) {
        .layout-main {
            padding: 0 1rem 1.5rem;
        }
    }
</style>
