:root {
    --cspc-navy: #28256f;
    --cspc-navy-dark: #1c1d57;
    --cspc-blue: #229bd7;
    --cspc-sky: #5bbbea;
    --cspc-gold: #e5b800;
    --cspc-gold-light: #ffd51d;
    --cspc-beige: #e5e0d5;
    --cspc-slate: #8793a9;
    --cspc-bg: #f4f6fa;
    --cspc-text: #17223a;
    --cspc-muted: #667085;
    --cspc-border: #dbe1ea;
    --cspc-white: #fff;
    --cspc-success: #137a4a;
    --cspc-danger: #b42318;
    --cspc-shadow: 0 12px 34px rgba(8, 45, 104, .08);
}

/* === 4.3.2 · correo, contactos y membrete Carta ======================= */
.cspc-contact-layout{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:20px;align-items:start}.cspc-mail-account{min-width:0;padding:18px;border:1px solid #d8dee9;border-radius:10px}.cspc-mail-account legend{padding:0 8px;color:#08264c;font-weight:800}.cspc-mail-tabs{display:flex;gap:10px;margin-bottom:16px}.cspc-mail-message{white-space:pre-wrap;line-height:1.6}.cspc-internal-signature img{width:145px!important;height:58px!important;margin:0 0 -5px!important;object-fit:contain;object-position:left center}
@media(max-width:900px){.cspc-contact-layout{grid-template-columns:1fr}}
@page cspcInternalDocument{size:Letter portrait;margin:0}
@media print{
  .cspc-internal-document-sheet{page:cspcInternalDocument;width:215.9mm!important;max-width:215.9mm!important;min-height:279.4mm!important;height:279.4mm!important;margin:0!important;padding:12mm 14mm 8mm!important;box-shadow:none!important;overflow:hidden!important;break-after:avoid!important;page-break-after:avoid!important}
  .cspc-internal-document-sheet>footer{margin-top:auto!important}
}

* { box-sizing: border-box; }
html { background: var(--cspc-bg); }
body.cspc-system-page {
    margin: 0;
    color: var(--cspc-text);
    background: var(--cspc-bg);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}
body.cspc-system-page a { color: inherit; }
body.cspc-system-page button,
body.cspc-system-page input,
body.cspc-system-page select,
body.cspc-system-page textarea { font: inherit; }

.cspc-app { min-height: 100vh; display: flex; flex-direction: column; }
.cspc-topbar {
    min-height: 68px;
    padding: 7px clamp(18px, 4vw, 64px);
    background: linear-gradient(90deg, #fff 0%, #f2faff 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.cspc-brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.cspc-brand > span:last-child { display: flex; flex-direction: column; }
.cspc-brand strong { color: var(--cspc-navy); font-size: 17px; letter-spacing: .01em; }
.cspc-brand small { color: var(--cspc-muted); }
.cspc-userbox { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.cspc-userbox span { font-weight: 700; }
.cspc-userbox a { color: var(--cspc-navy); font-weight: 700; text-decoration: none; }
.cspc-userbox .cspc-topbar-tool { min-height: 38px; padding: 8px 11px; display: inline-flex; align-items: center; gap: 6px; color: #fff; background: var(--cspc-navy); border-radius: 9px; }
.cspc-userbox .cspc-topbar-tool .dashicons { width: 17px; height: 17px; font-size: 17px; }

.cspc-logo-lockup { display: inline-flex; align-items: center; gap: 8px; }
.cspc-logo-lockup img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cspc-logo-dorminova, .cspc-logo-sanpablo, .cspc-logo-factory { display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.cspc-logo-sanpablo { background: transparent; padding: 0; }
.cspc-logo-small .cspc-logo-sanpablo { width: 102px; height: 62px; }
.cspc-logo-small .cspc-logo-dorminova { width: 78px; height: 40px; }
.cspc-logo-small .cspc-logo-factory { width: 118px; height: 42px; }
.cspc-logo-large .cspc-logo-sanpablo { width: min(250px, 50vw); height: 153px; }
.cspc-logo-large .cspc-logo-dorminova { width: min(190px, 30vw); height: 100px; }
.cspc-logo-large .cspc-logo-factory { width: min(260px, 42vw); height: 100px; }

.cspc-brand-strip, .cspc-print-strip { display: grid; grid-template-columns: repeat(5, 1fr); height: 8px; }
.cspc-brand-strip i:nth-child(1), .cspc-print-strip i:nth-child(1) { background: var(--cspc-navy); }
.cspc-brand-strip i:nth-child(2), .cspc-print-strip i:nth-child(2) { background: var(--cspc-gold); }
.cspc-brand-strip i:nth-child(3), .cspc-print-strip i:nth-child(3) { background: var(--cspc-beige); }
.cspc-brand-strip i:nth-child(4), .cspc-print-strip i:nth-child(4) { background: var(--cspc-slate); }
.cspc-brand-strip i:nth-child(5), .cspc-print-strip i:nth-child(5) { background: var(--cspc-navy); }

.cspc-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    overflow: visible;
    padding: 0 clamp(18px, 4vw, 64px);
    background: var(--cspc-navy-dark);
    color: #fff;
}
.cspc-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 15px 17px 13px; border-bottom: 3px solid transparent; text-decoration: none; white-space: nowrap; opacity: .78; }
.cspc-nav a:hover, .cspc-nav a.is-active { opacity: 1; background: rgba(255,255,255,.06); border-bottom-color: var(--cspc-gold-light); }
.cspc-nav .dashicons { width: 18px; height: 18px; font-size: 18px; }
.cspc-nav a.cspc-nav-admin { opacity: 1; color: #fff; background: rgba(194,154,68,.20); border-bottom-color: rgba(224,197,128,.55); }
.cspc-nav a.cspc-nav-admin:hover, .cspc-nav a.cspc-nav-admin.is-active { background: var(--cspc-gold); border-bottom-color: var(--cspc-gold-light); }

.cspc-main { width: calc(100% - 24px); max-width: none; margin: 0 auto; padding: 26px 0 50px; flex: 1; }
@media (min-width: 1500px) { .cspc-main { width: calc(100% - 18px); } }
.cspc-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 24px; }
.cspc-page-head h1 { margin: 2px 0 4px; color: var(--cspc-navy); font-size: clamp(27px, 3vw, 38px); line-height: 1.1; }
.cspc-page-head p { margin: 0; color: var(--cspc-muted); }
.cspc-eyebrow { margin: 0; color: var(--cspc-gold) !important; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.cspc-head-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.cspc-inline-action { display: inline-flex; align-items: center; gap: 7px; }
.cspc-inline-action select { min-height: 42px; padding: 8px 10px; border: 1px solid var(--cspc-border); border-radius: 9px; background: #fff; }

.cspc-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 750;
    line-height: 1.15;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.cspc-button:hover { transform: translateY(-1px); }
.cspc-button-primary { color: #fff !important; background: var(--cspc-navy); box-shadow: 0 5px 14px rgba(8,45,104,.18); }
.cspc-button-primary:hover { background: var(--cspc-blue); }
.cspc-button-quiet { color: var(--cspc-navy) !important; background: #fff; border-color: var(--cspc-border); }
.cspc-button-danger { color: var(--cspc-danger) !important; background: #fff3f2; border-color: #f5c5c0; }
.cspc-button-return { color: #fff !important; background: #16806a; box-shadow: 0 5px 14px rgba(22,128,106,.18); }
.cspc-button-return:hover { background: #0f6958; }
.cspc-button-load { color: #fff !important; background: #137a4a; border-color: #137a4a; box-shadow: 0 5px 14px rgba(19,122,74,.18); }
.cspc-button-load:hover { background: #0f623c; }
.cspc-button-small { min-height: 34px; padding: 7px 11px; font-size: 12px; white-space: nowrap; }

.cspc-notice { margin: 0 0 20px; padding: 13px 16px; border: 1px solid; border-radius: 10px; font-weight: 650; }
.cspc-notice-success { color: #0d623a; background: #eaf8f1; border-color: #a9dfc3; }
.cspc-notice-error { color: #8e1b13; background: #fff0ef; border-color: #f0b5b0; }

.cspc-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 22px; }
.cspc-stat { min-height: 118px; padding: 22px; border: 1px solid var(--cspc-border); border-radius: 14px; background: #fff; box-shadow: var(--cspc-shadow); display: flex; align-items: center; gap: 18px; }
.cspc-stat > .dashicons { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; }
.cspc-stat div { display: flex; flex-direction: column; }
.cspc-stat strong { font-size: 29px; line-height: 1.05; color: var(--cspc-navy); }
.cspc-stat small { margin-top: 5px; color: var(--cspc-muted); }
.cspc-stat-blue > .dashicons { color: #176ca2; background: #e9f5fc; }
.cspc-stat-gold > .dashicons { color: #87610b; background: #fbf3db; }
.cspc-stat-slate > .dashicons { color: #53617b; background: #eef0f4; }
.cspc-stat-navy > .dashicons { color: #fff; background: var(--cspc-navy); }
.cspc-stat-red { border-color: #efaaa4; background: #fff5f4; }
.cspc-stat-red > .dashicons { color: #fff; background: var(--cspc-danger); }
.cspc-stat-red strong, .cspc-stat-red small { color: #8e1b13; }

.cspc-panel { margin-bottom: 22px; padding: 22px; border: 1px solid var(--cspc-border); border-radius: 14px; background: #fff; box-shadow: var(--cspc-shadow); }
.cspc-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.cspc-panel-head h2 { margin: 0; color: var(--cspc-navy); font-size: 20px; }
.cspc-panel-head p { margin: 3px 0 0; color: var(--cspc-muted); }
.cspc-panel-head > a { color: var(--cspc-blue); font-weight: 700; text-decoration: none; }

.cspc-table-wrap { width: 100%; overflow-x: auto; }
.cspc-data-table { width: 100%; border-collapse: collapse; }
.cspc-data-table th { padding: 10px 12px; color: #5f6b7d; background: #f6f8fb; border-bottom: 1px solid var(--cspc-border); font-size: 11px; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.cspc-data-table td { padding: 13px 12px; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
.cspc-data-table tbody tr:last-child td { border-bottom: 0; }
.cspc-data-table tbody tr:hover { background: #fafbfd; }
.cspc-data-table td small { display: block; margin-top: 3px; color: var(--cspc-muted); }
.cspc-row-link { display: inline-block; padding: 6px 10px; color: var(--cspc-navy) !important; border: 1px solid var(--cspc-border); border-radius: 7px; font-weight: 750; text-decoration: none; }
.cspc-row-actions { display: flex; align-items: center; gap: 6px; }
.cspc-row-link-return { color: #0f6958 !important; border-color: #9fd3c7; background: #effaf7; }
.cspc-archive-inline { display: inline-flex; margin: 0; }
.cspc-row-link-archive { appearance: none; background: #f7f9fc; cursor: pointer; font: inherit; font-size: 12px; line-height: 1.2; }

.cspc-status { display: inline-flex; align-items: center; justify-content: center; min-height: 29px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.cspc-status-draft { color: #596274; background: #edf0f4; }
.cspc-status-prepared { color: #6e4c03; background: #fbefc7; }
.cspc-status-reviewed { color: #125b87; background: #e2f2fb; }
.cspc-status-dispatched { color: #1b4c90; background: #e8effb; }
.cspc-status-finalized { color: #0e6840; background: #e4f7ed; }
.cspc-status-cancelled { color: #961f16; background: #fde9e7; }
.cspc-route-open-load { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 12px 0; }
.cspc-status-pending, .cspc-status-production, .cspc-status-draft { color: #6e4c03; background: #fbefc7; }
.cspc-status-ready, .cspc-status-scheduled, .cspc-status-sent { color: #125b87; background: #e2f2fb; }
.cspc-status-ready_for_load { color: #0e6840; background: #ddf6e9; }
.cspc-status-loaded, .cspc-status-converted { color: #293d7a; background: #e9edfb; }
.cspc-status-delivered, .cspc-status-accepted { color: #0e6840; background: #e4f7ed; }
.cspc-status-pending_later, .cspc-status-expired { color: #76520b; background: #fff0c9; }
.cspc-status-returned, .cspc-status-rejected { color: #961f16; background: #fde9e7; }
.cspc-status-partial_delivery { color: #7a4b00; background: #fff0c9; }

.cspc-form-section { padding: 26px; }
.cspc-section-title { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.cspc-section-title > span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--cspc-navy); font-weight: 800; }
.cspc-section-title h2 { margin: 0; color: var(--cspc-navy); font-size: 20px; }
.cspc-section-title p { margin: 2px 0 0; color: var(--cspc-muted); }
.cspc-field-grid { display: grid; gap: 16px; }
.cspc-field-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cspc-span-2 { grid-column: span 2; }
.cspc-span-3 { grid-column: span 3; }
.cspc-span-4 { grid-column: 1 / -1; }
.cspc-form label, .cspc-filter label, .cspc-create-user label, .cspc-catalog-form label, .cspc-block-label { display: flex; flex-direction: column; gap: 6px; color: #344054; font-size: 13px; font-weight: 750; }
.cspc-form label b { color: var(--cspc-danger); }
.cspc-form input, .cspc-form select, .cspc-form textarea,
.cspc-filter input, .cspc-filter select,
.cspc-create-user input, .cspc-create-user select,
.cspc-catalog-form input, .cspc-returns input, .cspc-returns select, .cspc-returns textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    color: var(--cspc-text);
    background: #fff;
    border: 1px solid #cfd6e2;
    border-radius: 8px;
    outline: none;
}
.cspc-form textarea, .cspc-returns textarea { min-height: 86px; resize: vertical; }
.cspc-form input:focus, .cspc-form select:focus, .cspc-form textarea:focus,
.cspc-filter input:focus, .cspc-filter select:focus { border-color: var(--cspc-blue); box-shadow: 0 0 0 3px rgba(10,86,137,.12); }

.cspc-item-table-wrap { overflow-x: auto; }
.cspc-item-table { width: 100%; min-width: 1900px; border-collapse: collapse; }
.cspc-item-table th { padding: 8px 7px; color: #526071; background: #f5f7fa; font-size: 11px; text-align: left; text-transform: uppercase; }
.cspc-item-table th small { display: block; margin-top: 2px; color: #137a4a; font-size: 9px; letter-spacing: .04em; }
.cspc-item-table td { padding: 6px 5px; border-bottom: 1px solid #edf0f4; }
.cspc-item-table th:nth-child(1), .cspc-item-table td:nth-child(1) { width: 72px; }
.cspc-item-table th:nth-child(2), .cspc-item-table td:nth-child(2) { width: 270px; }
.cspc-item-table th:nth-child(3), .cspc-item-table td:nth-child(3) { width: 130px; }
.cspc-item-table th:nth-child(4), .cspc-item-table td:nth-child(4) { min-width: 220px; }
.cspc-item-table th:nth-child(5), .cspc-item-table td:nth-child(5) { width: 130px; }
.cspc-item-table th:nth-child(6), .cspc-item-table td:nth-child(6) { width: 140px; }
.cspc-item-table th:nth-child(7), .cspc-item-table td:nth-child(7) { width: 125px; }
.cspc-item-table th:nth-child(8), .cspc-item-table td:nth-child(8) { width: 155px; }
.cspc-item-table th:nth-child(9), .cspc-item-table td:nth-child(9) { width: 125px; }
.cspc-item-table th:nth-child(10), .cspc-item-table td:nth-child(10) { width: 125px; }
.cspc-item-table th:last-child, .cspc-item-table td:last-child { width: 42px; }
.cspc-item-table input, .cspc-item-table select { min-height: 38px; padding: 7px 8px; }
.cspc-item-table input[data-price] { color: #0d623a; background: #f5fff9; border-color: #acd9c2; font-weight: 800; }
.cspc-item-table [data-line-discount-amount] { display: block; margin-top: 4px; color: var(--cspc-danger); font-size: 11px; font-weight: 750; }
#cspc-items-table { min-width: 1500px; table-layout: fixed; }
#cspc-items-table th:nth-child(4), #cspc-items-table td:nth-child(4) { width: 145px; min-width: 145px; max-width: 145px; }
#cspc-items-table .cspc-description { width: 100%; }
.cspc-remove-row { width: 32px; height: 32px; color: #a3261d; background: #fff1f0; border: 0; border-radius: 7px; cursor: pointer; font-size: 22px; line-height: 1; }
.cspc-items-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 16px; }
.cspc-items-actions > div { display: flex; gap: 16px; color: var(--cspc-muted); }
.cspc-items-actions strong { color: var(--cspc-navy); }
.cspc-form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin: 16px 0 8px; }
.cspc-conversion-panel { border-left: 5px solid var(--cspc-blue); }
.cspc-conversion-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cspc-conversion-panel > small { display: block; margin-top: 12px; color: var(--cspc-muted); }
.cspc-load-queue { border: 2px solid #9bd8bb; background: #f8fffb; }
.cspc-load-queue .cspc-panel-head > strong { color: #0e6840; }
.cspc-route-preselected { background: #ebfff4 !important; outline: 2px solid #82cda7; outline-offset: -2px; }

.cspc-filter { display: grid; grid-template-columns: 1.6fr repeat(5, 1fr); gap: 12px; align-items: end; margin-bottom: 20px; padding: 18px; border: 1px solid var(--cspc-border); border-radius: 12px; background: #fff; }
.cspc-filter-short { grid-template-columns: 190px 190px auto; justify-content: start; }
.cspc-filter-actions { display: flex; gap: 7px; }
.cspc-pagination { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 18px; }
.cspc-pagination a { min-width: 34px; height: 34px; padding: 6px; display: grid; place-items: center; border: 1px solid var(--cspc-border); border-radius: 7px; text-decoration: none; }
.cspc-pagination a.is-current { color: #fff; background: var(--cspc-navy); border-color: var(--cspc-navy); }
.cspc-empty { padding: 44px 20px; text-align: center; color: var(--cspc-muted); }
.cspc-empty .dashicons { width: 46px; height: 46px; color: var(--cspc-slate); font-size: 46px; }
.cspc-empty h3 { margin: 10px 0 3px; color: var(--cspc-navy); }
.cspc-empty p { margin: 0; }

.cspc-status-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 20px; padding: 12px 14px; border: 1px solid var(--cspc-border); border-radius: 11px; background: #fff; }
.cspc-status-actions form { margin: 0; }
.cspc-status-actions > .cspc-status { margin-right: auto; }

.cspc-print-sheet { width: 8.5in; min-height: 11in; margin: 0 auto 24px; padding: .3in .34in .24in; display: flex; flex-direction: column; color: #111827; background: #fff; box-shadow: 0 6px 34px rgba(0,0,0,.12); }
.cspc-print-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cspc-print-company { display: flex; flex-direction: column; font-size: 10.5px; font-style: italic; font-weight: 650; line-height: 1.35; }
.cspc-print-company h2 { margin: 0 0 5px; color: var(--cspc-navy); font-size: 16px; font-style: normal; letter-spacing: .02em; }
.cspc-print-company strong { font-size: 12px; }
.cspc-logo-print .cspc-logo-sanpablo { width: 112px; height: 69px; }
.cspc-logo-print .cspc-logo-dorminova { width: 94px; height: 42px; }
.cspc-logo-print .cspc-logo-factory { width: 146px; height: 44px; }
.cspc-print-strip { height: 6px; margin: 5px 0 8px; }
.cspc-print-title { display: grid; grid-template-columns: 1fr 152px; border: 1px solid #9da9ba; }
.cspc-print-title > div { padding: 8px 10px; }
.cspc-print-title > div + div { border-left: 1px solid #9da9ba; text-align: center; }
.cspc-print-title small { display: block; color: #5b6678; font-size: 7.5px; font-weight: 800; letter-spacing: .1em; }
.cspc-print-title h1 { margin: 2px 0 0; color: var(--cspc-navy); font-size: 15px; line-height: 1.2; }
.cspc-print-title strong { display: block; margin-top: 4px; color: var(--cspc-navy); font-size: 14px; }
.cspc-print-meta { display: grid; grid-template-columns: repeat(6, 1fr); margin: 6px 0; border: 1px solid #9da9ba; }
.cspc-print-meta div { min-height: 35px; padding: 4px 6px; border-right: 1px solid #c3cad4; }
.cspc-print-meta div:last-child { border-right: 0; }
.cspc-print-meta .wide { grid-column: span 2; }
.cspc-print-meta dt { color: #596579; font-size: 7.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.cspc-print-meta dd { margin: 3px 0 0; font-size: 9.5px; font-weight: 700; }
.cspc-print-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cspc-print-table th { padding: 5px 4px; color: #fff; background: var(--cspc-navy); border: 1px solid var(--cspc-navy-dark); font-size: 7.5px; line-height: 1.15; text-align: center; text-transform: uppercase; }
.cspc-print-table td { height: 28px; padding: 4px 5px; border: 1px solid #9da9ba; font-size: 8.5px; line-height: 1.15; vertical-align: middle; }
.cspc-print-table th:nth-child(1) { width: 7%; }
.cspc-print-table th:nth-child(2) { width: 14%; }
.cspc-print-table th:nth-child(3) { width: 11%; }
.cspc-print-table th:nth-child(4) { width: 23%; }
.cspc-print-table th:nth-child(5) { width: 11%; }
.cspc-print-table th:nth-child(6) { width: 14%; }
.cspc-print-table th:nth-child(7) { width: 20%; }
.cspc-doc-table th:nth-child(1) { width: 8%; }
.cspc-doc-table th:nth-child(2) { width: 31%; }
.cspc-doc-table th:nth-child(3) { width: 15%; }
.cspc-doc-table th:nth-child(4) { width: 15%; }
.cspc-doc-table th:nth-child(5) { width: 16%; }
.cspc-doc-table th:nth-child(6) { width: 15%; }
.cspc-print-table td:first-child { text-align: center; font-weight: 800; }
.cspc-print-table tr.blank td { height: 25px; }
.cspc-load-print-table th:nth-child(1) { width: 4%; }
.cspc-load-print-table th:nth-child(2) { width: 6%; }
.cspc-load-print-table th:nth-child(3) { width: 11%; }
.cspc-load-print-table th:nth-child(4) { width: 12%; }
.cspc-load-print-table th:nth-child(5) { width: 9%; }
.cspc-load-print-table th:nth-child(6) { width: 13%; }
.cspc-load-print-table th:nth-child(7) { width: 24%; }
.cspc-load-print-table th:nth-child(8) { width: 21%; }
.cspc-load-print-table td small { display: block; margin-top: 2px; color: #596579; font-size: 7px; }
.cspc-print-summary { display: grid; grid-template-columns: 1fr 1.35fr; margin-top: 8px; border: 1px solid #9da9ba; }
.cspc-print-summary > div { min-height: 55px; padding: 7px 9px; }
.cspc-print-summary > div + div { border-left: 1px solid #9da9ba; }
.cspc-print-summary strong { display: block; color: var(--cspc-navy); font-size: 9px; }
.cspc-print-summary span, .cspc-print-summary p { margin: 3px 0 0; font-size: 8px; line-height: 1.25; }
.cspc-print-route-control { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 13px; margin-top: 7px; padding: 6px 8px; border: 1px solid #9da9ba; font-size: 7.7px; }
.cspc-print-route-control strong { color: var(--cspc-navy); }
.cspc-print-incident { min-height: 30px; padding: 6px 8px; display: flex; gap: 6px; border: 1px solid #9da9ba; border-top: 0; font-size: 7.7px; }
.cspc-print-incident strong { color: var(--cspc-navy); white-space: nowrap; }
.cspc-signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 20px 4px 8px; break-inside: avoid; page-break-inside: avoid; }
.cspc-signatures div { text-align: center; }
.cspc-signatures span { display: block; border-top: 1px solid #283449; }
.cspc-signatures strong { display: block; margin-top: 4px; color: var(--cspc-navy); font-size: 8.5px; }
.cspc-signatures small { display: block; margin-top: 2px; color: #687487; font-size: 7.5px; }
.cspc-print-footer { display: flex; flex-direction: column; align-items: center; gap: 1px; margin-top: auto; padding: 4px 8px; color: #fff; background: var(--cspc-blue); font-size: 7px; text-align: center; break-inside: avoid; page-break-inside: avoid; }
.cspc-print-footer a { color: #fff; font-weight: 800; }

.cspc-returns { margin-top: 24px; scroll-margin-top: 24px; }
.cspc-returns:target { border-color: #67b8a7; box-shadow: 0 0 0 3px rgba(22,128,106,.13), var(--cspc-shadow); }
.cspc-returns .cspc-data-table input { min-width: 100px; }
.cspc-returns .cspc-data-table select { min-width: 150px; }
.cspc-return-table { min-width: 1450px; }
.cspc-returns-list { min-width: 1040px; }
.cspc-empty-compact { padding: 28px 16px; }
.cspc-return-table tr.is-code-match { background: #fff5cf; outline: 2px solid var(--cspc-gold); outline-offset: -2px; }
.cspc-return-code-search { width: min(460px, 100%); margin: 0 0 16px; display: flex; flex-direction: column; gap: 5px; color: #344054; font-size: 13px; font-weight: 800; }
.cspc-return-code-search small { color: var(--cspc-muted); font-weight: 500; }
.cspc-return-summary { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; margin: 0 0 16px; }
.cspc-return-summary span { padding: 12px 14px; display: flex; flex-direction: column; color: var(--cspc-muted); background: #f4f7fb; border: 1px solid var(--cspc-border); border-radius: 9px; font-size: 11px; font-weight: 750; }
.cspc-return-summary strong { margin-top: 3px; color: var(--cspc-navy); font-size: 22px; }
.cspc-code-chip { display: inline-flex; padding: 5px 8px; color: #fff; background: var(--cspc-navy); border-radius: 6px; font-size: 12px; letter-spacing: .04em; }
.cspc-internal-value { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: -8px 0 20px; }
.cspc-internal-value article { padding: 14px 16px; display: flex; flex-direction: column; background: #f7f3ea; border: 1px solid #ead8aa; border-radius: 10px; }
.cspc-internal-value small { color: var(--cspc-muted); font-weight: 750; }
.cspc-internal-value strong { margin-top: 3px; color: var(--cspc-navy); font-size: 20px; }
.cspc-internal-value p { grid-column: 1 / -1; margin: 0; color: var(--cspc-muted); font-size: 11px; }
.cspc-stock-negative { color: var(--cspc-danger); }
.cspc-block-label { margin-top: 16px; }
.cspc-audit { margin: 20px 0; padding: 14px 18px; border: 1px solid var(--cspc-border); border-radius: 10px; background: #fff; }
.cspc-audit summary { color: var(--cspc-navy); cursor: pointer; font-weight: 750; }
.cspc-audit ol { margin: 14px 0 0; padding-left: 22px; }
.cspc-audit li { margin: 8px 0; padding-left: 5px; }
.cspc-audit li span, .cspc-audit li small { display: block; color: var(--cspc-muted); }

.cspc-report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cspc-catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cspc-catalog-card { margin: 0; }
.cspc-catalog-card ul { margin: 0 0 20px; padding: 0; list-style: none; }
.cspc-catalog-card li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid #edf0f4; }
.cspc-catalog-card li small { display: block; color: var(--cspc-muted); }
.cspc-mini-button { padding: 5px 8px; color: #6e7787; background: #f0f2f5; border: 0; border-radius: 999px; cursor: pointer; font-size: 11px; font-weight: 800; }
.cspc-mini-button.is-active { color: #0f6840; background: #e5f7ee; }
.cspc-catalog-form { display: grid; gap: 10px; padding-top: 15px; border-top: 2px solid var(--cspc-beige); }
.cspc-user-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; }
.cspc-create-user { display: flex; flex-direction: column; gap: 12px; }
.cspc-create-user label small, .cspc-help { color: var(--cspc-muted); font-size: 12px; }
.cspc-catalog-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.cspc-catalog-summary article { padding: 17px 20px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--cspc-border); border-radius: 12px; }
.cspc-catalog-summary strong { color: var(--cspc-navy); font-size: 22px; }
.cspc-catalog-summary span { color: var(--cspc-muted); font-size: 12px; }
.cspc-source { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.cspc-source-web { color: #075f72; background: #dff5f8; }
.cspc-source-manual { color: #754b00; background: #fff0c8; }
.cspc-inline-price { display: flex; align-items: center; gap: 6px; min-width: 260px; }
.cspc-inline-price span { color: var(--cspc-muted); font-weight: 800; }
.cspc-inline-price input { width: 112px; min-height: 38px; padding: 7px 9px; border: 1px solid var(--cspc-border); border-radius: 7px; }
.cspc-check-field { min-height: 42px; align-items: center; flex-direction: row !important; padding: 9px 11px; background: #f7f9fc; border: 1px solid #cfd6e2; border-radius: 8px; }
.cspc-check-field input { width: 18px; min-height: 18px; margin: 0; }
.cspc-email-action input { width: 230px; min-height: 42px; padding: 8px 10px; border: 1px solid #cfd6e2; border-radius: 9px; }
.cspc-button-whatsapp { color: #fff !important; background: #128c4b; border-color: #128c4b; }

.cspc-ticket-shell { width: min(860px, 100%); margin: 0 auto 28px; }
.cspc-ticket { overflow: hidden; color: #172033; background: #fff; border-radius: 18px; border: 1px solid #d8e3ef; box-shadow: 0 10px 34px rgba(8,38,76,.12); }
.cspc-ticket > header { min-height: 128px; padding: 22px 28px 18px; display: flex; align-items: center; justify-content: space-between; gap: 22px; color: var(--cspc-navy); background: #fff; }
.cspc-ticket > header > div:first-child { display: flex; flex-direction: column; gap: 7px; }
.cspc-ticket > header span { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--cspc-muted); }
.cspc-ticket > header strong { font-size: 34px; line-height: 1.05; color: var(--cspc-navy); }
.cspc-ticket > header small { color: var(--cspc-blue); font-weight: 800; }
.cspc-ticket > header .cspc-logo-lockup { background: transparent; }
.cspc-ticket-strip { height: 8px; background: linear-gradient(90deg, var(--cspc-gold) 0 34%, #d9d9d9 34% 64%, var(--cspc-navy) 64% 100%); }
.cspc-ticket dl { margin: 0; padding: 18px 24px 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.cspc-ticket dl div { padding: 12px 14px; background: #f4f8fc; border: 1px solid #e2e8f0; border-radius: 10px; }
.cspc-ticket dt { color: var(--cspc-muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cspc-ticket dd { margin: 4px 0 0; color: var(--cspc-navy); font-size: 15px; font-weight: 800; }
.cspc-ticket-customer { margin: 0 24px 16px; padding: 15px 16px; display: flex; flex-direction: column; gap: 3px; background: #f9fbfd; border: 1px solid #e4edf6; border-left: 4px solid var(--cspc-blue); border-radius: 10px; }
.cspc-ticket-customer strong { color: var(--cspc-navy); font-size: 18px; }
.cspc-ticket-customer span, .cspc-ticket-customer small { color: var(--cspc-muted); }
.cspc-ticket table { width: calc(100% - 48px); margin: 0 24px; border-collapse: collapse; }
.cspc-ticket th { padding: 11px 8px; color: #fff; background: var(--cspc-navy); font-size: 10px; text-align: left; text-transform: uppercase; }
.cspc-ticket td { padding: 12px 8px; border-bottom: 1px solid #e1e6ee; font-size: 13px; }
.cspc-ticket td small { display: block; margin-top: 3px; color: var(--cspc-muted); }
.cspc-ticket th:nth-child(2), .cspc-ticket td:nth-child(2) { width: 58px; text-align: center; }
.cspc-ticket th:nth-child(3), .cspc-ticket td:nth-child(3) { width: 105px; text-align: right; }
.cspc-ticket th:last-child, .cspc-ticket td:last-child { text-align: right; }
.cspc-ticket-totals { margin: 18px 24px; padding: 16px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; background: #eff7fc; border: 1px solid #d5e8f4; border-radius: 12px; }
.cspc-ticket-totals > div { display: flex; flex-direction: column; gap: 7px; }
.cspc-ticket-totals span, .cspc-ticket-totals strong { display: flex; justify-content: space-between; gap: 16px; color: var(--cspc-muted); font-size: 12px; }
.cspc-ticket-totals b { color: var(--cspc-navy); }
.cspc-ticket-totals strong { margin-top: 4px; padding-top: 8px; color: var(--cspc-navy); border-top: 1px solid #bddbea; font-size: 17px; }
.cspc-ticket-totals .cspc-ticket-payment-highlight,
.cspc-ticket-totals .cspc-ticket-balance-highlight { margin-top: 3px; padding: 9px 11px; align-items: center; border-radius: 8px; font-weight: 800; }
.cspc-ticket-totals .cspc-ticket-payment-highlight { color: #176b49; background: #e8f7f0; border: 1px solid #b8e3cf; }
.cspc-ticket-totals .cspc-ticket-balance-highlight { color: var(--cspc-navy); background: #fff8dc; border: 1px solid #edd783; }
.cspc-ticket-totals .cspc-ticket-payment-highlight b,
.cspc-ticket-totals .cspc-ticket-balance-highlight b { font-size: 15px; }

.cspc-ticket-note { margin: 0 28px 30px; padding: 12px 14px; color: var(--cspc-muted); background: #f8fafc; border-left: 4px solid var(--cspc-gold); }
.cspc-ticket > footer { margin-top: 12px; padding: 18px 25px; display: flex; align-items: center; flex-direction: column; gap: 5px; color: #fff; background: var(--cspc-blue); text-align: center; }
.cspc-ticket > footer strong { font-size: 18px; }
.cspc-ticket > footer span { font-size: 12px; }
.cspc-ticket > footer small { margin-top: 5px; font-size: 9px; }
.cspc-ticket-toast { position: fixed; right: 20px; bottom: 20px; z-index: 99999; max-width: 420px; padding: 14px 18px; color: #fff; background: #13734b; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.22); font-weight: 750; }
.cspc-ticket-toast.is-error { background: #9c3f19; }

.cspc-quick-customer { margin-top: 18px; padding: 18px; background: #eef8fd; border: 1px solid #bfe4f5; border-radius: 11px; }
.cspc-quick-customer[hidden] { display: none; }
.cspc-quote-terms { margin-top: 16px; }
.cspc-condition-field { min-width: 260px; display: grid; grid-template-columns: 130px 1fr; gap: 6px; }
.cspc-delete-load, .cspc-delete-record { margin: 0 0 20px; padding: 14px 16px; display: flex; align-items: end; gap: 12px; background: #fff7f6; border: 1px solid #f1c0bb; border-radius: 10px; }
.cspc-delete-load label, .cspc-delete-record > div { flex: 1; display: flex; flex-direction: column; gap: 4px; color: var(--cspc-danger); font-weight: 800; }
.cspc-delete-load input, .cspc-delete-record input, .cspc-inline-delete input, .cspc-catalog-delete input { min-height: 38px; padding: 7px 9px; border: 1px solid #d7a8a3; border-radius: 7px; }
.cspc-delete-record > div small { color: var(--cspc-muted); font-weight: 500; }
.cspc-inline-delete { min-width: 235px; display: flex; align-items: center; gap: 6px; }
.cspc-inline-delete input { min-width: 120px; }
.cspc-user-cards { display: grid; gap: 13px; }
.cspc-user-card { padding: 16px; border: 1px solid var(--cspc-border); border-radius: 11px; background: #fbfcfe; }
.cspc-user-card > header { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.cspc-user-card > header div { display: flex; flex-direction: column; }
.cspc-user-card > header strong { color: var(--cspc-navy); }
.cspc-user-card > header span { color: var(--cspc-muted); font-size: 12px; }
.cspc-user-card > header b { color: var(--cspc-blue); font-size: 12px; }
.cspc-role-checks { margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; border: 0; }
.cspc-role-checks legend { margin-bottom: 8px; color: var(--cspc-navy); font-weight: 800; }
.cspc-role-checks label { display: flex; align-items: center; flex-direction: row; gap: 7px; padding: 8px 10px; background: #eef8fd; border-radius: 7px; font-size: 12px; }
.cspc-role-checks input { width: auto; min-height: 0; }
.cspc-role-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.cspc-role-summary span { padding: 5px 8px; color: var(--cspc-navy); background: #e9f6fc; border-radius: 999px; font-size: 11px; font-weight: 750; }
.cspc-user-delete { margin-top: 12px; }
.cspc-catalog-actions { display: flex; align-items: center; gap: 7px; }
.cspc-catalog-delete { display: flex; align-items: center; gap: 5px; }
.cspc-catalog-delete input { width: 105px; }
.cspc-mini-button.is-delete { color: var(--cspc-danger); background: #fff0ef; }
.cspc-audit-snapshot pre { max-width: 480px; max-height: 280px; overflow: auto; padding: 12px; color: #d6e9ff; background: #11152f; border-radius: 8px; font-size: 10px; white-space: pre-wrap; }
.cspc-direct-payment { width: min(760px, 100%); margin: 0 auto 28px; display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: end; }
.cspc-direct-payment .cspc-panel-head { grid-column: 1 / -1; }
.cspc-direct-payment label { display: flex; flex-direction: column; gap: 6px; color: #344054; font-size: 13px; font-weight: 750; }
.cspc-direct-payment input { min-height: 42px; padding: 9px 11px; border: 1px solid #cfd6e2; border-radius: 8px; }

.cspc-footer { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 17px 20px; color: #dce7f7; background: var(--cspc-navy-dark); font-size: 12px; }
.cspc-credit-button { display: inline-flex; padding: 5px 9px; color: var(--cspc-navy-dark) !important; background: var(--cspc-gold-light); border-radius: 999px; font-weight: 800; text-decoration: none; }

.cspc-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cspc-quick-grid a { min-height: 116px; padding: 20px; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; color: var(--cspc-navy); background: #fff; border: 1px solid var(--cspc-border); border-radius: 14px; box-shadow: var(--cspc-shadow); text-decoration: none; }
.cspc-quick-grid .dashicons { grid-row: span 2; width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: var(--cspc-navy); border-radius: 11px; font-size: 21px; }
.cspc-quick-grid a.cspc-quick-admin { border-color: #d7bd7e; background: linear-gradient(135deg, #fffdf7 0%, #f8edcf 100%); }
.cspc-quick-grid a.cspc-quick-admin .dashicons { background: var(--cspc-gold); }
.cspc-quick-grid strong { align-self: end; font-size: 16px; }
.cspc-quick-grid small { align-self: start; color: var(--cspc-muted); }
.cspc-filter-search { grid-template-columns: minmax(135px, .55fr) minmax(260px, 1.6fr) minmax(150px, .7fr) auto auto; }
.cspc-filter-orders { grid-template-columns: minmax(135px, .55fr) minmax(240px, 1.5fr) minmax(160px, .7fr) minmax(160px, .7fr) auto; }
.cspc-filter-archive { grid-template-columns: 135px minmax(220px, 1.4fr) repeat(5, minmax(125px, .72fr)) auto; }
.cspc-form-narrow { width: min(650px, 100%); margin: 0 auto; }
.cspc-form-narrow .cspc-create-user textarea, .cspc-create-user textarea { width: 100%; min-height: 78px; padding: 10px 11px; border: 1px solid #cfd6e2; border-radius: 8px; resize: vertical; }
.cspc-notice-warning { background: #fff8e5; color: #704d00; border: 1px solid #efc76e; }
.cspc-edit-lock-note { color: #704d00; font-weight: 700; }
.cspc-edit-payment { min-width: 210px; margin-bottom: 8px; }
.cspc-edit-payment summary { color: #075a94; cursor: pointer; font-weight: 800; }
.cspc-edit-payment form { display: grid; gap: 7px; margin-top: 8px; padding: 10px; background: #f3f7fb; border: 1px solid #d8e3ef; border-radius: 10px; }
.cspc-edit-payment label { display: grid; gap: 3px; font-size: 11px; font-weight: 800; color: #40536a; }
.cspc-edit-payment input { width: 100%; min-width: 150px; padding: 7px 8px; border: 1px solid #c9d5e3; border-radius: 7px; }
.cspc-commercial-lines { min-width: 1320px; }
.cspc-commercial-lines th:nth-child(1) { width: 190px; }
.cspc-commercial-lines th:nth-child(2) { width: 230px; }
.cspc-commercial-lines th:nth-child(3), .cspc-commercial-lines th:nth-child(4), .cspc-commercial-lines th:nth-child(5) { width: 135px; }
.cspc-commercial-lines th:nth-child(6) { width: 76px; }
.cspc-commercial-lines th:nth-child(7) { width: 125px; }
.cspc-commercial-lines th:nth-child(8) { width: 110px; }
.cspc-commercial-summary { margin-top: 18px; padding: 16px 18px; display: flex; justify-content: flex-end; gap: 28px; color: var(--cspc-muted); background: #f7f9fc; border-radius: 10px; }
.cspc-commercial-summary strong { margin-left: 8px; color: var(--cspc-navy); font-size: 20px; }
.cspc-commercial-summary i { color: var(--cspc-muted); font-style: normal; font-weight: 750; }
.cspc-quote-terms label > small { margin-top: 5px; color: var(--cspc-muted); font-size: 11px; font-weight: 600; }
.cspc-quote-expiry-alert { margin: 0 0 20px; padding: 18px; color: #7d1710; background: #fff0ef; border: 2px solid #d92d20; border-radius: 13px; box-shadow: 0 8px 24px rgba(180,35,24,.10); }
.cspc-quote-expiry-title { display: flex; align-items: center; gap: 12px; }
.cspc-quote-expiry-title > .dashicons { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: var(--cspc-danger); border-radius: 50%; font-size: 22px; }
.cspc-quote-expiry-title h2 { margin: 0; color: #7d1710; font-size: 20px; }
.cspc-quote-expiry-title p { margin: 2px 0 0; }
.cspc-quote-expiry-list { display: grid; gap: 7px; margin-top: 14px; }
.cspc-quote-expiry-list a { padding: 10px 12px; display: grid; grid-template-columns: minmax(125px,.55fr) minmax(160px,1fr) minmax(220px,1.2fr); gap: 12px; color: #7d1710 !important; background: #fff; border: 1px solid #efaaa4; border-radius: 9px; text-decoration: none; }
.cspc-quote-expiry-list a:hover { border-color: #d92d20; }
.cspc-quote-expiry-list b { text-align: right; }
.cspc-quote-row-alert { background: #fff7f6; }
.cspc-quote-row-alert:hover { background: #ffefed !important; }
.cspc-follow-up { display: inline-flex; padding: 5px 8px; border-radius: 7px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.cspc-follow-up-today, .cspc-follow-up-overdue { color: #8e1b13; background: #fee4e2; border: 1px solid #f4aaa4; }
.cspc-follow-up-soon { color: #76520b; background: #fff0c9; border: 1px solid #ead18c; }
.cspc-follow-up-clear { color: #137a4a; font-size: 12px; font-weight: 750; }
.cspc-quote-view-alert { margin: -8px 0 20px; padding: 13px 16px; display: flex; align-items: center; gap: 10px; color: #8e1b13; background: #fff0ef; border: 2px solid #d92d20; border-radius: 11px; }
.cspc-quote-view-alert .dashicons { color: var(--cspc-danger); }
.cspc-route-select { margin-top: 22px; border: 1px solid var(--cspc-border); border-radius: 10px; }
.cspc-route-select input[type="checkbox"] { width: 18px; height: 18px; }
.cspc-route-unassigned { margin-bottom: 20px; }
.cspc-driver-queues { display: grid; gap: 12px; }
.cspc-driver-queue { overflow: hidden; border: 1px solid var(--cspc-border); border-radius: 14px; background: #fff; box-shadow: var(--cspc-shadow); }
.cspc-driver-queue > summary { display: grid; grid-template-columns: auto minmax(150px, 1fr) auto auto; align-items: center; gap: 10px; padding: 16px 18px; cursor: pointer; color: var(--cspc-navy); list-style: none; }
.cspc-driver-queue > summary::-webkit-details-marker { display: none; }
.cspc-driver-queue > summary small { color: var(--cspc-muted); }
.cspc-driver-queue > summary .dashicons:last-child { transition: transform .2s ease; }
.cspc-driver-queue[open] > summary .dashicons:last-child { transform: rotate(180deg); }
.cspc-driver-empty { padding: 0 18px 18px; color: var(--cspc-muted); }
.cspc-driver-branch-queue { margin: 0 14px 14px; box-shadow: none; background: #f9fbfe; }
.cspc-driver-branch-queue .cspc-route-select { margin-top: 14px; background: #fff; }
.cspc-driver-branch-queue h3 { margin: 0; color: var(--cspc-navy); }
.cspc-driver-branch-queue .cspc-form-actions label { min-width: 220px; }
.cspc-selection-count { margin-right: auto; color: var(--cspc-muted); }
.cspc-selection-count b { color: var(--cspc-navy); font-size: 19px; }
.cspc-order-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cspc-order-actions form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.cspc-order-actions .cspc-panel-head { grid-column: 1 / -1; }
.cspc-order-actions label { display: flex; flex-direction: column; gap: 6px; color: #344054; font-size: 13px; font-weight: 750; }
.cspc-order-actions input, .cspc-order-actions select { min-height: 42px; padding: 9px 11px; border: 1px solid #cfd6e2; border-radius: 8px; }
.cspc-order-actions .cspc-help { grid-column: 1 / -1; }
.cspc-document-sheet { min-height: 10.45in; display: flex; flex-direction: column; }
.cspc-doc-meta { display: grid; grid-template-columns: 1.25fr 1fr 1fr; margin: 10px 0; border: 1px solid #9da9ba; }
.cspc-doc-meta-quote { grid-template-columns: 1.2fr 1fr 1fr 1fr; }
.cspc-doc-meta > div { min-height: 58px; padding: 8px 10px; display: flex; flex-direction: column; border-right: 1px solid #c3cad4; }
.cspc-doc-meta > div:last-child { border-right: 0; }
.cspc-doc-meta small { color: #596579; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.cspc-doc-meta strong { margin-top: 3px; color: var(--cspc-navy); font-size: 11px; }
.cspc-doc-meta span { margin-top: 2px; color: #586579; font-size: 9px; }
.cspc-advisor-inline { margin-left: 8px; color: var(--cspc-muted); font-size: 13px; font-weight: 750; }
.cspc-doc-table th:nth-child(1) { width: 9%; }
.cspc-doc-table th:nth-child(2) { width: 42%; }
.cspc-doc-table th:nth-child(3) { width: 15%; }
.cspc-doc-table th:nth-child(4), .cspc-doc-table th:nth-child(5) { width: 17%; }
.cspc-doc-table td:nth-child(4), .cspc-doc-table td:nth-child(5) { text-align: right; }
.cspc-doc-bottom { display: grid; grid-template-columns: 1fr 260px; gap: 18px; margin-top: 12px; }
.cspc-doc-bottom > div:first-child { padding: 11px 12px; border: 1px solid #c3cad4; }
.cspc-doc-bottom p { margin: 5px 0; font-size: 9px; }
.cspc-doc-totals { display: flex; flex-direction: column; border: 1px solid #9da9ba; }
.cspc-doc-totals span, .cspc-doc-totals > strong { padding: 6px 9px; display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #d2d7df; font-size: 9px; }
.cspc-doc-totals > strong { color: #fff; background: var(--cspc-navy); border-bottom: 0; font-size: 11px; }
.cspc-doc-sign { width: 240px; margin: auto auto 15px; text-align: center; }
.cspc-doc-sign span { display: block; border-top: 1px solid #283449; }
.cspc-doc-sign strong { font-size: 8px; }
.cspc-warranty-copy { margin: 8px 0 10px; padding: 8px 10px 10px; border: 1px solid #b8c1cf; display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; min-height: 120mm; }
.cspc-warranty-copy h2 { margin: 0; color: var(--cspc-navy); font-size: 11px; }
.cspc-warranty-policy-text { margin: 0; display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; justify-content: space-between; font-size: 11px; line-height: 1.55; text-align: justify; hyphens: auto; }
.cspc-warranty-policy-text .cspc-policy-line { display: block; margin: 0; }
.cspc-warranty-policy-text .cspc-policy-line + .cspc-policy-line { padding-top: 7px; }

.cspc-login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); }
.cspc-login-brand { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(35px, 7vw, 110px); color: #fff; background: radial-gradient(circle at 18% 18%, #154f8b 0, var(--cspc-navy-dark) 58%, #021128 100%); }
.cspc-login-brand .cspc-logo-lockup { padding: 12px 16px; background: rgba(255,255,255,.96); border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.cspc-login-brand .cspc-eyebrow { margin-top: 32px; }
.cspc-login-brand h1 { margin: 5px 0 10px; font-size: clamp(38px, 5vw, 66px); line-height: 1; }
.cspc-login-brand > p:not(.cspc-eyebrow) { max-width: 570px; margin: 0; color: #dce7f6; font-size: 18px; }
.cspc-login-brand .cspc-brand-strip { width: min(480px, 100%); margin-top: 34px; }
.cspc-login-card { display: grid; place-items: center; padding: 38px; background: #fff; }
.cspc-login-card > div { width: min(410px, 100%); }
.cspc-login-card h2 { margin: 5px 0; color: var(--cspc-navy); font-size: 29px; }
.cspc-login-card > div > p:not(.cspc-eyebrow) { margin: 0 0 24px; color: var(--cspc-muted); }
.cspc-login-card label { color: #344054; font-weight: 700; }
.cspc-login-card .login-username, .cspc-login-card .login-password { margin: 13px 0; }
.cspc-login-card input[type="text"], .cspc-login-card input[type="password"] { width: 100%; min-height: 48px; margin-top: 6px; padding: 10px 12px; border: 1px solid #cfd6e2; border-radius: 9px; }
.cspc-login-card .login-remember { font-size: 13px; }
.cspc-login-card .login-submit input { width: 100%; min-height: 48px; color: #fff; background: var(--cspc-navy); border: 0; border-radius: 9px; cursor: pointer; font-weight: 800; }
.cspc-login-credit { margin-top: 28px !important; padding-top: 18px; border-top: 1px solid var(--cspc-border); color: var(--cspc-muted); font-size: 11px; line-height: 1.8; }
.cspc-denied { width: min(560px, calc(100% - 34px)); margin: 12vh auto; padding: 36px; border-radius: 14px; background: #fff; box-shadow: var(--cspc-shadow); text-align: center; }

@media (max-width: 1050px) {
    .cspc-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .cspc-field-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .cspc-filter { grid-template-columns: repeat(3, 1fr); }
    .cspc-catalog-grid { grid-template-columns: 1fr; }
    .cspc-user-grid { grid-template-columns: 1fr; }
    .cspc-quick-grid { grid-template-columns: repeat(2, 1fr); }
    .cspc-order-actions { grid-template-columns: 1fr; }
    .cspc-internal-value { grid-template-columns: repeat(2, 1fr); }
    .cspc-return-summary { grid-template-columns: repeat(2, 1fr); }
    .cspc-print-sheet { width: 100%; min-height: auto; }
}

@media (max-width: 720px) {
    .cspc-topbar { align-items: flex-start; padding: 9px 14px; }
    .cspc-brand > span:last-child { display: none; }
    .cspc-logo-small .cspc-logo-sanpablo { width: 88px; }
    .cspc-logo-small .cspc-logo-dorminova { width: 70px; }
    .cspc-userbox { align-items: flex-end; flex-direction: column; gap: 2px; }
    .cspc-main { width: min(100% - 24px, 1420px); padding-top: 24px; }
    .cspc-page-head { align-items: stretch; flex-direction: column; }
    .cspc-page-head .cspc-button { align-self: flex-start; }
    .cspc-stat-grid, .cspc-report-grid { grid-template-columns: 1fr; }
    .cspc-field-grid-4, .cspc-filter, .cspc-filter-short { grid-template-columns: 1fr; }
    .cspc-span-2 { grid-column: auto; }
    .cspc-quick-grid { grid-template-columns: 1fr; }
    .cspc-commercial-summary { align-items: flex-end; flex-direction: column; gap: 7px; }
    .cspc-order-actions form { grid-template-columns: 1fr; }
    .cspc-order-actions .cspc-panel-head { grid-column: auto; }
    .cspc-items-actions { align-items: flex-start; flex-direction: column; }
    .cspc-catalog-summary { grid-template-columns: 1fr; }
    .cspc-email-action { width: 100%; flex-wrap: wrap; }
    .cspc-email-action input { width: 100%; }
    .cspc-ticket > header { align-items: flex-start; flex-direction: column; }
    .cspc-logo-ticket { width: 100%; }
    .cspc-ticket dl { grid-template-columns: 1fr; }
    .cspc-ticket-totals { grid-template-columns: 1fr; }
    .cspc-role-checks { grid-template-columns: 1fr; }
    .cspc-delete-load, .cspc-delete-record, .cspc-inline-delete, .cspc-inline-price, .cspc-catalog-actions, .cspc-catalog-delete { align-items: stretch; flex-direction: column; }
    .cspc-inline-delete, .cspc-catalog-delete input { width: 100%; }
    .cspc-direct-payment { grid-template-columns: 1fr; }
    .cspc-internal-value, .cspc-return-summary { grid-template-columns: 1fr; }
    .cspc-direct-payment .cspc-panel-head { grid-column: auto; }
    .cspc-quote-expiry-list a { grid-template-columns: 1fr; gap: 3px; }
    .cspc-quote-expiry-list b { text-align: left; }
    .cspc-quote-view-alert { align-items: flex-start; flex-direction: column; }
    .cspc-driver-queue > summary { grid-template-columns: auto 1fr auto; }
    .cspc-driver-queue > summary small { grid-column: 2; }
    .cspc-driver-queue > summary .dashicons:last-child { grid-column: 3; grid-row: 1 / span 2; }
    .cspc-driver-branch-queue { margin: 0 7px 10px; }
    .cspc-login-shell { grid-template-columns: 1fr; }
    .cspc-login-brand { min-height: 46vh; padding: 35px 24px; }
    .cspc-login-card { padding: 35px 24px; }
    .cspc-logo-large .cspc-logo-sanpablo { width: 190px; height: 116px; }
    .cspc-logo-large .cspc-logo-dorminova { width: 125px; height: 63px; }
}

@page { size: Letter portrait; margin: 6mm 7mm; }
@media print {
    html, body.cspc-system-page { width: 100%; min-height: 100%; margin: 0; padding: 0; color: #000; background: #fff; }
    .no-print, #wpadminbar, .cspc-notice { display: none !important; }
    .cspc-app, .cspc-main { display: block; width: 100%; min-height: 0; margin: 0; padding: 0; }
    .cspc-print-sheet { width: 100%; min-height: 267mm; margin: 0; padding: 0; display: flex; flex-direction: column; box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .cspc-print-header { gap: 10px; min-height: 0; }
    .cspc-print-company { font-size: 9px; line-height: 1.22; }
    .cspc-print-company h2 { margin-bottom: 2px; font-size: 13px; }
    .cspc-print-company strong { font-size: 10px; }
    .cspc-logo-print { gap: 5px; }
    .cspc-logo-print .cspc-logo-sanpablo { width: 96px; height: 59px; }
    .cspc-logo-print .cspc-logo-dorminova { width: 92px; height: 38px; }
    .cspc-print-title > div { padding: 5px 7px; }
    .cspc-print-title h1 { font-size: 13px; }
    .cspc-print-title strong { font-size: 12px; }
    .cspc-print-table thead { display: table-header-group; }
    .cspc-print-table tr, .cspc-print-summary, .cspc-print-route-control, .cspc-print-incident, .cspc-signatures, .cspc-print-footer { break-inside: avoid; page-break-inside: avoid; }
    .cspc-print-table td { height: 25px; padding: 3px 4px; }
    .cspc-print-table tr.blank td { height: 22px; }
    .cspc-print-summary { margin-top: 5px; }
    .cspc-print-summary > div { min-height: 45px; padding: 5px 7px; }
    .cspc-print-route-control { margin-top: 5px; padding: 4px 6px; }
    .cspc-print-incident { min-height: 24px; padding: 4px 6px; }
    .cspc-signatures { margin-top: 16px; margin-bottom: 6px; }
    .cspc-print-footer { margin-top: auto; }
    .cspc-print-footer a { text-decoration: none; }
    .cspc-ticket-shell { width: 100%; margin: 0; }
    .cspc-ticket { box-shadow: none; border: 1px solid #cfd6e2; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .cspc-warranty-sheet { min-height: 267mm; }
    .cspc-warranty-sheet .cspc-print-header { gap: 7px; }
    .cspc-warranty-sheet .cspc-print-strip { margin: 3px 0 5px; }
    .cspc-warranty-sheet .cspc-print-title > div { padding: 4px 6px; }
    .cspc-warranty-sheet .cspc-print-title h1 { font-size: 12px; }
    .cspc-warranty-sheet .cspc-print-title strong { font-size: 11px; }
    .cspc-warranty-sheet .cspc-warranty-copy { break-inside: avoid; page-break-inside: avoid; flex: 1 1 auto; min-height: 108mm; margin: 6px 0 8px; padding: 7px 9px 8px; }
    .cspc-warranty-sheet .cspc-warranty-copy h2 { margin-bottom: 4px; font-size: 11px; }
    .cspc-warranty-sheet .cspc-warranty-policy-text { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; justify-content: space-between; font-size: 10px; line-height: 1.5; text-align: justify; }
    .cspc-warranty-sheet .cspc-warranty-policy-text .cspc-policy-line { margin: 0; padding: 0; }
    .cspc-warranty-sheet .cspc-warranty-policy-text .cspc-policy-line + .cspc-policy-line { padding-top: 5px; }
    .cspc-warranty-sheet .cspc-doc-sign { margin: 10px auto 8px; }
    .cspc-warranty-sheet .cspc-print-footer { margin-top: auto; }
}

/* Mejoras 3.6.0: cola, garantías y configuración por componentes. */
.cspc-status-queue { color: #684700; background: #fff0bd; border: 1px solid #f0d36e; }
.cspc-inline-product-settings { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(95px, .7fr) auto; align-items: end; gap: 8px; }
.cspc-inline-product-settings label { margin: 0; }
.cspc-component-grid { display: grid; grid-template-columns: 1.35fr 1.35fr .55fr .65fr; gap: 10px; align-items: end; margin-bottom: 10px; }
.cspc-component-grid > label { min-width: 0; }
.cspc-warranty-table { margin: 7px 0 8px; }
.cspc-warranty-sheet .cspc-doc-meta { margin: 6px 0; }
.cspc-warranty-sheet .cspc-doc-meta > div { min-height: 43px; padding: 5px 7px; }
.cspc-warranty-sheet .cspc-doc-meta small { font-size: 7px; }
.cspc-warranty-sheet .cspc-doc-meta strong { font-size: 9.5px; }
.cspc-warranty-sheet .cspc-doc-meta span { font-size: 7.8px; }
.cspc-warranty-sheet .cspc-warranty-table th { padding: 3px; font-size: 6.8px; }
.cspc-warranty-sheet .cspc-warranty-table td { height: auto; padding: 3px 4px; font-size: 7.7px; line-height: 1.12; }
.cspc-warranty-sheet .cspc-doc-sign { margin-bottom: 7px; }

@media (max-width: 760px) {
    .cspc-inline-product-settings, .cspc-component-grid { grid-template-columns: 1fr; }
}

/* V3.7.0 — Apartados y herramientas del sistema */
.cspc-system-card .dashicons,
.cspc-cleanup-panel .dashicons { color: var(--cspc-blue); font-size: 30px; width: 30px; height: 30px; }
.cspc-system-status-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.cspc-system-status-grid > div { padding: 15px 16px; background: #f7fafc; border: 1px solid #dfe8f1; border-radius: 12px; }
.cspc-system-status-grid small { display: block; color: var(--cspc-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.cspc-system-status-grid strong { display: block; margin-top: 5px; color: var(--cspc-navy); font-size: 16px; }
.cspc-cleanup-panel { border: 1px solid #e7c0b4; }
.cspc-status-active { color: #126343; background: #dff5ea; }
.cspc-status-paid { color: #124e79; background: #e0f0fa; }
.cspc-status-converted { color: #5a3c86; background: #eee6fa; }
.cspc-status-delivered { color: #126343; background: #dff5ea; }
.cspc-status-cancelled { color: #8d2e2e; background: #f8dddd; }
.cspc-status-expired { color: #8c5a00; background: #fff0c9; }
.cspc-status-archived { color: #475467; background: #eef1f4; }
.cspc-total-box { min-width: 250px; padding: 14px 16px; background: #eef8fd; border: 1px solid #d4e8f4; border-radius: 10px; }
.cspc-total-box span,.cspc-total-box strong { display:flex; justify-content:space-between; gap:18px; padding:5px 0; }
.cspc-total-box strong { margin-top:5px; padding-top:10px; border-top:1px solid #bddbea; color:var(--cspc-navy); font-size:16px; }
@media (max-width: 850px) { .cspc-system-status-grid { grid-template-columns: 1fr; } }

/* Multisucursal y proceso individual de rutas */
.cspc-nav .cspc-scope-selector{margin-left:auto;display:flex;align-items:center;gap:9px;padding:7px 0 8px 16px;background:transparent;border:0;color:#fff}.cspc-nav .cspc-scope-selector label{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:800;color:#fff;white-space:nowrap}.cspc-nav .cspc-scope-selector select{min-width:235px;min-height:36px;padding:6px 34px 6px 10px;color:var(--cspc-navy-dark);background:#fff;border:1px solid rgba(255,255,255,.35);border-radius:8px}.cspc-scope-badge{padding:6px 10px;border-radius:999px;font-size:11px;font-weight:900;white-space:nowrap}.cspc-scope-badge.is-operational{background:#dff7e9;color:#176b49}.cspc-scope-badge.is-readonly{background:#fff1b8;color:#6e4e00}.cspc-route-legend{display:flex;flex-wrap:wrap;gap:7px;margin:-8px 0 18px;padding:13px 15px;background:#fff;border:1px solid var(--cspc-border);border-radius:12px;box-shadow:var(--cspc-shadow)}.cspc-route-inline{display:grid;grid-template-columns:minmax(150px,1fr) minmax(190px,2fr) auto;gap:6px;margin-top:8px}.cspc-route-inline select,.cspc-route-inline input{min-width:0}.cspc-route-process-table .cspc-route-row td:first-child{border-left:5px solid transparent}.cspc-route-row-queued td:first-child{border-left-color:#d6a500}.cspc-route-row-assigned td:first-child{border-left-color:#3974d9}.cspc-route-row-in_load td:first-child{border-left-color:#5b47c8}.cspc-route-row-dispatched td:first-child{border-left-color:#e2781a}.cspc-route-row-in_route td:first-child{border-left-color:#1595c5}.cspc-route-row-delivered td:first-child{border-left-color:#1f8d57}.cspc-route-row-not_delivered td:first-child{border-left-color:#c93a31}.cspc-route-row-rescheduled td:first-child{border-left-color:#8c5bd1}.cspc-route-row-returned td:first-child{border-left-color:#65758b}.cspc-route-row-finalized td:first-child{border-left-color:#185c48}.cspc-route-driver{display:block;color:var(--cspc-navy)}.cspc-route-driver-lock{display:inline-flex!important;margin-top:5px!important;padding:3px 7px;color:#475467!important;background:#eef2f6;border-radius:999px;font-size:10px!important;font-weight:800}.cspc-status-queued{background:#fff4cc;color:#745600}.cspc-status-assigned{background:#e8f1ff;color:#2459aa}.cspc-status-in_load{background:#eeeaff;color:#503ca4}.cspc-status-dispatched{background:#fff0df;color:#9a4d08}.cspc-status-in_route{background:#dff6ff;color:#046b91}.cspc-status-delivered{background:#e3f7ec;color:#176b49}.cspc-status-not_delivered{background:#ffebe8;color:#b42318}.cspc-status-rescheduled{background:#f2eaff;color:#6941a5}.cspc-status-returned{background:#edf0f4;color:#475467}.cspc-status-finalized{background:#dcefe9;color:#124f3d}@media(max-width:1100px){.cspc-nav .cspc-scope-selector{width:100%;margin-left:0;justify-content:flex-end;padding:8px 0 10px}}@media(max-width:760px){.cspc-nav .cspc-scope-selector{align-items:stretch;flex-direction:column}.cspc-nav .cspc-scope-selector label{flex-direction:column;align-items:stretch}.cspc-nav .cspc-scope-selector select{min-width:0;width:100%}.cspc-route-inline{grid-template-columns:1fr}.cspc-route-legend{margin-top:0}}

/* V3.8.3: Proceso de rutas usa exclusivamente boletas despachadas. */
.cspc-route-process-table .cspc-route-driver{font-weight:900}.cspc-route-process-table .cspc-route-driver-lock{background:#e8f1ff;color:#2459aa!important}.cspc-route-process-table .cspc-status-dispatched{box-shadow:inset 0 0 0 1px rgba(154,77,8,.18)}

/* === 3.9.0 · Simplificación comercial / agenda / etiquetas === */
.cspc-operation-type-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:8px 0 20px}
.cspc-operation-type-grid label{display:flex;align-items:flex-start;gap:9px;padding:16px;border:1px solid #dbe4ee;border-radius:14px;background:#fff;cursor:pointer}
.cspc-operation-type-grid label:has(input:checked){border-color:#0a5689;box-shadow:0 0 0 2px rgba(10,86,137,.1);background:#f7fbff}
.cspc-operation-type-grid strong{display:block;color:#08264c;font-size:15px}.cspc-operation-type-grid small{display:block;color:#64748b;margin-top:3px}
.cspc-row-pending-verification{background:#fff8e8!important}.cspc-warning-text{color:#a45b00!important;font-weight:700}.cspc-status-warning{background:#fff0c2!important;color:#805200!important}
.cspc-agenda-sheet{padding:0;overflow:hidden}.cspc-agenda-sheet .cspc-panel-head{padding:18px 20px;margin:0}.cspc-agenda-table{font-size:12px;min-width:1500px}.cspc-agenda-table th{position:sticky;top:0;z-index:2;background:#08264c;color:#fff;white-space:nowrap}.cspc-agenda-table td{vertical-align:top;line-height:1.35}.cspc-agenda-table td small{display:block;margin-top:4px;color:#667085}.cspc-route-select{min-width:145px}
.cspc-agenda-row{border-left:7px solid transparent}.cspc-driver-color-0{border-left-color:#5d87b2}.cspc-driver-color-1{border-left-color:#d19b4c}.cspc-driver-color-2{border-left-color:#799a75}.cspc-driver-color-3{border-left-color:#9d79a8}.cspc-driver-color-4{border-left-color:#c97373}.cspc-driver-color-5{border-left-color:#65a7a7}
.cspc-inventory-registration .cspc-field-grid{align-items:end}.cspc-label-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.cspc-inventory-label{border:1.5px solid #111;padding:10px 12px;min-height:118px;display:flex;flex-direction:column;justify-content:center;background:#fff;color:#111;break-inside:avoid}.cspc-label-brand{font-size:9px;font-weight:800;letter-spacing:.5px;border-bottom:1px solid #111;padding-bottom:4px;margin-bottom:6px}.cspc-inventory-label>strong{font-size:18px;line-height:1.05}.cspc-inventory-label>span{font-size:12px;margin-top:2px}.cspc-label-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:900;font-size:16px;letter-spacing:.5px;margin:7px 0 4px}.cspc-inventory-label small{font-size:9px;line-height:1.25}
@media(max-width:900px){.cspc-operation-type-grid{grid-template-columns:1fr}.cspc-label-grid{grid-template-columns:1fr}}
@media print{.cspc-label-grid{grid-template-columns:repeat(3,1fr);gap:4mm}.cspc-inventory-label{min-height:34mm;padding:3mm;page-break-inside:avoid}.cspc-main:has(.cspc-label-grid) .cspc-print-sheet{display:none}}


/* === 3.9.1 · Agenda persistente / reasignación segura === */
.cspc-agenda-last-update{display:block;margin-top:6px;color:#526173}.cspc-assignment-current{padding:4px 7px;border-radius:7px;background:#eef5fb;color:#274862!important}.cspc-agenda-row.is-programming-dirty{box-shadow:inset 0 0 0 2px rgba(209,155,76,.35);background:#fffaf0}.cspc-route-select.is-dirty{border-color:#d19b4c;box-shadow:0 0 0 2px rgba(209,155,76,.13)}.cspc-agenda-table{min-width:1650px}.cspc-head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}

/* === 4.0.0 · Pagos mixtos, encomiendas y perfiles de producto === */
.cspc-mixed-payment{padding:14px;border:1px solid #d7e4ef;border-radius:12px;background:#f7fbff}.cspc-mixed-payment>strong{display:block;margin-bottom:10px;color:#08264c}
.cspc-mixed-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.cspc-mixed-grid label{display:grid;gap:4px;min-width:0}
.cspc-consignment-toggle summary,.cspc-product-profile-form summary,.cspc-route-payment summary{cursor:pointer;color:#08264c;font-weight:800}.cspc-consignment-toggle summary{padding:4px 0 12px}.cspc-consignment-toggle summary small{font-weight:500;color:#667085;margin-left:8px}
.cspc-consignment-badge{display:inline-block!important;margin-top:5px!important;padding:4px 8px;border-radius:999px;background:#fff0b8!important;color:#6e4e00!important;font-weight:900!important}.cspc-consignment-text{display:block;color:#8a5d00;margin-bottom:3px}.cspc-consignment-alert,.cspc-consignment-load-alert{border-left:6px solid #e2ad16!important;background:#fff8db!important}.cspc-consignment-load-alert .cspc-head-actions{margin-top:10px}
.cspc-route-payment{margin-top:8px;padding:8px 10px;border:1px solid #ead38a;border-radius:10px;background:#fffaf0}.cspc-route-payment form{display:grid;gap:7px;margin-top:8px}.cspc-route-payment label{display:grid;gap:4px;font-size:11px;font-weight:800}.cspc-route-mixed{display:grid;gap:5px}.cspc-route-mixed>div{display:grid;grid-template-columns:1fr 110px;gap:5px}
.cspc-product-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.cspc-product-profile-card{border:1px solid #dce5ee;border-radius:12px;padding:14px;background:#fff}.cspc-product-profile-card h3{margin:0 0 10px;color:#08264c}.cspc-variant-config{padding:12px;border:1px solid #dce5ee;border-radius:10px;background:#f9fbfd}.cspc-variant-config label{display:grid;gap:5px;margin-top:7px}.cspc-variant-config small{display:block;margin-top:7px;color:#667085}
.cspc-print-consignment{display:block!important;margin-bottom:2px;color:#7a5200!important;font-weight:900!important;text-transform:uppercase}.cspc-consignment-sheet{width:210mm;min-height:279mm;max-height:279mm;margin:0 auto;padding:14mm 16mm;box-sizing:border-box;background:#fff;color:#12213a;display:flex;flex-direction:column;gap:8mm;overflow:hidden}.cspc-consignment-sheet header{display:flex;align-items:center;justify-content:center;gap:20px;padding:10mm;background:#08264c;color:#fff;border-bottom:4px solid #e7bf55;text-align:center}.cspc-consignment-sheet header h2{margin:0 0 5px;font-size:22px}.cspc-consignment-sheet header strong,.cspc-consignment-sheet header span{display:block}.cspc-consignment-number{text-align:center;font-size:20px;font-weight:900;color:#08264c}.cspc-consignment-sheet>section{text-align:center;padding:5px 0}.cspc-consignment-sheet>section small{display:block;color:#667085;font-size:11px;font-weight:900;letter-spacing:.08em}.cspc-consignment-sheet>section strong{display:block;margin-top:5px;font-size:19px;line-height:1.25}.cspc-consignment-items ul{list-style:none;margin:8px auto 0;padding:0;max-width:150mm}.cspc-consignment-items li{padding:5px 0;font-size:17px;font-weight:700}.cspc-consignment-sheet footer{margin-top:auto;text-align:center;padding-top:8px;border-top:1px solid #d7dfe8;font-size:11px;color:#5e6876}
@media(max-width:900px){.cspc-product-profile-grid{grid-template-columns:1fr}.cspc-mixed-grid{grid-template-columns:1fr}.cspc-consignment-sheet{width:100%;min-height:auto;max-height:none;padding:18px}}
@media print{body:has(.cspc-consignment-sheet) *{visibility:hidden!important}body:has(.cspc-consignment-sheet) .cspc-consignment-sheet,body:has(.cspc-consignment-sheet) .cspc-consignment-sheet *{visibility:visible!important}.cspc-consignment-sheet{position:absolute;left:0;top:0;width:210mm;height:279mm;min-height:279mm;max-height:279mm;margin:0;padding:10mm 14mm;overflow:hidden;page-break-after:avoid;break-after:avoid}.cspc-consignment-sheet header{padding:6mm}.cspc-consignment-sheet>section{padding:2mm 0}.cspc-consignment-sheet>section strong{font-size:17px}.cspc-consignment-items li{font-size:15px;padding:2px 0}.cspc-print-consignment{color:#000!important}}

/* Garantías 4.0.3: seguimiento interno cronológico */
.cspc-warranty-followup{max-width:980px}.cspc-warranty-note-form{display:grid;gap:12px;margin-bottom:18px}.cspc-warranty-note-form label{display:grid;gap:7px;font-weight:700;color:var(--cspc-navy)}.cspc-warranty-note-form textarea{width:100%;min-height:92px;resize:vertical}.cspc-warranty-note-list{display:grid;gap:10px}.cspc-warranty-note{padding:14px 16px;border:1px solid var(--cspc-border);border-left:4px solid var(--cspc-gold);border-radius:10px;background:#fbfcfe}.cspc-warranty-note-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-bottom:7px}.cspc-warranty-note-meta strong{color:var(--cspc-navy)}.cspc-warranty-note-meta span{color:var(--cspc-muted);font-size:12px}.cspc-warranty-note-meta em{padding:2px 8px;border-radius:999px;background:#eef4fb;color:#244d75;font-size:11px;font-style:normal;font-weight:700}.cspc-warranty-note p{margin:0;white-space:normal;line-height:1.5}.cspc-warranty-note.is-client-visible{border-left-color:#16865a;background:#f7fcf9}.cspc-warranty-note.is-client-visible .cspc-warranty-note-meta em{background:#e5f7ee;color:#176744}.cspc-warranty-note-visibility{margin-left:auto}.cspc-warranty-note-visibility .cspc-button{min-height:32px;padding:5px 10px;font-size:11px}.cspc-warranty-visible-check{display:flex!important;grid-template-columns:none!important;align-items:flex-start!important;gap:8px!important;padding:10px 12px;border:1px solid var(--cspc-border);border-radius:9px;background:#f7f9fc}.cspc-warranty-visible-check input{margin-top:2px}.cspc-warranty-visible-check span{font-weight:400;color:var(--cspc-muted);font-size:12px}.cspc-warranty-note-empty{padding:14px;border:1px dashed var(--cspc-border);border-radius:10px;color:var(--cspc-muted);background:#fafbfc}

/* V4.0.6 — Garantías compactas y políticas DormiNova */
.cspc-warranty-sheet .cspc-warranty-copy {
    min-height: 0;
    flex: 0 0 auto;
    padding: 7px 9px;
}
.cspc-warranty-sheet .cspc-warranty-policy-text {
    display: block;
    font-size: 9.2px;
    line-height: 1.32;
    text-align: justify;
    hyphens: none;
}
.cspc-warranty-sheet .cspc-warranty-policy-text .cspc-policy-line {
    display: block;
    padding: 0;
    margin: 0 0 5px;
}
.cspc-warranty-sheet .cspc-warranty-policy-text .cspc-policy-line:last-child { margin-bottom: 0; }
.cspc-warranty-sheet .cspc-doc-meta > div { min-height: 49px; }
.cspc-warranty-sheet .cspc-doc-meta span { line-height: 1.2; overflow-wrap: anywhere; }

@media print {
    .cspc-warranty-sheet { min-height: 0; }
    .cspc-warranty-sheet .cspc-warranty-copy {
        min-height: 0;
        flex: 0 0 auto;
        margin: 5px 0 7px;
        padding: 6px 8px;
    }
    .cspc-warranty-sheet .cspc-warranty-policy-text {
        display: block;
        font-size: 8.2px;
        line-height: 1.28;
        text-align: justify;
    }
    .cspc-warranty-sheet .cspc-warranty-policy-text .cspc-policy-line + .cspc-policy-line { padding-top: 0; }
    .cspc-warranty-sheet .cspc-warranty-policy-text .cspc-policy-line { margin-bottom: 4px; }
    .cspc-warranty-sheet .cspc-doc-meta { margin: 4px 0 5px; }
    .cspc-warranty-sheet .cspc-doc-meta > div { min-height: 45px; padding: 4px 6px; }
    .cspc-warranty-sheet .cspc-warranty-table { margin: 4px 0 5px; }
    .cspc-warranty-sheet .cspc-warranty-table th { padding: 2px 3px; }
    .cspc-warranty-sheet .cspc-warranty-table td { padding: 2px 3px; line-height: 1.08; }
}

/* === 4.0.7 · Documento empresarial unificado / impresión fiel === */
.print-only{display:none!important}
.cspc-warranty-inline-notes{margin:6px 0 8px;border:1px solid #b8c1cf;background:#fff;color:#172033}
.cspc-warranty-inline-notes-head{display:flex;justify-content:space-between;gap:12px;padding:5px 8px;background:#eef4fb;color:#08264c;border-bottom:1px solid #c8d2df;font-size:8px;letter-spacing:.04em}
.cspc-warranty-inline-note{display:grid;grid-template-columns:120px 1fr;gap:8px;padding:5px 8px;border-bottom:1px solid #e1e6ed;break-inside:avoid;page-break-inside:avoid}
.cspc-warranty-inline-note:last-child{border-bottom:0}
.cspc-warranty-inline-note>div{display:flex;flex-direction:column;gap:1px;font-size:7.7px;color:#596579}
.cspc-warranty-inline-note>div strong{color:#08264c;font-size:8px}
.cspc-warranty-inline-note p{margin:0;font-size:8.5px;line-height:1.3;white-space:normal}

/* Pantalla e impresión comparten la misma escala visual del certificado. */
.cspc-warranty-sheet .cspc-warranty-copy{margin:6px 0 8px;padding:7px 9px;border-color:#aeb9c8}
.cspc-warranty-sheet .cspc-warranty-copy h2{font-size:11.5px;margin:0 0 5px}
.cspc-warranty-sheet .cspc-warranty-policy-text{font-size:10.2px;line-height:1.34;text-align:justify;hyphens:none}
.cspc-warranty-sheet .cspc-warranty-policy-text .cspc-policy-line{margin:0 0 4px;padding:0}
.cspc-warranty-sheet .cspc-warranty-policy-text .cspc-policy-line:last-child{margin-bottom:0}

@media print{
    /* Garantía: la salida se genera desde el mismo HTML que se ve en el sistema. */
    .cspc-warranty-sheet{width:100%;min-height:267mm;margin:0;padding:0;display:flex;flex-direction:column;box-shadow:none;print-color-adjust:exact;-webkit-print-color-adjust:exact}
    .cspc-warranty-sheet .cspc-print-header{gap:16px}
    .cspc-warranty-sheet .cspc-print-company{font-size:10.5px;line-height:1.35}
    .cspc-warranty-sheet .cspc-print-company h2{margin:0 0 5px;font-size:16px}
    .cspc-warranty-sheet .cspc-print-company strong{font-size:12px}
    .cspc-warranty-sheet .cspc-logo-print{gap:8px}
    .cspc-warranty-sheet .cspc-logo-print .cspc-logo-sanpablo{width:112px;height:69px}
    .cspc-warranty-sheet .cspc-logo-print .cspc-logo-dorminova{width:108px;height:45px}
    .cspc-warranty-sheet .cspc-print-strip{margin:6px 0 8px}
    .cspc-warranty-sheet .cspc-print-title>div{padding:8px 10px}
    .cspc-warranty-sheet .cspc-print-title h1{font-size:15px}
    .cspc-warranty-sheet .cspc-print-title strong{font-size:14px}
    .cspc-warranty-sheet .cspc-doc-meta{margin:7px 0}
    .cspc-warranty-sheet .cspc-doc-meta>div{min-height:49px;padding:6px 8px}
    .cspc-warranty-sheet .cspc-doc-meta small{font-size:7.5px}
    .cspc-warranty-sheet .cspc-doc-meta strong{font-size:10px}
    .cspc-warranty-sheet .cspc-doc-meta span{font-size:8.2px;line-height:1.2}
    .cspc-warranty-sheet .cspc-warranty-table{margin:5px 0 7px}
    .cspc-warranty-sheet .cspc-warranty-table th{padding:3px 4px;font-size:7.2px}
    .cspc-warranty-sheet .cspc-warranty-table td{padding:3px 4px;font-size:8px;line-height:1.14}
    .cspc-warranty-sheet .cspc-warranty-copy{min-height:0;flex:0 0 auto;margin:6px 0 8px;padding:7px 9px;break-inside:auto;page-break-inside:auto}
    .cspc-warranty-sheet .cspc-warranty-copy h2{font-size:11.5px;margin-bottom:5px}
    .cspc-warranty-sheet .cspc-warranty-policy-text{display:block;font-size:10.2px;line-height:1.34;text-align:justify}
    .cspc-warranty-sheet .cspc-warranty-policy-text .cspc-policy-line{margin:0 0 4px;padding:0}
    .cspc-warranty-sheet .cspc-doc-sign{margin:10px auto 7px}
    .cspc-warranty-sheet .cspc-print-footer{margin-top:auto}
    body.cspc-print-warranty-notes .cspc-warranty-all-notes{display:block!important}
    body.cspc-print-warranty-client-notes .cspc-warranty-client-notes{display:block!important}
    body:not(.cspc-print-warranty-notes) .cspc-warranty-all-notes{display:none!important}
    body:not(.cspc-print-warranty-client-notes) .cspc-warranty-client-notes{display:none!important}
}

/* === 4.0.8 · Correcciones protegidas de Apartados === */
.cspc-correction-panel > summary{cursor:pointer;padding:14px 16px;display:flex;gap:10px;align-items:center;justify-content:space-between}
.cspc-correction-panel[open] > summary{border-bottom:1px solid #e5e7eb;margin-bottom:14px}
.cspc-payment-correction{min-width:150px}
.cspc-payment-correction details{margin:0 0 6px}
.cspc-payment-correction summary{cursor:pointer;font-weight:700}
.cspc-payment-correction form{display:grid;gap:7px;padding:10px 0;min-width:220px}
.cspc-payment-correction label{display:grid;gap:3px;font-size:12px}

/* === CRM 4.1.0 ========================================================== */
.cspc-crm-import{border:1px solid #d7e3f1;background:linear-gradient(180deg,#fff 0%,#f7fbff 100%)}
.cspc-crm-import-grid,.cspc-crm-profile-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}
.cspc-crm-import-grid>div,.cspc-crm-profile-grid>div{border:1px solid #dce6f2;background:#fff;border-radius:12px;padding:14px 16px;display:flex;flex-direction:column;gap:4px}
.cspc-crm-import-grid strong,.cspc-crm-profile-grid strong{font-size:20px;color:#0b2b55}
.cspc-crm-import-grid small,.cspc-crm-profile-grid small{color:#62748b}
.cspc-chip{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:800;white-space:nowrap;background:#eef3f8;color:#465970}
.cspc-chip.is-success{background:#e9f8ef;color:#17633a}
.cspc-chip.is-warning{background:#fff5d9;color:#815c00}
.cspc-chip.is-neutral{background:#eef2f6;color:#4c5e72}
.cspc-crm-followup-card{border:1px solid #dfe7ef;border-radius:14px;background:#fff;padding:14px 16px;margin:12px 0;box-shadow:0 4px 14px rgba(14,42,72,.04)}
.cspc-crm-followup-card.is-due{border-color:#e4b74d;background:linear-gradient(180deg,#fffdf6 0%,#fff 100%)}
.cspc-crm-followup-main{display:grid;grid-template-columns:160px minmax(260px,1fr) 210px;gap:14px;align-items:center}
.cspc-crm-followup-main small{font-weight:800;color:#5b6a7c}
.cspc-crm-followup-main strong{color:#0b2b55}
.cspc-crm-followup-main span{color:#5b6a7c}
.cspc-crm-followup-actions{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap}
.cspc-crm-followup-form{display:grid;grid-template-columns:180px minmax(220px,1fr) 180px 1fr auto;gap:10px;align-items:end;margin-top:12px;padding-top:12px;border-top:1px dashed #d9e2ec}
.cspc-crm-followup-form label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:700;color:#506078}
.cspc-crm-followup-form input,.cspc-crm-followup-form select,.cspc-crm-followup-form textarea{width:100%}
.cspc-crm-followup-form .cspc-span-2{grid-column:span 1}
.cspc-button-whatsapp{background:#1f8f5f!important;border-color:#1f8f5f!important;color:#fff!important}
.cspc-button-whatsapp:hover{background:#18744d!important;border-color:#18744d!important;color:#fff!important}
@media (max-width:1100px){.cspc-crm-import-grid,.cspc-crm-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cspc-crm-followup-main{grid-template-columns:1fr}.cspc-crm-followup-form{grid-template-columns:repeat(2,minmax(0,1fr))}.cspc-crm-followup-form button{grid-column:span 2}}
@media (max-width:680px){.cspc-crm-import-grid,.cspc-crm-profile-grid{grid-template-columns:1fr}.cspc-crm-followup-form{grid-template-columns:1fr}.cspc-crm-followup-form button{grid-column:auto}}

/* === 4.1.1 · Entregas institucionales ==================================== */
.cspc-institutional-form{display:grid;gap:18px}
.cspc-institutional-form label{display:flex;flex-direction:column;gap:6px;color:#344054;font-size:13px;font-weight:750}
.cspc-institutional-form label>span{display:block}
.cspc-institutional-form input,.cspc-institutional-form select,.cspc-institutional-form textarea{width:100%;min-height:42px;padding:9px 11px;color:var(--cspc-text);background:#fff;border:1px solid #cfd6e2;border-radius:8px;outline:none;box-sizing:border-box}
.cspc-institutional-form textarea{min-height:72px;resize:vertical}
.cspc-institutional-form input:focus,.cspc-institutional-form textarea:focus{border-color:var(--cspc-blue);box-shadow:0 0 0 3px rgba(10,86,137,.12)}
.cspc-form-grid{display:grid;gap:14px}.cspc-form-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.cspc-form-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.cspc-institutional-entry-table input{min-width:110px}.cspc-institutional-entry-table td:first-child input{min-width:320px}.cspc-institutional-entry-table td:not(:first-child){text-align:center}.cspc-institutional-entry-table th:not(:first-child){text-align:center}
.cspc-institutional-footer-fields strong{color:#9a5d00}
.cspc-institutional-history{margin-top:18px}

.cspc-institutional-sheet{width:8.5in;height:11in;max-height:11in;margin:0 auto 24px;padding:.28in .34in .22in;box-sizing:border-box;background:#fff;color:#172033;box-shadow:0 6px 34px rgba(0,0,0,.12);display:flex;flex-direction:column;overflow:hidden}
.cspc-institutional-letterhead{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:74px}
.cspc-institutional-letterhead .cspc-logo-lockup{flex:0 0 auto}
.cspc-institutional-title{display:grid;grid-template-columns:1fr 168px;border:1px solid #9da9ba}
.cspc-institutional-title>div{padding:7px 9px}.cspc-institutional-title>div+div{border-left:1px solid #9da9ba;text-align:center}
.cspc-institutional-title small{display:block;color:#596579;font-size:7px;font-weight:800;letter-spacing:.1em}.cspc-institutional-title h1{margin:2px 0 0;color:var(--cspc-navy);font-size:14px;line-height:1.15}.cspc-institutional-title strong{display:block;margin-top:4px;color:var(--cspc-navy);font-size:12.5px}
.cspc-institutional-meta{display:grid;grid-template-columns:repeat(4,1fr);margin:6px 0;border:1px solid #9da9ba}.cspc-institutional-meta>div{min-height:39px;padding:4px 6px;border-right:1px solid #c3cad4;border-bottom:1px solid #c3cad4;box-sizing:border-box}.cspc-institutional-meta>div:nth-last-child(-n+2){border-bottom:0}.cspc-institutional-meta .wide{grid-column:span 2}.cspc-institutional-meta dt{color:#596579;font-size:6.8px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}.cspc-institutional-meta dd{margin:3px 0 0;font-size:8.4px;font-weight:750;line-height:1.15;overflow-wrap:anywhere}
.cspc-institutional-doc-table{width:100%;border-collapse:collapse;table-layout:fixed;margin-top:1px}.cspc-institutional-doc-table th{padding:4px 3px;color:#fff;background:var(--cspc-navy);border:1px solid var(--cspc-navy-dark);font-size:6.8px;line-height:1.1;text-align:center;text-transform:uppercase}.cspc-institutional-doc-table td{height:20px;padding:3px 4px;border:1px solid #9da9ba;font-size:7.7px;line-height:1.1;vertical-align:middle;text-align:center}.cspc-institutional-doc-table td:first-child{text-align:left;font-weight:700}.cspc-institutional-doc-table th:first-child{width:42%;text-align:left}.cspc-institutional-doc-table th:nth-child(n+2){width:11.6%}.cspc-institutional-doc-table tfoot th{background:#eef4fb;color:#08264c;border-color:#9da9ba;font-size:7px}
.cspc-institutional-status-row{display:grid;grid-template-columns:1fr 1fr;margin-top:6px;border:1px solid #9da9ba;font-size:8px}.cspc-institutional-status-row>div{padding:5px 7px}.cspc-institutional-status-row>div+div{border-left:1px solid #9da9ba}.cspc-institutional-status-row .pending-date{background:#fff4cf;color:#704c00}.cspc-institutional-notes{margin-top:4px;padding:5px 7px;border:1px solid #c7cfda;font-size:7.7px;line-height:1.18}.cspc-institutional-declaration{margin:6px 2px 0;font-size:7.5px;line-height:1.25;color:#445066}
.cspc-institutional-signatures{display:grid;grid-template-columns:1fr 1fr 118px;gap:18px;align-items:end;margin-top:auto;padding:16px 6px 8px}.cspc-institutional-signatures>div{text-align:center;font-size:7.5px}.cspc-institutional-signatures .line{display:block;height:24px;border-bottom:1px solid #344054;margin-bottom:4px}.cspc-institutional-signatures strong{display:block;color:#08264c;font-size:7.7px}.cspc-institutional-signatures small{display:block;margin-top:2px;color:#596579;font-size:6.8px}.cspc-institutional-signatures .stamp span{display:block;height:42px;border:1px dashed #9da9ba;border-radius:4px;margin-bottom:4px}
.cspc-institutional-footer{padding:5px 8px;color:#fff;background:var(--cspc-blue);font-size:6.8px;text-align:center}

@media(max-width:900px){.cspc-form-grid-3,.cspc-form-grid-2{grid-template-columns:1fr}.cspc-institutional-sheet{width:100%;height:auto;max-height:none;min-height:11in}.cspc-institutional-meta{grid-template-columns:repeat(2,1fr)}.cspc-institutional-meta .wide{grid-column:span 2}}

@media print{
    @page{size:Letter portrait;margin:0}
    body:has(.cspc-institutional-sheet) *{visibility:hidden!important}
    body:has(.cspc-institutional-sheet) .cspc-institutional-sheet,body:has(.cspc-institutional-sheet) .cspc-institutional-sheet *{visibility:visible!important}
    .cspc-institutional-sheet{position:absolute;left:0;top:0;width:8.5in;height:11in;max-height:11in;margin:0;padding:.25in .30in .18in;box-shadow:none;overflow:hidden;page-break-after:avoid;break-after:avoid;print-color-adjust:exact;-webkit-print-color-adjust:exact}
    .cspc-institutional-letterhead{min-height:68px}.cspc-institutional-doc-table td{height:18px;padding:2px 3px;font-size:7.2px}.cspc-institutional-doc-table th{padding:3px 2px;font-size:6.4px}.cspc-institutional-signatures{padding-top:11px}.cspc-institutional-signatures .line{height:20px}
}

/* === 4.2.1 · Eliminación controlada y márgenes seguros de garantía === */
.cspc-warranty-note-actions{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-left:auto}
.cspc-warranty-note-actions .cspc-warranty-note-visibility{margin-left:0}
.cspc-warranty-note-delete .cspc-button{display:inline-flex;align-items:center;gap:4px;min-height:32px;padding:5px 10px;font-size:11px}
.cspc-warranty-note-delete .dashicons{width:15px;height:15px;font-size:15px}

@page cspcWarranty{size:Letter portrait;margin:7mm 8mm 8mm}
@media print{
    /* Página exclusiva para Garantías: evita que las reglas a borde completo de
       encomiendas e institucionales recorten el membrete o sus contornos. */
    .cspc-warranty-sheet{page:cspcWarranty;width:auto!important;max-width:100%!important;min-height:calc(279.4mm - 15mm)!important;height:auto!important;margin:0!important;padding:0!important;overflow:visible!important;box-sizing:border-box!important}
    .cspc-warranty-sheet *{box-sizing:border-box;max-width:100%}
    .cspc-warranty-sheet .cspc-print-header,
    .cspc-warranty-sheet .cspc-print-title,
    .cspc-warranty-sheet .cspc-doc-meta,
    .cspc-warranty-sheet .cspc-warranty-table,
    .cspc-warranty-sheet .cspc-warranty-copy,
    .cspc-warranty-sheet .cspc-print-footer{width:100%;margin-left:0;margin-right:0}
    .cspc-warranty-sheet .cspc-warranty-inline-notes{width:100%;overflow-wrap:anywhere;break-inside:auto;page-break-inside:auto}
    .cspc-warranty-sheet .cspc-warranty-inline-note{grid-template-columns:30mm minmax(0,1fr);overflow-wrap:anywhere}
    .cspc-warranty-sheet .cspc-print-footer{break-inside:avoid;page-break-inside:avoid}
}

/* v4.1.2 · filtros de Entregas Institucionales.
   No usar el estilo de búsqueda del tema de WordPress: mantiene la vista dentro del sistema. */
.cspc-filter-row{display:grid;grid-template-columns:minmax(240px,1.6fr) minmax(180px,.75fr) auto auto;gap:10px;align-items:center;margin:0 0 16px}
.cspc-filter-row input[type="search"],.cspc-filter-row select{width:100%;min-width:0;min-height:42px;padding:9px 11px;color:var(--cspc-text);background:#fff;border:1px solid #cfd6e2;border-radius:8px;box-sizing:border-box;outline:none}
.cspc-filter-row input[type="search"]:focus,.cspc-filter-row select:focus{border-color:var(--cspc-blue);box-shadow:0 0 0 3px rgba(10,86,137,.12)}
@media(max-width:760px){.cspc-filter-row{grid-template-columns:1fr}.cspc-filter-row .cspc-button{width:100%;justify-content:center}}


/* === 4.1.3 · Edición institucional a ancho completo =======================
   Evita que la tabla de productos fuerce al navegador a reducir toda la
   pantalla. En equipos angostos solo la tabla se desplaza horizontalmente. */
.cspc-institutional-edit-panel{width:100%;max-width:none;min-width:0;overflow:visible}
.cspc-institutional-edit-panel .cspc-form-grid,.cspc-institutional-edit-panel .cspc-form-grid>*{min-width:0}
.cspc-institutional-edit-panel .cspc-table-wrap{display:block;width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}
.cspc-institutional-edit-panel .cspc-institutional-entry-table{width:100%;min-width:760px;table-layout:auto}
.cspc-institutional-edit-panel .cspc-institutional-entry-table input,.cspc-institutional-edit-panel .cspc-institutional-entry-table textarea,.cspc-institutional-edit-panel .cspc-institutional-entry-table select{width:100%;min-width:0!important;max-width:100%}
.cspc-institutional-edit-panel .cspc-institutional-entry-table td:first-child input{min-width:220px!important}
@media(max-width:900px){
    .cspc-institutional-edit-panel{padding:16px}
    .cspc-institutional-edit-panel .cspc-institutional-entry-table{min-width:720px}
    .cspc-institutional-edit-panel .cspc-head-actions{justify-content:flex-start}
}


/* === 4.1.4 · Bandeja de Encomiendas para Ventas ========================= */
.cspc-consignment-filter{align-items:end}
.cspc-consignment-table td{vertical-align:middle}
.cspc-consignment-table td:nth-child(2),
.cspc-consignment-table td:nth-child(3){min-width:190px}
.cspc-consignment-actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center;min-width:280px}
.cspc-consignment-actions .cspc-button{white-space:nowrap}
@media (max-width:900px){
  .cspc-consignment-actions{min-width:240px}
}


/* === 4.1.5 · Boleta de encomienda visible al cerrar la venta ============ */
.cspc-button-consignment{background:#0f6d74!important;color:#fff!important;border-color:#0f6d74!important;font-weight:800!important}
.cspc-button-consignment:hover{filter:brightness(.94);color:#fff!important}
.cspc-button-consignment-secondary{background:#fff!important;color:#0f5960!important;border:1px solid #0f6d74!important;font-weight:750!important}
.cspc-consignment-alert{display:flex!important;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;border-left:5px solid #0f6d74!important}
.cspc-consignment-alert>div:first-child{display:flex;flex-direction:column;gap:3px}
.cspc-consignment-sale-actions{display:flex;gap:8px;flex-wrap:wrap}
.cspc-row-link-consignment{font-weight:800;color:#0f6d74!important;white-space:nowrap}
@media(max-width:900px){.cspc-consignment-alert{align-items:stretch}.cspc-consignment-sale-actions .cspc-button{flex:1 1 210px;justify-content:center}}


/* === 4.1.7 · Boleta de Encomienda editable + autoajuste a una página ======
   Mantiene el membrete unificado y cambia escala/espacios según el contenido.
   La regla principal es: mostrar TODA la información en una sola página carta. */
.cspc-consignment-toggle [data-consignment-fields][hidden]{display:none!important}
.cspc-consignment-toggle>summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cspc-consignment-toggle>summary small{color:#667085;font-weight:600}
.cspc-consignment-sheet{
  --cspc-consign-value:18px;--cspc-consign-item:15.5px;--cspc-consign-label:9.4px;
  --cspc-consign-section-pad:7px;--cspc-consign-item-pad:4px;--cspc-consign-title:16px;
  gap:0;padding:.28in .34in .22in;width:8.5in;height:11in;min-height:11in;max-height:11in;
  overflow:hidden;box-sizing:border-box
}
.cspc-consignment-fit-spacious{--cspc-consign-value:20px;--cspc-consign-item:17px;--cspc-consign-label:10px;--cspc-consign-section-pad:9px;--cspc-consign-item-pad:5px;--cspc-consign-title:17px}
.cspc-consignment-fit-normal{--cspc-consign-value:17px;--cspc-consign-item:14.5px;--cspc-consign-label:9px;--cspc-consign-section-pad:6px;--cspc-consign-item-pad:3px;--cspc-consign-title:15.5px}
.cspc-consignment-fit-compact{--cspc-consign-value:14px;--cspc-consign-item:12.2px;--cspc-consign-label:8px;--cspc-consign-section-pad:4px;--cspc-consign-item-pad:2px;--cspc-consign-title:14px}
.cspc-consignment-fit-dense{--cspc-consign-value:11.5px;--cspc-consign-item:10.2px;--cspc-consign-label:7.2px;--cspc-consign-section-pad:2.5px;--cspc-consign-item-pad:1px;--cspc-consign-title:12.8px}
.cspc-consignment-fit-micro{--cspc-consign-value:9.5px;--cspc-consign-item:8.6px;--cspc-consign-label:6.5px;--cspc-consign-section-pad:1.5px;--cspc-consign-item-pad:0;--cspc-consign-title:11.5px}
.cspc-consignment-sheet .cspc-consignment-letterhead{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:74px;padding:0;background:#fff;color:#172033;border:0;text-align:left;flex:0 0 auto}
.cspc-consignment-sheet .cspc-consignment-letterhead .cspc-print-company h2{color:var(--cspc-navy)}
.cspc-consignment-sheet .cspc-print-strip{margin:5px 0 8px;flex:0 0 auto}
.cspc-consignment-title{display:grid;grid-template-columns:1fr 168px;border:1px solid #9da9ba;margin-bottom:5px;flex:0 0 auto}
.cspc-consignment-title>div{padding:6px 9px}
.cspc-consignment-title>div+div{border-left:1px solid #9da9ba;text-align:center}
.cspc-consignment-title small{display:block;color:#596579;font-size:7px;font-weight:800;letter-spacing:.1em}
.cspc-consignment-title h1{margin:2px 0 0;color:var(--cspc-navy);font-size:var(--cspc-consign-title);line-height:1.1}
.cspc-consignment-title strong{display:block;margin-top:3px;color:var(--cspc-navy);font-size:calc(var(--cspc-consign-title) * .82)}
.cspc-consignment-sheet>section{padding:var(--cspc-consign-section-pad) 0;text-align:center;flex:0 0 auto;min-height:0}
.cspc-consignment-sheet>section small{font-size:var(--cspc-consign-label);line-height:1.05}
.cspc-consignment-sheet>section strong{font-size:var(--cspc-consign-value);line-height:1.14;overflow-wrap:anywhere;word-break:normal}
.cspc-consignment-items ul{list-style:none;margin:3px auto 0;padding:0;max-width:7.45in}
.cspc-consignment-items li{padding:var(--cspc-consign-item-pad) 0;font-size:var(--cspc-consign-item);line-height:1.15;font-weight:700;overflow-wrap:anywhere}
.cspc-consignment-disclaimer{margin-top:auto;padding:5px 8px;text-align:center;color:#596579;font-size:max(6px,calc(var(--cspc-consign-label) * .82));font-weight:750;border-top:1px solid #d7dfe8;flex:0 0 auto}
.cspc-consignment-sheet footer.cspc-institutional-footer{margin-top:0;padding:5px 8px;border:0;color:#fff;background:var(--cspc-blue);font-size:max(5.8px,calc(var(--cspc-consign-label) * .76));text-align:center;flex:0 0 auto}
@media(max-width:900px){.cspc-consignment-sheet{width:100%;height:auto;min-height:auto;max-height:none;padding:18px;overflow:visible}.cspc-consignment-title{grid-template-columns:1fr 130px}}
@media print{
    @page{size:Letter portrait;margin:0}
    .cspc-consignment-sheet{position:absolute;left:0;top:0;width:8.5in!important;height:11in!important;min-height:11in!important;max-height:11in!important;margin:0;padding:.22in .28in .16in;box-shadow:none;overflow:hidden!important;page-break-after:avoid;break-after:avoid;print-color-adjust:exact;-webkit-print-color-adjust:exact}
    .cspc-consignment-sheet .cspc-consignment-letterhead{min-height:66px;padding:0;background:#fff!important;color:#172033!important;border:0!important;text-align:left!important}
    .cspc-consignment-sheet .cspc-print-strip{margin:4px 0 6px}
    .cspc-consignment-title{margin-bottom:4px}
}

/* La regla se repite al final para prevalecer sobre los documentos a borde
   completo definidos arriba. Solo se aplica a páginas de Garantía. */
@page cspcWarranty{size:Letter portrait;margin:7mm 8mm 8mm}
@media print{
    .cspc-warranty-sheet{page:cspcWarranty;width:auto!important;max-width:100%!important;min-height:calc(279.4mm - 15mm)!important;height:auto!important;margin:0!important;padding:0!important;overflow:visible!important;box-sizing:border-box!important}
}

/* === 4.3.8 · Administrativo: documentos con membrete de referencia ===== */
.cspc-internal-document-form{width:100%;max-width:none!important}.cspc-internal-document-form .cspc-field-grid{width:100%}.cspc-internal-document-form textarea{width:100%;min-height:430px;font-family:Arial,sans-serif;line-height:1.55}.cspc-internal-document-form .cspc-check-field{min-width:0}.cspc-internal-send{width:100%;max-width:none;margin:22px 0}
.cspc-internal-document-sheet{width:8.5in;min-height:11in;margin:0 auto 24px;padding:.42in .50in .25in;display:flex;flex-direction:column;box-sizing:border-box;color:#111;background:#fff;box-shadow:0 6px 34px rgba(0,0,0,.12);font-family:Arial,Helvetica,sans-serif}
.cspc-internal-letterhead{display:flex;justify-content:space-between;align-items:flex-start;gap:22px;break-inside:avoid;page-break-inside:avoid}.cspc-internal-company{display:flex;flex-direction:column;flex:1 1 auto}.cspc-internal-letterhead h2{margin:0 0 7px;color:#062b62;font-size:20px;line-height:1.05;letter-spacing:.01em}.cspc-internal-letterhead strong{font-size:12px;font-style:italic;line-height:1.35}.cspc-internal-letterhead span{font-size:11px;font-weight:700;line-height:1.35;font-style:italic}.cspc-internal-logos{display:flex;align-items:flex-start;justify-content:flex-end;gap:20px;flex:0 0 auto;padding-top:2px}.cspc-internal-logos img{width:auto;max-width:122px;max-height:61px;object-fit:contain}.cspc-internal-strip{height:10px;margin:7px 0 48px;background:linear-gradient(90deg,#062b62 0 20%,#b98622 20% 40%,#ddd8cc 40% 60%,#7d899f 60% 80%,#062b62 80%);break-inside:avoid;page-break-inside:avoid}.cspc-internal-document-meta{display:flex;justify-content:flex-end;margin:0 5px 50px;font-size:11px;color:#4c4c4c;break-inside:avoid;page-break-inside:avoid}.cspc-internal-document-sheet>h1{margin:0 0 28px;padding:8px 10px;border:1px solid #c7c9cd;color:#062b62;background:#f2f3f4;font-size:13px;line-height:1.15;text-align:center;text-transform:uppercase;break-inside:avoid;page-break-inside:avoid}.cspc-internal-recipient{margin:0 0 17px;font-size:11pt;line-height:1.6}.cspc-internal-body{font-size:11pt;line-height:1.65;text-align:justify;text-justify:inter-word;overflow-wrap:anywhere}.cspc-internal-body p{margin:0 0 18px}.cspc-internal-signature{display:flex;flex-direction:column;align-items:flex-start;margin-top:62px;break-inside:avoid;page-break-inside:avoid}.cspc-internal-signature>span:first-child{font-size:11pt;margin-bottom:14px}.cspc-internal-signature img{width:145px;height:58px;margin:0 0 -5px;object-fit:contain;object-position:left center}.cspc-internal-signature strong{margin-top:0;font-size:11pt}.cspc-internal-signature span{font-size:11pt}.cspc-internal-signature em{margin-top:26px;font-size:11pt;font-style:normal}.cspc-internal-document-sheet>footer{margin-top:auto;padding:5px 8px;color:#fff;background:#075286;font-size:7.2px;text-align:center;white-space:nowrap;break-inside:avoid;page-break-inside:avoid}
@media(max-width:900px){.cspc-internal-document-sheet{width:100%;min-height:auto;padding:22px}.cspc-internal-letterhead{align-items:flex-start;flex-direction:column}.cspc-internal-logos{justify-content:flex-start}.cspc-internal-document-sheet>footer{white-space:normal}}
@page cspcInternalDocument{size:Letter portrait;margin:0}
@media print{
    .cspc-internal-document-sheet{page:cspcInternalDocument;width:215.9mm!important;max-width:215.9mm!important;min-height:279.4mm!important;height:auto!important;margin:0!important;padding:10.5mm 12.7mm 6.4mm!important;box-shadow:none!important;overflow:visible!important;break-after:auto!important;page-break-after:auto!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
    .cspc-internal-document-sheet *{box-sizing:border-box;max-width:100%}
    .cspc-internal-letterhead h2{font-size:20px}.cspc-internal-letterhead strong{font-size:12px}.cspc-internal-letterhead span{font-size:11px}.cspc-internal-logos img{max-width:122px;max-height:61px}
    .cspc-internal-strip{height:10px;margin-bottom:48px}.cspc-internal-document-meta{margin-bottom:50px}.cspc-internal-document-sheet>h1{font-size:13px}.cspc-internal-recipient,.cspc-internal-body{font-size:11pt}.cspc-internal-signature{margin-top:16mm}.cspc-internal-document-sheet>footer{margin-top:auto!important}
    body.cspc-print-warranty-notes .cspc-warranty-sheet,body.cspc-print-warranty-client-notes .cspc-warranty-sheet{min-height:0!important;break-after:avoid!important;page-break-after:avoid!important}
    body.cspc-print-warranty-notes .cspc-warranty-sheet .cspc-print-footer,body.cspc-print-warranty-client-notes .cspc-warranty-sheet .cspc-print-footer{margin-top:6mm!important}
    .cspc-warranty-sheet:last-child{break-after:avoid!important;page-break-after:avoid!important}
}

/* 4.3.2 overrides: hoja Carta completa, sin recortes ni páginas vacías. */
.cspc-contact-layout{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:20px;align-items:start}.cspc-mail-account{min-width:0;padding:18px;border:1px solid #d8dee9;border-radius:10px}.cspc-mail-account legend{padding:0 8px;color:#08264c;font-weight:800}.cspc-mail-tabs{display:flex;gap:10px;margin-bottom:16px}.cspc-mail-message{white-space:pre-wrap;line-height:1.6}.cspc-internal-signature img{width:145px!important;height:58px!important;margin:0 0 -5px!important;object-fit:contain;object-position:left center}
@media(max-width:900px){.cspc-contact-layout{grid-template-columns:1fr}}
.cspc-admin-tabs{display:flex;flex-wrap:wrap;gap:9px;margin:0 0 18px}.cspc-admin-tabs .dashicons{font-size:17px;width:17px;height:17px}
.cspc-webmail{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:650px;border:1px solid #dce2eb;border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 8px 26px rgba(19,37,68,.08)}.cspc-mail-sidebar{padding:18px 12px;background:#f7f9fc;border-right:1px solid #e1e6ee}.cspc-mail-compose-button{display:flex!important;justify-content:center;width:100%;margin-bottom:17px}.cspc-mail-sidebar nav{display:flex;flex-direction:column;gap:3px}.cspc-mail-sidebar nav a,.cspc-mail-label-link{display:flex;align-items:center;gap:9px;padding:9px 11px;border-radius:8px;color:#243550;text-decoration:none;font-weight:700}.cspc-mail-sidebar nav a:hover,.cspc-mail-sidebar nav a.is-active,.cspc-mail-label-link:hover{background:#e9eef8;color:#202269}.cspc-mail-label-head{margin:23px 10px 8px;color:#6b778c;text-transform:uppercase;font-size:11px;letter-spacing:.08em}.cspc-mail-label-link span{width:10px;height:10px;border-radius:50%;background:#d1a900}.cspc-mail-new-label{display:flex;margin:10px 5px}.cspc-mail-new-label input{min-width:0;width:100%;padding:8px;border:1px solid #ccd4e0;border-radius:7px 0 0 7px}.cspc-mail-new-label button{border:0;border-radius:0 7px 7px 0;background:#202269;color:#fff;font-size:18px}.cspc-mail-content{min-width:0}.cspc-mail-toolbar{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:17px 20px;border-bottom:1px solid #e3e8ef}.cspc-mail-toolbar h1{margin:0;color:#172a52;font-size:20px}.cspc-mail-toolbar form{display:flex;gap:7px}.cspc-mail-toolbar input{min-width:280px}.cspc-mail-account-switch{display:flex;gap:10px;margin-top:6px}.cspc-mail-account-switch a{font-size:12px;color:#6d7889;text-decoration:none}.cspc-mail-account-switch a.is-active{color:#202269;font-weight:800}.cspc-mail-list{display:flex;flex-direction:column}.cspc-mail-row{display:grid;grid-template-columns:24px minmax(150px,240px) minmax(220px,1fr) 125px;gap:10px;align-items:center;padding:11px 18px;border-bottom:1px solid #edf0f4;color:#26364e;text-decoration:none}.cspc-mail-row:hover{background:#f7f9fc}.cspc-mail-row.is-unread{background:#f1f5fd}.cspc-mail-row.is-unread strong,.cspc-mail-row.is-unread .cspc-mail-subject{font-weight:850;color:#102a56}.cspc-mail-row time{text-align:right;color:#7a8494;font-size:11px}.cspc-mail-empty{padding:45px;text-align:center;color:#778397}.cspc-mail-compose{margin:20px;max-width:none!important}.cspc-mail-compose textarea{min-height:300px}.cspc-mail-reader-actions{display:flex;flex-wrap:wrap;gap:8px;padding:14px 20px;border-bottom:1px solid #e3e8ef}.cspc-mail-reader-actions form{display:flex;flex-wrap:wrap;gap:7px}.cspc-mail-reader{margin:20px;max-width:none!important}.cspc-mail-reader header{padding-bottom:15px;border-bottom:1px solid #e5e9ef}.cspc-mail-reader header h1{color:#172a52}.cspc-mail-reader>div{padding-top:18px;line-height:1.65;overflow-wrap:anywhere}
@media(max-width:900px){.cspc-webmail{grid-template-columns:1fr}.cspc-mail-sidebar{border-right:0;border-bottom:1px solid #e1e6ee}.cspc-mail-sidebar nav{display:grid;grid-template-columns:repeat(2,1fr)}.cspc-mail-toolbar{align-items:stretch;flex-direction:column}.cspc-mail-toolbar input{min-width:0;width:100%}.cspc-mail-row{grid-template-columns:22px 1fr 90px}.cspc-mail-subject{grid-column:2/4}.cspc-mail-row time{grid-column:3;grid-row:1}}
.cspc-mail-bulk-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:9px;padding:10px 18px;background:#f7f9fc;border-bottom:1px solid #e3e8ef}.cspc-mail-bulk-toolbar label{display:flex;align-items:center;gap:7px;font-weight:700}.cspc-mail-bulk-toolbar input,.cspc-mail-row>input{width:auto!important;min-width:0!important}.cspc-mail-bulk-toolbar select{min-width:165px}.cspc-mail-bulk-form .cspc-mail-row{display:grid;grid-template-columns:26px minmax(0,1fr);padding:0 18px}.cspc-mail-row-link{display:grid;grid-template-columns:24px minmax(150px,240px) minmax(220px,1fr) 125px;gap:10px;align-items:center;padding:11px 0;color:#26364e;text-decoration:none;min-width:0}.cspc-mail-row-link time{text-align:right;color:#7a8494;font-size:11px}.cspc-mail-row.is-unread .cspc-mail-row-link strong,.cspc-mail-row.is-unread .cspc-mail-row-link .cspc-mail-subject{font-weight:850;color:#102a56}@media(max-width:900px){.cspc-mail-bulk-toolbar{align-items:stretch}.cspc-mail-bulk-toolbar select{min-width:0;flex:1}.cspc-mail-bulk-form .cspc-mail-row{grid-template-columns:26px minmax(0,1fr)}.cspc-mail-row-link{grid-template-columns:22px 1fr 90px}.cspc-mail-row-link .cspc-mail-subject{grid-column:2/4}.cspc-mail-row-link time{grid-column:3;grid-row:1}}

/* === 4.3.9 · Administrativo: impresión sin páginas residuales ===========
   Solo Documentos internos. No interviene Facturas ni Garantías. */
@page cspcInternalDocument{size:Letter portrait;margin:0}
@media print{
    html:has(.cspc-internal-document-sheet),
    body.cspc-system-page:has(.cspc-internal-document-sheet){
        width:100%!important;
        min-height:0!important;
        height:auto!important;
        margin:0!important;
        padding:0!important;
        overflow:visible!important;
        background:#fff!important;
    }
    body.cspc-system-page:has(.cspc-internal-document-sheet) .cspc-app,
    body.cspc-system-page:has(.cspc-internal-document-sheet) .cspc-main{
        display:block!important;
        width:100%!important;
        min-height:0!important;
        height:auto!important;
        margin:0!important;
        padding:0!important;
        overflow:visible!important;
    }
    .cspc-internal-document-sheet{
        page:cspcInternalDocument;
        width:215.8mm!important;
        max-width:215.8mm!important;
        min-height:278mm!important;
        height:auto!important;
        margin:0!important;
        padding:10.5mm 12.7mm 6.4mm!important;
        box-shadow:none!important;
        overflow:visible!important;
        box-sizing:border-box!important;
        break-after:avoid!important;
        page-break-after:avoid!important;
        print-color-adjust:exact;
        -webkit-print-color-adjust:exact;
    }
    .cspc-internal-document-sheet:last-child{
        break-after:avoid!important;
        page-break-after:avoid!important;
    }
    .cspc-internal-document-sheet>footer{
        margin-top:auto!important;
        white-space:nowrap!important;
    }
}


/* === 4.4.2 · Interfaz limpia + Documentos administrativos justificados === */
.cspc-internal-body p,.cspc-internal-body li,.cspc-internal-body blockquote{
    text-align:justify;
    text-justify:inter-word;
}
.cspc-nav-compact .cspc-nav-more{position:relative;display:block;margin:0;padding:0}
.cspc-nav-compact .cspc-nav-more>summary{display:inline-flex;align-items:center;gap:7px;padding:15px 17px 13px;border-bottom:3px solid transparent;cursor:pointer;list-style:none;white-space:nowrap;font-weight:700;opacity:.82}
.cspc-nav-compact .cspc-nav-more>summary::-webkit-details-marker{display:none}
.cspc-nav-compact .cspc-nav-more>summary:hover,.cspc-nav-compact .cspc-nav-more.is-active>summary{opacity:1;background:rgba(255,255,255,.06);border-bottom-color:var(--cspc-gold-light)}
.cspc-nav-compact .cspc-nav-dropdown{position:absolute;z-index:1000;top:calc(100% + 6px);left:0;min-width:285px;max-height:70vh;overflow:auto;padding:8px;background:#fff;border:1px solid var(--cspc-border);border-radius:12px;box-shadow:0 14px 38px rgba(9,28,57,.22)}
.cspc-nav-compact .cspc-nav-dropdown a{display:flex;width:100%;padding:10px 12px;border:0;border-radius:8px;color:var(--cspc-navy-dark);opacity:1}
.cspc-nav-compact .cspc-nav-dropdown a:hover,.cspc-nav-compact .cspc-nav-dropdown a.is-active{background:#eef3f8;color:var(--cspc-navy);border:0}
.cspc-nav-compact .cspc-nav-dropdown a.cspc-nav-admin{color:var(--cspc-navy-dark);background:#f8f1e2}
.cspc-nav-compact .cspc-nav-dropdown a.cspc-nav-admin:hover,.cspc-nav-compact .cspc-nav-dropdown a.cspc-nav-admin.is-active{background:#ead7aa;color:#342500}
.cspc-sales-compact-note{margin:0 0 16px}
.cspc-sales-mode-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:end}
@media(max-width:760px){.cspc-nav-compact .cspc-nav-more{width:auto}.cspc-nav-compact .cspc-nav-dropdown{position:fixed;left:12px;right:12px;top:auto;min-width:0;max-height:65vh}.cspc-sales-mode-actions{width:100%}}

/* === 4.4.3 · Editor enriquecido en Administrativo: Documentos y Correo === */
.cspc-rich-label{display:block;margin:0 0 7px;font-weight:800;color:var(--cspc-navy-dark)}
.cspc-rich-editor{border:1px solid #cbd4e1;border-radius:10px;background:#fff;overflow:hidden;box-shadow:inset 0 1px 1px rgba(15,35,65,.03)}
.cspc-rich-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:7px 8px;border-bottom:1px solid #dfe5ed;background:#f6f8fb;position:sticky;top:0;z-index:2}
.cspc-rich-toolbar button{display:inline-flex;align-items:center;justify-content:center;width:34px;height:32px;padding:0;border:1px solid transparent;border-radius:6px;background:transparent;color:#172a52;cursor:pointer;font-size:15px;line-height:1}
.cspc-rich-toolbar button:hover,.cspc-rich-toolbar button:focus{background:#fff;border-color:#c7d1df;outline:none;box-shadow:0 1px 3px rgba(13,39,76,.08)}
.cspc-rich-toolbar .dashicons{font-size:18px;width:18px;height:18px}
.cspc-rich-separator{width:1px;height:22px;margin:0 3px;background:#d5dce6}
.cspc-rich-surface{padding:15px 16px;outline:none;overflow:auto;line-height:1.62;color:#172033;background:#fff;font-family:Arial,Helvetica,sans-serif;font-size:14px}
.cspc-rich-surface:empty:before{content:attr(data-placeholder);color:#8b96a8;pointer-events:none}
.cspc-rich-surface p{margin:0 0 12px}.cspc-rich-surface ul,.cspc-rich-surface ol{padding-left:26px}.cspc-rich-surface div{margin:0 0 8px}
.cspc-rich-source{display:none!important}
.cspc-rich-help{display:block;padding:7px 10px;border-top:1px solid #edf0f4;background:#fbfcfe;color:#69778b;font-size:11px}
.cspc-internal-email-message{margin-top:14px}
.cspc-internal-document-form .cspc-rich-surface{text-align:left}
.cspc-mail-compose .cspc-rich-editor{width:100%}
.cspc-internal-body div,.cspc-internal-body p,.cspc-internal-body li,.cspc-internal-body blockquote{text-align:justify;text-justify:inter-word}
.cspc-internal-body strong,.cspc-internal-body b{font-weight:800}

/* Compactación tipográfica moderada al imprimir: primero intenta una página.
   Si el contenido excede el espacio físico, el navegador continúa en la segunda
   sin cortar ni reducir la firma a tamaños ilegibles. */
@media print{
    .cspc-internal-document-sheet .cspc-internal-body{font-size:10.3pt!important;line-height:1.52!important}
    .cspc-internal-document-sheet .cspc-internal-body p,
    .cspc-internal-document-sheet .cspc-internal-body div,
    .cspc-internal-document-sheet .cspc-internal-body li,
    .cspc-internal-document-sheet .cspc-internal-body blockquote{margin-bottom:11px!important}
    .cspc-internal-document-sheet .cspc-internal-signature{margin-top:10mm!important;break-inside:avoid!important;page-break-inside:avoid!important}
    .cspc-internal-document-sheet .cspc-internal-signature img{width:145px!important;height:58px!important;object-fit:contain!important}
}


/* === 4.4.5 · Editor administrativo con tablas y paginación segura ====== */
.cspc-rich-surface table,.cspc-internal-body table{width:100%;border-collapse:collapse;margin:10px 0 16px;table-layout:fixed}
.cspc-rich-surface th,.cspc-rich-surface td,.cspc-internal-body th,.cspc-internal-body td{border:1px solid #8e99a8;padding:7px 8px;vertical-align:top;overflow-wrap:anywhere}
.cspc-rich-surface th,.cspc-internal-body th{background:#eef2f6;font-weight:800;color:#172a52}
.cspc-rich-surface table p,.cspc-internal-body table p{margin:0 0 6px}
.cspc-internal-body table tr{break-inside:avoid;page-break-inside:avoid}
.cspc-internal-body table thead{display:table-header-group}
.cspc-internal-body table tfoot{display:table-footer-group}
.cspc-rich-toolbar button[data-table-action]{font-size:11px;font-weight:800;min-width:34px;width:auto;padding:0 8px}
.cspc-internal-document-form .cspc-rich-surface{text-align:left}
@media print{
    .cspc-internal-document-sheet{padding-left:15mm!important;padding-right:15mm!important}
    .cspc-internal-document-sheet .cspc-internal-body table{font-size:9.3pt!important;line-height:1.35!important;break-inside:auto!important;page-break-inside:auto!important}
    .cspc-internal-document-sheet .cspc-internal-body tr{break-inside:avoid!important;page-break-inside:avoid!important}
    .cspc-internal-document-sheet .cspc-internal-body th,
    .cspc-internal-document-sheet .cspc-internal-body td{padding:5px 6px!important}
    .cspc-internal-document-sheet .cspc-internal-signature{break-inside:avoid!important;page-break-inside:avoid!important}
}

/* === 4.4.7 · Tipografía, interlineado y espaciado en editor administrativo === */
.cspc-rich-tool-select{display:inline-flex;align-items:center;gap:5px;margin:0 1px;color:#526078;font-size:10px;font-weight:800;white-space:nowrap}
.cspc-rich-tool-select select{height:30px;min-width:70px;max-width:105px;padding:2px 22px 2px 7px;border:1px solid #cbd4e1;border-radius:6px;background:#fff;color:#172a52;font-size:11px;font-weight:700}
.cspc-rich-tool-select select:focus{border-color:#7b8da8;outline:2px solid rgba(32,34,105,.10);outline-offset:1px}
.cspc-rich-surface span[style*="font-size"]{line-height:inherit}
@media(max-width:900px){.cspc-rich-tool-select{flex-direction:column;align-items:flex-start;gap:2px}.cspc-rich-tool-select select{min-width:82px}}

/* === 4.4.8 · CRM como base de datos bajo consulta === */
.cspc-crm-search-only{max-width:980px;margin:22px auto 28px}
.cspc-crm-database-search{display:grid;grid-template-columns:minmax(280px,1fr) auto auto;gap:12px;align-items:end}
.cspc-crm-database-search label{margin:0}
.cspc-crm-database-search input{font-size:18px;min-height:46px}
.cspc-crm-dossier{border-top:4px solid #17365d}
.cspc-crm-profile-compact{margin-top:12px}
.cspc-crm-purchase-table td{vertical-align:top}
.cspc-crm-product-list{display:grid;gap:6px;min-width:250px}
.cspc-crm-product-list span{display:block;line-height:1.35}
.cspc-crm-note-form{display:grid;gap:12px;margin-bottom:18px}
.cspc-crm-note-list{display:grid;gap:10px}
.cspc-crm-note{border:1px solid #dfe4ea;border-radius:10px;padding:12px 14px;background:#fff}
.cspc-crm-note>div{display:flex;justify-content:space-between;gap:12px;color:#52606d;font-size:12px}
.cspc-crm-note p{margin:8px 0 0;white-space:normal}
@media (max-width:780px){.cspc-crm-database-search{grid-template-columns:1fr}.cspc-crm-database-search .cspc-button{width:100%}.cspc-crm-product-list{min-width:190px}}

/* v4.4.9 · Base de Datos de Clientes / importación privada */
.cspc-customer-import{max-width:1180px;margin:0 auto 28px;padding:0;overflow:hidden}
.cspc-customer-import>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;gap:18px;align-items:center;padding:16px 20px;background:linear-gradient(180deg,#fff 0%,#f7fbff 100%);border-bottom:1px solid transparent}
.cspc-customer-import[open]>summary{border-bottom-color:#dce6f2}
.cspc-customer-import>summary::-webkit-details-marker{display:none}
.cspc-customer-import>summary strong{font-size:16px;color:#17365d}
.cspc-customer-import>summary span{font-size:12px;color:#65758b;text-align:right}
.cspc-customer-import-body{padding:18px 20px 20px}
.cspc-customer-upload{display:grid;grid-template-columns:minmax(280px,1fr);gap:12px}
.cspc-customer-upload input[type=file]{width:100%;padding:10px;border:1px solid #ccd8e5;border-radius:10px;background:#fff}
.cspc-import-map-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}
.cspc-import-map-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800;color:#506078}
.cspc-import-map-grid select{width:100%}
.cspc-import-preview td{vertical-align:top;line-height:1.45}
.cspc-import-preview td:first-child{width:150px;white-space:nowrap}
.cspc-import-cancel{margin-top:8px}
.cspc-import-history{margin-top:20px;padding-top:16px;border-top:1px solid #e0e7ef}
.cspc-import-history h3{margin:0 0 10px;color:#17365d}
@media (max-width:980px){.cspc-import-map-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:680px){.cspc-customer-import>summary{align-items:flex-start;flex-direction:column}.cspc-customer-import>summary span{text-align:left}.cspc-import-map-grid{grid-template-columns:1fr}}

/* === 4.5.1 · Base de Datos: fecha, expediente manual e importación de agendas === */
.cspc-crm-database-search-v451{grid-template-columns:minmax(290px,1.5fr) minmax(145px,.65fr) minmax(145px,.65fr) auto auto}
.cspc-crm-database-search-v451 label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800;color:#506078}
.cspc-crm-database-search-v451 input[type=date]{font-size:14px;min-height:46px}
.cspc-crm-create-dossier{max-width:1180px;margin:18px auto 28px;border-top:4px solid #17365d}
.cspc-date-search-results td{vertical-align:top}
.cspc-date-search-results td small{display:block;margin-top:4px;color:#66788a}
@media(max-width:1080px){.cspc-crm-database-search-v451{grid-template-columns:repeat(2,minmax(0,1fr))}.cspc-crm-database-search-v451 .cspc-crm-query-field{grid-column:span 2}.cspc-crm-database-search-v451 .cspc-button{width:100%}}
@media(max-width:680px){.cspc-crm-database-search-v451{grid-template-columns:1fr}.cspc-crm-database-search-v451 .cspc-crm-query-field{grid-column:auto}}

/* v4.5.2 · Base de Datos: detalle histórico bajo consulta, sin recargar la vista. */
.cspc-crm-history-details{margin-top:7px;border-top:1px solid #e1e7ee;padding-top:6px;font-size:12px}
.cspc-crm-history-details summary{cursor:pointer;font-weight:700;color:#17365d;list-style-position:inside}
.cspc-crm-history-detail-grid{display:grid;gap:4px;margin-top:7px;color:#445469}
.cspc-crm-history-detail-grid span{display:block;line-height:1.35}
.cspc-crm-raw-row{margin-top:8px;padding-top:6px;border-top:1px dashed #d6dee8}
.cspc-crm-raw-row summary{font-weight:600}
.cspc-crm-raw-row dl{display:grid;grid-template-columns:minmax(110px,180px) 1fr;gap:4px 10px;margin:8px 0 0}
.cspc-crm-raw-row dt{font-weight:700;color:#526174}
.cspc-crm-raw-row dd{margin:0;min-width:0;overflow-wrap:anywhere}

/* v4.5.4 — Base de Datos: expediente ordenado, edición Supervisor y ficha PNG */
.cspc-crm-dossier-head{align-items:flex-start;gap:18px}
.cspc-crm-dossier-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;max-width:720px}
.cspc-crm-profile-v454{grid-template-columns:repeat(4,minmax(0,1fr))}
.cspc-crm-profile-v454 .cspc-crm-profile-wide{grid-column:span 4}
.cspc-crm-profile-v454 .cspc-crm-profile-wide strong{font-size:15px;line-height:1.45;font-weight:700}
.cspc-crm-png-status{margin-top:8px;min-height:20px;color:#315d3b;font-weight:700}
.cspc-crm-edit-dossier[hidden]{display:none!important}
.cspc-crm-edit-dossier{border-top:4px solid #b78d2f}
.cspc-crm-edit-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.cspc-crm-edit-grid label{display:flex;flex-direction:column;gap:6px;font-weight:700;color:#40536a}
.cspc-crm-edit-grid input,.cspc-crm-edit-grid textarea{width:100%}
.cspc-crm-purchases-panel .cspc-panel-head{align-items:center}
.cspc-crm-purchase-table-v454{table-layout:fixed;min-width:960px}
.cspc-crm-purchase-table-v454 th:nth-child(1){width:130px}
.cspc-crm-purchase-table-v454 th:nth-child(2){width:42%}
.cspc-crm-purchase-table-v454 th:nth-child(3){width:220px}
.cspc-crm-purchase-table-v454 th:nth-child(4){width:150px}
.cspc-crm-purchase-table-v454 th:nth-child(5){width:135px}
.cspc-crm-purchase-table-v454 td{padding:14px 12px;line-height:1.4}
.cspc-crm-purchase-date strong{display:block;color:#17365d;font-size:15px}
.cspc-crm-purchase-date small{display:block;margin-top:5px;color:#697b90;overflow-wrap:anywhere}
.cspc-crm-purchase-product{overflow-wrap:anywhere}
.cspc-crm-purchase-product .cspc-crm-product-list{min-width:0;font-weight:650;color:#182d47}
.cspc-crm-service-cell{display:grid;gap:8px}
.cspc-crm-service-cell span{display:grid;gap:1px}
.cspc-crm-service-cell small{font-size:10px;text-transform:uppercase;letter-spacing:.35px;color:#718096;font-weight:800}
.cspc-crm-service-cell strong{font-size:12px;color:#24384f}
.cspc-crm-source-cell small{display:block;overflow-wrap:anywhere;color:#62748b}
.cspc-crm-warranty-cell .cspc-button{width:100%;justify-content:center;text-align:center}
.cspc-crm-history-details{background:#f8fafc;border:1px solid #e1e8f0;border-radius:8px;padding:8px 10px;margin-top:10px}
.cspc-crm-history-details summary{outline:none}
@media(max-width:980px){
 .cspc-crm-dossier-head{display:grid;grid-template-columns:1fr}
 .cspc-crm-dossier-actions{justify-content:flex-start;max-width:none}
 .cspc-crm-profile-v454{grid-template-columns:repeat(2,minmax(0,1fr))}
 .cspc-crm-profile-v454 .cspc-crm-profile-wide{grid-column:span 2}
}
@media(max-width:680px){
 .cspc-crm-dossier-actions .cspc-button{width:100%;justify-content:center}
 .cspc-crm-profile-v454{grid-template-columns:1fr}
 .cspc-crm-profile-v454 .cspc-crm-profile-wide{grid-column:auto}
 .cspc-crm-edit-grid{grid-template-columns:1fr}
 .cspc-crm-edit-grid .cspc-span-2{grid-column:auto}
}

/* v4.5.5 — Expediente: compras editables por Supervisor + PNG con logos */
.cspc-crm-add-purchase{padding:0;overflow:hidden}
.cspc-crm-add-purchase-details>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;cursor:pointer;list-style:none;background:linear-gradient(180deg,#fff,#f7f9fc);color:#17365d}
.cspc-crm-add-purchase-details>summary::-webkit-details-marker{display:none}
.cspc-crm-add-purchase-details>summary span:first-child{display:flex;flex-direction:column;gap:2px}
.cspc-crm-add-purchase-details>summary strong{font-size:16px}
.cspc-crm-add-purchase-details>summary small{color:#6b7b8d;font-weight:600}
.cspc-crm-add-purchase-body{padding:0 18px 18px;border-top:1px solid #e4eaf1}
.cspc-crm-purchase-editor{margin-top:10px;border-top:1px dashed #d5deea;padding-top:8px}
.cspc-crm-purchase-editor>summary{cursor:pointer;color:#17365d;font-weight:800;font-size:12px}
.cspc-crm-purchase-edit-form{margin-top:12px;background:#f8fafc;border:1px solid #dfe7f0;border-radius:12px;padding:14px}
.cspc-crm-purchase-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cspc-crm-purchase-edit-grid label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:700;color:#465b72}
.cspc-crm-purchase-edit-grid input,.cspc-crm-purchase-edit-grid textarea{width:100%}
.cspc-crm-create-purchase{margin:14px 0;border:1px solid #dfe7f0;border-radius:12px;background:#f8fafc;padding:12px 14px}
.cspc-crm-create-purchase>summary{cursor:pointer;font-weight:800;color:#17365d}
@media(max-width:820px){.cspc-crm-purchase-edit-grid{grid-template-columns:1fr}.cspc-crm-purchase-edit-grid .cspc-span-2{grid-column:auto}.cspc-crm-create-purchase .cspc-form-grid-3{grid-template-columns:1fr}.cspc-crm-create-purchase .cspc-span-2,.cspc-crm-create-purchase .cspc-span-3{grid-column:auto}}


/* v4.5.6 - Visibilidad de notas del expediente */
.cspc-crm-note-visibility{border:1px solid #dfe6ee;border-radius:12px;padding:12px 14px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;background:#f8fafc}
.cspc-crm-note-visibility legend{font-weight:700;color:#17365d;padding:0 6px}
.cspc-crm-note-visibility label{display:flex;align-items:flex-start;gap:9px;border:1px solid #dfe6ee;border-radius:10px;background:#fff;padding:10px 12px;cursor:pointer}
.cspc-crm-note-visibility label span{display:grid;gap:2px}.cspc-crm-note-visibility small{color:#66788a;font-weight:400}
.cspc-crm-note-meta{margin-top:8px}.cspc-crm-note.is-client-visible{border-left:4px solid #17365d}.cspc-crm-note.is-internal{border-left:4px solid #9aa8b8}
@media(max-width:720px){.cspc-crm-note-visibility{grid-template-columns:1fr}}

/* v4.5.7 - Documentos de expediente, correo y edición de notas */
.cspc-crm-dossier-email>details>summary,.cspc-crm-add-purchase-details>summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none}
.cspc-crm-dossier-email>details>summary::-webkit-details-marker{display:none}.cspc-crm-dossier-email>details>summary span:first-child{display:grid;gap:3px}.cspc-crm-dossier-email>details>summary small{font-weight:500;color:#66788a}
.cspc-crm-email-form{margin-top:18px;padding-top:16px;border-top:1px solid var(--cspc-border)}
.cspc-crm-client-files{margin:14px 0;padding:12px;border:1px solid var(--cspc-border);border-radius:10px}.cspc-crm-client-files legend{font-weight:800;color:var(--cspc-navy)}.cspc-crm-file-checks{display:grid;gap:6px;margin-top:9px}.cspc-crm-file-checks label{font-weight:600}
.cspc-crm-file-upload{margin-bottom:18px;padding-bottom:18px;border-bottom:1px solid var(--cspc-border)}.cspc-crm-files-table td:first-child strong,.cspc-crm-files-table td:first-child small{display:block}.cspc-crm-files-table td:first-child small{margin-top:3px;color:#66788a}
.cspc-crm-note-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.cspc-crm-note-edit{position:relative}.cspc-crm-note-edit>summary{cursor:pointer;font-size:11px;font-weight:800;color:var(--cspc-navy);padding:5px 9px;border:1px solid var(--cspc-border);border-radius:7px;list-style:none}.cspc-crm-note-edit>summary::-webkit-details-marker{display:none}.cspc-crm-note-edit form{min-width:min(520px,75vw);margin-top:8px;padding:12px;background:#fff;border:1px solid var(--cspc-border);border-radius:10px;box-shadow:var(--cspc-shadow)}.cspc-crm-note-edit textarea{width:100%;resize:vertical}.cspc-note-edit-options{display:flex;gap:16px;flex-wrap:wrap;margin:8px 0 10px}.cspc-note-edit-options label{display:flex;align-items:center;gap:5px;font-weight:700}
@media(max-width:760px){.cspc-crm-note-edit form{min-width:0;width:100%}.cspc-crm-files-table{min-width:860px}}

/* v4.5.8 - edición granular de artículos del expediente */
.cspc-crm-article-editor{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid #d9e2ec;border-radius:12px;background:#f8fafc}
.cspc-crm-article-editor-head{display:flex;flex-direction:column;gap:2px}.cspc-crm-article-editor-head strong{font-size:12px;color:#31465d}.cspc-crm-article-editor-head span{font-size:11px;color:#718096}
.cspc-crm-article-items{display:flex;flex-direction:column;gap:8px}.cspc-crm-article-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:start}.cspc-crm-article-item textarea{width:100%;min-height:58px}
.cspc-crm-delete-purchase-form{margin-top:12px;padding-top:12px;border-top:1px dashed #d7dee7}
@media(max-width:760px){.cspc-crm-article-item{grid-template-columns:1fr}.cspc-crm-article-item .cspc-button{width:100%}}

/* v4.6.0 - Gestiones, agenda administrativa y archivo compacto */
.cspc-global-ref-search{display:flex;align-items:center;gap:0;margin-left:auto;max-width:360px;min-width:240px}.cspc-global-ref-search input{width:100%;border:1px solid #d7e0ea;border-radius:9px 0 0 9px;padding:8px 10px;background:#fff;font-size:12px}.cspc-global-ref-search button{border:0;background:#17365d;color:#fff;border-radius:0 9px 9px 0;padding:7px 10px;cursor:pointer}.cspc-global-ref-search .dashicons{font-size:18px;width:18px;height:18px}
.cspc-admin-documents-compact>summary,.cspc-management-new>summary{display:flex;justify-content:space-between;gap:14px;align-items:center;cursor:pointer;padding:14px 16px;list-style:none}.cspc-admin-documents-compact>summary::-webkit-details-marker,.cspc-management-new>summary::-webkit-details-marker{display:none}.cspc-admin-documents-compact>summary span,.cspc-management-new>summary span{font-size:12px;color:#66788a}.cspc-admin-documents-compact[open]>summary,.cspc-management-new[open]>summary{border-bottom:1px solid #dfe6ed}.cspc-admin-documents-compact>.cspc-table-wrap{padding:0 16px 16px}
.cspc-admin-reminder-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.cspc-admin-reminder-stat{background:#fff;border:1px solid #dfe6ed;border-radius:12px;padding:12px 14px;text-decoration:none;color:#243447;display:flex;align-items:baseline;gap:8px}.cspc-admin-reminder-stat strong{font-size:22px;color:#17365d}.cspc-admin-reminder-stat span{font-size:12px}.cspc-admin-reminder-stat.is-active{border-color:#17365d;box-shadow:0 0 0 2px rgba(23,54,93,.08)}.cspc-admin-agenda-grid{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(420px,1.2fr);gap:14px}.cspc-admin-reminder-list{display:grid;gap:9px}.cspc-admin-reminder{border:1px solid #dfe6ed;border-radius:10px;padding:12px;display:flex;justify-content:space-between;gap:12px}.cspc-admin-reminder>div:first-child{min-width:0}.cspc-admin-reminder strong,.cspc-admin-reminder span,.cspc-admin-reminder small{display:block}.cspc-admin-reminder span,.cspc-admin-reminder small{font-size:11px;color:#66788a;margin-top:3px}.cspc-admin-reminder p{font-size:12px;margin:7px 0 0}.cspc-admin-reminder-actions{display:flex;gap:5px;align-items:flex-start;flex-wrap:wrap}.cspc-admin-reminder.is-completed{opacity:.65;background:#f6f8fa}.cspc-admin-reminder.is-completed strong{text-decoration:line-through}
.cspc-management-panel .cspc-management-new{border:1px solid #dfe6ed;border-radius:10px;margin-bottom:14px;background:#fbfcfd}.cspc-management-form{padding:16px}.cspc-management-ticket{background:#fff;max-width:900px;margin:16px auto;padding:0 0 24px;border:1px solid #d9e1e9;box-shadow:0 3px 16px rgba(0,0,0,.07)}.cspc-management-ticket>header{display:grid;grid-template-columns:160px 1fr 160px;align-items:center;gap:14px;padding:22px 34px 14px;border-bottom:8px solid #17365d;text-align:center}.cspc-management-ticket>header img{max-width:145px;max-height:72px;margin:auto}.cspc-management-ticket>header strong{display:block;color:#17365d;font-size:19px}.cspc-management-ticket>header span{display:block;color:#66788a;font-size:10px;line-height:1.5;margin-top:4px}.cspc-management-ticket>h2{text-align:center;font-size:17px;color:#17365d;margin:22px 34px}.cspc-management-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 20px;padding:0 34px}.cspc-management-meta>div{border-bottom:1px solid #dfe6ed;padding:7px 0}.cspc-management-meta .wide{grid-column:1/-1}.cspc-management-meta small{display:block;text-transform:uppercase;color:#738190;font-size:9px;letter-spacing:.45px}.cspc-management-meta strong{display:block;font-size:12px;margin-top:3px}.cspc-management-client-note{margin:20px 34px;padding:14px;border-left:4px solid #17365d;background:#f4f7fa}.cspc-management-client-note h3{margin:0 0 7px;color:#17365d;font-size:12px}.cspc-management-client-note p{margin:0;font-size:12px;line-height:1.55}.cspc-management-ticket>footer{text-align:center;margin:22px 34px 0;padding-top:10px;border-top:1px solid #dfe6ed;color:#66788a;font-size:9px}
@media(max-width:850px){.cspc-global-ref-search{min-width:0;max-width:none;width:100%;order:5}.cspc-admin-reminder-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cspc-admin-agenda-grid{grid-template-columns:1fr}.cspc-management-ticket>header{grid-template-columns:90px 1fr 90px;padding-left:18px;padding-right:18px}.cspc-management-ticket>header img{max-width:85px}.cspc-management-meta{grid-template-columns:1fr;padding:0 20px}.cspc-management-meta .wide{grid-column:auto}.cspc-management-client-note{margin-left:20px;margin-right:20px}}
@media print{.cspc-management-ticket{box-shadow:none;border:0;max-width:none;margin:0}.cspc-management-ticket>header{padding-top:0}.cspc-management-ticket{break-inside:auto}.cspc-management-meta>div,.cspc-management-client-note{break-inside:avoid;page-break-inside:avoid}}

/* v4.6.1 - Base de Datos: expediente estable y ancho completo */
body.cspc-system-page{width:100%;max-width:none}
body.cspc-system-page .cspc-app{width:100%;max-width:none}
body.cspc-system-page .cspc-main{max-width:none}
.cspc-crm-dossier,.cspc-management-panel,.cspc-crm-dossier-email,.cspc-crm-purchases-panel{width:100%;max-width:none}

/* v4.6.3 · Garantía manual desde expediente */
.cspc-crm-warranty-builder{max-width:1180px;margin-left:auto;margin-right:auto}
.cspc-crm-warranty-items-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:24px 0 12px;padding-top:18px;border-top:1px solid #dfe6ef}
.cspc-crm-warranty-items-head h3{margin:0 0 5px;color:#17365d}
.cspc-crm-warranty-items-head p{margin:0;color:#68788d}
.cspc-crm-warranty-items{display:grid;gap:12px;margin-bottom:18px}
.cspc-crm-warranty-item{display:grid;grid-template-columns:minmax(280px,2.5fr) minmax(140px,1fr) minmax(105px,.65fr) minmax(125px,.75fr) auto;gap:10px;align-items:end;padding:14px;border:1px solid #dfe6ef;border-radius:14px;background:#f8fafc}
.cspc-crm-warranty-item label{display:grid;gap:6px;font-weight:600;color:#243b5a}
.cspc-crm-warranty-item input{width:100%}
.cspc-crm-warranty-cell .cspc-button{margin-top:6px}
@media(max-width:900px){.cspc-crm-warranty-item{grid-template-columns:1fr 1fr}.cspc-crm-warranty-item .wide{grid-column:1/-1}.cspc-crm-warranty-items-head{flex-direction:column}}
@media(max-width:620px){.cspc-crm-warranty-item{grid-template-columns:1fr}.cspc-crm-warranty-item .wide{grid-column:auto}}

/* v4.6.7 · edición y cambio de estado de gestiones */
.cspc-management-status-form{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0}.cspc-management-status-form select{min-width:145px;max-width:190px;padding:7px 30px 7px 9px}.cspc-management-status-form .cspc-button-small{padding:7px 10px;min-height:34px}.cspc-management-edit summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px}.cspc-management-edit summary span:first-child{display:flex;flex-direction:column;gap:2px}.cspc-management-edit summary small{font-weight:400;color:#66788a}.cspc-management-edit[open] summary{margin-bottom:16px}

/* v4.6.8 · tickets institucionales blancos + referencias GES/EXP */
.cspc-management-ticket-v468{background:#fff;color:#1d2b3a;border:1px solid #d9e1e9;border-radius:14px;overflow:hidden}
.cspc-management-ticket-v468>header{background:#fff;border-bottom:0;padding-bottom:18px}
.cspc-management-brand-strip{display:grid;grid-template-columns:24% 28% 22% 26%;height:8px;width:100%}
.cspc-management-brand-strip i:nth-child(1){background:#c39b3b}.cspc-management-brand-strip i:nth-child(2){background:#d6d0c4}.cspc-management-brand-strip i:nth-child(3){background:#8c98a8}.cspc-management-brand-strip i:nth-child(4){background:#17365d}
.cspc-management-ticket-title{padding:22px 34px 8px}.cspc-management-ticket-title small{display:block;color:#65758a;font-size:10px;font-weight:800;letter-spacing:.8px}.cspc-management-ticket-title h2{margin:5px 0 2px;color:#17365d;font-size:24px}.cspc-management-ticket-title p{margin:0;color:#65758a;font-size:12px;font-weight:700}
.cspc-management-subject{margin:18px 34px 0;padding:14px 16px;border:1px solid #dfe6ed;border-radius:10px;background:#fff}.cspc-management-subject h3{margin:0 0 6px;color:#17365d;font-size:12px}.cspc-management-subject p{margin:0;font-size:13px;line-height:1.55}
.cspc-management-ticket-v468 .cspc-management-client-note{background:#f8fafc;border:1px solid #dfe6ed;border-left:4px solid #17365d;border-radius:8px}
.cspc-management-ticket-v468 .cspc-management-meta{padding-top:4px}
@media(max-width:850px){.cspc-management-ticket-title{padding-left:20px;padding-right:20px}.cspc-management-subject{margin-left:20px;margin-right:20px}}
@media print{.cspc-management-ticket-v468{border:0;border-radius:0;box-shadow:none}.cspc-management-brand-strip{-webkit-print-color-adjust:exact;print-color-adjust:exact}.cspc-management-subject{break-inside:avoid;page-break-inside:avoid}}


/* v4.7.0 · filtros de garantía por fecha + envío WhatsApp */
.cspc-crm-warranty-filter-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 16px}.cspc-crm-warranty-filter-summary>div{border:1px solid #dfe6ed;border-radius:12px;background:#fff;padding:12px 14px;display:flex;align-items:baseline;justify-content:space-between;gap:12px}.cspc-crm-warranty-filter-summary small{color:#66788a;font-weight:700}.cspc-crm-warranty-filter-summary strong{font-size:22px;color:#17365d}.cspc-crm-warranty-filter-summary .is-pending{border-left:4px solid #c39b3b}.cspc-crm-warranty-filter-summary .is-issued{border-left:4px solid #2f6f58}.cspc-crm-warranty-status-cell small{display:block;margin-top:5px;color:#66788a}.cspc-chip-pending{background:#fff8e6;color:#765b12;border:1px solid #ead38f}.cspc-chip-issued{background:#eef8f3;color:#245a47;border:1px solid #bad9cc}.cspc-date-result-actions{display:flex;flex-wrap:wrap;gap:6px;min-width:190px}.cspc-warranty-whatsapp{scroll-margin-top:24px}.cspc-warranty-whatsapp-grid{display:grid;grid-template-columns:minmax(220px,.45fr) minmax(360px,1.55fr);gap:14px}.cspc-warranty-whatsapp-grid label{display:grid;gap:6px;font-weight:700;color:#243b5a}.cspc-warranty-whatsapp-grid .wide{grid-column:2}.cspc-warranty-whatsapp-grid input,.cspc-warranty-whatsapp-grid textarea{width:100%}.cspc-warranty-whatsapp-grid textarea{resize:vertical;min-height:150px}.cspc-warranty-whatsapp-actions{align-items:center;flex-wrap:wrap}.cspc-warranty-whatsapp-actions [data-warranty-wa-status]{flex:1 1 280px}
@media(max-width:850px){.cspc-crm-warranty-filter-summary{grid-template-columns:1fr}.cspc-warranty-whatsapp-grid{grid-template-columns:1fr}.cspc-warranty-whatsapp-grid .wide{grid-column:auto}.cspc-date-result-actions{min-width:0}}

/* v4.7.2 · Autorización de ingreso como tipo de documento + una página */
.cspc-authorization-fields{margin:8px 0 4px;background:#f8fafc;border:1px solid #dfe6ed;box-shadow:none}
.cspc-authorization-fields .cspc-panel-head{margin-bottom:12px}.cspc-authorization-fields .cspc-panel-head h2{margin:0;color:#17365d}.cspc-authorization-fields .cspc-panel-head p{margin:4px 0 0;color:#66788a}
.cspc-internal-document-sheet.is-single-page .cspc-internal-strip{margin-bottom:22px}
.cspc-internal-document-sheet.is-single-page .cspc-internal-document-meta{margin-bottom:22px}
.cspc-internal-document-sheet.is-single-page>h1{margin-bottom:14px}
.cspc-internal-document-sheet.is-single-page .cspc-internal-body{font-size:9.3pt;line-height:1.36}
.cspc-internal-document-sheet.is-single-page .cspc-internal-body p{margin-bottom:7px}
.cspc-internal-document-sheet.is-single-page .cspc-internal-signature{margin-top:10px}
.cspc-internal-document-sheet.is-single-page .cspc-internal-signature>span:first-child{margin-bottom:5px}
.cspc-internal-document-sheet.is-single-page .cspc-internal-signature em{margin-top:10px}
@media print{
  .cspc-internal-document-sheet.is-single-page{height:279.4mm!important;min-height:279.4mm!important;max-height:279.4mm!important;overflow:hidden!important;padding:8.5mm 12.7mm 5.5mm!important;break-after:avoid!important;page-break-after:avoid!important}
  .cspc-internal-document-sheet.is-single-page .cspc-internal-letterhead h2{font-size:18px!important}
  .cspc-internal-document-sheet.is-single-page .cspc-internal-letterhead strong{font-size:10.5px!important}
  .cspc-internal-document-sheet.is-single-page .cspc-internal-letterhead span{font-size:9.5px!important}
  .cspc-internal-document-sheet.is-single-page .cspc-internal-logos img{max-width:112px!important;max-height:54px!important}
  .cspc-internal-document-sheet.is-single-page .cspc-internal-strip{height:8px!important;margin:5px 0 13px!important}
  .cspc-internal-document-sheet.is-single-page .cspc-internal-document-meta{margin:0 4px 12px!important;font-size:9px!important}
  .cspc-internal-document-sheet.is-single-page>h1{margin:0 0 10px!important;padding:6px 8px!important;font-size:10.5px!important;line-height:1.1!important}
  .cspc-internal-document-sheet.is-single-page .cspc-internal-recipient{margin-bottom:8px!important;font-size:9pt!important;line-height:1.25!important}
  .cspc-internal-document-sheet.is-single-page .cspc-internal-body{font-size:8.2pt!important;line-height:1.28!important}
  .cspc-internal-document-sheet.is-single-page .cspc-internal-body p,
  .cspc-internal-document-sheet.is-single-page .cspc-internal-body div,
  .cspc-internal-document-sheet.is-single-page .cspc-internal-body li,
  .cspc-internal-document-sheet.is-single-page .cspc-internal-body blockquote{margin-bottom:5px!important}
  .cspc-internal-document-sheet.is-single-page .cspc-internal-signature{margin-top:6px!important;font-size:8pt!important;break-inside:avoid!important;page-break-inside:avoid!important}
  .cspc-internal-document-sheet.is-single-page .cspc-internal-signature>span:first-child{margin-bottom:3px!important;font-size:8pt!important}
  .cspc-internal-document-sheet.is-single-page .cspc-internal-signature img{width:118px!important;height:44px!important;margin-bottom:-4px!important}
  .cspc-internal-document-sheet.is-single-page .cspc-internal-signature strong,
  .cspc-internal-document-sheet.is-single-page .cspc-internal-signature span,
  .cspc-internal-document-sheet.is-single-page .cspc-internal-signature em{font-size:8pt!important}
  .cspc-internal-document-sheet.is-single-page .cspc-internal-signature em{margin-top:7px!important}
  .cspc-internal-document-sheet.is-single-page>footer{font-size:6.5px!important;padding:4px 6px!important;margin-top:auto!important}
}

/* v4.8.0 · OneDrive, catálogo maestro, facturación desde expediente y control gerencial */
.cspc-management-summary-filter{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;align-items:end}.cspc-management-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:14px}.cspc-management-cards article{border:1px solid #dfe6ed;border-radius:12px;padding:14px;background:#fff;min-width:0}.cspc-management-cards small,.cspc-management-cards span{display:block;color:#66788a}.cspc-management-cards strong{display:block;color:#17365d;font-size:20px;margin:5px 0}.cspc-crm-invoice-cell,.cspc-crm-warranty-cell{min-width:150px}.cspc-crm-invoice-cell small,.cspc-crm-warranty-cell small{display:block;margin-top:5px;color:#66788a}.cspc-quote-email-panel summary{cursor:pointer;padding:8px 0}.cspc-quote-email-panel summary span{font-weight:400;color:#66788a;margin-left:6px}.cspc-source-master{background:#e8f6ef;color:#17613f}.cspc-onedrive-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
@media(max-width:980px){.cspc-management-summary-filter{grid-template-columns:repeat(2,minmax(0,1fr))}.cspc-management-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.cspc-management-summary-filter,.cspc-management-cards,.cspc-onedrive-status-grid{grid-template-columns:1fr}}
.cspc-quote-tech-grid{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(260px,1.3fr);gap:10px;margin-bottom:8px}.cspc-quote-tech-head{padding:0 4px;color:#17365d}.cspc-quote-tech-print{margin:16px 0}.cspc-quote-tech-print h3{color:#17365d;margin:0 0 8px}@media(max-width:640px){.cspc-quote-tech-grid{grid-template-columns:1fr}}


/* v4.8.9 · Editor de factura interna desde expediente */
.cspc-crm-invoice-builder{max-width:1240px;margin-left:auto;margin-right:auto}
.cspc-crm-invoice-items{display:grid;gap:12px;margin-bottom:20px}
.cspc-crm-invoice-item{display:grid;grid-template-columns:minmax(260px,2.2fr) minmax(120px,.8fr) minmax(95px,.55fr) minmax(125px,.75fr) minmax(125px,.75fr) minmax(115px,.7fr) auto;gap:10px;align-items:end;padding:14px;border:1px solid #dfe6ef;border-radius:14px;background:#f8fafc}
.cspc-crm-invoice-item label{display:grid;gap:6px;font-weight:600;color:#243b5a}.cspc-crm-invoice-item input{width:100%}
.cspc-invoice-line-total{display:grid;gap:6px;min-width:105px}.cspc-invoice-line-total small{color:#68788d}.cspc-invoice-line-total strong{font-size:16px;color:#17365d;white-space:nowrap}
.cspc-invoice-totals-grid{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:12px;margin:18px 0;padding:16px;border:1px solid #dfe6ef;border-radius:14px;background:#fff}
.cspc-invoice-totals-grid label{display:grid;gap:6px;font-weight:600;color:#243b5a}.cspc-invoice-total-card{padding:12px;border-radius:12px;background:#f4f7fa}.cspc-invoice-total-card small,.cspc-invoice-total-card span{display:block;color:#68788d}.cspc-invoice-total-card strong{display:block;margin:5px 0;font-size:20px;color:#17365d}.cspc-invoice-grand-total{background:#eef8f2;border:1px solid #cce7d7}
.cspc-invoice-email-choice{display:grid;grid-template-columns:minmax(260px,1fr) minmax(280px,1fr);gap:10px;align-items:end;margin:18px 0;padding:14px;border:1px solid #dfe6ef;border-radius:14px;background:#f8fafc}.cspc-invoice-email-choice small{grid-column:1/-1;color:#68788d}
.cspc-invoice-email-mini{margin-top:7px}.cspc-invoice-email-mini summary{cursor:pointer;color:#17365d;font-weight:700}.cspc-invoice-email-mini form{margin-top:7px;display:flex;gap:6px;align-items:center}.cspc-invoice-email-mini input{min-width:190px}
@media(max-width:1050px){.cspc-crm-invoice-item{grid-template-columns:1fr 1fr 1fr}.cspc-crm-invoice-item .wide{grid-column:1/-1}.cspc-invoice-totals-grid{grid-template-columns:1fr 1fr}}
@media(max-width:680px){.cspc-crm-invoice-item,.cspc-invoice-totals-grid,.cspc-invoice-email-choice{grid-template-columns:1fr}.cspc-crm-invoice-item .wide,.cspc-invoice-email-choice small{grid-column:auto}.cspc-invoice-email-mini form{align-items:stretch;flex-direction:column}}

/* v4.8.11 · Factura interna profesional unificada */
.cspc-invoice-sheet{min-height:10.45in;max-width:8.5in;overflow:hidden}
.cspc-invoice-sheet .cspc-print-header{align-items:center}
.cspc-invoice-sheet .cspc-doc-meta{grid-template-columns:1.35fr .9fr .95fr;margin:7px 0 8px}
.cspc-invoice-sheet .cspc-doc-meta>div{min-height:52px;padding:6px 8px}
.cspc-invoice-sheet .cspc-doc-meta small{font-size:7px}
.cspc-invoice-sheet .cspc-doc-meta strong{font-size:10px}
.cspc-invoice-sheet .cspc-doc-meta span{font-size:8px;line-height:1.18;overflow-wrap:anywhere}
.cspc-invoice-address{max-width:100%;overflow-wrap:anywhere}
.cspc-invoice-table{width:100%;table-layout:fixed;border-collapse:collapse;margin:0}
.cspc-invoice-table th{padding:4px 4px;font-size:7px;line-height:1.05;white-space:normal}
.cspc-invoice-table td{height:auto;padding:4px 4px;font-size:8px;line-height:1.15;vertical-align:top;overflow-wrap:anywhere}
.cspc-invoice-table th:nth-child(1),.cspc-invoice-table td:nth-child(1){width:7%;text-align:center}
.cspc-invoice-table th:nth-child(2),.cspc-invoice-table td:nth-child(2){width:39%}
.cspc-invoice-table th:nth-child(3),.cspc-invoice-table td:nth-child(3){width:11%}
.cspc-invoice-table th:nth-child(4),.cspc-invoice-table td:nth-child(4){width:15%;text-align:right}
.cspc-invoice-table th:nth-child(5),.cspc-invoice-table td:nth-child(5){width:13%;text-align:right}
.cspc-invoice-table th:nth-child(6),.cspc-invoice-table td:nth-child(6){width:15%;text-align:right}
.cspc-invoice-bottom{display:grid;grid-template-columns:minmax(0,1fr) 255px;gap:12px;margin-top:9px;break-inside:avoid;page-break-inside:avoid}
.cspc-invoice-payment-box{min-height:108px;padding:10px 11px;border:1px solid #c3cad4;background:#f8fafc;display:flex;flex-direction:column;align-items:flex-start}
.cspc-invoice-payment-box small{color:#596579;font-size:7px;font-weight:800;letter-spacing:.08em}
.cspc-invoice-payment-box strong{margin:3px 0;color:var(--cspc-navy);font-size:10px}
.cspc-invoice-payment-box span{color:#586579;font-size:8px}.cspc-invoice-payment-box p{margin:3px 0 0;font-size:8px;line-height:1.25}
.cspc-invoice-note-label{margin-top:10px}
.cspc-invoice-totals span,.cspc-invoice-totals>strong{padding:5px 8px;font-size:8px}.cspc-invoice-totals>strong{font-size:10px}
.cspc-invoice-internal-note{margin-top:8px;padding:7px 9px;border:1px solid #d8c783;background:#fffaf0;color:#4b4638;font-size:7.5px;line-height:1.3;break-inside:avoid;page-break-inside:avoid}
.cspc-invoice-sheet .cspc-doc-sign{width:210px;margin:10px auto 7px}
.cspc-invoice-sheet .cspc-print-footer{margin-top:auto}
.cspc-invoice-email-panel{max-width:8.5in;margin-left:auto;margin-right:auto}

@media print{
  .cspc-invoice-sheet{height:267mm!important;min-height:267mm!important;max-height:267mm!important;overflow:hidden!important;break-after:avoid!important;page-break-after:avoid!important}
  .cspc-invoice-sheet .cspc-print-header{gap:8px!important}
  .cspc-invoice-sheet .cspc-logo-print .cspc-logo-sanpablo{width:90px!important;height:auto!important;max-height:54px!important;object-fit:contain!important}
  .cspc-invoice-sheet .cspc-logo-print .cspc-logo-dorminova{width:88px!important;height:auto!important;max-height:43px!important;object-fit:contain!important}
  .cspc-invoice-sheet .cspc-print-strip{margin:3px 0 5px!important}
  .cspc-invoice-sheet .cspc-print-title>div{padding:4px 6px!important}
  .cspc-invoice-sheet .cspc-print-title h1{font-size:12px!important}.cspc-invoice-sheet .cspc-print-title strong{font-size:11px!important}
  .cspc-invoice-sheet .cspc-doc-meta{margin:4px 0 5px!important}.cspc-invoice-sheet .cspc-doc-meta>div{min-height:44px!important;padding:4px 6px!important}
  .cspc-invoice-sheet .cspc-doc-meta small{font-size:6.5px!important}.cspc-invoice-sheet .cspc-doc-meta strong{font-size:9px!important}.cspc-invoice-sheet .cspc-doc-meta span{font-size:7.3px!important}
  .cspc-invoice-table th{padding:3px!important;font-size:6.3px!important}.cspc-invoice-table td{height:auto!important;padding:3px!important;font-size:7.2px!important;line-height:1.08!important;break-inside:avoid!important;page-break-inside:avoid!important}
  .cspc-invoice-bottom{grid-template-columns:minmax(0,1fr) 225px!important;gap:8px!important;margin-top:6px!important}
  .cspc-invoice-payment-box{min-height:88px!important;padding:7px 8px!important}.cspc-invoice-payment-box small{font-size:6.3px!important}.cspc-invoice-payment-box strong{font-size:8.8px!important}.cspc-invoice-payment-box span,.cspc-invoice-payment-box p{font-size:7px!important}
  .cspc-invoice-totals span,.cspc-invoice-totals>strong{padding:3px 6px!important;font-size:7px!important}.cspc-invoice-totals>strong{font-size:9px!important}
  .cspc-invoice-internal-note{margin-top:5px!important;padding:5px 7px!important;font-size:6.7px!important;line-height:1.2!important}
  .cspc-invoice-sheet .cspc-doc-sign{margin:6px auto 4px!important}.cspc-invoice-sheet .cspc-doc-sign strong{font-size:7px!important}
  .cspc-invoice-sheet .cspc-print-footer{font-size:6.3px!important;padding:4px 5px!important}
}

/* v4.8.14 · Cotización administrativa */
.cspc-quote-final-note{margin:14px 0 6px;padding:11px 13px;border:1px solid #b9c4d3;border-left:4px solid #25256f;background:#f8fafc;color:#172033}
.cspc-quote-final-note strong{display:block;margin-bottom:5px;font-size:9px;letter-spacing:.06em;color:#25256f}
.cspc-quote-final-note p{margin:0;font-size:9px;line-height:1.45;white-space:normal}
@media print{.cspc-quote-final-note{break-inside:avoid;page-break-inside:avoid;background:#fff}}

/* v4.9.0 · tercera marca integrada */
.cspc-factory-brand-card{border-top:4px solid var(--cspc-navy)}
.cspc-factory-brand-head{display:flex;align-items:center;gap:22px;margin-bottom:22px;padding-bottom:18px;border-bottom:1px solid #dfe5ee}.cspc-factory-brand-head img{width:min(330px,55vw);max-height:90px;object-fit:contain}.cspc-factory-brand-head div{display:flex;flex-direction:column;gap:5px}.cspc-factory-brand-head strong{font-size:18px;color:var(--cspc-navy)}.cspc-factory-brand-head span{color:var(--cspc-muted)}
.cspc-internal-logos .cspc-factory-doc-logo{width:155px!important;max-height:56px!important;object-fit:contain}
@media(max-width:860px){.cspc-logo-lockup{gap:4px;flex-wrap:wrap}.cspc-logo-small .cspc-logo-factory{width:92px}.cspc-factory-brand-head{align-items:flex-start;flex-direction:column}}

/* 4.9.1: un mismo ancho y eje central; se conservan las proporciones originales. */
.cspc-internal-logos{align-items:center;gap:18px;min-height:76px}
.cspc-internal-document-sheet .cspc-internal-logos img,
.cspc-internal-document-sheet.is-single-page .cspc-internal-logos img,
.cspc-internal-logos .cspc-factory-doc-logo{display:block;width:112px!important;height:auto!important;max-width:112px!important;max-height:none!important;flex:0 0 112px;object-fit:contain}
.cspc-logo-small > span{width:102px!important;height:64px!important}
.cspc-logo-large > span{width:min(220px,28vw)!important;height:140px!important}
.cspc-logo-print > span{width:122px!important;height:76px!important}
@media(max-width:480px){.cspc-internal-logos{width:100%;gap:10px}.cspc-internal-document-sheet .cspc-internal-logos img,.cspc-internal-document-sheet.is-single-page .cspc-internal-logos img{width:calc((100% - 20px)/3)!important;max-width:112px!important;flex:0 1 112px}.cspc-logo-small > span{width:82px!important;height:52px!important}}
