.warranty-page{display:none;min-width:0;min-height:550px;padding:26px;border:1px solid #dfe8f1;border-radius:16px;background:#fff;box-shadow:0 8px 26px rgba(30,66,108,.05);color:#172a42}
.warranty-page.show{display:block}
.warranty-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:22px}
.warranty-heading h1{margin:0 0 3px;font-size:27px;line-height:1.25;color:#18314e}
.warranty-heading p{margin:0;color:#718399;font-size:13px;line-height:1.5}
.warranty-heading>span{flex:none;padding:7px 12px;border:1px solid #e0e9f4;border-radius:999px;background:#f7faff;color:#58708a;font-size:12px;font-weight:700}
.warranty-toolbar{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:12px;margin-bottom:18px;border:1px solid #e4ebf4;border-radius:14px;background:linear-gradient(90deg,#f8faff,#fff);box-shadow:0 5px 16px rgba(27,54,93,.04)}
.warranty-button,.warranty-filter{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:39px;padding:8px 13px;border:1px solid #d9e4ee;border-radius:10px;background:#f5f8fc;color:#37506d;font-family:inherit;font-size:13px;font-weight:700;line-height:1.2;white-space:nowrap;cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s,transform .15s}
.warranty-button:hover,.warranty-filter:hover{border-color:#b8ccdf;background:#edf4fb;transform:translateY(-1px)}
.warranty-button:focus-visible,.warranty-filter:focus-visible,.warranty-actions button:focus-visible,.warranty-close:focus-visible{outline:3px solid #79b6e0;outline-offset:2px}
.warranty-add{border-color:#079a77;background:#089d7b;color:#fff;box-shadow:0 5px 13px rgba(8,157,123,.16)}
.warranty-add:hover{border-color:#087d66;background:#078568;color:#fff}
.warranty-add>span{font-size:20px;line-height:.7;font-weight:500}
.warranty-separator{height:28px;width:1px;background:#dce6f0}
.warranty-sort{min-width:65px}
.warranty-sort span{color:#5669c8;font-size:17px;line-height:0}
.warranty-sort.selected{border-color:#bacbee;background:#ebf0ff;color:#254f95}
.warranty-total{display:flex;align-items:center;gap:9px;min-height:40px;padding:5px 12px;border:1px solid #d6e3f6;border-radius:11px;background:#f1f6ff;color:#526680;font-size:12px;font-weight:750;white-space:nowrap}
.warranty-total strong{font-size:23px;line-height:1;color:#203454;font-variant-numeric:tabular-nums}
.warranty-calculator{font-size:18px;color:#586ac9}
.warranty-filters{display:flex;gap:5px;align-items:center;flex-wrap:wrap}
.warranty-filter{min-height:37px;padding:7px 9px;background:#fff;color:#64758a}
.warranty-filter.active{border-color:#863cda;background:#8e3fda;color:#fff;box-shadow:0 5px 13px rgba(142,63,218,.22)}
.warranty-filter.active:hover{background:#7634bd}
.warranty-pdf{margin-inline-start:auto;border-color:#eabcc0;background:#fff5f5;color:#af3540}
.warranty-pdf:hover{border-color:#dba1a7;background:#ffecec}
.warranty-pdf>span{font-size:17px;line-height:0}
.warranty-swipe{display:none}
.warranty-table-wrap{overflow:auto;max-height:640px;border:1px solid #e0e8f1;border-radius:12px;background:#fff}
.warranty-table{width:100%;min-width:950px;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:12px;line-height:1.45}
.warranty-table th{position:sticky;top:0;z-index:1;padding:13px 11px;border-bottom:1px solid #d9e4ef;background:#f1f6fb;color:#52677f;font-size:11px;font-weight:800;text-align:start;text-transform:none}
.warranty-table th:nth-child(1){width:13%}.warranty-table th:nth-child(2){width:25%}.warranty-table th:nth-child(3){width:8%}.warranty-table th:nth-child(4){width:9%}.warranty-table th:nth-child(5){width:11%}.warranty-table th:nth-child(6){width:10%}.warranty-table th:nth-child(7){width:15%}.warranty-table th:nth-child(8){width:9%}
.warranty-table td{padding:13px 11px;border-bottom:1px solid #e9eef5;color:#344963;vertical-align:middle;overflow-wrap:anywhere}
.warranty-table tbody tr:nth-child(even){background:#fbfdff}
.warranty-table tbody tr:hover{background:#f3f8fd}
.warranty-table tbody tr:last-child td{border-bottom:0}
.warranty-name{font-weight:650;color:#1c344f!important}
.warranty-code,.warranty-qty{font-variant-numeric:tabular-nums}
.warranty-status{display:inline-flex;padding:4px 8px;border-radius:999px;background:#f1f5f9;color:#52657b;font-weight:700;white-space:nowrap}
.warranty-status.damaged{background:#f2e8ff;color:#7132b0}
.warranty-actions{white-space:nowrap}
.warranty-actions button{display:inline-grid;place-items:center;width:24px;height:26px;margin-inline:1px;border-radius:6px;background:transparent;color:#315e95;cursor:pointer}
.warranty-actions button:hover{background:#eaf2fc}
.warranty-actions svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.warranty-actions button.destructive{color:#b3424d}
.warranty-empty{padding:46px 16px!important;text-align:center;color:#72849a!important;font-size:14px}
.warranty-local-note{margin:12px 0 0;color:#7e8fa3;font-size:11px;line-height:1.5}
.warranty-dialog{width:min(650px,calc(100vw - 32px));max-height:min(90vh,900px);padding:0;border:1px solid #dce7f1;border-radius:16px;background:#fff;box-shadow:0 28px 75px rgba(13,38,68,.27);color:#172a42}
.warranty-dialog::backdrop{background:rgba(13,29,50,.47);backdrop-filter:blur(3px)}
.warranty-form{padding:24px}
.warranty-dialog-head{display:flex;align-items:start;justify-content:space-between;gap:14px;margin-bottom:20px}
.warranty-dialog-head h2{margin:0;font-size:21px}
.warranty-close{width:31px;height:31px;border-radius:8px;background:#f0f4f8;color:#5a6e83;font-size:21px;cursor:pointer}
.warranty-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.warranty-form-grid label{display:grid;gap:6px;color:#496079;font-size:13px;font-weight:750}
.warranty-form-grid label.wide{grid-column:1/-1}
.warranty-form-grid input,.warranty-form-grid select{width:100%;min-height:41px;padding:9px 11px;border:1px solid #d7e3ef;border-radius:9px;background:#fff;color:#203953;font-size:13px;outline:none}
.warranty-form-grid input:focus,.warranty-form-grid select:focus{border-color:#6c7bd2;box-shadow:0 0 0 3px rgba(108,123,210,.13)}
.warranty-form-grid input[readonly],.warranty-form-grid select:disabled{background:#f6f9fc;color:#60728a}
.warranty-dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}
html[dir="rtl"] .warranty-page{text-align:right}
html[dir="rtl"] .warranty-table th,html[dir="rtl"] .warranty-table td{text-align:right}
html[dir="rtl"] .warranty-table .warranty-code{direction:ltr;text-align:left}
html[dir="rtl"] .warranty-form-grid input{text-align:right}
html[dir="rtl"] .warranty-form-grid input[name="code"]{direction:ltr;text-align:left}
.warranty-table th:nth-child(5),.warranty-table td:nth-child(5),html[dir="rtl"] .warranty-table th:nth-child(5),html[dir="rtl"] .warranty-table td:nth-child(5){text-align:center}
.warranty-form-grid input[name="warehouse"],html[dir="rtl"] .warranty-form-grid input[name="warehouse"]{text-align:center}
@media(max-width:900px){.warranty-pdf{margin-inline-start:0}.warranty-toolbar{padding:12px}}
@media(max-width:600px){.warranty-page{padding:16px}.warranty-heading h1{font-size:23px}.warranty-heading p{font-size:12px}.warranty-heading>span{font-size:11px}.warranty-toolbar{gap:7px}.warranty-button,.warranty-filter{min-height:38px;padding:8px 10px;font-size:12px}.warranty-separator{display:none}.warranty-total{order:3;width:100%;justify-content:space-between}.warranty-filters{order:4;width:100%;flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}.warranty-filter{flex:none}.warranty-pdf{order:5;width:100%}.warranty-swipe{display:block;margin:-6px 0 9px;color:#7b8ca0;font-size:11px}.warranty-form{padding:18px}.warranty-form-grid{grid-template-columns:1fr}.warranty-form-grid label.wide{grid-column:auto}}
@media print{body:has(.warranty-page.show) .sidebar,body:has(.warranty-page.show) .topbar,body:has(.warranty-page.show) .warranty-toolbar,body:has(.warranty-page.show) .warranty-dialog,body:has(.warranty-page.show) .warranty-local-note,body:has(.warranty-page.show) .warranty-swipe,body:has(.warranty-page.show) .warranty-actions,body:has(.warranty-page.show) .warranty-table th:last-child{display:none!important}body:has(.warranty-page.show) .warranty-page{display:block!important;min-height:0;padding:0;border:0;box-shadow:none}body:has(.warranty-page.show) .main{padding:0!important;border:0!important}body:has(.warranty-page.show) .warranty-table-wrap{max-height:none;overflow:visible;border:0}body:has(.warranty-page.show) .warranty-table{min-width:0;font-size:9px}body:has(.warranty-page.show) .warranty-table th,body:has(.warranty-page.show) .warranty-table td{padding:5px 4px}body:has(.warranty-page.show) .warranty-table td:last-child{display:none}body:has(.warranty-page.show) .warranty-table thead{display:table-header-group}body:has(.warranty-page.show) .warranty-table tr{break-inside:avoid}}
