/* 1.2.7 company workspace. Uses the theme tokens (Fluid default and the five-element themes) with safe fallbacks. */
.cw-home { display: grid; gap: 14px; padding: 4px 0 12px; color: var(--ink, #18252b); }
.cw-home-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cw-home-head h3, .cw-company h3 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.cw-join { display: flex; gap: 8px; align-items: end; }
.cw-join label { display: grid; gap: 2px; font-size: 12px; color: var(--muted, #5b6b73); }
.cw-join input { width: 9.5em; text-transform: uppercase; letter-spacing: .12em; font: 600 14px/1.2 ui-monospace, monospace; }
.cw-company { border: 1px solid var(--line, #cdd6dc); border-radius: 12px; padding: 14px 16px; background: var(--surface, #fff); display: grid; gap: 8px; }
.cw-company-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cw-company-head > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cw-company h4 { margin: 6px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #5b6b73); }
.cw-role, .cw-badge, .cw-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent-soft, #e3f3f4); color: var(--accent, #087f8c); }
.cw-badge { background: color-mix(in srgb, #f0a300 22%, transparent); color: color-mix(in srgb, #b26a00 70%, var(--ink, #1b1b1b)); }
.cw-welcome { border-radius: 10px; padding: 12px 14px; background: var(--accent-soft, #e3f3f4); display: grid; gap: 6px; }
.cw-welcome p { margin: 0; }
.cw-welcome button { justify-self: start; }
.cw-announcements { display: grid; gap: 8px; }
.cw-announcement { border: 1px solid var(--line, #cdd6dc); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.cw-announcement header { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cw-announcement small, .cw-muted, .cw-space small { color: var(--muted, #5b6b73); }
.cw-announcement p { margin: 0; white-space: pre-wrap; }
.cw-needs-ack { border-color: var(--accent, #087f8c); box-shadow: inset 3px 0 0 var(--accent, #087f8c); }
.cw-acked { color: color-mix(in srgb, #1e9e4a 70%, var(--ink, #1b1b1b)); display: flex; gap: 6px; align-items: center; font-weight: 600; }
.cw-spaces { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cw-space { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line, #cdd6dc); min-height: var(--flow-control-min, 36px); }
.cw-empty { color: var(--muted, #5b6b73); }
.cw-error { color: color-mix(in srgb, #d93025 70%, var(--ink, #1b1b1b)); font-weight: 600; }
.cw-notice { color: color-mix(in srgb, #1e9e4a 70%, var(--ink, #1b1b1b)); font-weight: 600; }
.company-workspace-dialog { width: min(1100px, calc(100% - 24px)); max-height: calc(var(--app-viewport-height, 100dvh) - 24px); padding: 0; border: 1px solid var(--line, #cdd6dc); border-radius: 12px; background: linear-gradient(var(--surface, #fff), var(--surface, #fff)), var(--bg, #fff); color: var(--ink, #18252b); font: 14px/1.5 system-ui, sans-serif; }
.company-workspace-dialog[open] { display: flex; flex-direction: column; }
.company-workspace-dialog::backdrop { background: #15222a66; }
.company-workspace-dialog * { box-sizing: border-box; }
.cw-dialog-head { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line, #cdd6dc); }
.cw-dialog-head h2 { margin: 0; font-size: 19px; }
.cw-dialog-head p { margin: 0; }
.cw-tabs { flex: none; display: flex; gap: 2px; padding: 6px 14px 0; overflow-x: auto; border-bottom: 1px solid var(--line, #cdd6dc); }
.cw-tabs button { padding: 9px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: inherit; font: inherit; white-space: nowrap; }
.cw-tabs button[aria-selected="true"] { border-color: var(--accent, #087f8c); font-weight: 650; }
.cw-dialog-body { flex: 1 1 auto; padding: 14px 20px 20px; overflow: auto; min-height: 0; }
.cw-dialog-body h3 { font-size: 15px; margin: 16px 0 8px; }
.cw-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cw-table th, .cw-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line, #cdd6dc); vertical-align: top; }
.cw-table thead th { font-size: 12px; color: var(--muted, #5b6b73); font-weight: 600; }
.cw-status-invalid td { background: color-mix(in srgb, #d93025 12%, transparent); }
.cw-row-error { color: #a1261b; }
.cw-pill-invalid { background: color-mix(in srgb, #d93025 18%, transparent); color: color-mix(in srgb, #d93025 65%, var(--ink, #1b1b1b)); }
.cw-pill-pending, .cw-pill-already_member { background: #eef1f3; color: #3c4a51; }
.cw-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.cw-kpis > div { border: 1px solid var(--line, #cdd6dc); border-radius: 10px; padding: 10px 12px; display: grid; }
.cw-kpis strong { font-size: 22px; }
.cw-kpis span { color: var(--muted, #5b6b73); font-size: 12px; }
.cw-kpis .cw-bad strong { color: #a1261b; }
.cw-bar { display: inline-block; width: 90px; height: 8px; border-radius: 4px; background: var(--line, #cdd6dc); vertical-align: middle; overflow: hidden; }
.cw-bar span { display: block; height: 100%; background: var(--accent, #087f8c); }
.cw-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.cw-file { display: inline-flex; gap: 8px; align-items: center; padding: 10px 14px; border: 1px dashed var(--accent, #087f8c); border-radius: 10px; cursor: pointer; }
.cw-file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cw-share { display: flex; gap: 16px; align-items: center; border: 1px solid var(--line, #cdd6dc); border-radius: 12px; padding: 12px; margin: 12px 0; flex-wrap: wrap; }
.cw-share img { width: 168px; height: 168px; image-rendering: pixelated; background: #fff; border-radius: 6px; }
.cw-share p { margin: 0 0 4px; }
.cw-code { font: 700 26px/1.2 ui-monospace, monospace; letter-spacing: .18em; }
.cw-link-form, .cw-announce { display: grid; gap: 10px; max-width: 680px; }
.cw-link-form { grid-template-columns: repeat(auto-fit, minmax(180px, auto)); align-items: end; }
.cw-announce label { display: grid; gap: 4px; }
.cw-announce fieldset { border: 1px solid var(--line, #cdd6dc); border-radius: 10px; display: grid; gap: 6px; }
.cw-space-picks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cw-space-picks label, .cw-announce fieldset > label { display: inline-flex; gap: 6px; align-items: center; }
.cw-announce > label.cw-check { display: inline-flex; flex-flow: row nowrap; justify-content: flex-start; gap: 8px; align-items: center; justify-self: start; }
.cw-announce input[type="checkbox"], .cw-announce input[type="radio"] { width: auto; margin: 0; }
.cw-sample-banner { background: #fff1d6; color: #8a5300; font-weight: 700; padding: 6px 12px; border-radius: 8px; text-align: center; letter-spacing: .05em; }
@media (max-width: 640px) { .cw-table { font-size: 12px; } .cw-preview th:nth-child(n+6), .cw-preview td:nth-child(n+6):not(:last-child) { display: none; } .cw-share img { width: 140px; height: 140px; } }
.cw-company-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cw-company-icon { width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; overflow: hidden;
  background: var(--panel, #e8eef1); color: var(--accent, #087f8c); display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; flex: 0 0 auto; }
.cw-company-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cw-company-icon svg, .cw-company-icon ion-icon { width: 28px; height: 28px; }
.cw-dialog-head .cw-company-icon { width: 44px; height: 44px; }
