@import url("./crew-chat-mentions.css?v=20260912-chat1");
@import url("./crew-chat-members.css?v=20260912-crew1");
.crew-chat { --cc-ink: #193341; --cc-muted: #647982; --cc-line: #dce6e9; --cc-accent: #087f8e; display: flex; flex-direction: column; width: 100%; height: var(--cc-height, 75dvh); min-height: 360px; color: var(--cc-ink); background: #fff; font: 15px/1.5 Arial, sans-serif; letter-spacing: 0; isolation: isolate; }
.crew-chat *, .crew-chat *::before, .crew-chat *::after { box-sizing: border-box; letter-spacing: 0; }
.crew-chat [hidden] { display: none !important; }
.crew-chat button, .crew-chat input, .crew-chat select, .crew-chat textarea { font: inherit; letter-spacing: 0; }
.crew-chat button { cursor: pointer; box-shadow: none; text-transform: none; }
.crew-chat button:disabled { cursor: wait; opacity: .6; }
.crew-chat :focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 3px; }
.cc-icon { width: 20px; height: 20px; display: inline-flex; flex: 0 0 20px; }
.cc-icon svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cc-header { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; padding: 16px 24px; border-bottom: 1px solid var(--cc-line); }
.cc-heading { min-width: 0; margin-right: auto; }
.cc-heading h2 { font-size: 23px; line-height: 1.2; margin: 0; }
.cc-heading p { margin: 4px 0 0; font-size: 13px; color: var(--cc-muted); overflow-wrap: anywhere; }
.cc-plan { font-size: 10px; font-weight: 700; color: var(--cc-accent); white-space: nowrap; }
.crew-chat .cc-members-toggle { display:flex; align-items:center; gap:10px; flex:0 0 auto; min-height:44px; padding:4px 8px; border:1px solid transparent; border-radius:6px; background:transparent; color:var(--cc-ink); font-size:13px; white-space:nowrap; transform:none; }
.crew-chat .cc-members-toggle:hover,.crew-chat .cc-members-toggle:focus-visible { background:#edf6f7; color:var(--cc-ink); border-color:#c4e3e7; }
.cc-avatar-stack { display:flex; padding-left:8px; }
.crew-chat .cc-avatar-stack .cc-avatar { width:32px; height:32px; flex-basis:32px; margin-left:-8px; border:2px solid white; font-size:10px; }
.crew-chat .cc-avatar { position:relative; overflow:hidden; }
.crew-chat .cc-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; border-radius:50%; }
.crew-chat .cc-members-dialog { position:fixed; inset:20px 20px 20px auto; width:360px; max-width:calc(100vw - 40px); height:calc(100dvh - 40px); max-height:none; margin:0; padding:0; border:1px solid var(--cc-line); border-radius:8px; background:#fff; color:var(--cc-ink); box-shadow:0 12px 44px #19334126; overflow:hidden; }
.cc-members-dialog[open] { display:flex; flex-direction:column; }
.cc-members-dialog::backdrop { background:#19334133; }
.cc-members-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px; border-bottom:1px solid var(--cc-line); flex:0 0 auto; }
.cc-members-dialog h3 { font-size:20px; line-height:1.3; margin:0; }
.cc-members-dialog header p { margin:4px 0 0; color:var(--cc-muted); font-size:13px; overflow-wrap:anywhere; }
.cc-members-context { margin:0; padding:14px 20px; font-size:13px; color:var(--cc-muted); flex:0 0 auto; }
.cc-members-list { padding:0 20px 24px; overflow:auto; min-height:0; }
.cc-members-list ul { list-style:none; padding:0; margin:0; }
.cc-members-list li { display:flex; gap:12px; align-items:center; padding:16px 0; border-bottom:1px solid var(--cc-line); }
.crew-chat .cc-members-list .cc-avatar { width:44px; height:44px; flex:0 0 44px; }
.cc-members-list li > div { min-width:0; overflow-wrap:anywhere; }
.cc-members-list strong { font-size:14px; }
.cc-members-list li p { margin:2px 0 0; font-size:13px; color:var(--cc-muted); }
.cc-member-you { font-weight:400; color:var(--cc-muted); }
.crew-chat .cc-members-retry { min-height:44px; padding:8px 16px; border:1px solid #bdd7dc; border-radius:6px; background:#edf6f7; color:var(--cc-accent); }
.cc-icon-button { display: inline-flex; justify-content: center; align-items: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 10px; border: 1px solid transparent; border-radius: 6px; color: var(--cc-ink); background: transparent; }
.cc-icon-button:hover { background: #edf6f7; border-color: #c4e3e7; }
.cc-search { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 24px; border-bottom: 1px solid var(--cc-line); }
.cc-search label { font-size: 12px; }
.cc-search input { flex: 1; min-width: 100px; width: 160px; border: 1px solid var(--cc-line); padding: 8px; border-radius: 6px; }
.cc-search button[type=submit] { border: 1px solid #bdd7dc; border-radius: 6px; background: #edf6f7; color: var(--cc-accent); min-height: 40px; padding: 6px 14px; }
.cc-pinned { display: flex; flex: 0 0 auto; align-items: flex-start; gap: 12px; padding: 12px 24px; background: #edf8f4; border-bottom: 1px solid #cfe5dc; border-left: 3px solid #16816d; }
.cc-pinned > .cc-icon { margin-top: 3px; color: var(--cc-accent); }
.cc-note-content{min-width:0;flex:1}
.cc-note-label{display:block;color:#286958;font-size:12px}
.cc-note-preview{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin:3px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45}
.crew-chat .cc-note-read{display:block;min-height:24px;padding:0;margin-top:3px;border:0;background:transparent;color:#086b77;font-size:13px;text-decoration:underline;text-underline-offset:3px}
.cc-pinned .cc-icon-button { margin: -6px 0; }
:is(.cc-note-dialog,.cc-order-dialog){width:min(640px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--cc-line);border-radius:8px;color:var(--cc-ink);background:#fff}
:is(.cc-note-dialog,.cc-order-dialog)[open]{display:flex;flex-direction:column}
:is(.cc-note-dialog,.cc-order-dialog)::backdrop{background:#102c3a66}
:is(.cc-note-dialog,.cc-order-dialog)>header{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--cc-line)}
:is(.cc-note-dialog,.cc-order-dialog) h3{margin:0;font-size:18px}
.cc-note-full{min-height:0;overflow:auto;padding:0 20px 20px;white-space:pre-wrap;overflow-wrap:anywhere}
.cc-note-author{color:var(--cc-muted);font-size:13px}
.cc-feedback { padding: 8px 24px; color: #24755a; background: #f0f9f4; font-size: 13px; flex: 0 0 auto; }
.cc-feedback:empty { display: none; }
.cc-feedback.cc-error { background: #fff5f1; color: #9b3f28; }
.cc-feed { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px 24px 24px; scrollbar-gutter: stable; }
.cc-message { display: flex; gap: 14px; padding: 15px 0; margin: 0 auto; max-width: 1080px; }
.cc-avatar { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: #dfeff5; color: #25596f; font-size: 13px; font-weight: 700; }
.cc-message:nth-of-type(3n + 2) .cc-avatar { background: #e2f1e7; color: #296f50; }
.cc-message:nth-of-type(3n) .cc-avatar { background: #f5ecd9; color: #796130; }
.cc-message-content { min-width: 0; flex: 1; }
.cc-byline { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-height: 25px; }
.cc-byline strong { font-size: 14px; overflow-wrap: anywhere; }
.cc-byline time { font-size: 12px; color: var(--cc-muted); }
.cc-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 3px 0 10px; }
.cc-body:empty { display: none; }
.cc-deleted { color: var(--cc-muted); font-style: italic; }
.cc-menu { position: relative; margin-left: auto; }
.cc-menu summary { list-style: none; display: grid; place-items: center; width: 44px; height: 32px; font-weight: 700; cursor: pointer; border-radius: 6px; }
.cc-menu summary::-webkit-details-marker { display: none; }
.cc-menu[open] summary, .cc-menu summary:hover { background: #edf6f7; }
.cc-menu > div { position: absolute; top: 34px; right: 0; z-index: 4; width: 190px; background: #fff; border: 1px solid var(--cc-line); border-radius: 6px; box-shadow: 0 4px 12px #18344018; padding: 4px; }
.cc-menu button { display: block; width: 100%; min-height: 44px; padding: 10px; text-align: left; border: 0; background: #fff; border-radius: 4px; }
.cc-menu button:hover { background: #f2f7f8; }
.cc-menu button[data-chat-action=delete] { color: #a83e35; }
.cc-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-photos a { display: block; width: min(100%, 380px); margin: 0 0 8px; }
.cc-photos img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; max-height: 300px; object-fit: contain; border-radius: 6px; background: #f3f6f7; border: 1px solid var(--cc-line); }
.cc-work-link { display: flex; align-items: center; gap: 12px; width: min(100%, 460px); padding: 12px; border: 1px solid #c9dde3; border-radius: 6px; color: var(--cc-ink); background: #fafcfd; text-align: left; }
.cc-work-link strong { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.cc-work-link > span:not(.cc-icon) { font-size: 12px; color: #376b58; }
.cc-unread-line { display: flex; align-items: center; gap: 14px; color: var(--cc-accent); font-size: 12px; margin: 12px 0; }
.cc-unread-line::before, .cc-unread-line::after { content: ''; flex: 1; height: 1px; background: #d4e8ec; }
.cc-empty { text-align: center; color: var(--cc-muted); padding: 48px 10px; }
.cc-empty > .cc-icon { width: 36px; height: 36px; color: var(--cc-accent); }
.cc-empty h3 { color: var(--cc-ink); font-size: 19px; margin: 12px 0 6px; }
.cc-empty p { margin: 0; }
.cc-older, .cc-new { display: block; margin: 0 auto 12px; border: 1px solid #c5dfe3; border-radius: 6px; padding: 8px 16px; background: #f0f8f9; color: var(--cc-accent); }
.cc-new { margin: 4px auto; }
.cc-composer { flex: 0 0 auto; padding: 14px 24px; border-top: 1px solid var(--cc-line); background: #fff; }
.cc-composer textarea { display: block; width: 100%; min-height: 62px; max-height: 130px; resize: vertical; padding: 10px 12px; border: 1px solid #cddde1; border-radius: 6px; background: #fbfcfd; color: var(--cc-ink); font-size: 16px; }
.cc-composer textarea::placeholder { color: #6c838d; opacity: 1; }
.cc-compose-tools { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cc-compose-tools > div { display: flex; gap: 2px; }
.crew-chat .cc-send { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; background: var(--cc-accent); color: #fff; border: 0; border-radius: 6px; margin-left: auto; opacity: 1; transform: none; }
.crew-chat .cc-send:hover:not(:disabled), .crew-chat .cc-send:focus-visible { background: #066b78; color: #fff; }
.crew-chat .cc-send:active:not(:disabled) { background: #055765; color: #fff; }
.crew-chat .cc-send:disabled { background: #49666e; color: #fff; opacity: 1; }
.cc-send-state { color: var(--cc-muted); font-size: 12px; }
.cc-pending { display: flex; gap: 10px; flex-wrap: wrap; }
.cc-pending > div { position: relative; width: 72px; margin: 4px 8px 10px 0; }
.cc-pending img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; }
.cc-pending button { position: absolute; top: -6px; right: -14px; width: 32px; height: 32px; min-height: 32px; background: #fff; border: 1px solid var(--cc-line); padding: 5px; }
.cc-order-form { display: grid; gap: 12px; padding: 16px; min-height: 0; overflow: auto; }
.cc-order-form label { font-size: 13px; }
.crew-chat .cc-order-history { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.crew-chat .cc-order-history input { width: 18px; height: 18px; min-height: 18px; padding: 0; margin: 0; flex: 0 0 auto; accent-color: var(--cc-accent); }
.cc-order-count, .cc-order-empty { margin: 0; color: var(--cc-muted); font-size: 13px; }
.cc-order-context { display: grid; gap: 4px; border-top: 1px solid var(--cc-line); padding-top: 12px; overflow-wrap: anywhere; }
.cc-order-context span { font-size: 13px; color: var(--cc-muted); }
.crew-chat .cc-order-context[hidden], .crew-chat .cc-order-empty[hidden] { display: none; }
.cc-order-form select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--cc-line); border-radius: 6px; padding: 8px; color: var(--cc-ink); background: #fff; }
.cc-linked-order { display: flex; align-items: center; gap: 8px; padding: 0 0 8px; }
.cc-linked-order > span { flex: 1; min-width: 0; font-size: 13px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.cc-nav-unread { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 12px; background: #0a8696; color: #fff; font-size: 11px; margin-left: auto; }
[data-view-panel="crew-chat"].panel { padding: 0; border-radius: 0; box-shadow: none; border: 0; }
@media (max-width: 760px) {
  .crew-chat { position: fixed; inset: 0; top: var(--cc-top, 0px); z-index: 120; }
  [data-view-panel="crew-chat"].active { position: fixed !important; inset: 0; top: var(--cc-top, 0px); z-index: 120; width: 100%; padding: 0 !important; margin: 0 !important; overflow: hidden; }
  .crew-chat { min-height: 0; height: var(--cc-height, 100dvh); }
  .cc-header { padding: calc(8px + env(safe-area-inset-top)) 10px 8px; gap: 6px; }
  .cc-header { display:grid; grid-template-columns:44px minmax(0,1fr) 44px 44px; }
  .crew-chat .cc-members-toggle { grid-row:2; grid-column:2 / 5; justify-self:start; min-height:36px; padding:0; gap:8px; }
  .crew-chat .cc-avatar-stack .cc-avatar { width:26px; height:26px; flex-basis:26px; }
  .crew-chat .cc-members-dialog { inset:var(--cc-top,0px) 0 auto; width:100%; max-width:100%; height:var(--cc-height,100dvh); border:0; border-radius:0; padding-top:env(safe-area-inset-top); padding-bottom:env(safe-area-inset-bottom); }
  .cc-members-dialog > header { padding:12px 16px; }
  .cc-heading h2 { font-size: 20px; }
  .cc-heading p { font-size: 12px; }
  .cc-plan { display: none; }
  .cc-feed { padding: 10px 14px 16px; }
  .cc-message { gap: 9px; padding: 12px 0; }
  .cc-avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: 11px; }
  .cc-byline { gap: 3px 7px; }
  .cc-byline time { font-size: 11px; }
  .cc-body { font-size: 15px; }
  .cc-pinned { padding: 10px 14px; font-size: 13px; }
  .cc-search { padding: 8px 14px; }
  .cc-search label { width: 100%; }
  .cc-search input { font-size: 16px; }
  .cc-feedback { padding: 8px 14px; font-size: 12px; }
  .cc-composer { padding: 10px 12px calc(8px + env(safe-area-inset-bottom)); }
  .cc-composer textarea { min-height: 54px; max-height: 86px; }
  .cc-send { padding: 8px 12px; }
  .cc-pending img { width: 54px; height: 54px; }
  .cc-pending > div { width: 54px; }
  .cc-order-form select { font-size: 16px; }
  .cc-work-link { gap: 7px; padding: 9px; }
  .cc-work-link > span:not(.cc-icon) { max-width: 76px; }
  .crew-chat.cc-compact .cc-header { padding-top: max(4px, env(safe-area-inset-top)); padding-bottom: 4px; }
  .crew-chat.cc-compact .cc-header { grid-template-columns:44px minmax(0,1fr) 48px 44px 44px; }
  .crew-chat.cc-compact .cc-members-toggle { grid-row:1; grid-column:3; font-size:11px; line-height:1.2; white-space:normal; text-align:center; padding:4px; }
  .crew-chat.cc-compact .cc-avatar-stack { display:none; }
  .crew-chat.cc-compact .cc-heading p { display: none; }
  .crew-chat.cc-compact .cc-search { padding: 4px 12px; flex: 0 0 auto; }
  .crew-chat.cc-compact .cc-search label { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .crew-chat.cc-compact .cc-pinned { padding-top: 4px; padding-bottom: 4px; }
  .crew-chat.cc-compact .cc-note-preview { -webkit-line-clamp: 1; }
  .crew-chat.cc-compact .cc-feedback { max-height: 42px; overflow: auto; padding-top: 4px; padding-bottom: 4px; }
  .crew-chat.cc-compact .cc-composer { padding-top: 4px; padding-bottom: max(4px, env(safe-area-inset-bottom)); }
  .crew-chat.cc-compact .cc-composer textarea { height: 48px; min-height: 48px; max-height: 48px; }
  .crew-chat.cc-compact .cc-pending { flex-wrap: nowrap; }
  .crew-chat.cc-compact .cc-pending img { width: 36px; height: 36px; }
  .crew-chat.cc-compact .cc-pending > div { width: 36px; margin-bottom: 4px; }
  .crew-chat.cc-compact .cc-linked-order { padding-bottom: 4px; }
}
