/* Акваріум угод на Головній: тільки на ноутбуці й ширше. */
.crm-aqua { display: grid; gap: 8px; margin: 0 0 16px; }
.crm-aqua-tank { position: relative; height: 228px; user-select: none; }
/* «Звичайний / За етапами» і висота (Mark, 2026-12-02). */
.crm-aqua-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 16px; margin-bottom: -2px; }
.crm-aqua-bar[hidden], .crm-aqua-stages[hidden] { display: none; }
.crm-aqua-seg button { min-height: 28px; padding: 0 12px; font-size: 12.5px; }
.crm-aqua-stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin-bottom: -4px; }
.crm-aqua-stage { display: grid; gap: 1px; min-width: 0; padding: 4px 8px 6px; border: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; background: none; color: var(--ink); cursor: pointer; font: inherit; text-align: center; }
.crm-aqua-stage b { overflow: hidden; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.crm-aqua-stage > span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-aqua-stage .n { color: var(--ink); font-weight: 800; }
.crm-aqua-stage .crm-aqua-sad { color: #9b1c1c; font-weight: 700; }
.crm-aqua-stage:hover, .crm-aqua-stage:focus-visible { border-bottom-color: #3ba898; background: #e6f1ef; outline: none; }
/* Перехід з акваріума на дошку угод: колонка етапу коротко підсвічується. */
.crm-col.crm-col-flash { box-shadow: 0 0 0 3px #3ba898; transition: box-shadow .6s; }
.crm-aqua-tank > canvas { position: absolute; left: 0; top: -48px; display: block; pointer-events: none; }
/* Тільки свій акваріум: малі акваріуми команди всередині лишаються видимими. */
.crm-aqua.is-collapsed > .crm-aqua-tank, .crm-aqua.is-teamonly > .crm-aqua-tank { display: none; }
.crm-aqua-tip { position: absolute; left: 0; top: 0; z-index: 3; display: grid; gap: 4px; width: max-content; max-width: 320px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: 0 10px 30px rgba(24, 60, 47, .18); color: var(--ink); font-size: 13px; line-height: 1.35; pointer-events: none; }
.crm-aqua-tip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.crm-aqua-tip b { font-size: 14.5px; font-weight: 800; }
.crm-aqua-tip em { color: var(--ink); font-style: normal; font-weight: 750; white-space: nowrap; }
.crm-aqua-who { color: var(--muted); font-size: 12.5px; }
.crm-aqua-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 2px 0; }
.crm-aqua-state { font-weight: 750; }
.crm-aqua-state.ok { color: #1f5c38; }
.crm-aqua-state.warn { color: #6f5300; }
.crm-aqua-state.bad { color: #9b1c1c; }
.crm-aqua-state.gold { color: #8a5a00; }
.crm-aqua-hint { margin-top: 2px; padding-top: 5px; border-top: 1px solid #eef0ea; color: var(--muted); font-size: 12px; }
.crm-aqua-banner { position: absolute; left: 50%; top: 12px; z-index: 2; max-width: calc(100% - 32px); padding: 6px 14px; border-radius: 99px; background: var(--forest); color: #fff; font-size: 13px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: translateX(-50%); box-shadow: 0 6px 18px rgba(24, 60, 47, .22); pointer-events: none; }
.crm-aqua-banner.gold { background: #f5c542; color: #3d2c00; }
.crm-aqua-banner.bad { background: #9b1c1c; }
.crm-aqua-over { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 253, 248, .72); }
.crm-aqua-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 28px; }
.crm-aqua-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-aqua-chip { padding: 3px 10px; border-radius: 99px; background: #e6f1ef; color: #1e4f4a; font-size: 12.5px; cursor: default; }
.crm-aqua-chip b { font-weight: 800; }
.crm-aqua-chip .muted { color: #5c7a76; }
.crm-aqua-chip.amber { background: #fdf1c7; color: #6f5300; }
.crm-aqua-chip.red { background: #fde2e2; color: #9b1c1c; }
.crm-aqua-chip.gold { background: #fbe7a1; color: #5c3f00; }
.crm-aqua-side { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.crm-aqua-toggle { padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.crm-aqua-toggle:hover { color: var(--forest); }
@media (max-width: 1100px) { .crm-aqua { display: none; } }
/* Малі акваріуми команди. */
.crm-aqua-side .crm-btn { white-space: nowrap; }
.crm-aqua-team { display: grid; gap: 12px; margin-top: 8px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.crm-aqua-team-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.crm-aqua-team-head h3 { margin: 0; color: var(--ink); font-size: 16px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.crm-aqua-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 16px; }
.crm-aqua-card { min-width: 0; }
.crm-aqua.is-mini { gap: 6px; margin: 0; }
.crm-aqua-name { display: flex; align-items: center; gap: 8px; min-height: 24px; font-size: 14px; }
.crm-aqua-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.crm-aqua.is-mini .crm-aqua-foot { min-height: 0; }
.crm-aqua.is-mini .crm-aqua-chip { padding: 2px 8px; font-size: 11.5px; }
.crm-aqua.is-mini .crm-aqua-tip { max-width: 260px; }
/* Вітрина декору: усі предмети, які можуть стояти в акваріумі. */
.crm-aqua-shop { display: grid; gap: 10px; margin-top: 8px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.crm-aqua-shop .crm-aqua-team-head span { max-width: 640px; }
/* Панелі під акваріумом згортаються помітною кнопкою: у шапці, а в довгій вітрині ще й унизу. */
.crm-aqua-chev { font-size: 11px; line-height: 1; }
.crm-aqua-team-head { align-items: center; }
.crm-aqua-team-head > span { flex: 1 1 320px; }
.crm-aqua-fold { flex: none; margin-left: auto; white-space: nowrap; }
.crm-aqua-end { display: flex; justify-content: center; padding-top: 4px; }
.crm-aqua-end .crm-aqua-fold { margin: 0; }
.crm-aqua-group { margin: 6px 0 0; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.crm-aqua-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.crm-aqua-item { position: relative; display: grid; gap: 3px; justify-items: stretch; align-content: start; padding: 4px 4px 5px; border: 1px solid var(--line); border-radius: 10px; background: #fbfaf4; color: var(--ink); cursor: pointer; font: inherit; text-align: center; }
.crm-aqua-item:hover, .crm-aqua-item:focus-visible { border-color: var(--forest); }
.crm-aqua-item.is-mine { box-shadow: inset 0 0 0 2px var(--forest-2); }
.crm-aqua-pic { position: relative; display: grid; place-items: center; height: 82px; overflow: hidden; border-radius: 7px; background: linear-gradient(#e8f6f3, #cfeae6); }
.crm-aqua-item canvas { width: 118px; height: 82px; }
.crm-aqua-tag { position: absolute; display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 99px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 11px; font-weight: 800; line-height: 16px; white-space: nowrap; box-shadow: 0 1px 3px rgba(24, 60, 47, .15); }
.crm-aqua-tag .crm-aqua-pearl { width: 9px; height: 9px; margin-right: 3px; }
.crm-aqua-tag.price { left: 3px; top: 3px; color: #3d2f6b; }
.crm-aqua-tag.price.is-short { color: #8a8f8c; }
.crm-aqua-tag.left { right: 3px; top: 3px; color: var(--muted); font-weight: 700; }
.crm-aqua-tag.left.is-last { color: #9a5b00; }
.crm-aqua-tag.left.is-out { color: #9b1c1c; }
.crm-aqua-tag.own { left: 3px; bottom: 3px; background: #dff1e6; color: #1f6b43; }
.crm-aqua-act { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); white-space: nowrap; opacity: 0; transition: opacity .12s; box-shadow: 0 3px 10px rgba(24, 60, 47, .25); }
.crm-aqua-item:hover .crm-aqua-act, .crm-aqua-item:focus-within .crm-aqua-act, .crm-aqua-act.is-on, .crm-aqua-act:focus-visible { opacity: 1; }
@media (hover: none) { .crm-aqua-act { opacity: 1; } }
.crm-aqua-item b { overflow: hidden; padding: 0 2px; font-size: 12px; font-weight: 750; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.crm-aqua-item i { position: absolute; left: 50%; top: 6px; max-width: calc(100% - 12px); padding: 2px 8px; border-radius: 99px; background: var(--paper); color: var(--ink); font-size: 11.5px; font-style: normal; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: translateX(-50%); box-shadow: 0 4px 12px rgba(24, 60, 47, .18); pointer-events: none; }
.crm-aqua-chip.green { background: #dff3e4; color: #1f5c38; }
/* Перлини й вітрина: гаманець, прайс роботи, ціни й залишки. */
.crm-aqua-pearl { display: inline-block; flex: none; width: 12px; height: 12px; margin-right: 5px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #ffffff 0 18%, #f3ecff 34%, #cfc3e8 70%, #a99bc9 100%); box-shadow: 0 0 0 1px rgba(110, 96, 150, .35); vertical-align: -1px; }
.crm-aqua-purse-btn { border-color: #b9aee0; background: #f4f0ff; color: #3d2f6b; }
.crm-aqua-purse-btn:hover, .crm-aqua-purse-btn:focus-visible { border-color: #8d7fc4; background: #ebe4ff; }
.crm-aqua-purse { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 10px; background: #f4f0ff; }
.crm-aqua-purse-sum { display: inline-flex; align-items: center; margin-right: 6px; color: #3d2f6b; font-size: 15px; }
.crm-aqua-purse-sum b { margin-right: 5px; font-size: 22px; font-weight: 800; line-height: 1; }
.crm-aqua-purse-sum .crm-aqua-pearl { width: 18px; height: 18px; margin-right: 8px; }
.crm-aqua-rules { border: 1px solid var(--line); border-radius: 10px; background: #fbfcfa; }
.crm-aqua-rules summary { padding: 8px 12px; color: var(--ink); font-size: 13px; font-weight: 750; cursor: pointer; }
.crm-aqua-rules table { width: 100%; border-collapse: collapse; font-size: 13px; }
.crm-aqua-rules th { padding: 4px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-align: left; text-transform: uppercase; }
.crm-aqua-rules td { padding: 5px 12px; border-top: 1px solid var(--line); vertical-align: baseline; }
.crm-aqua-rules td small { margin-left: 8px; color: var(--muted); font-size: 11.5px; }
.crm-aqua-rules th:nth-child(n+3), .crm-aqua-rules td:nth-child(n+3) { text-align: right; white-space: nowrap; }
.crm-aqua-rules td:nth-child(2) { white-space: nowrap; }
.crm-aqua-price { display: inline-flex; align-items: center; color: #3d2f6b; font-size: 13px; }
.crm-aqua-price b { font-weight: 800; }
.crm-aqua-terms { display: grid; gap: 1px; justify-items: center; font-size: 11.5px; line-height: 1.3; }
.crm-aqua-stock { color: var(--muted); }
.crm-aqua-stock.is-last { color: #9a5b00; font-weight: 700; }
.crm-aqua-stock.is-out { color: #9b1c1c; font-weight: 700; }
.crm-aqua-buyers { max-width: 100%; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-aqua-item.is-out canvas { opacity: .45; filter: grayscale(.6); }
.crm-aqua-shop-note { margin: 0; padding: 8px 12px; border-radius: 8px; background: #fde2e2; color: #9b1c1c; font-size: 13px; }
/* «Запит ↔ угода»: рибка-лоцман і бульбашка з лупою (Марк, 24.11, «9А»). */
.crm-aqua-chip.blue { background: #e1edf7; color: #1f3a5c; }
.crm-aqua-chip.ask { background: #fff; color: #183c2f; box-shadow: inset 0 0 0 1px #9fc7ae; }
.crm-aqua-lens { position: relative; display: inline-block; width: 9px; height: 9px; margin: 0 7px -1px 0; border: 2px solid currentColor; border-radius: 50%; box-sizing: border-box; }
.crm-aqua-lens::after { content: ""; position: absolute; right: -5px; bottom: -4px; width: 5px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.crm-aqua-who.crm-aqua-pal { color: #1f3a5c; font-weight: 700; }
.crm-aqua-who.crm-aqua-ask { color: #1f5c38; font-weight: 700; }
/* Рейтинг команди замість стіни акваріумів (Марк, 04.12). */
.crm-aqua-rank { width: 100%; border-collapse: collapse; font-size: 13px; margin: 4px 0 14px; }
.crm-aqua-rank th { text-align: left; font-weight: 600; color: var(--muted, #6b7a73); font-size: 12px; padding: 6px 10px; border-bottom: 1px solid var(--line, #e3e8e4); }
.crm-aqua-rank td { padding: 7px 10px; border-bottom: 1px solid var(--line, #eef1ee); vertical-align: middle; }
.crm-aqua-rank tr.is-me td { background: rgba(31, 92, 56, .06); }
.crm-aqua-rank tr.is-open td { background: rgba(31, 92, 56, .12); }
.crm-aqua-rank .crm-aqua-rank-n { width: 28px; color: var(--muted, #6b7a73); font-variant-numeric: tabular-nums; }
.crm-aqua-rank tbody tr:nth-child(-n+3) .crm-aqua-rank-n { color: #b8860b; font-weight: 700; }
.crm-aqua-grid.crm-aqua-one { grid-template-columns: minmax(0, 1fr); }
.crm-aqua-grid.crm-aqua-one:empty { display: none; }
/* Вітрина вкладками, без довгого скролу (Марк, 04.12). */
.crm-aqua-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 2px; }
.crm-aqua-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.crm-aqua-tab span { min-width: 18px; padding: 0 5px; border-radius: 9px; background: #eef1ec; color: var(--muted); font-size: 11px; text-align: center; }
.crm-aqua-tab:hover { border-color: var(--forest-2); }
.crm-aqua-tab.on { border-color: var(--forest); background: var(--forest); color: #fff; }
.crm-aqua-tab.on span { background: rgba(255, 255, 255, .22); color: #fff; }
.crm-aqua-shop .crm-aqua-items { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); min-height: 120px; align-content: start; }
/* «Своя іграшка» у вітрині (Марк, 04.12). */
.crm-aqua-chip.red { background: #fbe3df; color: #8a2a1c; }
.crm-aqua-toyimg { padding: 4px; }
.crm-aqua-toyimg img { max-width: 100%; max-height: 100%; object-fit: contain; }
.crm-aqua-order { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; min-height: 236px; align-items: start; }
.crm-aqua-order-form { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(#e8f6f3, #f7fbf9); }
.crm-aqua-order-form p { margin: 0; }
.crm-aqua-order-pick { display: grid; place-items: center; height: 150px; border: 2px dashed #9cc7bf; border-radius: 10px; background: #fff; color: var(--forest); font-weight: 700; cursor: pointer; overflow: hidden; }
.crm-aqua-order-pick:hover { border-color: var(--forest); }
.crm-aqua-order-pick img { display: block; width: 100%; height: 146px; object-fit: contain; }
.crm-aqua-order-form textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; resize: vertical; }
.crm-aqua-order-send { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crm-aqua-order-send .crm-btn { margin-left: auto; }
.crm-aqua-order-list h4 { margin: 0 0 8px; }
.crm-aqua-order-list ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.crm-aqua-order-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.crm-aqua-order-list li > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.crm-aqua-order-list li .crm-btn { grid-column: 2 / -1; justify-self: end; }
.crm-aqua-order-photo { width: 48px; height: 48px; border-radius: 8px; background: #eef1ec; overflow: hidden; }
.crm-aqua-order-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .crm-aqua-order { grid-template-columns: minmax(0, 1fr); } }
