/* ==========================================================================
   KUMARA SUPPORT & HELPDESK — CENTRALIZED DESIGN SYSTEM
   Token-based CSS (Zero inline styles) para Portal (/soporte/) y Consola (/soporte/consola/)
   ========================================================================== */

:root {
    --km-sup-bg: #f8fafc;
    --km-sup-surface: #ffffff;
    --km-sup-sidebar: #0f172a;
    --km-sup-sidebar-hover: #1e293b;
    --km-sup-border: #e2e8f0;
    --km-sup-text: #0f172a;
    --km-sup-muted: #64748b;
    --km-sup-brand: #7c3aed;
    --km-sup-brand-dark: #5b21b6;
    --km-sup-danger: #dc2626;
    --km-sup-warning: #d97706;
    --km-sup-success: #059669;
    --km-sup-note-bg: #fef9c3;
    --km-sup-note-border: #fde047;
}

.km-sup-shell {
    min-height: 100vh;
    background: var(--km-sup-bg);
    color: var(--km-sup-text);
    display: flex;
    flex-direction: column;
}

.km-sup-topbar {
    background: var(--km-sup-sidebar);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.km-sup-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    text-decoration: none;
}

.km-sup-badge-env {
    background: rgba(124, 58, 237, 0.28);
    color: #ddd6fe;
    border: 1px solid rgba(167, 139, 250, 0.4);
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
}

.km-sup-layout {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 58px);
}

.km-sup-sidebar {
    width: 260px;
    background: var(--km-sup-sidebar);
    color: #cbd5e1;
    padding: 1.25rem 0.75rem;
    flex-shrink: 0;
}

.km-sup-nav-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.km-sup-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 0.2rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.km-sup-nav-link:hover,
.km-sup-nav-link.is-active {
    background: var(--km-sup-sidebar-hover);
    color: #ffffff;
}

.km-sup-nav-link.is-active {
    border-left: 3px solid var(--km-sup-brand);
}

.km-sup-main {
    flex: 1;
    padding: 1.5rem;
    min-width: 0;
}

.km-sup-card {
    background: var(--km-sup-surface);
    border: 1px solid var(--km-sup-border);
    border-radius: 0.85rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.km-sup-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.km-sup-kpi-value {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
}

.km-sup-msg-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.km-sup-msg {
    border: 1px solid var(--km-sup-border);
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
    background: #ffffff;
}

.km-sup-msg--agente {
    border-left: 4px solid var(--km-sup-brand);
    background: #faf5ff;
}

.km-sup-msg--sistema {
    background: #f1f5f9;
    border-style: dashed;
    color: #334155;
    font-size: 0.88rem;
}

.km-sup-msg--nota {
    background: var(--km-sup-note-bg);
    border-color: var(--km-sup-note-border);
}

.km-sup-msg-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--km-sup-muted);
    margin-bottom: 0.4rem;
}

.km-sup-msg-body {
    white-space: pre-line;
    margin: 0;
    font-size: 0.92rem;
}

.km-sup-portal-container {
    max-width: 1080px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.km-sup-sla-overdue {
    color: var(--km-sup-danger);
    font-weight: 700;
}

@media (max-width: 991px) {
    .km-sup-layout {
        flex-direction: column;
    }
    .km-sup-sidebar {
        width: 100%;
    }
}

