@media screen {
 .page-costs .cost-wrap{padding:22px;max-width:1500px;margin:auto}.cost-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px}.cost-heading h1{font-size:25px;letter-spacing:-.04em;font-weight:600;margin:0 0 6px}.cost-heading p{margin:0;color:var(--muted-foreground);font-size:13px;max-width:750px;line-height:1.6}
 .cost-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:16px}.cost-toolbar select{min-width:240px;max-width:100%;flex:1}.cost-mode{font-size:11px;color:var(--muted-foreground);line-height:1.6}.cost-message{padding:12px 14px;border:1px solid var(--ft-blue-border);background:var(--ft-blue-bg);color:var(--ft-blue);border-radius:8px;margin:0 0 16px;font-size:13px;line-height:1.6}.cost-message[data-error=true]{border-color:var(--ft-red-border);background:var(--ft-red-bg);color:var(--ft-red)}
 .cost-tabs{margin:0 0 18px}.cost-tabs button{font-size:13px;min-height:38px}.cost-panel[hidden],.page-costs [hidden]{display:none!important}.cost-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,.65fr);gap:16px;align-items:start}.cost-card{border:1px solid var(--border);border-radius:12px;padding:18px;background:var(--card);color:var(--foreground);min-width:0;margin-bottom:16px}.cost-card h2{font-size:16px;font-weight:600;letter-spacing:-.025em;margin:0 0 8px}.cost-card h3{font-size:14px;font-weight:600;margin:0 0 12px}.cost-help{font-size:12px;color:var(--muted-foreground);line-height:1.6;margin:5px 0 12px}.cost-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.cost-fields .wide{grid-column:1/-1}
 .page-costs label{font-size:12px;font-weight:550;display:block;margin-bottom:5px}.page-costs :is(input,select,textarea){background:var(--background);border:1px solid var(--input);color:var(--foreground);border-radius:7px;padding:10px;font:400 14px/1.4 Geist,Arial,sans-serif;max-width:100%;width:100%;min-height:42px}.page-costs textarea{resize:vertical;min-height:68px}.page-costs input[type=checkbox]{width:16px;min-height:16px;height:16px;padding:0;flex-shrink:0;accent-color:var(--primary)}.cost-check{display:flex!important;align-items:flex-start;gap:9px;line-height:1.55;padding:7px 0;font-size:13px!important;font-weight:400!important}.cost-check input{margin-top:3px}
 .cost-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.cost-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}.cost-kpi{padding:16px;border:1px solid var(--border);border-radius:10px;background:var(--card);min-width:0}.cost-kpi span{display:block;font-size:12px;color:var(--muted-foreground);margin-bottom:8px}.cost-kpi strong{font-size:23px;font-weight:600;letter-spacing:-.035em;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.cost-kpi small{display:block;font-size:11px;line-height:1.6;color:var(--muted-foreground);margin-top:6px}.cost-kpi[data-tone] strong{color:var(--ft-tone)}
 .cost-scroll{overflow:auto;max-width:100%}.cost-table{width:100%;border-collapse:collapse;font-size:12px}.cost-table th{text-align:left;color:var(--muted-foreground);font-size:11px;font-weight:500;padding:10px 8px;border-bottom:1px solid var(--border);white-space:nowrap}.cost-table td{padding:12px 8px;border-bottom:1px solid var(--border);vertical-align:top}.cost-table tr:last-child td{border-bottom:0}.cost-table td small{display:block;color:var(--muted-foreground);line-height:1.6;margin-top:3px}.cost-table .num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.cost-table button{min-height:32px;padding:5px 9px;font-size:11px}.cost-empty{padding:30px 12px;text-align:center;color:var(--muted-foreground);font-size:13px;line-height:1.7}
 .cost-facts>div{display:flex;justify-content:space-between;gap:16px;font-size:13px;line-height:1.7;border-bottom:1px solid var(--border);padding:9px 0}.cost-facts>div:last-child{border:0}.cost-facts span{color:var(--muted-foreground)}.cost-facts strong{font-weight:600;text-align:right;font-variant-numeric:tabular-nums}.cost-pending{padding-left:18px;color:var(--ft-amber);font-size:12px;line-height:1.8}.cost-account{max-width:620px;margin:25px auto}.cost-audit{font-size:12px;color:var(--muted-foreground);line-height:1.6}.cost-audit li{padding:8px 0;border-bottom:1px solid var(--border)}.cost-inline{display:flex;gap:8px;flex-wrap:wrap}.cost-inline>*{flex:1;min-width:140px}.cost-code{display:block;overflow-wrap:anywhere;padding:10px;border:1px solid var(--border);border-radius:7px;font:12px/1.6 ui-monospace,monospace;background:var(--muted);color:var(--foreground)}
 .cost-xml-review input{min-width:100px}.cost-xml-review td:first-child{min-width:180px}.cost-xml-review select{min-width:90px}.cost-print-only{display:none}.cost-rule{font-size:12px;border-left:2px solid var(--ft-blue);padding-left:10px;color:var(--muted-foreground);line-height:1.7;margin:10px 0}
 .cost-grid>*,.cost-fields>*,.page-costs form{min-width:0}.page-costs :is(input,select,textarea){box-sizing:border-box;min-width:0}.cost-void:hover{color:var(--ft-red);border-color:var(--ft-red-border)}.cost-record-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}.cost-help{overflow-wrap:anywhere}
 @media(max-width:1100px){.cost-grid{grid-template-columns:minmax(0,1fr)}.cost-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
 @media(max-width:768px){.page-costs .cost-wrap{padding:16px 12px}.cost-heading{flex-direction:column;gap:10px}.cost-heading h1{font-size:23px}.cost-fields{grid-template-columns:1fr}.cost-fields .wide{grid-column:auto}.cost-tabs button{flex:auto}.cost-kpi{padding:13px}.cost-kpi strong{font-size:20px}.cost-card{padding:15px}.cost-toolbar select{min-width:0;width:100%}.cost-grid{gap:0}}
 .cost-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px 16px;margin-bottom:14px}
 .cost-project-select{min-width:0;max-width:520px}
 .cost-toolbar .cost-project-select select{min-width:0;min-height:44px;font-size:15px}
 .cost-toolbar-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
 .cost-toolbar-actions button{min-height:44px}
 #costRevision{grid-column:1/-1;margin:0;font-size:12px}
 .cost-options{position:relative}
 .cost-options summary{
  display:flex;align-items:center;gap:9px;min-height:44px;box-sizing:border-box;
  padding:8px 12px;border:1px solid var(--border);border-radius:8px;
  background:var(--card);color:var(--foreground);font-size:13px;font-weight:600;cursor:pointer;list-style:none
 }
 .cost-options summary::-webkit-details-marker{display:none}
 .cost-options summary::after{content:"";width:6px;height:6px;border:solid currentColor;border-width:0 1px 1px 0;transform:rotate(45deg);margin-top:-3px}
 .cost-options[open] summary::after{transform:rotate(225deg);margin-top:3px}
 .cost-options>div{
  position:absolute;inset:calc(100% + 6px) 0 auto auto;z-index:10;display:grid;gap:4px;width:max-content;
  min-width:175px;padding:5px;border:1px solid var(--border);border-radius:8px;background:var(--card)
 }
 .cost-options button{justify-content:flex-start;border-color:transparent}
 .cost-tabs{margin-bottom:16px}
 .cost-tabs button{min-height:44px;font-size:13px;text-align:left}
 .cost-tabs button .bi{width:15px;height:15px;flex:0 0 15px}
 .cost-kpi small{font-size:12px}
 .cost-summary-grid:not(:has(#costProjectEditor:not([hidden]))){grid-template-columns:minmax(0,1fr)}
 .cost-breakdown-table td{font-size:13px;overflow-wrap:anywhere}
 .cost-breakdown-table td small.cost-mobile-base{display:none}
 #costReasonDialog{width:min(440px,calc(100vw - 24px));box-sizing:border-box}
 #costReasonDialog .cost-actions{justify-content:flex-end}
 @media(max-width:640px){
  .cost-toolbar{grid-template-columns:minmax(0,1fr)}
  .cost-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .cost-tabs button{padding-inline:7px}
  .cost-breakdown-table :is(th,td){padding-inline:5px}
  .cost-breakdown-table .cost-base{display:none}
  .cost-breakdown-table td small.cost-mobile-base{display:block}
  .cost-kpis{gap:8px}
  .cost-kpi{padding:10px}
 }
}
@media print {body.page-costs{padding:0;background:#fff;color:#111}.page-costs .ui-rail,.page-costs .ui-topbar,.cost-no-print,.cost-mobile-base,.page-costs .cost-tabs,.page-costs .cost-panel:not([data-panel=summary]){display:none!important}.page-costs .cost-wrap{padding:0}.page-costs .cost-panel[data-panel=summary]{display:block!important}.cost-card{border:1px solid #ccc;padding:12px;margin-bottom:12px;break-inside:avoid}.cost-grid{display:block}.cost-kpis{display:grid;grid-template-columns:1fr 1fr;gap:10px}.cost-kpi{padding:10px;border:1px solid #ccc}.cost-table{width:100%;border-collapse:collapse;font-size:10px}.cost-table :is(th,td){padding:6px;border-bottom:1px solid #ddd}.cost-print-only{display:block}.cost-rule,.cost-help{font-size:10px;color:#333}@page{size:A4 portrait;margin:15mm}}
@media screen{.cost-history-dialog{max-width:90vw;width:740px;max-height:85vh;overflow:auto;background:var(--card);color:var(--foreground);border:1px solid var(--border);border-radius:12px;padding:22px;box-shadow:0 20px 60px #0005}.cost-history-dialog::backdrop{background:#0007}.cost-history-dialog h2{font-size:18px;font-weight:600;margin:0 0 10px}}
@media print{.cost-history-dialog{display:none!important}}
@media print{.page-costs .no-print{display:none!important}}
