/* GebzeUstam V171 - progressive detail-screen polish, built on V169 -> V170. */
:root{--v171-ink:#152f49;--v171-orange:#ef791f;--v171-border:#dfe8f2}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) :is(.btn,button){touch-action:manipulation}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) :is(.btn,button,input,select):focus-visible{outline:3px solid #ffb36b;outline-offset:2px}
/* Customer offer comparison */
.role-customer .track-app{max-width:1220px;gap:17px}
.role-customer .track-hero{background:linear-gradient(115deg,#fff 35%,#f0f6fe);border-radius:23px;border:1px solid var(--v171-border);padding:25px;box-shadow:var(--gx-shadow)}
.role-customer .track-hero h1,.role-customer .track-panel-title h2{color:var(--v171-ink);letter-spacing:-.025em}
.role-customer .track-panel{background:#fff;border:1px solid var(--v171-border);border-radius:21px;padding:22px;box-shadow:var(--gx-shadow)}
.role-customer .track-status{background:#fff0e1;color:#995019;border:1px solid #f9d4b4}
.role-customer .track-summary span{border-color:#dfebf5;border-radius:12px;color:#47617a}
.role-customer .track-live-bar{border:1px solid #e2ecf5;background:#f8fbff;padding:7px 10px;border-radius:12px}
.v171-customer-trust{display:flex;align-items:flex-start;gap:11px;background:#f2faf6;border:1px solid #d3eade;border-radius:14px;padding:12px 14px;margin:0 0 17px}
.v171-customer-trust>span{display:grid;place-items:center;width:26px;height:26px;flex:0 0 26px;border-radius:50%;background:#dcf3e5;color:#168053;font-weight:900}
.v171-customer-trust p{color:#426c58;font-size:12px;line-height:1.55;margin:1px 0 0}
.role-customer .offer-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.role-customer .offer-card{border-radius:18px;border:1px solid #dfebf3;box-shadow:0 8px 25px rgba(13,36,59,.045);padding:18px}
.role-customer .offer-card.top{border-color:#f5c89f;background:linear-gradient(#fffaf4,#fff 25%)}
.role-customer .offer-avatar{width:48px;height:48px;border-radius:14px}
.role-customer .offer-price{font-size:30px;color:#102f4c}
.role-customer .offer-approved{background:#fff0de;color:#a65313}
.role-customer .offer-facts span{border:1px solid #e6edf5;background:#f6f9fc;padding:7px 9px}
.role-customer .offer-selection{background:var(--v171-orange);min-height:51px;border-radius:12px}
.role-customer .offer-selection:disabled{background:#e5ebf1;color:#76899b}
.role-customer .offer-discount{background:#fafcff;border:1px solid #e6edf5;border-radius:13px;padding:6px 11px 11px}
.role-customer .offer-discount summary{display:flex;align-items:center;min-height:44px}
.role-customer .offer-discount-choices label{min-height:59px}
.role-customer .offer-discount-choices label:has(input:checked){background:#fff8f0;border-color:#f1a059;box-shadow:0 0 0 1px #f1a059}
/* Provider: opportunities and fees */
.role-usta .usta-job-card{border:1px solid var(--v171-border)!important;border-radius:20px!important;padding:17px!important;box-shadow:0 8px 24px rgba(15,45,70,.05)}
.role-usta .usta-job-card[data-usta-stage=new]{border-left:4px solid var(--v171-orange)!important}
.role-usta .usta-job-card[data-usta-stage=discount]{border-left:4px solid #dca235!important;background:#fffdf7}
.role-usta .usta-job-card[data-usta-stage=selected]{border-left:4px solid #159665!important;background:#f6fdf9}
.role-usta .usta-job-card h3{color:#143551;font-size:18px;line-height:1.3}
.role-usta .usta-job-card .detail-grid{background:#f8fafd;border-radius:14px;padding:7px;gap:8px}
.role-usta .usta-job-card .detail-grid>div{border:1px solid #e6edf5;background:#fff;padding:10px;border-radius:11px;min-width:0}
.role-usta .usta-job-card .detail-grid b{font-size:11px;color:#697d8f}
.role-usta .usta-job-card .detail-grid span{color:#143f63;font-size:13px;font-weight:750;overflow-wrap:anywhere}
.role-usta .usta-job-card .btn{min-height:46px}
.role-usta .usta-offer-finance-preview{border-radius:14px}
.v171-usta-guidance{display:flex;align-items:flex-start;gap:10px;background:#f2f8ff;color:#365b7c;border:1px solid #dbe9f7;border-radius:13px;padding:11px 13px;margin:9px 0;font-size:12px;line-height:1.6}
.v171-usta-guidance>span:first-child{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#dceefa;color:#19619c;flex:0 0 25px;font-weight:850}
.v171-usta-guidance>span:last-child{display:block;flex:1 1 auto;min-width:0;width:auto;height:auto;border-radius:0;background:transparent;color:inherit;font-weight:400;overflow-wrap:break-word;white-space:normal;text-align:left}
/* Admin: one-thumb multi-send and customer presentation */
body:is(.role-admin,.role-super_admin) .admin-job-accordion{border-radius:20px;border:1px solid var(--v171-border);box-shadow:var(--gx-shadow);overflow:hidden;background:#fff;margin-bottom:14px}
body:is(.role-admin,.role-super_admin) .admin-job-accordion>summary{padding:17px 18px;background:linear-gradient(120deg,#fff,#f7fafd);min-height:78px}
body:is(.role-admin,.role-super_admin) .admin-job-body{padding:16px;display:grid;gap:14px}
body:is(.role-admin,.role-super_admin) .admin-operation-card{border-radius:18px;border-color:var(--v171-border);padding:18px}
body:is(.role-admin,.role-super_admin) .manual-flow-note span{background:#edf5fb;border:1px solid #dce9f5;color:#345d7d;border-radius:10px;padding:9px 11px}
body:is(.role-admin,.role-super_admin) .manual-flow-note span:last-child{background:#f1faf4;color:#197548}
body:is(.role-admin,.role-super_admin) .ops-card{border-radius:17px;border-color:var(--v171-border);padding:16px}
body:is(.role-admin,.role-super_admin) .manual-usta-bulkbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;border:1px solid #dbe8f4;background:#f4f8fd;padding:12px;border-radius:14px;margin:12px 0}
.v171-select-all{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:800;color:#2e5272;cursor:pointer}
.v171-select-all input,body:is(.role-admin,.role-super_admin) .manual-usta-select{width:21px;height:21px;accent-color:#ef791f}
.v171-count{font-size:12px;font-weight:850;color:#3d5e7b;background:#fff;border:1px solid #dce7f1;padding:8px 10px;border-radius:999px}
body:is(.role-admin,.role-super_admin) .manual-usta-table th{background:#edf4fb;color:#47637f;font-size:11px}
body:is(.role-admin,.role-super_admin) .manual-usta-table td{border-bottom:1px solid #e5edf5;padding:10px 8px}
body:is(.role-admin,.role-super_admin) .manual-usta-name{font-weight:850;color:#183c5d}
body:is(.role-admin,.role-super_admin) .rank-row{border:1px solid #e0e9f2;border-radius:14px;background:#fff;margin-bottom:9px;padding:12px}
body:is(.role-admin,.role-super_admin) .rank-row.top{border-color:#f4cba6;background:#fffaf5}
.v171-present-bar{display:flex;align-items:center;gap:12px;justify-content:space-between;margin-top:12px;background:#f4f9fe;border:1px solid #dae8f5;padding:11px 13px;border-radius:14px}
.v171-present-count{font-size:13px;font-weight:800;color:#375e81}
.v171-present-bar button,body:is(.role-admin,.role-super_admin) .manual-usta-bulkbar button{min-height:45px}
.v171-present-bar button:disabled,body:is(.role-admin,.role-super_admin) .manual-usta-bulkbar button:disabled{opacity:.56;cursor:not-allowed}
/* Conversation and alerts */
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .message-inbox-card{background:#fff;border:1px solid var(--v171-border);border-radius:20px;box-shadow:var(--gx-shadow)}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .message-conversation{padding:14px 16px;min-height:79px}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .message-conversation:hover{background:#f7faff}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .message-unread{background:var(--v171-orange)}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .send-btn{background:var(--v171-orange)}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .notification-list{border:1px solid var(--v171-border);border-radius:20px;box-shadow:var(--gx-shadow);overflow:hidden}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .notification-item{min-height:82px;padding:14px 17px}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .notification-item.unread{background:#fffaf3}
@media(max-width:780px){
 .role-customer .track-app{gap:11px}.role-customer .track-hero,.role-customer .track-panel{padding:15px;border-radius:18px}
 .role-customer .track-hero h1{font-size:23px}.role-customer .offer-grid{grid-template-columns:1fr}.role-customer .offer-card{padding:14px}
 .role-customer .offer-price{font-size:27px}.role-customer .offer-discount-choices label{grid-template-columns:20px minmax(0,1fr)}
 .role-customer .offer-discount-choices em{grid-column:2;white-space:normal}.role-customer .track-select select{max-width:none;flex:1}
 .role-usta .usta-job-card{padding:13px!important}.role-usta .usta-job-card .detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body:is(.role-admin,.role-super_admin) .admin-job-body{padding:10px;gap:11px}
 body:is(.role-admin,.role-super_admin) .admin-job-accordion>summary{padding:13px}
 body:is(.role-admin,.role-super_admin) .ops-grid{grid-template-columns:1fr}
 body:is(.role-admin,.role-super_admin) .admin-operation-card{padding:12px}
 body:is(.role-admin,.role-super_admin) .manual-usta-bulkbar{gap:8px;padding:10px}
 body:is(.role-admin,.role-super_admin) .manual-usta-bulkbar button{width:100%;order:2}
 body:is(.role-admin,.role-super_admin) .manual-usta-bulkbar .manual-usta-result{width:100%;order:3}
 body:is(.role-admin,.role-super_admin) .manual-usta-table-wrap{overflow-x:visible}
 body:is(.role-admin,.role-super_admin) .manual-usta-table tbody tr{border-color:#dce8f3;box-shadow:0 4px 16px rgba(15,45,70,.04)}
 body:is(.role-admin,.role-super_admin) .manual-usta-table td:first-child>div{justify-content:space-between}
 body:is(.role-admin,.role-super_admin) .manual-usta-send{min-height:44px}
 .v171-present-bar{position:sticky;bottom:calc(78px + env(safe-area-inset-bottom));z-index:15;box-shadow:0 9px 26px rgba(14,42,70,.15)}
 body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .message-conversation{padding:13px 10px}
 body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .message-compose{bottom:calc(65px + env(safe-area-inset-bottom));z-index:30}
}
@media(max-width:380px){.role-customer .offer-facts span{font-size:10px}.v171-present-bar{flex-wrap:wrap}.v171-present-bar button{width:100%}}
@media(prefers-reduced-motion:reduce){body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .message-conversation{transition:none}}
