.team-launch{position:relative;display:inline-grid;place-items:center;width:44px;height:44px;border:1px solid var(--line,#274346);border-radius:14px;background:transparent;color:var(--text,#edf6f5);cursor:pointer}.team-envelope{font-size:25px;line-height:1}.team-badge{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:12px;background:#b83b4a;color:white;font:700 11px/1 system-ui}.team-badge[hidden]{display:none}.team-launch .team-badge{position:absolute;right:-5px;top:-5px}.auth-required .team-launch,.auth-pending .team-launch{display:none}
.team-chat{--team-bg:#101f22;--team-surface:#172b2e;--team-border:#294447;--team-text:#edf4f3;--team-muted:#9db3b4;box-sizing:border-box;width:min(1080px,96vw);height:min(800px,92dvh);max-height:92dvh;padding:0;border:1px solid var(--team-border);border-radius:24px;background:var(--team-bg);color:var(--team-text);overflow:hidden}.team-chat[open]{display:flex;flex-direction:column}.team-chat::backdrop{background:#021012ab;backdrop-filter:blur(5px)}.team-chat *{box-sizing:border-box}.team-chat button{border:1px solid var(--team-border);border-radius:12px;padding:10px 14px;background:transparent;color:var(--team-text);font:inherit;cursor:pointer;min-height:42px;margin:0}.team-chat button:hover{background:var(--team-surface)}.team-chat button:disabled{opacity:.5;cursor:wait}.team-chat :focus-visible,.team-launch:focus-visible{outline:3px solid #83cdc8;outline-offset:3px}.team-chat .team-primary{background:#63b1ad;color:#071d20;font-weight:700;border-color:transparent}.team-head{display:flex;align-items:center;gap:12px;padding:18px 22px;border-bottom:1px solid var(--team-border)}.team-head h2{font-size:20px;flex:1;margin:0}.team-error{font-size:13px;color:#f2b9b2;margin:0 20px}.team-error:empty{display:none}.team-layout{display:grid;grid-template-columns:300px minmax(0,1fr);flex:1;min-height:0}.team-inbox{overflow:auto;border-right:1px solid var(--team-border);padding:10px}.team-thread{display:grid!important;grid-template-columns:40px minmax(0,1fr) 22px;gap:5px 10px;text-align:left;width:100%;margin-bottom:7px!important;border:0!important;padding:12px!important}.team-thread strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.team-thread small{grid-column:2;color:var(--team-muted);font-size:12px}.team-thread .team-avatar{grid-row:1/3}.team-thread .team-badge{grid-column:3;grid-row:1/3;align-self:center}.team-thread.selected{background:var(--team-surface)}.team-avatar{display:grid;place-items:center;width:40px;height:40px;background:#326c6b;color:#fff;border-radius:50%;font-size:13px}.team-conversation{overflow:auto;padding:18px 22px;min-width:0}.team-thread-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0}.team-thread-head h3{font-size:19px;flex:1;margin:0;min-width:160px;overflow-wrap:anywhere}.team-state{font-size:12px;padding:6px 10px;border:1px solid var(--team-border);border-radius:20px}.team-help,.team-empty{color:var(--team-muted);font-size:13px;line-height:1.5}.team-empty{padding:24px}.team-log{display:flex;flex-direction:column;gap:12px;padding:12px 0;max-height:340px;overflow:auto}.team-bubble{max-width:88%;align-self:flex-start;padding:12px 16px;background:var(--team-surface);border-radius:16px 16px 16px 4px;overflow-wrap:anywhere}.team-bubble.is-own{align-self:flex-end;background:#214440;border-radius:16px 16px 4px 16px}.team-bubble strong{font-size:12px;color:var(--team-muted)}.team-bubble p{white-space:pre-wrap;margin:6px 0;line-height:1.5;font-size:14px}.team-bubble small{font-size:10px;color:var(--team-muted);display:block}.team-file{display:block;color:var(--team-text);font-size:13px;margin-top:8px}.team-image{display:block;max-width:100%;max-height:220px;border-radius:10px;margin-bottom:6px}.team-task-actions{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.team-chat textarea,.team-chat input,.team-chat select{font:inherit;min-width:0;width:100%;color:var(--team-text);background:var(--team-surface);border:1px solid var(--team-border);border-radius:10px;padding:12px}.team-chat textarea{min-height:80px;resize:vertical}.team-compose-reply{display:flex;gap:8px;flex-wrap:wrap;padding-top:18px;border-top:1px solid var(--team-border);margin-top:18px}.team-compose-reply textarea,.team-compose-reply small{flex-basis:100%}.team-compose-reply input[hidden]{display:none}.team-compose-reply .team-primary{margin-left:auto}.team-lira{border-left:3px solid #63b1ad;padding:6px 0 6px 16px;margin:18px 0}.team-lira[hidden]{display:none}.team-lira h4{margin:10px 0;font-size:15px}.team-lira-text{white-space:pre-wrap;font-size:14px;line-height:1.6}.team-lira button{margin:8px 8px 0 0}.team-new{display:grid;gap:14px}.team-new label{display:grid;gap:6px;font-size:13px}.team-new h3{margin:0}.team-chat .lira-admin{font-size:13px;overflow-wrap:anywhere}
[data-theme=light] .team-chat{--team-bg:#f6faf9;--team-surface:#e9f1ef;--team-border:#cbdcd7;--team-text:#153330;--team-muted:#53716b}[data-theme=light] .team-bubble.is-own{background:#d1eae3}
@media(max-width:700px){.team-chat{width:100%;height:100dvh;max-height:100dvh;max-width:100%;border-radius:0}.team-head{padding:14px 12px;gap:6px}.team-head h2{font-size:17px}.team-head button{padding:8px;font-size:13px}.team-layout{display:block;overflow:hidden}.team-inbox{height:100%;border:0}.team-conversation{display:none;height:100%;padding:14px}.team-detail-open .team-inbox{display:none}.team-detail-open .team-conversation{display:block}.team-bubble{max-width:94%}.team-task-actions button{font-size:13px;padding:9px}.team-launch{width:38px;height:38px}}
.oa-card-remove,.oa-remove-proposal{font-size:13px!important;opacity:.78}.oa-card-remove:hover,.oa-remove-proposal:hover{opacity:1}

.auth-required .team-chat,.auth-pending .team-chat{display:none!important}

.team-chat .team-primary:hover{background:#7bc6c0;color:#071d20}.team-chat .team-primary:disabled{background:#63b1ad;color:#071d20}

.team-chat button:not(.team-thread){display:inline-flex;align-items:center;justify-content:center;text-align:center}

.team-contacts-title{font-size:15px;margin:16px 8px 10px}.team-contact-search{margin:0 0 12px}.team-chat .team-contacts-back{width:100%}.team-head{flex-wrap:wrap}.team-head h2{min-width:120px}.team-contact strong{white-space:normal;overflow-wrap:anywhere}

/* Authorship stays explicit even without colour perception. */
.team-bubble{max-width:82%;flex-shrink:0;background:#203347;border:1px solid #37516b;margin-right:12%;color:#f0f5fa}.team-bubble.is-own{background:#194d44;border-color:#367469;margin-left:12%;margin-right:0}.team-bubble strong,.team-bubble small{color:#c0d3dd}.team-bubble.is-own strong,.team-bubble.is-own small{color:#bdded3}.team-bubble.is-event{align-self:center;margin:0;max-width:92%;background:transparent;border:1px dashed var(--team-border);border-radius:12px;text-align:center;color:var(--team-muted)}.team-bubble.is-event strong,.team-bubble.is-event small{color:var(--team-muted)}.team-self-note{display:grid;gap:5px;font-size:13px;line-height:1.5;padding:12px 16px;border-left:3px solid #63b1ad;background:var(--team-surface);border-radius:8px}.team-self-note span{color:var(--team-muted)}
[data-theme=light] .team-bubble{background:#e2edf9;border-color:#b5cbe3;color:#173249}[data-theme=light] .team-bubble.is-own{background:#d0ecdf;border-color:#9bc8b3;color:#153c2d}[data-theme=light] .team-bubble strong,[data-theme=light] .team-bubble small{color:#405b72}[data-theme=light] .team-bubble.is-own strong,[data-theme=light] .team-bubble.is-own small{color:#365f4c}[data-theme=light] .team-bubble.is-event{background:transparent;color:var(--team-muted);border-color:var(--team-border)}

/* The envelope itself is the button; no persistent frame. */
.team-launch{width:44px;height:44px;border:0!important;background:transparent!important;box-shadow:none!important;border-radius:8px;padding:0;flex-shrink:0;outline:none}.team-envelope{display:grid;place-items:center;width:32px;height:24px;line-height:1;color:var(--muted,#8ea8aa);transition:color .16s ease}.team-envelope svg{display:block;width:100%;height:100%}.team-launch .team-badge{right:-3px;top:-3px}.team-launch:focus-visible{outline:3px solid #83cdc8;outline-offset:2px}.team-launch:hover .team-envelope{color:var(--accent,#83cdc8)}
.team-thread-row{display:flex;align-items:center;gap:4px;min-width:0}.team-thread-row>.team-thread{flex:1;min-width:0}.team-chat .team-delete{display:inline-flex;align-items:center;justify-content:center;flex:none;width:38px;height:38px;padding:8px;border:0;background:transparent;color:var(--muted,#8ea8aa)}.team-delete svg{width:22px;height:22px}.team-chat .team-delete:hover:not(:disabled){color:var(--danger,#d99494);background:color-mix(in srgb,var(--danger,#d99494) 12%,transparent)}.team-delete:disabled{opacity:.35;cursor:not-allowed}.team-delete-dialog{width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box;padding:24px;border:1px solid var(--border,#294245);border-radius:20px;background:var(--panel,#112125);color:var(--text,#e4eeee)}.team-delete-dialog::backdrop{background:#0009}.team-delete-dialog h3{margin:0 0 12px}.team-delete-dialog strong{overflow-wrap:anywhere}.team-delete-dialog fieldset{border:0;padding:0;margin:16px 0}.team-delete-dialog legend{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}.team-delete-choice{display:flex;gap:12px;align-items:center;padding:12px 0}.team-delete-choice input{width:18px;height:18px;flex:none;accent-color:var(--accent,#64b6b3)}.team-delete-choice:has(input:disabled){opacity:.5}.team-delete-actions{display:flex;gap:12px;justify-content:flex-end;flex-wrap:wrap}.team-delete-actions button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 20px;border-radius:12px}.team-delete-confirm{background:color-mix(in srgb,#d99494 12%,var(--panel,#112125));color:var(--text,#e4eeee);border:1px solid #a96f6f}
.team-delete-actions button{font:inherit;font-weight:600;background:transparent;color:inherit;border:1px solid var(--border,#345053);cursor:pointer}.team-delete-actions button:focus-visible{outline:2px solid var(--accent,#68b9b5);outline-offset:3px}.team-delete-actions .team-delete-confirm{background:color-mix(in srgb,#d99494 12%,transparent);border-color:#a96f6f}.team-delete-actions button:disabled{opacity:.5;cursor:default}

.team-reassign-dialog label{display:flex;flex-direction:column;gap:8px;margin:18px 0}.team-reassign-dialog select{font:inherit;width:100%;min-height:46px;border:1px solid var(--border,#345053);border-radius:12px;padding:10px;background:var(--panel,#112125);color:inherit}.team-thread.is-new-task{box-shadow:inset 3px 0 var(--accent,#68b9b5)}

/* Direct card assignment: one review step, bounded on mobile and desktop. */
.team-assign-dialog{width:min(600px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
.team-assign-dialog form{display:grid;gap:14px}.team-assign-dialog label{display:grid;gap:6px}.team-assign-dialog :is(input,textarea,select){width:100%;min-width:0;box-sizing:border-box}.team-assign-dialog textarea{min-height:130px;resize:vertical}.team-assign-dialog button{text-align:center}.team-assign-dialog h3,.team-assign-dialog p{margin:0}

.team-assign-dialog :is(input,textarea,select){font:inherit;color:var(--text);background:var(--bg,#091517);border:1px solid var(--border,#294447);border-radius:12px;padding:11px 13px;min-height:44px}.team-assign-dialog .team-primary{background:var(--accent,#63b1ad);color:#071d20;border-color:transparent;font-weight:700}.team-assign-dialog .team-primary:hover{filter:brightness(1.08)}.team-assign-dialog button:disabled{opacity:.5;cursor:not-allowed}

.team-assign-dialog textarea{min-height:130px}

/* Result verification remains visible even on a compact card. */
.team-result-controls{display:grid;gap:6px;margin-top:10px;font-size:12px;line-height:1.45;min-width:0}
.team-result-controls p{margin:0;overflow-wrap:anywhere}.team-result-status{color:var(--accent,#63b3b0)}
.team-result-actions{display:flex;flex-wrap:wrap;gap:6px}.team-result-actions button{min-height:32px;padding:6px 10px;font-size:12px;display:inline-flex;align-items:center;justify-content:center;text-align:center}
.team-result-done{background:color-mix(in srgb,var(--accent,#63b3b0) 16%,transparent);color:inherit}
.team-result-check{color:var(--muted,#92aaaa)}.team-result-note textarea{width:100%;min-height:70px;margin-top:6px}
.oa-proposal-card.is-collapsed>.team-result-controls{display:grid}
@media(pointer:coarse){.team-result-actions button{min-height:40px}}

.team-attention{color:var(--warning,#d5ac67)}.team-attention-action{justify-self:start;background:transparent;border:0;padding:3px 0;font-size:11px;color:var(--muted,#92aaaa)}

.team-notification-settings{width:min(720px,calc(100vw - 24px));max-height:90dvh;overflow:auto}.team-notification-settings .panel{padding:16px}.team-notification-settings .tg-bot-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr));gap:12px}.team-notification-settings .tg-controls{display:flex;flex-wrap:wrap;gap:8px}.team-notification-settings form{display:grid;gap:12px}.team-notification-settings button{text-align:center}

.team-notification-head{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-20px;background:var(--surface,#102124);z-index:1;padding:12px 0}.team-notification-head h3{margin:0}.team-notification-head button{flex-shrink:0}.team-notification-settings .copy-status{font-weight:400;line-height:1.5}.team-notification-settings .panel p{font-size:14px;line-height:1.5}
