/* Route contracts (ttc-board.js), from the approved Job board and Route contract phone mockups. Desktop uses the same pieces in the app layout. */
.ta-joblist>.tb-wrap,.ta-joblist>.tb-needs,.ta-joblist>.ta-done-toggle{grid-column:1/-1}
.tb-wrap{display:flex;flex-direction:column;gap:20px}
.tb-group{display:flex;flex-direction:column;gap:10px}
.tb-group-head{display:flex;align-items:baseline;gap:10px}
.tb-reason{margin:8px 0 0;font-size:13px;color:#C9D8DC;font-style:italic}
.tb-lede{margin:4px 0 0}
.tb-actions{display:flex;flex-wrap:wrap;gap:8px}
.tb-actions .ta-btn{margin:0}
.tb-admin .ta-jobs-head{align-items:flex-start}
.ta-done-toggle{justify-self:start;margin:4px 0 0!important}
.tb-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px;align-items:start}
.tb-card{padding:14px;display:flex;flex-direction:column;color:#E8F1F3}
.tb-card.lead{border-color:#1F4A52}
.tb-card.closed{opacity:.5}
.tb-top{display:flex;align-items:center;gap:8px;min-width:0}
.tb-pill{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;border-radius:6px;padding:3px 7px;white-space:nowrap;background:#23363D;color:#B9CCD1}
.tb-pill.open{background:rgba(63,210,232,.14);color:#3FD2E8}
.tb-pill.held{background:rgba(242,178,107,.16);color:#F2B26B}
.tb-pill.signed{background:rgba(86,204,140,.14);color:#6FDCA0}
.tb-pill.declined{background:rgba(242,139,130,.16);color:#F28B82}
.tb-note{font-size:12px;color:#8FA6AD;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#ttc-feed-app .tb-title{margin:10px 0 0;font:700 17px/1.3 'Space Grotesk',Inter,sans-serif;color:#E8F1F3}
.tb-cities{font-size:13px;color:#8FA6AD;margin-top:2px}
.tb-meta{display:flex;gap:6px 12px;margin-top:8px;font-size:13px;color:#B9CCD1;flex-wrap:wrap}
.tb-meta strong{color:#E8F1F3}
.tb-foot{display:flex;align-items:center;gap:12px;margin-top:12px}
.tb-foot .ta-btn{margin-left:auto;padding:0 18px}
.tb-foot .ta-btn.pri{font-weight:700!important}
.tb-paylabel{font-size:11px;color:#8FA6AD}
.tb-pay{font:700 18px 'Space Grotesk',Inter,sans-serif}
.tb-count{display:inline-block;margin-left:6px;background:#F2994A;color:#1A0E02;border-radius:9px;padding:1px 6px;font-size:11px;font-weight:700;line-height:16px}
.tb-count.quiet{background:#23363D;color:#C9D8DC}
#ttc-feed-app .ta-btn.danger{background:#F28B82;border-color:#F28B82;color:#2A0B08!important}
.ta-phone-actions{margin-left:auto;display:flex;align-items:center;gap:4px}

/* Needs a time (My jobs) */
.tb-needs{display:flex;flex-direction:column;gap:10px}
.tb-needs-card{padding:6px 14px 4px}
.tb-needs-head{display:flex;flex-direction:column;gap:2px;padding:8px 0 6px;color:#E8F1F3!important;text-decoration:none}
.tb-needs-head strong{font:700 16px 'Space Grotesk',Inter,sans-serif}

/* Stops */
.tb-stop{display:flex;gap:10px;align-items:center;padding:11px 0;border-bottom:1px solid #1E2F36}
.tb-needs-card .tb-stop:last-child{border-bottom:0}
.tb-n{width:26px;height:26px;border-radius:50%;background:#15242A;color:#B9CCD1;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;flex:none}
.tb-stop-text{flex:1;min-width:0}
.tb-addr{font-size:14px;font-weight:600;color:#E8F1F3}
.tb-sub{font-size:12px;color:#8FA6AD}
.tb-when{font-size:13px;margin-top:4px}
.tb-stop-pay{font-size:14px;white-space:nowrap}
.tb-total{display:flex;align-items:center;padding:12px 0 4px}
.tb-total span{font-size:14px;color:#B9CCD1}
.tb-total strong{margin-left:auto;font:700 20px 'Space Grotesk',Inter,sans-serif}

/* Route contract */
#ttc-feed-app main.tb-contract{max-width:760px;gap:0}
#ttc-feed-app header.tb-bar{display:flex;align-items:center;gap:6px;height:auto;padding:10px 0 4px;border:0;background:none;justify-content:normal;backdrop-filter:none;position:static}
.tb-bar .ta-iconbtn{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#E8F1F3!important;margin-left:-12px}
.tb-bar .ta-iconbtn .tf-ic{width:22px;height:22px}
.tb-bar-title{font-size:15px;font-weight:600}
.tb-hold{margin-left:auto;font-size:12px;font-weight:700;color:#F2B26B;background:rgba(242,178,107,.14);border-radius:6px;padding:4px 8px;white-space:nowrap}
.tb-hold.ended{color:#F28B82;background:rgba(242,139,130,.16)}
.tb-hold.done{color:#6FDCA0;background:rgba(86,204,140,.14)}
.tb-hold.open{color:#3FD2E8;background:rgba(63,210,232,.14)}
.tb-kicker{font-size:13px;color:#8FA6AD;margin-top:6px}
#ttc-feed-app .tb-h1{margin:4px 0 0;font:700 22px/1.25 'Space Grotesk',Inter,sans-serif;color:#E8F1F3;letter-spacing:0}
.tb-subhead{font-size:13px;color:#C9D8DC;margin-top:6px}
.tb-contract>.tf-notice{margin:10px 0 0}
.tb-stops{margin-top:12px}
.tb-instructions{margin:8px 0 4px;padding:12px 14px;border-radius:12px;background:#111D22;border:1px solid #1E2F36;font-size:13px;color:#C9D8DC}
.tb-instructions p{margin:4px 0 0;white-space:pre-wrap}
#ttc-feed-app .tb-link{display:inline-flex;align-items:center;gap:6px;background:none;border:0;padding:0;margin:0;color:#3FD2E8;font-size:13px;font-weight:600;cursor:pointer;height:auto;text-align:left}
#ttc-feed-app .tb-link:hover{color:#7FE3F2}
.tb-link .tf-ic{width:14px;height:14px}
.tb-terms{margin-top:6px!important;align-self:flex-start}
.tb-acks{margin-top:8px}
#ttc-feed-app .tb-ck{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.4;padding:8px 0;margin:0;color:#E8F1F3;cursor:pointer}
#ttc-feed-app .tb-ck input{width:22px;height:22px;margin:0;accent-color:#3FD2E8;flex:none}
#ttc-feed-app .tb-sig-label{display:block;font-size:13px;color:#8FA6AD;margin:8px 0 0;padding:0}
#ttc-feed-app .tb-sig-input{margin:6px 0 0;width:100%;box-sizing:border-box;height:48px;border-radius:12px;border:1px solid #23363D;background:#0E191D;color:#E8F1F3;font:italic 600 20px 'Space Grotesk',Inter,sans-serif;padding:0 14px}
#ttc-feed-app .tb-sig-input:focus{outline:2px solid #3FD2E8;outline-offset:1px}
.tb-signbar{margin-top:18px;display:flex;flex-direction:column;align-items:stretch}
#ttc-feed-app .tb-sign{width:100%;height:52px;border-radius:14px;border:0;background:#3FD2E8;color:#062026;font-size:16px;font-weight:700;cursor:pointer;margin:0}
#ttc-feed-app .tb-sign:disabled{opacity:.45;cursor:default}
.tb-signnote{text-align:center;font-size:12px;color:#8FA6AD;margin-top:8px}
#ttc-feed-app .tb-release{align-self:flex-start;margin-top:12px;font-size:12px!important;color:#8FA6AD!important;font-weight:500!important}
.tb-signed{margin-top:14px;padding:16px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.tb-signed p{margin:0}
.tb-sig{font:italic 600 22px 'Space Grotesk',Inter,sans-serif;color:#E8F1F3}

/* Dialogs: terms, signed copy, post a route, pick a time */
#ttc-feed-app dialog.tb-doc{width:min(720px,calc(100vw - 32px))}
.tb-doc-body{max-height:min(62vh,640px);overflow:auto;font-size:14px;line-height:1.55;color:#C9D8DC;padding-right:4px}
.tb-doc-body h3{font:700 16px 'Space Grotesk',Inter,sans-serif;color:#E8F1F3;margin:16px 0 4px}
#ttc-feed-app .tb-doc-body p{margin:0 0 10px}
.tb-copy-stops{margin:4px 0 10px;padding-left:20px}
.tb-sigblock{margin-top:16px;padding-top:12px;border-top:1px solid #1E2F36}
.tb-digest{word-break:break-all;font-size:11px!important}
#ttc-feed-app dialog.tb-post{width:min(760px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto}
.tb-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.tb-stop-rows{display:flex;flex-direction:column;gap:8px}
.tb-stop-row{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,1fr) minmax(0,1.3fr) minmax(0,1fr) 40px;gap:6px;align-items:center}
.tb-stop-row .ta-iconbtn{width:40px;height:40px;display:flex;align-items:center;justify-content:center;color:#8FA6AD!important;background:transparent;border:0}
.tb-stop-row .ta-iconbtn .tf-ic{width:18px;height:18px}
#ttc-feed-app .tb-post input,#ttc-feed-app .ta-dialog input[type="datetime-local"]{width:100%;box-sizing:border-box;height:44px;border-radius:12px;border:1px solid #23363D;background:#0E191D;color:#E8F1F3;font:15px Inter,sans-serif;padding:0 12px;margin:0;color-scheme:dark}
.tb-post .ta-field>.ta-btn{align-self:flex-start;margin:6px 0 0!important}

@media(max-width:759px){
  .tb-list{grid-template-columns:1fr;gap:10px}
  .ta-jobs .ta-jobs-head{flex-wrap:wrap;padding-top:16px}
  #ttc-feed-app .ta-jobs .ta-jobs-head .ta-h1{margin-top:0!important}
  .ta-jobs .ta-jobs-head .ta-btn{margin-left:0}
  #ttc-feed-app main.tb-contract{display:flex!important;padding:0 16px!important;max-width:none}
  .tb-contract .tb-signbar{position:fixed;left:0;right:0;bottom:0;z-index:21;margin:0;padding:12px 16px calc(14px + env(safe-area-inset-bottom));background:#0E181C;border-top:1px solid #1A2A30}
  #ttc-feed-app main.tb-contract:has(.tb-signbar){padding-bottom:130px!important}
  .ta-layout:has(.tb-contract)~.tf-tabbar{display:none!important}
  .ta-layout:has(.tb-contract){padding-bottom:24px!important}
  .tb-grid{grid-template-columns:1fr}
  .tb-stop-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 40px;grid-template-areas:"addr addr x" "tid task task" "pay pay pay"}
  .tb-stop-row>input[name="address"]{grid-area:addr}
  .tb-stop-row>input[name="tid"]{grid-area:tid}
  .tb-stop-row>input[name="task"]{grid-area:task}
  .tb-stop-row>input[name="pay"]{grid-area:pay}
  .tb-stop-row>.ta-iconbtn{grid-area:x}
  .tb-stop-row{padding-bottom:8px;border-bottom:1px solid #1E2F36}
}
@media print{
  body>*:not(#ttc-feed-app),#ttc-feed-app>:not(dialog.tb-doc){display:none!important}
  #ttc-feed-app dialog.tb-doc{position:static;width:auto;max-height:none;border:0;box-shadow:none;background:#fff;color:#000}
  .tb-doc-body{max-height:none;overflow:visible;color:#000}
  .tb-doc-body h3,.tb-sig{color:#000}
  .tb-doc .ta-dialog-actions{display:none}
}

/* Send a contract: one pay for every stop */
.tb-pay-all{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:2px 0 8px;font-size:13px;color:#8FA6AD}
#ttc-feed-app .tb-pay-all input{width:120px;height:40px;border-radius:10px;border:1px solid #23363D;background:#0E191D;color:#E8F1F3;font:15px Inter,sans-serif;padding:0 10px;margin:0}
.tb-pay-all .ta-btn{margin:0}
