#coachAiTab{--coach-green:#9af11a;--coach-cyan:#32c8e6;max-width:1240px;margin:0 auto}
.coach-shell{padding:20px;background:linear-gradient(145deg,rgba(8,24,34,.96),rgba(4,14,25,.98));border:1px solid rgba(50,200,230,.2);border-radius:26px;color:#eef7ff}
.coach-hero{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:18px}.coach-hero h2{margin:3px 0 7px;font-size:clamp(30px,5vw,52px)}.coach-usage{padding:10px 14px;border:1px solid rgba(154,241,26,.35);border-radius:15px;background:rgba(154,241,26,.08);color:#dfffaa;font-weight:800;white-space:nowrap}
.coach-athlete{display:grid;grid-template-columns:auto 1fr;gap:14px;align-items:center;padding:16px;border:1px solid rgba(148,163,184,.18);border-radius:20px;background:rgba(2,10,20,.6)}.coach-athlete img{width:64px;height:64px;border-radius:50%;object-fit:cover;border:2px solid var(--coach-green)}.coach-athlete h3{margin:0 0 7px}.coach-kpis{display:flex;flex-wrap:wrap;gap:7px}.coach-kpis span{padding:6px 9px;border-radius:10px;background:rgba(50,200,230,.09);font-size:12px;color:#bfcedb}
.coach-intro{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:12px}.coach-intro>div{padding:12px;border:1px solid rgba(154,241,26,.18);border-radius:15px;background:rgba(154,241,26,.055)}.coach-intro strong,.coach-intro span{display:block}.coach-intro strong{margin-bottom:4px;color:#dfffaa;font-size:13px}.coach-intro span{color:#aebdca;font-size:12px;line-height:1.35}.coach-back-home{width:100%;margin-top:9px;border:1px solid rgba(56,189,248,.22);background:transparent;color:#c9eefa}
.coach-note-card{display:flex;width:100%;justify-content:space-between;align-items:center;gap:12px;margin-top:10px;padding:14px;text-align:left;border:1px solid rgba(154,241,26,.42);border-radius:17px;background:linear-gradient(135deg,rgba(154,241,26,.13),rgba(50,200,230,.08));color:#efffd9}.coach-note-card span,.coach-note-card small,.coach-note-card strong,.coach-note-card em{display:block}.coach-note-card span{min-width:0}.coach-note-card small{color:#9af11a;text-transform:uppercase;letter-spacing:.12em}.coach-note-card strong{margin:4px 0;font-size:17px}.coach-note-card em{color:#afbecb;font-size:12px;font-style:normal}.coach-note-card b{flex:0 0 auto;color:#cfff89;font-size:12px}
.coach-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}.coach-action{min-height:104px;display:flex;flex-direction:column;align-items:flex-start;text-align:left;padding:15px;border:1px solid rgba(50,200,230,.22);border-radius:18px;background:rgba(8,27,40,.75);color:#fff;cursor:pointer}.coach-action:hover{border-color:var(--coach-green);transform:translateY(-1px)}.coach-action strong,.coach-action small{display:block}.coach-action strong{margin:8px 0 4px}.coach-action small{color:#91a4b7;line-height:1.35}
.coach-view.hidden{display:none!important}.coach-history{margin-top:18px}.coach-history-list{display:grid;gap:8px}.coach-history-item{display:flex;justify-content:space-between;gap:12px;padding:12px;border-radius:14px;background:rgba(15,31,45,.72);border:1px solid rgba(148,163,184,.14);color:#e7f3fb}.coach-empty{padding:18px;text-align:center;color:#91a4b7;border:1px dashed rgba(148,163,184,.25);border-radius:15px}
.coach-chat-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}.coach-chat-head h3{margin:0}.coach-chat{height:min(58vh,560px);overflow:auto;padding:12px;border:1px solid rgba(148,163,184,.18);border-radius:18px;background:rgba(0,8,16,.7)}.coach-message{max-width:82%;margin:9px 0;padding:11px 13px;border-radius:16px;line-height:1.45;white-space:pre-wrap}.coach-message.assistant{background:#10293a;border:1px solid rgba(50,200,230,.2)}.coach-message.user{margin-left:auto;background:linear-gradient(135deg,#69d424,#23bedb);color:#04100e;font-weight:650}.coach-message.loading{color:#9fb3c5;font-style:italic}.coach-quick{display:flex;gap:7px;overflow:auto;padding:10px 0}.coach-quick button{flex:0 0 auto;border:1px solid rgba(154,241,26,.35);border-radius:999px;padding:8px 11px;background:rgba(154,241,26,.07);color:#e8ffd0}.coach-composer{display:grid;grid-template-columns:1fr auto;gap:8px}.coach-composer textarea{min-height:48px;max-height:130px;resize:vertical}.coach-error{margin-top:9px;color:#ff9aa5}.coach-result{display:grid;gap:12px}.coach-result-card{padding:15px;border-radius:17px;background:rgba(5,19,31,.8);border:1px solid rgba(50,200,230,.18)}.coach-result-card h3{margin-top:0}.coach-factor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.coach-factor{padding:10px;border-radius:12px;background:rgba(148,163,184,.08)}
.coach-consent{position:fixed;inset:0;z-index:100100;display:grid;place-items:center;padding:18px;background:rgba(0,7,13,.88)}.coach-consent.hidden{display:none}.coach-consent-card{max-width:590px;padding:24px;border-radius:24px;background:#091827;border:1px solid rgba(50,200,230,.3);box-shadow:0 24px 70px rgba(0,0,0,.45)}.coach-consent-actions{display:flex;gap:10px;margin-top:18px}.coach-danger{margin-top:24px;border-color:rgba(255,100,115,.3)!important;color:#ffadb5!important}
.coach-floating{position:fixed;right:18px;bottom:104px;z-index:2147482900;display:flex;width:auto!important;min-width:54px;gap:7px;padding:11px 14px;border:1px solid rgba(154,241,26,.55);border-radius:999px;background:linear-gradient(135deg,#18351a,#083645);color:#eaffc8;box-shadow:0 14px 38px rgba(0,0,0,.5),0 0 24px rgba(154,241,26,.18)}.coach-floating.hidden{display:none!important}.coach-floating span{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#9af11a;color:#07130a;font-size:16px}.coach-floating b{font-size:12px;white-space:nowrap}
@media(max-width:780px){
  #coachAiTab{width:100%;min-width:0;padding:0 2px;margin:0;overflow:hidden}
  #coachAiTab *{min-width:0}
  .coach-shell{width:100%;padding:13px 11px 96px;border-radius:20px;overflow:hidden}
  .coach-hero{display:block;margin-bottom:13px}
  .coach-hero h2{font-size:30px}
  .coach-hero .section-subtitle{font-size:13px;overflow-wrap:anywhere}
  .coach-usage{display:block;width:100%;margin-top:9px;padding:8px 10px;white-space:normal;overflow-wrap:anywhere;font-size:12px;text-align:center}
  .coach-athlete{grid-template-columns:50px minmax(0,1fr);gap:10px;padding:11px;border-radius:16px}
  .coach-athlete img{width:50px;height:50px}
  .coach-athlete h3{font-size:15px;overflow-wrap:anywhere}
  .coach-intro{grid-template-columns:1fr;gap:6px;margin-top:9px}.coach-intro>div{padding:9px 10px}.coach-intro strong{font-size:12px}.coach-intro span{font-size:11px}
  .coach-note-card{padding:11px;align-items:flex-end}.coach-note-card strong{font-size:15px}.coach-note-card b{font-size:10px}
  .coach-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
  .coach-kpis span{padding:5px 7px;font-size:10px;overflow-wrap:anywhere}
  .coach-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:12px 0}
  .coach-action{width:100%;min-height:0;padding:11px 9px;border-radius:15px;align-items:flex-start;text-align:left}
  .coach-action strong{margin:5px 0 3px;font-size:13px;line-height:1.18;overflow-wrap:anywhere}
  .coach-action small{font-size:10px;line-height:1.25}
  .coach-history{margin-top:14px}.coach-history h3{font-size:16px}
  .coach-history-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;padding:10px;font-size:12px;overflow:hidden}
  .coach-history-item span,.coach-history-item strong,.coach-history-item small{min-width:0;overflow-wrap:anywhere}
  .coach-history-item time{font-size:10px;white-space:nowrap}
  .coach-chat-head{align-items:start}.coach-chat-head>div{min-width:0}.coach-chat-head h3{font-size:17px;overflow-wrap:anywhere}
  .coach-chat-head .secondary{width:auto;flex:0 0 auto;padding:8px 10px;font-size:11px}
  .coach-chat{width:100%;height:46vh;min-height:270px;padding:9px;border-radius:15px}
  .coach-message{max-width:92%;padding:9px 10px;font-size:13px;overflow-wrap:anywhere}
  .coach-quick{width:100%;gap:6px;padding:8px 0;-webkit-overflow-scrolling:touch}
  .coach-quick button{width:auto!important;min-width:max-content;min-height:36px;padding:7px 10px;white-space:nowrap;font-size:11px}
  .coach-factor-grid{grid-template-columns:1fr}.coach-factor,.coach-result-card{overflow:hidden;overflow-wrap:anywhere}
  .coach-result-card{padding:12px}.coach-result-card ul{padding-left:18px}
  .coach-composer{grid-template-columns:1fr}.coach-composer textarea{width:100%;font-size:16px}.coach-composer button{width:100%}
  .coach-consent{place-items:start center;padding:calc(env(safe-area-inset-top) + 14px) 12px calc(env(safe-area-inset-bottom) + 14px);overflow-y:auto}
  .coach-consent-card{width:100%;max-width:100%;max-height:none;padding:18px 15px;border-radius:20px;overflow-wrap:anywhere}
  .coach-consent-card h2{font-size:23px}.coach-consent-card p{font-size:13px;line-height:1.45}
  .coach-consent-actions{display:grid;grid-template-columns:1fr;gap:8px}
  .coach-floating{right:12px;bottom:calc(92px + env(safe-area-inset-bottom));min-width:48px;padding:9px 11px}.coach-floating span{width:25px;height:25px}.coach-floating b{font-size:11px}
}
@media(max-width:900px){.app-bottom-nav .coach-nav-desktop{display:none!important}}

/* Coach IA v7: hierarquia de conversa compacta */
.coach-hero{align-items:center;margin-bottom:10px}.coach-hero h2{font-size:clamp(28px,4vw,42px)}
.coach-history-link{width:auto;min-height:36px;padding:7px 10px;border:0;background:transparent;color:#b9cad8;font-size:12px;gap:5px}
.coach-plan-usage{display:grid;grid-template-columns:auto minmax(120px,1fr);align-items:center;gap:14px;margin:0 0 14px;padding:10px 12px;border-radius:15px;background:rgba(9,28,39,.72);border:1px solid rgba(154,241,26,.2)}
.coach-plan-usage small,.coach-plan-usage strong{display:block}.coach-plan-usage small{color:#9af11a;font-size:10px;text-transform:uppercase;letter-spacing:.1em}.coach-plan-usage strong{margin-top:2px;font-size:13px}.coach-progress{height:7px;border-radius:999px;background:rgba(148,163,184,.15);overflow:hidden}.coach-progress i{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#9af11a,#32c8e6);transition:width .25s ease}
.coach-chat-head{padding-bottom:9px;border-bottom:1px solid rgba(148,163,184,.1)}.coach-chat-title{display:flex;align-items:center;gap:9px}.coach-chat-title>span{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:rgba(154,241,26,.1);font-size:18px}.coach-chat-title .eyebrow{margin-bottom:2px;font-size:9px}.coach-chat-head #coachNew{width:auto;min-height:36px;padding:7px 10px;border-radius:12px;font-size:11px;gap:4px}
.coach-chat{height:auto;min-height:180px;max-height:none;overflow:visible;padding:3px 0 6px;border:0;background:transparent}
.coach-ai-entry{margin:13px 0}.coach-ai-identity{display:flex;align-items:center;gap:7px;margin-bottom:6px;color:#dce9f2}.coach-ai-identity>span{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:linear-gradient(135deg,#9af11a,#32c8e6);color:#04110e;font-weight:900}.coach-ai-identity b{font-size:12px}.coach-ai-identity small{color:#7f93a4;font-size:10px}.coach-ai-entry.loading{opacity:.78}
.coach-message.assistant{max-width:min(680px,94%);margin:0;padding:14px;border-color:rgba(56,189,248,.14);background:linear-gradient(145deg,rgba(14,39,54,.84),rgba(8,25,38,.84))}.coach-message.user{max-width:82%;margin:10px 0 10px auto;padding:10px 13px;font-size:13px}
.coach-summary>strong{display:block;margin-bottom:6px;color:#9af11a;font-size:10px;text-transform:uppercase;letter-spacing:.12em}.coach-summary p{margin:0 0 8px;white-space:pre-wrap}.coach-focus{margin-top:10px;padding:10px 11px;border-left:3px solid #9af11a;border-radius:10px;background:rgba(154,241,26,.07)}.coach-focus small,.coach-focus b{display:block}.coach-focus small{color:#9af11a;font-size:9px;text-transform:uppercase;letter-spacing:.12em}.coach-focus b{margin-top:3px;font-size:12px;line-height:1.35}.coach-details{margin-top:9px;border-top:1px solid rgba(148,163,184,.12);padding-top:8px}.coach-details summary{cursor:pointer;color:#8fdcf0;font-size:11px;font-weight:800}.coach-details div{margin-top:8px;color:#aebdca;font-size:11px}.coach-details p{margin:5px 0}
.coach-quick-label{margin:8px 0 1px;color:#c8d6e1;font-size:12px;font-weight:800}.coach-quick{scrollbar-width:none}.coach-quick::-webkit-scrollbar{display:none}.coach-quick button.selected{background:rgba(154,241,26,.2);border-color:#9af11a;color:#fff;box-shadow:0 0 0 2px rgba(154,241,26,.08)}
.coach-composer{display:grid;grid-template-columns:minmax(0,1fr) 46px;align-items:end;gap:7px;margin-top:4px;padding:6px;border:1px solid rgba(56,189,248,.18);border-radius:16px;background:#071725}.coach-composer textarea{width:100%;min-height:42px;max-height:112px;padding:10px 9px;border:0!important;border-radius:11px;background:transparent!important;color:#eef7ff;resize:none;box-shadow:none!important;line-height:1.35}.coach-composer button{width:44px!important;min-width:44px;height:44px;min-height:44px;padding:0;border-radius:13px;font-size:22px}.coach-composer textarea:disabled{opacity:.65}.coach-complete{width:100%;min-height:40px;margin-top:9px;border-color:rgba(56,189,248,.17)!important;background:rgba(56,189,248,.07)!important;font-size:12px}.coach-complete:disabled{opacity:.45;cursor:not-allowed}.coach-complete-hint{display:block;margin:5px 2px 0;color:#768b9c;font-size:10px}.coach-back-home{margin-top:6px;min-height:36px;font-size:11px;border:0}.coach-status{font-size:12px}
@media(max-width:780px){
  .coach-shell{padding:12px 10px calc(104px + env(safe-area-inset-bottom))}
  .coach-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.coach-hero h2{font-size:28px}.coach-history-link{width:auto!important;padding:6px 4px}
  .coach-plan-usage{grid-template-columns:1fr;padding:9px 10px;gap:7px}
  .coach-chat-head{align-items:center}.coach-chat-head #coachNew b{display:inline}.coach-chat-title>span{width:32px;height:32px}.coach-chat{height:auto;min-height:150px;overflow:visible;padding-inline:0}
  .coach-message.assistant{max-width:96%;padding:12px;font-size:13px}.coach-message.user{max-width:88%}
  .coach-quick{margin-right:-10px;padding-right:10px;overflow-x:auto;overscroll-behavior-x:contain}.coach-quick button{min-width:max-content!important}
  .coach-composer{grid-template-columns:minmax(0,1fr) 44px}.coach-composer button{width:42px!important}.coach-composer textarea{font-size:16px!important}
}
@media(max-width:350px){.coach-chat-head #coachNew b{display:none}.coach-chat-head #coachNew{width:36px!important;padding:0}.coach-history-link{font-size:0}.coach-history-link span{font-size:17px}}
