.records-page { --record-blue: #2563eb; --record-navy: #0b1f3a; width: 100%; max-width: 1680px; margin: 0 auto; padding: 28px; }
.motion-enter { animation: recordEnter 620ms var(--spring) both; }
.motion-enter:nth-child(2) { animation-delay: 45ms; }
.motion-enter:nth-child(3) { animation-delay: 90ms; }
.motion-enter:nth-child(4) { animation-delay: 135ms; }
.records-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.records-heading h1 { margin: 0; color: var(--ink); font-size: clamp(25px, 2vw, 32px); line-height: 1.12; letter-spacing: -.035em; }
.records-heading p { margin: 5px 0 0; color: var(--muted); }
.records-eyebrow { color: var(--blue-600) !important; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.records-title-row { display: flex; align-items: center; gap: 13px; }
.records-title-icon { display: grid; width: 47px; height: 47px; flex: 0 0 auto; place-items: center; border: 1px solid #dce8fb; border-radius: 15px; color: var(--blue-600); background: linear-gradient(145deg, #fff, #edf5ff); box-shadow: 0 9px 25px rgba(37, 99, 235, .08); }
.records-title-icon .icon { width: 22px; height: 22px; }
.records-breadcrumb { display: flex; align-items: center; gap: 6px; margin: 0 0 10px 60px; color: var(--muted); font-size: 11px; }
.records-breadcrumb a { color: var(--blue-600); font-weight: 700; }
.records-breadcrumb .icon { width: 12px; height: 12px; }
.records-heading-actions { display: flex; align-items: center; gap: 9px; }
.records-count { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; font-size: 11px; font-weight: 700; }

.records-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.record-kpi { position: relative; display: flex; min-height: 126px; align-items: flex-start; gap: 13px; overflow: hidden; padding: 19px; border: 1px solid rgba(224, 231, 241, .9); border-radius: 17px; background: white; box-shadow: var(--shadow-sm); transition: transform 420ms var(--spring), box-shadow 300ms ease, border-color 180ms ease; }
.record-kpi::after { position: absolute; right: -30px; bottom: -45px; width: 110px; height: 110px; content: ""; border-radius: 50%; background: currentColor; opacity: .035; }
.record-kpi:hover { z-index: 1; border-color: #d1e0f7; box-shadow: 0 19px 40px rgba(15, 52, 104, .09); transform: translateY(-4px); }
.record-kpi-icon { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--blue-600); background: var(--blue-50); }
.tone-green .record-kpi-icon { color: #078568; background: #ecfdf5; }
.tone-amber .record-kpi-icon { color: #c6710c; background: #fff8e8; }
.tone-cyan .record-kpi-icon { color: #087eab; background: #eafaff; }
.record-kpi-icon .icon { width: 18px; height: 18px; }
.record-kpi > div { display: flex; min-width: 0; flex-direction: column; }
.record-kpi p { margin: 0; color: var(--muted); font-size: 11px; font-weight: 650; }
.record-kpi strong { margin-top: 3px; color: var(--ink); font-size: 25px; letter-spacing: -.035em; }
.record-kpi small { margin-top: 2px; color: var(--muted-2); font-size: 10px; }
.record-kpi-trend { position: absolute; right: 14px; top: 16px; display: flex; align-items: center; gap: 3px; color: var(--success); font-size: 9px; font-weight: 750; }
.record-kpi-trend .icon { width: 12px; height: 12px; }

.records-surface { overflow: hidden; border: 1px solid rgba(224, 231, 241, .92); border-radius: 18px; background: white; box-shadow: var(--shadow-sm); }
.records-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 17px; border-bottom: 1px solid var(--line-soft); }
.records-search { position: relative; width: min(470px, 45%); }
.records-search > .icon { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; color: var(--muted-2); transform: translateY(-50%); }
.records-search input { width: 100%; height: 40px; padding: 0 56px 0 37px; border: 1px solid #dde5ef; border-radius: 11px; background: #f9fbfd; font-size: 12px; transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.records-search input:focus { border-color: #90baff; outline: 0; background: white; box-shadow: 0 0 0 4px rgba(37, 99, 235, .08); }
.records-search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); }
.records-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.filter-button { display: flex; height: 38px; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid #dde5ef; border-radius: 10px; color: var(--text); background: white; font-size: 11px; font-weight: 700; transition: border-color 180ms ease, color 180ms ease, background 180ms ease; }
.filter-button:hover, .filter-button.is-active { border-color: #a9c8f8; color: var(--blue-700); background: var(--blue-50); }
.filter-button .icon { width: 15px; height: 15px; }
.filter-button span { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 6px; color: white; background: var(--blue-600); font-size: 9px; }
.compact-select { display: flex; height: 38px; align-items: center; gap: 6px; padding-left: 11px; border: 1px solid #dde5ef; border-radius: 10px; color: var(--muted); font-size: 10px; }
.compact-select select { height: 100%; padding: 0 25px 0 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; font-weight: 650; }
.record-filter-panel { display: grid; grid-template-columns: repeat(3, minmax(140px, 1fr)) auto; align-items: end; gap: 10px; padding: 14px 17px; border-bottom: 1px solid var(--line-soft); background: #f9fbfe; animation: filterIn 360ms var(--spring) both; }
.record-filter-panel label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.record-filter-panel input, .record-filter-panel select { width: 100%; height: 36px; padding: 0 10px; border: 1px solid #dce5ef; border-radius: 9px; background: white; font-size: 11px; }
.records-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 11px 17px 0; border-bottom: 1px solid var(--line-soft); }
.records-tabs button { position: relative; display: flex; min-height: 37px; align-items: center; gap: 7px; padding: 0 10px 9px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; white-space: nowrap; }
.records-tabs button::after { position: absolute; right: 8px; bottom: -1px; left: 8px; height: 2px; content: ""; border-radius: 3px; background: var(--blue-600); transform: scaleX(0); transition: transform 380ms var(--spring); }
.records-tabs button.is-active { color: var(--blue-700); }
.records-tabs button.is-active::after { transform: scaleX(1); }
.records-tabs span { padding: 2px 6px; border-radius: 999px; background: #eef2f7; color: var(--muted); font-size: 9px; }
.records-tabs .is-active span { color: var(--blue-700); background: #eaf2ff; }
.records-bulkbar { display: flex; align-items: center; gap: 8px; padding: 10px 17px; color: #dbeafe; background: linear-gradient(95deg, #0b2b61, #123d81); animation: filterIn 300ms var(--spring) both; }
.records-bulkbar strong { margin-right: auto; color: white; font-size: 11px; }
.records-bulkbar button { display: flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 8px; color: #dbeafe; background: rgba(255, 255, 255, .08); font-size: 10px; }
.records-bulkbar button:hover { background: rgba(255, 255, 255, .16); }
.records-bulkbar .icon { width: 13px; height: 13px; }
.records-bulkbar .bulk-danger { color: #fecaca; }
.records-table-wrap { position: relative; min-height: 280px; overflow-x: auto; }
.records-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.records-table th { height: 42px; padding: 0 12px; color: var(--muted); background: #fbfcfe; font-size: 9px; font-weight: 800; letter-spacing: .055em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.records-table th button { padding: 0; color: #a5afbd; background: transparent; vertical-align: middle; }
.records-table th .icon { width: 12px; height: 12px; }
.records-table td { height: 65px; padding: 9px 12px; border-top: 1px solid var(--line-soft); color: var(--text); font-size: 11px; white-space: nowrap; transition: background 180ms ease; }
.records-table tbody tr { transition: transform 300ms var(--spring); }
.records-table tbody tr:hover td { background: #f8fbff; }
.records-table tbody tr.is-selected td { background: #f0f6ff; }
.check-cell { width: 38px; padding-right: 2px !important; text-align: center !important; }
.check-cell input { width: 15px; height: 15px; accent-color: var(--blue-600); }
.actions-cell { width: 78px; text-align: right !important; }
.type-reference { width: 130px; }
.type-amount { text-align: right !important; }
.record-reference { padding: 0; color: var(--blue-700); background: transparent; font-weight: 800; }
.record-reference:hover { text-decoration: underline; }
.record-entity { display: flex; align-items: center; gap: 9px; }
.record-entity > span { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--blue-700); background: var(--blue-50); font-size: 9px; font-weight: 850; }
.record-entity strong { max-width: 230px; overflow: hidden; color: var(--ink); text-overflow: ellipsis; }
.record-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 750; }
.record-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px currentColor; opacity: .75; }
.status-success { color: #08775b; background: #eafaf4; }
.status-warning { color: #aa640e; background: #fff7e7; }
.status-info { color: #096c9b; background: #eaf8ff; }
.status-neutral { color: #667085; background: #f0f2f5; }
.record-amount { color: var(--ink); font-variant-numeric: tabular-nums; }
.row-menu { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: var(--muted); background: transparent; }
.row-menu:hover { color: var(--blue-700); background: var(--blue-50); }
.row-menu .icon { width: 16px; height: 16px; }
.record-row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; }
.records-empty { position: absolute; inset: 42px 0 0; display: grid; align-content: center; justify-items: center; padding: 35px; background: white; text-align: center; }
.records-empty > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 16px; color: var(--blue-600); background: var(--blue-50); }
.records-empty h3 { margin: 11px 0 3px; color: var(--ink); font-size: 14px; }
.records-empty p { margin: 0; color: var(--muted); font-size: 11px; }
.records-pagination { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 17px; border-top: 1px solid var(--line-soft); }
.records-pagination p { margin: 0; color: var(--muted); font-size: 10px; }
.records-pagination > div { display: flex; align-items: center; gap: 3px; }
.records-pagination button { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; color: var(--muted); background: transparent; font-size: 10px; }
.records-pagination button:hover:not(:disabled), .records-pagination button.is-active { color: white; background: var(--blue-600); }
.records-pagination button:disabled { opacity: .35; cursor: default; }
.records-pagination .icon { width: 13px; height: 13px; }

.record-drawer-backdrop { position: fixed; z-index: 74; inset: 0; background: rgba(4, 16, 39, .28); backdrop-filter: blur(2px); animation: fadeIn 220ms ease both; }
.record-drawer { position: fixed; z-index: 75; top: 0; right: 0; display: flex; width: min(440px, 92vw); height: 100vh; flex-direction: column; border-left: 1px solid #dfe7f1; background: white; box-shadow: -24px 0 70px rgba(7, 26, 61, .18); transform: translateX(105%); transition: transform 520ms var(--spring); }
.record-drawer.is-open { transform: translateX(0); }
.record-drawer-head { display: flex; min-height: 76px; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.record-drawer-head small { color: var(--blue-600); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.record-drawer-head h2 { margin: 2px 0 0; color: var(--ink); font-size: 18px; }
.record-drawer-head > button .icon { transform: rotate(45deg); }
.record-drawer-body { flex: 1; overflow: auto; padding: 23px 20px; }
.drawer-metric { display: flex; flex-direction: column; margin-top: 22px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #f9fbfe; }
.drawer-metric small, .drawer-metric span { color: var(--muted); font-size: 10px; }
.drawer-metric strong { margin: 3px 0; color: var(--ink); font-size: 17px; }
.drawer-info { margin-top: 18px; color: var(--muted); font-size: 11px; }
.drawer-info ul { display: grid; gap: 8px; padding: 0; list-style: none; }
.drawer-info li { padding: 10px; border-radius: 9px; background: var(--blue-50); color: var(--blue-700); font-weight: 650; }
.record-drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 16px 20px; border-top: 1px solid var(--line); }

/* Create */
.create-heading { align-items: center; }
.back-button { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border: 1px solid #dfe7f1; border-radius: 13px; color: var(--text); background: white; transition: color 180ms ease, border-color 180ms ease, transform 350ms var(--spring); }
.back-button:hover { border-color: #a8c7f7; color: var(--blue-700); transform: translateX(-3px); }
.back-button .icon { width: 18px; height: 18px; }
.draft-state { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.draft-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(7, 150, 105, .1); }
.draft-state span { color: var(--text); font-weight: 700; }
.draft-state.is-saving i { background: var(--warning); animation: pulseDot 900ms ease infinite; }
.create-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 16px; padding-bottom: 92px; }
.create-main { display: grid; gap: 14px; min-width: 0; }
.form-progress, .form-section, .create-summary, .create-checklist { border: 1px solid rgba(224, 231, 241, .94); border-radius: 17px; background: white; box-shadow: var(--shadow-sm); }
.form-progress { padding: 14px 17px; }
.form-progress > div:first-child { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.form-progress strong { color: var(--blue-700); }
.form-progress-track { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: #eaf0f7; }
.form-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #54a4ff); box-shadow: 0 0 12px rgba(37, 99, 235, .32); transition: width 650ms var(--spring); }
.form-progress p { display: flex; align-items: center; gap: 5px; margin: 8px 0 0; color: var(--muted-2); font-size: 9px; }
.form-progress p .icon { width: 12px; height: 12px; }
.form-section { overflow: hidden; }
.form-section-head { display: flex; min-height: 72px; align-items: center; gap: 11px; padding: 14px 17px; border-bottom: 1px solid var(--line-soft); }
.form-section-head > span { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--blue-600); background: var(--blue-50); }
.form-section-head > span .icon { width: 17px; height: 17px; }
.form-section-head > div { min-width: 0; flex: 1; }
.form-section-head h2 { margin: 0; color: var(--ink); font-size: 14px; letter-spacing: -.01em; }
.form-section-head p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.section-toggle { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: var(--muted); background: transparent; }
.section-toggle:hover { color: var(--blue-700); background: var(--blue-50); }
.section-toggle .icon { width: 15px; height: 15px; transition: transform 380ms var(--spring); }
.form-section.is-collapsed .section-toggle .icon { transform: rotate(180deg); }
.form-section.is-collapsed .form-grid { display: none; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 14px; padding: 18px 17px 21px; }
.form-field { min-width: 0; }
.field-span-2 { grid-column: span 2; }
.field-span-3 { grid-column: 1 / -1; }
.form-field > label:not(.toggle-field) { display: block; margin-bottom: 6px; color: var(--text); font-size: 10px; font-weight: 750; }
.form-field label b { margin-left: 2px; color: var(--danger); }
.field-control { position: relative; }
.field-control input:not(.sr-only), .field-control select, .field-control textarea { width: 100%; min-height: 41px; padding: 9px 11px; border: 1px solid #dce4ee; border-radius: 10px; outline: 0; background: #fbfcfe; font-size: 11px; transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.field-control textarea { resize: vertical; }
.field-control input:not(.sr-only):focus, .field-control select:focus, .field-control textarea:focus { border-color: #87b4fc; background: white; box-shadow: 0 0 0 4px rgba(37, 99, 235, .08); }
.field-control select { padding-right: 33px; appearance: none; }
.select-chevron { position: absolute; right: 11px; top: 50%; width: 14px; height: 14px; pointer-events: none; color: var(--muted); transform: translateY(-50%); }
.field-control.has-prefix input { padding-left: 32px; }
.field-prefix { position: absolute; z-index: 1; left: 11px; top: 50%; color: var(--muted); font-size: 11px; transform: translateY(-50%); }
.field-leading-icon { position: absolute; z-index: 1; left: 11px; top: 50%; width: 15px; height: 15px; color: var(--muted); transform: translateY(-50%); }
.field-leading-icon + input { padding-right: 70px !important; padding-left: 34px !important; }
.field-action { position: absolute; right: 5px; top: 5px; display: flex; height: 31px; align-items: center; gap: 3px; padding: 0 8px; border-radius: 7px; color: var(--blue-700); background: var(--blue-50); font-size: 9px; font-weight: 750; }
.field-action .icon { width: 12px; height: 12px; }
.field-hint { display: block; margin-top: 4px; color: var(--muted-2); font-size: 9px; }
.field-error { display: flex; align-items: center; gap: 4px; margin-top: 5px; color: var(--danger); font-size: 9px; }
.field-error .icon { width: 12px; height: 12px; }
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea { border-color: #f2a6a2; background: #fffafa; }
.toggle-field { display: flex; min-height: 41px; align-items: center; justify-content: space-between; gap: 12px; margin-top: 21px; padding: 9px 11px; border: 1px solid #dce4ee; border-radius: 10px; background: #fbfcfe; cursor: pointer; }
.toggle-field > span { display: flex; flex-direction: column; }
.toggle-field strong { color: var(--text); font-size: 10px; }
.toggle-field small { color: var(--muted); font-size: 9px; }
.toggle-field input { position: absolute; opacity: 0; }
.toggle-field i { position: relative; width: 34px; height: 19px; flex: 0 0 auto; border-radius: 999px; background: #cbd5e1; transition: background 220ms ease; }
.toggle-field i::after { position: absolute; left: 3px; top: 3px; width: 13px; height: 13px; content: ""; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(15, 23, 42, .24); transition: transform 350ms var(--spring); }
.toggle-field input:checked + i { background: var(--blue-600); }
.toggle-field input:checked + i::after { transform: translateX(15px); }
.file-drop { display: flex !important; min-height: 72px; align-items: center; gap: 10px; padding: 12px !important; border: 1px dashed #b9c9de; border-radius: 11px; background: #fafcff; cursor: pointer; }
.file-drop:hover { border-color: #72a5f6; background: var(--blue-50); }
.file-drop > .icon { width: 20px; height: 20px; color: var(--blue-600); }
.file-drop span { display: flex; flex-direction: column; }
.file-drop strong { color: var(--blue-700); font-size: 10px; }
.file-drop small { color: var(--muted); font-size: 9px; }

.line-items-section .form-section-head { flex-wrap: wrap; }
.line-table-wrap { overflow-x: auto; }
.line-table { width: 100%; min-width: max(870px, 100%); border-collapse: collapse; }
.line-table.profile-purchase, .line-table.profile-purchase-order { min-width: 1120px; }
.line-table.profile-inventory-movement { min-width: 1020px; }
.line-table.profile-repair { min-width: 920px; }
.line-table th { padding: 10px 7px; color: var(--muted); background: #fbfcfe; font-size: 8px; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.line-table td { padding: 7px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; }
.line-table input, .line-table select { width: 82px; height: 36px; padding: 0 8px; border: 1px solid #dce4ee; border-radius: 8px; background: #fbfcfe; font-size: 10px; }
.line-table .line-description input { width: 100%; min-width: 210px; }
.line-table input:focus, .line-table select:focus { border-color: #87b4fc; outline: 0; background: white; box-shadow: 0 0 0 3px rgba(37, 99, 235, .07); }
.line-table strong { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.line-table td button { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; color: var(--muted); background: transparent; }
.line-table td button:hover { color: var(--danger); background: #fff1f0; }
.line-table td button .icon { width: 14px; height: 14px; }
.line-add-mobile { display: none; }

.create-aside { position: sticky; top: 86px; display: grid; gap: 12px; }
.create-summary { overflow: hidden; }
.create-summary > header { display: flex; align-items: center; gap: 10px; padding: 15px; border-bottom: 1px solid var(--line-soft); }
.create-summary > header > span { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 11px; color: #7359d0; background: #f1edff; }
.create-summary h2 { margin: 0; color: var(--ink); font-size: 13px; }
.create-summary p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.summary-identity { display: flex; align-items: center; gap: 11px; padding: 16px; }
.summary-identity > span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; color: var(--blue-600); background: var(--blue-50); }
.summary-identity > div { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.summary-identity small { color: var(--muted); font-size: 9px; }
.summary-identity strong { max-width: 180px; overflow: hidden; margin: 1px 0 4px; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.summary-identity em { padding: 3px 6px; border-radius: 999px; color: #9b6312; background: #fff5df; font-size: 8px; font-style: normal; font-weight: 750; }
.summary-placeholder { display: grid; justify-items: center; gap: 7px; margin: 0 15px 15px; padding: 22px 14px; border: 1px dashed #d7e0eb; border-radius: 12px; color: var(--muted); background: #fbfcfe; text-align: center; }
.summary-placeholder .icon { width: 20px; height: 20px; color: var(--blue-500); }
.summary-placeholder p { margin: 0; font-size: 9px; }
.document-totals { margin: 0; padding: 0 15px 15px; }
.document-totals > div { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; color: var(--muted); font-size: 10px; }
.document-totals dt, .document-totals dd { margin: 0; }
.document-totals dd { color: var(--ink); font-variant-numeric: tabular-nums; }
.document-totals .total { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 800; }
.document-totals .total dd { color: var(--blue-700); font-size: 18px; }
.create-checklist { padding: 15px; }
.create-checklist h3 { margin: 0 0 10px; color: var(--ink); font-size: 11px; }
.create-checklist ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.create-checklist li { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.create-checklist li .icon { width: 14px; height: 14px; padding: 2px; border-radius: 50%; color: white; background: var(--success); }
.create-checklist li.is-incomplete .icon { color: var(--muted); background: #e9eef4; }
.keyboard-tip { display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--muted); font-size: 9px; }
.keyboard-tip p { margin-left: 3px; }
.create-actions { position: fixed; z-index: 35; right: 0; bottom: 0; left: var(--sidebar-width); display: flex; min-height: 70px; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 28px; border-top: 1px solid rgba(218, 226, 237, .9); background: rgba(255, 255, 255, .92); box-shadow: 0 -10px 30px rgba(15, 23, 42, .04); backdrop-filter: blur(16px); transition: left 480ms var(--spring); }
.create-actions > div { margin-right: auto; }
.secure-save { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.secure-save .icon { width: 14px; height: 14px; color: var(--success); }
.sidebar-collapsed .create-actions { left: var(--sidebar-collapsed-width); }

/* Catálogos breves: una tarea corta no necesita la densidad de un documento */
.compact-create-page { max-width: 1120px; }
.compact-create-page .create-layout { grid-template-columns: minmax(0, 1fr) 250px; }
.compact-create-page .form-progress { display: none; }
.compact-create-page .form-section { border-radius: 20px; }
.compact-create-page .form-section-head { min-height: 80px; }
.compact-create-page .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 24px; }
.compact-create-page .field-span-2, .compact-create-page .field-span-3 { grid-column: 1 / -1; }

/* Perfiles documentales */
.create-record-page[data-profile="purchase"] .form-section-head > span,
.create-record-page[data-profile="purchase-order"] .form-section-head > span { color: #087eab; background: #eafaff; }
.create-record-page[data-profile="credit-note"] .form-section-head > span { color: #c84b5d; background: #fff0f2; }
.create-record-page[data-profile="repair"] .form-section-head > span { color: #7b5ac8; background: #f3efff; }
.create-record-page[data-profile="inventory-movement"] .form-section-head > span { color: #078568; background: #ecfdf5; }
.create-record-page[data-profile="product-advanced"] .form-section:nth-of-type(4) { border-color: #d7e5fa; }

/* Screen catalog */
.catalog-module { margin-top: 23px; }
.catalog-module-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.catalog-module-heading h2 { margin: 0; color: var(--ink); font-size: 14px; }
.catalog-module-heading span { color: var(--muted); font-size: 9px; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.catalog-card { display: flex; min-height: 92px; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow-sm); transition: border-color 180ms ease, box-shadow 300ms ease, transform 400ms var(--spring); }
.catalog-card:hover { border-color: #bfd5f7; box-shadow: 0 16px 35px rgba(15, 52, 104, .09); transform: translateY(-3px); }
.catalog-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--blue-600); background: var(--blue-50); }
.catalog-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.catalog-copy strong { color: var(--ink); font-size: 11px; }
.catalog-copy small { display: -webkit-box; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 9px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.catalog-arrow { width: 14px; height: 14px; color: #a8b2c0; transition: color 180ms ease, transform 300ms var(--spring); }
.catalog-card:hover .catalog-arrow { color: var(--blue-600); transform: translateX(3px); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }

@keyframes recordEnter { from { opacity: 0; transform: translateY(12px) scale(.995); } to { opacity: 1; transform: none; } }
@keyframes filterIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulseDot { 50% { opacity: .4; transform: scale(.8); } }

@media (prefers-reduced-motion: reduce) {
    .motion-enter, .record-filter-panel, .record-drawer-backdrop { animation: none; }
    .record-kpi, .record-drawer, .form-progress-track i { transition-duration: .01ms; }
}
@media (max-width: 1240px) {
    .records-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .create-layout { grid-template-columns: minmax(0, 1fr) 260px; }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .field-span-3 { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
    .records-page { padding: 22px 18px; }
    .create-layout { grid-template-columns: 1fr; }
    .create-aside { position: static; grid-template-columns: 1fr 1fr; }
    .create-summary { grid-row: span 2; }
    .create-actions { left: 0; padding-right: 18px; padding-left: 18px; }
    .records-table { min-width: 840px; }
    .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .records-page { padding: 17px 12px; }
    .records-heading { align-items: stretch; flex-direction: column; }
    .records-heading-actions { display: grid; grid-template-columns: .8fr 1.2fr; }
    .records-breadcrumb { margin-left: 0; }
    .records-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
    .record-kpi { min-height: 108px; padding: 13px; }
    .record-kpi-icon { width: 33px; height: 33px; }
    .record-kpi strong { font-size: 21px; }
    .record-kpi-trend { display: none; }
    .records-toolbar { align-items: stretch; flex-direction: column; }
    .records-search { width: 100%; }
    .records-toolbar-actions { justify-content: space-between; }
    .compact-select { flex: 1; }
    .record-filter-panel { grid-template-columns: 1fr 1fr; }
    .record-filter-panel label:first-child { grid-column: 1 / -1; }
    .records-pagination { align-items: flex-start; flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; padding: 15px 13px 18px; }
    .field-span-2, .field-span-3 { grid-column: auto; }
    .form-section-head { padding-right: 13px; padding-left: 13px; }
    .create-aside { grid-template-columns: 1fr; }
    .create-actions { flex-wrap: wrap; padding: 8px 12px; }
    .create-actions > div { display: none; }
    .create-actions .button { flex: 1; padding: 0 9px; }
    .create-actions .button:nth-of-type(2) { display: none; }
    .catalog-grid { grid-template-columns: 1fr; }
}
@supports (padding: max(0px)) {
    .create-actions { padding-right: max(28px, env(safe-area-inset-right)); padding-bottom: max(12px, env(safe-area-inset-bottom)); padding-left: max(28px, env(safe-area-inset-left)); }
    @media (max-width: 960px) { .create-actions { padding-right: max(18px, env(safe-area-inset-right)); padding-left: max(18px, env(safe-area-inset-left)); } }
    @media (max-width: 720px) { .create-actions { padding-right: max(12px, env(safe-area-inset-right)); padding-bottom: max(8px, env(safe-area-inset-bottom)); padding-left: max(12px, env(safe-area-inset-left)); } }
}
@media (max-width: 460px) {
    .records-kpis { grid-template-columns: 1fr; }
    .record-kpi { min-height: 94px; }
    .records-toolbar-actions .icon-button { display: none; }
    .records-bulkbar button { font-size: 0; }
    .records-bulkbar button .icon { width: 15px; height: 15px; }
    .record-filter-panel { grid-template-columns: 1fr; }
    .record-filter-panel label:first-child { grid-column: auto; }
    .records-pagination > div button:nth-of-type(3), .records-pagination > div button:nth-of-type(4), .records-pagination > div span { display: none; }
}
