*{box-sizing:border-box}body{margin:0;background:#f5f7fa;color:#17324d;font:15px/1.5 Arial,sans-serif}main{max-width:1440px;margin:40px auto;padding:0 24px}header{display:flex;justify-content:space-between;align-items:center;gap:20px}h1{font-size:28px;margin-bottom:0}h2{font-size:20px;margin:0 0 10px}a{color:inherit}section,.login{background:white;border:1px solid #dbe3eb;border-radius:14px;padding:28px;margin:24px 0}.login{max-width:450px}.muted{font-size:13px;color:#667585}.notice{padding:16px;background:#fff9df;border:1px solid #d8bf62;border-radius:9px}dl{display:grid;grid-template-columns:220px 1fr;gap:10px 24px;padding-bottom:20px;border-bottom:1px solid #dbe3eb}dt{font-weight:bold;font-size:13px}dd{margin:0;overflow-wrap:anywhere}label{display:block;font-size:13px;font-weight:bold}textarea,input[type=password]{display:block;width:100%;font:16px/1.4 Arial,sans-serif;border:1px solid #cbd6e0;border-radius:9px;padding:12px 14px;margin:8px 0 16px;color:inherit;background:#fcfdfe}textarea{resize:vertical}button{border:0;border-radius:9px;background:#ffd442;padding:13px 24px;color:#17324d;font:700 14px Arial,sans-serif;cursor:pointer}:focus-visible{outline:3px solid #b59a32;outline-offset:3px}@media(max-width:600px){main{padding:0 14px;margin:24px auto}section{padding:20px}dl{grid-template-columns:1fr;gap:4px}dd{margin-bottom:12px}h1{font-size:23px}}

.table-wrap{overflow-x:auto;border:1px solid #dbe3eb;border-radius:10px;background:white;margin:18px 0}
.orders-table{width:100%;border-collapse:collapse;text-align:left;font-size:13px;line-height:1.4;min-width:1000px}
.orders-table th,.orders-table td{padding:12px 14px;border-bottom:1px solid #e4eaf0;vertical-align:top}
.orders-table thead th{background:#edf2f6;font-size:12px;font-weight:700;white-space:nowrap}
.orders-table tbody th{font-weight:600;min-width:145px}
.orders-table tbody tr:last-child>*{border-bottom:0}
.orders-table tbody tr:hover{background:#f8fafc}

.orders-table td a{overflow-wrap:anywhere}
.product-tag{display:block;font-size:12px;white-space:nowrap;margin:0 0 4px}
.notes-cell{width:23%;min-width:180px;max-width:300px}
.note-preview{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;white-space:pre-line;margin-bottom:4px}
.note-label{font-weight:600;color:#667585;font-size:11px}
.orders-table .open-order{display:inline-block;padding:6px 10px;border:1px solid #b8d7c5;border-radius:6px;background:#edf8f0;color:#196a3a;white-space:nowrap;text-decoration:none;font-weight:600}
.close-order{float:right;font-size:13px;margin-left:16px}
#order-details{scroll-margin-top:20px;padding:24px}
#order-details dl{grid-template-columns:210px 1fr;font-size:14px;gap:8px 20px}
#order-details textarea{font-size:14px;padding:10px 12px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:600px){#order-details dl{grid-template-columns:1fr}#order-details{padding:18px}.close-order{float:none;display:block;margin:0 0 14px}}

.delete-request{margin-top:8px;font-size:12px;color:#9f2525}
.delete-request summary{display:flex;align-items:center;justify-content:center;cursor:pointer;width:32px;height:32px;border:1px solid #e5caca;border-radius:6px;list-style:none;background:#fff7f7}.delete-request summary::-webkit-details-marker{display:none}.delete-request summary:hover{background:#fbe5e5}
.delete-request[open]{min-width:210px;max-width:260px}
.delete-request p{color:#17324d;margin:8px 0;white-space:normal}
.delete-confirm{display:flex;align-items:flex-start;gap:6px;font-size:12px;font-weight:400;margin:10px 0}
.delete-confirm input{margin:2px 0 0;accent-color:#9f2525}
.delete-button{background:#a52b2b;color:white;padding:9px 12px;font-size:12px}
.delete-button:hover{background:#852020}

.view-tabs{display:flex;gap:8px;margin-top:24px}.view-tabs a{padding:8px 14px;text-decoration:none;border:1px solid #dbe3eb;border-radius:7px;background:white;font-size:13px}.view-tabs a[aria-current]{background:#17324d;color:white;border-color:#17324d}
.status-form{display:grid;gap:6px;min-width:105px}.status-form select{padding:7px 8px;border:1px solid #cbd6e0;border-radius:6px;background:white;color:#17324d;font:inherit}.status-form button{padding:6px 8px;font-size:11px;background:#edf2f6}.archive-form{margin-top:6px}.archive-form button{padding:6px 10px;font-size:12px;background:#edf2f6;white-space:nowrap}

/* Keep the overview compact and controls aligned. */
header{align-items:flex-start;margin-bottom:22px}header h1{margin:12px 0 6px}header p{margin:0;color:#667585;font-size:14px}header>form{margin-top:30px}header>form button{padding:9px 18px;background:#e8edf2}
.view-tabs{gap:10px;margin:0 0 16px;align-items:center;flex-wrap:wrap}.view-tabs a{display:inline-flex;align-items:center;min-height:36px}
.orders-table{table-layout:auto;min-width:1180px}.orders-table th,.orders-table td{padding:12px;vertical-align:top}.orders-table tbody th{min-width:125px}.orders-table td:nth-child(2){min-width:100px}.orders-table td:nth-child(3){min-width:180px}.orders-table td:nth-child(4){white-space:nowrap}.orders-table td:nth-child(5){min-width:165px}
.status-form select{width:112px;font-size:13px;min-height:32px}.status-form button{min-height:28px;border-radius:5px;font-weight:600}
.row-actions{min-width:110px}.row-actions .open-order{font-size:12px;padding:6px 10px}.archive-form button{width:100%;text-align:left;padding:6px 10px;font-weight:600;border:1px solid #dbe3eb;border-radius:6px}.delete-request{margin-top:6px}.delete-request summary{width:30px;height:30px}
.notes-cell{min-width:165px}.table-wrap{margin-top:16px}.orders-table a:hover{text-decoration:underline}

.action-grid{display:grid;grid-template-columns:1fr 30px;gap:7px;align-items:start;min-width:135px}
.action-grid>.open-order{grid-column:1/-1;justify-self:start}
.action-grid>.archive-form{margin:0}.action-grid>.archive-form button{min-height:30px}
.action-grid>.delete-request{margin:0}.action-grid>.delete-request[open]{grid-column:1/-1;grid-row:3;min-width:220px}
.delete-buttons{display:flex;flex-wrap:wrap;gap:8px}.cancel-delete{background:#edf2f6;color:#17324d;padding:9px 12px;font-size:12px}
.status-form select{width:120px}

.product-legend{display:flex;flex-wrap:wrap;gap:10px 20px;margin:16px 0 8px;font-size:12px;color:#526579}
.product-legend>span{display:inline-flex;align-items:center;gap:7px}
.legend-swatch{display:inline-block;width:15px;height:15px;border:1px solid #cbd6e0;border-radius:4px;flex-shrink:0}
.orders-table tbody tr.battery-only,.legend-swatch.battery-only{background:#fff}
.orders-table tbody tr.plan-only,.legend-swatch.plan-only{background:#eef6ff}
.orders-table tbody tr.plan-battery,.legend-swatch.plan-battery{background:#eef8f0}
.orders-table tbody tr.battery-only:hover{background:#f8fafc}
.orders-table tbody tr.plan-only:hover{background:#e5f0fd}
.orders-table tbody tr.plan-battery:hover{background:#e4f2e7}
