/* ================================================================
   RODER CLOUD — DESIGN SYSTEM 2026
   Capa visual compacta. No modifica la lógica de negocio.
================================================================ */

:root {
    --roder-navy: #021e64;
    --roder-navy-dark: #011342;
    --roder-navy-soft: #0a2a78;
    --roder-orange: #f8580d;
    --roder-orange-dark: #d9490a;
    --roder-orange-soft: #fff1ea;
    --roder-white: #ffffff;
    --roder-ink: #0f172a;
    --roder-muted: #64748b;
    --roder-bg: #f4f6fa;
    --roder-surface: #ffffff;
    --roder-surface-soft: #f8fafc;
    --roder-border: #dfe5ee;
    --roder-border-strong: #cbd5e1;
    --roder-success: #16a34a;
    --roder-warning: #f59e0b;
    --roder-danger: #dc2626;
    --roder-info: #0ea5e9;
    --roder-radius-sm: 8px;
    --roder-radius: 12px;
    --roder-radius-lg: 16px;
    --roder-shadow: 0 5px 18px rgba(15, 23, 42, 0.055);
    --roder-shadow-hover: 0 10px 26px rgba(15, 23, 42, 0.09);

    --bg: var(--roder-bg);
    --card: var(--roder-surface);
    --card-soft: var(--roder-surface-soft);
    --sidebar: var(--roder-navy);
    --sidebar-soft: var(--roder-navy-soft);
    --sidebar-hover: #12306e;
    --text: var(--roder-ink);
    --muted: var(--roder-muted);
    --border: var(--roder-border);
    --primary: var(--roder-navy);
    --primary-dark: var(--roder-navy-dark);
    --accent: var(--roder-orange);
    --accent-dark: var(--roder-orange-dark);
    --sidebar-width: 242px;
}

html {
    background: var(--roder-bg);
}

body {
    background: var(--roder-bg);
    color: var(--roder-ink);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

/* Shell y barra lateral */

.app-shell {
    min-height: 100vh;
}

.sidebar,
.app-sidebar {
    width: var(--sidebar-width);
    padding: 14px 12px 12px;
    background: linear-gradient(180deg, var(--roder-navy) 0%, var(--roder-navy-dark) 100%);
    border-right: 0;
    box-shadow: 8px 0 28px rgba(2, 30, 100, 0.13);
}

.main,
.app-main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 18px 20px 24px;
}

.brand,
.app-brand {
    min-height: 68px;
    gap: 10px;
    padding: 5px 4px 13px;
    margin-bottom: 8px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 0;
    background: transparent;
}

.brand-icon,
.roder-brand-mark {
    width: 66px;
    height: 38px;
    min-width: 66px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.brand-icon img,
.roder-brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.roder-brand-copy {
    min-width: 0;
}

.brand .roder-brand-copy strong,
.mobile-brand .roder-brand-copy strong {
    display: block;
    color: var(--roder-orange);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1;
}

.brand .roder-brand-copy small,
.mobile-brand .roder-brand-copy small {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.34em;
    line-height: 1;
}

.menu,
.app-menu {
    gap: 9px;
    padding: 3px 0 8px;
}

.menu-section {
    gap: 3px;
}

.menu-section-title {
    padding: 7px 10px 4px;
    color: rgba(255, 255, 255, 0.49);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.menu-link {
    position: relative;
    min-height: 35px;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.2;
}

.menu-link::before {
    display: none;
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    transform: none;
}

.menu-link.active {
    background: rgba(248, 88, 13, 0.16);
    border-color: rgba(248, 88, 13, 0.30);
    color: #ffffff;
    box-shadow: inset 3px 0 0 var(--roder-orange);
}

.menu-link.active .menu-icon {
    color: var(--roder-orange);
}

.menu-icon {
    width: 17px;
    height: 17px;
    min-width: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: rgba(255, 255, 255, 0.68);
}

.sidebar-footer,
.app-sidebar-footer {
    gap: 8px;
    padding-top: 10px;
    border-top-color: rgba(255, 255, 255, 0.12);
}

.session-box {
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.055);
}

.session-box span {
    color: rgba(255, 255, 255, 0.50);
    font-size: 9px;
}

.session-box strong {
    color: #ffffff;
    font-size: 12px;
}

.logout-btn {
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 9px;
    background: transparent;
    color: rgba(255, 255, 255, 0.76);
    font-size: 11px;
}

.logout-btn:hover {
    border-color: rgba(248, 88, 13, 0.44);
    background: rgba(248, 88, 13, 0.12);
    color: #ffffff;
}

/* Encabezados, contenedores y densidad */

.page-content {
    width: 100%;
    max-width: 1540px;
    margin: 0 auto;
}

.erp-page-header,
.erp-dashboard-hero {
    gap: 14px;
    margin-bottom: 14px;
    padding: 16px 18px;
    border: 1px solid var(--roder-border);
    border-left: 4px solid var(--roder-navy);
    border-radius: var(--roder-radius-lg);
    background: var(--roder-surface);
    box-shadow: var(--roder-shadow);
}

.erp-page-header h1,
.erp-title-block h1,
.erp-dashboard-hero h1 {
    margin: 0;
    color: var(--roder-ink);
    font-size: clamp(1.35rem, 2vw, 1.72rem);
    font-weight: 850;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.erp-page-header p,
.erp-title-block p,
.erp-dashboard-hero p {
    margin: 5px 0 0;
    color: var(--roder-muted);
    font-size: 12px;
    line-height: 1.45;
}

.erp-eyebrow {
    margin-bottom: 5px;
    padding: 4px 8px;
    border: 1px solid #c7cce6;
    border-radius: 999px;
    background: #eef0f8;
    color: var(--roder-navy);
    font-size: 9px;
    letter-spacing: 0.09em;
}

.erp-page-actions,
.erp-hero-actions {
    gap: 8px;
}

.panel,
.toolbar-card,
.erp-form-card,
.erp-side-card,
.erp-ops-panel {
    border: 1px solid var(--roder-border);
    border-radius: var(--roder-radius);
    background: var(--roder-surface);
    box-shadow: var(--roder-shadow);
}

.panel,
.erp-form-card,
.erp-side-card,
.erp-ops-panel {
    padding: 15px;
}

.toolbar-card,
.erp-toolbar {
    margin-bottom: 12px;
    padding: 12px 14px;
}

.panel-header,
.erp-form-card-header,
.erp-card-head {
    gap: 10px;
    margin-bottom: 11px;
    padding-bottom: 9px;
    border-bottom: 1px solid #edf1f5;
}

.panel-header h2,
.erp-form-card-header h2,
.erp-card-head h2 {
    margin: 0;
    color: var(--roder-ink);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.015em;
}

.panel-header p,
.erp-form-card-header p,
.erp-card-head p {
    margin: 3px 0 0;
    color: var(--roder-muted);
    font-size: 11px;
}

/* KPIs y tarjetas informativas */

.erp-kpi-grid,
.erp-report-kpi-grid,
.erp-summary-grid,
.premium-grid,
.operations-grid {
    gap: 11px;
    margin-bottom: 14px;
}

.erp-kpi-card,
.erp-report-kpi-card,
.erp-summary-item,
.premium-card {
    min-height: 92px;
    padding: 13px 15px;
    border: 1px solid var(--roder-border);
    border-radius: var(--roder-radius);
    background: var(--roder-surface);
    box-shadow: var(--roder-shadow);
}

.erp-kpi-card.primary,
.erp-report-kpi-card.primary {
    border-color: var(--roder-navy);
    background: linear-gradient(145deg, var(--roder-navy) 0%, var(--roder-navy-dark) 100%);
}

.erp-kpi-card span,
.erp-report-kpi-card span,
.erp-summary-item span,
.premium-card span {
    color: var(--roder-muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.055em;
}

.erp-kpi-card strong,
.erp-report-kpi-card strong,
.erp-summary-item strong,
.premium-card strong {
    margin-top: 5px;
    color: var(--roder-navy);
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
    font-weight: 900;
    line-height: 1;
}

.erp-kpi-card small,
.erp-report-kpi-card small,
.premium-card small {
    margin-top: 5px;
    color: var(--roder-muted);
    font-size: 10px;
}

.erp-kpi-card.primary span,
.erp-kpi-card.primary small,
.erp-report-kpi-card.primary span,
.erp-report-kpi-card.primary small {
    color: rgba(255, 255, 255, 0.72);
}

.erp-kpi-card.primary strong,
.erp-report-kpi-card.primary strong {
    color: #ffffff;
}

/* Formularios y acciones */

.form-grid,
.erp-form-grid {
    gap: 11px 13px;
}

.form-field,
.form-group {
    margin-bottom: 0;
}

.form-label,
.form-field label,
.form-group label {
    margin-bottom: 5px;
    color: #334155;
    font-size: 11px;
    font-weight: 750;
}

.form-control,
.form-select,
.auth-input {
    min-height: 40px;
    padding: 8px 11px;
    border-color: var(--roder-border-strong);
    border-radius: 9px;
    background-color: #ffffff;
    color: var(--roder-ink);
    font-size: 12.5px;
    box-shadow: none;
}

textarea.form-control {
    min-height: 82px;
}

.form-control:focus,
.form-select:focus,
.auth-input:focus {
    border-color: var(--roder-navy);
    box-shadow: 0 0 0 3px rgba(2, 30, 100, 0.10);
}

.form-actions {
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #edf1f5;
}

.btn {
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.15;
    box-shadow: none;
}

.btn-sm {
    min-height: 31px;
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 10.5px;
}

.btn-dark,
.auth-submit {
    border-color: var(--roder-navy) !important;
    background: var(--roder-navy) !important;
    color: #ffffff !important;
}

.btn-dark:hover,
.auth-submit:hover {
    border-color: var(--roder-navy-dark) !important;
    background: var(--roder-navy-dark) !important;
}

.btn-outline-dark {
    border-color: #aeb8c8;
    color: var(--roder-navy);
}

.btn-outline-dark:hover {
    border-color: var(--roder-navy);
    background: #eef0f8;
    color: var(--roder-navy);
}

/* Tablas, etiquetas y estados */

.table-responsive {
    border: 1px solid var(--roder-border);
    border-radius: 10px;
    background: #ffffff;
}

.table {
    margin-bottom: 0;
    color: var(--roder-ink);
    font-size: 11.5px;
}

.table > :not(caption) > * > * {
    padding: 9px 10px;
    border-bottom-color: #edf1f5;
    vertical-align: middle;
}

.table thead th {
    background: #f6f8fb;
    color: #526071;
    font-size: 9.5px;
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody tr:hover > * {
    background: #fafbfc;
}

.status-pill,
.badge-soft,
.code-pill,
.erp-muted-pill,
.movement-pill {
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 800;
    line-height: 1.1;
}

.code-pill,
.erp-muted-pill {
    border-color: #c7cce6;
    background: #eef0f8;
    color: var(--roder-navy);
}

.empty-state {
    padding: 24px 16px;
    border: 1px dashed var(--roder-border-strong);
    border-radius: var(--roder-radius);
    background: var(--roder-surface-soft);
}

.roder-alert,
.alert {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 12px;
}

.page-content .mt-4 {
    margin-top: 14px !important;
}

.page-content .mb-4 {
    margin-bottom: 14px !important;
}

.page-content .mt-3 {
    margin-top: 11px !important;
}

.page-content .mb-3 {
    margin-bottom: 11px !important;
}

.page-content .btn.px-4 {
    padding-right: 14px !important;
    padding-left: 14px !important;
}

/* Dashboard principal */

.erp-dashboard-hero.clean {
    min-height: auto;
    margin-bottom: 12px;
    padding: 15px 17px;
}

.erp-dashboard-hero.clean h1 {
    font-size: clamp(1.35rem, 2vw, 1.72rem);
}

.erp-kpi-grid.compact {
    gap: 10px;
    margin-bottom: 12px;
}

.erp-kpi-grid.compact .erp-kpi-card {
    min-height: 92px;
    padding: 13px 15px;
}

.erp-kpi-grid.compact .erp-kpi-card strong {
    margin-top: 5px;
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
}

.erp-dashboard-main {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
    gap: 12px;
    margin-bottom: 12px;
}

.erp-side-stack {
    gap: 12px;
}

.erp-status-chart {
    gap: 8px;
}

.erp-status-row {
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
}

/* Dashboard empresa: tarjetas compactas sin columnas estiradas */

.erp-company-dashboard-main {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 12px;
    align-items: start;
}

.erp-company-dashboard-main .erp-flow-panel {
    min-height: 0;
    align-self: start;
}

.erp-company-dashboard-main > .erp-flow-panel:only-child {
    grid-column: 1 / -1;
}

.erp-company-dashboard-main .erp-status-chart {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.erp-company-dashboard-main .erp-status-row {
    position: relative;
    grid-template-columns: 1fr;
    gap: 9px;
    min-height: 84px;
    padding: 10px 11px 11px;
    align-content: space-between;
    border-top: 3px solid rgba(2, 30, 100, 0.76);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.035);
}

.erp-company-dashboard-main .erp-status-row.success {
    border-top-color: var(--roder-success);
}

.erp-company-dashboard-main .erp-status-row > div {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.erp-company-dashboard-main .erp-status-row div span {
    max-width: 118px;
    line-height: 1.3;
}

.erp-company-dashboard-main .erp-status-row div strong {
    margin-top: 0;
    color: var(--roder-navy);
    font-size: 23px;
    line-height: 1;
}

.erp-company-dashboard-main .erp-status-row progress {
    height: 6px;
}

.erp-company-dashboard-main .erp-finance-panel .erp-mini-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.erp-company-dashboard-main .erp-finance-panel .erp-mini-list div {
    display: grid;
    min-height: 57px;
    padding: 9px 10px;
    align-content: space-between;
    gap: 5px;
}

.erp-company-dashboard-main .erp-finance-panel .erp-mini-list div span {
    line-height: 1.25;
}

.erp-company-dashboard-main .erp-finance-panel .erp-mini-list div strong {
    font-size: 17px;
    line-height: 1.1;
}

.erp-dashboard-insights {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 12px;
    margin-bottom: 12px;
    align-items: start;
}

.erp-dashboard-insights .erp-alert-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.erp-dashboard-insights .erp-inventory-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.erp-dashboard-insights .erp-alert-list div,
.erp-dashboard-insights .erp-inventory-snapshot div {
    min-height: 57px;
    padding: 9px 10px;
}

.erp-dashboard-insights .erp-alert-list div span,
.erp-dashboard-insights .erp-inventory-snapshot div span {
    line-height: 1.25;
}

.erp-dashboard-insights .erp-alert-list div strong {
    font-size: 19px;
}

.erp-dashboard-insights .erp-inventory-snapshot div strong {
    color: var(--roder-navy);
    font-size: 19px;
}

.erp-dashboard-recent {
    gap: 12px;
    margin-top: 0 !important;
    align-items: start;
}

.erp-dashboard-recent > .panel {
    width: 100%;
    align-self: start;
}

.erp-dashboard-recent .erp-stock-feed,
.erp-dashboard-recent .erp-activity-list {
    max-height: 344px;
    padding-right: 3px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.erp-dashboard-recent .erp-stock-feed::-webkit-scrollbar,
.erp-dashboard-recent .erp-activity-list::-webkit-scrollbar {
    width: 6px;
}

.erp-dashboard-recent .erp-stock-feed::-webkit-scrollbar-thumb,
.erp-dashboard-recent .erp-activity-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #cbd5e1;
}

/* Dashboard ejecutivo de empresa v3.2 */

.erp-dashboard-date {
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--roder-surface-soft);
    color: var(--roder-muted);
    font-size: 10px;
    font-weight: 700;
}

.erp-primary-action {
    border-color: var(--roder-orange) !important;
    background: linear-gradient(135deg, var(--roder-orange), var(--roder-orange-dark)) !important;
    box-shadow: 0 8px 18px rgba(248, 88, 13, 0.18);
}

.erp-primary-action:hover {
    border-color: var(--roder-orange-dark) !important;
    background: var(--roder-orange-dark) !important;
}

.erp-executive-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.erp-executive-kpi-grid .erp-kpi-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-top: 3px solid var(--roder-navy);
}

.erp-executive-kpi-grid .erp-kpi-card.primary {
    border-top-color: var(--roder-orange);
}

.erp-executive-kpi-grid .erp-kpi-card::after {
    content: "";
    position: absolute;
    right: -26px;
    bottom: -38px;
    width: 86px;
    height: 86px;
    border: 12px solid rgba(2, 30, 100, 0.035);
    border-radius: 50%;
    pointer-events: none;
}

.erp-executive-kpi-grid .erp-kpi-card.primary::after {
    border-color: rgba(255, 255, 255, 0.07);
}

.erp-executive-kpi-grid .erp-kpi-card-success {
    border-top-color: var(--roder-success);
}

.erp-executive-kpi-grid .erp-kpi-card-inventory {
    border-top-color: var(--roder-info);
}

.erp-executive-kpi-grid .erp-kpi-card-finance {
    border-top-color: var(--roder-orange);
    background: linear-gradient(145deg, #ffffff 0%, #fff8f4 100%);
}

.erp-executive-kpi-grid .erp-kpi-card-finance strong {
    overflow-wrap: anywhere;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.erp-admin-command-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.72fr);
    gap: 12px;
    margin-bottom: 12px;
    align-items: start;
}

.erp-live-badge {
    display: inline-flex;
    padding: 4px 8px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #ecfdf5;
    color: #166534;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.erp-priority-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.erp-priority-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 126px;
    padding: 11px;
    flex-direction: column;
    border: 1px solid var(--roder-border);
    border-top: 3px solid var(--roder-border-strong);
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, var(--roder-surface-soft) 100%);
}

.erp-priority-card::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--roder-success);
}

.erp-priority-card.warning {
    border-top-color: var(--roder-warning);
    background: linear-gradient(180deg, #fffef9 0%, #fffbeb 100%);
}

.erp-priority-card.warning::before {
    background: var(--roder-warning);
}

.erp-priority-card.danger {
    border-top-color: var(--roder-danger);
    background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%);
}

.erp-priority-card.danger::before {
    background: var(--roder-danger);
}

.erp-priority-card > div {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.erp-priority-card > div span {
    padding-left: 11px;
    color: #52647e;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.035em;
    line-height: 1.3;
    text-transform: uppercase;
}

.erp-priority-card > div strong {
    color: var(--roder-navy);
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.erp-priority-card p {
    margin: 8px 0 9px;
    color: var(--roder-muted);
    font-size: 10px;
    line-height: 1.4;
}

.erp-priority-card a {
    width: fit-content;
    margin-top: auto;
    color: var(--roder-navy);
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
}

.erp-priority-card a::after {
    content: " →";
    color: var(--roder-orange);
}

.erp-priority-card a:hover {
    color: var(--roder-orange-dark);
}

.erp-management-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.erp-management-mini-grid > div {
    display: grid;
    min-height: 65px;
    padding: 9px 10px;
    align-content: space-between;
    gap: 5px;
    border: 1px solid var(--roder-border);
    border-radius: 10px;
    background: var(--roder-surface-soft);
}

.erp-management-mini-grid > div span {
    color: #52647e;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.04em;
    line-height: 1.3;
    text-transform: uppercase;
}

.erp-management-mini-grid > div strong {
    color: var(--roder-navy);
    font-size: 19px;
    font-weight: 900;
    line-height: 1.05;
}

.erp-management-mini-grid > div.featured {
    border-color: #c7cce6;
    background: #f2f4fb;
}

.erp-management-mini-grid > div.warning {
    border-color: #fcd34d;
    background: #fffbeb;
}

.erp-management-mini-grid > div.warning span,
.erp-management-mini-grid > div.warning strong {
    color: #9a4b08;
}

.erp-management-mini-grid > div.danger {
    border-color: #fecaca;
    background: #fef2f2;
}

.erp-management-mini-grid > div.danger span,
.erp-management-mini-grid > div.danger strong {
    color: #b42318;
}

.erp-admin-health-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
    align-items: start;
}

.erp-admin-health-grid > .panel:only-child {
    grid-column: 1 / -1;
}

.erp-financial-grid,
.erp-inventory-health-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.erp-low-stock-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #fde68a;
    border-radius: 10px;
    background: #fffcf2;
}

.erp-low-stock-preview-head {
    display: flex;
    grid-column: 1 / -1;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid #fde68a;
}

.erp-low-stock-preview-head span,
.erp-low-stock-preview-head strong {
    color: #92400e;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.erp-low-stock-item {
    display: flex;
    min-width: 0;
    padding: 7px 8px;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.erp-low-stock-item > div {
    min-width: 0;
}

.erp-low-stock-item strong,
.erp-low-stock-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-low-stock-item strong {
    color: var(--roder-ink);
    font-size: 10.5px;
}

.erp-low-stock-item small {
    margin-top: 2px;
    color: var(--roder-muted);
    font-size: 9px;
}

.erp-low-stock-item > span {
    flex: 0 0 auto;
    color: #92400e;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.erp-panel-note {
    margin-top: 9px;
    padding: 8px 10px;
    border-left: 3px solid var(--roder-orange);
    border-radius: 7px;
    background: var(--roder-orange-soft);
    color: #9a3412;
    font-size: 10.5px;
    font-weight: 700;
}

.erp-dashboard-recent .erp-stock-feed-item.compact {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 72px;
    padding: 9px 10px;
}

.erp-dashboard-recent .erp-stock-feed-item.compact > div:last-child {
    min-width: 104px;
    padding: 7px 9px;
}

.erp-dashboard-recent .erp-stock-feed-item.compact > div:last-child strong {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.erp-dashboard-recent .erp-stock-feed-item.compact > div:last-child span {
    font-size: 8.5px;
}

/* Cajas: detalle y formulario compactos */

.box-page-header {
    gap: 12px;
    margin-bottom: 12px;
    padding: 15px 17px;
    border: 1px solid var(--roder-border);
    border-left: 4px solid var(--roder-navy);
    border-radius: var(--roder-radius-lg);
    background: #ffffff;
    box-shadow: var(--roder-shadow);
}

.box-page-header h1 {
    font-size: clamp(1.35rem, 2vw, 1.72rem);
    letter-spacing: -0.035em;
}

.box-page-header p {
    margin-top: 5px;
    font-size: 12px;
}

.box-page-actions {
    gap: 7px;
}

.box-hero-card {
    gap: 12px;
    margin-bottom: 12px;
    padding: 16px;
    border-radius: var(--roder-radius-lg);
    background: linear-gradient(145deg, var(--roder-navy) 0%, var(--roder-navy-dark) 100%);
}

.box-code-block strong {
    font-size: 25px;
}

.box-hero-product h2 {
    font-size: 19px;
}

.box-hero-metrics {
    gap: 8px;
}

.box-hero-metrics div {
    padding: 10px 11px;
    border-radius: 9px;
}

.box-hero-metrics strong {
    font-size: 18px;
}

.box-detail-pro-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
    gap: 12px;
    margin-bottom: 12px;
}

.box-pro-panel {
    padding: 14px;
    border: 1px solid var(--roder-border);
    border-radius: var(--roder-radius);
    background: #ffffff;
    box-shadow: var(--roder-shadow);
}

.box-pro-panel-header {
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid #edf1f5;
}

.box-pro-panel-header h2 {
    font-size: 14px;
}

.box-pro-panel-header p {
    margin-top: 3px;
    font-size: 11px;
}

.box-info-grid,
.detail-list {
    gap: 7px;
}

.box-info-item,
.detail-list div {
    padding: 9px 10px;
    border-radius: 9px;
}

.box-info-item span,
.detail-list span {
    font-size: 9px;
}

.box-id-layout {
    gap: 8px;
}

.box-id-card {
    padding: 10px;
    border-radius: 9px;
}

.box-qr-frame,
.box-barcode-frame {
    padding: 9px;
    border-radius: 9px;
}

.box-qr-frame img {
    width: 116px;
    height: 116px;
}

.box-barcode-frame {
    min-height: 136px;
}

.box-id-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
}

.erp-box-form-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 12px;
}

.erp-box-form-side {
    top: 12px;
}

.erp-box-info-panel {
    padding: 14px;
    border-radius: var(--roder-radius);
    box-shadow: var(--roder-shadow);
}

.erp-box-info-head {
    margin-bottom: 11px;
    padding-bottom: 9px;
}

.erp-box-info-head h2 {
    font-size: 14px;
}

.erp-box-info-head p {
    font-size: 11px;
}

.erp-box-info-list {
    gap: 7px;
}

.erp-box-info-list div {
    padding: 9px;
    border-radius: 9px;
}

/* Tarjetas operacionales que antes ocupaban demasiado alto */

.pending-order-card,
.driver-order-card-clean,
.driver-dispatch-card,
.warehouse-pending-card,
.erp-report-card,
.erp-company-action-card,
.driver-route-card,
.driver-available-card,
.route-admin-ready-card,
.ar-customer-card {
    border-radius: var(--roder-radius);
    box-shadow: var(--roder-shadow);
}

.pending-order-card,
.driver-order-card-clean,
.driver-dispatch-card,
.warehouse-pending-card,
.driver-route-card,
.driver-available-card,
.route-admin-ready-card,
.ar-customer-card {
    padding: 13px 14px;
}

.erp-reports-grid,
.driver-board-grid,
.driver-available-grid,
.route-admin-ready-grid,
.erp-company-actions-grid {
    gap: 11px;
}

.erp-report-card,
.erp-company-action-card {
    padding: 14px;
}

.erp-report-card:hover,
.erp-company-action-card:hover,
.driver-dispatch-card:hover,
.warehouse-pending-card:hover {
    border-color: #c7cce6;
    box-shadow: var(--roder-shadow-hover);
    transform: translateY(-1px);
}

/* Login v3.1 */

.auth-body {
    min-height: 100dvh;
    background:
        radial-gradient(circle at 88% 12%, rgba(2, 30, 100, 0.08), transparent 28%),
        linear-gradient(145deg, #eef2f7 0%, #f8fafc 52%, #eef1f6 100%) !important;
}

.auth-shell {
    min-height: 100dvh;
    grid-template-columns: minmax(560px, 1.08fr) minmax(430px, 0.92fr);
}

.auth-brand-panel {
    position: relative;
    padding: clamp(32px, 4.5vw, 66px) !important;
    background:
        radial-gradient(circle at 88% 18%, rgba(248, 88, 13, 0.16), transparent 22%),
        radial-gradient(circle at 12% 88%, rgba(255, 255, 255, 0.08), transparent 25%),
        linear-gradient(145deg, var(--roder-navy-dark) 0%, var(--roder-navy) 58%, var(--roder-navy-soft) 100%) !important;
}

.auth-brand-panel::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) !important;
    background-size: 42px 42px !important;
    mask-image: linear-gradient(to bottom right, rgba(0, 0, 0, 0.8), transparent 72%);
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    right: -150px;
    bottom: -210px;
    width: 470px;
    height: 470px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 50%;
    box-shadow:
        0 0 0 52px rgba(255, 255, 255, 0.025),
        0 0 0 104px rgba(255, 255, 255, 0.018);
    pointer-events: none;
}

.auth-brand-wrap {
    max-width: 650px !important;
}

.auth-brand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.auth-logo-lockup,
.auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.auth-logo-mark {
    display: inline-flex !important;
    width: 88px !important;
    height: 43px !important;
    min-width: 88px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

.auth-logo-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-logo-wordmark strong,
.auth-logo-wordmark span {
    display: block;
    line-height: 1;
}

.auth-logo-wordmark strong {
    color: var(--roder-orange);
    font-size: 19px;
    font-weight: 900;
    letter-spacing: 0.13em;
}

.auth-logo-wordmark span {
    margin-top: 6px;
    color: #ffffff;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.42em;
}

.auth-hero-copy {
    margin-top: clamp(34px, 5.5vh, 58px);
}

.auth-hero-copy .auth-eyebrow {
    margin-bottom: 11px;
    color: rgba(255, 255, 255, 0.68) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
}

.auth-brand-panel h1 {
    max-width: 620px;
    color: #ffffff;
    font-size: clamp(2.35rem, 4vw, 3.9rem);
    font-weight: 900;
    letter-spacing: -0.055em !important;
    line-height: 0.98;
}

.auth-brand-panel h1 span {
    display: block;
    margin-top: 7px;
    color: var(--roder-orange);
}

.auth-brand-copy {
    max-width: 560px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.76) !important;
    font-size: 15px;
    line-height: 1.65;
}

.auth-feature-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: clamp(26px, 4.5vh, 42px);
}

.auth-feature-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    min-height: 116px;
    padding: 14px !important;
    border-color: rgba(255, 255, 255, 0.13) !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, 0.065) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(8px);
}

.auth-feature-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(248, 88, 13, 0.40);
    border-radius: 9px;
    background: rgba(248, 88, 13, 0.14);
    color: #ff7a3b;
}

.auth-feature-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-feature-item strong {
    margin: 1px 0 5px;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.3;
}

.auth-feature-item p {
    color: rgba(255, 255, 255, 0.68);
    font-size: 11.5px;
    line-height: 1.45;
}

.auth-brand-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 11px;
}

.auth-trust-dot,
.auth-security-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--roder-success);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.auth-form-panel {
    padding: 34px !important;
    background:
        radial-gradient(circle at 80% 10%, rgba(248, 88, 13, 0.07), transparent 22%),
        transparent;
}

.auth-card {
    position: relative;
    max-width: 438px;
    padding: 34px 32px 28px;
    overflow: hidden;
    border: 1px solid #d9e0ea !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.12) !important;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--roder-orange), #ff8b52);
}

.auth-mobile-brand {
    display: none;
}

.auth-card-header {
    margin-bottom: 23px;
}

.auth-access-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 10px;
    color: var(--roder-navy);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-access-label span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--roder-orange);
    box-shadow: 0 0 0 4px var(--roder-orange-soft);
}

.auth-card-header h2 {
    margin-bottom: 8px;
    color: var(--roder-ink);
    font-size: clamp(1.75rem, 3vw, 2.1rem);
    font-weight: 900;
    letter-spacing: -0.045em !important;
}

.auth-card-header p:last-child {
    color: var(--roder-muted);
    font-size: 13px;
    line-height: 1.5;
}

.auth-form {
    gap: 16px;
}

.auth-field label {
    margin-bottom: 6px;
    color: var(--roder-ink);
    font-size: 12px;
    font-weight: 750;
}

.auth-input {
    height: 48px !important;
    border-color: var(--roder-border) !important;
    border-radius: 10px !important;
    background: var(--roder-surface-soft) !important;
    font-size: 13px;
}

.auth-input:hover {
    border-color: #aeb8c8 !important;
}

.auth-input:focus {
    border-color: var(--roder-navy) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(2, 30, 100, 0.10) !important;
}

.auth-submit {
    display: flex;
    height: 49px !important;
    margin-top: 5px;
    padding: 0 18px;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--roder-orange) 0%, var(--roder-orange-dark) 100%) !important;
    box-shadow: 0 12px 24px rgba(248, 88, 13, 0.22) !important;
}

.auth-submit span:last-child {
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    transition: transform 0.18s ease;
}

.auth-submit:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 16px 30px rgba(248, 88, 13, 0.28) !important;
}

.auth-submit:hover span:last-child {
    transform: translateX(3px);
}

.auth-security-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 17px;
    color: var(--roder-muted);
    font-size: 10.5px;
}

.auth-card-footer {
    margin-top: 17px;
    padding-top: 14px;
    border-top-color: #edf1f5;
}

.auth-card-footer p {
    color: #8793a5;
    font-size: 10.5px;
    text-align: center;
}

/* Responsive */

@media (max-width: 1080px) {
    .erp-saas-reference-main-v3291 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    .erp-admin-command-grid,
    .erp-admin-health-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    :root {
        --sidebar-width: 224px;
    }

    .main,
    .app-main {
        padding: 16px;
    }

    .erp-dashboard-main,
    .erp-dashboard-insights,
    .box-detail-pro-grid,
    .erp-box-form-layout {
        grid-template-columns: 1fr;
    }

    .erp-box-form-side {
        position: static;
    }

    .box-id-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .auth-brand-panel {
        display: none !important;
    }

    .auth-body {
        background:
            radial-gradient(circle at 50% 0%, rgba(2, 30, 100, 0.10), transparent 34%),
            linear-gradient(180deg, #f8fafc 0%, #edf1f6 100%) !important;
    }

    .auth-shell {
        display: flex !important;
        min-height: 100dvh !important;
        padding: 18px !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .auth-form-panel {
        width: 100% !important;
        min-height: auto !important;
        padding: 0 !important;
    }

    .auth-card {
        max-width: 430px !important;
        padding: 30px 27px 25px !important;
        border-radius: 17px !important;
    }

    .auth-mobile-brand {
        display: flex !important;
        width: fit-content;
        margin-bottom: 26px;
    }

    .auth-mobile-brand .auth-logo-mark {
        width: 72px !important;
        height: 35px !important;
        min-width: 72px !important;
    }

    .auth-mobile-brand .auth-logo-wordmark strong {
        color: var(--roder-orange);
        font-size: 16px;
    }

    .auth-mobile-brand .auth-logo-wordmark span {
        color: var(--roder-navy);
        font-size: 8px;
    }
}

@media (max-width: 900px) {
    .erp-executive-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-priority-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-dashboard-hero .erp-hero-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-shell-bar {
        height: 58px;
        padding: 8px 12px;
        background: var(--roder-navy);
        box-shadow: 0 6px 18px rgba(2, 30, 100, 0.18);
    }

    .mobile-brand {
        gap: 8px;
    }

    .mobile-brand .brand-icon,
    .mobile-brand .roder-brand-mark {
        width: 54px;
        height: 31px;
        min-width: 54px;
    }

    .mobile-menu-button,
    .mobile-sidebar-close {
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.10);
    }

    .sidebar,
    .app-sidebar {
        width: min(286px, 86vw);
        padding: 13px 12px;
    }

    .main,
    .app-main {
        width: 100%;
        margin-left: 0;
        padding: 14px 12px 18px;
    }

    .erp-page-header,
    .erp-dashboard-hero {
        align-items: flex-start;
        padding: 14px;
    }

    .erp-page-actions,
    .erp-hero-actions {
        width: 100%;
    }

    .erp-page-actions .btn,
    .erp-hero-actions .btn {
        flex: 1 1 auto;
    }

    .box-id-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 13px;
    }

    .main,
    .app-main {
        padding-inline: 9px;
    }

    .erp-page-header,
    .erp-dashboard-hero,
    .panel,
    .erp-form-card,
    .erp-side-card,
    .erp-ops-panel {
        border-radius: 11px;
    }

    .panel,
    .erp-form-card,
    .erp-side-card,
    .erp-ops-panel {
        padding: 12px;
    }

    .erp-kpi-grid,
    .erp-report-kpi-grid,
    .erp-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .erp-kpi-card,
    .erp-report-kpi-card,
    .erp-summary-item,
    .premium-card {
        min-height: 82px;
        padding: 11px;
    }

    .erp-kpi-card strong,
    .erp-report-kpi-card strong,
    .erp-summary-item strong,
    .premium-card strong {
        font-size: 1.35rem;
    }

    .erp-company-dashboard-main .erp-status-chart,
    .erp-company-dashboard-main .erp-finance-panel .erp-mini-list,
    .erp-dashboard-insights .erp-alert-list,
    .erp-dashboard-insights .erp-inventory-snapshot {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-financial-grid,
    .erp-inventory-health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-company-dashboard-main .erp-status-row {
        min-height: 78px;
    }

    .erp-dashboard-recent .erp-stock-feed,
    .erp-dashboard-recent .erp-activity-list {
        max-height: 310px;
    }

    .btn {
        min-height: 36px;
    }

    .table > :not(caption) > * > * {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .erp-priority-grid,
    .erp-low-stock-preview,
    .erp-dashboard-hero .erp-hero-actions {
        grid-template-columns: 1fr;
    }

    .erp-priority-card {
        min-height: 112px;
    }

    .auth-shell {
        padding: 10px !important;
    }

    .auth-card {
        padding: 27px 20px 22px !important;
        border-radius: 15px !important;
    }

    .auth-mobile-brand {
        margin-bottom: 22px;
    }

    .auth-card-header {
        margin-bottom: 20px;
    }

    .auth-security-note {
        align-items: flex-start;
        line-height: 1.4;
    }
}

@media (min-width: 981px) and (max-height: 720px) {
    .auth-brand-panel {
        padding: 28px 42px !important;
    }

    .auth-hero-copy {
        margin-top: 24px;
    }

    .auth-brand-panel h1 {
        font-size: clamp(2.2rem, 3.5vw, 3.25rem);
    }

    .auth-brand-copy {
        margin-top: 14px;
        line-height: 1.5;
    }

    .auth-feature-list {
        margin-top: 18px;
    }

    .auth-feature-item {
        min-height: 100px;
        padding: 12px !important;
    }

    .auth-brand-footer {
        margin-top: 16px;
    }

    .auth-form-panel {
        padding: 24px !important;
    }
}

/* Dashboard de referencia v3.3 */

.erp-reference-header {
    display: flex;
    min-height: 76px;
    margin-bottom: 11px;
    padding: 13px 16px;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--roder-border);
    border-radius: var(--roder-radius-lg);
    background: #ffffff;
    box-shadow: var(--roder-shadow);
}

.erp-reference-title {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
}

.erp-reference-title h1 {
    margin: 0;
    color: var(--roder-ink);
    font-size: clamp(1.65rem, 2.2vw, 1.95rem);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 1;
}

.erp-reference-title p {
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--roder-muted);
    font-size: 11.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-reference-title p strong {
    color: var(--roder-navy);
    font-weight: 800;
}

.erp-reference-header-side {
    display: flex;
    align-items: center;
    gap: 10px;
}

.erp-reference-header-side .erp-dashboard-date {
    margin-top: 0;
    white-space: nowrap;
}

.erp-reference-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.erp-reference-actions .erp-reference-action {
    display: inline-flex;
    min-height: 42px;
    padding: 0 15px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-width: 1px;
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 850;
    letter-spacing: -0.01em;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.erp-reference-actions .erp-reference-action svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.erp-reference-actions .erp-reference-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 16px rgba(15, 23, 42, 0.11);
}

.erp-reference-actions .erp-primary-action {
    box-shadow: 0 8px 18px rgba(248, 88, 13, 0.2);
}

.erp-reference-actions .erp-reference-action.btn-outline-dark {
    border-color: #b7c2d2 !important;
}

.erp-reference-actions .erp-reference-action:focus-visible {
    outline: 3px solid rgba(49, 94, 234, 0.2);
    outline-offset: 2px;
}

.erp-reference-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 11px;
}

.erp-reference-kpi {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 100px;
    padding: 13px;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    overflow: hidden;
    border: 1px solid var(--roder-border);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--roder-shadow);
}

.erp-reference-kpi::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 74px;
    height: 74px;
    border: 12px solid rgba(2, 30, 100, 0.025);
    border-radius: 50%;
    pointer-events: none;
}

.erp-reference-kpi-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: #eef2ff;
    color: #315eea;
}

.erp-reference-kpi-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.erp-reference-kpi > div {
    min-width: 0;
}

.erp-reference-kpi > div > span,
.erp-reference-kpi > div > strong,
.erp-reference-kpi > div > small {
    display: block;
}

.erp-reference-kpi > div > span {
    color: #64748b;
    font-size: 10.5px;
    font-weight: 850;
    letter-spacing: 0.045em;
    line-height: 1.25;
    text-transform: uppercase;
}

.erp-reference-kpi > div > strong {
    margin-top: 4px;
    color: var(--roder-navy);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
}

.erp-reference-kpi > div > small {
    margin-top: 5px;
    color: var(--roder-muted);
    font-size: 11px;
    line-height: 1.35;
}

.erp-reference-kpi.kpi-pickup .erp-reference-kpi-icon {
    background: #fff1e8;
    color: var(--roder-orange);
}

.erp-reference-kpi.kpi-dispatch .erp-reference-kpi-icon {
    background: #dcfce7;
    color: #16a34a;
}

.erp-reference-kpi.kpi-stock .erp-reference-kpi-icon {
    background: #eef0ff;
    color: #4f46e5;
}

.erp-reference-kpi.kpi-finance .erp-reference-kpi-icon {
    background: #e9eefb;
    color: var(--roder-navy);
}

.erp-reference-kpi.kpi-finance > div > strong {
    overflow-wrap: anywhere;
    font-size: clamp(18px, 1.7vw, 24px);
}

.erp-reference-main-grid,
.erp-reference-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 11px;
    margin-bottom: 11px;
    align-items: stretch;
}

.erp-reference-main-grid > .panel,
.erp-reference-lower-grid > .panel {
    min-width: 0;
    height: 100%;
    padding: 13px 14px;
}

.erp-reference-flow {
    display: grid;
    gap: 10px;
}

.erp-reference-flow-row {
    --flow-color: #315eea;
    display: grid;
    min-height: 27px;
    grid-template-columns: 124px 28px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.erp-reference-flow-row > span {
    color: #475569;
    font-size: 11px;
    font-weight: 700;
}

.erp-reference-flow-row > strong {
    color: var(--roder-navy);
    font-size: 13px;
    font-weight: 900;
    text-align: right;
}

.erp-reference-flow-row progress {
    width: 100%;
    height: 7px;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 999px;
    background: #e9eef5;
}

.erp-reference-flow-row progress::-webkit-progress-bar {
    border-radius: 999px;
    background: #e9eef5;
}

.erp-reference-flow-row progress::-webkit-progress-value {
    border-radius: 999px;
    background: var(--flow-color);
}

.erp-reference-flow-row progress::-moz-progress-bar {
    border-radius: 999px;
    background: var(--flow-color);
}

.erp-reference-flow-row.flow-preparation {
    --flow-color: #f59e0b;
}

.erp-reference-flow-row.flow-ready {
    --flow-color: #22c55e;
}

.erp-reference-flow-row.flow-route {
    --flow-color: #0ea5e9;
}

.erp-reference-flow-row.flow-closed {
    --flow-color: var(--roder-navy);
}

.erp-reference-inventory-body {
    display: grid;
    min-height: 174px;
    grid-template-columns: minmax(138px, 0.8fr) minmax(160px, 1fr);
    align-items: center;
    gap: 14px;
}

.erp-reference-donut-wrap {
    position: relative;
    width: 148px;
    height: 148px;
    margin: 0 auto;
}

.erp-reference-donut {
    display: block;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.erp-reference-donut-track,
.erp-reference-donut-segment {
    fill: none;
    stroke-width: 5.6;
}

.erp-reference-donut-track {
    stroke: #e8edf4;
}

.erp-reference-donut-segment {
    transition: stroke-dasharray 0.2s ease;
}

.erp-reference-donut-value {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
    pointer-events: none;
}

.erp-reference-donut-value strong,
.erp-reference-donut-value span {
    display: block;
}

.erp-reference-donut-value strong {
    color: var(--roder-navy);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
}

.erp-reference-donut-value span {
    margin-top: 4px;
    color: var(--roder-muted);
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
}

.erp-reference-inventory-legend {
    display: grid;
    gap: 7px;
}

.erp-reference-inventory-legend > div {
    position: relative;
    display: grid;
    min-height: 31px;
    padding: 6px 7px 6px 17px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 7px;
    border-bottom: 1px solid #edf1f5;
}

.erp-reference-inventory-legend > div::before {
    content: "";
    position: absolute;
    left: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--segment-color);
}

.erp-reference-inventory-legend span {
    color: #475569;
    font-size: 11px;
    font-weight: 700;
}

.erp-reference-inventory-legend strong {
    color: var(--roder-navy);
    font-size: 12px;
    font-weight: 900;
}

.erp-reference-inventory-legend small {
    min-width: 42px;
    color: var(--roder-muted);
    font-size: 10px;
    text-align: right;
}

.erp-reference-lower-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    margin-bottom: 0;
}

.erp-reference-table-wrap {
    overflow: hidden;
    border: 1px solid var(--roder-border);
    border-radius: 10px;
}

.erp-reference-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.erp-reference-table thead {
    position: static;
}

.erp-reference-table thead th {
    font-size: 10.5px;
}

.erp-reference-table th:nth-child(1) {
    width: 18%;
}

.erp-reference-table th:nth-child(1),
.erp-reference-table td:nth-child(1) {
    text-align: center;
}

.erp-reference-table th:nth-child(2) {
    width: 25%;
}

.erp-reference-table th:nth-child(4) {
    width: 22%;
}

.erp-reference-table > :not(caption) > * > * {
    padding: 10px 8px;
}

.erp-reference-table .code-pill,
.erp-reference-table .movement-pill {
    max-width: 100%;
    text-align: center;
}

.erp-reference-table td:nth-child(1),
.erp-reference-table td:nth-child(2) {
    overflow: hidden;
}

.erp-reference-table .code-pill {
    min-width: 0;
    padding: 5px 8px !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    white-space: nowrap;
}

.erp-reference-table .movement-pill {
    padding: 5px 8px !important;
    justify-content: center;
    font-size: 10px !important;
    line-height: 1.2;
    white-space: nowrap;
}

.erp-reference-movement-detail > strong,
.erp-reference-movement-detail > small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.erp-reference-movement-detail > strong {
    display: -webkit-box;
    color: var(--roder-ink);
    font-size: 11.5px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.erp-reference-movement-detail > small {
    margin-top: 2px;
    color: var(--roder-muted);
    font-size: 10px;
}

.erp-reference-order-context {
    display: grid;
    gap: 2px;
}

.erp-reference-order-context a,
.erp-reference-order-context > strong {
    width: fit-content;
    color: var(--roder-navy);
    font-size: 11.5px;
    font-weight: 900;
    line-height: 1.25;
    text-decoration: none;
}

.erp-reference-order-context a:hover {
    color: var(--roder-orange-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.erp-reference-order-context span {
    color: var(--roder-ink);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.erp-reference-record strong,
.erp-reference-record small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-reference-record strong {
    color: var(--roder-ink);
    font-size: 11px;
}

.erp-reference-record small {
    margin-top: 3px;
    color: var(--roder-muted);
    font-size: 10px;
}

.erp-reference-alert-list {
    display: grid;
    gap: 5px;
}

.erp-reference-alert-list > div {
    display: grid;
    min-height: 34px;
    padding: 6px 7px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border: 1px solid #e7ecf2;
    border-radius: 8px;
    background: #fafbfd;
}

.erp-reference-alert-icon {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 6px;
    background: #dcfce7;
    color: #15803d;
    font-size: 10px;
    font-weight: 900;
}

.erp-reference-alert-list > div.warning .erp-reference-alert-icon {
    background: #fef3c7;
    color: #b45309;
}

.erp-reference-alert-list > div.danger .erp-reference-alert-icon {
    background: #fee2e2;
    color: #dc2626;
}

.erp-reference-alert-list > div > span:nth-child(2) {
    color: #475569;
    font-size: 11px;
    font-weight: 700;
}

.erp-reference-alert-list > div > a,
.erp-reference-alert-list > div > strong {
    min-width: 70px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #edf2f7;
    color: #475569;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.erp-reference-alert-list > div.warning > a,
.erp-reference-alert-list > div.warning > strong {
    background: #fff3d6;
    color: #a14b08;
}

.erp-reference-alert-list > div.danger > a,
.erp-reference-alert-list > div.danger > strong {
    background: #fee9e7;
    color: #b42318;
}

.erp-reference-alert-list > div > a:hover {
    box-shadow: inset 0 0 0 1px currentColor;
}

.erp-reference-management-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #edf1f5;
}

.erp-reference-alerts-panel {
    display: flex;
    flex-direction: column;
}

.erp-reference-management-strip > div {
    min-width: 0;
    padding: 7px;
    border-radius: 8px;
    background: var(--roder-surface-soft);
}

.erp-reference-management-strip span,
.erp-reference-management-strip strong {
    display: block;
}

.erp-reference-management-strip span {
    color: var(--roder-muted);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.3;
    text-transform: uppercase;
}

.erp-reference-management-strip strong {
    margin-top: 4px;
    overflow-wrap: anywhere;
    color: var(--roder-navy);
    font-size: 15px;
    font-weight: 900;
}

.erp-reference-management-strip > div.danger {
    background: #fef2f2;
}

.erp-reference-management-strip > div.danger span,
.erp-reference-management-strip > div.danger strong {
    color: #b42318;
}

/* Login inspirado en la referencia v3.3 */

@media (min-width: 981px) {
    .auth-brand-panel .auth-brand-wrap {
        max-width: 610px !important;
    }

    .auth-brand-panel .auth-brand-header {
        justify-content: center;
    }

    .auth-brand-panel .auth-logo-lockup {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .auth-brand-panel .auth-logo-mark {
        width: 146px !important;
        height: 72px !important;
        min-width: 146px !important;
    }

    .auth-brand-panel .auth-logo-wordmark strong {
        font-size: 29px;
        letter-spacing: 0.1em;
    }

    .auth-brand-panel .auth-logo-wordmark span {
        margin-top: 7px;
        font-size: 11px;
        letter-spacing: 0.5em;
        transform: translateX(3px);
    }
}

.auth-brand-panel {
    background:
        linear-gradient(90deg, rgba(1, 16, 54, 0.08), rgba(2, 30, 100, 0.18)),
        radial-gradient(circle at 15% 20%, rgba(248, 88, 13, 0.12), transparent 22%),
        linear-gradient(145deg, #01163f 0%, var(--roder-navy) 54%, #061d51 100%) !important;
}

.auth-brand-panel::before {
    opacity: 0.62;
    background-image:
        linear-gradient(115deg, transparent 0 48%, rgba(255, 255, 255, 0.025) 48% 49%, transparent 49% 100%),
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) !important;
    background-size: 100% 100%, 44px 44px, 44px 44px !important;
}

.auth-hero-copy {
    margin-top: clamp(24px, 3.6vh, 40px);
}

.auth-brand-panel h1 {
    max-width: 560px;
    font-size: clamp(2.25rem, 3.5vw, 3.35rem);
    line-height: 1.03;
}

.auth-brand-copy {
    max-width: 540px;
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.65;
}

.auth-brand-panel .auth-feature-list {
    max-width: 560px;
    gap: 24px;
    margin-top: clamp(26px, 4vh, 38px);
}

.auth-brand-panel .auth-feature-item {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 0;
    padding: 0 !important;
    align-items: center;
    gap: 10px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none;
}

.auth-brand-panel .auth-feature-icon {
    width: 42px;
    height: 42px;
    border-color: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    background: rgba(15, 67, 157, 0.5);
    color: #ffffff;
}

.auth-brand-panel .auth-feature-item strong {
    margin: 0 0 3px;
    font-size: 11.5px;
}

.auth-brand-panel .auth-feature-item p {
    font-size: 10px;
}

.auth-form-panel {
    background:
        radial-gradient(circle at 82% 12%, rgba(2, 30, 100, 0.08), transparent 24%),
        linear-gradient(145deg, #f8fafc 0%, #edf1f6 100%);
}

.auth-card {
    max-width: 410px;
    padding: 34px 31px 27px;
}

.auth-card-header h2 {
    font-size: clamp(1.7rem, 2.7vw, 2rem);
}

.auth-card-header p:last-child {
    max-width: 320px;
}

.auth-input-shell {
    position: relative;
}

.auth-input-shell .auth-input {
    width: 100%;
    padding-right: 42px !important;
    padding-left: 39px !important;
}

.auth-input-icon,
.auth-password-toggle {
    position: absolute;
    top: 50%;
    z-index: 1;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: #64748b;
    transform: translateY(-50%);
}

.auth-input-icon {
    left: 7px;
    pointer-events: none;
}

.auth-password-toggle {
    right: 6px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
}

.auth-input-icon svg,
.auth-password-toggle svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    background: #e8edf5;
    color: var(--roder-navy);
    outline: none;
}

.auth-submit {
    position: relative;
    justify-content: center;
    border-color: var(--roder-navy) !important;
    background: linear-gradient(135deg, var(--roder-navy), var(--roder-navy-dark)) !important;
    box-shadow: 0 12px 24px rgba(2, 30, 100, 0.18) !important;
}

.auth-submit:hover {
    box-shadow: 0 15px 28px rgba(2, 30, 100, 0.24) !important;
}

.auth-submit span:last-child {
    position: absolute;
    right: 18px;
}

@media (max-width: 1260px) {
    .erp-reference-kpi-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .erp-reference-kpi {
        grid-column: span 2;
    }

    .erp-reference-kpi:nth-child(4),
    .erp-reference-kpi:nth-child(5) {
        grid-column: span 3;
    }
}

@media (max-width: 1080px) {
    .erp-reference-main-grid,
    .erp-reference-lower-grid {
        grid-template-columns: 1fr;
    }

    .erp-reference-table-wrap {
        max-height: none;
    }
}

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

    .erp-reference-header-side {
        width: 100%;
        align-items: flex-start;
        flex-direction: column;
    }

    .erp-reference-actions {
        width: 100%;
        justify-content: stretch;
    }

    .erp-reference-actions .btn {
        flex: 1 1 150px;
    }
}

@media (max-width: 680px) {
    .erp-reference-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .erp-reference-kpi {
        grid-column: auto;
        min-height: 86px;
        padding: 10px;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 8px;
    }

    .erp-reference-kpi-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .erp-reference-kpi > div > strong {
        font-size: 20px;
    }

    .erp-reference-kpi:nth-child(4) {
        grid-column: auto;
    }

    .erp-reference-kpi:nth-child(5),
    .erp-reference-kpi.kpi-finance {
        grid-column: 1 / -1;
    }

    .erp-reference-inventory-body {
        grid-template-columns: 1fr;
    }

    .erp-reference-inventory-legend {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-reference-management-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-reference-table-wrap {
        overflow-x: auto;
    }

    .erp-reference-table {
        min-width: 600px;
    }
}

@media (max-width: 460px) {
    .erp-reference-title p {
        white-space: normal;
    }

    .erp-reference-flow-row {
        grid-template-columns: minmax(0, 1fr) 28px;
        gap: 7px;
    }

    .erp-reference-flow-row progress {
        grid-column: 1 / -1;
    }

    .erp-reference-inventory-legend {
        grid-template-columns: 1fr;
    }

    .erp-reference-alert-list > div {
        grid-template-columns: 22px minmax(0, 1fr);
    }

    .erp-reference-alert-list > div > a,
    .erp-reference-alert-list > div > strong {
        grid-column: 2;
        width: fit-content;
    }
}

@media (min-width: 981px) and (max-height: 760px) {
    .auth-brand-panel .auth-logo-mark {
        width: 112px !important;
        height: 55px !important;
        min-width: 112px !important;
    }

    .auth-brand-panel .auth-logo-wordmark strong {
        font-size: 23px;
    }

    .auth-brand-panel .auth-logo-wordmark span {
        font-size: 9px;
    }

    .auth-hero-copy {
        margin-top: 18px;
    }

    .auth-brand-panel h1 {
        font-size: clamp(2rem, 3vw, 2.8rem);
    }

    .auth-brand-panel .auth-feature-list {
        margin-top: 18px;
    }

    .auth-brand-panel .auth-feature-item {
        min-height: 0;
        padding: 0 !important;
    }
}

/* Pedidos ERP/WMS v3.9: densidad, jerarquía y acciones visibles */

.erp-orders-toolbar {
    margin-bottom: 12px;
}

.erp-orders-panel {
    padding: 13px;
}

.erp-orders-panel-header {
    align-items: center;
    margin-bottom: 9px;
    padding-bottom: 9px;
}

.erp-orders-panel-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.erp-orders-table-wrap {
    overflow: hidden;
}

.erp-orders-table {
    width: 100%;
    table-layout: fixed;
    font-size: 11.5px;
}

.erp-orders-table .erp-orders-col-order {
    width: 13%;
}

.erp-orders-table .erp-orders-col-customer {
    width: 18%;
}

.erp-orders-table .erp-orders-col-operation {
    width: 15%;
}

.erp-orders-table .erp-orders-col-preparation {
    width: 10%;
}

.erp-orders-table .erp-orders-col-payment {
    width: 18%;
}

.erp-orders-table .erp-orders-col-assignment {
    width: 14%;
}

.erp-orders-table .erp-orders-col-actions {
    width: 12%;
}

.erp-orders-table th,
.erp-orders-table td {
    padding: 9px 8px !important;
    white-space: normal !important;
}

.erp-orders-table thead th {
    font-size: 9px;
}

.erp-order-identity,
.erp-customer-cell,
.erp-order-operation,
.erp-order-preparation,
.erp-order-assignment {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.erp-order-identity .code-pill {
    min-height: 23px;
    padding: 4px 7px;
    border-radius: 7px;
    font-size: 9.5px;
    text-decoration: none;
}

.erp-order-identity small,
.erp-customer-cell small,
.erp-order-operation small,
.erp-order-preparation small,
.erp-order-assignment small {
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.3;
}

.erp-customer-cell strong,
.erp-order-preparation strong,
.erp-order-assignment strong {
    max-width: 100%;
    color: var(--roder-ink);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.erp-orders-table .status-pill {
    max-width: 100%;
    min-height: 22px;
    padding: 4px 7px !important;
    font-size: 9px !important;
    letter-spacing: 0.025em !important;
}

.erp-payment-cell-compact {
    min-width: 0;
    gap: 3px;
}

.erp-payment-cell-compact small {
    max-width: 100%;
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.28;
}

.erp-payment-cell-compact small strong {
    color: var(--roder-ink);
    font-weight: 850;
}

.erp-payment-cell-compact .payment-balance,
.erp-payment-cell-compact .payment-missing {
    color: #a34408;
    font-weight: 800;
}

.erp-payment-cell-compact .payment-overpayment {
    color: #075985;
    font-weight: 800;
}

.erp-order-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    flex-wrap: nowrap;
}

.erp-order-row-actions form {
    margin: 0;
}

.erp-order-row-actions .btn {
    min-height: 29px;
    padding: 5px 7px;
    font-size: 9.5px;
    white-space: nowrap;
}

.erp-orders-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #edf1f5;
}

.erp-orders-pagination > span {
    color: var(--roder-muted);
    font-size: 10.5px;
    font-weight: 700;
}

.erp-orders-pagination > div {
    display: flex;
    gap: 7px;
}

.erp-orders-mobile-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--roder-muted);
    font-size: 11px;
}

.erp-orders-mobile-heading strong {
    color: var(--roder-ink);
}

.erp-orders-mobile-heading a {
    color: var(--roder-navy);
    font-weight: 750;
}

.erp-order-mobile-card-compact {
    gap: 9px;
    padding: 13px;
}

.erp-order-mobile-card-compact .erp-order-mobile-head h2 {
    margin-top: 6px;
    font-size: 16px;
}

.erp-order-mobile-date {
    margin: -2px 0 0;
    color: var(--roder-muted);
    font-size: 10px;
}

.erp-order-mobile-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid #edf1f5;
    border-left: 1px solid #edf1f5;
}

.erp-order-mobile-facts > div {
    min-width: 0;
    padding: 8px 9px;
    border-right: 1px solid #edf1f5;
    border-bottom: 1px solid #edf1f5;
}

.erp-order-mobile-facts dt {
    margin-bottom: 2px;
    color: var(--roder-muted);
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.erp-order-mobile-facts dd {
    margin: 0;
    color: var(--roder-ink);
    font-size: 10.5px;
    font-weight: 750;
    line-height: 1.35;
}

.erp-order-mobile-card-compact .erp-order-mobile-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.erp-order-mobile-card-compact .erp-order-mobile-actions form,
.erp-order-mobile-card-compact .erp-order-mobile-actions .btn,
.erp-order-mobile-card-compact .erp-order-mobile-actions button {
    width: auto;
    margin: 0;
}

@media (max-width: 1240px) {
    .erp-orders-desktop {
        display: none;
    }

    .erp-orders-mobile {
        display: grid;
        gap: 10px;
    }
}

@media (max-width: 560px) {
    .erp-order-mobile-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .erp-order-mobile-facts {
        grid-template-columns: 1fr;
    }

    .erp-orders-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .erp-orders-pagination > div .btn {
        flex: 1;
    }
}

/* Detalle de pedido ERP/WMS v3.10: continuidad visual del dashboard */

.erp-order-detail-header {
    align-items: center;
    margin-bottom: 12px;
}

.erp-order-title-line {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.erp-order-title-line .status-pill {
    min-height: 23px;
    padding: 4px 9px !important;
    font-size: 9px !important;
}

.erp-order-detail-header .erp-title-block > p strong {
    color: var(--roder-ink);
    font-weight: 850;
}

.erp-order-detail-actions {
    align-items: center;
}

.erp-order-detail-actions form {
    margin: 0;
}

.erp-order-detail-actions .btn {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 11px;
    font-weight: 800;
}

.erp-order-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.erp-order-overview-card {
    display: flex;
    min-width: 0;
    min-height: 92px;
    padding: 12px 14px;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--roder-border);
    border-top: 3px solid var(--roder-navy);
    border-radius: var(--roder-radius);
    background: var(--roder-surface);
    box-shadow: var(--roder-shadow);
}

.erp-order-overview-card:nth-child(2) {
    border-top-color: #2563eb;
}

.erp-order-overview-card:nth-child(3) {
    border-top-color: var(--roder-success);
}

.erp-order-overview-card:nth-child(4) {
    border-top-color: var(--roder-orange);
}

.erp-order-overview-card > span,
.erp-finance-detail-grid span,
.erp-finance-audit span,
.erp-order-audit-list span {
    color: var(--roder-muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.erp-order-overview-card > strong {
    margin-top: 4px;
    color: var(--roder-ink);
    font-size: 16px;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.erp-order-overview-card > small {
    margin-top: 5px;
    color: var(--roder-muted);
    font-size: 10px;
    line-height: 1.35;
}

.erp-order-progress {
    height: 5px;
    margin-top: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7ecf3;
}

.erp-order-progress > span {
    display: block;
    max-width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
}

.erp-order-overview-finance > strong {
    color: var(--roder-navy);
}

.erp-order-detail-layout-refined {
    grid-template-columns: minmax(0, 1fr) 318px;
    gap: 12px;
}

.erp-order-detail-layout-refined .panel {
    padding: 13px;
}

.erp-order-detail-main > .panel.mt-4,
.erp-order-detail-side > .panel.mt-4 {
    margin-top: 12px !important;
}

.erp-order-detail-panel .panel-header {
    align-items: center;
    margin-bottom: 9px;
    padding-bottom: 9px;
}

.erp-order-detail-panel .badge-soft {
    white-space: nowrap;
}

.erp-detail-table {
    margin-bottom: 0;
    font-size: 11px;
}

.erp-detail-table th,
.erp-detail-table td {
    padding: 9px 8px !important;
    vertical-align: middle;
}

.erp-detail-table thead th {
    color: #52637e;
    font-size: 9px;
    letter-spacing: 0.04em;
}

.erp-detail-table .erp-product-stack strong,
.erp-detail-table .erp-custody-cell strong {
    font-size: 10.5px;
}

.erp-detail-table .erp-product-stack small,
.erp-detail-table .erp-custody-cell small,
.erp-detail-table .order-price-source {
    margin-top: 2px;
    font-size: 9.5px;
}

.erp-detail-code {
    min-width: 82px;
    min-height: 25px;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    font-size: 9.5px;
    text-align: center;
}

.erp-finance-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.erp-finance-detail-grid > div {
    min-width: 0;
    min-height: 76px;
    padding: 11px;
    border: 1px solid var(--roder-border);
    border-radius: 10px;
    background: var(--roder-surface-soft);
}

.erp-finance-detail-grid strong {
    display: block;
    margin-top: 6px;
    color: var(--roder-navy);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.erp-finance-detail-grid .is-warning {
    border-color: #f7d36b;
    background: #fff9e8;
}

.erp-finance-detail-grid .is-warning strong {
    color: #a34408;
}

.erp-finance-detail-grid .is-info {
    border-color: #bae6fd;
    background: #f0f9ff;
}

.erp-finance-detail-grid .is-info strong {
    color: #0369a1;
}

.erp-finance-detail-grid .is-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.erp-finance-detail-grid .is-success strong {
    color: #08743a;
}

.erp-finance-audit {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
    padding: 9px 11px;
    border-top: 1px solid #edf1f5;
}

.erp-finance-audit > div {
    min-width: 0;
}

.erp-finance-audit strong {
    display: block;
    margin-top: 3px;
    color: var(--roder-ink);
    font-size: 10.5px;
    font-weight: 750;
    line-height: 1.35;
}

.erp-empty-state-compact {
    min-height: 96px;
    padding: 18px;
}

.erp-inline-details > summary {
    cursor: pointer;
    color: var(--roder-navy);
    font-size: 11px;
    font-weight: 850;
}

.erp-inline-details > summary span {
    margin-left: 5px;
    color: var(--roder-muted);
    font-size: 9.5px;
    font-weight: 700;
}

.erp-history-panel {
    background: var(--roder-surface);
}

.erp-order-timeline {
    display: grid;
    margin-top: 11px;
    border-top: 1px solid #edf1f5;
}

.erp-order-timeline article {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 90px;
    gap: 10px;
    align-items: start;
    padding: 9px 0;
    border-bottom: 1px solid #edf1f5;
}

.erp-order-timeline article > div {
    display: flex;
    flex-direction: column;
}

.erp-order-timeline strong {
    color: var(--roder-ink);
    font-size: 10.5px;
}

.erp-order-timeline small,
.erp-order-timeline article > span {
    color: var(--roder-muted);
    font-size: 9.5px;
}

.erp-order-timeline p {
    margin: 0;
    color: #334155;
    font-size: 10.5px;
    line-height: 1.4;
}

.erp-customer-record {
    overflow: hidden;
    border: 1px solid var(--roder-border);
    border-radius: 10px;
    background: var(--roder-surface-soft);
}

.erp-customer-record-head {
    padding: 11px 12px;
    border-bottom: 1px solid var(--roder-border);
    background: #f1f5f9;
}

.erp-customer-record-head strong,
.erp-customer-record-head span {
    display: block;
}

.erp-customer-record-head strong {
    color: var(--roder-ink);
    font-size: 12px;
    font-weight: 850;
}

.erp-customer-record-head span {
    margin-top: 2px;
    color: var(--roder-muted);
    font-size: 10px;
}

.erp-customer-record dl {
    margin: 0;
    padding: 3px 12px;
}

.erp-customer-record dl > div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e7ebf1;
}

.erp-customer-record dl > div:last-child {
    border-bottom: 0;
}

.erp-customer-record dt {
    color: var(--roder-muted);
    font-size: 9.5px;
    font-weight: 750;
}

.erp-customer-record dd {
    min-width: 0;
    margin: 0;
    color: var(--roder-ink);
    font-size: 10.5px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.erp-order-audit-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.erp-order-audit-list > div {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--roder-border);
    border-radius: 10px;
    background: var(--roder-surface);
}

.erp-order-audit-list strong,
.erp-order-audit-list small {
    display: block;
}

.erp-order-audit-list strong {
    margin-top: 4px;
    color: var(--roder-ink);
    font-size: 10.5px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.erp-order-audit-list small {
    margin-top: 2px;
    color: var(--roder-muted);
    font-size: 9px;
}

.erp-order-detail-side .erp-order-notes {
    padding: 9px 10px;
    border-radius: 10px;
}

.erp-order-detail-side .erp-order-notes p {
    font-size: 10.5px;
    line-height: 1.4;
}

.erp-public-tracking-panel .erp-copy-box {
    padding: 11px;
    border-radius: 10px;
}

.erp-tracking-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
}

.erp-tracking-link-row .form-control,
.erp-public-tracking-panel textarea[readonly] {
    min-width: 0;
    font-size: 10px;
}

.erp-tracking-link-row .btn,
.erp-tracking-actions .btn {
    min-height: 35px;
    padding: 7px 10px;
    font-size: 10px;
}

.erp-tracking-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
}

.erp-tracking-privacy {
    display: block;
    margin-top: 9px;
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.4;
}

.erp-cancel-order-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #b91c1c;
}

.erp-order-row-actions .btn {
    min-height: 32px;
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 10px;
}

@media (max-width: 1280px) {
    .erp-order-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1200px) {
    .erp-order-detail-layout-refined {
        grid-template-columns: 1fr;
    }

    .erp-order-detail-side {
        position: static;
    }
}

@media (max-width: 760px) {
    .erp-finance-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-order-timeline article {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

@media (max-width: 560px) {
    .erp-order-overview,
    .erp-finance-detail-grid,
    .erp-finance-audit,
    .erp-order-audit-list,
    .erp-tracking-actions {
        grid-template-columns: 1fr;
    }

    .erp-order-detail-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .erp-tracking-link-row {
        grid-template-columns: 1fr;
    }
}

/* Nuevo pedido ERP/WMS v3.11: captura comercial asistida */

.erp-order-form-page-header {
    align-items: center;
    margin-bottom: 12px;
}

.erp-order-form-page-header .btn {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 11px;
}

.erp-order-form-v311 .order-form-card {
    padding: 14px;
    border-color: var(--roder-border);
    border-radius: var(--roder-radius);
    box-shadow: var(--roder-shadow);
}

.erp-order-form-v311 .order-form-card.mt-4 {
    margin-top: 12px !important;
}

.erp-order-form-v311 .order-form-card-header,
.erp-order-form-v311 .order-lines-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
    padding-bottom: 9px;
}

.erp-order-form-v311 .order-form-card-header h2,
.erp-order-form-v311 .order-lines-header h2 {
    font-size: 15px;
    font-weight: 850;
    letter-spacing: -0.015em;
}

.erp-order-form-v311 .order-form-card-header p,
.erp-order-form-v311 .order-lines-header p {
    margin-top: 3px;
    font-size: 11px;
}

.erp-order-form-v311 .order-lines-header .btn {
    min-height: 37px;
    padding: 7px 12px;
    border-color: var(--roder-navy);
    color: var(--roder-navy);
    font-size: 10.5px;
    font-weight: 800;
    white-space: nowrap;
}

.erp-order-form-v311 .order-lines-header .btn:hover {
    background: var(--roder-navy);
    color: #ffffff;
}

.erp-order-form-global-error {
    margin: 0 0 10px;
}

.erp-order-core-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.erp-order-form-v311 .form-label {
    margin-bottom: 5px;
    color: #24324a;
    font-size: 10px;
    font-weight: 800;
}

.erp-order-form-v311 .form-control,
.erp-order-form-v311 .form-select {
    min-height: 40px;
    border-color: #d7dfeb;
    border-radius: 9px;
    font-size: 12px;
}

.erp-order-form-v311 .form-control:focus,
.erp-order-form-v311 .form-select:focus {
    border-color: #87a7f5;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.erp-order-notes-field textarea {
    min-height: 68px;
    resize: vertical;
}

.erp-order-customer-context {
    display: grid;
    grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.28fr);
    gap: 12px;
    align-items: center;
    padding: 9px 11px;
    border: 1px solid var(--roder-border);
    border-left: 4px solid var(--roder-navy);
    border-radius: 10px;
    background: var(--roder-surface-soft);
}

.erp-order-customer-context[hidden],
.erp-order-line-warning[hidden],
#orderContextError[hidden] {
    display: none !important;
}

.erp-order-customer-context.is-ok {
    border-left-color: var(--roder-success);
}

.erp-order-customer-context.is-warning {
    border-color: #f7d36b;
    border-left-color: var(--roder-warning);
    background: #fffaf0;
}

.erp-order-customer-context.is-danger {
    border-color: #fecaca;
    border-left-color: var(--roder-danger);
    background: #fff7f7;
}

.erp-order-customer-status {
    min-width: 0;
}

.erp-credit-status-pill {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 23px;
    padding: 4px 8px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #ecfdf3;
    color: #08743a;
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.is-warning .erp-credit-status-pill {
    border-color: #f7d36b;
    background: #fff3cd;
    color: #9a4d05;
}

.is-danger .erp-credit-status-pill {
    border-color: #fecaca;
    background: #fee2e2;
    color: #b91c1c;
}

.erp-order-customer-status p {
    margin: 5px 0 0;
    color: #475569;
    font-size: 10px;
    line-height: 1.35;
}

.erp-order-customer-context dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.erp-order-customer-context dl > div {
    min-width: 0;
    padding: 2px 9px;
    border-left: 1px solid #e1e7ef;
}

.erp-order-customer-context dt {
    color: var(--roder-muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.erp-order-customer-context dd {
    margin: 3px 0 0;
    color: var(--roder-ink);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.erp-order-products-editor .premium-lines {
    gap: 7px;
}

.erp-order-entry-head,
.erp-order-entry-grid {
    display: grid;
    grid-template-columns:
        minmax(255px, 2fr)
        minmax(76px, 0.48fr)
        minmax(82px, 0.55fr)
        minmax(112px, 0.72fr)
        minmax(108px, 0.7fr)
        66px;
    gap: 8px;
    align-items: center;
}

.erp-order-entry-head {
    padding: 0 10px 6px;
    color: #52637e;
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.erp-order-form-v311 .order-line-card.erp-order-entry {
    display: block;
    padding: 9px 10px;
    border-color: var(--roder-border);
    border-radius: 10px;
    background: var(--roder-surface-soft);
    transition: border-color 150ms ease, background 150ms ease;
}

.erp-order-form-v311 .order-line-card.erp-order-entry.has-warning {
    border-color: #f7d36b;
    background: #fffdf7;
}

.erp-order-form-v311 .order-line-card.erp-order-entry.has-danger {
    border-color: #fecaca;
    background: #fffafa;
}

.erp-order-entry-grid .form-field {
    min-width: 0;
}

.erp-order-entry-grid .form-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.erp-order-entry-grid .form-select,
.erp-order-entry-grid .form-control {
    width: 100%;
    min-height: 37px;
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 11px;
}

.erp-order-entry-metric {
    min-width: 0;
    padding-left: 8px;
    border-left: 1px solid #e2e8f0;
}

.erp-order-entry-metric > span,
.erp-order-entry-metric > strong,
.erp-order-entry-metric > small {
    display: block;
}

.erp-order-entry-metric > span {
    display: none;
    color: var(--roder-muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.erp-order-entry-metric > strong {
    color: var(--roder-ink);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.erp-order-entry-subtotal > strong {
    color: var(--roder-navy);
}

.erp-order-entry-metric > small {
    margin-top: 2px;
    color: var(--roder-muted);
    font-size: 8.5px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.erp-order-entry-remove {
    display: flex;
    justify-content: flex-end;
}

.erp-order-entry-remove .btn {
    min-height: 32px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 800;
}

.erp-order-line-error {
    margin: 0 0 7px;
}

.erp-order-line-warning {
    margin-top: 7px;
    padding: 6px 8px;
    border-radius: 7px;
    background: #fff4d6;
    color: #9a4d05;
    font-size: 9.5px;
    font-weight: 750;
    line-height: 1.35;
}

.has-danger .erp-order-line-warning {
    background: #fee2e2;
    color: #b91c1c;
}

.erp-order-stock-note {
    margin-top: 9px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #eef4ff;
    color: #4b5f7d;
    font-size: 9.5px;
    line-height: 1.4;
}

.erp-order-stock-note strong {
    color: var(--roder-navy);
}

.erp-order-form-footer {
    position: sticky;
    bottom: 10px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--roder-border);
    border-radius: var(--roder-radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(8px);
}

.erp-order-draft-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.erp-order-draft-summary > span {
    padding: 6px 9px;
    border-radius: 8px;
    background: var(--roder-surface-soft);
    color: var(--roder-muted);
    font-size: 9.5px;
    font-weight: 700;
}

.erp-order-draft-summary strong {
    color: var(--roder-navy);
    font-size: 11px;
    font-weight: 850;
}

.erp-order-form-footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.erp-order-form-footer-actions .btn {
    min-height: 39px;
    padding: 8px 13px;
    font-size: 10.5px;
    font-weight: 800;
}

@media (max-width: 1160px) {
    .erp-order-entry-head {
        display: none;
    }

    .erp-order-entry-grid {
        grid-template-columns: minmax(0, 1.6fr) minmax(100px, 0.4fr) repeat(3, minmax(100px, 0.55fr));
    }

    .erp-order-entry-remove {
        grid-column: 1 / -1;
    }

    .erp-order-entry-remove .btn {
        width: auto;
    }

    .erp-order-entry-grid .form-label,
    .erp-order-entry-metric > span {
        position: static;
        display: block;
        width: auto;
        height: auto;
        margin: 0 0 4px;
        overflow: visible;
        clip: auto;
        white-space: normal;
    }
}

@media (max-width: 900px) {
    .erp-order-customer-context {
        grid-template-columns: 1fr;
    }

    .erp-order-customer-context dl > div:first-child {
        border-left: 0;
    }

    .erp-order-entry-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-order-entry-product {
        grid-column: 1 / -1;
    }

    .erp-order-entry-remove {
        grid-column: auto;
        align-self: end;
    }
}

@media (max-width: 720px) {
    .erp-order-core-grid,
    .erp-order-customer-context dl {
        grid-template-columns: 1fr;
    }

    .erp-order-customer-context dl > div {
        padding: 6px 0;
        border-left: 0;
        border-bottom: 1px solid #e1e7ef;
    }

    .erp-order-customer-context dl > div:last-child {
        border-bottom: 0;
    }

    .erp-order-form-footer {
        position: static;
        align-items: stretch;
        flex-direction: column;
    }

    .erp-order-form-footer-actions .btn {
        flex: 1;
    }
}

@media (max-width: 520px) {
    .erp-order-form-v311 .order-form-card-header,
    .erp-order-form-v311 .order-lines-header,
    .erp-order-entry-grid,
    .erp-order-form-footer-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .erp-order-form-v311 .order-lines-header .btn,
    .erp-order-entry-remove .btn,
    .erp-order-form-footer-actions .btn {
        width: 100%;
    }
}

/* Planificador de rutas v3.14: operación local sin APIs pagadas */

.route-planner-page-header {
    align-items: center;
    margin-bottom: 12px;
}

.route-planner-date-form {
    display: grid;
    grid-template-columns: minmax(150px, 174px) auto;
    gap: 7px;
    align-items: end;
}

.route-planner-date-form label {
    grid-column: 1 / -1;
    margin-bottom: -2px;
    color: #52637e;
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.route-planner-date-form .form-control {
    min-height: 40px;
    border-color: #cbd6e4;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 750;
}

.route-planner-v314 {
    display: grid;
    gap: 12px;
}

.route-planner-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.route-planner-button.erp-primary-action {
    color: #ffffff;
}

.route-planner-secondary-action {
    border: 1px solid #c7d3e2;
    background: #ffffff;
    color: var(--roder-navy);
    box-shadow: 0 4px 12px rgba(15, 32, 72, 0.05);
}

.route-planner-secondary-action:hover {
    border-color: var(--roder-navy);
    background: #eef4ff;
    color: var(--roder-navy);
}

.route-planner-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.route-planner-kpi {
    position: relative;
    min-width: 0;
    min-height: 90px;
    padding: 12px 14px;
    overflow: hidden;
    border: 1px solid var(--roder-border);
    border-top: 3px solid var(--roder-navy);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--roder-shadow);
}

.route-planner-kpi::after {
    position: absolute;
    right: -18px;
    bottom: -26px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(2, 30, 100, 0.035);
    content: "";
}

.route-planner-kpi.is-warning {
    border-top-color: var(--roder-warning);
}

.route-planner-kpi.is-danger {
    border-top-color: var(--roder-danger);
}

.route-planner-kpi.is-ok {
    border-top-color: var(--roder-success);
}

.route-planner-kpi > span,
.route-planner-overline {
    display: block;
    color: #52637e;
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.route-planner-kpi > strong {
    display: block;
    margin-top: 4px;
    color: var(--roder-navy);
    font-size: 23px;
    font-weight: 900;
    line-height: 1;
}

.route-planner-kpi > small {
    display: block;
    margin-top: 6px;
    color: var(--roder-muted);
    font-size: 9px;
    line-height: 1.3;
}

.route-planner-panel {
    margin: 0;
    padding: 14px;
    border-radius: var(--roder-radius);
    box-shadow: var(--roder-shadow);
}

.route-planner-panel-header {
    min-height: auto;
    margin-bottom: 10px;
    padding-bottom: 9px;
}

.route-planner-panel-header h2 {
    font-size: 15px;
}

.route-planner-panel-header p {
    margin-top: 2px;
    font-size: 10px;
}

.route-planner-overdue-panel {
    border-top: 3px solid #f59e0b;
}

.route-planner-overdue-card {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(210px, 0.7fr);
    gap: 12px 18px;
    padding: 14px;
    border: 1px solid var(--roder-border);
    border-radius: 12px;
    background: #ffffff;
}

.route-planner-overdue-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.route-planner-overdue-avatar {
    display: inline-flex;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--roder-navy);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.route-planner-overdue-identity h3 {
    margin: 2px 0 1px;
    color: var(--roder-ink);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.route-planner-overdue-identity p,
.route-planner-overdue-origin small {
    margin: 0;
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.35;
}

.route-planner-overdue-identity p strong {
    color: var(--roder-navy);
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
}

.route-planner-overdue-origin {
    display: grid;
    align-content: center;
    gap: 2px;
    min-width: 0;
    padding: 9px 11px;
    border-radius: 9px;
    background: var(--roder-surface-soft);
}

.route-planner-overdue-origin > span,
.route-planner-overdue-form .form-label {
    margin: 0;
    color: #52637e;
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.route-planner-overdue-origin strong {
    overflow: hidden;
    color: var(--roder-ink);
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-planner-overdue-form {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(135px, 0.65fr) repeat(2, minmax(105px, 0.5fr)) minmax(180px, 1fr);
    gap: 9px;
    align-items: end;
    padding-top: 12px;
    border-top: 1px solid var(--roder-border);
}

.route-planner-overdue-form > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.route-planner-overdue-form .form-control,
.route-planner-overdue-form .form-select {
    min-height: 40px;
    border-color: #d7dfeb;
    border-radius: 9px;
    font-size: 11px;
}

.route-planner-overdue-reason {
    grid-column: 1 / -1;
}

.route-planner-overdue-action {
    grid-column: 1 / -1;
    justify-content: start;
}

.route-planner-overdue-action .route-planner-button {
    min-width: 150px;
}

.route-planner-method-label {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 5px 8px;
    border: 1px solid #d9e2ed;
    border-radius: 999px;
    background: var(--roder-surface-soft);
    color: #52637e;
    font-size: 8.5px;
    font-weight: 800;
    white-space: nowrap;
}

.route-planner-compact-state {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px dashed #cbd6e4;
    border-radius: 10px;
    background: var(--roder-surface-soft);
}

.route-planner-compact-state strong {
    flex: 0 0 auto;
    color: var(--roder-navy);
    font-size: 11px;
}

.route-planner-compact-state span {
    color: var(--roder-muted);
    font-size: 10px;
}

.route-planner-compact-state.is-ok {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.route-planner-compact-state.is-warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.route-planner-planning-form {
    display: grid;
    gap: 10px;
}

.route-planner-plan-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 9px;
    align-items: end;
}

.route-planner-plan-controls > .route-planner-button {
    min-height: 40px;
    align-self: end;
}

.route-planner-plan-controls label {
    display: grid;
    gap: 4px;
}

.route-planner-plan-controls label > span {
    color: #52637e;
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.route-planner-plan-controls .form-control {
    min-height: 40px;
    border-color: #d7dfeb;
    border-radius: 9px;
    font-size: 11px;
}

.route-planner-ready-list {
    display: grid;
    gap: 6px;
}

.route-planner-ready-row {
    display: grid;
    grid-template-columns: 20px minmax(130px, 0.75fr) minmax(220px, 1.4fr) 64px 110px;
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--roder-border);
    border-radius: 9px;
    background: var(--roder-surface-soft);
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease;
}

.route-planner-ready-row:has(input:checked) {
    border-color: #8aa8f5;
    background: #eef4ff;
}

.route-planner-ready-row input {
    width: 17px;
    height: 17px;
    accent-color: var(--roder-navy);
}

.route-planner-ready-row > span {
    min-width: 0;
}

.route-planner-ready-main strong,
.route-planner-ready-main small,
.route-planner-ready-metric strong,
.route-planner-ready-metric small {
    display: block;
}

.route-planner-ready-main strong {
    color: var(--roder-navy);
    font-family: "JetBrains Mono", monospace;
    font-size: 9.5px;
}

.route-planner-ready-main small,
.route-planner-ready-address,
.route-planner-ready-metric small {
    color: var(--roder-muted);
    font-size: 9px;
}

.route-planner-ready-address {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-planner-ready-metric strong {
    color: var(--roder-ink);
    font-size: 10.5px;
}

.route-planner-ready-metric.is-warning strong {
    color: #a64b00;
}

.route-planner-company {
    grid-column: 2 / -1;
    color: var(--roder-muted);
    font-size: 8px;
}

.route-planner-driver-list {
    display: grid;
    gap: 10px;
}

.route-planner-driver-card {
    padding: 12px;
    border: 1px solid var(--roder-border);
    border-radius: 12px;
    background: #ffffff;
}

.route-planner-driver-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.route-planner-driver-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.route-planner-driver-avatar {
    display: inline-flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--roder-navy);
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

.route-planner-driver-identity h3 {
    margin: 2px 0 1px;
    color: var(--roder-ink);
    font-size: 15px;
    font-weight: 900;
}

.route-planner-driver-identity p {
    margin: 0;
    color: var(--roder-muted);
    font-size: 9.5px;
}

.route-planner-driver-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.route-planner-driver-actions form {
    margin: 0;
}

.route-planner-status,
.route-planner-locked {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.route-planner-status.status-planned {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.route-planner-status.status-in_progress {
    border-color: #fde68a;
    background: #fffbeb;
    color: #a64b00;
}

.route-planner-status.status-completed {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #08743a;
}

.route-planner-status.status-cancelled,
.route-planner-status.status-unplanned {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #52637e;
}

.route-planner-locked {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

.route-planner-route-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid var(--roder-border);
}

.route-planner-route-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 8px;
    border-radius: 8px;
    background: #eef4ff;
    color: #52637e;
    font-size: 9px;
}

.route-planner-route-meta strong {
    margin-right: 3px;
    color: var(--roder-navy);
}

.route-planner-sync-warning {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
    color: #8a4607;
    font-size: 9.5px;
}

.route-planner-progress {
    margin-top: 9px;
    padding: 10px;
    border: 1px solid var(--roder-border);
    border-radius: 10px;
    background: var(--roder-surface-soft);
}

.route-planner-progress-summary {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.route-planner-progress-summary span,
.route-planner-progress-metrics span {
    display: block;
    color: #52637e;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.route-planner-progress-summary strong {
    display: block;
    margin-top: 2px;
    color: var(--roder-navy);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.route-planner-progress-summary small {
    color: var(--roder-muted);
    font-size: 9px;
}

.route-planner-progress progress {
    width: 100%;
    height: 7px;
    margin-top: 8px;
    accent-color: var(--roder-success);
}

.route-planner-progress-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 7px;
}

.route-planner-progress-metrics > div {
    padding: 7px 8px;
    border: 1px solid #e3e9f1;
    border-radius: 8px;
    background: #ffffff;
}

.route-planner-progress-metrics > div.is-danger {
    border-color: #fecaca;
    background: #fff7f7;
}

.route-planner-progress-metrics strong {
    display: block;
    margin-top: 2px;
    color: var(--roder-navy);
    font-size: 13px;
    line-height: 1;
}

.route-planner-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.route-planner-section-heading h4 {
    margin: 0;
    color: var(--roder-ink);
    font-size: 12px;
    font-weight: 900;
}

.route-planner-section-heading p {
    margin: 2px 0 0;
    color: var(--roder-muted);
    font-size: 9px;
}

.route-planner-stops,
.route-planner-agenda {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid var(--roder-border);
}

.route-planner-stop-row {
    display: grid;
    grid-template-columns: 34px minmax(230px, 1.35fr) minmax(120px, 0.6fr) minmax(120px, 0.55fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 9px 0;
    border-bottom: 1px solid var(--roder-border);
}

.route-planner-stop-row:last-child {
    border-bottom: 0;
}

.route-planner-stop-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--roder-navy);
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
}

.route-planner-stop-destination,
.route-planner-stop-load,
.route-planner-stop-leg {
    min-width: 0;
}

.route-planner-stop-destination > a,
.route-planner-agenda-row > a {
    color: var(--roder-navy);
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    font-weight: 800;
    text-decoration: none;
}

.route-planner-stop-destination > a:hover,
.route-planner-agenda-row > a:hover {
    color: var(--roder-orange);
    text-decoration: underline;
}

.route-planner-stop-destination > strong,
.route-planner-stop-destination > span,
.route-planner-stop-destination > small,
.route-planner-stop-load > span,
.route-planner-stop-load > strong,
.route-planner-stop-load > small,
.route-planner-stop-leg > strong,
.route-planner-stop-leg > small {
    display: block;
}

.route-planner-stop-destination > strong {
    margin-top: 1px;
    color: var(--roder-ink);
    font-size: 10.5px;
}

.route-planner-stop-destination > span,
.route-planner-stop-destination > small,
.route-planner-stop-load > small,
.route-planner-stop-leg > small {
    margin-top: 1px;
    color: var(--roder-muted);
    font-size: 8.5px;
    line-height: 1.25;
}

.route-planner-stop-load > span,
.route-planner-stop-leg > strong {
    color: #34445f;
    font-size: 9.5px;
    font-weight: 800;
}

.route-planner-stop-load > strong {
    margin-top: 2px;
    color: #a64b00;
    font-size: 9px;
}

.route-planner-stop-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 850;
    white-space: nowrap;
}

.route-planner-stop-status.status-pending {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #52637e;
}

.route-planner-stop-status.status-next {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.route-planner-stop-status.status-arrived {
    border-color: #fde68a;
    background: #fffbeb;
    color: #a64b00;
}

.route-planner-stop-status.status-completed {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #08743a;
}

.route-planner-stop-status.status-skipped {
    border-color: #fecaca;
    background: #fff7f7;
    color: #b91c1c;
}

.route-planner-stop-issue {
    grid-column: 2 / -1;
    padding: 7px 9px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 9px;
}

.route-planner-stop-issue strong {
    margin-right: 5px;
}

.route-planner-agenda-head,
.route-planner-agenda-row {
    display: grid;
    grid-template-columns: 112px minmax(230px, 1fr) 75px 110px 95px;
    gap: 10px;
    align-items: center;
}

.route-planner-agenda-head {
    padding: 5px 8px;
    color: #52637e;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.route-planner-agenda-row {
    min-width: 0;
    padding: 8px;
    border-top: 1px solid var(--roder-border);
    font-size: 9.5px;
}

.route-planner-agenda-row > div,
.route-planner-agenda-row > span,
.route-planner-agenda-row > strong {
    min-width: 0;
}

.route-planner-agenda-row > div strong,
.route-planner-agenda-row > div span {
    display: block;
}

.route-planner-agenda-row > div strong {
    color: var(--roder-ink);
    font-size: 10px;
}

.route-planner-agenda-row > div span {
    margin-top: 2px;
    overflow: hidden;
    color: var(--roder-muted);
    font-size: 8.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-planner-agenda-row > strong.is-warning {
    color: #a64b00;
}

.route-planner-order-status {
    display: inline-flex;
    width: fit-content;
    padding: 5px 7px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 8px;
    font-weight: 800;
}

@media (max-width: 1120px) {
    .route-planner-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .route-planner-stop-row {
        grid-template-columns: 34px minmax(220px, 1fr) repeat(2, minmax(110px, 0.55fr));
    }

    .route-planner-stop-status {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 860px) {
    .route-planner-page-header,
    .route-planner-driver-header,
    .route-planner-panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    .route-planner-date-form,
    .route-planner-plan-controls {
        grid-template-columns: 1fr;
    }

    .route-planner-date-form label {
        grid-column: auto;
    }

    .route-planner-ready-row {
        grid-template-columns: 20px minmax(0, 1fr) repeat(2, 90px);
    }

    .route-planner-ready-address {
        grid-column: 2 / -1;
        grid-row: 2;
    }

    .route-planner-driver-actions {
        justify-content: flex-start;
    }

    .route-planner-agenda-head {
        display: none;
    }

    .route-planner-agenda-row {
        grid-template-columns: 100px minmax(0, 1fr) 80px;
    }

    .route-planner-agenda-row > strong,
    .route-planner-agenda-row > .route-planner-order-status {
        grid-column: 2 / -1;
    }

    .route-planner-overdue-card,
    .route-planner-overdue-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .route-planner-overdue-form,
    .route-planner-overdue-reason,
    .route-planner-overdue-action {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .route-planner-kpi-grid,
    .route-planner-progress-metrics,
    .route-planner-stop-row,
    .route-planner-agenda-row {
        grid-template-columns: 1fr;
    }

    .route-planner-driver-actions,
    .route-planner-progress-summary,
    .route-planner-compact-state {
        align-items: stretch;
        flex-direction: column;
    }

    .route-planner-driver-actions .route-planner-button,
    .route-planner-driver-actions form,
    .route-planner-plan-controls .route-planner-button,
    .route-planner-date-form .route-planner-button {
        width: 100%;
    }

    .route-planner-ready-row {
        grid-template-columns: 20px minmax(0, 1fr);
    }

    .route-planner-ready-address,
    .route-planner-ready-metric,
    .route-planner-company {
        grid-column: 2;
        grid-row: auto;
    }

    .route-planner-stop-number,
    .route-planner-stop-status,
    .route-planner-stop-issue {
        grid-column: 1;
    }

    .route-planner-stop-status {
        justify-self: start;
    }

    .route-planner-agenda-row > strong,
    .route-planner-agenda-row > .route-planner-order-status {
        grid-column: 1;
    }

    .route-planner-overdue-card,
    .route-planner-overdue-form {
        grid-template-columns: 1fr;
    }

    .route-planner-overdue-origin,
    .route-planner-overdue-form,
    .route-planner-overdue-reason,
    .route-planner-overdue-action {
        grid-column: 1;
    }

    .route-planner-overdue-action .route-planner-button {
        width: 100%;
    }
}

/* Nuevo pedido v3.12: jerarquía y consistencia de acciones */

.erp-order-form-v311 .erp-order-form-button,
.erp-order-form-page-header .erp-order-form-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        border-color 150ms ease,
        background 150ms ease,
        color 150ms ease,
        box-shadow 150ms ease,
        transform 150ms ease;
}

.erp-order-form-v311 .erp-order-form-button:focus-visible,
.erp-order-form-page-header .erp-order-form-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 2px;
}

.erp-order-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.erp-order-form-page-header .erp-order-form-back {
    min-width: 138px;
    border: 1px solid #cbd6e4;
    background: #ffffff;
    color: var(--roder-navy);
    box-shadow: 0 4px 12px rgba(15, 32, 72, 0.05);
}

.erp-order-form-page-header .erp-order-form-back:hover {
    border-color: #9fb1c9;
    background: #f3f6fb;
    color: var(--roder-navy);
    transform: translateY(-1px);
}

.erp-order-form-page-header .erp-order-form-back .erp-order-button-icon {
    border: 1px solid #d9e2ed;
    background: var(--roder-surface-soft);
}

.erp-order-form-v311 .order-lines-header .erp-order-add-button {
    min-width: 154px;
    border: 1px solid var(--roder-navy);
    background: #eef4ff;
    color: var(--roder-navy);
    box-shadow: 0 4px 12px rgba(15, 32, 72, 0.06);
}

.erp-order-form-v311 .order-lines-header .erp-order-add-button:hover {
    border-color: var(--roder-navy);
    background: var(--roder-navy);
    color: #ffffff;
    transform: translateY(-1px);
}

.erp-order-add-button .erp-order-button-icon {
    position: relative;
    background: var(--roder-navy);
    color: #ffffff;
    font-size: 0;
}

.erp-order-add-button .erp-order-button-icon::before,
.erp-order-add-button .erp-order-button-icon::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
    transform: translate(-50%, -50%);
}

.erp-order-add-button .erp-order-button-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.erp-order-add-button:hover .erp-order-button-icon {
    background: rgba(255, 255, 255, 0.16);
}

.erp-order-form-v311 .erp-order-entry-remove .erp-order-remove-button {
    min-width: 66px;
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff7f7;
    color: #c81e1e;
    box-shadow: none;
    font-size: 9.5px;
}

.erp-order-form-v311 .erp-order-entry-remove .erp-order-remove-button:hover {
    border-color: #ef4444;
    background: #fee2e2;
    color: #991b1b;
}

.erp-order-form-v311 .erp-order-form-footer-actions .erp-order-cancel-button {
    min-width: 86px;
    border: 1px solid #cbd6e4;
    background: #ffffff;
    color: #34445f;
}

.erp-order-form-v311 .erp-order-form-footer-actions .erp-order-cancel-button:hover {
    border-color: #9fb1c9;
    background: var(--roder-surface-soft);
    color: var(--roder-navy);
}

.erp-order-form-v311 .erp-order-form-footer-actions .erp-order-save-button {
    min-width: 148px;
    min-height: 42px;
    padding-right: 16px;
    padding-left: 16px;
    box-shadow: 0 9px 20px rgba(248, 88, 13, 0.24);
}

.erp-order-form-v311 .erp-order-form-footer-actions .erp-order-save-button:hover {
    box-shadow: 0 11px 24px rgba(248, 88, 13, 0.29);
    transform: translateY(-1px);
}

@media (max-width: 520px) {
    .erp-order-form-page-header .erp-order-form-back,
    .erp-order-form-v311 .order-lines-header .erp-order-add-button,
    .erp-order-form-v311 .erp-order-form-footer-actions .erp-order-form-button,
    .erp-order-form-v311 .erp-order-entry-remove .erp-order-remove-button {
        width: 100%;
    }
}
/* Clientes ERP v3.15: lista comercial y alta de cliente */

.erp-customers-toolbar {
    margin-bottom: 12px;
}

.erp-customers-panel {
    padding: 13px;
}

.erp-customers-panel-header {
    align-items: center;
    margin-bottom: 9px;
    padding-bottom: 9px;
}

.erp-customers-panel-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.erp-customers-table-wrap {
    overflow: hidden;
}

.erp-customers-table {
    width: 100%;
    table-layout: fixed;
    font-size: 11.5px;
}

.erp-customers-table .erp-customers-col-customer {
    width: 24%;
}

.erp-customers-table .erp-customers-col-contact {
    width: 19%;
}

.erp-customers-table .erp-customers-col-address {
    width: 24%;
}

.erp-customers-table .erp-customers-col-orders {
    width: 8%;
}

.erp-customers-table .erp-customers-col-status {
    width: 9%;
}

.erp-customers-table .erp-customers-col-actions {
    width: 16%;
}

.erp-customers-table th,
.erp-customers-table td {
    padding: 9px 8px !important;
    white-space: normal !important;
}

.erp-customers-table thead th {
    font-size: 9px;
}

.erp-customer-identity,
.erp-contact-stack,
.erp-address-stack {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.erp-customer-name-row {
    display: flex;
    max-width: 100%;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.erp-customer-name-row > strong,
.erp-contact-stack > strong,
.erp-address-stack > strong {
    max-width: 100%;
    color: var(--roder-ink);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.erp-customer-identity-meta {
    display: flex;
    max-width: 100%;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.erp-customer-identity-meta .code-pill {
    min-height: 22px;
    padding: 4px 7px;
    border-radius: 7px;
    font-size: 9px;
}

.erp-customer-identity-meta small,
.erp-contact-stack small,
.erp-address-stack small {
    max-width: 100%;
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.erp-customers-table .erp-count-pill {
    display: inline-flex;
    min-width: 30px;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9e2ee;
    border-radius: 999px;
    background: var(--roder-surface-soft);
    color: var(--roder-navy);
    font-size: 10.5px;
    font-weight: 850;
}

.erp-customer-row-actions {
    display: flex;
    max-width: 176px;
    margin-left: auto;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    flex-wrap: wrap;
}

.erp-customer-row-actions .btn {
    min-height: 29px;
    padding: 5px 8px;
    font-size: 9.5px;
    white-space: nowrap;
}

.erp-customer-row-actions form {
    margin: 0;
}

.erp-customer-row-actions .erp-customer-state-form {
    display: flex;
    flex-basis: 100%;
    justify-content: flex-end;
}

.erp-customer-form-v315 {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.erp-customer-form-v315 .erp-customer-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    align-items: start;
    gap: 14px;
}

.erp-customer-form-v315 .erp-customer-form-main {
    display: grid;
    min-width: 0;
    gap: 14px;
}

.erp-customer-form-v315 .erp-form-card {
    margin: 0 !important;
    padding: 15px;
}

.erp-customer-form-v315 .erp-customer-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.erp-customer-form-v315 .erp-customer-form-side {
    min-width: 0;
}

.erp-customer-form-v315 .erp-customer-status-panel {
    position: sticky;
    top: 14px;
    padding: 15px;
    border: 1px solid var(--roder-border);
    border-radius: var(--roder-radius);
    background: var(--roder-surface);
    box-shadow: var(--roder-shadow);
}

.erp-customer-form-v315 .erp-customer-status-head {
    margin-bottom: 14px;
    padding-bottom: 11px;
    border-bottom: 1px solid #edf1f5;
}

.erp-customer-form-v315 .erp-customer-status-head h2 {
    margin: 0;
    color: var(--roder-ink);
    font-size: 15px;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.erp-customer-form-v315 .erp-customer-status-head p {
    margin: 4px 0 0;
    color: var(--roder-muted);
    font-size: 11px;
    line-height: 1.45;
}

.erp-customer-form-v315 .erp-rule-check {
    display: grid;
    min-height: 84px;
    padding: 13px;
    border: 1px solid #d5dfeb;
    border-radius: 12px;
    background: #f8fafc;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    cursor: pointer;
}

.erp-customer-form-v315 .erp-rule-check.active {
    border-color: #b8d4ff;
    background: #eef6ff;
}

.erp-customer-form-v315 .erp-rule-check .form-check-input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
}

.erp-customer-form-v315 .erp-rule-check span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.erp-customer-form-v315 .erp-rule-check strong {
    color: var(--roder-ink);
    font-size: 12px;
    font-weight: 850;
}

.erp-customer-form-v315 .erp-rule-check small {
    color: var(--roder-muted);
    font-size: 10.5px;
    line-height: 1.4;
}

.erp-customer-form-v315 .erp-customer-credit-card {
    width: 100%;
}

.erp-customer-credit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 13px;
}

.erp-customer-credit-notes {
    grid-column: 1 / -1;
}

.erp-customer-form-v315 .erp-field-help {
    display: block;
    margin-top: 5px;
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.35;
}

.erp-customer-form-v315 .erp-customer-credit-notes textarea {
    min-height: 78px;
}

.erp-customer-form-v315 .erp-customer-form-footer-actions {
    display: flex;
    margin-top: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.erp-customer-form-v315 .erp-customer-cancel-button {
    min-width: 88px;
}

.erp-customer-form-v315 .erp-customer-save-button {
    min-width: 138px;
    min-height: 42px;
    box-shadow: 0 9px 20px rgba(248, 88, 13, 0.24);
}

.erp-customer-form-v315 .erp-customer-save-button:hover {
    box-shadow: 0 11px 24px rgba(248, 88, 13, 0.29);
    transform: translateY(-1px);
}

@media (max-width: 1120px) {
    .erp-customers-table {
        min-width: 930px;
    }

    .erp-customers-table-wrap {
        overflow-x: auto;
    }

    .erp-customer-form-v315 .erp-customer-form-layout {
        grid-template-columns: minmax(0, 1fr) 260px;
    }

    .erp-customer-credit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .erp-customer-form-v315 .erp-customer-form-layout {
        grid-template-columns: 1fr;
    }

    .erp-customer-form-v315 .erp-customer-status-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .erp-customers-panel-tools {
        width: 100%;
        justify-content: flex-start;
    }

    .erp-customer-form-v315 .erp-customer-fields-grid,
    .erp-customer-credit-grid {
        grid-template-columns: 1fr;
    }

    .erp-customer-credit-notes {
        grid-column: auto;
    }

    .erp-customer-form-page-header .erp-customer-form-back,
    .erp-customer-form-v315 .erp-customer-form-footer-actions .btn {
        width: 100%;
    }

    .erp-customer-form-v315 .erp-customer-form-footer-actions {
        flex-direction: column-reverse;
    }
}

/* Clientes ERP v3.15.1: jerarquía y alineación de botones */

.erp-customers-page-header .erp-primary-action,
.erp-customers-toolbar .btn,
.erp-customers-panel-tools .btn,
.erp-customer-form-page-header .erp-customer-form-back,
.erp-customer-form-v315 .erp-customer-form-footer-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
}

.erp-customers-page-header .erp-primary-action,
.erp-customer-form-page-header .erp-customer-form-back {
    min-height: 40px;
    padding-right: 16px;
    padding-left: 16px;
}

.erp-customers-toolbar .btn {
    min-height: 40px;
    font-size: 11px;
}

.erp-customers-panel-tools .btn {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 10px;
}

.erp-customer-row-actions {
    display: grid;
    width: 100%;
    max-width: 184px;
    margin-left: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    justify-content: initial;
    gap: 6px;
}

.erp-customer-row-actions > a,
.erp-customer-row-actions > form {
    min-width: 0;
}

.erp-customer-row-actions .btn {
    display: inline-flex;
    width: 100%;
    min-height: 32px;
    padding: 6px 8px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.erp-customer-row-actions .erp-customer-state-form {
    display: block;
    width: 100%;
    grid-column: 1 / -1;
}

.erp-customer-row-actions .btn-outline-danger {
    border-color: #f4b9b9;
    background: #fffafa;
    color: #c81e1e;
}

.erp-customer-row-actions .btn-outline-danger:hover {
    border-color: #ef4444;
    background: #feecec;
    color: #991b1b;
}

.erp-customer-row-actions .btn-outline-success {
    border-color: #a9dfbd;
    background: #f5fff8;
    color: #16743a;
}

.erp-customer-row-actions .btn-outline-success:hover {
    border-color: #22a559;
    background: #e9f9ef;
    color: #0f5c2c;
}

.erp-customer-form-v315 .erp-customer-form-footer-actions .btn {
    min-height: 40px;
    padding-right: 15px;
    padding-left: 15px;
}

@media (max-width: 640px) {
    .erp-customer-row-actions {
        max-width: none;
    }
}
/* ================================================================
   COBRANZA ERP v3.16
   Jerarquía financiera compacta para cartera y reportes.
================================================================ */

.ar-v316-page-header {
    align-items: center;
    min-height: 112px;
}

.ar-v316-page-header .erp-title-block {
    gap: 4px;
}

.ar-v316-page-header .erp-title-block h1 {
    margin: 0;
}

.ar-v316-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
}

.ar-v316-header-action {
    min-height: 40px;
    padding-inline: 18px !important;
    border-radius: 10px;
    white-space: nowrap;
}

.ar-v316-report-link,
.ar-v316-page-actions .btn-print-report {
    border-color: var(--roder-navy);
    background: var(--roder-navy);
    color: #ffffff;
}

.ar-v316-report-link:hover,
.ar-v316-page-actions .btn-print-report:hover {
    border-color: var(--roder-navy-dark);
    background: var(--roder-navy-dark);
    color: #ffffff;
}

.ar-v316-summary-grid {
    gap: 12px;
    margin-bottom: 16px;
}

.ar-v316-summary-card {
    min-height: 104px;
    padding: 15px 16px;
    border-radius: 14px;
}

.ar-v316-summary-card > span {
    margin-bottom: 4px;
}

.ar-v316-summary-card > strong {
    margin-bottom: 2px;
    line-height: 1.05;
}

.ar-v316-panel {
    border-radius: 14px;
    box-shadow: var(--roder-shadow);
}

.ar-v316-panel > .panel-header {
    min-height: 0;
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.ar-v316-panel > .panel-header h2 {
    margin-bottom: 2px;
}

.ar-v316-filter-panel,
.ar-v316-period-panel {
    padding-bottom: 14px;
}

.ar-v316-filter-form {
    display: grid;
    grid-template-columns:
        minmax(250px, 1.55fr)
        minmax(150px, 0.82fr)
        minmax(142px, 0.72fr)
        minmax(142px, 0.72fr)
        auto;
    gap: 10px;
    align-items: end;
}

.ar-v316-filter-form .form-group {
    min-width: 0;
    margin: 0;
}

.ar-v316-filter-form .form-label {
    margin-bottom: 6px;
    color: #334155;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.ar-v316-filter-form .form-control {
    min-height: 41px;
    border-radius: 9px;
}

.ar-v316-filter-form .ar-filter-actions {
    display: grid;
    grid-template-columns: minmax(108px, auto) minmax(72px, auto);
    gap: 8px;
    margin: 0;
}

.ar-v316-filter-form .ar-filter-actions .btn {
    min-height: 41px;
    margin: 0;
    padding-inline: 14px;
    border-radius: 9px;
    white-space: nowrap;
}

.ar-v316-apply-button {
    box-shadow: 0 5px 13px rgba(2, 30, 100, 0.12);
}

.ar-v316-clear-button {
    background: #ffffff;
}

.ar-v316-customer-panel,
.ar-v316-documents-panel,
.ar-v316-preview-panel {
    overflow: hidden;
}

.ar-v316-empty-state {
    min-height: 0 !important;
    margin-top: 4px;
    padding: 25px 18px !important;
    border-radius: 11px;
    background: #f8fafc;
}

.ar-v316-empty-state h3 {
    margin-bottom: 3px;
    font-size: 16px;
}

.ar-v316-empty-state p {
    margin: 0;
    font-size: 13px;
}

.ar-v316-export-hub {
    padding-bottom: 15px;
}

.ar-v316-export-grid {
    gap: 12px;
}

.ar-v316-export-card {
    display: flex;
    min-height: 168px;
    flex-direction: column;
    padding: 17px;
    border-radius: 13px;
}

.ar-v316-export-card h3 {
    margin: 5px 0 4px;
}

.ar-v316-export-card p {
    margin-bottom: 14px;
}

.ar-v316-export-button {
    min-height: 40px;
    margin-top: auto;
    border-radius: 9px;
}

.ar-v316-period-panel .ar-period-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ar-v316-period-panel .ar-period-buttons .btn {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 9px;
}

.ar-v316-period-panel .ar-period-buttons .btn.active {
    border-color: var(--roder-navy);
    background: var(--roder-navy);
    color: #ffffff;
}

.ar-v316-preview-panel .ar-table,
.ar-v316-documents-panel .ar-table {
    margin-bottom: 0;
}

.ar-v316-preview-panel .ar-table th,
.ar-v316-documents-panel .ar-table th {
    white-space: nowrap;
}

.ar-v316-payment-button {
    min-height: 39px;
    border-radius: 9px;
}

@media (max-width: 1180px) {
    .ar-v316-filter-form {
        grid-template-columns: minmax(240px, 1.4fr) minmax(160px, 0.8fr) repeat(2, minmax(145px, 0.7fr));
    }

    .ar-v316-filter-form .ar-filter-actions {
        grid-column: 1 / -1;
        display: flex;
        justify-content: flex-end;
    }
}

@media (max-width: 860px) {
    .ar-v316-page-header {
        align-items: flex-start;
    }

    .ar-v316-page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .ar-v316-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ar-v316-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ar-v316-filter-form .ar-filter-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .ar-v316-filter-form .ar-filter-actions .btn {
        flex: 1;
    }

    .ar-v316-export-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .ar-v316-summary-grid,
    .ar-v316-filter-form {
        grid-template-columns: 1fr;
    }

    .ar-v316-filter-form .ar-filter-actions {
        grid-column: auto;
        display: grid;
        grid-template-columns: 1fr;
    }

    .ar-v316-page-actions .btn,
    .ar-v316-page-actions a {
        width: 100%;
    }
}

@media print {
    .ar-v316-page-actions,
    .ar-v316-period-panel,
    .ar-v316-export-hub {
        display: none !important;
    }

    .ar-v316-page-header,
    .ar-v316-panel,
    .ar-v316-summary-card {
        box-shadow: none !important;
    }
}

/* Cobranza v3.16.1: centrado consistente del texto en acciones. */
.ar-v316-page-actions .btn,
.ar-v316-filter-form .ar-filter-actions .btn,
.ar-v316-export-button,
.ar-v316-period-panel .ar-period-buttons .btn,
.ar-v316-payment-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.15;
}

/* ================================================================
   PRODUCTOS ERP v3.17
   Catálogo compacto y formulario maestro coherente con Roder Cloud.
================================================================ */

.erp-products-page-header,
.erp-product-form-page-header {
    align-items: center;
}

.erp-products-page-header .erp-products-new-button,
.erp-product-form-page-header .erp-product-form-back {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.erp-products-toolbar {
    margin-bottom: 12px;
}

.erp-products-panel {
    padding: 13px;
}

.erp-products-panel-header {
    align-items: center;
    margin-bottom: 9px;
    padding-bottom: 9px;
}

.erp-products-panel-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.erp-products-table-wrap {
    overflow: hidden;
}

.erp-products-table {
    width: 100%;
    table-layout: fixed;
    font-size: 11.5px;
}

.erp-products-table .erp-products-col-sku {
    width: 13%;
}

.erp-products-table .erp-products-col-product {
    width: 22%;
}

.erp-products-table .erp-products-col-category {
    width: 12%;
}

.erp-products-table .erp-products-col-unit {
    width: 10%;
}

.erp-products-table .erp-products-col-price {
    width: 11%;
}

.erp-products-table .erp-products-col-rules {
    width: 13%;
}

.erp-products-table .erp-products-col-status {
    width: 8%;
}

.erp-products-table .erp-products-col-actions {
    width: 11%;
}

.erp-products-table th,
.erp-products-table td {
    padding: 9px 8px !important;
    white-space: normal !important;
}

.erp-products-table thead th {
    font-size: 9px;
}

.erp-product-sku {
    display: inline-flex;
    max-width: 100%;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.035em;
    overflow-wrap: anywhere;
    text-align: center;
}

.erp-product-identity {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.erp-product-identity strong {
    max-width: 100%;
    color: var(--roder-ink);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.erp-product-identity small {
    max-width: 100%;
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.erp-category-pill,
.erp-unit-pill,
.erp-rule-pill {
    display: inline-flex;
    min-height: 23px;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border: 1px solid #cad5e3;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
}

.erp-category-pill {
    background: #f1f4f9;
    color: var(--roder-navy);
}

.erp-unit-pill {
    border-color: #bfd7ff;
    background: #edf5ff;
    color: #075cca;
}

.erp-product-price {
    color: var(--roder-ink);
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.erp-product-rules {
    display: flex;
    max-width: 100%;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.erp-rule-pill.success {
    border-color: #b9ebc9;
    background: #e8f9ee;
    color: #14723a;
}

.erp-rule-pill.info {
    border-color: #bfd7ff;
    background: #edf5ff;
    color: #075cca;
}

.erp-rule-pill.warning {
    border-color: #f5d47a;
    background: #fff6d9;
    color: #a35b00;
}

.erp-rule-pill.muted {
    border-color: #d8e0ea;
    background: #f5f7fa;
    color: #667085;
}

.erp-product-row-actions {
    display: flex;
    width: 88px;
    margin-left: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 5px;
}

.erp-product-row-actions form {
    display: flex;
    width: 100%;
    margin: 0;
}

.erp-product-row-actions .btn {
    display: inline-flex;
    width: 100%;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    font-size: 9.5px;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.erp-product-row-actions .btn-outline-danger {
    border-color: #ffbdb8;
    color: #d92d20;
}

.erp-product-row-actions .btn-outline-danger:hover {
    border-color: #ef5c51;
    background: #fff0ef;
    color: #b42318;
}

.erp-product-row-actions .btn-outline-success {
    border-color: #a7dfba;
    color: #14723a;
}

.erp-product-row-actions .btn-outline-success:hover {
    border-color: #22a559;
    background: #e9f9ef;
    color: #0f5c2c;
}

.erp-products-empty-state {
    min-height: 132px;
    padding: 20px 16px;
}

.erp-product-form-v317 {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.erp-product-form-v317 .erp-product-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
    align-items: start;
    gap: 14px;
}

.erp-product-form-v317 .erp-product-form-main {
    display: grid;
    min-width: 0;
    gap: 14px;
}

.erp-product-form-v317 .erp-form-card {
    margin: 0 !important;
    padding: 15px;
}

.erp-product-form-v317 .erp-product-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.erp-product-form-v317 .erp-product-description-field {
    grid-column: span 2;
}

.erp-product-form-v317 .erp-product-description-field textarea {
    min-height: 78px;
}

.erp-product-form-v317 .erp-product-pricing-grid,
.erp-product-form-v317 .erp-product-stock-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.erp-product-form-v317 .erp-product-form-side {
    min-width: 0;
}

.erp-product-form-v317 .erp-product-rules-panel {
    position: sticky;
    top: 14px;
    padding: 15px;
    border: 1px solid var(--roder-border);
    border-radius: var(--roder-radius);
    background: var(--roder-surface);
    box-shadow: var(--roder-shadow);
}

.erp-product-form-v317 .erp-product-rules-head {
    margin-bottom: 11px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf1f5;
}

.erp-product-form-v317 .erp-product-rules-head h2 {
    margin: 0;
    color: var(--roder-ink);
    font-size: 18px;
    font-weight: 850;
    letter-spacing: -0.025em;
}

.erp-product-form-v317 .erp-product-rules-head p {
    margin: 5px 0 0;
    color: var(--roder-muted);
    font-size: 11px;
    line-height: 1.4;
}

.erp-product-form-v317 .erp-product-rules-list {
    display: grid;
    gap: 9px;
}

.erp-product-form-v317 .erp-product-rule-check {
    display: grid;
    min-height: 72px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 12px;
    border: 1px solid #d8e0ea;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.erp-product-form-v317 .erp-product-rule-check:hover {
    border-color: #b6c7db;
    background: #f4f7fb;
}

.erp-product-form-v317 .erp-product-rule-check.active {
    border-color: #b7d3ff;
    background: #edf5ff;
    box-shadow: inset 0 0 0 1px rgba(2, 30, 100, 0.03);
}

.erp-product-form-v317 .erp-product-rule-check .form-check-input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
}

.erp-product-form-v317 .erp-product-rule-check span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.erp-product-form-v317 .erp-product-rule-check strong {
    color: var(--roder-ink);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.25;
}

.erp-product-form-v317 .erp-product-rule-check small {
    color: var(--roder-muted);
    font-size: 10px;
    line-height: 1.4;
}

.erp-product-form-v317 .erp-product-form-footer-actions {
    display: flex;
    margin-top: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.erp-product-form-v317 .erp-product-form-footer-actions .btn {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding-right: 15px;
    padding-left: 15px;
    text-align: center;
}

.erp-product-form-v317 .erp-product-cancel-button {
    min-width: 88px;
}

.erp-product-form-v317 .erp-product-save-button {
    min-width: 142px;
    min-height: 42px;
    box-shadow: 0 9px 20px rgba(248, 88, 13, 0.24);
}

.erp-product-form-v317 .erp-product-save-button:hover {
    box-shadow: 0 11px 24px rgba(248, 88, 13, 0.29);
    transform: translateY(-1px);
}

@media (max-width: 1180px) {
    .erp-products-table {
        min-width: 980px;
    }

    .erp-products-table-wrap {
        overflow-x: auto;
    }

    .erp-product-form-v317 .erp-product-form-layout {
        grid-template-columns: minmax(0, 1fr) minmax(250px, 290px);
    }
}

@media (max-width: 980px) {
    .erp-product-form-v317 .erp-product-form-layout {
        grid-template-columns: 1fr;
    }

    .erp-product-form-v317 .erp-product-rules-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .erp-product-form-v317 .erp-product-fields-grid,
    .erp-product-form-v317 .erp-product-pricing-grid,
    .erp-product-form-v317 .erp-product-stock-grid {
        grid-template-columns: 1fr;
    }

    .erp-product-form-v317 .erp-product-description-field {
        grid-column: auto;
    }

    .erp-product-form-page-header .erp-product-form-back,
    .erp-products-page-header .erp-products-new-button,
    .erp-product-form-v317 .erp-product-form-footer-actions .btn {
        width: 100%;
    }

    .erp-product-form-v317 .erp-product-form-footer-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }
}


/* ================================================================
   RECEPCIONES ERP v3.18
   Historial, ingreso y detalle operacional compactos para WMS.
================================================================ */

.erp-receptions-page-header,
.erp-reception-form-page-header,
.erp-reception-detail-page-header {
    align-items: center;
}

.erp-receptions-page-header .erp-receptions-new-button,
.erp-reception-form-page-header .erp-reception-form-back,
.erp-reception-detail-page-header .btn,
.erp-receptions-toolbar .btn,
.erp-reception-form-footer-actions .btn,
.erp-reception-confirm-button,
.erp-reception-add-button,
.erp-reception-table-action,
.erp-reception-row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.erp-receptions-toolbar {
    margin-bottom: 12px;
}

.erp-receptions-toolbar .btn {
    min-height: 40px;
    line-height: 1;
}

.erp-receptions-panel {
    padding: 13px;
}

.erp-receptions-panel-header {
    align-items: center;
    margin-bottom: 9px;
    padding-bottom: 9px;
}

.erp-receptions-panel-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.erp-receptions-table-wrap {
    overflow: hidden;
}

.erp-receptions-table {
    width: 100%;
    min-width: 980px;
    table-layout: fixed;
    font-size: 11px;
}

.erp-receptions-table .erp-receptions-col-company {
    width: 12%;
}

.erp-receptions-table .erp-receptions-col-code {
    width: 12%;
}

.erp-receptions-table .erp-receptions-col-document {
    width: 12%;
}

.erp-receptions-table .erp-receptions-col-supplier {
    width: 17%;
}

.erp-receptions-table .erp-receptions-col-location {
    width: 16%;
}

.erp-receptions-table .erp-receptions-col-status {
    width: 10%;
}

.erp-receptions-table .erp-receptions-col-boxes {
    width: 10%;
}

.erp-receptions-table .erp-receptions-col-date {
    width: 11%;
}

.erp-receptions-table .erp-receptions-col-actions {
    width: 8%;
}

.erp-receptions-table th,
.erp-receptions-table td {
    padding: 8px 8px !important;
    white-space: normal !important;
}

.erp-receptions-table thead th {
    font-size: 9px;
}

.erp-reception-code {
    display: inline-flex;
    max-width: 100%;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.035em;
    overflow-wrap: anywhere;
    text-align: center;
}

.erp-reception-location,
.erp-reception-box-count,
.erp-reception-date {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.erp-reception-location strong,
.erp-reception-box-count strong,
.erp-reception-date strong {
    max-width: 100%;
    color: var(--roder-ink);
    font-size: 10.5px;
    font-weight: 850;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.erp-reception-location small,
.erp-reception-box-count small,
.erp-reception-date small {
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.3;
}

.erp-reception-row-action,
.erp-reception-table-action {
    min-width: 68px;
    min-height: 31px;
    line-height: 1;
    white-space: nowrap;
}

.erp-receptions-empty-state {
    min-height: 126px;
    padding: 20px 16px;
}

.erp-reception-detail-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.erp-reception-detail-actions .btn {
    min-height: 40px;
    line-height: 1;
}

.erp-reception-hero-v318 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
    margin-bottom: 14px;
}

.erp-reception-hero-card {
    display: flex;
    min-width: 0;
    min-height: 92px;
    flex-direction: column;
    justify-content: center;
    padding: 13px 15px;
    border: 1px solid var(--roder-border);
    border-radius: var(--roder-radius);
    background: var(--roder-surface);
    box-shadow: var(--roder-shadow);
}

.erp-reception-hero-card.status-card {
    border-color: #f0c7ad;
    background: #fffaf6;
}

.erp-reception-hero-card span {
    color: var(--roder-muted);
    font-size: 9.5px;
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.erp-reception-hero-card strong {
    margin-top: 5px;
    color: var(--roder-ink);
    font-size: clamp(1.25rem, 2vw, 1.62rem);
    font-weight: 900;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.erp-reception-hero-card.status-card strong {
    color: #a43b00;
}

.erp-reception-hero-card small {
    margin-top: 5px;
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.3;
}

.erp-reception-summary-panel,
.erp-reception-item-panel,
.erp-reception-lines-panel,
.erp-reception-generated-panel {
    padding: 14px;
}

.erp-reception-summary-head,
.erp-reception-item-head,
.erp-reception-lines-head {
    align-items: center;
}

.erp-reception-summary-head form {
    margin: 0;
}

.erp-reception-confirm-button {
    min-height: 40px;
    line-height: 1;
    white-space: nowrap;
}

.erp-reception-summary-grid-v318 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.erp-reception-summary-grid-v318 > div {
    display: flex;
    min-width: 0;
    min-height: 62px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 10px 11px;
    border: 1px solid #dbe3ed;
    border-radius: 10px;
    background: #f8fafc;
}

.erp-reception-summary-grid-v318 > div > span {
    color: #64748b;
    font-size: 8.75px;
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.erp-reception-summary-grid-v318 > div > strong {
    color: var(--roder-ink);
    font-size: 11.5px;
    font-weight: 850;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.erp-reception-summary-grid-v318 .erp-reception-notes {
    grid-column: 1 / -1;
    min-height: auto;
}

.erp-reception-summary-grid-v318 .erp-reception-notes p {
    margin: 0;
    color: #334155;
    font-size: 11px;
    line-height: 1.45;
}

.erp-reception-item-form-v318 {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
}

.erp-reception-item-form-v318 > div {
    min-width: 0;
}

.erp-reception-item-form-v318 .erp-reception-item-product {
    grid-column: span 5;
}

.erp-reception-item-form-v318 .erp-reception-item-boxes,
.erp-reception-item-form-v318 .erp-reception-item-quantity {
    grid-column: span 2;
}

.erp-reception-item-form-v318 .erp-reception-item-pallet {
    grid-column: span 3;
}

.erp-reception-item-form-v318 .erp-reception-item-pallet-toggle {
    grid-column: span 5;
}

.erp-reception-item-form-v318 .erp-reception-item-lot,
.erp-reception-item-form-v318 .erp-reception-item-expiry {
    grid-column: span 2;
}

.erp-reception-item-form-v318 .erp-reception-item-submit {
    grid-column: span 3;
}

.erp-reception-item-form-v318 .form-control,
.erp-reception-item-form-v318 .form-select,
.erp-reception-item-form-v318 .erp-reception-add-button {
    min-height: 40px;
}

.erp-reception-item-form-v318 .erp-form-check-block {
    display: flex;
    min-height: 40px;
    align-items: center;
    padding: 8px 11px;
    border: 1px solid #d8e0ea;
    border-radius: 9px;
    background: #f8fafc;
}

.erp-reception-item-form-v318 .form-check {
    display: flex;
    min-width: 0;
    margin: 0;
    align-items: center;
    gap: 8px;
}

.erp-reception-item-form-v318 .form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
}

.erp-reception-item-form-v318 .form-check-label {
    margin: 0;
    color: var(--roder-ink);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.25;
}

.erp-reception-add-button {
    line-height: 1;
}

.erp-reception-items-table-wrap {
    overflow: hidden;
}

.erp-reception-items-table {
    width: 100%;
    min-width: 900px;
    table-layout: fixed;
    font-size: 10.75px;
}

.erp-reception-items-table th,
.erp-reception-items-table td {
    padding: 8px 8px !important;
    white-space: normal !important;
}

.erp-reception-items-table th:first-child {
    width: 22%;
}

.erp-reception-empty-state {
    min-height: 104px;
    padding: 18px 15px;
}

.erp-reception-empty-state h3 {
    margin-bottom: 4px;
}

.erp-reception-form-v318 {
    padding: 14px;
}

.erp-reception-form-head {
    margin-bottom: 10px;
}

.erp-reception-form-sections {
    display: grid;
    gap: 12px;
}

.erp-reception-form-v318 .erp-reception-form-block {
    margin: 0;
    padding: 14px;
    border: 1px solid #dbe3ed;
    border-radius: 12px;
    background: #f8fafc;
}

.erp-reception-block-head {
    margin-bottom: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid #e5ebf2;
}

.erp-reception-block-head h3 {
    margin: 0;
    color: var(--roder-ink);
    font-size: 14px;
    font-weight: 850;
    letter-spacing: -0.015em;
}

.erp-reception-block-head p {
    margin: 3px 0 0;
    color: var(--roder-muted);
    font-size: 10.5px;
    line-height: 1.4;
}

.erp-reception-document-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.erp-reception-location-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.erp-reception-form-v318 .erp-reception-notes-block textarea {
    min-height: 76px;
}

.erp-reception-form-footer-actions {
    display: flex;
    margin-top: 12px;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.erp-reception-form-footer-actions .btn {
    min-height: 40px;
    line-height: 1;
}

.erp-reception-cancel-button {
    min-width: 92px;
}

.erp-reception-save-button {
    min-width: 142px;
    min-height: 42px !important;
    box-shadow: 0 9px 20px rgba(248, 88, 13, 0.24);
}

.erp-reception-save-button:hover {
    box-shadow: 0 11px 24px rgba(248, 88, 13, 0.29);
    transform: translateY(-1px);
}

@media (max-width: 1180px) {
    .erp-receptions-table-wrap,
    .erp-reception-items-table-wrap {
        overflow-x: auto;
    }

    .erp-reception-summary-grid-v318 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-reception-item-form-v318 .erp-reception-item-product,
    .erp-reception-item-form-v318 .erp-reception-item-pallet-toggle {
        grid-column: span 6;
    }

    .erp-reception-item-form-v318 .erp-reception-item-boxes,
    .erp-reception-item-form-v318 .erp-reception-item-quantity,
    .erp-reception-item-form-v318 .erp-reception-item-lot,
    .erp-reception-item-form-v318 .erp-reception-item-expiry {
        grid-column: span 3;
    }

    .erp-reception-item-form-v318 .erp-reception-item-pallet,
    .erp-reception-item-form-v318 .erp-reception-item-submit {
        grid-column: span 6;
    }
}

@media (max-width: 900px) {
    .erp-reception-hero-v318 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-reception-location-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .erp-receptions-page-header .erp-receptions-new-button,
    .erp-reception-form-page-header .erp-reception-form-back,
    .erp-reception-detail-actions,
    .erp-reception-detail-actions .btn,
    .erp-reception-form-footer-actions .btn {
        width: 100%;
    }

    .erp-reception-detail-actions,
    .erp-reception-form-footer-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .erp-reception-hero-v318,
    .erp-reception-summary-grid-v318,
    .erp-reception-document-grid {
        grid-template-columns: 1fr;
    }

    .erp-reception-item-form-v318 {
        grid-template-columns: 1fr;
    }

    .erp-reception-item-form-v318 > div {
        grid-column: auto !important;
    }
}

/* Recepciones ERP v3.18.2: centrado estricto y geometría uniforme. */
.erp-receptions-new-button,
.erp-receptions-filter-button,
.erp-receptions-clear-button,
.erp-receptions-clear-filters,
.erp-reception-row-action,
.erp-reception-back-button,
.erp-reception-labels-button,
.erp-reception-stock-button,
.erp-reception-confirm-button,
.erp-reception-add-button,
.erp-reception-table-action,
.erp-reception-form-back,
.erp-reception-cancel-button,
.erp-reception-save-button,
.erp-receptions-empty-state .erp-primary-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.erp-receptions-new-button,
.erp-receptions-filter-button,
.erp-receptions-clear-button,
.erp-reception-back-button,
.erp-reception-labels-button,
.erp-reception-stock-button,
.erp-reception-confirm-button,
.erp-reception-add-button,
.erp-reception-form-back,
.erp-reception-cancel-button,
.erp-reception-save-button,
.erp-receptions-empty-state .erp-primary-action {
    height: 40px !important;
    min-height: 40px !important;
    padding-right: 16px !important;
    padding-left: 16px !important;
}

.erp-reception-row-action,
.erp-reception-table-action,
.erp-receptions-clear-filters {
    height: 32px !important;
    min-height: 32px !important;
    min-width: 62px;
    padding-right: 11px !important;
    padding-left: 11px !important;
}

.erp-receptions-filter-button,
.erp-receptions-clear-button,
.erp-reception-add-button {
    width: 100% !important;
}

.erp-reception-form-footer-actions {
    align-items: center !important;
}

/* Recepciones ERP v3.18.3: restaurar tarjetas operativas del detalle. */
.erp-reception-hero-v318 > .erp-reception-hero-card {
    display: flex !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 92px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 13px 15px !important;
    border: 1px solid var(--roder-border) !important;
    border-radius: var(--roder-radius) !important;
    background: var(--roder-surface) !important;
    box-shadow: var(--roder-shadow) !important;
    text-align: left !important;
}

.erp-reception-hero-v318 > .erp-reception-hero-card.status-card {
    border-color: #f0c7ad !important;
    background: #fffaf6 !important;
}

.erp-reception-hero-v318 > .erp-reception-hero-card > span,
.erp-reception-hero-v318 > .erp-reception-hero-card > strong,
.erp-reception-hero-v318 > .erp-reception-hero-card > small {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
}

/* =========================================================
   CAJAS ERP v3.19
   Listado, formularios, detalle, identificación y trazabilidad
   ========================================================= */

.erp-boxes-page-header,
.erp-box-form-page-header,
.erp-box-detail-page-header {
    align-items: center;
}

.erp-boxes-new-button,
.erp-boxes-filter-button,
.erp-boxes-clear-button,
.erp-boxes-empty-action,
.erp-box-barcode-button,
.erp-box-row-button,
.erp-box-form-back-button,
.erp-box-form-cancel-button,
.erp-box-form-save-button,
.erp-box-cancel-button,
.erp-box-detail-action,
.erp-box-id-action {
    display: inline-flex !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.erp-boxes-new-button,
.erp-box-form-back-button,
.erp-box-detail-action {
    min-height: 40px;
}

.erp-boxes-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr) minmax(150px, 0.24fr);
    align-items: end;
    gap: 12px;
}

.erp-boxes-filter-grid > div {
    min-width: 0;
}

.erp-boxes-filter-button {
    width: 100%;
    min-height: 40px;
}

.erp-boxes-panel {
    padding: 14px;
}

.erp-boxes-panel-header,
.erp-boxes-panel-tools {
    align-items: center;
}

.erp-boxes-panel-tools {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.erp-boxes-clear-button {
    min-width: 96px;
    min-height: 31px;
    white-space: nowrap;
}

.erp-boxes-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.erp-boxes-table-v319 {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 10.75px;
}

.erp-boxes-table-v319 th,
.erp-boxes-table-v319 td {
    padding: 8px 8px !important;
    white-space: normal !important;
}

.erp-boxes-col-code { width: 10%; }
.erp-boxes-col-product { width: 15%; }
.erp-boxes-col-stock { width: 8%; }
.erp-boxes-col-status { width: 12%; }
.erp-boxes-col-location { width: 15%; }
.erp-boxes-col-lot { width: 13%; }
.erp-boxes-col-expiry { width: 10%; }
.erp-boxes-col-barcode { width: 7%; }
.erp-boxes-col-actions { width: 10%; }

.erp-box-code-pill {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    white-space: nowrap;
}

.erp-box-product-identity,
.erp-box-stock-stack,
.erp-box-location-stack,
.erp-box-expiry-stack {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.erp-box-product-identity strong,
.erp-box-location-stack strong,
.erp-box-expiry-stack strong {
    color: var(--roder-ink);
    font-size: 10.75px;
    font-weight: 850;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.erp-box-product-identity small,
.erp-box-stock-stack small,
.erp-box-location-stack small {
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.25;
}

.erp-box-stock-stack strong {
    color: var(--roder-navy);
    font-size: 11.5px;
    font-weight: 900;
    line-height: 1.15;
}

.erp-box-status-pill,
.erp-box-lot-pill {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow-wrap: anywhere;
}

.erp-box-barcode-button {
    min-width: 48px;
    min-height: 31px;
}

.erp-box-row-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 6px;
}

.erp-box-row-button {
    width: 100%;
    min-width: 64px;
    min-height: 31px;
}

.erp-boxes-empty-state,
.erp-box-detail-empty-state {
    min-height: 108px;
    padding: 18px 15px;
}

.erp-box-form-v319 {
    padding: 0;
}

.erp-box-form-v319 .erp-box-form-layout {
    align-items: start;
}

.erp-box-form-main-v319 {
    display: grid;
    gap: 12px;
}

.erp-box-form-main-v319 .erp-form-card {
    margin: 0 !important;
    padding: 14px;
}

.erp-box-primary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.erp-box-location-grid,
.erp-box-traceability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.erp-box-form-v319 .form-field,
.erp-box-form-v319 .form-control,
.erp-box-form-v319 .form-select {
    min-width: 0;
    width: 100%;
}

.erp-box-control-panel-v319 {
    padding: 14px;
}

.erp-box-control-panel-v319 .erp-box-info-list div {
    min-height: 58px;
}

.erp-box-form-footer-actions {
    display: flex;
    margin-top: 12px;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.erp-box-form-cancel-button {
    min-width: 92px;
    min-height: 40px;
}

.erp-box-form-save-button {
    min-width: 142px;
    min-height: 42px !important;
}

.erp-box-danger-zone {
    align-items: center;
}

.erp-box-cancel-button {
    min-width: 112px;
    min-height: 40px;
}

.erp-box-detail-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.erp-box-hero-v319 {
    gap: 10px;
    padding: 15px;
}

.erp-box-hero-metrics-v319 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.erp-box-hero-metrics-v319 > div {
    min-height: 68px;
}

.erp-box-detail-grid-v319 {
    grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
}

.erp-box-info-grid-v319 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.erp-box-info-grid-v319 .box-info-item {
    min-height: 62px;
}

.erp-box-id-layout-v319 {
    align-items: stretch;
}

.erp-box-id-layout-v319 .box-id-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.erp-box-id-layout-v319 .box-qr-frame,
.erp-box-id-layout-v319 .box-barcode-frame {
    display: flex;
    min-height: 124px;
    align-items: center;
    justify-content: center;
}

.erp-box-id-layout-v319 .box-qr-frame img {
    width: 108px;
    height: 108px;
}

.erp-box-id-layout-v319 .box-barcode-frame img {
    width: 100%;
    max-height: 102px;
    object-fit: contain;
}

.erp-box-id-layout-v319 .box-id-card p {
    margin-top: auto;
}

.erp-box-id-actions-v319 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.erp-box-id-action {
    width: 100%;
    min-height: 40px;
    padding-right: 10px;
    padding-left: 10px;
}

.erp-box-custody-panel-v319,
.erp-box-movements-panel-v319 {
    padding: 14px;
}

.erp-box-custody-table-v319,
.erp-box-movements-table-v319 {
    min-width: 940px;
    table-layout: fixed;
    font-size: 10.5px;
}

.erp-box-custody-table-v319 th,
.erp-box-custody-table-v319 td,
.erp-box-movements-table-v319 th,
.erp-box-movements-table-v319 td {
    padding: 8px 9px !important;
    white-space: normal !important;
}

.erp-box-custody-table-v319 td strong,
.erp-box-custody-table-v319 td small {
    line-height: 1.25;
}

.erp-box-movements-table-v319 th:nth-child(1) { width: 9%; }
.erp-box-movements-table-v319 th:nth-child(2) { width: 18%; }
.erp-box-movements-table-v319 th:nth-child(3) { width: 8%; }
.erp-box-movements-table-v319 th:nth-child(4),
.erp-box-movements-table-v319 th:nth-child(5) { width: 11%; }
.erp-box-movements-table-v319 th:nth-child(6) { width: 10%; }
.erp-box-movements-table-v319 th:nth-child(7) { width: 33%; }

.erp-box-movements-table-v319 .movement-pill {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    min-height: 25px;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    text-align: center;
    white-space: normal;
}

.erp-box-movement-observation {
    color: #334155;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
    .erp-boxes-table-wrap,
    .erp-box-custody-panel-v319 .table-responsive,
    .erp-box-movements-panel-v319 .table-responsive {
        overflow-x: auto;
    }

    .erp-box-detail-grid-v319 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .erp-boxes-filter-grid,
    .erp-box-primary-grid,
    .erp-box-location-grid,
    .erp-box-traceability-grid,
    .erp-box-info-grid-v319 {
        grid-template-columns: 1fr;
    }

    .erp-box-hero-metrics-v319 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .erp-boxes-new-button,
    .erp-box-form-back-button,
    .erp-box-detail-page-actions,
    .erp-box-detail-page-actions .btn,
    .erp-box-form-footer-actions .btn,
    .erp-box-danger-zone form,
    .erp-box-danger-zone .btn {
        width: 100%;
    }

    .erp-box-detail-page-actions,
    .erp-box-form-footer-actions,
    .erp-box-danger-zone {
        align-items: stretch;
        flex-direction: column;
    }

    .erp-box-hero-metrics-v319,
    .erp-box-id-actions-v319 {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   PALLETS ERP v3.20
   Listado, formularios y etiqueta operativa
   ========================================================= */

.erp-pallets-page-header,
.erp-pallet-form-page-header {
    align-items: center;
}

.erp-pallets-new-button,
.erp-pallets-filter-button,
.erp-pallets-clear-button,
.erp-pallets-empty-action,
.erp-pallet-barcode-button,
.erp-pallet-row-button,
.erp-pallet-form-back-button,
.erp-pallet-form-save-button,
.erp-pallet-form-cancel-button {
    display: inline-flex !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.erp-pallets-new-button,
.erp-pallet-form-back-button {
    min-height: 40px;
}

.erp-pallets-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr) minmax(150px, 0.24fr);
    align-items: end;
    gap: 12px;
}

.erp-pallets-filter-grid > div {
    min-width: 0;
}

.erp-pallets-filter-button {
    width: 100%;
    min-height: 40px;
}

.erp-pallets-panel {
    padding: 14px;
}

.erp-pallets-panel-header,
.erp-pallets-panel-tools {
    align-items: center;
}

.erp-pallets-panel-tools {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.erp-pallets-clear-button {
    min-width: 96px;
    min-height: 31px;
    white-space: nowrap;
}

.erp-pallets-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.erp-pallets-table-v320 {
    width: 100%;
    min-width: 980px;
    table-layout: fixed;
    font-size: 10.75px;
}

.erp-pallets-table-v320 th,
.erp-pallets-table-v320 td {
    padding: 8px !important;
    white-space: normal !important;
}

.erp-pallets-col-code { width: 11%; }
.erp-pallets-col-warehouse { width: 12%; }
.erp-pallets-col-location { width: 24%; }
.erp-pallets-col-status { width: 9%; }
.erp-pallets-col-user { width: 12%; }
.erp-pallets-col-date { width: 10%; }
.erp-pallets-col-barcode { width: 7%; }
.erp-pallets-col-actions { width: 15%; }

.erp-pallet-code-pill,
.erp-pallet-status-pill,
.erp-pallet-user-pill {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow-wrap: anywhere;
}

.erp-pallet-code-pill {
    font-size: 9px;
    white-space: nowrap;
}

.erp-pallet-location-stack,
.erp-pallet-date-stack {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.erp-pallet-location-stack strong,
.erp-pallet-date-stack strong {
    color: var(--roder-ink);
    font-size: 10.75px;
    font-weight: 850;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.erp-pallet-location-stack small,
.erp-pallet-date-stack small {
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.erp-pallet-barcode-button {
    min-width: 48px;
    min-height: 31px;
}

.erp-pallet-row-actions {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.erp-pallet-state-form {
    width: 100%;
    margin: 0;
    grid-column: 1 / -1;
}

.erp-pallet-row-button {
    width: 100%;
    min-width: 0 !important;
    min-height: 31px;
    padding-right: 7px !important;
    padding-left: 7px !important;
    white-space: nowrap;
}

.erp-pallets-empty-state {
    min-height: 108px;
    padding: 18px 15px;
}

.erp-pallet-form-v320 {
    padding: 0;
}

.erp-pallet-editor-form {
    display: grid;
    gap: 12px;
}

.erp-pallet-form-layout-v320 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 12px;
}

.erp-pallet-form-main-v320,
.erp-pallet-form-side-v320,
.erp-pallet-data-grid-v320,
.erp-pallet-form-v320 .form-field,
.erp-pallet-form-v320 .form-control,
.erp-pallet-form-v320 .form-select {
    min-width: 0;
    width: 100%;
}

.erp-pallet-data-card,
.erp-pallet-info-panel-v320 {
    margin: 0;
    padding: 14px;
}

.erp-pallet-data-grid-v320 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.erp-pallet-info-panel-v320 {
    border: 1px solid var(--roder-border);
    border-radius: var(--roder-radius);
    background: var(--roder-surface);
    box-shadow: var(--roder-shadow);
}

.erp-pallet-info-head {
    margin-bottom: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid #edf1f5;
}

.erp-pallet-info-head h2 {
    margin: 0;
    color: var(--roder-ink);
    font-size: 15px;
    font-weight: 850;
    letter-spacing: -0.015em;
}

.erp-pallet-info-head p {
    margin: 4px 0 0;
    color: var(--roder-muted);
    font-size: 10.5px;
    line-height: 1.4;
}

.erp-pallet-info-list {
    display: grid;
    gap: 7px;
}

.erp-pallet-info-list > div {
    min-height: 54px;
    padding: 9px 10px;
    border: 1px solid #dbe3ed;
    border-radius: 10px;
    background: #f8fafc;
}

.erp-pallet-info-list span {
    display: block;
    color: var(--roder-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.erp-pallet-info-list strong {
    display: block;
    margin-top: 4px;
    color: var(--roder-ink);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.25;
}

.erp-pallet-form-footer-actions {
    display: flex;
    margin-top: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 12px;
}

.erp-pallet-form-save-button {
    min-width: 142px;
    min-height: 42px;
}

.erp-pallet-form-cancel-button {
    min-width: 92px;
    min-height: 40px;
}

@media (max-width: 980px) {
    .erp-pallet-form-layout-v320 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .erp-pallets-filter-grid,
    .erp-pallet-data-grid-v320 {
        grid-template-columns: 1fr;
    }

    .erp-pallets-new-button,
    .erp-pallet-form-back-button,
    .erp-pallet-form-footer-actions .btn {
        width: 100%;
    }

    .erp-pallet-form-footer-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

/* =========================================================
   MOVIMIENTOS Y SCANNER ERP v3.21
   Auditoría legible y acceso operacional coherente
   ========================================================= */

.erp-movements-page-header,
.erp-movements-panel-header {
    align-items: center;
}

.erp-movements-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.erp-movement-action-button,
.erp-movement-filter-button,
.erp-movement-clear-button,
.erp-movement-empty-button {
    display: inline-flex !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.erp-movement-action-button {
    min-height: 40px;
}

.erp-movements-toolbar {
    padding: 13px 14px;
}

.erp-movements-filter-grid {
    display: grid;
    grid-template-columns:
        minmax(250px, 1.55fr)
        minmax(205px, 1.08fr)
        minmax(145px, 0.72fr)
        minmax(145px, 0.72fr)
        minmax(96px, 0.42fr)
        minmax(104px, 0.46fr);
    align-items: end;
    gap: 10px;
}

.erp-movements-filter-grid > div {
    min-width: 0;
}

.erp-movements-filter-action {
    display: flex;
    align-items: end;
}

.erp-movement-filter-button,
.erp-movement-clear-button {
    width: 100%;
    min-height: 40px;
    padding-right: 10px !important;
    padding-left: 10px !important;
    white-space: nowrap;
}

.erp-movements-panel {
    padding: 14px;
}

.erp-movements-table-wrap {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
}

.erp-movements-table-v321 {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 10.6px;
}

.erp-movements-table-v321.is-superuser {
    min-width: 1120px;
}

.erp-movements-table-v321 th,
.erp-movements-table-v321 td {
    padding: 8px 9px !important;
    white-space: normal !important;
}

.erp-movement-col-date { width: 10%; }
.erp-movement-col-company { width: 12%; }
.erp-movement-col-box { width: 12%; }
.erp-movement-col-product { width: 21%; }
.erp-movement-col-type { width: 15%; }
.erp-movement-col-quantity { width: 9%; }
.erp-movement-col-route { width: 20%; }
.erp-movement-col-user { width: 13%; }

.erp-movements-table-v321.is-superuser .erp-movement-col-date { width: 9%; }
.erp-movements-table-v321.is-superuser .erp-movement-col-company { width: 12%; }
.erp-movements-table-v321.is-superuser .erp-movement-col-box { width: 10%; }
.erp-movements-table-v321.is-superuser .erp-movement-col-product { width: 17%; }
.erp-movements-table-v321.is-superuser .erp-movement-col-type { width: 14%; }
.erp-movements-table-v321.is-superuser .erp-movement-col-quantity { width: 8%; }
.erp-movements-table-v321.is-superuser .erp-movement-col-route { width: 18%; }
.erp-movements-table-v321.is-superuser .erp-movement-col-user { width: 12%; }

.erp-movement-date,
.erp-movement-product,
.erp-movement-operation,
.erp-movement-quantity-stack {
    min-width: 0;
}

.erp-movement-date strong,
.erp-movement-product strong,
.erp-movement-company {
    color: var(--roder-ink);
    font-weight: 850;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.erp-movement-date strong,
.erp-movement-date small {
    display: block;
    overflow-wrap: normal;
    white-space: nowrap;
    word-break: keep-all;
}

.erp-movement-date small,
.erp-movement-product small {
    color: var(--roder-muted);
    line-height: 1.25;
}

.erp-movement-product small {
    overflow-wrap: anywhere;
}

.erp-movement-code,
.erp-movement-user {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow-wrap: anywhere;
}

.erp-movement-code {
    font-size: 8.8px;
    white-space: nowrap;
}

.erp-movement-operation,
.erp-movement-quantity-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.erp-movement-operation-badge {
    display: inline-flex !important;
    width: auto;
    max-width: 100%;
    min-height: 22px;
    align-items: center;
    justify-content: center;
    padding: 4px 7px !important;
    border: 1px solid #7dd3fc;
    background: #effaff;
    color: #075985;
    font-size: 9px !important;
    font-weight: 850;
    letter-spacing: 0.025em;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
    white-space: normal;
}

.erp-movement-operation small,
.erp-movement-quantity-stack small {
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.3;
}

.erp-movement-quantity-stack strong {
    color: var(--roder-ink);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
    white-space: nowrap;
}

.erp-movement-quantity-stack.is-outbound strong {
    color: #9a3412;
}

.erp-movement-quantity-stack.is-inbound strong {
    color: #166534;
}

.erp-movement-quantity-stack.is-neutral strong {
    color: var(--roder-muted);
}

.erp-movement-route {
    display: grid;
    gap: 5px;
}

.erp-movement-route > div {
    min-width: 0;
    padding: 6px 7px;
    border: 1px solid #dce4ee;
    border-radius: 8px;
    background: #f8fafc;
}

.erp-movement-route span {
    display: block;
    color: var(--roder-muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
}

.erp-movement-route strong {
    display: block;
    margin-top: 3px;
    color: var(--roder-ink);
    font-size: 9.7px;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.erp-movement-main-row > td {
    border-bottom: 0 !important;
    vertical-align: top !important;
}

.erp-movement-observation-row > td {
    padding: 0 9px 10px !important;
    border-bottom-color: #e2e8f0 !important;
    background: #ffffff !important;
}

.erp-movement-observation-bar {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-left: 3px solid var(--roder-orange);
    border-radius: 8px;
    background: #f8fafc;
}

.erp-movement-observation-bar > span {
    color: var(--roder-muted);
    font-size: 8.5px;
    font-weight: 900;
    letter-spacing: 0.055em;
    line-height: 1.4;
    text-transform: uppercase;
}

.erp-movement-observation {
    width: 100%;
    margin: 0;
    color: #334155;
    font-size: 10.5px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: normal;
}

.erp-movement-observation.is-empty {
    color: var(--roder-muted);
    font-style: italic;
}

.erp-movements-empty-state {
    min-height: 112px;
    padding: 18px 15px;
}

@media (max-width: 1180px) {
    .erp-movements-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .erp-movements-page-actions,
    .erp-movements-page-actions .btn,
    .erp-movements-filter-grid {
        width: 100%;
    }

    .erp-movements-page-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .erp-movements-filter-grid {
        grid-template-columns: 1fr;
    }

    .erp-movement-observation-bar {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* =========================================================
   STOCK ERP v3.22
   Resumen operativo, filtros compactos y cajas sin scroll
   ========================================================= */

.erp-stock-v322 {
    min-width: 0;
}

.erp-stock-page-header-v322,
.erp-stock-panel-header-v322 {
    align-items: center;
}

.erp-stock-page-actions-v322 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.erp-stock-action-button-v322,
.erp-stock-filter-button-v322 {
    display: inline-flex !important;
    box-sizing: border-box !important;
    min-height: 40px;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.erp-stock-kpis-v322 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.erp-stock-toolbar-v322 {
    padding: 13px 14px;
}

.erp-stock-filter-grid-v322 {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
}

.erp-stock-filter-grid-v322 > div {
    min-width: 0;
}

.erp-stock-filter-search-v322 { grid-column: span 3; }
.erp-stock-filter-status-v322 { grid-column: span 2; }
.erp-stock-filter-warehouse-v322 { grid-column: span 2; }
.erp-stock-filter-location-v322 { grid-column: span 2; }
.erp-stock-filter-expiration-v322 { grid-column: span 3; }
.erp-stock-filter-from-v322 { grid-column: span 2; }
.erp-stock-filter-to-v322 { grid-column: span 2; }
.erp-stock-filter-submit-v322 { grid-column: span 2; }
.erp-stock-filter-clear-v322 { grid-column: span 2; }

.erp-stock-filter-submit-v322,
.erp-stock-filter-clear-v322 {
    display: flex;
    align-items: end;
}

.erp-stock-filter-button-v322 {
    width: 100%;
    padding-right: 10px !important;
    padding-left: 10px !important;
    white-space: nowrap;
}

.erp-stock-layout-v322 {
    display: grid;
    grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.8fr);
    align-items: start;
    gap: 12px;
}

.erp-stock-products-panel-v322,
.erp-stock-boxes-panel-v322 {
    min-width: 0;
}

.erp-stock-product-list-v322 {
    display: grid;
    gap: 8px;
}

.erp-stock-product-item-v322 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 10px 11px;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    background: #f8fafc;
}

.erp-stock-product-item-v322 > div:first-child {
    min-width: 0;
}

.erp-stock-product-item-v322 > div:first-child strong,
.erp-stock-product-item-v322 > div:first-child small {
    display: block;
}

.erp-stock-product-item-v322 > div:first-child strong {
    color: var(--roder-ink);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.erp-stock-product-item-v322 > div:first-child small {
    margin-top: 4px;
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.erp-stock-product-total-v322 {
    min-width: 58px;
    text-align: right;
}

.erp-stock-product-total-v322 strong,
.erp-stock-product-total-v322 span {
    display: block;
}

.erp-stock-product-total-v322 strong {
    color: var(--roder-navy);
    font-size: 19px;
    font-weight: 900;
    line-height: 1;
}

.erp-stock-product-total-v322 span {
    margin-top: 4px;
    color: var(--roder-muted);
    font-size: 8.5px;
    font-weight: 750;
}

.erp-stock-table-wrap-v322 {
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--roder-border);
    border-radius: 10px;
    background: #ffffff;
}

.erp-stock-table-v322 {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 10.5px;
}

.erp-stock-table-v322 th,
.erp-stock-table-v322 td {
    padding: 8px 9px !important;
    white-space: normal !important;
}

.erp-stock-table-v322 .status-pill {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
}

.erp-stock-col-box-v322 { width: 14%; }
.erp-stock-col-product-v322 { width: 24%; }
.erp-stock-col-quantity-v322 { width: 9%; }
.erp-stock-col-status-v322 { width: 14%; }
.erp-stock-col-location-v322 { width: 23%; }
.erp-stock-col-trace-v322 { width: 16%; }

.erp-stock-table-v322.is-superuser {
    min-width: 920px;
}

.erp-stock-table-v322.is-superuser .erp-stock-col-company-v322 { width: 14%; }
.erp-stock-table-v322.is-superuser .erp-stock-col-box-v322 { width: 12%; }
.erp-stock-table-v322.is-superuser .erp-stock-col-product-v322 { width: 20%; }
.erp-stock-table-v322.is-superuser .erp-stock-col-quantity-v322 { width: 8%; }
.erp-stock-table-v322.is-superuser .erp-stock-col-status-v322 { width: 12%; }
.erp-stock-table-v322.is-superuser .erp-stock-col-location-v322 { width: 20%; }
.erp-stock-table-v322.is-superuser .erp-stock-col-trace-v322 { width: 14%; }

.erp-stock-company-v322,
.erp-stock-box-code-v322 {
    overflow-wrap: anywhere;
}

.erp-stock-box-code-v322 {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    font-size: 8.5px;
    text-align: center;
}

.erp-stock-product-cell-v322,
.erp-stock-location-v322,
.erp-stock-quantity-v322 {
    min-width: 0;
}

.erp-stock-product-cell-v322 strong,
.erp-stock-product-cell-v322 small,
.erp-stock-location-v322 strong,
.erp-stock-location-v322 small,
.erp-stock-quantity-v322 strong,
.erp-stock-quantity-v322 small {
    display: block;
}

.erp-stock-product-cell-v322 strong,
.erp-stock-location-v322 strong {
    color: var(--roder-ink);
    font-size: 10.5px;
    font-weight: 850;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.erp-stock-product-cell-v322 small,
.erp-stock-location-v322 small {
    margin-top: 3px;
    color: var(--roder-muted);
    font-size: 9px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.erp-stock-quantity-v322 {
    text-align: left;
}

.erp-stock-quantity-v322 strong {
    color: var(--roder-navy);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
}

.erp-stock-quantity-v322 small {
    margin-top: 3px;
    color: var(--roder-muted);
    font-size: 8.5px;
}

.erp-stock-trace-v322 {
    display: grid;
    gap: 5px;
}

.erp-stock-trace-v322 > div {
    min-width: 0;
}

.erp-stock-trace-v322 span,
.erp-stock-trace-v322 strong {
    display: block;
}

.erp-stock-trace-v322 span {
    color: var(--roder-muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.045em;
    line-height: 1;
    text-transform: uppercase;
}

.erp-stock-trace-v322 strong {
    margin-top: 3px;
    color: var(--roder-ink);
    font-size: 9px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.erp-stock-empty-v322 {
    min-height: 106px;
}

@media (max-width: 1180px) {
    .erp-stock-filter-grid-v322 {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .erp-stock-filter-search-v322,
    .erp-stock-filter-expiration-v322 {
        grid-column: span 3;
    }

    .erp-stock-filter-status-v322,
    .erp-stock-filter-warehouse-v322,
    .erp-stock-filter-location-v322,
    .erp-stock-filter-from-v322,
    .erp-stock-filter-to-v322,
    .erp-stock-filter-submit-v322,
    .erp-stock-filter-clear-v322 {
        grid-column: span 2;
    }

    .erp-stock-layout-v322 {
        grid-template-columns: minmax(230px, 0.62fr) minmax(0, 1.7fr);
    }
}

@media (max-width: 960px) {
    .erp-stock-kpis-v322,
    .erp-stock-layout-v322 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-stock-products-panel-v322,
    .erp-stock-boxes-panel-v322 {
        grid-column: 1 / -1;
    }

    .erp-stock-table-wrap-v322 {
        overflow-x: auto;
        overflow-y: hidden;
    }

    .erp-stock-table-v322 {
        min-width: 760px;
    }
}

@media (max-width: 760px) {
    .erp-stock-page-actions-v322,
    .erp-stock-page-actions-v322 .btn,
    .erp-stock-kpis-v322,
    .erp-stock-filter-grid-v322 {
        width: 100%;
    }

    .erp-stock-page-actions-v322 {
        align-items: stretch;
        flex-direction: column;
    }

    .erp-stock-kpis-v322,
    .erp-stock-filter-grid-v322 {
        grid-template-columns: 1fr;
    }

    .erp-stock-filter-grid-v322 > div {
        grid-column: auto;
    }
}

/* =========================================================
   BODEGAS ERP v3.23
   Centros de almacenamiento compactos y consistentes
   ========================================================= */

.erp-warehouses-page-header-v323,
.erp-warehouses-panel-header-v323,
.erp-warehouse-form-page-header-v323 {
    align-items: center;
}

.erp-warehouses-new-button-v323,
.erp-warehouses-empty-button-v323,
.erp-warehouses-filter-button-v323,
.erp-warehouses-clear-button-v323,
.erp-warehouse-row-button-v323,
.erp-warehouse-back-button-v323,
.erp-warehouse-cancel-button-v323,
.erp-warehouse-save-button-v323 {
    display: inline-flex !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.erp-warehouses-new-button-v323,
.erp-warehouses-empty-button-v323 {
    min-width: 132px;
    min-height: 40px;
}

.erp-warehouses-toolbar-v323 {
    padding: 13px 14px;
}

.erp-warehouses-filter-grid-v323 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 0.38fr) auto;
    align-items: end;
    gap: 12px;
}

.erp-warehouses-filter-grid-v323 > div {
    min-width: 0;
}

.erp-warehouses-filter-actions-v323 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.erp-warehouses-filter-button-v323 {
    min-width: 132px;
    min-height: 40px;
}

.erp-warehouses-clear-button-v323 {
    min-width: 88px;
    min-height: 40px;
    white-space: nowrap;
}

.erp-warehouses-panel-v323 {
    padding: 14px;
}

.erp-warehouses-panel-header-v323 {
    display: flex;
    justify-content: space-between;
}

.erp-warehouses-count-v323 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.erp-warehouses-table-wrap-v323 {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.erp-warehouses-table-v323 {
    width: 100%;
    min-width: 960px;
    table-layout: fixed;
    font-size: 10.75px;
}

.erp-warehouses-table-v323 th,
.erp-warehouses-table-v323 td {
    padding: 8px 9px !important;
    white-space: normal !important;
}

.erp-warehouses-col-code-v323 { width: 9%; }
.erp-warehouses-col-name-v323 { width: 18%; }
.erp-warehouses-col-address-v323 { width: 15%; }
.erp-warehouses-col-description-v323 { width: 19%; }
.erp-warehouses-col-status-v323 { width: 10%; }
.erp-warehouses-col-date-v323 { width: 12%; }
.erp-warehouses-col-actions-v323 { width: 17%; }

.erp-warehouse-code-v323 {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.erp-warehouse-identity-v323,
.erp-warehouse-date-v323 {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.erp-warehouse-identity-v323 strong,
.erp-warehouse-date-v323 strong {
    color: var(--roder-ink);
    font-size: 10.75px;
    font-weight: 850;
    line-height: 1.25;
}

.erp-warehouse-identity-v323 small,
.erp-warehouse-date-v323 small {
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.25;
}

.erp-warehouse-copy-v323,
.erp-warehouse-empty-copy-v323 {
    display: block;
    color: var(--roder-ink);
    font-size: 10.5px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.erp-warehouse-empty-copy-v323 {
    color: var(--roder-muted);
    font-style: italic;
}

.erp-warehouse-row-actions-v323 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    justify-content: end;
    gap: 6px;
}

.erp-warehouse-row-actions-v323 form {
    display: flex;
    min-width: 0;
    margin: 0;
}

.erp-warehouse-row-button-v323 {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    padding-right: 8px;
    padding-left: 8px;
    white-space: nowrap;
}

.erp-warehouses-empty-state-v323 {
    min-height: 116px;
    padding: 20px 16px;
}

.erp-warehouse-form-shell-v323 {
    padding: 0;
}

.erp-warehouse-form-layout-v323 {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
    align-items: start;
    gap: 14px;
}

.erp-warehouse-data-card-v323,
.erp-warehouse-status-panel-v323 {
    padding: 14px;
    border: 1px solid var(--roder-border);
    border-radius: var(--roder-radius);
    background: var(--roder-surface);
    box-shadow: var(--roder-shadow);
}

.erp-warehouse-data-grid-v323 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 13px;
}

.erp-warehouse-code-field-v323 {
    grid-column: span 1;
}

.erp-warehouse-name-field-v323 {
    grid-column: span 2;
}

.erp-warehouse-full-field-v323 {
    grid-column: 1 / -1;
}

.erp-warehouse-form-v323 .form-field,
.erp-warehouse-form-v323 .form-control,
.erp-warehouse-form-v323 .form-select {
    min-width: 0;
    width: 100%;
}

.erp-warehouse-form-v323 textarea.form-control {
    min-height: 84px;
    resize: vertical;
}

.erp-warehouse-status-head-v323 {
    margin-bottom: 11px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf1f5;
}

.erp-warehouse-status-head-v323 h2 {
    margin: 0;
    color: var(--roder-ink);
    font-size: 16px;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.erp-warehouse-status-head-v323 p {
    margin: 4px 0 0;
    color: var(--roder-muted);
    font-size: 11px;
    line-height: 1.45;
}

.erp-warehouse-active-check-v323 {
    display: flex;
    min-height: 72px;
    align-items: flex-start;
    gap: 11px;
    padding: 12px;
    border: 1px solid #b9d5ff;
    border-radius: 11px;
    background: #eff6ff;
    cursor: pointer;
}

.erp-warehouse-active-check-v323 .form-check-input {
    flex: 0 0 auto;
    margin: 2px 0 0;
}

.erp-warehouse-active-check-v323 span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.erp-warehouse-active-check-v323 strong {
    color: var(--roder-ink);
    font-size: 12px;
    font-weight: 850;
}

.erp-warehouse-active-check-v323 small {
    color: var(--roder-muted);
    font-size: 10.5px;
    line-height: 1.4;
}

.erp-warehouse-guidance-v323 {
    display: grid;
    margin-top: 11px;
    border-top: 1px solid #edf1f5;
}

.erp-warehouse-guidance-v323 > div {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #edf1f5;
}

.erp-warehouse-guidance-v323 > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.erp-warehouse-guidance-v323 span {
    color: var(--roder-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.erp-warehouse-guidance-v323 strong {
    color: var(--roder-ink);
    font-size: 10.75px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.erp-warehouse-form-actions-v323 {
    display: flex;
    margin-top: 12px;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 12px;
}

.erp-warehouse-back-button-v323,
.erp-warehouse-cancel-button-v323 {
    min-width: 110px;
    min-height: 40px;
}

.erp-warehouse-save-button-v323 {
    min-width: 142px;
    min-height: 42px;
}

.erp-warehouses-status-head-v323,
.erp-warehouses-status-cell-v323 {
    text-align: center !important;
}

.erp-warehouses-status-cell-v323 .status-pill {
    display: inline-flex;
    margin-inline: auto;
}

@media (max-width: 1060px) {
    .erp-warehouse-form-layout-v323 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .erp-warehouses-filter-grid-v323 {
        grid-template-columns: 1fr;
    }

    .erp-warehouses-filter-actions-v323 {
        justify-content: stretch;
    }

    .erp-warehouses-filter-actions-v323 .btn {
        flex: 1 1 0;
    }
}

@media (max-width: 640px) {
    .erp-warehouses-new-button-v323,
    .erp-warehouse-back-button-v323,
    .erp-warehouse-form-actions-v323 .btn {
        width: 100%;
    }

    .erp-warehouse-data-grid-v323 {
        grid-template-columns: 1fr;
    }

    .erp-warehouse-code-field-v323,
    .erp-warehouse-name-field-v323,
    .erp-warehouse-full-field-v323 {
        grid-column: auto;
    }

    .erp-warehouse-guidance-v323 > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .erp-warehouse-form-actions-v323 {
        align-items: stretch;
        flex-direction: column;
    }
}


/* =========================================================
   UBICACIONES ERP v3.24
   Mapa físico compacto de bodegas y posiciones operativas
   ========================================================= */
.erp-locations-page-header-v324,
.erp-locations-panel-header-v324,
.erp-location-form-page-header-v324 { align-items: center; }

.erp-locations-new-button-v324,
.erp-locations-empty-button-v324,
.erp-locations-filter-button-v324,
.erp-locations-clear-button-v324,
.erp-location-row-button-v324,
.erp-location-back-button-v324,
.erp-location-cancel-button-v324,
.erp-location-save-button-v324 {
    display: inline-flex !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.erp-locations-new-button-v324,
.erp-locations-empty-button-v324 { min-width: 142px; min-height: 40px; }
.erp-locations-toolbar-v324 { padding: 13px 14px; }
.erp-locations-filter-grid-v324 {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(180px, .46fr) minmax(180px, .4fr) auto;
    align-items: end;
    gap: 12px;
}
.erp-locations-filter-grid-v324 > div { min-width: 0; }
.erp-locations-filter-actions-v324 { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.erp-locations-filter-button-v324 { min-width: 126px; min-height: 40px; }
.erp-locations-clear-button-v324 { min-width: 86px; min-height: 40px; white-space: nowrap; }
.erp-locations-panel-v324 { padding: 14px; }
.erp-locations-panel-header-v324 { display: flex; justify-content: space-between; }
.erp-locations-count-v324 { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.erp-locations-table-wrap-v324 { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.erp-locations-table-v324 { width: 100%; min-width: 0; table-layout: fixed; font-size: 10.75px; }
.erp-locations-table-v324 th,
.erp-locations-table-v324 td { padding: 9px 10px !important; white-space: normal !important; vertical-align: middle !important; }
.erp-locations-col-identity-v324 { width: 28%; }
.erp-locations-col-warehouse-v324 { width: 14%; }
.erp-locations-col-type-v324 { width: 8%; }
.erp-locations-col-detail-v324 { width: 20%; }
.erp-locations-col-status-v324 { width: 9%; }
.erp-locations-col-date-v324 { width: 9%; }
.erp-locations-col-actions-v324 { width: 12%; }
.erp-location-identity-v324,
.erp-location-warehouse-v324 { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 3px; }
.erp-location-date-v324 { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.erp-location-identity-v324 strong,
.erp-location-warehouse-v324 strong,
.erp-location-date-v324 strong { color: var(--roder-ink); font-size: 10.75px; font-weight: 850; line-height: 1.3; overflow-wrap: anywhere; }
.erp-location-warehouse-v324 small,
.erp-location-date-v324 small { color: var(--roder-muted); font-size: 9.5px; line-height: 1.25; }
.erp-location-code-v324 { display: inline-flex; max-width: 100%; align-items: center; justify-content: center; white-space: nowrap; }
.erp-location-type-v324 { display: inline-flex; align-items: center; justify-content: center; padding: 5px 9px; border: 1px solid #bdd7ff; border-radius: 999px; background: #eff6ff; color: var(--roder-navy); font-size: 9.5px; font-weight: 850; line-height: 1; white-space: nowrap; }
.erp-location-detail-v324 { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 4px; color: var(--roder-muted); font-size: 9.5px; line-height: 1.3; text-align: center; }
.erp-location-detail-v324 > div { display: flex; min-width: 0; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 3px; }
.erp-location-detail-v324 span { color: var(--roder-muted); }
.erp-location-detail-v324 strong { color: var(--roder-ink); font-size: 10px; font-weight: 850; }
.erp-locations-type-head-v324,
.erp-locations-detail-head-v324,
.erp-locations-status-head-v324,
.erp-locations-date-head-v324,
.erp-locations-actions-head-v324,
.erp-locations-type-cell-v324,
.erp-locations-detail-cell-v324,
.erp-locations-status-cell-v324,
.erp-locations-date-cell-v324,
.erp-locations-actions-cell-v324 { text-align: center !important; }
.erp-locations-type-cell-v324 .erp-location-type-v324 { margin-inline: auto; }
.erp-locations-status-cell-v324 .status-pill { display: inline-flex; margin-inline: auto; }
.erp-location-row-actions-v324 { display: flex; min-width: 0; flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; }
.erp-location-row-actions-v324 form { display: flex; width: 100%; margin: 0; }
.erp-location-row-button-v324 { width: 100%; min-height: 32px; padding-inline: 8px !important; white-space: nowrap; }
.erp-location-empty-copy-v324 { color: var(--roder-muted); font-style: italic; }
.erp-location-form-shell-v324,
.erp-location-editor-form-v324,
.erp-location-form-side-v324,
.erp-location-status-panel-v324 { min-width: 0; }
.erp-location-form-layout-v324 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .48fr); align-items: start; gap: 16px; }
.erp-location-form-main-v324 { display: grid; min-width: 0; gap: 14px; }
.erp-location-status-panel-v324 { padding: 14px; border: 1px solid var(--roder-border); border-radius: 14px; background: #fff; box-shadow: var(--roder-shadow-soft); }
.erp-location-data-card-v324,
.erp-location-physical-card-v324 { margin: 0 !important; }
.erp-location-data-grid-v324 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 13px; }
.erp-location-warehouse-field-v324 { grid-column: span 2; }
.erp-location-type-field-v324 { grid-column: span 1; }
.erp-location-full-field-v324 { grid-column: 1 / -1; }
.erp-location-physical-grid-v324 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.erp-location-form-v324 .form-field,
.erp-location-form-v324 .form-control,
.erp-location-form-v324 .form-select { min-width: 0; width: 100%; }
.erp-location-status-head-v324 { margin-bottom: 11px; padding-bottom: 10px; border-bottom: 1px solid #edf1f5; }
.erp-location-status-head-v324 h2 { margin: 0; color: var(--roder-ink); font-size: 16px; font-weight: 850; letter-spacing: -.02em; }
.erp-location-status-head-v324 p { margin: 4px 0 0; color: var(--roder-muted); font-size: 11px; line-height: 1.45; }
.erp-location-active-check-v324 { display: flex; min-height: 72px; align-items: flex-start; gap: 11px; padding: 12px; border: 1px solid #b9d5ff; border-radius: 11px; background: #eff6ff; cursor: pointer; }
.erp-location-active-check-v324 .form-check-input { flex: 0 0 auto; margin: 2px 0 0; }
.erp-location-active-check-v324 span { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.erp-location-active-check-v324 strong { color: var(--roder-ink); font-size: 12px; font-weight: 850; }
.erp-location-active-check-v324 small { color: var(--roder-muted); font-size: 10.5px; line-height: 1.4; }
.erp-location-guidance-v324 { display: grid; margin-top: 11px; border-top: 1px solid #edf1f5; }
.erp-location-guidance-v324 > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf1f5; }
.erp-location-guidance-v324 > div:last-child { border-bottom: 0; padding-bottom: 0; }
.erp-location-guidance-v324 span { color: var(--roder-muted); font-size: 9px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.erp-location-guidance-v324 strong { color: var(--roder-ink); font-size: 10.75px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.erp-location-form-actions-v324 { display: flex; margin-top: 12px; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 12px; }
.erp-location-back-button-v324,
.erp-location-cancel-button-v324 { min-width: 126px; min-height: 40px; }
.erp-location-save-button-v324 { min-width: 150px; min-height: 42px; }
@media (max-width: 1100px) {
    .erp-locations-filter-grid-v324 { grid-template-columns: minmax(250px, 1fr) repeat(2, minmax(160px, .55fr)); }
    .erp-locations-filter-actions-v324 { grid-column: 1 / -1; justify-content: flex-end; }
    .erp-location-form-layout-v324 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) { .erp-locations-table-v324 { min-width: 820px; } }
@media (max-width: 760px) {
    .erp-locations-filter-grid-v324 { grid-template-columns: 1fr; }
    .erp-locations-filter-actions-v324 { justify-content: stretch; }
    .erp-locations-filter-actions-v324 .btn { flex: 1 1 0; }
    .erp-location-data-grid-v324,
    .erp-location-physical-grid-v324 { grid-template-columns: 1fr; }
    .erp-location-warehouse-field-v324,
    .erp-location-type-field-v324,
    .erp-location-full-field-v324 { grid-column: auto; }
}
@media (max-width: 640px) {
    .erp-locations-new-button-v324,
    .erp-location-back-button-v324,
    .erp-location-form-actions-v324 .btn { width: 100%; }
    .erp-location-guidance-v324 > div { grid-template-columns: 1fr; gap: 3px; }
    .erp-location-form-actions-v324 { align-items: stretch; flex-direction: column; }
}


/* =========================================================
   USUARIOS ERP v3.25
   Accesos compactos, roles claros y permisos administrables
   ========================================================= */
.erp-users-page-header-v325,
.erp-users-panel-header-v325,
.erp-user-form-page-header-v325 {
    align-items: center;
}

.erp-users-new-button-v325,
.erp-users-empty-button-v325,
.erp-users-filter-button-v325,
.erp-users-clear-button-v325,
.erp-user-row-button-v325,
.erp-user-back-button-v325,
.erp-user-cancel-button-v325,
.erp-user-save-button-v325 {
    display: inline-flex !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.erp-users-new-button-v325,
.erp-users-empty-button-v325 {
    min-width: 132px;
    min-height: 40px;
}

.erp-users-toolbar-v325 {
    padding: 13px 14px;
}

.erp-users-filter-grid-v325 {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(190px, .46fr) minmax(160px, .34fr) auto;
    align-items: end;
    gap: 12px;
}

.erp-users-filter-grid-v325 > div {
    min-width: 0;
}

.erp-users-filter-actions-v325 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.erp-users-filter-button-v325 {
    min-width: 126px;
    min-height: 40px;
}

.erp-users-clear-button-v325 {
    min-width: 86px;
    min-height: 40px;
    white-space: nowrap;
}

.erp-users-panel-v325 {
    padding: 14px;
}

.erp-users-panel-header-v325 {
    display: flex;
    justify-content: space-between;
}

.erp-users-count-v325 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.erp-users-table-wrap-v325 {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.erp-users-table-v325 {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 10.5px;
}

.erp-users-table-v325 th,
.erp-users-table-v325 td {
    padding: 9px 9px !important;
    white-space: normal !important;
    vertical-align: middle !important;
}

.erp-users-col-username-v325 { width: 12%; }
.erp-users-col-name-v325 { width: 13%; }
.erp-users-col-company-v325 { width: 16%; }
.erp-users-col-role-v325 { width: 11%; }
.erp-users-col-access-v325 { width: 18%; }
.erp-users-col-status-v325 { width: 9%; }
.erp-users-col-date-v325 { width: 9%; }
.erp-users-col-actions-v325 { width: 12%; }

.erp-user-identity-v325,
.erp-user-stack-v325,
.erp-user-access-summary-v325,
.erp-user-date-v325 {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.erp-user-identity-v325,
.erp-user-stack-v325,
.erp-user-access-summary-v325 {
    align-items: flex-start;
}

.erp-user-code-v325 {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.erp-user-identity-v325 small,
.erp-user-stack-v325 small,
.erp-user-access-summary-v325 small,
.erp-user-date-v325 small {
    color: var(--roder-muted);
    font-size: 9.25px;
    line-height: 1.3;
}

.erp-user-stack-v325 strong,
.erp-user-access-summary-v325 strong,
.erp-user-date-v325 strong {
    color: var(--roder-ink);
    font-size: 10.5px;
    font-weight: 850;
    line-height: 1.3;
}

.erp-user-stack-v325 strong,
.erp-user-stack-v325 small,
.erp-user-access-summary-v325 small {
    overflow-wrap: anywhere;
}

.erp-user-company-pill-v325,
.erp-user-role-pill-v325,
.erp-user-current-v325 {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border: 1px solid #bdd7ff;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--roder-navy);
    font-size: 9.25px;
    font-weight: 850;
    line-height: 1;
    text-align: center;
}

.erp-user-role-pill-v325.is-superuser {
    border-color: #fdba74;
    background: #fff7ed;
    color: #9a3412;
}

.erp-user-current-v325 {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #475569;
    white-space: nowrap;
}

.erp-user-empty-copy-v325 {
    color: var(--roder-muted);
    font-size: 9.5px;
    font-style: italic;
}

.erp-user-access-summary-v325 {
    padding-left: 9px;
    border-left: 2px solid #bfd4f4;
}

.erp-user-access-summary-v325.is-total {
    border-left-color: var(--roder-orange);
}

.erp-users-role-head-v325,
.erp-users-status-head-v325,
.erp-users-date-head-v325,
.erp-users-actions-head-v325,
.erp-users-role-cell-v325,
.erp-users-status-cell-v325,
.erp-users-date-cell-v325,
.erp-users-actions-cell-v325 {
    text-align: center !important;
}

.erp-users-role-cell-v325 .erp-user-role-pill-v325,
.erp-users-status-cell-v325 .status-pill {
    display: inline-flex;
    margin-inline: auto;
}

.erp-user-date-v325 {
    align-items: center;
    text-align: center;
}

.erp-user-row-actions-v325 {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
}

.erp-user-row-actions-v325 form {
    display: flex;
    width: 100%;
    margin: 0;
}

.erp-user-row-button-v325 {
    width: 100%;
    min-height: 32px;
    padding-inline: 8px !important;
    white-space: nowrap;
}

.erp-user-row-actions-v325 .erp-user-current-v325 {
    width: 100%;
    min-height: 28px;
}

.erp-user-form-shell-v325,
.erp-user-editor-form-v325,
.erp-user-access-card-v325,
.erp-user-permissions-card-v325 {
    min-width: 0;
}

.erp-user-form-v325 .erp-form-card {
    margin-bottom: 0;
}

.erp-user-form-v325 .form-grid {
    gap: 12px 13px;
}

.erp-user-active-box-v325 {
    max-width: 460px;
}

.erp-user-form-v325 .erp-rule-check,
.erp-user-form-v325 .erp-permission-check {
    cursor: pointer;
}

.erp-user-permissions-grid-v325 {
    gap: 14px;
}

.erp-user-form-v325 .erp-permission-group-card {
    padding: 12px;
    border-radius: 13px;
}

.erp-user-form-v325 .erp-permission-group-header {
    margin-bottom: 10px;
    padding-bottom: 9px;
}

.erp-user-form-v325 .erp-permission-check {
    min-height: 62px;
    gap: 11px;
    padding: 10px 11px;
    border-radius: 11px;
}

.erp-user-form-v325 .erp-permission-check + .erp-permission-check {
    margin-top: 8px;
}

.erp-user-form-v325 .erp-permission-check strong {
    font-size: 11.5px;
}

.erp-user-form-v325 .erp-permission-check small {
    font-size: 10px;
    line-height: 1.35;
}

.erp-user-form-actions-v325 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 12px;
}

.erp-user-back-button-v325,
.erp-user-cancel-button-v325 {
    min-width: 122px;
    min-height: 40px;
}

.erp-user-save-button-v325 {
    min-width: 148px;
    min-height: 42px;
}

@media (max-width: 1100px) {
    .erp-users-filter-grid-v325 {
        grid-template-columns: minmax(250px, 1fr) repeat(2, minmax(160px, .5fr));
    }

    .erp-users-filter-actions-v325 {
        grid-column: 1 / -1;
    }

    .erp-users-table-v325 {
        min-width: 980px;
    }
}

@media (max-width: 760px) {
    .erp-users-filter-grid-v325 {
        grid-template-columns: 1fr;
    }

    .erp-users-filter-actions-v325 {
        justify-content: stretch;
    }

    .erp-users-filter-actions-v325 .btn {
        flex: 1 1 0;
    }

    .erp-user-permissions-grid-v325 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .erp-users-new-button-v325,
    .erp-user-back-button-v325,
    .erp-user-form-actions-v325 .btn {
        width: 100%;
    }

    .erp-user-form-actions-v325 {
        align-items: stretch;
        flex-direction: column-reverse;
    }
}

/* =========================================================
   REPORTES ERP v3.26
   Centro, finanzas, pedidos y alertas de inventario
   ========================================================= */

.erp-report-page-header-v326,
.erp-reports-center-header-v326 {
    align-items: center;
}

.erp-report-button-v326,
.erp-report-actions-v326 .btn,
.erp-order-report-filter-actions-v326 .btn,
.erp-settlement-filter-actions-v326 .btn,
.erp-settlement-actions-v326 .btn,
.erp-alert-filter-grid-v326 .btn {
    display: inline-flex !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1.1 !important;
}

.erp-report-button-v326 {
    min-height: 40px;
}

/* Centro de reportes */
.erp-report-section-list-v326 {
    display: grid;
    gap: 18px;
}

.erp-report-section-v326 {
    min-width: 0;
}

.erp-report-section-header-v326 {
    margin-bottom: 10px;
}

.erp-report-section-header-v326 span {
    display: block;
    margin-bottom: 2px;
    color: var(--roder-muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.erp-report-section-header-v326 h2 {
    margin: 0;
    color: var(--roder-ink);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.erp-reports-grid-v326 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.erp-report-card-v326 {
    display: flex;
    min-width: 0;
    min-height: 205px;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 15px;
    border: 1px solid #d8e0ec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(2, 30, 100, 0.045);
}

.erp-report-card-body-v326 {
    min-width: 0;
}

.erp-report-tag-v326 {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef4ff;
    color: #1746c7;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.erp-report-card-v326 h3 {
    margin: 15px 0 7px;
    color: var(--roder-ink);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.erp-report-card-v326 p {
    margin: 0;
    color: var(--roder-muted);
    font-size: 11.5px;
    line-height: 1.48;
}

.erp-report-actions-v326 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.erp-report-actions-v326 .btn {
    min-height: 38px;
    padding-inline: 13px;
}

.erp-report-empty-panel-v326 {
    min-height: 190px;
}

/* KPI, paneles y alineación común */
.erp-report-kpi-grid-v326 {
    align-items: stretch;
}

.erp-report-kpi-grid-v326 .erp-report-kpi-card {
    min-height: 96px;
}

.erp-report-kpi-grid-v326 .erp-report-kpi-card strong {
    overflow-wrap: anywhere;
}

.erp-report-panel-v326 {
    padding: 14px;
}

.erp-report-center-v326 {
    text-align: center !important;
}

.erp-report-center-v326 .status-pill,
.erp-report-center-v326 .erp-user-pill,
.erp-report-center-v326 .erp-muted-pill,
.erp-report-center-v326 .order-source-pill {
    display: inline-flex;
    margin-inline: auto;
}

.erp-report-date-v326 {
    align-items: center;
    text-align: center;
    white-space: nowrap;
}

.erp-report-money-head-v326 {
    text-align: right !important;
}

.erp-report-empty-state-v326 {
    min-height: 118px;
}

.erp-report-location-v326 {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.erp-report-location-v326 strong {
    color: var(--roder-ink);
    font-size: 10.5px;
    font-weight: 850;
}

.erp-report-location-v326 small {
    color: var(--roder-muted);
    font-size: 9.5px;
}

/* Reporte de pedidos */
.erp-order-report-toolbar-v326 {
    padding: 13px 14px;
}

.erp-order-report-filter-grid-v326 {
    display: grid;
    grid-template-columns: minmax(240px, 1.35fr) repeat(3, minmax(150px, 0.75fr));
    gap: 11px 12px;
    align-items: end;
}

.erp-order-report-filter-grid-v326 > div {
    min-width: 0;
}

.erp-order-report-filter-actions-v326 {
    display: flex;
    grid-column: 3 / -1;
    justify-content: flex-end;
    gap: 8px;
}

.erp-order-report-filter-actions-v326 .btn {
    min-width: 125px;
}

.erp-order-report-table-wrap-v326,
.erp-settlement-table-wrap-v326,
.erp-alert-table-wrap-v326 {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.erp-order-report-table-v326 {
    width: 100%;
    min-width: 990px;
    table-layout: fixed;
    font-size: 10.5px;
}

.erp-order-report-table-v326 th,
.erp-order-report-table-v326 td {
    padding: 8px 9px !important;
    vertical-align: middle !important;
}

.erp-order-report-table-v326 th:nth-child(1) { width: 10%; }
.erp-order-report-table-v326 th:nth-child(2) { width: 16%; }
.erp-order-report-table-v326 th:nth-child(3) { width: 13%; }
.erp-order-report-table-v326 th:nth-child(4) { width: 10%; }
.erp-order-report-table-v326 th:nth-child(5),
.erp-order-report-table-v326 th:nth-child(6) { width: 7%; }
.erp-order-report-table-v326 th:nth-child(7) { width: 11%; }
.erp-order-report-table-v326 th:nth-child(8) { width: 12%; }
.erp-order-report-table-v326 th:nth-child(9) { width: 14%; }

.erp-order-report-table-v326.is-superuser {
    min-width: 1100px;
}

/* Rendición */
.erp-settlement-toolbar-v326 {
    padding: 13px 14px;
}

.erp-settlement-filter-grid-v326 {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) minmax(145px, 0.65fr) minmax(145px, 0.65fr) auto;
    align-items: end;
    gap: 12px;
}

.erp-settlement-filter-grid-v326 > div {
    min-width: 0;
}

.erp-settlement-filter-actions-v326 {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.erp-settlement-filter-actions-v326 .btn {
    min-width: 112px;
}

.erp-settlement-summary-v326 {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 14px;
}

.erp-settlement-summary-v326 > span {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 11px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #fff;
}

.erp-settlement-summary-v326 small {
    color: var(--roder-muted);
    font-size: 9.5px;
    font-weight: 800;
}

.erp-settlement-summary-v326 strong {
    color: var(--roder-navy);
    font-size: 13px;
    font-weight: 900;
}

.erp-settlement-table-v326 {
    width: 100%;
    min-width: 970px;
    table-layout: fixed;
    font-size: 10.25px;
}

.erp-settlement-table-v326 th,
.erp-settlement-table-v326 td {
    padding: 8px !important;
    vertical-align: middle !important;
}

.erp-settlement-table-v326 th:nth-child(1) { width: 9%; }
.erp-settlement-table-v326 th:nth-child(2) { width: 15%; }
.erp-settlement-table-v326 th:nth-child(3) { width: 11%; }
.erp-settlement-table-v326 th:nth-child(4) { width: 11%; }
.erp-settlement-table-v326 th:nth-child(5) { width: 14%; }
.erp-settlement-table-v326 th:nth-child(6) { width: 10%; }
.erp-settlement-table-v326 th:nth-child(7) { width: 18%; }
.erp-settlement-table-v326 th:nth-child(8) { width: 12%; }

.erp-settlement-state-v326 {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 4px;
}

.erp-settlement-state-v326 .status-pill {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
}

.erp-settlement-state-v326 small {
    font-size: 8.75px;
    font-weight: 800;
    white-space: nowrap;
}

.erp-settlement-state-v326 .is-validated { color: #047857; }
.erp-settlement-state-v326 .is-pending { color: var(--roder-muted); }

.erp-settlement-amounts-v326 {
    display: grid;
    gap: 3px;
}

.erp-settlement-amounts-v326 span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.erp-settlement-amounts-v326 small {
    color: var(--roder-muted);
    font-size: 8.5px;
    font-weight: 750;
}

.erp-settlement-amounts-v326 strong {
    color: var(--roder-ink);
    font-size: 9.75px;
    font-weight: 850;
    white-space: nowrap;
}

.erp-settlement-actions-v326 {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
}

.erp-settlement-actions-v326 form,
.erp-settlement-actions-v326 .btn {
    width: 100%;
}

.erp-settlement-actions-v326 .btn {
    min-height: 32px;
    padding: 5px 7px;
    font-size: 9px;
}

/* Alertas de inventario */
.erp-alert-kpi-grid-v326 {
    grid-template-columns: repeat(2, minmax(0, 255px));
    justify-content: start;
}

.erp-alert-toolbar-v326 {
    padding: 13px 14px;
}

.erp-alert-filter-grid-v326 {
    display: grid;
    grid-template-columns: minmax(280px, 330px) 158px 245px;
    align-items: end;
    gap: 12px;
}

.erp-alert-filter-grid-v326 .btn {
    min-height: 40px;
}

.erp-alert-report-table-v326 {
    width: 100%;
    min-width: 780px;
    table-layout: fixed;
    font-size: 10.5px;
}

.erp-alert-report-table-v326 th,
.erp-alert-report-table-v326 td {
    padding: 9px !important;
    vertical-align: middle !important;
}

.erp-alert-report-table-v326:not(.is-expiration) th:nth-child(1) { width: 13%; }
.erp-alert-report-table-v326:not(.is-expiration) th:nth-child(2) { width: 27%; }
.erp-alert-report-table-v326:not(.is-expiration) th:nth-child(n+3) { width: 15%; }

.erp-alert-report-table-v326.is-expiration th:nth-child(1) { width: 12%; }
.erp-alert-report-table-v326.is-expiration th:nth-child(2) { width: 24%; }
.erp-alert-report-table-v326.is-expiration th:nth-child(3) { width: 8%; }
.erp-alert-report-table-v326.is-expiration th:nth-child(4) { width: 13%; }
.erp-alert-report-table-v326.is-expiration th:nth-child(5) { width: 12%; }
.erp-alert-report-table-v326.is-expiration th:nth-child(6) { width: 18%; }
.erp-alert-report-table-v326.is-expiration th:nth-child(7) { width: 13%; }

@media (max-width: 1100px) {
    .erp-reports-grid-v326 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-order-report-filter-grid-v326,
    .erp-settlement-filter-grid-v326 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-order-report-filter-actions-v326 {
        grid-column: auto;
    }

    .erp-settlement-filter-actions-v326 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .erp-reports-grid-v326,
    .erp-settlement-summary-v326,
    .erp-order-report-filter-grid-v326,
    .erp-settlement-filter-grid-v326,
    .erp-alert-filter-grid-v326,
    .erp-alert-kpi-grid-v326 {
        grid-template-columns: 1fr;
    }

    .erp-report-actions-v326,
    .erp-order-report-filter-actions-v326,
    .erp-settlement-filter-actions-v326 {
        align-items: stretch;
        flex-direction: column;
    }

    .erp-report-actions-v326 .btn,
    .erp-order-report-filter-actions-v326 .btn,
    .erp-settlement-filter-actions-v326 .btn,
    .erp-alert-filter-grid-v326 .btn {
        width: 100%;
    }
}

/* =========================================================
   BODEGA MOBILE ERP v3.27
   Flujo operacional compacto para preparación, retiro y scanner
   ========================================================= */

.erp-warehouse-mobile-v327 {
    width: 100%;
}

.erp-mobile-page-header-v327,
.erp-mobile-page-header-v327 .erp-page-actions,
.erp-mobile-page-header-v327 .btn,
.erp-mobile-card-action-v327 .btn,
.erp-mobile-form-action-v327 .btn,
.erp-mobile-manual-row-v327 .btn {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.erp-mobile-secondary-action-v327 {
    min-height: 40px;
}

.erp-mobile-summary-v327 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 220px));
    gap: 10px;
    margin: 0 0 14px;
}

.erp-mobile-summary-card-v327 {
    min-height: 76px;
    padding: 12px 14px;
    border: 1px solid var(--roder-border);
    border-radius: var(--roder-radius);
    background: #ffffff;
    box-shadow: var(--roder-shadow);
}

.erp-mobile-summary-card-v327 span {
    display: block;
    color: var(--roder-muted);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.055em;
    line-height: 1.2;
    text-transform: uppercase;
}

.erp-mobile-summary-card-v327 strong {
    display: block;
    margin-top: 5px;
    color: var(--roder-ink);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
}

.erp-mobile-summary-handoff-v3271 {
    grid-template-columns: repeat(3, minmax(0, 180px));
}

.erp-mobile-order-board-v327,
.erp-mobile-pickup-grid-v327 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.erp-mobile-order-card-v327 {
    display: flex;
    min-width: 0;
    min-height: 0;
    padding: 14px;
    flex-direction: column;
    border: 1px solid var(--roder-border);
    border-radius: var(--roder-radius-lg);
    background: #ffffff;
    box-shadow: var(--roder-shadow);
}

.erp-mobile-order-head-v327 {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.erp-mobile-order-customer-v327 {
    margin: 10px 0 0;
    color: var(--roder-ink);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.erp-mobile-order-badges-v327 {
    display: flex;
    max-width: 100%;
    margin-top: 8px;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    overflow: visible;
}

.erp-mobile-order-badges-v327 .pending-order-badge {
    display: inline-flex;
    min-height: 24px;
    padding: 4px 8px;
    align-items: center;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.erp-mobile-order-badges-v327 .pending-order-badge-source {
    border: 1px solid #c7cce6;
    background: #eef0f8;
    color: var(--roder-navy);
}

.erp-mobile-order-badges-v327 .pending-order-badge-delivery {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.erp-mobile-order-badges-v327 .pending-order-badge-pickup {
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.erp-mobile-facts-v327 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 12px 0 0;
}

.erp-mobile-facts-v327 > div {
    min-width: 0;
    min-height: 58px;
    padding: 8px 9px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.erp-mobile-facts-v327 dt {
    margin: 0;
    color: var(--roder-muted);
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.055em;
    line-height: 1.2;
    text-transform: uppercase;
}

.erp-mobile-facts-v327 dd {
    margin: 4px 0 0;
    color: var(--roder-ink);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.erp-mobile-facts-v327 small {
    display: block;
    margin-top: 3px;
    color: var(--roder-muted);
    font-size: 9px;
    line-height: 1.2;
}

.erp-mobile-note-v327 {
    margin-top: 10px;
    padding: 9px 10px;
    border-left: 3px solid var(--roder-orange);
    border-radius: 8px;
    background: #fff8f4;
}

.erp-mobile-note-v327 span {
    color: var(--roder-orange-dark);
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.erp-mobile-note-v327 p {
    margin: 3px 0 0;
    color: var(--roder-muted);
    font-size: 10.5px;
    line-height: 1.4;
}

.erp-mobile-card-action-v327 {
    margin-top: auto;
    padding-top: 12px;
}

.erp-mobile-card-action-v327 .btn {
    display: inline-flex;
    min-height: 40px;
    font-weight: 800;
}

.erp-mobile-pickup-section-v327 {
    width: 100%;
    margin-top: 20px;
}

.erp-mobile-section-header-v327 {
    margin-bottom: 10px;
}

.erp-mobile-section-header-v327 h2 {
    margin: 0;
    color: var(--roder-ink);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.erp-mobile-section-header-v327 p {
    margin: 4px 0 0;
    color: var(--roder-muted);
    font-size: 12px;
    line-height: 1.4;
}

.erp-mobile-order-head-v327 .ready-pickup-code {
    display: inline-flex;
    min-height: 26px;
    padding: 4px 9px;
    align-items: center;
    border: 1px solid #b8d5ff;
    border-radius: 8px;
    background: #eef6ff;
    color: #1556d8;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.035em;
}

.erp-mobile-order-head-v327 .ready-pickup-status {
    display: inline-flex;
    min-height: 25px;
    padding: 4px 9px;
    align-items: center;
    border: 1px solid #38bdf8;
    border-radius: 999px;
    background: #ecfeff;
    color: #0369a1;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.erp-mobile-dispatch-handoff-v3271 {
    display: flex;
    margin-top: 12px;
    padding: 9px 10px;
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
}

.erp-mobile-dispatch-handoff-v3271 strong {
    color: var(--roder-navy);
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.erp-mobile-dispatch-handoff-v3271 span {
    color: var(--roder-muted);
    font-size: 10.5px;
    line-height: 1.35;
}

.erp-mobile-empty-panel-v327 {
    grid-column: 1 / -1;
}

.erp-mobile-prepare-context-v327 {
    display: grid;
    grid-template-columns: minmax(130px, 0.7fr) minmax(0, 1.3fr);
    gap: 0;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--roder-border);
    border-radius: var(--roder-radius);
    background: #ffffff;
    box-shadow: var(--roder-shadow);
}

.erp-mobile-prepare-context-v327 > div {
    min-width: 0;
    padding: 11px 13px;
}

.erp-mobile-prepare-context-v327 > div + div {
    border-left: 1px solid var(--roder-border);
}

.erp-mobile-prepare-context-v327 span,
.erp-mobile-prepare-context-v327 small {
    display: block;
    color: var(--roder-muted);
    font-size: 9px;
    line-height: 1.3;
}

.erp-mobile-prepare-context-v327 span {
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.erp-mobile-prepare-context-v327 strong {
    display: block;
    margin: 3px 0;
    color: var(--roder-ink);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.erp-mobile-prepare-layout-v327 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.78fr);
    align-items: start;
    gap: 12px;
}

.erp-mobile-scan-panel-v327,
.erp-mobile-guide-panel-v327,
.erp-mobile-scanner-panel-v327,
.erp-mobile-scanner-result-v327 {
    min-width: 0;
}

.erp-mobile-progress-v327 {
    min-height: 70px;
    padding: 11px 12px;
}

.erp-mobile-progress-v327 > div {
    align-items: center;
}

.erp-mobile-reader-shell-v327 {
    margin-top: 10px;
    padding: 8px;
    border: 1px solid var(--roder-border);
    border-radius: 12px;
    background: #f8fafc;
}

.erp-mobile-reader-v327 {
    width: 100%;
    min-height: 230px;
    max-height: 340px;
    overflow: hidden;
    border-radius: 10px;
    background: #070b14;
}

.erp-mobile-reader-v327 video,
.erp-mobile-reader-v327 canvas {
    width: 100% !important;
    max-height: 340px !important;
    object-fit: cover !important;
}

.erp-mobile-manual-box-v327 {
    margin-top: 10px;
}

.erp-mobile-manual-row-v327 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.erp-mobile-manual-row-v327 .btn {
    display: inline-flex;
    min-width: 112px;
}

.erp-mobile-guide-list-v327 {
    display: grid;
    gap: 8px;
}

.erp-mobile-guide-item-v327 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 10px;
    padding: 11px;
    border: 1px solid var(--roder-border);
    border-radius: 11px;
    background: #f8fafc;
}

.erp-mobile-guide-code-v327 {
    grid-column: 1;
    grid-row: 1;
}

.erp-mobile-guide-state-v327 {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
}

.erp-mobile-guide-product-v327 {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
}

.erp-mobile-guide-product-v327 strong,
.erp-mobile-guide-product-v327 small {
    display: block;
}

.erp-mobile-guide-product-v327 strong {
    color: var(--roder-ink);
    font-size: 13px;
    font-weight: 850;
}

.erp-mobile-guide-product-v327 small {
    color: var(--roder-muted);
    font-size: 10px;
    line-height: 1.4;
}

.erp-mobile-pickup-summary-v327,
.erp-mobile-pickup-form-panel-v327 {
    margin-bottom: 12px;
}

.erp-mobile-pickup-head-v327 {
    align-items: center;
}

.erp-mobile-pickup-facts-v327 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.erp-mobile-pickup-facts-v327 .erp-summary-item {
    min-height: 72px;
    padding: 10px;
}

.erp-mobile-pickup-facts-v327 dt {
    color: var(--roder-muted);
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.erp-mobile-pickup-facts-v327 dd {
    margin: 4px 0 0;
    color: var(--roder-ink);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.erp-mobile-pickup-quick-action-v327 {
    margin-top: 10px;
}

.erp-mobile-pickup-quick-action-v327 .btn,
.erp-mobile-form-action-v327 .btn {
    display: inline-flex;
    min-height: 42px;
    font-weight: 800;
}

.erp-mobile-pickup-quick-action-v327 p {
    margin: 7px 0 0;
    color: var(--roder-muted);
    font-size: 10.5px;
    line-height: 1.4;
}

.erp-mobile-pickup-form-grid-v327 {
    margin-top: 10px;
    gap: 10px;
}

.erp-mobile-pickup-form-grid-v327 textarea.form-control {
    min-height: 84px;
}

.erp-mobile-form-action-v327 {
    margin-top: 11px;
}

.erp-mobile-scanner-layout-v327 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
    align-items: start;
    gap: 12px;
}

.erp-mobile-scanner-status-v327 {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 10px;
    margin-top: 10px;
    padding: 10px 11px;
    align-items: center;
}

.erp-mobile-scanner-status-v327 span {
    grid-row: 1 / span 2;
    align-self: center;
}

.erp-mobile-scanner-status-v327 strong,
.erp-mobile-scanner-status-v327 small {
    min-width: 0;
}

.erp-mobile-scanner-empty-v327 {
    min-height: 260px;
    padding: 24px 18px;
}

@media (max-width: 900px) {
    body.mobile-menu-open {
        overflow: hidden;
        touch-action: none;
    }

    .app-sidebar {
        display: flex !important;
        height: 100dvh;
        max-height: 100dvh;
        flex-direction: column;
        overflow: hidden;
    }

    .app-sidebar .app-brand {
        min-height: 58px;
        margin-bottom: 5px;
        align-items: center;
        flex: 0 0 auto;
    }

    .app-sidebar .app-menu {
        min-height: 0;
        padding-right: 3px;
        flex: 1 1 auto;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }

    .app-sidebar .menu-link {
        min-height: 39px;
        padding: 9px 10px;
    }

    .app-sidebar .app-sidebar-footer {
        flex: 0 0 auto;
        background: var(--roder-navy-dark);
    }

    .app-sidebar .mobile-sidebar-close {
        display: inline-flex;
        margin-left: auto;
        align-items: center;
        justify-content: center;
    }

    .erp-mobile-page-header-v327 {
        gap: 10px;
    }

    .erp-mobile-page-header-v327 .erp-title-block,
    .erp-mobile-page-header-v327 .erp-page-actions {
        width: 100%;
    }

    .erp-mobile-page-header-v327 .erp-page-actions .btn {
        display: inline-flex;
        width: 100%;
    }

    .erp-mobile-order-board-v327,
    .erp-mobile-pickup-grid-v327,
    .erp-mobile-prepare-layout-v327,
    .erp-mobile-scanner-layout-v327 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .erp-warehouse-mobile-v327 .erp-page-header {
        margin-bottom: 11px;
        padding: 12px;
    }

    .erp-warehouse-mobile-v327 .erp-page-header h1 {
        font-size: 22px;
        line-height: 1.05;
    }

    .erp-warehouse-mobile-v327 .erp-page-header p {
        margin-top: 5px;
        font-size: 11.5px;
        line-height: 1.4;
    }

    .erp-mobile-summary-v327 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 11px;
    }

    .erp-mobile-summary-handoff-v3271 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .erp-mobile-summary-card-v327 {
        min-height: 68px;
        padding: 10px 11px;
    }

    .erp-mobile-summary-card-v327 strong {
        font-size: 22px;
    }

    .erp-mobile-order-card-v327 {
        padding: 12px;
        border-radius: 13px;
    }

    .erp-mobile-order-customer-v327 {
        font-size: 18px;
    }

    .erp-mobile-facts-v327 {
        gap: 6px;
        margin-top: 10px;
    }

    .erp-mobile-facts-v327 > div {
        min-height: 54px;
        padding: 7px 8px;
    }

    .erp-mobile-facts-v327 dd {
        font-size: 14px;
    }

    .erp-mobile-pickup-section-v327 {
        margin-top: 17px;
    }

    .erp-mobile-prepare-context-v327 {
        grid-template-columns: minmax(100px, 0.65fr) minmax(0, 1.35fr);
        margin-bottom: 10px;
    }

    .erp-mobile-prepare-context-v327 > div {
        padding: 10px;
    }

    .erp-mobile-prepare-context-v327 strong {
        font-size: 13px;
    }

    .erp-mobile-scan-panel-v327,
    .erp-mobile-guide-panel-v327,
    .erp-mobile-scanner-panel-v327,
    .erp-mobile-scanner-result-v327,
    .erp-mobile-pickup-summary-v327,
    .erp-mobile-pickup-form-panel-v327 {
        padding: 11px;
    }

    .erp-mobile-reader-shell-v327 {
        padding: 7px;
    }

    .erp-mobile-reader-v327 {
        min-height: 218px;
        max-height: 270px;
    }

    .erp-mobile-reader-v327 video,
    .erp-mobile-reader-v327 canvas {
        max-height: 270px !important;
    }

    .erp-mobile-manual-row-v327 {
        grid-template-columns: 1fr;
    }

    .erp-mobile-manual-row-v327 .btn {
        width: 100%;
        min-width: 0;
        min-height: 40px;
    }

    .erp-mobile-guide-item-v327 {
        padding: 10px;
    }

    .erp-mobile-pickup-facts-v327 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-mobile-pickup-payment-v327 {
        grid-column: 1 / -1;
    }

    .erp-mobile-pickup-form-grid-v327 {
        grid-template-columns: 1fr;
    }

    .erp-mobile-scanner-status-v327 {
        margin-top: 8px;
        padding: 9px 10px;
    }

    .erp-mobile-scanner-empty-v327 {
        min-height: 220px;
        padding: 20px 14px;
    }
}

@media (max-width: 380px) {
    .erp-mobile-facts-v327 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-mobile-facts-v327 > div:last-child {
        grid-column: 1 / -1;
    }
}

/* =========================================================
   BODEGA MOBILE v3.27.2
   Listados de cajas y movimientos en tarjetas móviles
   ========================================================= */

.erp-boxes-mobile-list-v327,
.erp-movements-mobile-list-v327 {
    display: none;
}

@media (max-width: 760px) {
    .erp-boxes-table-wrap,
    .erp-movements-table-wrap {
        display: none;
    }

    .erp-boxes-mobile-list-v327,
    .erp-movements-mobile-list-v327 {
        display: grid;
        gap: 12px;
    }

    .erp-boxes-panel,
    .erp-movements-panel {
        padding: 12px;
        overflow: hidden;
    }

    .erp-boxes-panel-header,
    .erp-movements-panel-header {
        align-items: flex-start;
        gap: 8px;
    }

    .erp-boxes-panel-tools {
        justify-content: flex-start;
    }

    .erp-box-mobile-card-v327,
    .erp-movement-mobile-card-v327 {
        min-width: 0;
        padding: 12px;
        border: 1px solid #dbe4ef;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(2, 30, 100, 0.045);
    }

    .erp-box-mobile-card-head-v327,
    .erp-movement-mobile-card-head-v327 {
        display: flex;
        min-width: 0;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }

    .erp-box-mobile-code-v327,
    .erp-box-mobile-status-v327,
    .erp-movement-mobile-code-v327 {
        max-width: 100%;
        white-space: nowrap;
    }

    .erp-box-mobile-product-v327 {
        display: flex;
        min-width: 0;
        margin-top: 12px;
        flex-direction: column;
        gap: 2px;
    }

    .erp-box-mobile-product-v327 strong,
    .erp-movement-mobile-identity-v327 strong,
    .erp-movement-mobile-company-v327 strong {
        color: var(--roder-ink);
        font-size: 13px;
        font-weight: 850;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .erp-box-mobile-product-v327 small,
    .erp-movement-mobile-identity-v327 small,
    .erp-movement-mobile-date-v327 small,
    .erp-movement-mobile-operation-v327 small,
    .erp-movement-mobile-summary-v327 small {
        color: var(--roder-muted);
        font-size: 10px;
        line-height: 1.35;
    }

    .erp-box-mobile-data-grid-v327,
    .erp-movement-mobile-identity-v327,
    .erp-movement-mobile-summary-v327,
    .erp-movement-mobile-route-v327 {
        display: grid;
        min-width: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .erp-box-mobile-data-grid-v327 {
        margin-top: 12px;
    }

    .erp-box-mobile-data-grid-v327 > div,
    .erp-movement-mobile-identity-v327 > div,
    .erp-movement-mobile-summary-v327 > div,
    .erp-movement-mobile-route-v327 > div,
    .erp-movement-mobile-company-v327 {
        min-width: 0;
        padding: 9px 10px;
        border: 1px solid #dbe4ef;
        border-radius: 10px;
        background: #f8fafc;
    }

    .erp-box-mobile-data-grid-v327 span,
    .erp-movement-mobile-identity-v327 span,
    .erp-movement-mobile-summary-v327 span,
    .erp-movement-mobile-route-v327 span,
    .erp-movement-mobile-company-v327 span,
    .erp-movement-mobile-observation-v327 > span {
        display: block;
        margin-bottom: 4px;
        color: var(--roder-muted);
        font-size: 8px;
        font-weight: 900;
        letter-spacing: 0.055em;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .erp-box-mobile-data-grid-v327 strong,
    .erp-movement-mobile-summary-v327 strong,
    .erp-movement-mobile-route-v327 strong {
        display: block;
        color: var(--roder-ink);
        font-size: 11.5px;
        font-weight: 850;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .erp-box-mobile-data-grid-v327 small {
        display: block;
        margin-top: 2px;
        color: var(--roder-muted);
        font-size: 9.5px;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .erp-box-mobile-actions-v327 {
        display: grid;
        margin-top: 12px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .erp-box-mobile-button-v327 {
        display: inline-flex !important;
        width: 100%;
        min-height: 40px;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .erp-box-mobile-edit-v327 {
        grid-column: 1 / -1;
    }

    .erp-movement-mobile-date-v327,
    .erp-movement-mobile-operation-v327 {
        display: flex;
        min-width: 0;
        flex-direction: column;
        gap: 2px;
    }

    .erp-movement-mobile-date-v327 strong {
        color: var(--roder-ink);
        font-size: 12px;
        font-weight: 900;
        line-height: 1.2;
        white-space: nowrap;
    }

    .erp-movement-mobile-operation-v327 {
        align-items: flex-end;
        text-align: right;
    }

    .erp-movement-mobile-company-v327,
    .erp-movement-mobile-identity-v327,
    .erp-movement-mobile-summary-v327,
    .erp-movement-mobile-route-v327,
    .erp-movement-mobile-observation-v327 {
        margin-top: 10px;
    }

    .erp-movement-mobile-summary-v327 strong.is-outbound {
        color: #9a3412;
    }

    .erp-movement-mobile-summary-v327 strong.is-inbound {
        color: #166534;
    }

    .erp-movement-mobile-observation-v327 {
        padding: 10px;
        border: 1px solid #dbe4ef;
        border-left: 3px solid var(--roder-orange);
        border-radius: 10px;
        background: #f8fafc;
    }

    .erp-movement-mobile-observation-v327 p {
        margin: 0;
        color: #334155;
        font-size: 10.5px;
        line-height: 1.45;
        overflow-wrap: anywhere;
    }

    .erp-movement-mobile-observation-v327 p.is-empty {
        color: var(--roder-muted);
        font-style: italic;
    }

    .erp-boxes-mobile-empty-v327,
    .erp-movements-mobile-empty-v327 {
        min-height: 150px;
    }
}

@media (max-width: 390px) {
    .erp-box-mobile-data-grid-v327,
    .erp-movement-mobile-identity-v327,
    .erp-movement-mobile-summary-v327,
    .erp-movement-mobile-route-v327 {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   CONDUCTOR MOBILE ERP v3.28
   Cola, visita, evidencia y sidebar operativo compactos
   ========================================================= */

.erp-driver-mobile-v328 .btn,
.erp-driver-user-v328 .app-sidebar .menu-link,
.erp-driver-user-v328 .app-sidebar .logout-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.erp-driver-page-header-v328 {
    align-items: center;
}

.erp-driver-summary-v328 {
    gap: 10px;
}

.erp-driver-board-v328,
.erp-driver-route-list-v328,
.erp-driver-available-grid-v328 {
    min-width: 0;
}

.erp-driver-section-v328 {
    overflow: hidden;
}

.erp-driver-control-v328,
.erp-driver-card-v328,
.erp-driver-available-card-v328,
.erp-driver-delivery-summary-v328,
.erp-driver-stop-v328,
.erp-driver-action-panel-v328,
.erp-driver-detail-layout-v328 > .panel {
    min-width: 0;
}

.erp-driver-card-meta-v328 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.erp-driver-delivery-summary-v328 {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding: 15px;
    border: 1px solid #d9e3ef;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(2, 30, 100, 0.05);
}

.erp-driver-delivery-summary-top-v328 {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.erp-driver-delivery-summary-top-v328 > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.erp-driver-delivery-summary-top-v328 strong {
    color: var(--roder-ink);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
}

.erp-driver-delivery-summary-top-v328 small,
.erp-driver-delivery-facts-v328 small {
    color: var(--roder-muted);
    font-size: 10.5px;
    line-height: 1.35;
}

.erp-driver-delivery-facts-v328 {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(120px, 0.5fr);
    gap: 9px;
}

.erp-driver-delivery-facts-v328 > div {
    display: flex;
    min-width: 0;
    min-height: 72px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 10px 11px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #f8fafc;
}

.erp-driver-delivery-facts-v328 span,
.erp-driver-stop-metrics-v328 span {
    color: var(--roder-muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.erp-driver-delivery-facts-v328 strong {
    color: var(--roder-ink);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.erp-driver-stop-metrics-v328 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.erp-driver-confirm-action-v328 .btn {
    width: 100%;
    min-height: 43px;
}

@media (max-width: 900px) {
    .erp-driver-user-v328 .app-sidebar {
        width: 278px;
        max-width: calc(100vw - 72px);
    }

    .erp-driver-user-v328 .app-sidebar .app-menu {
        display: block;
        padding: 7px 10px 10px;
    }

    .erp-driver-user-v328 .app-sidebar .menu-section {
        display: block;
        margin: 0;
    }

    .erp-driver-user-v328 .app-sidebar .menu-section-title {
        display: block;
        margin: 7px 8px 6px;
    }

    .erp-driver-user-v328 .app-sidebar .menu-link {
        width: 100%;
        min-height: 42px;
        height: auto;
        margin: 0;
        padding: 10px 11px;
        justify-content: flex-start !important;
        gap: 10px;
    }

    .erp-driver-user-v328 .app-sidebar .menu-link .menu-icon {
        flex: 0 0 auto;
    }

    .erp-driver-user-v328 .app-sidebar .app-sidebar-footer {
        padding: 9px 10px 10px;
    }

    .erp-driver-user-v328 .app-sidebar .session-box {
        padding: 9px 10px;
    }

    .erp-driver-user-v328 .app-sidebar .logout-btn {
        width: 100%;
        min-height: 38px;
    }
}

@media (max-width: 640px) {
    .erp-driver-mobile-v328 .erp-page-header {
        margin-bottom: 10px;
        padding: 12px;
    }

    .erp-driver-page-header-v328 .erp-title-block,
    .erp-driver-detail-header-v328 .erp-page-actions {
        width: 100%;
    }

    .erp-driver-page-header-v328 h1 {
        font-size: 22px;
        line-height: 1.06;
        text-align: left;
    }

    .erp-driver-page-header-v328 p {
        margin-top: 5px;
        font-size: 11.5px;
        line-height: 1.4;
    }

    .erp-driver-detail-header-v328 {
        gap: 9px;
    }

    .erp-driver-detail-header-v328 .erp-page-actions .btn {
        width: 100%;
        min-height: 40px;
    }

    .erp-driver-summary-v328 {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        margin-bottom: 10px;
    }

    .erp-driver-summary-v328 article {
        min-width: 0;
        min-height: 72px;
        padding: 9px 8px;
        border-radius: 13px;
    }

    .erp-driver-summary-v328 span {
        font-size: 8.5px;
        letter-spacing: 0.035em;
        white-space: normal;
    }

    .erp-driver-summary-v328 strong {
        margin-top: 3px;
        font-size: 21px;
        line-height: 1;
    }

    .erp-driver-summary-v328 small {
        display: none;
    }

    .erp-driver-section-v328 {
        margin-top: 10px !important;
        padding: 11px;
        border-radius: 14px;
    }

    .erp-driver-section-v328 .panel-header {
        align-items: flex-start;
        gap: 7px;
        padding-bottom: 9px;
    }

    .erp-driver-section-v328 .panel-header h2 {
        font-size: 15px;
    }

    .erp-driver-section-v328 .panel-header p {
        margin-top: 3px;
        font-size: 10.5px;
        line-height: 1.35;
    }

    .erp-driver-control-v328 {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 10px;
        padding: 11px;
        border-radius: 12px;
    }

    .erp-driver-control-v328 > div {
        min-width: 0;
    }

    .erp-driver-control-v328 strong {
        font-size: 12.5px;
    }

    .erp-driver-control-v328 > div > span {
        margin-top: 3px;
        font-size: 10.5px;
        line-height: 1.35;
    }

    .erp-driver-control-v328 form,
    .erp-driver-control-v328 form .btn,
    .erp-driver-control-v328 .driver-route-actions-inline,
    .erp-driver-control-v328 .driver-route-actions-inline form {
        width: 100%;
    }

    .erp-driver-control-v328 .btn {
        min-height: 39px;
    }

    .erp-driver-control-v328 .driver-route-stats {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        margin-top: 7px;
    }

    .erp-driver-control-v328 .driver-route-stats span {
        padding: 5px 8px;
        font-size: 9.5px;
    }

    .erp-driver-route-list-v328,
    .erp-driver-available-grid-v328 {
        display: grid;
        gap: 10px;
    }

    .erp-driver-card-v328 {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 8px;
        padding: 11px;
        border-radius: 14px;
    }

    .erp-driver-available-card-v328 {
        display: block;
        padding: 11px;
        border-radius: 14px;
    }

    .erp-driver-card-v328 .driver-route-number {
        width: 34px;
        height: 34px;
        font-size: 17px;
    }

    .erp-driver-card-v328 .driver-route-top {
        gap: 8px;
    }

    .erp-driver-card-v328 .driver-route-top h3,
    .erp-driver-available-card-v328 h3 {
        margin-top: 4px;
        font-size: 17px;
        line-height: 1.05;
    }

    .erp-driver-card-v328 .driver-route-top p,
    .erp-driver-available-card-v328 p {
        margin-top: 3px;
        font-size: 11px;
    }

    .erp-driver-card-v328 .driver-route-address,
    .erp-driver-available-card-v328 .driver-route-address {
        margin-top: 9px;
        padding: 9px 10px;
        border-radius: 11px;
    }

    .erp-driver-card-v328 .driver-route-address strong,
    .erp-driver-available-card-v328 .driver-route-address strong {
        font-size: 11.5px;
        line-height: 1.25;
    }

    .erp-driver-card-v328 .driver-route-progress {
        margin-top: 8px;
        padding: 8px 10px;
        border-radius: 11px;
    }

    .erp-driver-card-meta-v328 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        margin-top: 8px;
    }

    .erp-driver-card-meta-v328 > div {
        min-width: 0;
        min-height: 55px;
        padding: 8px 9px;
        border-radius: 11px;
    }

    .erp-driver-available-card-v328 .erp-driver-card-meta-v328 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .erp-driver-card-meta-v328 strong {
        font-size: 10.5px;
        overflow-wrap: anywhere;
    }

    .erp-driver-card-actions-v328 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        margin-top: 9px;
    }

    .erp-driver-card-actions-v328 .btn,
    .erp-driver-card-actions-v328 form,
    .erp-driver-card-actions-v328 form .btn {
        width: 100%;
        min-width: 0;
        min-height: 39px;
    }

    .erp-driver-card-actions-v328 > :first-child {
        grid-column: 1 / -1;
    }

    .erp-driver-empty-v328 {
        min-height: 118px;
        padding: 18px 12px;
    }

    .erp-driver-empty-v328 h3 {
        font-size: 16px;
    }

    .erp-driver-empty-v328 p {
        margin-top: 5px;
        font-size: 10.5px;
    }

    .erp-driver-delivery-summary-v328 {
        gap: 9px;
        margin-bottom: 10px;
        padding: 11px;
        border-radius: 14px;
    }

    .erp-driver-delivery-summary-top-v328 {
        gap: 8px;
    }

    .erp-driver-delivery-summary-top-v328 strong {
        font-size: 17px;
    }

    .erp-driver-delivery-facts-v328 {
        grid-template-columns: minmax(0, 1.45fr) minmax(105px, 0.55fr);
        gap: 7px;
    }

    .erp-driver-delivery-facts-v328 > div {
        min-height: 64px;
        padding: 8px 9px;
        border-radius: 11px;
    }

    .erp-driver-stop-v328,
    .erp-driver-action-panel-v328,
    .erp-driver-detail-layout-v328 > .panel {
        padding: 11px;
        border-radius: 14px;
    }

    .erp-driver-stop-v328 .driver-stop-box-head {
        gap: 8px;
    }

    .erp-driver-stop-v328 .driver-stop-box-head h2 {
        font-size: 17px;
    }

    .erp-driver-stop-v328 .driver-stop-destination {
        margin-top: 9px;
        padding: 9px 10px;
        border-radius: 11px;
    }

    .erp-driver-stop-metrics-v328 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        margin-top: 9px;
    }

    .erp-driver-stop-metrics-v328 > div {
        min-height: 62px;
        padding: 8px 9px;
        border-radius: 11px;
    }

    .erp-driver-stop-actions-v328 {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
        margin-top: 9px;
    }

    .erp-driver-stop-actions-v328 .btn,
    .erp-driver-stop-actions-v328 form,
    .erp-driver-stop-actions-v328 form .btn {
        width: 100%;
        min-height: 39px;
    }

    .erp-driver-action-panel-v328 {
        margin-top: 10px;
    }

    .erp-driver-action-panel-v328 .panel-header {
        align-items: flex-start;
        gap: 7px;
    }

    .erp-driver-action-panel-v328 .panel-header h2 {
        font-size: 16px;
    }

    .erp-driver-action-panel-v328 .panel-header p,
    .erp-driver-action-panel-v328 .text-muted,
    .erp-driver-action-panel-v328 small {
        font-size: 10.5px;
        line-height: 1.4;
    }

    .erp-driver-evidence-form-v328 {
        margin-top: 10px !important;
    }

    .erp-driver-evidence-grid-v328 {
        display: grid;
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .erp-driver-evidence-grid-v328 > section,
    .erp-driver-detail-v328 .driver-comment-box {
        padding: 10px;
        border-radius: 12px;
    }

    .erp-driver-evidence-grid-v328 .form-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .erp-driver-evidence-grid-v328 textarea.form-control,
    .erp-driver-action-panel-v328 textarea.form-control {
        min-height: 76px;
    }

    .erp-driver-evidence-grid-v328 .driver-empty-preview {
        min-height: 168px;
        padding: 18px 12px;
    }

    .erp-driver-evidence-grid-v328 .dispatch-evidence-preview-frame {
        min-height: 180px;
    }

    .erp-driver-confirm-action-v328 {
        margin-top: 10px !important;
    }

    .erp-driver-detail-layout-v328 {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 10px;
    }

    .erp-driver-detail-layout-v328 .driver-load-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 8px;
        padding: 10px;
    }

    .erp-driver-detail-layout-v328 .driver-load-product strong {
        font-size: 11.5px;
    }
}

/* ========================================================================== */
/* Superadmin SaaS ERP v3.29.1                                                */
/* Basado en el dashboard administrativo aprobado, sin capas decorativas      */
/* ========================================================================== */

/* Dashboard global */

.erp-saas-reference-header-v3291 .erp-reference-title {
    overflow: visible;
}

.erp-saas-reference-kpi-grid-v3291 .kpi-companies .erp-reference-kpi-icon,
.erp-company-reference-kpi-grid-v3291 .kpi-users .erp-reference-kpi-icon {
    background: #fff1e8;
    color: var(--roder-orange);
}

.erp-saas-reference-kpi-grid-v3291 .kpi-users .erp-reference-kpi-icon {
    background: #eef2ff;
    color: #315eea;
}

.erp-saas-reference-kpi-grid-v3291 .kpi-orders .erp-reference-kpi-icon {
    background: #eaf7ff;
    color: #0284c7;
}

.erp-saas-reference-kpi-grid-v3291 .kpi-movements .erp-reference-kpi-icon,
.erp-company-reference-kpi-grid-v3291 .kpi-movements .erp-reference-kpi-icon {
    background: #ecfdf3;
    color: #15803d;
}

.erp-company-reference-kpi-grid-v3291 .kpi-warehouses .erp-reference-kpi-icon {
    background: #eef2ff;
    color: #4f46e5;
}

.erp-saas-reference-main-v3291 {
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.erp-saas-reference-main-v3291 > .panel {
    min-height: 286px;
}

.erp-saas-flow-summary-v3291 strong {
    font-size: 13px;
    line-height: 1.35;
}

.erp-saas-ecosystem-panel-v3291 {
    display: flex;
    flex-direction: column;
}

.erp-saas-company-status-v3291 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.erp-saas-company-status-v3291 > div {
    display: grid;
    min-height: 66px;
    padding: 9px 10px;
    align-content: center;
    gap: 5px;
    border: 1px solid #dfe5ee;
    border-top: 3px solid #94a3b8;
    border-radius: 9px;
    background: #fafbfd;
}

.erp-saas-company-status-v3291 > div.active {
    border-top-color: var(--roder-success);
}

.erp-saas-company-status-v3291 > div.suspended {
    border-top-color: #e7a42b;
}

.erp-saas-company-status-v3291 > div.cancelled {
    border-top-color: #d64545;
}

.erp-saas-company-status-v3291 span,
.erp-saas-capacity-v3291 span {
    color: #64748b;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.erp-saas-company-status-v3291 strong {
    color: var(--roder-navy);
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.erp-saas-capacity-v3291 {
    display: grid;
    margin-top: 10px;
    padding-top: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    border-top: 1px solid #e7ecf2;
}

.erp-saas-capacity-v3291 > div {
    display: grid;
    min-height: 52px;
    padding: 8px 9px;
    align-content: center;
    gap: 4px;
    border-radius: 8px;
    background: var(--roder-surface-soft);
}

.erp-saas-capacity-v3291 strong {
    color: var(--roder-navy);
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
}

.erp-saas-reference-lower-v3291 {
    align-items: start;
}

.erp-saas-compact-list-v3291,
.erp-company-compact-list-v3291 {
    display: grid;
    gap: 6px;
}

.erp-saas-company-row-v3291,
.erp-saas-user-row-v3291 {
    display: grid;
    min-width: 0;
    min-height: 58px;
    padding: 8px 9px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    border: 1px solid #e1e7ef;
    border-radius: 9px;
    background: #fbfcfe;
    color: inherit;
    text-decoration: none;
}

.erp-saas-company-row-v3291:hover {
    border-color: #bcc9dc;
    background: #ffffff;
}

.erp-saas-avatar-v3291,
.erp-company-row-avatar-v3291,
.erp-company-directory-avatar-v3291 {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 9px;
    background: var(--roder-navy);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.erp-saas-company-row-v3291 > div,
.erp-saas-user-row-v3291 > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.erp-saas-company-row-v3291 strong,
.erp-saas-user-row-v3291 strong {
    overflow: hidden;
    color: var(--roder-ink);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-saas-company-row-v3291 small,
.erp-saas-user-row-v3291 small {
    overflow: hidden;
    color: var(--roder-muted);
    font-size: 9.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-saas-company-row-v3291 > div > span {
    color: #718096;
    font-size: 9px;
}

.erp-saas-row-state-v3291 {
    justify-items: end;
}

.erp-saas-row-state-v3291 .erp-company-plan-pill,
.erp-saas-row-state-v3291 .erp-user-role-pill,
.erp-saas-row-state-v3291 .status-pill {
    min-height: 21px;
    padding: 4px 7px;
    font-size: 8.5px;
}

.erp-saas-activity-panel-v3291 {
    margin-top: 11px;
}

.erp-saas-activity-table-v3291 th:nth-child(1) {
    width: 18%;
}

.erp-saas-activity-table-v3291 th:nth-child(2) {
    width: 26%;
}

.erp-saas-activity-table-v3291 th:nth-child(4) {
    width: 21%;
}

.erp-saas-empty-v3291,
.erp-company-empty-v3291 {
    min-height: 112px;
}

/* Directorio de empresas */

.erp-company-filter-grid-v3291 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 0.42fr) 130px auto;
    align-items: end;
    gap: 10px;
}

.erp-company-filter-grid-v3291 .btn {
    min-height: 42px;
}

.erp-company-directory-panel-v3291 {
    margin-top: 11px;
}

.erp-company-directory-list-v3291 {
    display: grid;
    gap: 8px;
}

.erp-company-directory-row-v3291 {
    display: grid;
    min-width: 0;
    min-height: 112px;
    padding: 12px;
    grid-template-columns:
        minmax(235px, 1.3fr)
        minmax(118px, 0.55fr)
        minmax(210px, 0.8fr)
        minmax(205px, 0.9fr)
        minmax(176px, 0.7fr);
    align-items: center;
    gap: 13px;
    border: 1px solid #dce3ec;
    border-left: 4px solid #94a3b8;
    border-radius: 11px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.035);
}

.erp-company-directory-row-v3291.status-active {
    border-left-color: var(--roder-success);
}

.erp-company-directory-row-v3291.status-suspended {
    border-left-color: #e7a42b;
}

.erp-company-directory-row-v3291.status-cancelled {
    border-left-color: #d64545;
}

.erp-company-directory-identity-v3291 {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.erp-company-directory-identity-v3291 > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.erp-company-directory-identity-v3291 h3 {
    margin: 0;
    overflow: hidden;
    color: var(--roder-ink);
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-company-directory-identity-v3291 p {
    margin: 0;
    overflow: hidden;
    color: var(--roder-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-company-directory-identity-v3291 .code-pill {
    width: fit-content;
    margin-top: 2px;
}

.erp-company-directory-commercial-v3291 {
    display: grid;
    justify-items: start;
    gap: 7px;
}

.erp-company-directory-metrics-v3291 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.erp-company-directory-metrics-v3291 > div {
    display: grid;
    min-height: 50px;
    padding: 7px;
    align-content: center;
    gap: 4px;
    border-radius: 8px;
    background: var(--roder-surface-soft);
}

.erp-company-directory-metrics-v3291 span,
.erp-company-directory-contact-v3291 > span {
    color: #718096;
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.erp-company-directory-metrics-v3291 strong {
    color: var(--roder-navy);
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
}

.erp-company-directory-contact-v3291 {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.erp-company-directory-contact-v3291 strong,
.erp-company-directory-contact-v3291 small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-company-directory-contact-v3291 strong {
    color: var(--roder-ink);
    font-size: 10.5px;
}

.erp-company-directory-contact-v3291 small {
    color: var(--roder-muted);
    font-size: 10px;
}

.erp-company-directory-actions-v3291 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.erp-company-directory-actions-v3291 form {
    display: contents;
}

.erp-company-directory-actions-v3291 form .btn {
    grid-column: 1 / -1;
}

.erp-company-directory-actions-v3291 .btn {
    width: 100%;
    min-height: 34px;
    padding: 6px 8px;
}

/* Formulario de empresa */

.erp-company-form-steps-v3291 {
    display: grid;
    margin-bottom: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.erp-company-form-steps-v3291 span {
    display: flex;
    min-height: 38px;
    padding: 7px 9px;
    align-items: center;
    gap: 8px;
    border: 1px solid #dce3ec;
    border-radius: 9px;
    background: #ffffff;
    color: #53637a;
    font-size: 10.5px;
    font-weight: 800;
}

.erp-company-form-steps-v3291 strong {
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border-radius: 7px;
    background: var(--roder-navy);
    color: #ffffff;
    font-size: 10px;
}

.erp-company-form-layout-v3291 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.48fr);
    align-items: start;
    gap: 12px;
}

.erp-company-form-main-v3291 {
    display: grid;
    gap: 10px;
}

.erp-company-form-card-v3291 {
    margin: 0 !important;
}

.erp-company-form-card-v3291 .erp-form-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.erp-company-section-number-v3291 {
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    place-items: center;
    border-radius: 9px;
    background: #eef2ff;
    color: #315eea;
    font-size: 10px;
    font-weight: 900;
}

.erp-company-form-side-v3291 {
    position: sticky;
    top: 12px;
}

.erp-company-config-panel-v3291 {
    padding: 14px;
}

.erp-company-live-summary-v3291 {
    display: grid;
    gap: 7px;
}

.erp-company-live-summary-v3291 > div {
    display: grid;
    min-height: 58px;
    padding: 9px 10px;
    align-content: center;
    gap: 4px;
    border: 1px solid #e0e6ef;
    border-radius: 9px;
    background: var(--roder-surface-soft);
}

.erp-company-live-summary-v3291 span {
    color: #718096;
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.erp-company-live-summary-v3291 strong {
    color: var(--roder-navy);
    font-size: 12px;
}

.erp-company-config-note-v3291 {
    margin-top: 11px;
    padding-top: 11px;
    border-top: 1px solid #e4e9ef;
}

.erp-company-config-note-v3291 > strong {
    color: var(--roder-ink);
    font-size: 11px;
}

.erp-company-config-note-v3291 ul {
    display: grid;
    margin: 8px 0 0;
    padding: 0;
    gap: 6px;
    list-style: none;
}

.erp-company-config-note-v3291 li {
    position: relative;
    padding-left: 19px;
    color: #5e6e84;
    font-size: 10px;
    font-weight: 700;
}

.erp-company-config-note-v3291 li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--roder-success);
    font-weight: 900;
}

.erp-company-form-actions-v3291 {
    margin-top: 11px;
    padding-top: 11px;
    border-top: 1px solid #dfe5ed;
}

/* Detalle de empresa */

.erp-company-detail-header-v3291 {
    min-height: 96px;
}

.erp-company-detail-header-v3291 .erp-reference-title p {
    white-space: normal;
}

.erp-company-detail-meta-v3291 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.erp-company-reference-kpi-grid-v3291 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.erp-company-profile-layout-v3291 {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(310px, 0.6fr);
    align-items: start;
    gap: 11px;
    margin-bottom: 11px;
}

.erp-company-profile-layout-v3291 > .panel,
.erp-company-account-stack-v3291 > .panel {
    min-width: 0;
}

.erp-company-profile-grid-v3291 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.erp-company-profile-grid-v3291 > div {
    min-height: 61px;
    padding: 9px 10px;
    align-content: center;
}

.erp-company-account-stack-v3291 {
    display: grid;
    gap: 11px;
}

.erp-company-resource-grid-v3291 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.erp-company-resource-grid-v3291 > div {
    display: grid;
    min-height: 58px;
    padding: 8px 9px;
    align-content: center;
    gap: 4px;
    border-radius: 8px;
    background: var(--roder-surface-soft);
}

.erp-company-resource-grid-v3291 span {
    color: #718096;
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.erp-company-resource-grid-v3291 strong {
    color: var(--roder-navy);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.erp-company-account-actions-v3291 {
    display: grid;
    gap: 7px;
}

.erp-company-account-actions-v3291 .panel-header {
    margin-bottom: 2px;
}

.erp-company-account-actions-v3291 form {
    display: grid;
}

.erp-company-account-actions-v3291 .btn {
    width: 100%;
    min-height: 38px;
}

.erp-company-activity-grid-v3291 {
    align-items: start;
}

.erp-company-user-row-v3291 {
    display: grid;
    min-width: 0;
    min-height: 51px;
    padding: 7px 8px;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    border: 1px solid #e1e7ef;
    border-radius: 9px;
    background: #fbfcfe;
}

.erp-company-user-row-v3291 > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.erp-company-user-row-v3291 strong,
.erp-company-movement-row-v3291 strong {
    color: var(--roder-ink);
    font-size: 10.5px;
}

.erp-company-user-row-v3291 small,
.erp-company-movement-row-v3291 small {
    overflow: hidden;
    color: var(--roder-muted);
    font-size: 9.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-company-movement-row-v3291 {
    display: grid;
    min-width: 0;
    min-height: 58px;
    padding: 8px 9px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid #e1e7ef;
    border-radius: 9px;
    background: #fbfcfe;
}

.erp-company-movement-row-v3291 > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.erp-company-movement-row-v3291 > div:last-child {
    justify-items: end;
}

@media (max-width: 1180px) {
    .erp-company-reference-kpi-grid-v3291 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-company-reference-kpi-grid-v3291 .erp-reference-kpi {
        grid-column: auto;
    }

    .erp-company-directory-row-v3291 {
        grid-template-columns: minmax(230px, 1.2fr) minmax(118px, 0.55fr) minmax(210px, 0.9fr);
    }

    .erp-company-directory-contact-v3291 {
        grid-column: 1 / 3;
        padding-left: 42px;
    }

    .erp-company-directory-actions-v3291 {
        grid-column: 3;
        grid-row: 2;
    }
}

@media (max-width: 980px) {
    .erp-saas-reference-main-v3291,
    .erp-company-form-layout-v3291,
    .erp-company-profile-layout-v3291 {
        grid-template-columns: 1fr;
    }

    .erp-company-form-side-v3291 {
        position: static;
    }

    .erp-company-filter-grid-v3291 {
        grid-template-columns: minmax(0, 1fr) minmax(190px, 0.45fr) 120px;
    }

    .erp-company-filter-grid-v3291 > .btn:last-child {
        grid-column: 1 / -1;
    }

    .erp-company-directory-row-v3291 {
        grid-template-columns: minmax(0, 1.2fr) minmax(120px, 0.5fr);
    }

    .erp-company-directory-metrics-v3291,
    .erp-company-directory-contact-v3291,
    .erp-company-directory-actions-v3291 {
        grid-column: auto;
        grid-row: auto;
        padding-left: 0;
    }

    .erp-company-directory-metrics-v3291 {
        grid-column: 1 / -1;
    }

    .erp-company-directory-actions-v3291 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .erp-company-directory-actions-v3291 form .btn {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .erp-saas-company-status-v3291,
    .erp-saas-capacity-v3291 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .erp-saas-company-row-v3291,
    .erp-saas-user-row-v3291 {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .erp-saas-row-state-v3291 {
        grid-column: 2;
        grid-template-columns: repeat(2, auto);
        justify-content: start;
        justify-items: start;
    }

    .erp-company-filter-grid-v3291,
    .erp-company-form-steps-v3291,
    .erp-company-profile-grid-v3291 {
        grid-template-columns: 1fr;
    }

    .erp-company-filter-grid-v3291 > .btn:last-child {
        grid-column: auto;
    }

    .erp-company-directory-row-v3291 {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .erp-company-directory-commercial-v3291 {
        grid-template-columns: repeat(2, auto);
        align-items: center;
        justify-content: start;
    }

    .erp-company-directory-metrics-v3291,
    .erp-company-directory-actions-v3291 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .erp-company-directory-actions-v3291 {
        grid-column: auto;
    }

    .erp-company-user-row-v3291 {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .erp-company-user-row-v3291 > .status-pill {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .erp-company-reference-kpi-grid-v3291 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-company-reference-kpi-grid-v3291 .erp-reference-kpi {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    .erp-saas-company-status-v3291,
    .erp-saas-capacity-v3291,
    .erp-company-directory-metrics-v3291,
    .erp-company-directory-actions-v3291,
    .erp-company-resource-grid-v3291,
    .erp-company-reference-kpi-grid-v3291 {
        grid-template-columns: 1fr;
    }

    .erp-company-reference-kpi-grid-v3291 .erp-reference-kpi {
        grid-column: auto;
    }

    .erp-saas-company-status-v3291 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .erp-saas-capacity-v3291 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-company-directory-actions-v3291 form .btn {
        grid-column: auto;
    }

    .erp-company-form-actions-v3291 {
        display: grid;
        grid-template-columns: 1fr;
    }

    .erp-company-form-actions-v3291 .btn {
        width: 100%;
    }

    .erp-company-movement-row-v3291 {
        grid-template-columns: 1fr;
    }

    .erp-company-movement-row-v3291 > div:last-child {
        justify-items: start;
    }

    .erp-saas-activity-table-v3291 {
        min-width: 640px;
    }

    .erp-saas-activity-panel-v3291 .erp-reference-table-wrap {
        overflow-x: auto;
    }
}

/* =========================================================
   27.0 - VALORACIONES POST-ENTREGA V3.30
   ========================================================= */

.erp-rating-report-v330 {
    display: grid;
    gap: 11px;
}

.erp-rating-report-v330 .btn,
.erp-order-rating-state-v330 + .form-label ~ .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.erp-rating-header-v330 {
    margin-bottom: 0;
}

.erp-rating-kpi-grid-v330 {
    margin-bottom: 0;
}

.erp-rating-kpi-grid-v330 .erp-report-kpi-card strong small {
    margin-left: 2px;
    color: inherit;
    font-size: 11px;
    font-weight: 850;
}

.erp-rating-kpi-alert-v330 {
    border-color: #fecaca !important;
    background: #fff7f7 !important;
}

.erp-rating-kpi-alert-v330 > span,
.erp-rating-kpi-alert-v330 > strong {
    color: #b91c1c !important;
}

.erp-rating-toolbar-v330 {
    margin-bottom: 0;
}

.erp-rating-filter-grid-v330 {
    display: grid;
    grid-template-columns:
        minmax(250px, 1.35fr)
        repeat(2, minmax(125px, 0.58fr))
        repeat(3, minmax(145px, 0.7fr));
    align-items: end;
    gap: 9px;
}

.erp-rating-filter-grid-v330 > div {
    min-width: 0;
}

.erp-rating-search-v330 {
    min-width: 0;
}

.erp-rating-filter-actions-v330 {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 7px;
}

.erp-rating-filter-actions-v330 .btn {
    min-width: 122px;
}

.erp-rating-insights-grid-v330 {
    display: grid;
    grid-template-columns: minmax(270px, 0.85fr) minmax(400px, 1.3fr) minmax(250px, 0.8fr);
    align-items: stretch;
    gap: 11px;
}

.erp-rating-insight-v330 {
    min-width: 0;
    margin: 0;
}

.erp-rating-distribution-v330 {
    display: grid;
    gap: 9px;
}

.erp-rating-distribution-row-v330 {
    display: grid;
    grid-template-columns: 38px minmax(80px, 1fr) 28px 42px;
    align-items: center;
    gap: 8px;
}

.erp-rating-distribution-row-v330 > span {
    color: #a16207;
    font-size: 10px;
    font-weight: 900;
}

.erp-rating-distribution-row-v330 > strong {
    color: var(--roder-ink);
    font-size: 10px;
    text-align: right;
}

.erp-rating-distribution-row-v330 > small {
    color: var(--roder-muted);
    font-size: 9px;
    font-weight: 750;
    text-align: right;
}

.erp-rating-progress-v330 {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf1f6;
}

.erp-rating-progress-v330 span {
    display: block;
    min-width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f59e0b, var(--roder-orange));
}

.erp-rating-trend-v330 {
    display: grid;
    min-height: 170px;
    grid-template-columns: repeat(6, minmax(44px, 1fr));
    align-items: end;
    gap: 8px;
}

.erp-rating-trend-column-v330 {
    display: grid;
    min-width: 0;
    justify-items: center;
    gap: 5px;
}

.erp-rating-trend-value-v330 {
    color: var(--roder-navy);
    font-size: 10px;
    font-weight: 900;
}

.erp-rating-trend-track-v330 {
    position: relative;
    width: min(32px, 72%);
    height: 108px;
    overflow: hidden;
    border-radius: 8px 8px 4px 4px;
    background: #edf1f6;
}

.erp-rating-trend-track-v330 span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, var(--roder-orange), #fb923c);
}

.erp-rating-trend-column-v330 > strong {
    color: var(--roder-ink);
    font-size: 9px;
    white-space: nowrap;
}

.erp-rating-trend-column-v330 > small {
    color: var(--roder-muted);
    font-size: 8px;
    white-space: nowrap;
}

.erp-rating-reasons-v330 {
    display: grid;
    gap: 7px;
}

.erp-rating-reasons-v330 > div {
    display: grid;
    min-height: 35px;
    padding: 7px 9px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border: 1px solid #e0e6ee;
    border-radius: 8px;
    background: #fbfcfe;
}

.erp-rating-reasons-v330 span {
    overflow: hidden;
    color: #526177;
    font-size: 9.5px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-rating-reasons-v330 strong {
    display: inline-flex;
    min-width: 24px;
    min-height: 24px;
    padding: 3px 6px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: var(--roder-navy);
    color: #fff;
    font-size: 9px;
}

.erp-rating-small-empty-v330 {
    min-height: 120px;
}

.erp-rating-opinions-panel-v330 {
    min-width: 0;
    margin: 0;
}

.erp-rating-opinions-head-v330 {
    margin-bottom: 9px;
}

.erp-rating-opinion-list-v330 {
    display: grid;
    gap: 7px;
}

.erp-rating-opinion-v330 {
    display: grid;
    min-width: 0;
    min-height: 86px;
    padding: 9px;
    grid-template-columns: 92px 160px minmax(260px, 1fr) 128px 126px;
    align-items: center;
    gap: 10px;
    border: 1px solid #e0e6ee;
    border-radius: 9px;
    background: #fbfcfe;
}

.erp-rating-opinion-v330.needs-attention {
    border-color: #fecaca;
    background: #fffafa;
    box-shadow: inset 3px 0 0 #dc2626;
}

.erp-rating-score-v330,
.erp-rating-order-v330,
.erp-rating-meta-v330 {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.erp-rating-score-v330 strong {
    color: var(--roder-navy);
    font-size: 13px;
}

.erp-rating-score-v330 > span {
    color: #f59e0b;
    font-size: 11px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.erp-rating-score-v330 small,
.erp-rating-order-v330 small,
.erp-rating-meta-v330 small {
    color: var(--roder-muted);
    font-size: 8.5px;
}

.erp-rating-order-v330 > a,
.erp-rating-order-v330 > strong {
    overflow: hidden;
    color: var(--roder-navy);
    font-size: 10px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-rating-order-v330 > span {
    overflow: hidden;
    color: var(--roder-ink);
    font-size: 9.5px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-rating-comment-v330 {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.erp-rating-comment-v330 p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #44536a;
    font-size: 9.5px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.erp-rating-comment-v330 p > span {
    color: #8895a7;
    font-style: italic;
}

.erp-rating-comment-v330 > div {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.erp-rating-comment-v330 > div > span {
    display: inline-flex;
    min-height: 21px;
    padding: 3px 6px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8e0ea;
    border-radius: 999px;
    background: #fff;
    color: #5d6b7e;
    font-size: 7.5px;
    font-weight: 800;
    text-align: center;
}

.erp-rating-meta-v330 {
    justify-items: start;
}

.erp-rating-meta-v330 > span:first-child {
    color: var(--roder-ink);
    font-size: 9.5px;
    font-weight: 850;
}

.erp-rating-meta-v330 .status-pill {
    margin-top: 2px;
}

.erp-rating-action-v330 {
    display: grid;
    min-width: 0;
}

.erp-rating-action-v330 form {
    display: grid;
    margin: 0;
}

.erp-rating-action-v330 .btn {
    width: 100%;
    min-height: 34px;
    padding-inline: 8px;
    font-size: 8.5px;
}

.erp-rating-pagination-v330 {
    display: flex;
    margin-top: 10px;
    padding-top: 10px;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    border-top: 1px solid #e4e9ef;
}

.erp-rating-pagination-v330 > span {
    color: var(--roder-muted);
    font-size: 9px;
    font-weight: 750;
}

.erp-order-rating-state-v330 {
    display: flex;
    min-height: 48px;
    margin-bottom: 12px;
    padding: 8px 10px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #dfe5ed;
    border-radius: 9px;
    background: var(--roder-surface-soft);
}

.erp-order-rating-state-v330 > div {
    display: grid;
    gap: 3px;
}

.erp-order-rating-state-v330 > div > span {
    color: var(--roder-muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.erp-order-rating-state-v330 > div > strong {
    color: var(--roder-navy);
    font-size: 10px;
}

.erp-whatsapp-recipient-v330 {
    display: grid;
    min-width: 0;
    margin-top: 12px;
    padding: 8px 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border: 1px solid #dfe5ed;
    border-radius: 9px;
    background: #fbfcfe;
}

.erp-whatsapp-recipient-v330 > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.erp-whatsapp-recipient-v330 span {
    color: var(--roder-muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.erp-whatsapp-recipient-v330 strong {
    overflow: hidden;
    color: var(--roder-navy);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-whatsapp-recipient-v330 small {
    color: #166534;
    font-size: 9px;
    font-weight: 850;
    text-align: right;
    white-space: nowrap;
}

.erp-whatsapp-recipient-v330 small.is-missing {
    color: #b45309;
}

.erp-public-tracking-panel #publicWhatsappMessage {
    min-height: 164px;
    padding: 10px;
    line-height: 1.45;
    resize: vertical;
}

.erp-whatsapp-warning-v330 {
    display: block;
    margin-top: 8px;
    padding: 7px 8px;
    border: 1px solid #fde68a;
    border-radius: 7px;
    background: #fffbeb;
    color: #92400e;
    font-size: 9px;
    font-weight: 750;
    line-height: 1.4;
}

@media (max-width: 1250px) {
    .erp-rating-filter-grid-v330 {
        grid-template-columns: minmax(230px, 1.2fr) repeat(3, minmax(140px, 0.7fr));
    }

    .erp-rating-insights-grid-v330 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-rating-insights-grid-v330 > article:last-child {
        grid-column: 1 / -1;
    }

    .erp-rating-reasons-v330 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .erp-rating-opinion-v330 {
        grid-template-columns: 88px 145px minmax(220px, 1fr) 120px;
    }

    .erp-rating-action-v330 {
        grid-column: 4;
    }
}

@media (max-width: 900px) {
    .erp-rating-filter-grid-v330 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-rating-search-v330 {
        grid-column: 1 / -1;
    }

    .erp-rating-insights-grid-v330 {
        grid-template-columns: 1fr;
    }

    .erp-rating-insights-grid-v330 > article:last-child {
        grid-column: auto;
    }

    .erp-rating-reasons-v330 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-rating-opinion-v330 {
        grid-template-columns: 82px minmax(145px, 0.55fr) minmax(210px, 1fr);
    }

    .erp-rating-meta-v330 {
        grid-column: 2;
    }

    .erp-rating-action-v330 {
        grid-column: 3;
    }
}

@media (max-width: 620px) {
    .erp-rating-filter-grid-v330,
    .erp-rating-reasons-v330 {
        grid-template-columns: 1fr;
    }

    .erp-rating-search-v330,
    .erp-rating-filter-actions-v330 {
        grid-column: auto;
    }

    .erp-rating-filter-actions-v330 {
        display: grid;
        grid-template-columns: 1fr;
    }

    .erp-rating-filter-actions-v330 .btn {
        width: 100%;
    }

    .erp-rating-trend-v330 {
        gap: 4px;
    }

    .erp-rating-opinion-v330 {
        grid-template-columns: 78px minmax(0, 1fr);
        align-items: start;
    }

    .erp-rating-comment-v330,
    .erp-rating-meta-v330,
    .erp-rating-action-v330 {
        grid-column: 1 / -1;
    }

    .erp-rating-action-v330 {
        width: 100%;
    }

    .erp-rating-pagination-v330 {
        justify-content: space-between;
    }

    .erp-order-rating-state-v330 {
        align-items: flex-start;
        flex-direction: column;
    }

    .erp-whatsapp-recipient-v330 {
        grid-template-columns: minmax(0, 1fr);
    }

    .erp-whatsapp-recipient-v330 small {
        text-align: left;
    }
}

/* =========================================================
   PLANES Y CAPACIDAD v3.31
   Límites visibles, selección comercial y bloqueos claros
   ========================================================= */

.btn,
button.btn,
a.btn {
    display: inline-flex;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    text-align: center;
    vertical-align: middle;
}

.erp-plan-usage-v331 {
    display: grid;
    margin: 0 0 12px;
    padding: 13px 14px;
    grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border: 1px solid #dce3ec;
    border-left: 4px solid var(--roder-orange);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--roder-shadow);
}

.erp-plan-usage-head-v331 {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.erp-plan-usage-head-v331 > div {
    display: grid;
    gap: 3px;
}

.erp-plan-kicker-v331 {
    color: var(--roder-orange-dark);
    font-size: 8.5px;
    font-weight: 900;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.erp-plan-usage-head-v331 strong {
    color: var(--roder-navy);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.erp-plan-usage-head-v331 small {
    color: var(--roder-muted);
    font-size: 9.5px;
}

.erp-plan-usage-grid-v331 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.erp-plan-meter-v331 {
    display: grid;
    min-width: 0;
    padding: 9px 10px;
    gap: 6px;
    border: 1px solid #e1e7ef;
    border-radius: 9px;
    background: #f8fafc;
}

.erp-plan-meter-v331 > div:first-child {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.erp-plan-meter-v331 span,
.erp-plan-meter-v331 small {
    color: var(--roder-muted);
    font-size: 9px;
}

.erp-plan-meter-v331 > div:first-child > span {
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-plan-meter-v331 strong {
    flex: 0 0 auto;
    color: var(--roder-ink);
    font-size: 11px;
    font-weight: 900;
}

.erp-plan-progress-v331 {
    width: 100%;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #dfe6ef;
}

.erp-plan-progress-v331 > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #315eea, #0ea5e9);
}

.erp-plan-meter-v331.is-full {
    border-color: #f6c76f;
    background: #fffbeb;
}

.erp-plan-meter-v331.is-full .erp-plan-progress-v331 > span {
    background: var(--roder-warning);
}

.erp-plan-meter-v331.is-over {
    border-color: #fecaca;
    background: #fff7f7;
}

.erp-plan-meter-v331.is-over .erp-plan-progress-v331 > span {
    background: var(--roder-danger);
}

.erp-plan-action-blocked-v331 {
    display: inline-flex;
    min-height: 30px;
    padding: 5px 9px;
    align-items: center;
    justify-content: center;
    border: 1px solid #f6c76f;
    border-radius: 8px;
    background: #fffbeb;
    color: #9a5a00;
    font-size: 9px;
    font-weight: 850;
    text-align: center;
}

.erp-plan-inline-warning-v331,
.erp-plan-permission-note-v331 {
    margin-top: 9px;
    padding: 9px 11px;
    border: 1px solid #f6c76f;
    border-radius: 9px;
    background: #fffbeb;
    color: #7a4a00;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.4;
}

.erp-plan-permission-note-v331 {
    margin: 0 0 11px;
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1e4b8f;
}

.erp-plan-confirm-blocked-v331 {
    display: grid;
    max-width: 260px;
    padding: 8px 10px;
    gap: 2px;
    border: 1px solid #f6c76f;
    border-radius: 9px;
    background: #fffbeb;
}

.erp-plan-confirm-blocked-v331 strong {
    color: #8a4b00;
    font-size: 10px;
}

.erp-plan-confirm-blocked-v331 small {
    color: #9a681e;
    font-size: 9px;
}

.erp-plan-feature-note-v331 {
    display: grid;
    margin-top: 11px;
    padding: 11px 12px;
    gap: 4px;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #315eea;
    border-radius: 9px;
    background: #f4f8ff;
}

.erp-plan-feature-note-v331 strong {
    color: var(--roder-navy);
    font-size: 11px;
    font-weight: 900;
}

.erp-plan-feature-note-v331 span {
    color: #53637a;
    font-size: 10px;
    line-height: 1.45;
}

.erp-company-filter-grid-v3291 {
    grid-template-columns: minmax(0, 1fr) minmax(175px, 0.35fr) minmax(175px, 0.35fr) 110px auto;
}

.erp-company-form-steps-v3291 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.erp-plan-selector-grid-v331 {
    display: grid;
    margin-bottom: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.erp-plan-option-v331 {
    display: grid;
    min-width: 0;
    min-height: 224px;
    padding: 12px;
    align-content: start;
    gap: 5px;
    border: 1px solid #dce3ec;
    border-radius: 10px;
    background: #ffffff;
    color: var(--roder-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.erp-plan-option-v331:hover {
    border-color: #8eb2ff;
    transform: translateY(-1px);
}

.erp-plan-option-v331.is-selected {
    border-color: #315eea;
    background: #f4f7ff;
    box-shadow: 0 0 0 2px rgba(49, 94, 234, 0.12);
}

.erp-plan-option-v331 > span {
    color: var(--roder-orange-dark);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.055em;
}

.erp-plan-option-v331 > strong {
    color: var(--roder-navy);
    font-size: 12px;
    font-weight: 900;
}

.erp-plan-option-v331 > small {
    min-height: 38px;
    color: var(--roder-muted);
    font-size: 8.5px;
    line-height: 1.4;
}

.erp-plan-option-v331 > em {
    color: var(--roder-navy);
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.35;
}

.erp-plan-option-v331 ul {
    display: grid;
    margin: 2px 0 0;
    padding: 0;
    gap: 4px;
    list-style: none;
}

.erp-plan-option-v331 li {
    position: relative;
    padding-left: 14px;
    color: #53637a;
    font-size: 8.5px;
    line-height: 1.3;
}

.erp-plan-option-v331 li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--roder-success);
    font-weight: 900;
}

.erp-plan-contract-note-v331 {
    display: grid;
    margin-top: 11px;
    padding: 10px;
    gap: 3px;
    border: 1px solid #f5d3c2;
    border-radius: 9px;
    background: #fff8f4;
}

.erp-plan-contract-note-v331 strong {
    color: var(--roder-orange-dark);
    font-size: 10px;
}

.erp-plan-contract-note-v331 span,
.erp-plan-contract-note-v331 small {
    color: #6b5a50;
    font-size: 9px;
}

.erp-company-directory-metrics-v3291 small {
    color: var(--roder-muted);
    font-size: 7.5px;
    line-height: 1.2;
}

.erp-company-plan-features-v331 .panel-header {
    margin-bottom: 8px;
}

.erp-plan-core-list-v331 {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.erp-plan-core-list-v331 span {
    display: inline-flex;
    min-height: 24px;
    padding: 4px 8px;
    align-items: center;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #f0fdf4;
    color: #14783a;
    font-size: 8.5px;
    font-weight: 800;
}

.erp-plan-feature-list-v331 {
    display: grid;
    margin-top: 9px;
    gap: 6px;
}

.erp-plan-feature-list-v331 > div {
    display: grid;
    padding: 8px 9px;
    gap: 2px;
    border-radius: 8px;
    background: var(--roder-surface-soft);
}

.erp-plan-feature-list-v331 strong {
    color: var(--roder-navy);
    font-size: 9.5px;
}

.erp-plan-feature-list-v331 small,
.erp-plan-basic-note-v331 {
    color: var(--roder-muted);
    font-size: 8.5px;
    line-height: 1.4;
}

.erp-plan-basic-note-v331 {
    margin-top: 9px;
    padding: 9px;
    border-radius: 8px;
    background: #f8fafc;
}

.erp-plan-required-shell-v331 {
    display: grid;
    min-height: calc(100vh - 90px);
    place-items: center;
    padding: 24px;
}

.erp-plan-required-card-v331 {
    width: min(100%, 680px);
    padding: 26px;
    text-align: center;
}

.erp-plan-required-kicker-v331 {
    display: inline-flex;
    min-height: 25px;
    padding: 5px 9px;
    align-items: center;
    border-radius: 999px;
    background: var(--roder-orange-soft);
    color: var(--roder-orange-dark);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.erp-plan-required-card-v331 h1 {
    margin: 12px 0 5px;
    color: var(--roder-navy);
    font-size: 27px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.erp-plan-required-card-v331 > p {
    margin: 0 auto;
    max-width: 500px;
    color: var(--roder-muted);
    font-size: 12px;
    line-height: 1.5;
}

.erp-plan-required-comparison-v331 {
    display: grid;
    margin: 20px 0 13px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.erp-plan-required-comparison-v331 > div {
    display: grid;
    min-height: 92px;
    padding: 13px;
    align-content: center;
    gap: 4px;
    border: 1px solid #dce3ec;
    border-radius: 10px;
    background: #f8fafc;
}

.erp-plan-required-comparison-v331 > div.is-required {
    border-color: #8eb2ff;
    background: #f4f7ff;
}

.erp-plan-required-comparison-v331 span,
.erp-plan-required-comparison-v331 small {
    color: var(--roder-muted);
    font-size: 9px;
}

.erp-plan-required-comparison-v331 strong {
    color: var(--roder-navy);
    font-size: 14px;
    font-weight: 900;
}

.erp-plan-required-arrow-v331 {
    color: var(--roder-orange) !important;
    font-size: 20px !important;
    font-weight: 900;
}

.erp-plan-required-note-v331 {
    padding: 11px;
    border-radius: 9px;
    background: #f0fdf4;
}

.erp-plan-required-note-v331 strong {
    color: #14783a;
    font-size: 10px;
}

.erp-plan-required-note-v331 p {
    margin: 3px 0 0;
    color: #466553;
    font-size: 9.5px;
    line-height: 1.45;
}

.erp-plan-required-actions-v331 {
    display: flex;
    margin-top: 14px;
    justify-content: center;
}

.erp-plan-required-actions-v331 .btn {
    min-width: 180px;
}

@media (max-width: 1100px) {
    .erp-company-filter-grid-v3291 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-company-filter-grid-v3291 .btn {
        width: 100%;
    }

    .erp-plan-selector-grid-v331 {
        grid-template-columns: 1fr;
    }

    .erp-plan-option-v331 {
        min-height: 0;
    }
}

@media (max-width: 820px) {
    .erp-plan-usage-v331 {
        grid-template-columns: 1fr;
    }

    .erp-plan-usage-grid-v331 {
        grid-template-columns: repeat(3, minmax(145px, 1fr));
        overflow-x: auto;
    }

    .erp-company-form-steps-v3291 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .erp-plan-usage-grid-v331,
    .erp-company-filter-grid-v3291,
    .erp-company-form-steps-v3291,
    .erp-plan-required-comparison-v331 {
        grid-template-columns: 1fr;
    }

    .erp-plan-required-arrow-v331 {
        transform: rotate(90deg);
    }

    .erp-plan-required-shell-v331 {
        padding: 10px;
    }

    .erp-plan-required-card-v331 {
        padding: 18px 14px;
    }
}

/* =========================================================
   PULIDO EMPRESAS Y PERFILES DE ACCESO v3.31.1
   Directorio equilibrado, ficha ordenada y roles seguros
   ========================================================= */

.erp-company-directory-row-v3311 {
    min-height: 128px;
    padding: 14px;
    grid-template-columns:
        minmax(220px, 1.05fr)
        minmax(170px, 0.65fr)
        minmax(300px, 1.25fr)
        minmax(168px, 0.65fr);
    gap: 12px;
    border-radius: 13px;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.055);
}

.erp-company-directory-row-v3311:hover {
    border-color: #c7d3e3;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.075);
}

.erp-company-directory-commercial-v3311 {
    display: grid;
    min-width: 0;
    align-content: center;
    justify-items: stretch;
    gap: 10px;
}

.erp-company-directory-badges-v3311 {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.erp-company-directory-contact-v3311 {
    display: grid;
    min-width: 0;
    padding-top: 9px;
    gap: 3px;
    border-top: 1px solid #e6ebf2;
}

.erp-company-directory-contact-v3311 strong,
.erp-company-directory-contact-v3311 small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-company-directory-metrics-v3311 {
    align-self: stretch;
}

.erp-company-directory-metrics-v3311 > div {
    min-height: 72px;
    padding: 10px 9px;
    border: 1px solid #e4eaf2;
    background: #f8fafc;
}

.erp-company-directory-metrics-v3311 strong {
    font-size: 18px;
    line-height: 1.05;
}

.erp-company-directory-metrics-v3311 small {
    font-size: 8px;
}

.erp-company-directory-actions-v3311 {
    align-content: center;
}

.erp-company-directory-actions-v3311 .btn,
.erp-company-directory-actions-v3311 form .btn {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

.erp-company-detail-main-stack-v3311 {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 11px;
}

.erp-company-profile-panel-v3311,
.erp-company-users-panel-v3311 {
    min-width: 0;
}

.erp-company-profile-sections-v3311 {
    display: grid;
    gap: 13px;
}

.erp-company-profile-section-v3311 {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.erp-company-profile-section-v3311 + .erp-company-profile-section-v3311 {
    padding-top: 12px;
    border-top: 1px solid #e7ecf2;
}

.erp-company-profile-section-v3311 > h3 {
    margin: 0;
    color: var(--roder-navy);
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.erp-company-profile-section-v3311 .erp-company-profile-grid-v3291 {
    gap: 7px;
}

.erp-company-profile-section-v3311 .erp-company-profile-grid-v3291 > div {
    min-height: 58px;
    padding: 9px 10px;
    border: 1px solid #e3e9f1;
    background: #f8fafc;
}

.erp-company-profile-wide-v3311 {
    grid-column: 1 / -1;
}

.erp-company-users-panel-v3311 .panel-header .btn,
.erp-company-account-actions-v3291 .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.erp-company-movements-panel-v3311 {
    margin-top: 0;
}

.erp-company-movements-list-v3311 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.erp-company-movements-list-v3311 > .empty-state {
    grid-column: 1 / -1;
}

.erp-field-help-v3311 {
    display: block;
    margin-top: 6px;
    color: var(--roder-muted);
    font-size: 9.5px;
    line-height: 1.4;
}

.erp-role-profile-guide-v3311 {
    display: grid;
    margin-top: 13px;
    padding: 12px;
    gap: 9px;
    border: 1px solid #cbdcf5;
    border-left: 4px solid #315eea;
    border-radius: 11px;
    background: #f6f9ff;
}

.erp-role-profile-guide-head-v3311,
.erp-role-profile-summary-v3311 {
    display: grid;
    gap: 3px;
}

.erp-role-profile-guide-head-v3311 strong {
    color: var(--roder-navy);
    font-size: 11.5px;
    font-weight: 900;
}

.erp-role-profile-guide-head-v3311 span,
.erp-role-profile-summary-v3311 span,
.erp-role-profile-empty-v3311 {
    color: #53637a;
    font-size: 9.75px;
    line-height: 1.45;
}

.erp-role-profile-summary-v3311 {
    padding: 10px 11px;
    border: 1px solid #d9e2ef;
    border-radius: 9px;
    background: #ffffff;
}

.erp-role-profile-summary-v3311 strong {
    color: var(--roder-ink);
    font-size: 11px;
    font-weight: 900;
}

.erp-role-profile-summary-v3311[data-role-profile="admin"] {
    border-left: 4px solid var(--roder-navy);
}

.erp-role-profile-summary-v3311[data-role-profile="warehouse"] {
    border-left: 4px solid var(--roder-orange);
}

.erp-role-profile-summary-v3311[data-role-profile="driver"] {
    border-left: 4px solid var(--roder-success);
}

.erp-role-profile-empty-v3311,
.erp-role-permissions-empty-v3311 {
    padding: 10px 11px;
    border: 1px dashed #bdc9d9;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.72);
}

.erp-role-permissions-empty-v3311 {
    color: var(--roder-muted);
    font-size: 10.5px;
    font-weight: 750;
    text-align: center;
}

.erp-user-form-v325 .erp-permission-group-card[hidden],
.erp-user-form-v325 .erp-permission-check[hidden],
.erp-role-profile-summary-v3311[hidden],
.erp-role-profile-empty-v3311[hidden],
.erp-role-permissions-empty-v3311[hidden] {
    display: none !important;
}

.erp-user-form-v325 .erp-permission-check.is-plan-locked-v3311 {
    border-style: dashed;
    background: #f8fafc;
    cursor: not-allowed;
    opacity: 0.72;
}

@media (max-width: 1180px) {
    .erp-company-directory-row-v3311 {
        grid-template-columns:
            minmax(220px, 1fr)
            minmax(160px, 0.62fr)
            minmax(260px, 1.15fr);
    }

    .erp-company-directory-row-v3311 .erp-company-directory-contact-v3311 {
        grid-column: auto;
        padding-left: 0;
    }

    .erp-company-directory-actions-v3311 {
        grid-column: 1 / -1;
        grid-row: auto;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .erp-company-directory-actions-v3311 form .btn {
        grid-column: auto;
    }
}

@media (max-width: 980px) {
    .erp-company-directory-row-v3311 {
        grid-template-columns: minmax(0, 1fr) minmax(180px, 0.55fr);
    }

    .erp-company-directory-row-v3311 .erp-company-directory-metrics-v3311,
    .erp-company-directory-row-v3311 .erp-company-directory-actions-v3311 {
        grid-column: 1 / -1;
    }

    .erp-company-movements-list-v3311 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .erp-company-directory-row-v3311 {
        grid-template-columns: 1fr;
    }

    .erp-company-directory-row-v3311 .erp-company-directory-metrics-v3311,
    .erp-company-directory-row-v3311 .erp-company-directory-actions-v3311 {
        grid-column: auto;
    }

    .erp-company-directory-actions-v3311 {
        grid-template-columns: 1fr;
    }

    .erp-company-profile-wide-v3311 {
        grid-column: auto;
    }
}
.roder-pagination {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-top: 1px solid var(--roder-border);
    background: linear-gradient(180deg, var(--roder-white) 0%, var(--roder-surface-soft) 100%);
}

.roder-pagination__summary {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 9px;
    color: var(--roder-muted);
}

.roder-pagination__count {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
    font-size: 0.84rem;
    font-weight: 700;
}

.roder-pagination__count strong {
    color: var(--roder-ink);
    font-size: 0.95rem;
    font-weight: 900;
}

.roder-pagination__position {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid var(--roder-border);
    border-radius: 999px;
    background: var(--roder-white);
    color: var(--roder-muted);
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.roder-pagination__navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.roder-pagination__control,
.roder-pagination__page,
.roder-pagination__size-option,
.roder-pagination__mobile-position {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    text-decoration: none;
}

.roder-pagination__control,
.roder-pagination__page {
    min-width: 34px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--roder-border-strong);
    border-radius: 9px;
    background: var(--roder-white);
    color: var(--roder-navy);
    font-size: 0.78rem;
    font-weight: 900;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.roder-pagination__control:hover,
.roder-pagination__page:hover,
.roder-pagination__size-option:hover {
    border-color: var(--roder-navy);
    background: #eef3ff;
    color: var(--roder-navy-dark);
    transform: translateY(-1px);
}

.roder-pagination__control--first,
.roder-pagination__control--last,
.roder-pagination__page {
    padding-inline: 0;
}

.roder-pagination__page.is-current {
    pointer-events: none;
    border-color: var(--roder-navy);
    background: linear-gradient(145deg, var(--roder-navy) 0%, var(--roder-navy-dark) 100%);
    color: var(--roder-white);
    box-shadow: 0 5px 12px rgba(2, 30, 100, 0.18);
}

.roder-pagination__ellipsis {
    min-width: 22px;
    color: var(--roder-muted);
    text-align: center;
    font-size: 0.78rem;
    font-weight: 900;
}

.roder-pagination__mobile-position {
    display: none;
}

.roder-pagination__size {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.roder-pagination__size-label {
    color: var(--roder-muted);
    font-size: 0.75rem;
    font-weight: 800;
}

.roder-pagination__size-options {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--roder-border-strong);
    border-radius: 9px;
    background: var(--roder-white);
}

.roder-pagination__size-option {
    min-width: 38px;
    min-height: 32px;
    padding: 0 8px;
    border-right: 1px solid var(--roder-border);
    color: var(--roder-muted);
    font-size: 0.72rem;
    font-weight: 900;
}

.roder-pagination__size-option:last-child {
    border-right: 0;
}

.roder-pagination__size-option.is-current {
    pointer-events: none;
    background: var(--roder-navy);
    color: var(--roder-white);
}

@media (max-width: 980px) {
    .roder-pagination {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .roder-pagination__navigation {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 640px) {
    .roder-pagination {
        gap: 10px;
        padding: 10px 12px;
    }

    .roder-pagination__summary {
        gap: 4px;
    }

    .roder-pagination__position,
    .roder-pagination__control--first,
    .roder-pagination__control--last,
    .roder-pagination__page,
    .roder-pagination__ellipsis {
        display: none;
    }

    .roder-pagination__navigation {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 8px;
    }

    .roder-pagination__control--previous {
        grid-column: 1;
    }

    .roder-pagination__mobile-position {
        grid-column: 2;
        display: inline-flex;
        min-height: 34px;
        padding: 0 10px;
        border: 1px solid var(--roder-border);
        border-radius: 9px;
        background: var(--roder-white);
        color: var(--roder-ink);
        font-size: 0.72rem;
        font-weight: 900;
        white-space: nowrap;
    }

    .roder-pagination__control--next {
        grid-column: 3;
    }

    .roder-pagination__control--previous,
    .roder-pagination__control--next {
        width: 100%;
        padding-inline: 9px;
    }

    .roder-pagination__control--previous {
        justify-content: flex-start;
    }

    .roder-pagination__control--next {
        justify-content: flex-end;
    }

    .roder-pagination__size {
        gap: 6px;
    }

    .roder-pagination__size-label {
        display: none;
    }

    .roder-pagination__size-option {
        min-width: 34px;
        min-height: 30px;
        padding-inline: 6px;
    }
}

@media (max-width: 390px) {
    .roder-pagination__count span,
    .roder-pagination__control-label {
        display: none;
    }

    .roder-pagination__control--previous,
    .roder-pagination__control--next {
        justify-content: center;
    }
}

/* =========================================================
   COMUNICACIÓN CON CLIENTE v3.33
   WhatsApp primero, seguimiento resumido y opciones plegables
   ========================================================= */

.erp-customer-communication-v333 {
    margin-bottom: 12px;
    border-color: #d9e2ef;
    box-shadow: 0 10px 28px rgba(2, 30, 100, 0.08);
}

.erp-customer-communication-v333 .panel-header {
    align-items: flex-end;
}

.erp-communication-kicker-v333 {
    display: block;
    margin-bottom: 3px;
    color: var(--roder-orange-dark);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.erp-communication-mode-v333 {
    display: inline-flex;
    min-height: 30px;
    padding: 6px 10px;
    align-items: center;
    justify-content: center;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #f0fdf4;
    color: #166534;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.erp-communication-shell-v333 {
    display: grid;
    gap: 12px;
}

.erp-communication-summary-v333 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

.erp-communication-status-v333 {
    display: grid;
    min-width: 0;
    min-height: 86px;
    padding: 12px 13px;
    align-content: center;
    gap: 4px;
    border: 1px solid #dfe6ef;
    border-left: 4px solid #94a3b8;
    border-radius: 12px;
    background: #f8fafc;
}

.erp-communication-status-v333 > span {
    color: #64748b;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.erp-communication-status-v333 > strong {
    overflow: hidden;
    color: var(--roder-navy);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
}

.erp-communication-status-v333 > small {
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
}

.erp-communication-status-v333.is-success,
.erp-communication-status-v333.state-active {
    border-color: #bbf7d0;
    border-left-color: #16a34a;
    background: #f0fdf4;
}

.erp-communication-status-v333.is-success > strong,
.erp-communication-status-v333.state-active > strong {
    color: #166534;
}

.erp-communication-status-v333.is-warning,
.erp-communication-status-v333.state-revoked,
.erp-communication-status-v333.state-expired {
    border-color: #fed7aa;
    border-left-color: #f97316;
    background: #fff7ed;
}

.erp-communication-status-v333.is-warning > strong,
.erp-communication-status-v333.state-revoked > strong,
.erp-communication-status-v333.state-expired > strong {
    color: #9a3412;
}

.erp-communication-status-v333.is-pending {
    border-color: #bfdbfe;
    border-left-color: #2563eb;
    background: #eff6ff;
}

.erp-communication-status-v333.is-pending > strong {
    color: #1e40af;
}

.erp-communication-status-v333.is-muted,
.erp-communication-status-v333.state-missing {
    border-left-color: #94a3b8;
    background: #f8fafc;
}

.erp-communication-primary-v333 {
    display: grid;
    padding: 16px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border: 1px solid #123475;
    border-radius: 14px;
    background:
        linear-gradient(135deg, #021e64 0%, #0a2d75 72%, #123b86 100%);
    box-shadow: 0 10px 24px rgba(2, 30, 100, 0.16);
}

.erp-communication-primary-copy-v333 {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.erp-communication-primary-copy-v333 > span {
    color: #bfdbfe;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.erp-communication-primary-copy-v333 > strong {
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.2;
}

.erp-communication-primary-copy-v333 > p {
    max-width: 640px;
    margin: 0;
    color: #dbeafe;
    font-size: 11px;
    line-height: 1.45;
}

.erp-communication-action-buttons-v333 {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 8px;
}

.erp-communication-action-buttons-v333 .btn {
    min-width: 150px;
    min-height: 40px;
    padding: 8px 13px;
    border-radius: 9px;
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
}

.erp-whatsapp-primary-v333 {
    border: 1px solid var(--roder-orange);
    background: var(--roder-orange);
    color: #ffffff;
}

.erp-whatsapp-primary-v333:hover,
.erp-whatsapp-primary-v333:focus {
    border-color: #dc4100;
    background: #dc4100;
    color: #ffffff;
}

.erp-whatsapp-secondary-v333 {
    border: 1px solid rgba(255, 255, 255, 0.52);
    background: transparent;
    color: #ffffff;
}

.erp-whatsapp-secondary-v333:hover,
.erp-whatsapp-secondary-v333:focus {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.erp-communication-warning-v333,
.erp-communication-link-unavailable-v333 {
    padding: 10px 12px;
    border: 1px solid #fde68a;
    border-radius: 10px;
    background: #fffbeb;
    color: #92400e;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.45;
}

.erp-communication-details-grid-v333 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
    gap: 10px;
}

.erp-communication-details-v333,
.erp-communication-plan-note-v333 {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dfe6ef;
    border-radius: 12px;
    background: #ffffff;
}

.erp-communication-details-v333 > summary {
    display: flex;
    min-height: 54px;
    padding: 11px 13px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.erp-communication-details-v333 > summary::-webkit-details-marker {
    display: none;
}

.erp-communication-details-v333 > summary::after {
    content: "+";
    display: inline-flex;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--roder-navy);
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.erp-communication-details-v333[open] > summary::after {
    content: "−";
}

.erp-communication-details-v333 > summary > span {
    color: var(--roder-navy);
    font-size: 11px;
    font-weight: 900;
}

.erp-communication-details-v333 > summary > small {
    margin-left: auto;
    color: #64748b;
    font-size: 9.5px;
    font-weight: 700;
    text-align: right;
}

.erp-communication-details-v333[open] > summary {
    background: #f8fafc;
}

.erp-communication-details-body-v333 {
    padding: 13px;
    border-top: 1px solid #e5eaf1;
}

.erp-communication-details-body-v333 textarea[readonly],
.erp-communication-details-body-v333 input[readonly] {
    min-width: 0;
    background: #f8fafc;
    color: #0f172a;
    font-size: 10.5px;
    font-weight: 650;
}

.erp-communication-details-body-v333 textarea[readonly] {
    min-height: 152px;
    line-height: 1.5;
    resize: vertical;
}

.erp-customer-communication-v333 .erp-tracking-link-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.erp-customer-communication-v333 .erp-tracking-lifecycle-actions-v332 {
    justify-content: flex-start;
    margin: 12px 0 8px;
}

.erp-customer-communication-v333 .erp-tracking-lifecycle-actions-v332 .btn,
.erp-customer-communication-v333 .erp-tracking-link-row .btn {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 10px;
}

.erp-communication-regenerated-v333,
.erp-communication-expiry-note-v333 {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 9.5px;
    line-height: 1.4;
}

.erp-communication-plan-note-v333 {
    margin: 0;
    align-self: stretch;
}

.erp-communication-privacy-v333 {
    display: grid;
    padding: 11px 13px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f8fbff;
}

.erp-communication-privacy-v333 > strong {
    color: var(--roder-navy);
    font-size: 9.5px;
    font-weight: 900;
    white-space: nowrap;
}

.erp-communication-privacy-v333 > span {
    color: #64748b;
    font-size: 9.5px;
    line-height: 1.45;
}

@media (max-width: 900px) {
    .erp-communication-primary-v333 {
        grid-template-columns: 1fr;
    }

    .erp-communication-action-buttons-v333 {
        justify-content: stretch;
    }

    .erp-communication-action-buttons-v333 .btn {
        flex: 1 1 0;
    }
}

@media (max-width: 620px) {
    .erp-customer-communication-v333 .panel-header {
        align-items: flex-start;
    }

    .erp-communication-summary-v333,
    .erp-communication-details-grid-v333 {
        grid-template-columns: 1fr;
    }

    .erp-communication-primary-v333 {
        padding: 14px;
    }

    .erp-communication-action-buttons-v333 {
        display: grid;
        grid-template-columns: 1fr;
    }

    .erp-communication-action-buttons-v333 .btn,
    .erp-customer-communication-v333 .erp-tracking-link-row .btn,
    .erp-customer-communication-v333 .erp-tracking-lifecycle-actions-v332 form,
    .erp-customer-communication-v333 .erp-tracking-lifecycle-actions-v332 .btn {
        width: 100%;
    }

    .erp-customer-communication-v333 .erp-tracking-link-row {
        grid-template-columns: 1fr;
    }

    .erp-customer-communication-v333 .erp-tracking-lifecycle-actions-v332 {
        align-items: stretch;
        flex-direction: column;
    }

    .erp-communication-details-v333 > summary {
        align-items: flex-start;
    }

    .erp-communication-details-v333 > summary > small {
        display: none;
    }

    .erp-communication-privacy-v333 {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   RODER CLOUD v3.34 — PUESTA EN MARCHA E IMPORTADORES
   ========================================================= */

.erp-onboarding-header-v334,
.erp-import-header-v334 {
    align-items: flex-end;
}

.erp-onboarding-eyebrow-v334 {
    display: block;
    margin-bottom: 7px;
    color: var(--roder-orange);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.erp-onboarding-progress-v334 {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.erp-onboarding-progress-copy-v334 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.erp-onboarding-progress-copy-v334 > div {
    display: grid;
    gap: 3px;
}

.erp-onboarding-progress-copy-v334 span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.erp-onboarding-progress-copy-v334 strong {
    color: var(--roder-navy);
}

.erp-onboarding-progress-value-v334 {
    font-size: 28px;
    font-weight: 900;
}

.erp-onboarding-progress-track-v334 {
    height: 11px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef7;
}

.erp-onboarding-progress-track-v334 > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--roder-orange), #ff8a42);
}

.erp-onboarding-progress-v334 > p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
}

.erp-onboarding-progress-v334 > .erp-onboarding-complete-v334 {
    color: #166534;
    font-weight: 800;
}

.erp-onboarding-step-grid-v334 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.erp-onboarding-step-v334 {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    min-height: 220px;
    border: 1px solid #e2e8f0;
}

.erp-onboarding-step-v334.is-complete {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #ffffff, #f7fff9);
}

.erp-onboarding-step-status-v334 {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 7px;
}

.erp-onboarding-step-status-v334 > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e8eef7;
    color: var(--roder-navy);
    font-size: 14px;
    font-weight: 900;
}

.erp-onboarding-step-v334.is-complete .erp-onboarding-step-status-v334 > span {
    background: #dcfce7;
    color: #166534;
}

.erp-onboarding-step-status-v334 small {
    color: #64748b;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
}

.erp-onboarding-step-copy-v334 {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.erp-onboarding-step-copy-v334 h2 {
    margin: 0 0 7px;
    color: var(--roder-navy);
    font-size: 16px;
    font-weight: 900;
}

.erp-onboarding-step-copy-v334 p {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.55;
}

.erp-onboarding-step-copy-v334 strong {
    margin-top: auto;
    color: #334155;
    font-size: 12px;
}

.erp-onboarding-step-v334 > .btn,
.erp-onboarding-managed-v334 {
    grid-column: 1 / -1;
    align-self: end;
    min-height: 36px;
}

.erp-onboarding-managed-v334 {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.erp-onboarding-imports-v334 {
    margin-bottom: 18px;
}

.erp-onboarding-history-v334 {
    margin-bottom: 18px;
}

.erp-onboarding-history-table-v334 {
    margin: 0;
    font-size: 11px;
}

.erp-onboarding-history-table-v334 strong {
    color: var(--roder-navy);
    font-weight: 900;
}

.erp-onboarding-import-grid-v334 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.erp-onboarding-import-grid-v334 article {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    min-height: 185px;
    padding: 18px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}

.erp-onboarding-import-label-v334 {
    margin-bottom: 8px;
    color: var(--roder-orange);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.erp-onboarding-import-grid-v334 h3 {
    margin: 0 0 7px;
    color: var(--roder-navy);
    font-size: 17px;
    font-weight: 900;
}

.erp-onboarding-import-grid-v334 p {
    margin: 0 0 15px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.55;
}

.erp-onboarding-import-grid-v334 .btn {
    margin-top: auto;
}

.erp-import-guide-grid-v334 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.erp-import-guide-v334 {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 13px;
    min-height: 155px;
}

.erp-import-step-number-v334 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--roder-navy);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.erp-import-guide-v334 h2 {
    margin: 2px 0 7px;
    color: var(--roder-navy);
    font-size: 15px;
    font-weight: 900;
}

.erp-import-guide-v334 p {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.5;
}

.erp-import-upload-v334,
.erp-import-result-v334 {
    margin-bottom: 18px;
}

.erp-import-upload-form-v334 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 16px;
}

.erp-import-upload-form-v334 .form-text {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 10.5px;
}

.erp-import-field-error-v334 {
    margin-top: 7px;
    color: #b91c1c;
    font-size: 11px;
    font-weight: 800;
}

.erp-import-result-v334.is-ready {
    border-color: #bbf7d0;
}

.erp-import-result-v334.has-errors {
    border-color: #fecaca;
}

.erp-import-result-heading-v334 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.erp-import-result-heading-v334 > div:first-child > span {
    color: var(--roder-orange);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.erp-import-result-heading-v334 h2 {
    margin: 5px 0 5px;
    color: var(--roder-navy);
    font-size: 18px;
    font-weight: 900;
}

.erp-import-result-heading-v334 p {
    margin: 0;
    color: #64748b;
    font-size: 11.5px;
}

.erp-import-summary-v334 {
    display: grid;
    grid-template-columns: repeat(3, minmax(82px, 1fr));
    gap: 8px;
}

.erp-import-summary-v334 > div {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    text-align: center;
}

.erp-import-summary-v334 span {
    color: #64748b;
    font-size: 9.5px;
    font-weight: 800;
}

.erp-import-summary-v334 strong {
    color: var(--roder-navy);
    font-size: 18px;
    font-weight: 900;
}

.erp-import-preview-wrap-v334 {
    max-height: 520px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.erp-import-preview-table-v334 {
    margin: 0;
    font-size: 10.5px;
}

.erp-import-preview-table-v334 thead {
    position: sticky;
    z-index: 1;
    top: 0;
}

.erp-import-preview-table-v334 th {
    white-space: nowrap;
}

.erp-import-preview-table-v334 tr.has-errors > td {
    background: #fff7f7;
}

.erp-import-error-list-v334 {
    display: grid;
    gap: 3px;
    min-width: 210px;
    margin: 0;
    padding-left: 16px;
    color: #b91c1c;
    font-size: 10px;
    font-weight: 700;
}

.erp-import-confirm-v334 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #bbf7d0;
    border-radius: 11px;
    background: #f0fdf4;
}

.erp-import-confirm-v334 > div {
    display: grid;
    gap: 3px;
}

.erp-import-confirm-v334 strong {
    color: #166534;
    font-size: 12px;
}

.erp-import-confirm-v334 small {
    color: #64748b;
    font-size: 10.5px;
}

.erp-onboarding-step-v334 .btn,
.erp-onboarding-import-grid-v334 .btn,
.erp-import-guide-v334 .btn,
.erp-import-upload-form-v334 .btn,
.erp-import-confirm-v334 .btn,
.erp-import-header-v334 .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (max-width: 1100px) {
    .erp-onboarding-step-grid-v334,
    .erp-import-guide-grid-v334 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .erp-onboarding-step-grid-v334,
    .erp-onboarding-import-grid-v334,
    .erp-import-guide-grid-v334,
    .erp-import-upload-form-v334 {
        grid-template-columns: 1fr;
    }

    .erp-import-result-heading-v334,
    .erp-import-confirm-v334 {
        align-items: stretch;
        flex-direction: column;
    }

    .erp-import-summary-v334 {
        width: 100%;
    }

    .erp-import-upload-form-v334 .btn,
    .erp-import-confirm-v334 .btn,
    .erp-onboarding-import-grid-v334 .btn {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .erp-onboarding-progress-copy-v334 {
        align-items: flex-start;
        flex-direction: column;
    }

    .erp-import-summary-v334 {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   AISLAMIENTO MULTIEMPRESA Y PULIDO VISUAL v3.37
   Contexto explícito por empresa y acciones realmente centradas
   ========================================================= */

.btn,
button.btn,
a.btn,
.erp-primary-action {
    display: inline-flex !important;
    box-sizing: border-box;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle;
    line-height: 1.2 !important;
}

.erp-import-upload-form-v334 > .btn {
    min-height: 38px;
    align-self: end;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    white-space: nowrap;
}

.erp-company-filter-form-v337 {
    display: grid !important;
    width: 100%;
    margin: 0 !important;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
    align-items: end !important;
    gap: 14px !important;
}

.erp-company-filter-form-v337 > * {
    width: 100%;
    min-width: 0;
    grid-column: auto !important;
}

.erp-company-filter-form-v337 .btn,
.erp-company-scope-form-v337 .btn {
    min-height: 38px;
}

.erp-company-filter-field-v337 {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.erp-company-filter-field-v337 .form-label {
    margin: 0;
}

.erp-company-filter-error-v337 {
    color: #b91c1c;
    font-size: 10px;
    font-weight: 800;
}

.erp-company-scope-form-v337 {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 12px;
}

.erp-company-scope-form-v337 .erp-company-filter-field-v337 {
    width: min(320px, 100%);
}

.erp-company-scope-actions-v337 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.erp-company-col-v337 {
    width: 13%;
}

.erp-company-name-v337,
.erp-company-mobile-v337 {
    color: var(--roder-navy);
    font-size: 10.5px;
    font-weight: 900;
}

.erp-company-mobile-v337 {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    padding: 4px 8px;
    border: 1px solid #dbe3ec;
    border-radius: 999px;
    background: #f8fafc;
}

@media (max-width: 760px) {
    .erp-company-filter-form-v337 {
        grid-template-columns: 1fr !important;
    }

    .erp-company-filter-form-v337 .btn,
    .erp-company-filter-form-v337 a.btn {
        width: 100%;
    }

    .erp-company-scope-form-v337 {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .erp-company-scope-form-v337 .erp-company-filter-field-v337 {
        width: 100%;
    }

    .erp-company-scope-actions-v337 {
        display: grid;
        grid-template-columns: 1fr;
    }

    .erp-company-scope-actions-v337 .btn {
        width: 100%;
    }
}

/* =========================================================
   PULIDO CAPACIDAD COMERCIAL v3.40.0
   ========================================================= */

.erp-plan-option-v331 .erp-plan-capacity-line-v340 {
    display: block;
    width: 100%;
    line-height: 1.35;
}

.erp-plan-option-v331 .erp-plan-capacity-line-v340
+ .erp-plan-capacity-line-v340 {
    margin-top: 3px;
}

.erp-plan-capacity-guide-v340 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
    align-items: start;
    margin: 14px 0 18px;
}

.erp-plan-capacity-guide-v340 > strong {
    grid-column: 1 / -1;
}

.erp-plan-capacity-guide-v340 > span {
    line-height: 1.5;
}

@media (max-width: 760px) {
    .erp-plan-capacity-guide-v340 {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .erp-plan-capacity-guide-v340 > strong {
        grid-column: auto;
    }
}

/* =========================================================
   CONSISTENCIA VISUAL Y GEOGRÁFICA v3.40.9
   Capacidad sin cajas anidadas y formularios compactos
   ========================================================= */

.erp-plan-usage-v331 {
    padding: 12px 16px;
    border: 0;
    border-left: 3px solid var(--roder-orange);
    border-radius: 10px;
    background: linear-gradient(90deg, #fff 0%, #f8fafc 100%);
    box-shadow: none;
}

.erp-plan-usage-grid-v331 {
    gap: 0;
}

.erp-plan-meter-v331 {
    padding: 4px 14px;
    border: 0;
    border-left: 1px solid #e2e8f0;
    border-radius: 0;
    background: transparent;
}

.erp-plan-meter-v331:first-child {
    border-left: 0;
}

.erp-plan-meter-v331.is-full,
.erp-plan-meter-v331.is-over {
    border-radius: 7px;
}

.erp-warehouse-address-field-v3409,
.erp-warehouse-city-field-v3409 {
    min-width: 0;
}

.erp-warehouse-back-button-v323 {
    width: auto !important;
    min-width: 0 !important;
    padding-inline: 14px !important;
    gap: 7px;
}

@media (max-width: 820px) {
    .erp-plan-usage-v331 {
        gap: 10px;
    }

    .erp-plan-usage-grid-v331 {
        display: grid;
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .erp-plan-meter-v331,
    .erp-plan-meter-v331:first-child {
        padding: 8px 0;
        border-left: 0;
        border-top: 1px solid #e2e8f0;
    }

    .erp-warehouse-form-page-header-v323 .erp-page-actions {
        width: auto;
        align-self: flex-start;
    }
}
