/* Turbo: Carson Cars lead desk. Navy, gold, clean cards. Desktop first; stacks on a phone. */
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body.tb{font-family:Inter,"Segoe UI",system-ui,-apple-system,Arial,sans-serif;background:#F4F6F9;color:#0F1B2D;font-size:15px;line-height:1.45}
:where(.tb) a{color:#1F4FA3}
.tb h1,.tb h2,.tb h3{margin:0;font-family:"Space Grotesk",Inter,"Segoe UI",system-ui,sans-serif}
:where(.tb) button,:where(.tb) input,:where(.tb) select,:where(.tb) textarea{font:inherit;color:inherit}
.tb-mark{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;background:#F2C14E;flex:none}
.tb-word{font-family:"Space Grotesk",Inter,sans-serif;font-weight:700;font-size:24px;letter-spacing:1px;color:#fff}

/* shell */
.tb-shell{display:grid;grid-template-columns:210px 1fr;min-height:100vh}
.tb-side{background:#0F1B2D;color:#fff;padding:22px 14px;display:flex;flex-direction:column;gap:6px;position:sticky;top:0;height:100vh}
.tb-brand{display:flex;align-items:center;gap:10px;margin:0 6px 18px;text-decoration:none}
.tb-nav{display:flex;flex-direction:column;gap:6px}
.tb-nav a{height:48px;display:flex;align-items:center;gap:8px;padding:0 14px;border-radius:10px;color:#DCE3EE;font-weight:600;text-decoration:none}
.tb-nav a:hover{background:#17263C;color:#fff}
.tb-nav a.on{background:#fff;color:#0F1B2D;font-weight:700}
.tb-badge{margin-left:auto;background:#F2C14E;color:#0F1B2D;border-radius:999px;padding:1px 9px;font-size:13px;font-weight:700}
.tb-who{margin-top:auto;font-size:13px;color:#B9C4D6;padding:0 6px;display:flex;flex-direction:column;gap:6px}
.tb-who a{color:#F2C14E;font-weight:600}
.tb-main{min-width:0;display:flex;flex-direction:column}
.tb-flash{margin:14px 22px 0;background:#FBE9B7;color:#5A4300;border-radius:10px;padding:10px 14px;font-weight:600}
.tb-page{padding:24px;display:flex;flex-direction:column;gap:18px;max-width:1100px}
.tb-page h1{font-size:28px}
.tb-sub{color:#55627A;font-size:14px}

/* buttons */
.tb-btn{height:46px;padding:0 18px;border-radius:10px;border:1px solid #C9D2E0;background:#fff;color:#0F1B2D;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;white-space:nowrap}
.tb-btn:hover{border-color:#0F1B2D}
.tb-btn.gold{background:#F2C14E;border-color:#F2C14E;font-weight:700}
.tb-btn.navy{background:#0F1B2D;border-color:#0F1B2D;color:#fff;font-weight:700}
.tb-btn.small{height:44px;padding:0 12px;font-size:14px;color:#1F4FA3}

/* inbox */
.tb-inbox{display:grid;grid-template-columns:minmax(300px,370px) 1fr;min-height:100vh}
.tb-list{background:#fff;border-right:1px solid #DDE3EC;padding:18px 14px;display:flex;flex-direction:column;gap:10px;height:100vh;overflow:auto;position:sticky;top:0}
.tb-tabs{display:flex;gap:6px}
.tb-tabs a{flex:1;height:46px;display:flex;align-items:center;justify-content:center;gap:6px;border-radius:10px;border:1px solid #C9D2E0;color:#0F1B2D;font-weight:600;font-size:14px;text-decoration:none}
.tb-tabs a.on{background:#0F1B2D;border-color:#0F1B2D;color:#fff;font-weight:700}
.tb-tabs span{font-weight:700;opacity:.8}
.tb-search{display:flex;gap:6px}
.tb-search input{flex:1;min-width:0;height:46px;border-radius:10px;border:1px solid #C9D2E0;padding:0 12px;background:#fff}
.tb-card{display:flex;flex-direction:column;gap:5px;padding:13px;border-radius:12px;border:1px solid #DDE3EC;text-decoration:none;color:inherit}
.tb-card:hover{border-color:#8A97AD}
.tb-card.on{border:2px solid #0F1B2D;padding:12px}
.tb-card-top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.tb-card-name{font-weight:700;font-size:16px}
.tb-card-when{font-size:12px;color:#55627A;white-space:nowrap}
.tb-card-src{font-size:13px;color:#55627A}
.tb-card-msg{font-size:14px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.tb-pills{display:flex;gap:6px;flex-wrap:wrap}
.tb-pill{font-size:12px;font-weight:700;padding:4px 9px;border-radius:7px;background:#E7ECF3;color:#33415A}
.tb-pill.gold{background:#FBE9B7;color:#5A4300}
.tb-pill.blue{background:#DCE8FB;color:#173B7A}
.tb-pill.dark{background:#0F1B2D;color:#fff}
.tb-empty{color:#55627A;padding:18px 6px}

.tb-conv{padding:22px;display:flex;flex-direction:column;gap:14px;min-width:0}
.tb-back{display:none}
.tb-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:flex-start}
.tb-head h1{font-size:28px}
.tb-acts{display:flex;gap:8px;flex-wrap:wrap}
.tb-acts form{margin:0}
.tb-box{background:#fff;border:1px solid #DDE3EC;border-radius:12px;padding:14px 16px}
.tb-label{font-size:12px;font-weight:700;color:#55627A;letter-spacing:.5px;text-transform:uppercase;margin-bottom:4px}
.tb-thread{display:flex;flex-direction:column;gap:10px;padding:18px}
.tb-msg{max-width:min(560px,86%);display:flex;flex-direction:column;gap:5px}
.tb-msg.in{align-self:flex-start}
.tb-msg.out{align-self:flex-end;align-items:flex-end}
.tb-msg-who{font-size:12px;font-weight:700;color:#55627A}
.tb-bubble{padding:11px 14px;border-radius:14px;white-space:pre-wrap;overflow-wrap:anywhere}
.tb-msg.in .tb-bubble{background:#F4F6F9;border:1px solid #DDE3EC;border-bottom-left-radius:4px}
.tb-msg.out .tb-bubble{background:#0F1B2D;color:#fff;border-bottom-right-radius:4px}
.tb-msg.out.person .tb-bubble{background:#1F4FA3}
.tb-msg.out.notsent .tb-bubble{background:#fff;color:#0F1B2D;border:1px dashed #8A97AD}
.tb-note{background:#FBE9B7;color:#5A4300;border-radius:8px;padding:7px 10px;font-size:14px;max-width:100%}
.tb-coach summary{list-style:none;cursor:pointer}
.tb-coach summary::-webkit-details-marker{display:none}
.tb-coach form{margin:8px 0 0;display:flex;flex-direction:column;gap:8px;width:min(420px,80vw)}
.tb textarea{width:100%;border-radius:10px;border:1px solid #C9D2E0;padding:10px 12px;background:#fff;resize:vertical;min-height:52px}
.tb-reply{display:flex;gap:8px;align-items:flex-end;margin:0}
.tb-reply textarea{flex:1}
.tb-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.tb-row form{margin:0;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.tb select{height:46px;border-radius:10px;border:1px solid #C9D2E0;padding:0 10px;background:#fff}
.tb-log{font-size:14px;color:#33415A;margin:6px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}
.tb-log span{color:#55627A;font-size:12px}
.tb details.tb-more summary{cursor:pointer;font-weight:700;min-height:44px;display:flex;align-items:center}

/* tables */
.tb-table{width:100%;border-collapse:collapse;background:#fff;border:1px solid #DDE3EC;border-radius:12px;overflow:hidden}
.tb-table th,.tb-table td{text-align:left;padding:11px 14px;border-bottom:1px solid #E7ECF3;vertical-align:top}
.tb-table th{font-size:12px;letter-spacing:.5px;text-transform:uppercase;color:#55627A;background:#F8FAFC}
.tb-table td.num,.tb-table th.num{text-align:right;font-variant-numeric:tabular-nums}
.tb-scroll{overflow-x:auto}
.tb-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px}
.tb-stat{background:#fff;border:1px solid #DDE3EC;border-radius:12px;padding:14px 16px}
.tb-stat b{display:block;font-family:"Space Grotesk",Inter,sans-serif;font-size:30px}
.tb-kv{display:grid;grid-template-columns:minmax(150px,220px) 1fr;gap:10px 16px;margin:0}
.tb-kv dt{color:#55627A;font-weight:600}
.tb-kv dd{margin:0;font-weight:600}
.tb-on{color:#0B6B3A}.tb-off{color:#8A2A12}

/* sign in */
.tb-login{min-height:100vh;background:#0F1B2D;color:#fff;display:flex;align-items:center;justify-content:center;padding:24px}
.tb-login-card{width:100%;max-width:400px;display:flex;flex-direction:column;gap:26px}
.tb-login .tb-word{font-size:40px}
.tb-login .tb-mark{width:44px;height:44px;border-radius:11px}
.tb-login-sub{color:#B9C4D6;margin-top:6px}
.tb-login form{display:flex;flex-direction:column;gap:18px;margin:0}
.tb-login label{display:flex;flex-direction:column;gap:7px;font-weight:600;color:#DCE3EE;font-size:15px}
.tb-login input{height:56px;border-radius:12px;border:1px solid #3B4B63;background:#17263C;color:#fff;font-size:18px;padding:0 16px;width:100%}
.tb-pw{position:relative;display:block}
.tb-pw input{padding-right:62px}
.tb-eye{position:absolute;right:4px;top:4px;width:48px;height:48px;border:0;background:transparent;color:#DCE3EE;cursor:pointer;display:flex;align-items:center;justify-content:center}
.tb-eye .shut{display:none}.tb-eye[aria-pressed=true] .shut{display:block}.tb-eye[aria-pressed=true] .open{display:none}
.tb-login-btn{height:60px;border-radius:12px;border:0;background:#F2C14E;color:#0F1B2D;font-size:19px;font-weight:700;cursor:pointer}
.tb-login a{color:#F2C14E}
.tb-who a{color:#F2C14E}
.tb-login-flash{background:#FBE9B7;color:#5A4300;border-radius:10px;padding:10px 14px;font-weight:600}
.tb-login-foot{color:#B9C4D6;font-size:14px}

/* phone */
@media (max-width:900px){
  .tb-shell{grid-template-columns:1fr}
  .tb-side{position:static;height:auto;flex-direction:row;align-items:center;padding:10px 12px;gap:10px;flex-wrap:wrap}
  .tb-brand{margin:0}
  .tb-nav{flex-direction:row;flex:1;gap:4px;overflow-x:auto}
  .tb-nav a{height:44px;padding:0 12px}
  .tb-who{margin:0;flex-direction:row;align-items:center}
  .tb-who span{display:none}
  .tb-inbox{grid-template-columns:1fr;min-height:0}
  .tb-list{height:auto;position:static;border-right:0}
  .tb-inbox.picked .tb-list{display:none}
  .tb-inbox:not(.picked) .tb-conv{display:none}
  .tb-back{display:inline-flex}
  .tb-conv{padding:14px}
  .tb-page{padding:14px}
  .tb-kv{grid-template-columns:1fr}
  .tb-kv dt{margin-top:6px}
}
