.contracts-reference-list{display:grid;gap:10px;min-width:0;padding:12px}.contracts-reference-status{display:flex;flex-wrap:wrap;gap:6px}.contracts-reference-status button{white-space:nowrap}.contracts-reference-status button.active{background:var(--accent);border-color:var(--accent);color:var(--selection-text,var(--ink))}.contracts-reference-filters{display:grid;grid-template-columns:minmax(240px,1fr) minmax(150px,220px) minmax(150px,220px) auto;gap:8px;align-items:center}.contracts-reference-filters .control{min-width:0;width:100%}.contracts-reference-table-wrap{width:100%;max-height:min(48vh,460px);overflow:auto}.contracts-reference-table{width:100%;min-width:1040px;table-layout:fixed}.contracts-reference-table th,.contracts-reference-table td{padding:9px 8px;vertical-align:middle}.contracts-reference-table th{white-space:normal}.contracts-reference-table td{overflow-wrap:anywhere}.contracts-reference-table th:nth-child(1){width:5%}.contracts-reference-table th:nth-child(2){width:16%}.contracts-reference-table th:nth-child(3){width:17%}.contracts-reference-table th:nth-child(4){width:11%}.contracts-reference-table th:nth-child(5),.contracts-reference-table th:nth-child(6){width:10%}.contracts-reference-table th:nth-child(7){width:9%}.contracts-reference-table th:nth-child(8){width:10%}.contracts-reference-table th:nth-child(9){width:12%}.contracts-reference-table th:nth-child(10){width:15%}.contracts-reference-table .mini{white-space:nowrap}.contracts-reference-pager{display:flex;align-items:center;justify-content:space-between;gap:10px}.contracts-reference-pager>div{display:flex;align-items:center;gap:8px}.contracts-reference-pager button:disabled{opacity:.45;cursor:default}@media(max-width:900px){.contracts-reference-filters{grid-template-columns:minmax(0,1fr) minmax(130px,1fr)}.contracts-reference-filters #genericCount{grid-column:1/-1}.contracts-reference-table-wrap{max-height:55vh}}@media(max-width:760px){.contracts-reference-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.contracts-reference-list{padding:9px}.contracts-reference-status{overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px}.contracts-reference-filters{grid-template-columns:minmax(0,1fr)}.contracts-reference-filters #genericCount{grid-column:auto}.contracts-reference-table-wrap{overflow:visible;max-height:none}.contracts-reference-table{min-width:0;table-layout:fixed}.contracts-reference-table thead{display:none}.contracts-reference-table tbody{display:grid;gap:8px}.contracts-reference-table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}.contracts-reference-table td{display:grid;grid-template-columns:minmax(74px,.6fr) minmax(0,1fr);gap:7px;padding:0;border:0;min-width:0;overflow-wrap:anywhere}.contracts-reference-table td::before{content:attr(data-label);color:var(--muted);font-size:10px;font-weight:700}.contracts-reference-table td:last-child{grid-column:1/-1;display:flex;justify-content:flex-end;gap:6px}.contracts-reference-table td:last-child::before{margin-right:auto}.contracts-reference-pager{font-size:12px}}@media(max-width:460px){.contracts-reference-metrics{grid-template-columns:1fr}.contracts-reference-table tr{grid-template-columns:minmax(0,1fr)}.contracts-reference-table td{grid-template-columns:86px minmax(0,1fr)}}
.contract-status-badge{display:inline-flex;max-width:100%;padding:4px 8px;border:1px solid currentColor;border-radius:999px;font-size:11px;font-weight:700;overflow-wrap:anywhere}.contract-status-badge.is-active,.contract-remaining.is-safe{color:var(--success,#10b981)}.contract-status-badge.is-renewal,.contract-remaining.is-urgent{color:var(--warning,#f59e0b)}.contract-status-badge.is-expired{color:var(--danger,#f43f5e)}.contract-status-badge.is-draft{color:var(--muted,#94a3b8)}
.contract-create-form{display:grid;grid-template-columns:minmax(0,1fr);row-gap:12px}.contract-create-form .field{min-width:0;gap:12px}.contract-create-form .field label{font-size:13px}.contract-create-form .field input,.contract-create-form .field select,.contract-create-form .field textarea{width:100%;min-width:0}.contract-create-form #contractCreateCustomer,.contract-create-form #contractCreateType{height:42px}.contract-create-form .field textarea{height:60px;min-height:60px}.contract-create-pair{display:grid;gap:12px}.contract-create-type-price{grid-template-columns:minmax(0,35fr) minmax(0,65fr)}.contract-create-dates{grid-template-columns:repeat(2,minmax(0,1fr))}.contract-create-pair .field{min-width:0}.contract-create-description{margin-top:1px}.contract-create-files{gap:0!important}.contract-create-form .contract-file-select{width:100%;min-height:41px;border-style:dashed;justify-content:flex-start;padding:10px 14px;text-align:left}.contract-create-form [data-contract-file-name]{display:block;margin-top:12px;overflow-wrap:anywhere}
#appDialog.contract-create-dialog{width:min(650px,calc(100vw - 32px));height:min(752px,calc(100vh - 32px));max-width:none;max-height:calc(100vh - 32px)}#appDialog.contract-create-dialog>form{display:flex;width:100%;height:100%;min-height:0;flex-direction:column}#appDialog.contract-create-dialog>form>header{height:60px;min-height:60px;flex:0 0 60px;gap:16px;padding:0 14px 0 24px}#appDialog.contract-create-dialog>form>header>div{display:flex;align-items:center;gap:16px}#appDialog.contract-create-dialog #dialogEyebrow{display:none}#appDialog.contract-create-dialog #dialogTitle{display:flex;align-items:center;gap:16px;margin:0;font-size:18px;line-height:1.2}#appDialog.contract-create-dialog #dialogTitle::before{display:block;width:36px;height:36px;flex:0 0 36px;border-radius:50%;background:url("/assets/ayec-logo.png") center/cover no-repeat;content:""}#appDialog.contract-create-dialog #dialogClose{width:36px;height:36px;border-radius:50%}#appDialog.contract-create-dialog #dialogBody{flex:1 1 auto;min-height:0;overflow:auto;padding:31px 35px 16px 31px}#appDialog.contract-create-dialog #dialogFooter{display:grid;height:80px;min-height:80px;flex:0 0 80px;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:15px;padding:16px 29px}#appDialog.contract-create-dialog #dialogFooter button{width:100%;min-height:45px}

#appDialog.contract-detail-dialog{width:min(650px,calc(100vw - 32px));height:min(738px,calc(100vh - 32px));max-width:none;max-height:calc(100vh - 32px)}#appDialog.contract-detail-dialog>form{display:flex;width:100%;height:100%;min-height:0;flex-direction:column}#appDialog.contract-detail-dialog #dialogBody{flex:1 1 auto;min-height:0;overflow:auto}
.contracts-reference-table tbody tr.is-selected{outline:2px solid var(--brand);outline-offset:-2px;background:var(--surface-2)}
.contracts-reference-footer{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:8px}.contracts-reference-footer article{display:grid;grid-template-rows:auto 1fr auto;gap:7px;min-width:0;min-height:128px;padding:10px 12px;border:1px solid var(--line);border-top:2px solid var(--brand);border-radius:7px;background:var(--surface-2)}.contracts-reference-footer article:nth-child(2){border-top-color:var(--success)}.contracts-reference-footer strong{font-size:11px;font-weight:800}.contracts-reference-footer p{margin:0;color:var(--muted);font-size:10px;line-height:1.4;white-space:pre-line;overflow:hidden}.contracts-reference-footer button{min-height:28px;justify-self:start;font-size:11px}.contracts-reference-footer button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:760px){.contracts-reference-footer{grid-template-columns:minmax(0,1fr)}.contracts-reference-footer article{min-height:116px}}

body:has(.contracts-reference-list) .page-head .actions{display:grid;grid-template-columns:repeat(2,max-content);gap:6px}
@media(max-width:620px){body:has(.contracts-reference-list) .page-head .actions{grid-template-columns:repeat(2,minmax(0,1fr));width:100%}}
