:root {
  color-scheme: dark;
  --bg: #101112;
  --surface: #1b1d1f;
  --surface-raised: #272a2d;
  --text: #f5f5f2;
  --muted: #a7abae;
  --accent: #c8ee94;
  --accent-hover: #d8f7b1;
  --safe-top: 0px;
  --safe-bottom: 0px;
  --safe-left: 0px;
  --safe-right: 0px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-synthesis: none;
}
html {
  overflow-x: hidden;
  max-width: 100vw;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}
button, input, textarea, select { font: inherit; color: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; border: 0; }
button:disabled { opacity: .5; cursor: wait; }
a { color: inherit; text-decoration: none; }
input, textarea, select { border: 0; border-radius: 12px; background: var(--surface-raised); min-width: 0; }
input:not([type=checkbox]):not([type=radio]), textarea { width: 100%; padding: 13px 14px; font-size: 16px; }
input:not([type=checkbox]):not([type=radio]) { min-height: 48px; }
input[type=checkbox], input[type=radio] {
  appearance: auto;
  -webkit-appearance: auto;
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 5px !important;
  accent-color: var(--accent) !important;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
textarea { resize: vertical; line-height: 1.55; }
input::placeholder { color: var(--muted); opacity: 1; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.hidden { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.muted { color: var(--muted); }
.app-shell { max-width: 960px; margin: auto; padding: calc(12px + max(var(--safe-top), env(safe-area-inset-top))) max(20px, var(--safe-right), env(safe-area-inset-right)) calc(32px + max(var(--safe-bottom), env(safe-area-inset-bottom))) max(20px, var(--safe-left), env(safe-area-inset-left)); }
.app-header { display: flex; justify-content: space-between; align-items: center; min-height: 48px; margin-bottom: 23px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.brand-mark { background: var(--accent); color: #1b2611; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 23px; font-weight: 750; letter-spacing: -1px; line-height: 1; padding-bottom: 2px; }
.brand-separator { color: #747a7e; margin: 0 9px; font-weight: 400; }
.header-actions { display: flex; gap: 2px; }
.icon-button { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: transparent; color: var(--muted); flex-shrink: 0; }
.icon-button:hover { background: var(--surface-raised); color: var(--text); }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 34px; line-height: 1.12; letter-spacing: -1.2px; font-weight: 720; }
h2 { font-size: 24px; line-height: 1.25; letter-spacing: -.5px; font-weight: 650; }
h3 { font-size: 18px; font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 15px; border-radius: 12px; font-size: 15px; font-weight: 600; line-height: 1.4; white-space: nowrap; transition: background .15s, transform .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #1c2911; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface-raised); color: var(--text); }
.btn-secondary:hover { background: #33373a; }
.btn-danger { background: #3b2427; color: #ffb4b5; }
.btn-danger:hover { background: #4a2c30; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-raised); color: var(--text); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn-wide { width: 100%; min-height: 50px; margin-top: 24px; font-size: 16px; }
.pool-actions-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; margin-top: 10px; border-radius: 13px; background: #202426; border: 1px solid #2d3336; flex-wrap: wrap; min-width: 0; }
.pool-actions-info { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 550; color: #d0d5d8; min-width: 0; flex: 1 1 auto; }
.pool-actions-info .icon { width: 17px; height: 17px; color: var(--muted); flex-shrink: 0; }
.pool-actions-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-actions-buttons { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.feed-controls { margin-bottom: 12px; }
.search-field { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; padding: 0 4px 0 15px; color: var(--muted); margin-bottom: 18px; }
.search-field input { background: transparent; padding-left: 0; height: 50px; border-radius: 0; color: var(--text); }
.search-field:focus-within { background: var(--surface-raised); }
.search-field input:focus { outline: none; }
.scope-tabs { display: grid; grid-template-columns: 1fr 1fr 1.5fr; padding: 4px; gap: 4px; border-radius: 16px; background: var(--surface); }
.scope-tab { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 44px; padding: 9px 8px; border-radius: 12px; background: transparent; color: var(--muted); font-size: 16px; font-weight: 550; transition: background .15s, color .15s; }
.scope-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.scope-tab:hover { background: #25292a; color: var(--text); }
.scope-tab.active { background: #30382c; color: #e2f4cd; }
.tab-count { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; color: #a5abae; flex-shrink: 0; }
.scope-tab.active .tab-count { color: var(--accent); }
.filter-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 44px; }
.filter-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 1; min-width: 0; min-height: 44px; padding: 10px 14px; border-radius: 12px; background: var(--surface); color: #d9dcdd; font-size: 16px; font-weight: 500; text-align: left; transition: background .15s, color .15s; }
.filter-trigger-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-trigger .icon { width: 17px; height: 17px; color: #939a9d; }
.filter-trigger:hover, .filter-trigger[aria-expanded=true] { background: #2a2e30; }
.filter-trigger.is-filtered { background: #293325; color: #deefcb; }
.filter-trigger.is-filtered .icon { color: #b8cf9e; }
.filter-reset { background: var(--surface); border-radius: 12px; }
.scope-tab:focus-visible, .filter-trigger:focus-visible, .filter-option:focus-visible { outline: none; background: #343b36; color: var(--text); }
.scope-tab:focus-visible .scope-label, .filter-trigger:focus-visible .filter-trigger-label, .filter-option:focus-visible .filter-option-label { text-decoration: underline; text-underline-offset: 4px; }
.filter-dialog { padding-left: 18px; padding-right: 18px; }
.filter-dialog h2 { padding-left: 8px; }
.filter-options { display: grid; gap: 4px; margin-top: 22px; }
.filter-option { width: 100%; min-height: 50px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 13px; background: transparent; color: #e0e3e4; font-size: 16px; font-weight: 500; text-align: left; }
.filter-option:hover { background: #292d2f; }
.filter-option[aria-selected=true] { background: #303a2a; color: #e3f3d0; }
.filter-option-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.filter-option-marker { display: grid; place-items: center; width: 20px; height: 20px; flex-shrink: 0; }
.filter-option-marker .stage-dot { width: 9px; height: 9px; }
.filter-option-marker .icon { width: 19px; height: 19px; color: var(--muted); }
.filter-option-count { color: var(--muted); font-size: 16px; font-variant-numeric: tabular-nums; }
.filter-option[aria-selected=true] .filter-option-count { color: #c1d8a9; }
.filter-option-check { width: 20px; height: 20px; color: var(--accent); visibility: hidden; }
.filter-option[aria-selected=true] .filter-option-check { visibility: visible; }
.task-list { display: grid; gap: 10px; align-items: start; width: 100%; min-width: 0; }
.crm-card { background: var(--surface); border-radius: 19px; padding: 15px 16px 12px; min-width: 0; width: 100%; transition: background .15s; }
.crm-card.just-taken { background: #263023; }
.task-open { display: block; background: transparent; padding: 0; text-align: left; width: 100%; min-width: 0; }
.task-title-row { display: flex; justify-content: space-between; align-items: center; gap: 6px 8px; min-height: 28px; min-width: 0; flex-wrap: wrap; }
.task-badges { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 100%; min-width: 0; }
.badge-images { display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; padding: 3px 8px; font-size: 12.5px; font-weight: 600; line-height: 1.35; white-space: nowrap; background: #162638; color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.28); flex-shrink: 0; }
.task-sku { font-size: 18px; font-weight: 650; letter-spacing: -.25px; overflow-wrap: anywhere; word-break: break-word; line-height: 1.3; min-width: 0; }
.status { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; padding: 4px 10px; font-size: 13.5px; font-weight: 600; line-height: 1.35; white-space: nowrap; flex-shrink: 0; border: 0; }
.status-dot { display: none; }
.status-available { background: #384252; color: #ffffff; }
.status-in_progress { background: #c27803; color: #ffffff; }
.status-internal_review { background: #0284c7; color: #ffffff; }
.status-client_review { background: #7c3aed; color: #ffffff; }
.status-export_ready { background: #ea580c; color: #ffffff; }
.status-completed { background: #16a34a; color: #ffffff; }
.status-archived { background: #475569; color: #ffffff; }
.task-meta { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 15px; line-height: 22px; color: var(--muted); min-width: 0; }
.pool-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; flex: 1; }
.assignee { color: #c6cbce; flex-shrink: 0; max-width: 48%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }
.assignee.is-mine { color: var(--accent); }
.assignee-dot { display: none; }
.note-preview { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 8px 10px; margin-top: 11px; border-radius: 10px; background: #25282b; color: #c2c7ca; text-align: left; font-size: 15px; }
.note-preview.is-revision { background: #36282b; color: #f1b8b7; }
.note-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-preview .icon { width: 17px; height: 17px; }
.task-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; flex-wrap: wrap; min-width: 0; width: 100%; }
.task-resources { display: flex; align-items: center; gap: 0; min-width: 0; flex-wrap: wrap; }
.resource-link { min-height: 44px; padding: 10px 7px; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; border-radius: 10px; color: #c0c5c8; }
.resource-link:first-child { margin-left: -7px; }
.resource-link:hover { background: var(--surface-raised); color: var(--text); }
.resource-link .icon { width: 18px; height: 18px; }
.task-footer .btn { padding: 9px 14px; min-height: 40px; font-size: 14.5px; }
.task-footer .btn-primary { background: var(--surface-raised); color: var(--text); }
.task-footer .btn-primary:hover { background: #34383c; }
.task-footer .detail-button { background: var(--surface-raised); color: #d2d6d8; }
.load-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; background: #36282b; color: #f1b8b7; border-radius: 16px; margin-bottom: 12px; }
.empty-state { text-align: center; padding: 46px 20px; }
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; background: var(--surface); border-radius: 18px; margin: 0 auto 20px; color: var(--muted); }
.empty-icon .icon { width: 26px; height: 26px; }
.empty-state h2 { font-size: 22px; }
.empty-state p { color: var(--muted); margin: 8px auto 20px; max-width: 320px; font-size: 16px; }
.skeleton-card { background: var(--surface); border-radius: 19px; padding: 20px; height: 154px; animation: skeleton-pulse 1.5s ease-in-out infinite alternate; }
.skeleton-card div { height: 16px; border-radius: 6px; background: #2b2e31; margin-bottom: 15px; width: 70%; }
.skeleton-card div:nth-child(2) { width: 50%; }
.skeleton-card div:last-child { width: 35%; height: 34px; margin: 20px 0 0 auto; }
@keyframes skeleton-pulse { to { opacity: .5; } }
.modal-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: #0009; padding: var(--safe-top) var(--safe-right) 0 var(--safe-left); }
.modal-dialog { position: relative; background: var(--surface); width: 100%; max-width: 520px; padding: 30px 24px calc(24px + max(var(--safe-bottom), env(safe-area-inset-bottom))); border-radius: 26px 26px 0 0; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; animation: sheet-enter .18s ease-out; }
.modal-dialog:focus { outline: none; }
.modal-dialog h2 { padding-right: 35px; overflow-wrap: anywhere; }
.sheet-handle { width: 32px; height: 4px; border-radius: 4px; background: #4d5155; position: absolute; top: 10px; left: calc(50% - 16px); }
.modal-close { position: absolute; top: 20px; right: 14px; }
.sheet-subtitle { margin: 8px 0 22px; color: var(--muted); overflow-wrap: anywhere; }
.form-fields { display: grid; gap: 20px; margin-top: 24px; }
.field-label { display: block; font-size: 16px; font-weight: 500; }
.field-label input, .field-label textarea { display: block; margin-top: 9px; font-weight: 400; }
.field-heading { display: flex; justify-content: space-between; gap: 12px; }
.field-hint { display: block; color: var(--muted); font-size: 14px; font-weight: 400; margin-top: 8px; }
.scan-field { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.scan-field input { flex: 1 1 230px; }
.batch-analysis { display: grid; gap: 10px; margin-top: 10px; }
.batch-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 14.5px; line-height: 1.45; }
.batch-alert .icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.batch-alert-warning { background: #3c2f16; color: #ffd699; border: 1px solid rgba(245, 158, 11, 0.35); }
.batch-alert-danger { background: #36282b; color: #ffc2bd; border: 1px solid rgba(239, 68, 68, 0.35); }
.batch-alert-info { background: #162c3d; color: #bae6fd; border: 1px solid rgba(14, 165, 233, 0.35); }
.batch-stats-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.batch-stat-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 20px; font-size: 13.5px; font-weight: 500; background: var(--surface-raised); }
.batch-stat-pill.pill-new { color: #86efac; border: 1px solid rgba(34, 197, 94, 0.25); }
.batch-stat-pill.pill-active { color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.25); }
.batch-stat-pill.pill-done { color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.2); }
.btn-filter-new { font-size: 14px; padding: 7px 13px; min-height: 36px; align-self: flex-start; border-radius: 10px; }
.form-error { background: #36282b; color: #ffc2bd; padding: 12px; border-radius: 12px; font-size: 16px; margin-top: 20px; overflow-wrap: anywhere; }
.detail-header { margin-bottom: 22px; }
.detail-header .status { margin-top: 12px; }
.detail-meta { display: grid; gap: 10px; color: var(--muted); font-size: 16px; margin-top: 17px; }
.detail-meta p { display: flex; align-items: flex-start; gap: 9px; overflow-wrap: anywhere; }
.detail-section { margin-top: 26px; }
.detail-section h3 { margin-bottom: 12px; }
.detail-note { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.6; background: var(--surface-raised); border-radius: 14px; padding: 14px; }
.detail-note.is-revision { background: #36282b; color: #f1b8b7; }
.detail-link { display: flex; align-items: center; gap: 11px; padding: 14px; min-height: 52px; margin-top: 7px; background: var(--surface-raised); border-radius: 12px; font-size: 16px; }
.detail-link span { flex: 1; }
.detail-link .icon:last-child { width: 17px; height: 17px; color: var(--muted); }
.detail-link-bitrix .icon:first-child { color: #2fc6f6; }
.detail-actions { margin-top: 26px; display: grid; gap: 8px; }
.detail-actions .btn { min-height: 50px; font-size: 16px; }
.detail-actions .btn-wide { margin-top: 0; }
.detail-admin-group { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #272a2d; }
.detail-sku-row { display: flex; gap: 5px; align-items: center; }
.detail-sku-row h2 { flex: 1; padding: 0; font-size: 23px; }
.detail-sku-row .icon-button { margin-right: 30px; }
.detail-images-block { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface-raised); border-radius: 14px; padding: 12px 14px; margin-top: 14px; }
.detail-images-label { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text); min-width: 0; }
.detail-images-label .icon { width: 18px; height: 18px; color: #38bdf8; flex-shrink: 0; }
.detail-label-title { color: var(--muted); }
.detail-images-val { color: #f0f9ff; font-weight: 650; margin-left: 4px; }
.detail-images-block .btn { flex-shrink: 0; }
.stats-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 24px 0; }
.stats-tile { background: var(--surface-raised); border-radius: 15px; padding: 18px; }
.stats-number { font-size: 32px; font-weight: 650; letter-spacing: -1px; }
.stats-tile p { font-size: 15px; color: var(--muted); margin-top: 3px; }
.progress-track { height: 6px; background: #34383b; border-radius: 6px; margin-top: 16px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 6px; }
.stats-stage { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; font-size: 16px; }
.stats-stage span { display: flex; gap: 10px; align-items: center; }
.stats-stage b { font-variant-numeric: tabular-nums; }
.stage-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.team-toolbar { display: flex; gap: 8px; margin-top: 16px; margin-bottom: 2px; }
.team-toolbar .btn { flex: 1; justify-content: center; font-size: 13.5px; min-height: 40px; padding: 8px 12px; }
.team-list { margin-top: 14px; display: grid; gap: 10px; }
.team-row { display: flex; gap: 10px; align-items: center; background: var(--surface-raised); border-radius: 14px; padding: 13px; }
.team-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: #414749; color: #d9e3dd; font-weight: 600; flex-shrink: 0; }
.team-info { flex: 1; min-width: 0; }
.team-info strong { font-size: 16px; font-weight: 550; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-info p { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.team-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.team-row select { background: #34383b; min-height: 44px; padding: 8px; font-size: 15px; width: 120px; }
.btn-remove-user { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); color: var(--muted); cursor: pointer; transition: all .15s ease; flex-shrink: 0; }
.btn-remove-user:hover { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.4); color: #ef4444; }
.btn.loading .icon { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.toast-container { position: fixed; bottom: calc(20px + max(var(--safe-bottom), env(safe-area-inset-bottom))); left: 20px; right: 20px; z-index: 100; max-width: 480px; margin: auto; pointer-events: none; }
.crm-toast { padding: 14px 18px; background: #e3e7df; color: #1e251b; border-radius: 14px; font-size: 16px; font-weight: 500; animation: toast-enter .2s ease; }
.crm-toast.is-error { background: #ffc2bd; color: #402021; }
.dev-bar { background: #282622; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 14px; min-height: 44px; padding: 5px 12px; }
.dev-bar select { background: #403c33; padding: 5px 10px; font-size: 14px; min-height: 34px; }
body.modal-open { overflow: hidden; }
@keyframes sheet-enter { from { opacity: .5; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Form validation and shake */
.btn.btn-disabled-hint { opacity: 0.55; filter: grayscale(0.2); cursor: pointer; }
.field-error-highlight { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important; }
.field-error-msg { display: block; color: #f87171; font-size: 13.5px; font-weight: 500; margin-top: 6px; animation: toast-enter .15s ease; }
.required-star { color: #f87171; margin-left: 2px; }
@keyframes shake-x {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
.shake-animate { animation: shake-x .35s ease-in-out; }

/* Pool grouping in feed */
.pool-group { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; width: 100%; min-width: 0; }
.pool-group-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 12px; user-select: none; width: 100%; min-width: 0; }
.pool-group-toggle { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer; padding: 2px 4px; min-width: 0; flex: 1 1 auto; text-align: left; }
.pool-group-toggle:hover { color: #ffffff; }
.pool-chevron { width: 16px; height: 16px; color: var(--muted); transition: transform .2s ease; flex-shrink: 0; transform: rotate(90deg); }
.pool-chevron.is-collapsed { transform: rotate(0deg); }
.pool-group-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex-shrink: 1; }
.pool-group-badge-count { font-size: 13px; color: var(--muted); font-weight: 500; flex-shrink: 0; white-space: nowrap; }
.pool-group-meta { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; min-width: 0; }
.pool-group-stages { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.pool-stat-dot { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #1b1e20; color: #cbd5e1; white-space: nowrap; flex-shrink: 0; }
.pool-stat-dot .stage-dot { width: 6px; height: 6px; border-radius: 50%; }
.pool-edit-trigger { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border-radius: 8px; background: transparent; border: 0; cursor: pointer; transition: all .15s; flex-shrink: 0; }
.pool-edit-trigger:hover { color: var(--text); background: var(--surface-raised); }
.pool-group-tasks { display: grid; gap: 10px; width: 100%; min-width: 0; }
@media (min-width: 700px) {
  .pool-group-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

/* Edit pool modal */
.edit-pool-skus-section { margin-top: 14px; border-top: 1px solid #272a2d; padding-top: 14px; }
.edit-pool-skus-list { margin-top: 10px; display: grid; gap: 8px; max-height: 240px; overflow-y: auto; padding-right: 4px; }
.edit-pool-sku-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface-raised); border-radius: 12px; padding: 10px 12px; }
.edit-pool-sku-info { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; flex-wrap: wrap; }
.edit-pool-sku-code { font-weight: 600; font-size: 14.5px; }
.edit-pool-sku-status { font-size: 13px; font-weight: 500; }
.edit-pool-sku-assignee { font-size: 13px; }

/* Export Modal */
.btn-link { background: transparent; border: 0; color: var(--accent); font-size: 13.5px; font-weight: 550; padding: 0; cursor: pointer; transition: color .15s; }
.btn-link:hover { text-decoration: underline; color: var(--accent-hover); }

.export-dialog {
  display: flex !important;
  flex-direction: column !important;
  max-height: min(90dvh, 740px) !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.export-dialog-header {
  position: relative;
  padding: 24px 22px 14px;
  border-bottom: 1px solid #272a2e;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.export-dialog-header h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 0;
  padding-right: 36px;
  color: var(--text);
}
.export-dialog-header .sheet-handle {
  top: 8px;
}
.export-dialog-header .modal-close {
  top: 15px;
  right: 14px;
}
.export-dialog-body {
  padding: 16px 20px calc(20px + max(var(--safe-bottom), env(safe-area-inset-bottom)));
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.export-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.export-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.export-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}
.export-pools-list {
  max-height: 140px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 2px;
}
.export-pool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface-raised);
  border-radius: 11px;
  padding: 9px 12px;
  cursor: pointer;
  transition: all .15s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  user-select: none;
}
.export-pool-item:hover {
  background: #2e3236;
}
.export-pool-item.is-selected {
  border-color: rgba(200, 238, 148, 0.45);
  background: #1e261c;
}
.export-pool-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.export-pool-name {
  font-weight: 550;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.export-pool-badge {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.export-pools-summary {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.export-format-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.format-option {
  cursor: pointer;
  user-select: none;
}
.format-option input[type=radio] {
  display: none !important;
}
.format-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-raised);
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  transition: all .15s ease;
  min-height: 58px;
}
.format-option:hover .format-card {
  background: #2d3135;
}
.format-option input[type=radio]:checked + .format-card {
  border-color: var(--accent);
  background: #20271c;
  box-shadow: 0 0 10px rgba(200, 238, 148, 0.12);
}
.format-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.format-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.format-title {
  font-weight: 650;
  font-size: 13.5px;
  color: var(--text);
  white-space: nowrap;
}
.format-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.25;
}

.export-google-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid #272a2e;
}
.export-input-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 13px !important;
  padding: 10px 12px !important;
  min-height: 44px !important;
  border-radius: 11px !important;
  background: #17191b !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text) !important;
}
.export-input-url:focus {
  border-color: var(--accent) !important;
  outline: none !important;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.checkbox-row:hover {
  color: var(--text);
}

.guide-box {
  background: #15181a;
  border: 1px solid #2d3237;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: #cbd5e1;
}
.guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.guide-steps {
  margin: 0;
  padding-left: 18px;
  line-height: 1.5;
}
.guide-steps li {
  margin-bottom: 5px;
}
.guide-steps strong {
  color: #f1f5f9;
}

.export-error-card {
  background: #391e23;
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.export-submit-btn {
  margin-top: 4px !important;
  min-height: 48px;
}

@media (min-width: 700px) {
  .app-shell { padding-top: calc(24px + max(var(--safe-top), env(safe-area-inset-top))); }
  .app-header { margin-bottom: 32px; }
  .feed-controls { max-width: 100%; }
  .task-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .modal-overlay { align-items: center; padding: max(24px, var(--safe-top)) 24px; }
  .modal-dialog { border-radius: 24px; padding: 30px; max-height: 85dvh; }
  .sheet-handle { display: none; }
  .filter-dialog { max-width: 400px; padding: 26px 18px 18px; }
}
@media (max-width: 480px) {
  .app-shell {
    padding-left: max(12px, var(--safe-left), env(safe-area-inset-left));
    padding-right: max(12px, var(--safe-right), env(safe-area-inset-right));
  }
  .page-heading h1 { font-size: 28px; }
  .page-heading > .btn { padding: 9px 12px; font-size: 14px; }
  .page-heading > .btn .icon { width: 17px; height: 17px; }
  .crm-card { padding: 13px 12px 11px; }
  .task-sku { font-size: 16.5px; }
  .task-title-row { gap: 6px; }
  .status { font-size: 12.5px; padding: 3px 8px; border-radius: 7px; }
  .badge-images { font-size: 12px; padding: 2.5px 6px; border-radius: 6px; }
  .pool-group-header { flex-wrap: nowrap; gap: 6px; padding: 6px 8px; }
  .pool-group-toggle { flex: 1 1 auto; min-width: 0; }
  .pool-group-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex-shrink: 1; }
  .pool-group-meta { flex-shrink: 0; gap: 4px; margin-left: 0; }
  .pool-group-stages { display: inline-flex; align-items: center; gap: 3px; flex-wrap: nowrap; flex-shrink: 0; }
  .pool-stat-dot { padding: 2px 5px; font-size: 11.5px; }
  .task-footer { flex-wrap: wrap; gap: 6px; }
  .task-footer > .btn { margin-left: auto; }
  .resource-link { padding: 8px 5px; gap: 4px; font-size: 14px; min-height: 40px; }
  .task-footer .btn { padding: 8px 12px; font-size: 14px; min-height: 38px; }
  .modal-dialog { padding-left: 18px; padding-right: 18px; }
  .scope-tab { font-size: 14.5px; padding-left: 5px; padding-right: 5px; gap: 5px; }
  .tab-count { font-size: 13.5px; }
  .filter-trigger { gap: 8px; padding-left: 12px; padding-right: 12px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
