﻿* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f5f8;
    color: #222;
}

/* =========================
   LOGIN
========================= */

.login-body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 24px;
    background: linear-gradient(135deg, #201033, #4b168c);
}

.login-card {
    width: min(92vw, 420px);
    background: #fff;
    padding: 32px;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.login-card h1 {
    margin: 0;
    font-size: 42px;
    color: #4b168c;
}

.login-card p {
    margin-top: 8px;
    margin-bottom: 24px;
    color: #555;
}

.login-card label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: bold;
}

.login-card input {
    width: 100%;
    padding: 11px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.login-card button {
    width: 100%;
    margin-top: 22px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #5b1ca6;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.login-card button:hover {
    background: #43137d;
}

@media (max-width: 768px) {
    .login-card {
        width: calc(100vw - 8px) !important;
        margin: 4px !important;
        padding: 20px !important;
        border-radius: 12px;
        box-sizing: border-box;
    }
}

/* =========================
   LAYOUT GENERAL
========================= */

.topbar {
    min-height: 64px;
    background: #201033;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 0 28px;
    overflow-x: auto;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar strong {
    font-size: 24px;
    margin-right: 8px;
}

.topbar span {
    font-size: 13px;
    opacity: 0.75;
}

.topbar a {
    color: white;
    text-decoration: none;
    margin-left: 18px;
    font-weight: bold;
    white-space: nowrap;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 24px;
    white-space: nowrap;
}

.topbar nav a {
    margin-left: 0;
}

.topbar-user {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    margin-right: 14px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.1;
    opacity: 0.95;
}

.topbar-user small {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.75;
    text-transform: uppercase;
}

.main-content {
    padding: 36px 40px;
}

.content {
    padding: 32px;
}

.content h1 {
    margin-top: 0;
}

.mobile-content {
    max-width: 760px;
    margin: 0 auto;
}

/* =========================
   COMPONENTES GENERALES
========================= */

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 10px;
    margin: 14px 0;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    padding: 12px 14px;
    border-radius: 10px;
    margin: 14px 0;
}

.help-text,
.text-muted {
    color: #6b7280;
    font-size: 14px;
}

.footer {
    padding: 20px 40px;
    color: #6b7280;
    font-size: 14px;
}

.btn-primary {
    display: inline-block;
    background: #4b1d95;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
}

.btn-primary:hover {
    background: #35116f;
}

.btn-light {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 12px;
    background: #ffffff;
    color: #3d147c;
    border: 1px solid #ddd6f3;
    text-decoration: none;
    font-weight: 700;
}

.btn-light:hover {
    background: #f7f3ff;
}

.btn-secondary {
    display: inline-block;
    text-align: center;
    padding: 14px 18px;
    border-radius: 14px;
    background: #eee7fa;
    color: #4b168c;
    text-decoration: none;
    font-weight: bold;
}

.btn-secondary:hover {
    background: #e0d4ff;
}

.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0 26px 0;
    align-items: center;
}

.status-badge,
.badge-soon {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #f1eaff;
    color: #35116f;
}

.status-recibido {
    background: #f1eaff;
    color: #35116f;
}

/* =========================
   CARDS / DASHBOARD GENERAL
========================= */

.cards {
    display: flex;
    gap: 22px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.card {
    flex: 1;
    min-width: 260px;
}

.card h2 {
    margin-top: 0;
    color: #4b168c;
}

.card span {
    display: inline-block;
    margin-top: 12px;
    padding: 7px 12px;
    background: #eee7fa;
    color: #4b168c;
    border-radius: 999px;
    font-weight: bold;
    font-size: 13px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 28px;
}

.module-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 16px;
    min-height: 160px;
}

.module-card h2 {
    color: #4b1d95;
    margin-top: 0;
}

.info-box {
    background: #ffffff;
    margin-top: 28px;
    padding: 22px 24px;
    border-radius: 16px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.summary-card {
    background: #f7f3ff;
    border-radius: 16px;
    padding: 18px 20px;
}

.summary-card span {
    display: block;
    color: #5f4b8b;
    font-size: 14px;
    margin-bottom: 8px;
}

.summary-card strong {
    display: block;
    color: #1f1538;
    font-size: 24px;
}

.insight-list {
    margin: 16px 0 0 0;
    padding-left: 22px;
}

.insight-list li {
    margin-bottom: 12px;
    line-height: 1.5;
}

/* =========================
   TABLAS / FORMULARIOS
========================= */

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    margin-top: 20px;
    border-radius: 14px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.data-table th {
    background: #f3f0ff;
    color: #35116f;
    font-weight: 700;
}

.form-card {
    max-width: 520px;
    background: #ffffff;
    padding: 24px;
    border-radius: 16px;
    margin-top: 20px;
}

.form-card label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: 700;
}

.form-card input,
.form-card select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
}

.form-card button {
    margin-top: 20px;
    background: #4b1d95;
    color: #ffffff;
    border: none;
    padding: 11px 18px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.form-card button:hover {
    background: #35116f;
}


.seller-header-compact {
    background: #fff;
    border-radius: 18px;
    padding: 22px 30px;
    margin-bottom: 24px;
    border-left: 6px solid #4b168c;
}

.seller-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
}

.seller-header-title h1 {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.1;
}

.seller-header-title h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.2;
    color: #4b168c;
    font-weight: 700;
}

.seller-header-meta {
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.seller-header-meta div {
    background: #f4efff;
    border-radius: 14px;
    padding: 12px 16px;
    min-width: 230px;
}

.seller-header-meta span {
    display: block;
    color: #4b168c;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 4px;
}

.seller-header-meta strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.seller-header-actions {
    margin-top: 14px;
}

.seller-header-actions a {
    display: inline-block;
    background: #4b168c;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.seller-header-actions a:hover {
    opacity: 0.9;
}

@media (max-width: 900px) {
    .seller-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .seller-header-meta {
        justify-content: flex-start;
        width: 100%;
    }

    .seller-header-meta div {
        min-width: 100%;
    }
}

.goal-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 28px;
    align-items: stretch;
}

.goal-table-wrap {
    min-width: 0;
}


.compact-table th,
.compact-table td {
    padding: 10px 12px;
    font-size: 14px;
}

.compact-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.goal-chart-card {
    background: #f8f4ff;
    border-radius: 18px;
    padding: 22px 24px;
}

.goal-chart-card h3 {
    margin-top: 0;
}

.vertical-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 18px;
    height: 230px;
    margin-top: 18px;
}

.vertical-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 70px;
}

.vertical-bar-track {
    width: 42px;
    height: 150px;
    background: #e9ddff;
    border-radius: 999px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.vertical-bar-fill {
    width: 100%;
    background: #4b168c;
    border-radius: 999px;
}

.vertical-bar-item strong {
    font-size: 16px;
}

.vertical-bar-item span {
    font-size: 13px;
    color: #4b5563;
}

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

    .vertical-chart {
        height: 210px;
    }
}

.dual-chart {
    align-items: flex-end;
}

.dual-bar-item {
    min-width: 90px;
}

.dual-bars {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.dual-bars .vertical-bar-track {
    width: 28px;
}

.sale-fill {
    background: #4b168c;
}

.kg-fill {
    background: #8b5cf6;
}

.dual-percent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.dual-percent strong {
    font-size: 13px;
    line-height: 1.1;
} 

/* Mi cartera atendida + avance del mes */
.seller-care-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.seller-care-left {
    min-width: 0;
}

.seller-care-right {
    background: #f8f4ff;
    border-radius: 18px;
    padding: 22px 24px;
}

.seller-care-right h3 {
    margin-top: 0;
}

.seller-care-right .progress-box {
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px;
    margin-top: 16px;
}

.seller-care-right .progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.seller-care-right .progress-head span {
    color: #4b168c;
    font-weight: 700;
}

.seller-care-right .progress-head strong {
    font-size: 22px;
}

.seller-care-right .progress-bar {
    width: 100%;
    height: 14px;
    background: #e9ddff;
    border-radius: 999px;
    overflow: hidden;
    display: block;
}

.seller-care-right .progress-fill {
    height: 100%;
    background: #4b168c;
    border-radius: 999px;
    display: block;
}

.seller-care-right .progress-detail {
    margin: 8px 0 0;
    font-size: 14px;
    color: #4b5563;
}

@media (max-width: 900px) {
    .seller-care-grid {
        grid-template-columns: 1fr;
    }
}

.category-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 28px;
    align-items: start;
}

.category-table-wrap {
    min-width: 0;
}

.category-chart-card {
    background: #f8f4ff;
    border-radius: 18px;
    padding: 22px 24px;
}

.category-chart-card h3 {
    margin-top: 0;
}

.donut-wrap {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.donut-chart {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    position: relative;
}

.donut-chart::after {
    content: "";
    position: absolute;
    inset: 42px;
    background: #f8f4ff;
    border-radius: 50%;
}

.donut-center {
    position: absolute;
    inset: 42px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-center span {
    color: #4b168c;
    font-size: 13px;
    font-weight: 700;
}

.donut-center strong {
    font-size: 18px;
    line-height: 1.1;
}

.donut-legend {
    display: grid;
    gap: 9px;
}

.donut-legend-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    font-size: 14px;
}

.donut-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
}

.donut-legend-item strong {
    color: #111827;
}

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

/* Bloques con pestaÃ±as */
.tab-section {
    margin-bottom: 28px;
}

.tab-header {
    margin-bottom: 18px;
}

.tab-header h2 {
    margin-bottom: 6px;
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.tab-button {
    border: 0;
    background: #f4efff;
    color: #4b168c;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
}

.tab-button.active {
    background: #4b168c;
    color: #fff;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel h3 {
    margin-top: 0;
}

/* ImpresiÃ³n / PDF: mostrar todo aunque estÃ© en pestaÃ±as */
@media print {
    .tab-buttons {
        display: none !important;
    }

    .tab-panel {
        display: block !important;
        page-break-inside: avoid;
        margin-bottom: 24px;
    }

    .tab-panel h3 {
        margin-top: 18px;
        border-bottom: 1px solid #ddd;
        padding-bottom: 6px;
    }
}

/* Clientes Ãºnicos por mes */
.monthly-clients-grid {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 28px;
    align-items: stretch;
}

.monthly-chart-card,
.monthly-table-card {
    background: #f8f4ff;
    border-radius: 18px;
    padding: 22px 24px;
}

.monthly-chart-card h3,
.monthly-table-card h3 {
    margin-top: 0;
}

.monthly-bar-chart {
    height: 260px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 34px;
    margin-top: 18px;
    padding: 12px 0;
}

.monthly-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    gap: 8px;
}

.monthly-bars {
    height: 150px;
    display: flex;
    align-items: flex-end;
    gap: 9px;
}

.monthly-bar-track {
    width: 34px;
    height: 150px;
    background: #e9ddff;
    border-radius: 999px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.monthly-bar-fill {
    width: 100%;
    border-radius: 999px;
}

.clients-fill {
    background: #4b168c;
}

.invoices-fill {
    background: #8b5cf6;
}

.monthly-bar-values {
    text-align: center;
    line-height: 1.15;
}

.monthly-bar-values strong {
    display: block;
    font-size: 20px;
    color: #111827;
}

.monthly-bar-values span {
    display: block;
    font-size: 13px;
    color: #4b5563;
}

.monthly-bar-label {
    color: #4b5563;
    font-weight: 700;
    font-size: 14px;
}

.monthly-legend {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 14px;
    color: #4b5563;
}

.legend-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    margin-right: 6px;
    vertical-align: middle;
}

.clients-dot {
    background: #4b168c;
}

.invoices-dot {
    background: #8b5cf6;
}

@media (max-width: 900px) {
    .monthly-clients-grid {
        grid-template-columns: 1fr;
    }

    .monthly-bar-chart {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 16px;
    }
}

.tabs-reactivados {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 16px 0 18px;
    padding-bottom: 6px;
}

.tab-reactivado {
    border: 1px solid #ded4f5;
    background: #fff;
    color: #35106d;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.tab-reactivado.activo {
    background: #4b148c;
    color: #fff;
    border-color: #4b148c;
}

.vista-reactivados {
    display: none;
}

.vista-reactivados.activa {
    display: block;
}

.grupo-vendedor-reactivado {
    margin-bottom: 24px;
}

.grupo-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    background: #f1ebff;
    border-radius: 12px 12px 0 0;
    padding: 12px 16px;
    color: #2d0566;
    font-size: 14px;
}

.grupo-header div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.grupo-header span {
    font-size: 12px;
    color: #6b5a8f;
}

.mini-link {
    font-size: 12px;
    font-weight: 600;
    color: #4b148c;
    text-decoration: none;
    white-space: nowrap;
}

.mini-link:hover {
    text-decoration: underline;
}

/* Ajustes finos - Clientes reactivados por vendedor */
.grupo-vendedor-reactivado {
    margin-bottom: 28px;
}

.grupo-vendedor-reactivado .data-table {
    margin-top: 0;
    border-radius: 0 0 14px 14px;
}

.grupo-header {
    margin-bottom: 0;
}

.grupo-header + .data-table {
    margin-top: 0;
}

.mini-link {
    opacity: 0.85;
}

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

/* PestaÃ±as mÃ¡s compactas para muchos vendedores */
.tab-reactivado {
    padding: 8px 13px;
    font-size: 12.5px;
}

/* Mejor respiraciÃ³n en pantallas pequeÃ±as */
@media (max-width: 768px) {
    .tabs-reactivados {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .tab-reactivado {
        flex: 0 0 auto;
        padding: 8px 12px;
        font-size: 12px;
    }

    .grupo-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .mini-link {
        white-space: normal;
    }
}

.grupo-vendedor-reactivado {
    border-radius: 14px;
    overflow: hidden;
}

.grupo-vendedor-reactivado .data-table th {
    background: #f3f0ff;
}

/* Ventas por vendedor - enlace gerencial */
.seller-link-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.seller-link-cell strong {
    color: #111827;
    font-weight: 700;
}

.seller-report-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    border-radius: 999px;
    background: #f4efff;
    color: #4b168c;
    border: 1px solid #ded4f5;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.seller-report-link:hover {
    background: #4b168c;
    color: #ffffff;
    border-color: #4b168c;
    text-decoration: none;
}

@media (max-width: 768px) {
    .seller-link-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}



.footer {
    margin-top: 40px;
    padding: 18px 20px;
    color: #8a8a96;
    font-size: 12.5px;
    text-align: center;
}

.footer a.footer-link {
    color: #8a8a96;
    text-decoration: none;
    font-weight: 600;
}

.footer a.footer-link:hover {
    color: #4b168c;
    text-decoration: underline;
}

.footer-separator {
    margin: 0 6px;
    color: #b0b0b8;
}


.btn-primary,
.btn-secondary,
.btn-light,
.btn-save,
.btn-cancel,
.btn-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
}

.btn-secondary {
    min-height: 54px;
    padding: 0 18px;
}


.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand strong {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
}

.brand span {
    font-size: 16px;
    color: rgba(255,255,255,.75);
}

.brand-logo {
    height: 38px;
    width: auto;
    display: block;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-logo {
    display: block;
    height: 38px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.dashboard-description {
    font-size: 20px;
    font-weight: 600;
    color: #2f2f3a;
    margin-top: 8px;
    margin-bottom: 18px;
    max-width: 760px;
    line-height: 1.45;
}
.dashboard-welcome {
    font-size: 20px;
    margin-bottom: 34px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: #ffffff;
    text-decoration: none;
}

.brand:hover {
    opacity: 0.9;
}

.header-logo {
    display: block;
    height: 42px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
}

@media (max-width: 768px) {
    .topbar {
        min-height: 72px;
        padding: 32px 20px 12px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        overflow: visible;
    }

    .header-logo {
        height: 42px;
        max-width: 150px;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

     .topbar nav {
        display: none;
        position: absolute;
        top: 72px;
        right: 0;
        left: auto;
        width: min(82vw, 340px);
        z-index: 50;

        background: #201033;
        padding: 18px 24px 22px;
        box-shadow: -12px 12px 24px rgba(0,0,0,0.22);

        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        border-radius: 0 0 0 18px;
    }

    .topbar nav.is-open {
        display: flex;
    }

    .topbar nav a {
        font-size: 17px;
        margin-left: 0;
    }

    .topbar-user {
        align-items: flex-start;
        margin-right: 0;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        width: 100%;
    }
}
.comercial-hero {
    background: #fff;
    border-radius: 18px;
    padding: 18px 28px;
    margin-bottom: 18px;
}

.comercial-hero h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.25;
    color: #202638;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.comercial-hero h1 span {
    font-size: 15px;
    font-weight: 400;
    color: #4b5563;
}

.config-section {
    margin-top: 30px;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fafafa;
}

.config-header h2 {
    margin: 0 0 4px;
    font-size: 18px;
    color: #202638;
}

.config-header p {
    margin: 0 0 14px;
    font-size: 13px;
    color: #6b7280;
}

.config-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.config-link {
    position: relative;
    display: block;
    padding: 16px 18px 16px 20px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e7e2f3;
    color: #32106b;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(50, 16, 107, 0.04);
    transition: all 0.18s ease;
}

.config-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 4px;
    border-radius: 0 8px 8px 0;
    background: #5b1fa6;
}

.config-link span {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
}

.config-link:hover {
    transform: translateY(-1px);
    border-color: #b79be6;
    box-shadow: 0 10px 24px rgba(50, 16, 107, 0.10);
    background: #fbf8ff;
}


@media (max-width: 768px) {
    .comercial-hero {
        padding: 16px 18px;
    }

    .comercial-hero h1 {
        font-size: 24px;
        display: block;
    }

    .comercial-hero h1 span {
        display: block;
        margin-top: 4px;
        font-size: 14px;
    }
}
.metric-subtext {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.25;
}
.login-body.modo-app {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}
/* Login centrado solo en modo app */
body.login-body.modo-app {
    min-height: 100vh !important;
    height: 100vh !important;
    display: grid !important;
    place-items: center !important;
    padding: 24px 16px !important;
}

body.login-body.modo-app .login-card {
    transform: translateY(180px);
    max-width: 420px !important;
    margin: 0 auto !important;
    padding: 28px 26px !important;
    border-radius: 18px !important;
}

/* =========================
   +IA COMERCIAL - ACCIONES
========================= */

.action-block-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

/* Estado inicial: filas extra ocultas */
.data-table tr.hidden-row {
    display: none !important;
}

/* Estado expandido: filas extra visibles */
.action-block.expanded .data-table tr.hidden-row {
    display: table-row !important;
}

.toggle-table-btn {
    border: 0;
    cursor: pointer;
    white-space: nowrap;
    min-height: 44px;
    padding: 0 18px;
}

/* Lista accionable debajo de cada bloque */
.action-suggestion-list {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e0ef;
}

.action-suggestion-list h3 {
    margin: 0 0 12px;
    color: #201033;
}

.action-suggestion-items {
    display: grid;
    gap: 10px;
}

.action-suggestion-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: #faf8ff;
}

.action-check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.action-check-row input {
    margin-top: 4px;
    width: 16px;
    height: 16px;
}

.action-check-row span {
    display: grid;
    gap: 3px;
}

.action-check-row small {
    color: #5f6472;
    line-height: 1.35;
}

/* Badges comerciales */
.badge-neutral {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1eaff;
    color: #4b168c;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.badge-ok {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.badge-warning {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.badge-danger {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.muted-text {
    color: #6b7280;
    font-size: 13px;
}

/* MÃ³vil */
@media (max-width: 768px) {
    .action-block-header {
        flex-direction: column;
        align-items: stretch;
    }

    .toggle-table-btn {
        width: 100%;
    }

    .action-suggestion-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .badge-neutral,
    .badge-ok,
    .badge-warning,
    .badge-danger {
        align-self: flex-start;
    }
}
.action-filter-bar {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin: 18px 0 20px;
    padding: 16px;
    border-radius: 16px;
    background: #faf8ff;
    border: 1px solid #e5e0ef;
}

.action-filter-bar label {
    display: grid;
    gap: 6px;
    flex: 1;
    min-width: 260px;
}

.action-filter-bar label span {
    color: #4b168c;
    font-size: 13px;
    font-weight: 800;
}

.action-filter-bar select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #d8ccef;
    border-radius: 12px;
    background: #ffffff;
    color: #201033;
    font-size: 15px;
}

.action-filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-filter-actions .btn-primary,
.action-filter-actions .btn-light {
    min-height: 44px;
    border: 0;
    cursor: pointer;
}

@media (max-width: 768px) {
    .action-filter-bar {
        display: grid;
    }

    .action-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .action-filter-actions .btn-primary,
    .action-filter-actions .btn-light {
        width: 100%;
    }
}

.login-secondary-action {
    margin: 14px 0 20px;
}

.login-secondary-action a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #d8c8f3;
    border-radius: 10px;
    background: #f7f2ff;
    color: #4b168c;
    font-weight: 700;
    text-decoration: none;
}

.login-secondary-action a:hover {
    background: #efe4ff;
    border-color: #b99ae8;
}
.scope-note {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #faf8ff;
    border: 1px solid #e5e0ef;
    color: #5f6472;
}
.priority-note {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #faf8ff;
    border: 1px solid #e5e0ef;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.45;
}

.priority-note strong {
    color: #201033;
}

.priority-note ol {
    margin: 10px 0 10px 20px;
    padding: 0;
}

.priority-note li {
    margin-bottom: 5px;
}

.priority-note p {
    margin: 10px 0 0;
}
