:root {
  --ink: #18231f;
  --muted: #77817b;
  --line: #e2e7e1;
  --paper: #f7f8f4;
  --white: #ffffff;
  --green: #2d6a4f;
  --green-dark: #173f30;
  --mint: #e7f1e9;
  --amber: #d98b35;
  --red: #bb5a45;
  --shadow: 0 12px 34px rgba(31, 54, 44, .07);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Manrope, 'Noto Sans SC', sans-serif; font-size: 16px; }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; }
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 246px; padding: 28px 18px; background: #173f30; color: #e9f2e9; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px 44px; }
.brand-mark { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.45); border-radius: 11px 4px 11px 4px; position: relative; }
.brand-mark:before, .brand-mark:after { content: ''; position: absolute; background: #b4d7bc; border-radius: 8px; }
.brand-mark:before { width: 5px; height: 20px; left: 10px; top: 7px; transform: rotate(40deg); }
.brand-mark:after { width: 5px; height: 14px; right: 9px; top: 9px; transform: rotate(-40deg); }
.brand h1 { font-size: 17px; letter-spacing: .08em; margin: 0; font-weight: 800; }
.brand small { display: block; color: #9fbaaa; letter-spacing: .14em; font: 10px 'DM Mono', monospace; margin-top: 3px; }
.nav-label { padding: 0 12px; color: #789789; font: 10px 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .14em; }
.nav { margin-top: 12px; display: grid; gap: 5px; }
.nav button { text-align: left; color: #afc6b7; background: transparent; border-radius: 10px; padding: 13px 12px; display: flex; align-items: center; gap: 12px; font-size: 15px; }
.nav button:hover, .nav button.active { color: white; background: rgba(255,255,255,.12); }
.nav .icon { width: 18px; color: #83b493; font-size: 17px; text-align: center; }
.main { flex: 1; min-width: 0; }
.topbar { height: 83px; background: var(--white); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 42px; }
.breadcrumb { color: var(--muted); font-size: 12px; }
.breadcrumb b { color: var(--ink); font-size: 14px; margin-left: 8px; }
.top-actions { display: flex; align-items: center; gap: 20px; }
.month-select { border: 1px solid var(--line); background: white; padding: 9px 12px; border-radius: 8px; color: var(--ink); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #2d6a4f; background: #dfeee1; font-weight: 800; font-size: 13px; }
.content { max-width: 1440px; padding: 34px 42px 54px; margin: auto; }
.page-title { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 29px; }
.eyebrow { color: var(--green); font: 11px 'DM Mono', monospace; letter-spacing: .16em; text-transform: uppercase; }
h2 { margin: 7px 0 0; font-size: clamp(25px, 3vw, 35px); letter-spacing: -.04em; }
.subline { color: var(--muted); font-size: 15px; margin: 8px 0 0; }
.primary { background: var(--green); color: white; padding: 12px 17px; border-radius: 8px; font-weight: 700; box-shadow: 0 5px 15px rgba(45,106,79,.18); }
.primary:hover { background: var(--green-dark); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dashboard-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); }
.metric { min-height: 135px; position: relative; overflow: hidden; }
.metric:after { content: ''; position: absolute; width: 78px; height: 78px; right: -19px; bottom: -25px; border-radius: 50%; background: var(--mint); }
.metric-label { color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; }
.metric-value { font-size: 27px; letter-spacing: -.05em; font-weight: 800; margin-top: 13px; position: relative; z-index: 1; }
.metric-value.green { color: var(--green); }
.metric-note { color: var(--muted); font-size: 13px; margin-top: 11px; }
.metric-note.up { color: var(--green); }
.grid { display: grid; grid-template-columns: 1.35fr .9fr; gap: 17px; margin-top: 17px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.card-head h3 { margin: 0; font-size: 16px; }
.card-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.ghost { color: var(--green); background: transparent; padding: 3px 0; font-size: 14px; }
.chart { height: 208px; display: flex; align-items: flex-end; gap: 16px; padding: 13px 8px 26px; background: linear-gradient(180deg, #fbfcfa, #fff); border-radius: 9px; position: relative; }
.chart:before { content: ''; position: absolute; inset: 25px 0 40px; background: repeating-linear-gradient(to bottom, transparent 0 37px, #edf1ec 38px 39px); pointer-events: none; }
.bar-group { flex: 1; height: 100%; display: flex; justify-content: flex-end; align-items: center; flex-direction: column; gap: 6px; z-index: 1; }
.bars { width: 100%; height: 150px; display: flex; gap: 4px; align-items: flex-end; justify-content: center; }
.bar { width: 17px; border-radius: 4px 4px 2px 2px; background: #c9dbcd; }
.bar.in { background: var(--green); }
.bar.out { background: #e9bd82; }
.bar-label { font: 10px 'DM Mono', monospace; color: var(--muted); }
.legend { display: flex; gap: 16px; font-size: 10px; color: var(--muted); }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--green); margin-right: 5px; }
.legend i.orange { background: #e9bd82; }
.donut-wrap { display: flex; align-items: center; gap: 24px; min-height: 208px; }
.donut { width: 150px; height: 150px; flex: 0 0 150px; border-radius: 50%; background: conic-gradient(#2d6a4f 0 38%, #7ead88 38% 62%, #dfab67 62% 78%, #d8deda 78% 100%); position: relative; }
.donut:after { content: ''; position: absolute; inset: 34px; background: white; border-radius: 50%; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; font-weight: 800; font-size: 20px; }
.donut-center small { display: block; color: var(--muted); font-size: 10px; font-weight: 500; text-align: center; margin-top: -41px; }
.breakdown { flex: 1; display: grid; gap: 14px; min-width: 0; }
.breakdown-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; font-size: 14px; transform: none; white-space: normal; }
.breakdown-row span:first-child { display: flex; align-items: center; min-width: 0; line-height: 1.4; }
.breakdown-row span:first-child:after { content: ''; }
.breakdown-name:before { display: none !important; }
.breakdown-name i { width: 8px; height: 8px; flex: 0 0 8px; margin-right: 9px; border-radius: 3px; }
.breakdown-row span:first-child:before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--green); margin-right: 7px; }
.breakdown-row:nth-child(2) span:first-child:before { background: #7ead88; }
.breakdown-row:nth-child(3) span:first-child:before { background: #dfab67; }
.breakdown-row:nth-child(4) span:first-child:before { background: #d8deda; }
.breakdown-row span:last-child { flex: 0 0 auto; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 13px; text-align: right; }
.wide { margin-top: 17px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { color: var(--muted); font-size: 12px; text-align: left; font-weight: 500; padding: 0 12px 12px; border-bottom: 1px solid var(--line); }
td { padding: 15px 12px; border-bottom: 1px solid #edf0ec; white-space: nowrap; font-size: 14px; }
tr:last-child td { border: 0; }
.order-no { color: var(--green); font-family: 'DM Mono', monospace; font-size: 11px; }
.status { display: inline-block; border-radius: 20px; padding: 5px 9px; font-size: 10px; }
.status.done { color: #397653; background: #e6f2e8; }
.status.install { color: #9a651d; background: #fff1d9; }
.status.progress { color: #65756d; background: #eff2ef; }
.money { font-family: 'DM Mono', monospace; }
.money.green { color: var(--green); }
.empty { text-align: center; padding: 40px; color: var(--muted); }
.table-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.table-search { width: min(300px, 34vw); border: 1px solid var(--line); border-radius: 7px; background: #fcfdfb; color: var(--ink); padding: 10px 12px; outline: none; font-size: 13px; }
.table-search:focus { border-color: #80ab8b; box-shadow: 0 0 0 3px #e5f0e7; }
.pagination { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; color: var(--muted); font-size: 12px; }
.pagination-actions, .page-numbers { display: flex; align-items: center; gap: 6px; }
.page-button { background: #eef1ed; color: var(--ink); padding: 7px 11px; border-radius: 6px; font-size: 12px; }
.page-number { min-width: 32px; padding-left: 7px; padding-right: 7px; text-align: center; }
.page-number.active { background: var(--green); color: white; box-shadow: 0 3px 8px rgba(45,106,79,.18); }
.page-number.active:hover { background: var(--green); color: white; }
.page-ellipsis { color: var(--muted); padding: 0 2px; }
.page-button:disabled { opacity: .45; cursor: not-allowed; }
.page-button:not(:disabled):hover { background: var(--mint); color: var(--green); }
.order-search { margin-bottom: 8px; }
.filter-panel { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding: 15px; margin: 0 0 18px; background: #f7faf6; border: 1px solid #e4ebe3; border-radius: 10px; }
.filter-field { display: grid; gap: 6px; min-width: 145px; }
.filter-field label { color: var(--muted); font-size: 12px; }
.filter-field input, .filter-field select { height: 40px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); padding: 0 10px; outline: none; font-size: 14px; }
.filter-field input:focus, .filter-field select:focus { border-color: #80ab8b; box-shadow: 0 0 0 3px #e5f0e7; }
.filter-reset { height: 38px; padding: 0 13px; color: var(--green); background: #e5f0e7; border-radius: 7px; font-size: 12px; }
.ledger-table { border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.ledger-table thead { position: sticky; top: 0; z-index: 2; }
.ledger-table th { background: #eaf2eb; color: #496558; padding-top: 15px; padding-bottom: 15px; font-size: 13px; font-weight: 800; letter-spacing: .04em; border-bottom: 2px solid #c9dacb; }
.ledger-table td { background: white; }
.ledger-table tbody tr:hover td { background: #fbfdf9; }
.ledger-table tbody tr:nth-child(even) td { background: #fcfdfb; }
.ledger-table tfoot th { background: #f0f6f0; color: var(--ink); padding-top: 15px; padding-bottom: 15px; border-top: 2px solid #c9dacb; font-size: 13px; }
.ledger-table tfoot .money { color: var(--green); }
.ledger-table tfoot .summary-total td { background: #f0f6f0; font-weight: 800; }
.ledger-table td:first-child, .ledger-table th:first-child { padding-left: 17px; }
.ledger-table td:last-child, .ledger-table th:last-child { padding-right: 17px; }
.ledger-card { box-shadow: 0 14px 38px rgba(31, 54, 44, .08); }
.ledger-card h3 { font-size: 18px; }
.wide td .secondary-text { font-size: 12px !important; color: var(--muted); line-height: 1.7; }
.wide td { font-size: 14px; }
.wide th { font-size: 13px; }
.wide td span[style*="font-size:10px"] { font-size: 12px !important; line-height: 1.6; }
.field label { font-size: 12px; }
.order-summary-grid { display: grid; grid-template-columns: repeat(6, minmax(125px, 1fr)); gap: 10px; margin: 0 0 18px; }
.summary-stat { min-width: 0; padding: 14px 15px; border: 1px solid #e4ebe3; border-radius: 9px; background: #f8faf7; }
.summary-stat span, .summary-stat em { display: block; color: var(--muted); font-size: 12px; font-style: normal; }
.summary-stat strong { display: block; margin: 9px 0 5px; color: var(--ink); font: 700 17px Arial, "Segoe UI", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-stat strong small { font-size: 12px; font-weight: 500; }
.summary-stat em { font-size: 11px; }
.summary-stat.positive strong { color: var(--green); }
.summary-stat.warning strong { color: var(--amber); }
.date-cell { color: var(--muted); font-family: Arial, "Segoe UI", sans-serif; font-size: 13px; }
.address-cell { max-width: 230px; white-space: normal !important; line-height: 1.5; }
.secondary-text { font-size: 14px !important; }
.order-no, .money { font-family: Arial, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.order-no { font-size: 14px !important; font-weight: 700; }
.money { font-size: 15px; }
.status { font-size: 12px; }
.pagination, .page-button { font-size: 13px; }
.order-results { display: none; margin-top: 2px; border: 1px solid var(--line); border-radius: 9px; background: white; overflow: hidden; box-shadow: 0 12px 25px rgba(31, 54, 44, .1); }
.order-results.visible { display: grid; }
.order-result { display: grid; gap: 4px; text-align: left; padding: 12px 14px; color: var(--ink); background: white; border-bottom: 1px solid #edf0ec; }
.order-result:last-child { border-bottom: 0; }
.order-result:hover { background: #f1f7f1; }
.order-result strong { color: var(--green); font: 700 14px Arial, "Segoe UI", sans-serif; }
.order-result span { color: var(--muted); font-size: 13px; line-height: 1.45; white-space: normal; }
.search-hint, .search-empty, .selected-order { padding: 12px 14px; color: var(--muted); font-size: 13px; }
.selected-order { color: var(--green); background: #f1f7f1; font-weight: 700; }
.page { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 34, 26, .42); display: grid; place-items: center; z-index: 20; padding: 20px; }
.modal { background: white; width: min(620px, 100%); max-height: 90vh; overflow: auto; border-radius: 15px; box-shadow: 0 25px 70px rgba(0,0,0,.2); padding: 25px; }
.modal h3 { margin: 0; font-size: 20px; }
.modal-head { position:sticky; top:0; z-index:25; display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; padding-top:2px; background:rgba(255,255,255,.98); }
.close { font-size: 24px; color: var(--muted); background: transparent; line-height: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 10px 11px; color: var(--ink); outline: none; background: #fcfdfb; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #80ab8b; box-shadow: 0 0 0 3px #e5f0e7; }
.modal-foot { margin-top: 23px; display: flex; justify-content: flex-end; gap: 10px; }
.secondary { color: var(--ink); background: #eef1ed; padding: 11px 16px; border-radius: 7px; }
.login { min-height: 100vh; background: #173f30; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden; }
.login:before, .login:after { content: ''; position: absolute; border: 1px solid rgba(202,235,207,.14); border-radius: 50%; }
.login:before { width: 650px; height: 650px; right: -220px; top: -250px; }
.login:after { width: 430px; height: 430px; left: -180px; bottom: -160px; }
.login-card { position: relative; z-index: 1; width: min(410px, 100%); padding: 40px; background: #fbfcf8; border-radius: 18px; box-shadow: 0 22px 70px rgba(0,0,0,.22); }
.login-card .brand { color: var(--green-dark); padding: 0 0 32px; }
.login-card .brand-mark { border-color: var(--green); }
.login-card .brand-mark:before, .login-card .brand-mark:after { background: var(--green); }
.login-title { font-size: 25px; margin-bottom: 7px; letter-spacing: -.04em; }
.login-copy { color: var(--muted); font-size: 12px; margin: 0 0 25px; }
.login-form { display: grid; gap: 15px; }
.login-form .primary { width: 100%; margin-top: 7px; }
.error { color: var(--red); font-size: 11px; min-height: 15px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 30; background: var(--green-dark); color: white; padding: 12px 16px; border-radius: 8px; font-size: 12px; box-shadow: var(--shadow); animation: toast .25s ease both; }
@keyframes toast { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.hardware-title-actions { display:flex; align-items:center; gap:10px; }
.hardware-tabs { display:flex; gap:8px; padding:6px; margin-bottom:18px; background:#eef4ee; border:1px solid #dfe9df; border-radius:11px; overflow-x:auto; }
.hardware-tab { flex:0 0 auto; color:#547060; background:transparent; padding:10px 18px; border-radius:8px; font-size:14px; font-weight:700; }
.hardware-tab:hover, .hardware-tab.active { color:white; background:var(--green); box-shadow:0 4px 10px rgba(45,106,79,.16); }
.hardware-metrics { grid-template-columns:repeat(4, minmax(0,1fr)); }
.hardware-profit-cards { grid-template-columns:repeat(3, minmax(0,1fr)); margin-bottom:17px; }
.hardware-metrics .metric, .hardware-profit-cards .metric { min-height:120px; }
.hardware-metrics .metric-value small, .hardware-profit-cards .metric-value small { font-size:14px; font-weight:500; letter-spacing:0; }
.warning-text { color:var(--amber) !important; }
.hardware-action-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:15px; margin-bottom:17px; }
.hardware-action-card { min-height:128px; padding:20px; text-align:left; border:1px solid #dce8dc; border-radius:13px; background:linear-gradient(135deg,#f5faf5,#fff); color:var(--ink); box-shadow:var(--shadow); transition:transform .2s, box-shadow .2s, border-color .2s; }
.hardware-action-card:hover { transform:translateY(-2px); border-color:#9fc2a6; box-shadow:0 15px 32px rgba(31,54,44,.1); }
.hardware-action-card span { display:block; color:var(--green); font:700 11px 'DM Mono',monospace; letter-spacing:.12em; margin-bottom:16px; }
.hardware-action-card strong { display:block; font-size:18px; margin-bottom:7px; }
.hardware-action-card em { display:block; color:var(--muted); font-size:13px; font-style:normal; line-height:1.6; }
.hardware-section { margin-top:17px; }
.compact { padding:7px 10px; font-size:12px; }
.note-detail-button { white-space:nowrap; color:#173f30; font-weight:700; }
.note-detail-summary { display:flex; align-items:center; gap:12px; padding:12px 14px; margin-bottom:14px; border:1px solid #e4ebe3; border-radius:10px; background:#f7faf6; }
.note-detail-summary span, .note-detail-summary em { color:var(--muted); font-size:13px; font-style:normal; }
.note-detail-summary strong { color:var(--ink); font-size:15px; }
.note-detail-table .note-cell { min-width:280px; white-space:normal; line-height:1.55; }
.modal-wide { width:min(920px,100%); }
.modal-report { width:min(1000px,100%); }
.hardware-editor-backdrop { padding:12px; place-items:center; }
.hardware-editor-backdrop .modal { box-sizing:border-box; width:min(1400px, 96vw); height:min(94vh, 1100px); max-height:94vh; padding:24px 28px 0; overflow:hidden; display:flex; flex-direction:column; }
.hardware-editor-modal { width:min(1400px, 96vw); height:min(94vh, 1100px); max-height:94vh; padding:24px 28px 0; overflow:hidden; display:flex; flex-direction:column; }
.hardware-editor-modal > form { min-height:0; flex:1; display:flex; flex-direction:column; }
.hardware-editor-modal .modal-head { position:sticky; top:0; z-index:25; flex:0 0 auto; margin:-5px -28px 24px; padding:5px 28px 18px; background:rgba(255,255,255,.98); border-bottom:1px solid #edf0ec; }
.hardware-editor-modal #hardwareRooms { min-height:0; flex:1; overflow:auto; padding:2px 5px 18px 0; }
.hardware-editor-modal .modal-foot { flex:0 0 auto; position:sticky; bottom:0; z-index:24; margin:0 -28px; padding:14px 28px 24px; background:linear-gradient(to bottom, rgba(255,255,255,.88), #fff 35%); border-top:1px solid #edf0ec; }
.hardware-editor-modal .close { width:40px; height:40px; display:grid; place-items:center; border-radius:9px; background:#eef4ee; color:var(--green-dark); }
.hardware-editor-modal .close:hover { background:#dfeee1; }
.modal-report .modal-head { position:sticky; top:0; z-index:25; margin:-5px -28px 20px; padding:5px 28px 14px; background:rgba(255,255,255,.98); border-bottom:1px solid #edf0ec; }
.modal-report .close { width:40px; height:40px; display:grid; place-items:center; border-radius:9px; background:#eef4ee; color:var(--green-dark); }
.hardware-editor-modal .hardware-room { padding:18px; }
.hardware-editor-modal .hardware-form-head { margin-top:24px; }
.hardware-form-head { display:flex; align-items:center; justify-content:space-between; margin:21px 0 10px; }
.hardware-lines { display:grid; gap:8px; }
.hardware-line { display:grid; grid-template-columns:minmax(180px,1.3fr) minmax(110px,.6fr) minmax(130px,.8fr) 30px; gap:8px; align-items:center; }
.hardware-line input, .hardware-line select, .hardware-room-head input { min-width:0; height:40px; border:1px solid var(--line); border-radius:7px; background:#fcfdfb; color:var(--ink); padding:0 10px; outline:none; }
.hardware-item-picker { min-width:0; display:grid; gap:6px; }
.hardware-item-picker { position:relative; }
.hardware-item-picker .line-item { display:none; }
.hardware-item-picker input, .hardware-item-picker select { width:100%; min-width:0; height:40px; border:1px solid var(--line); border-radius:7px; background:#fcfdfb; color:var(--ink); padding:0 10px; outline:none; }
.hardware-item-picker input:focus, .hardware-item-picker select:focus { border-color:#80ab8b; box-shadow:0 0 0 3px #e5f0e7; }
.hardware-item-results { display:none; position:absolute; z-index:20; top:44px; left:0; right:0; max-height:260px; overflow:auto; border:1px solid var(--line); border-radius:9px; background:white; box-shadow:0 14px 28px rgba(31,54,44,.14); }
.hardware-item-results.visible { display:grid; }
.hardware-item-result { display:grid; gap:3px; width:100%; padding:10px 12px; text-align:left; color:var(--ink); background:white; border-bottom:1px solid #edf0ec; }
.hardware-item-result:last-child { border-bottom:0; }
.hardware-item-result:hover { background:#f1f7f1; }
.hardware-item-result strong { color:var(--green); font-size:14px; }
.hardware-item-result span, .hardware-item-search-empty { color:var(--muted); font-size:12px; line-height:1.45; }
.hardware-item-search-empty { padding:12px; }
.hardware-price-status { display:flex; align-items:center; flex-wrap:wrap; gap:5px 8px; min-height:24px; color:var(--muted); font-size:12px; }
.hardware-price-status small, .ledger-table .price-audit-badge + small { color:var(--muted); font-size:12px; }
.ledger-table .price-audit-badge + small { display:block; margin-top:3px; white-space:normal; }
.price-audit-badge { display:inline-flex; align-items:center; min-height:24px; padding:3px 8px; border-radius:999px; font-size:12px; font-weight:800; white-space:nowrap; }
.price-audit-badge.matched { color:#236b38; background:#e4f4e8; }
.price-audit-badge.pending { color:#9a651d; background:#fff1d9; }
.price-audit-badge.missing { color:#a63226; background:#ffe4df; }
.hardware-price-audit { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; margin:14px 0 8px; padding:12px 14px; border:1px solid #e4ebe3; border-radius:10px; background:#f7faf6; color:var(--muted); font-size:13px; }
.hardware-price-audit strong { color:var(--ink); }
.hardware-price-audit .matched { color:#236b38; font-weight:800; }
.hardware-price-audit .pending { color:#9a651d; font-weight:800; }
.hardware-price-audit .missing { color:#a63226; font-weight:800; }
.detail-audit { margin-bottom:18px; }
.import-warning { color:#9a651d !important; font-weight:800; }
.hardware-line input:focus, .hardware-line select:focus, .hardware-room-head input:focus { border-color:#80ab8b; box-shadow:0 0 0 3px #e5f0e7; }
.line-remove { width:30px; height:30px; color:var(--red); background:#fff1ef; border-radius:7px; font-size:18px; }
.hardware-room { padding:14px; margin-bottom:12px; border:1px solid #e2e9e2; border-radius:10px; background:#fbfdfb; }
.hardware-room-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:9px; }
.hardware-room-head > input { flex:1; font-weight:700; }
.hardware-room-head > div { display:flex; gap:7px; flex-wrap:wrap; }
.outbound-line-header { display:grid; grid-template-columns:minmax(260px,1.35fr) minmax(72px,.35fr) minmax(120px,.55fr) minmax(120px,.55fr) minmax(110px,.5fr) minmax(160px,.8fr) 30px; gap:8px; align-items:center; margin:12px 0 7px; padding:10px 10px; border-radius:9px; background:#f3eadc; color:#2f2418; font-size:13px; font-weight:900; }
.outbound-line { grid-template-columns:minmax(260px,1.35fr) minmax(72px,.35fr) minmax(120px,.55fr) minmax(120px,.55fr) minmax(110px,.5fr) minmax(160px,.8fr) 30px; align-items:start; padding:6px 0; border-bottom:1px solid #eee4d6; }
.outbound-line .line-unit[readonly] { background:#f5f0e8; }
.line-subtotal { min-height:40px; display:flex; align-items:center; padding:0 2px; color:#0d120f; font-family:"DM Mono", monospace; font-size:14px; }
.field-tip { color:var(--muted); font-size:12px; line-height:1.5; }
.hardware-import-preview { min-height:58px; display:grid; place-items:center; margin-top:15px; padding:13px; border:1px dashed #cbd9cc; border-radius:9px; background:#f7faf7; color:var(--muted); font-size:13px; }
.import-success { width:100%; display:flex; flex-wrap:wrap; gap:7px 18px; align-items:center; color:var(--green); }
.import-success strong { font-size:14px; }
.import-success span { color:var(--muted); }
.import-error { color:var(--red); }
.price-pending { display:inline-flex; align-items:center; min-height:27px; padding:4px 9px; border-radius:999px; color:#9a651d; background:#fff1d9; font-size:12px; font-weight:700; white-space:nowrap; }
.select-cell { width:44px; min-width:44px; padding-left:14px !important; padding-right:8px !important; text-align:center; }
.hardware-item-checkbox, .hardware-select-all { width:17px; height:17px; margin:0; accent-color:var(--green); cursor:pointer; vertical-align:middle; }
.bulk-selection-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:12px 14px; margin:0 0 14px; border:1px solid #e4ebe3; border-radius:10px; background:#f7faf6; color:var(--muted); font-size:13px; }
.bulk-selection-bar span { color:var(--ink); font-weight:700; }
.bulk-selection-bar button { margin-left:8px; }
.row-actions { display:flex; align-items:center; gap:13px; white-space:nowrap; }
.danger-action { color:var(--red); }
.danger-action:hover { color:#a63226; }
.danger-action:disabled { color:#a9b1ac; cursor:not-allowed; opacity:.65; }
.hardware-detail-meta { display:flex; flex-wrap:wrap; gap:8px 25px; padding:13px 15px; margin-bottom:17px; border-radius:9px; background:#f4f8f3; color:var(--muted); font-size:13px; }
.hardware-detail-meta b { color:var(--ink); }
.detail-tabs-copy { display:flex; align-items:baseline; gap:10px; margin:18px 0 9px; }
.detail-tabs-copy h3 { margin:0; font-size:17px; }
.detail-tabs-copy p { margin:0; color:var(--muted); font-size:12px; }
.detail-room { margin-bottom:14px; }
.detail-room h4 { margin:0; padding:9px 12px; color:#704d2c; background:#f3e3cf; border:1px solid #e5cfb1; border-bottom:0; font-size:14px; }
.detail-room table { border:1px solid #e5cfb1; }
.detail-room th, .detail-room td { padding:9px 11px; border-bottom:1px solid #edf0ec; }
.detail-room th { background:#fff9f0; color:#765f46; font-size:12px; }
.detail-room td { font-size:13px; white-space:normal; }
.summary-total td { font-weight:800; background:#f8fbf6; }
.hardware-print-title { display:none; }
@media (max-width:1250px) { .hardware-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:700px) { .hardware-title-actions { width:100%; flex-direction:column; align-items:stretch; } .hardware-title-actions button { width:100%; } .hardware-metrics, .hardware-profit-cards { grid-template-columns:1fr 1fr; } .hardware-action-grid { grid-template-columns:1fr; } .hardware-tab { padding:9px 13px; font-size:13px; } .hardware-line { grid-template-columns:1fr 1fr 30px; } .outbound-line-header { display:none; } .outbound-line { grid-template-columns:1fr 1fr; } .outbound-line .hardware-item-picker, .outbound-line input[name="note"] { grid-column:1 / -1; } .hardware-item-picker { grid-column:1 / -1; } .hardware-room-head { align-items:stretch; flex-direction:column; } .hardware-room-head > div { justify-content:flex-end; } .modal-wide, .modal-report { width:100%; max-height:calc(100vh - 12px); padding:18px; } .hardware-editor-backdrop { padding:6px; } .hardware-editor-backdrop .modal, .hardware-editor-modal { width:100%; height:calc(100vh - 12px); max-height:calc(100vh - 12px); padding:18px 18px 0; } .hardware-editor-modal .modal-head { top:0; margin:-2px -18px 20px; padding:2px 18px 14px; } .hardware-editor-modal .modal-foot { margin:0 -18px; padding:12px 18px 18px; } }
@media (max-width: 1250px) { .dashboard-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .order-summary-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); } }
@media (max-width: 1050px) { .sidebar { width: 210px; } .content, .topbar { padding-left: 24px; padding-right: 24px; } .cards { grid-template-columns: repeat(2, 1fr); } .grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .shell { display: block; } .sidebar { width: 100%; padding: 15px; } .brand { padding: 0 5px 17px; } .nav-label { display: none; } .nav { display: flex; overflow-x: auto; margin: 0; } .nav button { white-space: nowrap; padding: 9px 10px; } .topbar { height: 64px; padding: 0 16px; } .month-select { display: none; } .content { padding: 23px 16px 40px; } .page-title { align-items: flex-start; gap: 16px; flex-direction: column; } .cards { grid-template-columns: 1fr 1fr; gap: 10px; } .card { padding: 15px; } .metric { min-height: 120px; } .metric-value { font-size: 21px; } .donut-wrap { flex-direction: column; align-items: flex-start; } .form-grid { grid-template-columns: 1fr; } .field.full { grid-column: auto; } .table-tools { align-items: stretch; flex-direction: column; gap: 9px; } .table-search { width: 100%; } .filter-panel { align-items: stretch; flex-direction: column; } .filter-field { min-width: 0; } .filter-reset { width: 100%; } .order-summary-grid { grid-template-columns: 1fr 1fr; } .summary-stat strong { font-size: 15px; } .pagination { align-items: flex-start; flex-direction: column; gap: 10px; } .pagination-actions { width: 100%; overflow-x: auto; padding-bottom: 3px; } }
@page {
  size:A4;
  margin:7mm 8mm 10mm;
  @bottom-center {
    content:"第 " counter(page) " 页";
    font-family:"Microsoft YaHei", "Noto Sans SC", sans-serif;
    font-size:9px;
    color:#555;
  }
}
@media print {
  body { background:white !important; }
  body > *:not(.hardware-print-root) { display:none !important; }
  .hardware-print-root { display:block !important; position:static !important; inset:auto !important; width:100% !important; min-height:auto !important; background:white !important; }
  .hardware-print-root * { visibility:visible !important; }
  .hardware-print-root .hardware-print-title { display:block !important; margin:0 0 4mm; text-align:center; break-after:avoid; page-break-after:avoid; }
  .hardware-print-root .hardware-print-title h1 { margin:0 0 3mm; color:#111; font-size:21px; letter-spacing:4px; font-weight:900; line-height:1.2; }
  .hardware-print-root .hardware-print-title p { display:flex; justify-content:center; flex-wrap:wrap; gap:9mm; margin:0; color:#222; font-size:12px; font-weight:700; line-height:1.25; }
  .hardware-print-root .detail-tabs-copy { display:block; margin:2mm 0 1.5mm; break-after:avoid; page-break-after:avoid; }
  .hardware-print-root .detail-tabs-copy h3 { margin:0; font-size:14px; line-height:1.2; color:#111; }
  .hardware-print-root .detail-room { break-inside:auto; page-break-inside:auto; margin-bottom:3mm; }
  .hardware-print-root .detail-room h4 { color:#111; background:#f2f2f2 !important; border:1px solid #999; font-size:12px; padding:5px 8px !important; margin:0; }
  .hardware-print-root .detail-room table, .hardware-print-root .ledger-table { width:100% !important; table-layout:fixed !important; border-collapse:collapse !important; border:1px solid #777 !important; font-size:11px; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .hardware-print-root .detail-room th, .hardware-print-root .detail-room td, .hardware-print-root .ledger-table th, .hardware-print-root .ledger-table td { padding:3px 4px !important; border:1px solid #777 !important; color:#111 !important; background:white !important; line-height:1.15; word-break:break-word; vertical-align:top; }
  .hardware-print-root .detail-room th, .hardware-print-root .ledger-table th { background:#f2f2f2 !important; font-weight:900; }
  .hardware-print-root tfoot td { background:#f0f6f0 !important; font-weight:800; }
  .hardware-print-root .table-wrap { overflow:visible !important; border:0 !important; box-shadow:none !important; width:100% !important; max-width:100% !important; margin:0 !important; }
  .hardware-print-root .hardware-detail-meta { display:none !important; }
  .hardware-print-root .detail-tabs-copy p { display:none !important; }
  .hardware-print-root .hardware-price-audit, .hardware-print-root .modal-foot, .hardware-print-root .close-modal { display:none !important; }
  .hardware-print-root .hardware-detail-meta, .hardware-print-root .detail-tabs-copy, .hardware-print-root .detail-room, .hardware-print-root .table-wrap { width:100% !important; max-width:100% !important; box-sizing:border-box !important; }
}
.hardware-print-root { display:none; }
