:root {
    --cspc-navy: #082d68;
    --cspc-navy-dark: #041d46;
    --cspc-blue: #0a5689;
    --cspc-sky: #42a4da;
    --cspc-gold: #bd902f;
    --cspc-gold-light: #e7c66e;
    --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);
}

* { 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: 78px;
    padding: 10px clamp(18px, 4vw, 64px);
    background: #fff;
    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-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 { display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.cspc-logo-sanpablo { background: var(--cspc-navy-dark); border-radius: 9px; padding: 3px 8px; }
.cspc-logo-small .cspc-logo-dorminova { width: 116px; height: 54px; }
.cspc-logo-small .cspc-logo-sanpablo { width: 70px; height: 54px; }
.cspc-logo-large .cspc-logo-dorminova { width: min(250px, 50vw); height: 115px; }
.cspc-logo-large .cspc-logo-sanpablo { width: min(165px, 34vw); height: 115px; }

.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;
    gap: 4px;
    overflow-x: auto;
    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-main { width: min(1420px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 50px; flex: 1; }
.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-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(4, minmax(0, 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-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-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-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-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-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-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 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: 1050px; 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 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: 130px; }
.cspc-item-table th:nth-child(3), .cspc-item-table td:nth-child(3) { min-width: 220px; }
.cspc-item-table th:nth-child(4), .cspc-item-table td:nth-child(4) { width: 130px; }
.cspc-item-table th:nth-child(5), .cspc-item-table td:nth-child(5) { width: 140px; }
.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-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-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: .38in .42in .3in; 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-dorminova { width: 145px; height: 72px; }
.cspc-logo-print .cspc-logo-sanpablo { width: 95px; height: 72px; }
.cspc-print-strip { height: 7px; margin: 8px 0 12px; }
.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: 8px 0; border: 1px solid #9da9ba; }
.cspc-print-meta div { min-height: 41px; padding: 5px 7px; 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: 12%; }
.cspc-print-table th:nth-child(3) { width: 28%; }
.cspc-print-table th:nth-child(4) { width: 12%; }
.cspc-print-table th:nth-child(5) { width: 16%; }
.cspc-print-table th:nth-child(6) { width: 25%; }
.cspc-print-table td:first-child { text-align: center; font-weight: 800; }
.cspc-print-table tr.blank td { height: 25px; }
.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-signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 37px 4px 15px; }
.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: 2px; padding: 5px 8px; color: #fff; background: var(--cspc-blue); font-size: 7.3px; text-align: center; }
.cspc-print-footer a { color: #fff; font-weight: 800; }

.cspc-returns { margin-top: 24px; }
.cspc-returns .cspc-data-table input { min-width: 100px; }
.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-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 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(280px, 1.8fr) minmax(150px, .7fr) auto auto; }
.cspc-filter-orders { grid-template-columns: minmax(240px, 1.5fr) minmax(160px, .7fr) minmax(160px, .7fr) 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-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-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-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 > 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-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: 18px 0; padding: 18px; border: 1px solid #b8c1cf; }
.cspc-warranty-copy h2 { margin: 0 0 12px; color: var(--cspc-navy); font-size: 16px; }
.cspc-warranty-copy p { font-size: 11px; line-height: 1.6; }

.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-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-dorminova { width: 88px; }
    .cspc-logo-small .cspc-logo-sanpablo { width: 58px; }
    .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-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-dorminova { width: 190px; height: 90px; }
    .cspc-logo-large .cspc-logo-sanpablo { width: 125px; height: 90px; }
}

@page { size: Letter portrait; margin: 8mm 9mm 8mm; }
@media print {
    html, body.cspc-system-page { width: 100%; min-height: 0; margin: 0; padding: 0; color: #000; background: #fff; }
    .no-print, #wpadminbar { 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: 0; margin: 0; padding: 0; box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .cspc-print-company h2 { font-size: 14px; }
    .cspc-logo-print .cspc-logo-dorminova { width: 130px; height: 64px; }
    .cspc-logo-print .cspc-logo-sanpablo { width: 86px; height: 64px; }
    .cspc-print-table thead { display: table-header-group; }
    .cspc-print-table tr { break-inside: avoid; page-break-inside: avoid; }
    .cspc-print-footer a { text-decoration: none; }
}
