/* ── Work assignments ─────────────────────────────────────────────────────
   .asg-*  shared assign control (chip + menu + modals)
   .myw-*  My work page
   .wbd-*  Team board
   .asgs-* Settings › Assignments (policy + rules)
   .ntf-*  Notifications list
   Linked automatically via stylesheet_link_tag :app.
─────────────────────────────────────────────────────────────────────────── */

/* Assign control ─────────────────────────────────────────────────────── */
.asg-control { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.asg-inline-form { display: inline; margin: 0; }
.asg-inline-form .dropdown-item { width: 100%; text-align: left; }
.asg-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; }
.asg-chip__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asg-menu__panel { min-width: 240px; }
.asg-menu__summary { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.asg-menu__note { margin: 6px 0 0; font-size: 12px; color: var(--pp-text-muted); white-space: pre-wrap; }
.asg-modal__form { display: contents; }

.asg-offer {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 6px 10px; border-radius: 6px;
  background: var(--pp-warning-soft); border: 1px solid var(--pp-border);
}
.asg-offer__label { font-size: 13px; font-weight: 600; }
.asg-offer__note { font-size: 12px; color: var(--pp-text-muted); }
.asg-offer__actions { display: inline-flex; gap: 6px; }

/* Floor variant: bigger targets, full width */
.asg-control--floor { width: 100%; }
.asg-control--floor .asg-offer { width: 100%; padding: 12px; flex-direction: column; align-items: stretch; }
.asg-control--floor .asg-offer__actions { display: flex; }
.asg-control--floor .asg-offer__actions .btn { flex: 1; min-height: 44px; }
.asg-control--floor .asg-chip { min-height: 44px; max-width: none; width: 100%; justify-content: center; }
.asg-control--floor .asg-menu { width: 100%; }

/* My tasks ───────────────────────────────────────────────────────────── */
/* One column: chips + Filter on a single row, then the grouped table. */
.myw-page { display: flex; flex-direction: column; gap: 12px; }
.myw-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.myw-toolbar__right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.myw-toolbar__clear { font-size: 13px; color: var(--pp-text-muted); text-decoration: none; }
.myw-toolbar__clear:hover { color: var(--pp-text); text-decoration: underline; }
.myw-buckets { display: flex; gap: 6px; flex-wrap: wrap; }
.myw-bucket { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--pp-border); font-size: 13px; color: var(--pp-text-muted); background: var(--pp-surface); text-decoration: none; cursor: pointer; }
.myw-bucket:hover { border-color: var(--pp-border-strong); color: var(--pp-text); }
.myw-bucket.is-active { background: var(--pp-accent-soft); border-color: var(--pp-accent); color: var(--pp-accent); }
.myw-bucket__count { font-size: 11px; font-variant-numeric: tabular-nums; color: inherit; opacity: .8; }
.myw-bucket__input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.myw-bucket:focus-within { outline: 2px solid var(--pp-accent); outline-offset: 1px; }

/* Filter popover: the secondary filters + group-by, one field per line */
.myw-filter .dropdown-toggle.is-active { border-color: var(--pp-accent); color: var(--pp-accent); }
.myw-filter__count { font-size: 11px; font-weight: 600; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--pp-accent); color: #fff; text-align: center; }
.myw-filter__panel { min-width: 240px; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.myw-filter__field { display: flex; flex-direction: column; gap: 4px; }
.myw-filter__field .input { width: 100%; }
.myw-filter__label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--pp-text-muted); }
.myw-filter__panel .dropdown-divider { height: 1px; background: var(--pp-border); margin: 0; }

/* History page keeps its inline filter row */
.myw-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.myw-filters__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.myw-filters__field { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.myw-filters__field--search { min-width: 260px; }
.myw-filters__label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--pp-text-muted); }
.myw-filters__clear { align-self: flex-end; }
.myw-filters--history { margin-bottom: 16px; }
.myw-summary { margin: 0; font-size: 13px; color: var(--pp-text-muted); }

/* Table: quieter type, section headers instead of stripes */
.myw-table .data-table th { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--pp-text-muted); }
.myw-table .data-table td { vertical-align: middle; }
.myw-group-row td { background: transparent; padding: 18px 12px 6px; border-top: 0; }
.myw-group-row:first-child td { padding-top: 8px; }
.myw-group-row__title { font-size: 12px; font-weight: 600; color: var(--pp-text); }
.myw-group-row__count { margin-left: 6px; font-size: 12px; color: var(--pp-text-muted); font-variant-numeric: tabular-nums; }

.myw-row-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.myw-row-title__link { color: var(--pp-text); font-weight: 500; text-decoration: none; }
.myw-row-title__link:hover { color: var(--pp-accent); text-decoration: underline; }
.myw-row-context { font-size: 12px; color: var(--pp-text-muted); }
.myw-row-note { font-size: 12px; color: var(--pp-text-muted); white-space: pre-wrap; }

/* Row actions surface on hover / focus; offers and Respond stay put */
.myw-row-actions .row-actions-inline { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.myw-row-actions__quiet { opacity: 0; transition: opacity .12s ease; }
.myw-row-actions__quiet--always,
.myw-row:hover .myw-row-actions__quiet,
.myw-row:focus-within .myw-row-actions__quiet { opacity: 1; }
.myw-table .asg-offer { padding: 0; border: 0; background: transparent; }
.myw-table .asg-offer__label, .myw-table .asg-offer__note { display: none; }
.myw-table .select-cell input:not(:checked) { opacity: .35; transition: opacity .12s ease; }
.myw-table .myw-row:hover .select-cell input,
.myw-table .myw-row:focus-within .select-cell input { opacity: 1; }
.myw-empty { max-width: 520px; margin: 24px auto; }

@media (max-width: 720px) { .myw-toolbar__right { margin-left: 0; } }

/* Notifications ─────────────────────────────────────────────────────── */
.ntf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ntf-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--pp-border); }
.ntf-item:first-child { border-top: 0; }
.ntf-item--unread .ntf-item__title { font-weight: 700; }
.ntf-item__dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--pp-accent); flex: none; }
.ntf-item--read .ntf-item__dot { background: transparent; }
.ntf-item__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ntf-item__title { font-size: 13px; }
.ntf-item__text { font-size: 12px; color: var(--pp-text-muted); }
.ntf-item__meta { font-size: 11px; color: var(--pp-text-subtle); }
.ntf-item__form { margin: 0; }
.ntf-item__link { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }

/* Team board ─────────────────────────────────────────────────────────── */
.wbd-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.wbd-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 16px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.wbd-col { background: var(--pp-surface-2); border: 1px solid var(--pp-border); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.wbd-col--unclaimed { border-style: dashed; }
.wbd-col__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 6px; }
.wbd-col__name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wbd-col__count { font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 999px; background: var(--pp-surface); border: 1px solid var(--pp-border); }
.wbd-card { background: var(--pp-surface); border: 1px solid var(--pp-border); border-radius: 6px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--pp-shadow-sm); }
.wbd-card--overdue { border-color: var(--pp-danger); }
.wbd-card__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.wbd-card__type { font-size: 11px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--pp-text-subtle); }
.wbd-card__title { font-size: 13px; font-weight: 600; }
.wbd-card__title a { color: inherit; text-decoration: none; }
.wbd-card__title a:hover { text-decoration: underline; }
.wbd-card__meta { font-size: 12px; color: var(--pp-text-muted); }
.wbd-card__note { font-size: 12px; color: var(--pp-text-muted); white-space: pre-wrap; }
.wbd-card__foot { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 4px; }
.wbd-empty { font-size: 12px; color: var(--pp-text-subtle); text-align: center; padding: 16px 8px; }

/* Settings › Assignments ────────────────────────────────────────────── */
.asgs-policy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.asgs-source { font-size: 11px; color: var(--pp-text-subtle); }
.asgs-rule-sentence { font-size: 13px; color: var(--pp-text); }
.asgs-rule-meta { font-size: 12px; color: var(--pp-text-muted); }
.asgs-form > .panel + .panel, .asgs-form > .form-actions { margin-top: 24px; }
.asgs-cond { display: flex; flex-direction: column; gap: 8px; }
.asgs-cond__row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 2fr) auto; gap: 8px; align-items: center; }
.asgs-cond__add { align-self: flex-start; }
.asgs-strategy-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.asgs-strategy-fields[hidden] { display: none; }
.asgs-test { display: flex; flex-direction: column; gap: 8px; }
.asgs-test__result { padding: 10px 12px; border-radius: 6px; border: 1px solid var(--pp-border); background: var(--pp-surface-2); font-size: 13px; }
.asgs-test__result--ok { border-color: var(--pp-success); background: var(--pp-success-soft); }
.asgs-test__result--none { border-color: var(--pp-warning); background: var(--pp-warning-soft); }
.asgs-test__list { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: var(--pp-text-muted); }
.asgs-drag { cursor: grab; color: var(--pp-text-subtle); }
.asgs-row--disabled .asgs-rule-sentence { color: var(--pp-text-muted); text-decoration: line-through; }
@media (max-width: 720px) {
  .asgs-cond__row { grid-template-columns: 1fr; }
  .asgs-strategy-fields { grid-template-columns: 1fr; }
}

/* Floor: "Assigned to you" rows + /my_work phone view ─────────────────── */
.floor-row--assigned .floor-row__action { font-weight: 600; }
.floor-my-work__item { display: flex; flex-direction: column; }
.floor-my-work__note { font-style: italic; }
.floor-my-work__actions { display: flex; gap: 8px; padding: 0 14px 12px; }
.floor-my-work__actions form { display: contents; }
.floor-my-work__actions .btn { min-height: 40px; flex: 1; }
.floor-my-work .floor-filter { margin-bottom: 16px; }
.floor-my-work__section-count { font-size: 12px; font-weight: 600; padding: 0 7px; border-radius: 999px; background: var(--pp-surface-2); color: var(--pp-text-muted); }
.floor-my-work__pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
.floor-my-work__pager .btn { min-height: 44px; }
.floor-my-work__pager-label { font-size: 13px; color: var(--pp-text-muted); text-align: center; flex: 1; }

/* Header bell */
.notif-bell { position: relative; }
