:root {
  --ttsv2-navy: #111a32;
  --ttsv2-navy-soft: #1c2949;
  --ttsv2-orange: #f36b36;
  --ttsv2-teal: #087f7b;
  --ttsv2-cream: #fbf8f2;
  --ttsv2-ink: #172033;
  --ttsv2-muted: #66728a;
  --ttsv2-line: #e6e8ec;
}

body.tt-support-open { overflow: hidden !important; }
.tt-support-v2 { position: fixed; inset: 0; z-index: 10000; background: var(--ttsv2-cream); color: var(--ttsv2-ink); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.tt-support-v2.is-wizard { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.tt-support-v2.hidden { display: none; }
.ttsv2-header { min-height: 76px; padding: max(14px, env(safe-area-inset-top)) 16px 12px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 12px; background: linear-gradient(135deg, var(--ttsv2-navy), #1a3152); color: white; box-shadow: 0 8px 24px rgba(17,26,50,.16); }
.ttsv2-header small { display: block; color: #a6b7d6; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.ttsv2-header h1 { margin: 3px 0 0; color: white; font-size: 19px; line-height: 1.15; }
.ttsv2-icon { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.2); border-radius: 14px; color: white; background: rgba(255,255,255,.08); font-size: 23px; display: grid; place-items: center; }
.ttsv2-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 14px 30px; }
.ttsv2-home, .ttsv2-detail, .ttsv2-wizard { display: flex; flex-direction: column; gap: 18px; }
.ttsv2-welcome { position: relative; overflow: hidden; border-radius: 24px; padding: 23px 20px; color: white; background: linear-gradient(135deg, #0c7475, #0d9390); box-shadow: 0 14px 30px rgba(8,127,123,.2); }
.ttsv2-welcome::after { content: ""; position: absolute; width: 150px; height: 150px; right: -56px; bottom: -75px; border: 30px solid rgba(255,255,255,.09); border-radius: 50%; }
.ttsv2-welcome > div { max-width: 78%; }
.ttsv2-welcome small, .ttsv2-section-title small, .ttsv2-wizard-card > small, .ttsv2-resolution > small, .ttsv2-csat > small { font-size: 10px; font-weight: 850; letter-spacing: .14em; color: inherit; opacity: .78; }
.ttsv2-welcome h2 { margin: 6px 0 8px; max-width: 280px; font-size: 24px; line-height: 1.12; }
.ttsv2-welcome p { margin: 0; color: rgba(255,255,255,.8); font-size: 13px; line-height: 1.5; }
.ttsv2-welcome > span { position: absolute; right: 24px; top: 26px; font-size: 32px; font-weight: 850; }
.ttsv2-welcome > small:last-child { position: absolute; right: 24px; top: 60px; }
.ttsv2-section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ttsv2-section-title small { color: #8892a5; }
.ttsv2-section-title h2 { margin: 3px 0 0; font-size: 19px; }
.ttsv2-section-title button { border: 0; background: #fff0e8; color: #b84517; border-radius: 12px; padding: 10px 13px; font-weight: 800; }
.ttsv2-section-title button:disabled { opacity: .45; }
.ttsv2-trip-list, .ttsv2-ticket-list { display: grid; gap: 12px; }
.ttsv2-trip-card, .ttsv2-ticket-card, .ttsv2-context, .ttsv2-conversation, .ttsv2-csat { border: 1px solid var(--ttsv2-line); border-radius: 22px; background: #fff; box-shadow: 0 9px 28px rgba(20,32,51,.06); }
.ttsv2-trip-card { padding: 17px; }
.ttsv2-trip-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ttsv2-trip-top small { color: var(--ttsv2-orange); font-size: 10px; font-weight: 850; letter-spacing: .1em; }
.ttsv2-trip-top h3 { margin: 4px 0; font-size: 17px; }
.ttsv2-trip-top p { margin: 0; color: var(--ttsv2-muted); font-size: 11px; }
.ttsv2-trip-date { flex: 0 0 auto; background: #f3f5f8; border-radius: 11px; padding: 8px 9px; color: #44516a; font-size: 11px; font-weight: 750; }
.ttsv2-progress { height: 5px; overflow: hidden; margin: 15px 0; border-radius: 999px; background: #e9edf1; }
.ttsv2-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ttsv2-teal), #36a69f); }
.ttsv2-readiness { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 14px; }
.ttsv2-readiness span { padding: 0 8px; border-right: 1px solid var(--ttsv2-line); }
.ttsv2-readiness span:first-child { padding-left: 0; }
.ttsv2-readiness span:last-child { border: 0; }
.ttsv2-readiness b, .ttsv2-readiness small { display: block; }
.ttsv2-readiness b { font-size: 12px; }
.ttsv2-readiness small { margin-top: 3px; color: var(--ttsv2-muted); font-size: 10px; }
.ttsv2-trip-card > button { width: 100%; border: 0; border-radius: 13px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; color: #056864; background: #e7f7f4; font-weight: 800; text-align: left; }
.ttsv2-trip-card > button b { font-size: 20px; }
.ttsv2-ticket-card { width: 100%; padding: 16px; text-align: left; color: inherit; }
.ttsv2-ticket-card > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ttsv2-ticket-card > div small { color: var(--ttsv2-muted); font-size: 10px; font-weight: 750; }
.ttsv2-ticket-card h3 { margin: 11px 0 4px; font-size: 15px; }
.ttsv2-ticket-card p { margin: 0; color: var(--ttsv2-muted); font-size: 12px; }
.ttsv2-ticket-card footer { margin-top: 13px; padding-top: 11px; border-top: 1px solid #eef0f3; display: flex; justify-content: space-between; color: #59677e; font-size: 11px; font-weight: 750; }
.ttsv2-status { display: inline-flex; align-items: center; width: fit-content; padding: 6px 9px; border-radius: 999px; background: #e5f6f3; color: #08726e; font-size: 10px; font-weight: 850; letter-spacing: .03em; }
.ttsv2-status.urgent { background: #ffe6e3; color: #b62c24; }
.ttsv2-status.waiting { background: #fff2d9; color: #9a5a0b; }
.ttsv2-status.resolved, .ttsv2-status.closed { background: #edf6e7; color: #3b7125; }
.ttsv2-empty { padding: 30px 20px; border: 1px dashed #ccd2db; border-radius: 22px; text-align: center; background: rgba(255,255,255,.62); }
.ttsv2-empty.compact { padding: 23px 18px; box-shadow: none; }
.ttsv2-empty > span { display: grid; width: 48px; height: 48px; place-items: center; margin: 0 auto 10px; border-radius: 16px; color: var(--ttsv2-teal); background: #e4f5f2; font-size: 21px; }
.ttsv2-empty h2, .ttsv2-empty h3 { margin: 0 0 6px; }
.ttsv2-empty p { margin: 0; color: var(--ttsv2-muted); font-size: 13px; line-height: 1.45; }
.ttsv2-empty > button, .ttsv2-error > button { margin-top: 16px; border: 0; border-radius: 13px; padding: 12px 18px; color: white; background: var(--ttsv2-teal); font-weight: 800; }
.ttsv2-bottom-nav { min-height: 70px; padding: 8px 12px max(8px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ttsv2-line); background: rgba(255,255,255,.96); box-shadow: 0 -8px 22px rgba(17,26,50,.07); }
.ttsv2-bottom-nav button { border: 0; background: transparent; color: #7b8597; display: grid; justify-items: center; gap: 3px; font-size: 19px; }
.ttsv2-bottom-nav small { font-size: 9px; font-weight: 750; }
.ttsv2-bottom-nav .is-active { color: var(--ttsv2-teal); }
.ttsv2-bottom-nav .ttsv2-new span { width: 34px; height: 34px; display: grid; place-items: center; margin-top: -20px; border-radius: 13px; color: white; background: var(--ttsv2-orange); box-shadow: 0 8px 18px rgba(243,107,54,.28); }
.ttsv2-steps { padding: 12px 20px 9px; display: grid; grid-template-columns: repeat(4, 1fr); background: white; border-bottom: 1px solid var(--ttsv2-line); }
.ttsv2-steps span { position: relative; display: grid; justify-items: center; gap: 4px; color: #9aa2b0; }
.ttsv2-steps span::before { content: ""; position: absolute; left: -50%; right: 50%; top: 13px; height: 2px; background: #e3e6eb; }
.ttsv2-steps span:first-child::before { display: none; }
.ttsv2-steps b { z-index: 1; width: 27px; height: 27px; display: grid; place-items: center; border: 2px solid #dce0e6; border-radius: 50%; background: white; font-size: 11px; }
.ttsv2-steps small { font-size: 9px; font-weight: 750; }
.ttsv2-steps span.is-active { color: var(--ttsv2-teal); }
.ttsv2-steps span.is-active::before { background: var(--ttsv2-teal); }
.ttsv2-steps span.is-active b { border-color: var(--ttsv2-teal); color: white; background: var(--ttsv2-teal); }
.ttsv2-wizard-card { padding: 21px 18px; border: 1px solid var(--ttsv2-line); border-radius: 23px; background: white; box-shadow: 0 10px 28px rgba(17,26,50,.06); }
.ttsv2-wizard-card > small { color: var(--ttsv2-orange); }
.ttsv2-wizard-card h2 { margin: 7px 0; font-size: 22px; }
.ttsv2-wizard-card > p { margin: 0 0 18px; color: var(--ttsv2-muted); font-size: 13px; line-height: 1.5; }
.ttsv2-choice-list { display: grid; gap: 10px; }
.ttsv2-choice-list label { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 15px; border: 1px solid #dfe3e9; border-radius: 16px; cursor: pointer; }
.ttsv2-choice-list input, .ttsv2-category-grid input, .ttsv2-urgency input { position: absolute; opacity: 0; pointer-events: none; }
.ttsv2-choice-list label::before { content: ""; width: 17px; height: 17px; border: 2px solid #c8ced8; border-radius: 50%; }
.ttsv2-choice-list label.is-selected { border-color: var(--ttsv2-teal); background: #eff9f7; }
.ttsv2-choice-list label.is-selected::before { border: 5px solid var(--ttsv2-teal); width: 11px; height: 11px; background: white; }
.ttsv2-choice-list b, .ttsv2-choice-list small { display: block; }
.ttsv2-choice-list small { margin-top: 4px; color: var(--ttsv2-muted); font-size: 11px; }
.ttsv2-choice-list i { color: var(--ttsv2-teal); opacity: 0; }
.ttsv2-choice-list .is-selected i { opacity: 1; }
.ttsv2-category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ttsv2-category-grid label { min-height: 124px; padding: 14px; border: 1px solid #e0e4ea; border-radius: 17px; display: flex; flex-direction: column; cursor: pointer; }
.ttsv2-category-grid label > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #6a7487; background: #f1f3f6; font-weight: 900; }
.ttsv2-category-grid b { margin-top: 12px; font-size: 13px; }
.ttsv2-category-grid small { margin-top: 4px; color: var(--ttsv2-muted); font-size: 10px; line-height: 1.35; }
.ttsv2-category-grid label.is-selected { border-color: var(--ttsv2-teal); background: #eff9f7; box-shadow: inset 0 0 0 1px var(--ttsv2-teal); }
.ttsv2-category-grid label.is-selected > span { color: white; background: var(--ttsv2-teal); }
.ttsv2-field { display: grid; gap: 7px; margin-bottom: 15px; color: #344057; font-size: 12px; font-weight: 800; }
.ttsv2-field input, .ttsv2-field textarea, .ttsv2-field select { width: 100%; box-sizing: border-box; border: 1px solid #dce1e8; border-radius: 14px; padding: 13px 14px; color: var(--ttsv2-ink); background: #fbfcfd; font: inherit; font-size: 13px; resize: vertical; }
.ttsv2-field > small { margin-top: -28px; margin-right: 10px; justify-self: end; color: #99a1af; pointer-events: none; }
.ttsv2-urgency { margin: 4px 0 15px; padding: 0; border: 0; }
.ttsv2-urgency legend { margin-bottom: 8px; color: #344057; font-size: 12px; font-weight: 800; }
.ttsv2-urgency label { display: flex; padding: 12px; margin-bottom: 8px; border: 1px solid #e0e4e9; border-radius: 14px; }
.ttsv2-urgency label.is-selected { border-color: var(--ttsv2-orange); background: #fff5ef; }
.ttsv2-urgency b, .ttsv2-urgency small { display: block; }
.ttsv2-urgency small { margin-top: 3px; color: var(--ttsv2-muted); font-size: 10px; }
.ttsv2-upload { padding: 16px; margin-bottom: 12px; border: 1px dashed #bfc8d4; border-radius: 16px; display: grid; grid-template-columns: 38px 1fr; align-items: center; column-gap: 11px; cursor: pointer; background: #f8fafb; }
.ttsv2-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ttsv2-upload > span { grid-row: span 2; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: white; background: var(--ttsv2-teal); font-size: 21px; }
.ttsv2-upload b { font-size: 12px; }
.ttsv2-upload small { color: var(--ttsv2-muted); font-size: 9px; }
.ttsv2-evidence-list { display: flex; flex-wrap: wrap; gap: 7px; margin: -3px 0 13px; }
.ttsv2-evidence-list span { padding: 7px 9px; border-radius: 10px; background: #edf2f5; font-size: 10px; }
.ttsv2-evidence-list button { border: 0; background: transparent; color: #8d3140; }
.ttsv2-wizard-actions { display: grid; grid-template-columns: minmax(90px, .6fr) minmax(160px, 1.4fr); gap: 10px; padding: 12px 14px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--ttsv2-line); background: white; }
.ttsv2-wizard-actions button { min-height: 48px; border-radius: 14px; font-weight: 850; }
.ttsv2-wizard-actions .secondary { border: 1px solid #d7dce4; color: #59657a; background: white; }
.ttsv2-wizard-actions .primary { border: 0; color: white; background: var(--ttsv2-teal); box-shadow: 0 8px 18px rgba(8,127,123,.18); }
.ttsv2-review-trip { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 15px; background: #f0f8f7; }
.ttsv2-review-trip > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--ttsv2-teal); }
.ttsv2-review-trip b, .ttsv2-review-trip small { display: block; }
.ttsv2-review-trip small { margin-top: 3px; color: var(--ttsv2-muted); font-size: 10px; }
.ttsv2-wizard-card dl, .ttsv2-context dl { margin: 14px 0; }
.ttsv2-wizard-card dl > div, .ttsv2-context dl > div { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf0f3; }
.ttsv2-wizard-card dt, .ttsv2-context dt { color: var(--ttsv2-muted); font-size: 11px; }
.ttsv2-wizard-card dd, .ttsv2-context dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 750; }
.ttsv2-promise { display: flex; gap: 11px; padding: 14px; border-radius: 15px; color: #6a4304; background: #fff3d8; }
.ttsv2-promise > span { font-size: 20px; }
.ttsv2-promise b, .ttsv2-promise small { display: block; }
.ttsv2-promise small { margin-top: 3px; opacity: .78; font-size: 10px; }
.ttsv2-safe-note { padding: 12px; margin: 12px 0 0 !important; border-radius: 13px; color: #6b5360 !important; background: #f7f1f4; font-size: 10px !important; }
.ttsv2-ticket-hero { padding: 20px 18px; border-radius: 23px; color: white; background: linear-gradient(135deg, #0c7475, #12918c); box-shadow: 0 13px 30px rgba(8,127,123,.17); }
.ttsv2-ticket-hero.urgent { background: linear-gradient(135deg, #9d2c2c, #c94c3f); }
.ttsv2-ticket-hero.waiting { background: linear-gradient(135deg, #936211, #bb8221); }
.ttsv2-ticket-hero.resolved, .ttsv2-ticket-hero.closed { background: linear-gradient(135deg, #39733d, #599044); }
.ttsv2-ticket-hero > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.ttsv2-ticket-hero > div:first-child > small { font-size: 10px; font-weight: 800; }
.ttsv2-ticket-hero .ttsv2-status { color: inherit; background: rgba(255,255,255,.18); }
.ttsv2-ticket-hero h2 { margin: 15px 0 7px; font-size: 22px; }
.ttsv2-ticket-hero > p { margin: 0; color: rgba(255,255,255,.8); font-size: 12px; line-height: 1.5; }
.ttsv2-timer { display: flex; gap: 10px; margin-top: 16px; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.13); }
.ttsv2-timer > span { font-size: 20px; }
.ttsv2-timer b, .ttsv2-timer small { display: block; }
.ttsv2-timer small { margin-top: 3px; opacity: .76; font-size: 10px; }
.ttsv2-context, .ttsv2-conversation, .ttsv2-csat { padding: 17px; }
.ttsv2-context dl { margin-bottom: 0; }
.ttsv2-resolution { padding: 18px; border: 1px solid #b9d9ad; border-radius: 22px; background: #f0f8eb; }
.ttsv2-resolution > small { color: #477834; }
.ttsv2-resolution h2 { margin: 7px 0; font-size: 18px; }
.ttsv2-resolution p { margin: 0; color: #5f6e5a; font-size: 12px; line-height: 1.5; }
.ttsv2-resolution > div { display: flex; gap: 8px; margin-top: 14px; }
.ttsv2-resolution button { flex: 1; border: 0; border-radius: 12px; padding: 11px; color: white; background: #4f8539; font-weight: 800; }
.ttsv2-resolution button.secondary { border: 1px solid #9fc48f; color: #4f753f; background: white; }
.ttsv2-messages { max-height: 430px; overflow-y: auto; display: grid; gap: 10px; }
.ttsv2-message { max-width: 84%; padding: 11px 12px; border-radius: 15px 15px 15px 4px; background: #f0f2f5; }
.ttsv2-message.mine { justify-self: end; border-radius: 15px 15px 4px 15px; background: #daf3ed; }
.ttsv2-message > div { display: flex; justify-content: space-between; gap: 14px; }
.ttsv2-message b { font-size: 10px; }
.ttsv2-message small { color: var(--ttsv2-muted); font-size: 8px; }
.ttsv2-message p { margin: 5px 0 0; white-space: pre-wrap; font-size: 12px; line-height: 1.45; }
.ttsv2-message a { display: inline-block; margin-top: 6px; color: var(--ttsv2-teal); font-size: 10px; }
.ttsv2-csat > div { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
.ttsv2-csat button { min-width: 0; padding: 9px 3px; border: 1px solid #dce1e7; border-radius: 11px; color: #687287; background: white; font-weight: 800; }
.ttsv2-csat button span { display: block; color: #e4a839; }
.ttsv2-csat button.is-active { border-color: #e4a839; background: #fff6df; }
.ttsv2-reply { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; padding: 10px 12px max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--ttsv2-line); background: white; }
.ttsv2-reply textarea { min-width: 0; max-height: 96px; resize: none; border: 1px solid #dce1e7; border-radius: 14px; padding: 11px 12px; font: inherit; font-size: 12px; }
.ttsv2-reply button { align-self: stretch; border: 0; border-radius: 13px; padding: 0 17px; color: white; background: var(--ttsv2-teal); font-weight: 850; }
.ttsv2-loading, .ttsv2-error { grid-row: 1 / -1; align-self: center; justify-self: center; padding: 30px; text-align: center; }
.ttsv2-loading i { width: 42px; height: 42px; display: block; margin: 0 auto 17px; border: 4px solid #d9eeeb; border-top-color: var(--ttsv2-teal); border-radius: 50%; animation: ttsv2-spin .8s linear infinite; }
.ttsv2-loading h2, .ttsv2-error h2 { margin: 0 0 6px; font-size: 20px; }
.ttsv2-loading p, .ttsv2-error p { margin: 0; color: var(--ttsv2-muted); font-size: 12px; }
.ttsv2-error > span { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 17px; color: #a92e2e; background: #ffe9e5; font-size: 24px; font-weight: 900; }
.tt-support-toast { position: fixed; z-index: 11000; left: 50%; bottom: 90px; transform: translateX(-50%); padding: 12px 16px; border-radius: 12px; color: white; background: #111a32; font-size: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
@keyframes ttsv2-spin { to { transform: rotate(360deg); } }

@media (min-width: 700px) {
  .tt-support-v2 { left: 50%; width: 430px; border-left: 1px solid var(--ttsv2-line); border-right: 1px solid var(--ttsv2-line); transform: translateX(-50%); box-shadow: 0 0 60px rgba(17,26,50,.22); }
}

@media (max-width: 390px) {
  .ttsv2-scroll { padding-left: 12px; padding-right: 12px; }
  .ttsv2-welcome h2 { font-size: 21px; }
  .ttsv2-category-grid label { min-height: 116px; padding: 12px; }
}
