/* ============================================================
   Executor / verifier assignments — formal workspace layout
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

.exec-assign.ea-page {
  --ea-ink: #0f172a;
  --ea-muted: #64748b;
  --ea-line: #e2e8f0;
  --ea-surface: #ffffff;
  --ea-subtle: #f8fafc;
  --ea-accent: var(--theme-red-deep);
  --ea-radius-lg: 16px;
  --ea-font: 'IBM Plex Sans', system-ui, sans-serif;

  font-family: var(--ea-font);
  color: var(--ea-ink);
  gap: 18px;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

/* Error banner */
.exec-assign-error {
  color: var(--theme-red-deep);
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--theme-red-soft), rgba(255, 255, 255, 0.96));
  border: 1px solid var(--theme-red-border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

/* ── Hero ─────────────────────────────────────────────────── */
.exec-assign .ea-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 28px;
  padding: 22px 24px 24px;
  background: var(--ea-surface);
  border: 1px solid var(--ea-line);
  border-radius: var(--ea-radius-lg);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px rgba(15, 23, 42, 0.06);
  border-left: 4px solid var(--theme-red-bright);
}

.exec-assign .ea-hero-text {
  min-width: 0;
  flex: 1 1 240px;
}

.exec-assign .ea-hero-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ea-muted);
}

.exec-assign .ea-hero-title {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ea-ink);
}

.exec-assign .ea-hero-lede {
  margin: 0;
  max-width: 52ch;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ea-muted);
  font-weight: 400;
}

.exec-assign .ea-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  flex-shrink: 0;
}

.exec-assign .ea-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 148px;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}

.exec-assign .ea-nav-btn__label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.exec-assign .ea-nav-btn__hint {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
}

.exec-assign .ea-nav-btn--secondary {
  border: 1px solid var(--ea-line);
  background: var(--ea-subtle);
  color: var(--ea-ink);
}

.exec-assign .ea-nav-btn--secondary:hover {
  background: var(--ea-surface);
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.exec-assign .ea-nav-btn--primary {
  border: 1px solid color-mix(in srgb, var(--theme-red-bright) 55%, var(--ea-line));
  background: linear-gradient(180deg, var(--theme-red-soft) 0%, var(--ea-surface) 100%);
  color: var(--theme-red-deep);
}

.exec-assign .ea-nav-btn--primary:hover {
  border-color: var(--theme-red-bright);
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.12);
  transform: translateY(-1px);
}

.exec-assign .ea-nav-btn:focus-visible {
  outline: 2px solid var(--theme-red-bright);
  outline-offset: 2px;
}

@supports not (color: color-mix(in srgb, white 50%, black)) {
  .exec-assign .ea-nav-btn--primary {
    border-color: rgba(220, 38, 38, 0.35);
  }
}

/* Filters panel */
.exec-assign .uv-filter-bar.ea-stack.ea-filters-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 18px;
  background: var(--ea-surface, #fff);
  border: 1px solid var(--ea-line, #e2e8f0);
  border-radius: var(--ea-radius-lg, 16px);
  padding: 20px 22px 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.exec-assign .ea-filter-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.exec-assign .ea-filter-block--scroll .ea-status-tabs {
  overflow-x: auto;
  padding-bottom: 4px;
  flex-wrap: nowrap;
  scrollbar-width: thin;
}

.exec-assign .ea-filter-block--scroll .ea-status-tabs::-webkit-scrollbar {
  height: 6px;
}

.exec-assign .ea-filter-block--scroll .ea-status-tabs::-webkit-scrollbar-thumb {
  background: var(--theme-gray-300);
  border-radius: 4px;
}

.exec-assign .ea-filter-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ea-muted, #64748b);
}

.exec-assign .ea-filter-block--search .ea-filter-heading {
  margin-bottom: 0;
}

.exec-assign .ea-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.exec-assign .ea-search-icon {
  position: absolute;
  left: 14px;
  color: var(--ea-muted, #64748b);
  display: flex;
  pointer-events: none;
}

.exec-assign .ea-search-input {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  padding-left: 42px !important;
  border: 1px solid var(--ea-line, #e2e8f0) !important;
  border-radius: 10px !important;
  background: var(--ea-subtle, #f8fafc) !important;
  font-size: 14px !important;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.exec-assign .ea-search-input:hover {
  border-color: #cbd5e1 !important;
}

.exec-assign .ea-search-input:focus {
  outline: none;
  border-color: rgba(220, 38, 38, 0.35) !important;
  background: var(--ea-surface, #fff) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

/* â”€â”€ Role switcher tabs â”€â”€ */
.exec-assign .ea-role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 6px;
  background: var(--theme-gray-50);
  border-radius: 14px;
  border: 1px solid var(--theme-gray-100);
}

.exec-assign .ea-role-tab {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 16px;
  background: transparent;
  color: var(--theme-gray-500);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--ea-font, 'IBM Plex Sans', system-ui, sans-serif);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.exec-assign .ea-role-tab:hover {
  background: var(--theme-white);
  color: var(--theme-gray-700);
  border-color: #e2e8f0;
}

.exec-assign .ea-role-tab[data-role='executor'].ea-role-tab--active {
  background: var(--theme-white);
  border-color: #e2e8f0;
  color: var(--theme-red-deep);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.exec-assign .ea-role-tab[data-role='verifier'].ea-role-tab--active {
  background: var(--theme-white);
  border-color: #e2e8f0;
  color: #334155;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* Role icons in tab (optional span.role-icon enhancement) */
.exec-assign .ea-role-tab .role-icon {
  font-size: 16px;
}

/* â”€â”€ Workflow bucket tabs (status-wise lists) â”€â”€ */
.exec-assign .ea-bucket-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 2px;
}

.exec-assign .ea-bucket-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--theme-gray-100);
  border-radius: 999px;
  padding: 8px 14px 8px 16px;
  background: var(--ea-subtle, #f8fafc);
  color: var(--theme-gray-600);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--ea-font, 'IBM Plex Sans', system-ui, sans-serif);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.exec-assign .ea-bucket-tab:hover {
  background: var(--theme-white);
  border-color: #e2e8f0;
  color: var(--theme-black);
}

.exec-assign .ea-bucket-tab--active {
  background: var(--theme-white);
  border-color: rgba(220, 38, 38, 0.45);
  color: var(--theme-red-deep);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.exec-assign .ea-bucket-count {
  min-width: 1.25rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--theme-gray-100);
  color: var(--theme-gray-600);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.exec-assign .ea-bucket-tab--active .ea-bucket-count {
  background: var(--theme-gray-50);
  color: var(--theme-red-deep);
}

/* â”€â”€ Semantic filter hint banner â”€â”€ */
.exec-assign .ea-semantic-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--theme-gray-200);
  background: linear-gradient(135deg, var(--theme-gray-50), var(--theme-gray-50));
  font-size: 14px;
  color: var(--theme-red-deep);
  font-weight: 500;
}

.exec-assign .ea-semantic-hint strong {
  color: var(--theme-black);
  font-weight: 700;
}

.exec-assign .ea-semantic-hint button {
  border: 1px solid var(--theme-gray-200);
  background: var(--theme-white);
  color: var(--theme-red-deep);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  padding: 5px 12px;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.exec-assign .ea-semantic-hint button:hover {
  background: var(--theme-gray-50);
  border-color: var(--theme-gray-400);
}

/* â”€â”€ Status ID pill-tabs â”€â”€ */
.exec-assign .ea-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.exec-assign .ea-status-tabs .uv-filter-tab--active {
  background: linear-gradient(135deg, var(--theme-gray-900), var(--theme-gray-600));
  border-color: var(--theme-gray-600);
  color: var(--theme-gray-50);
  box-shadow: 0 2px 8px rgba(30,41,59,0.2);
}

.exec-assign .ea-status-tabs .uv-filter-tab--active:hover {
  background: linear-gradient(135deg, var(--theme-gray-600), var(--theme-gray-600));
  border-color: var(--theme-gray-600);
}

.exec-assign .ea-status-tabs .uv-filter-count {
  background: rgba(0, 0, 0, 0.12);
}

.exec-assign .ea-status-tabs .uv-filter-tab--active .uv-filter-count {
  background: rgba(255, 255, 255, 0.18);
}

/* â”€â”€ Search row â”€â”€ */
.exec-assign .ea-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.exec-assign .ea-search-row .uv-search {
  flex: 1;
  min-width: 200px;
  border: 1.5px solid var(--theme-gray-100);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14.5px;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--theme-black);
  background: var(--theme-gray-50);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.exec-assign .ea-search-row .uv-search:focus {
  outline: none;
  border-color: var(--theme-gray-200);
  background: var(--theme-white);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.exec-assign .ea-search-row .uv-search::placeholder {
  color: var(--theme-gray-400);
}

/* Verifier row: open risk document (matches Verifier review queue) */
.exec-assign .ea-review-col {
  width: 1%;
  white-space: nowrap;
}

.exec-assign .ea-review-action-cell {
  text-align: right;
  vertical-align: middle;
}

.exec-assign .ea-review-row-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: var(--ea-surface, #fff);
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.exec-assign .ea-review-row-btn:hover {
  border-color: #94a3b8;
  color: #0f172a;
  background: var(--ea-subtle, #f8fafc);
}

.exec-assign .ea-review-row-btn:focus-visible {
  outline: 2px solid rgba(15, 23, 42, 0.35);
  outline-offset: 2px;
}

/* Executor primary row action — matches video queue CTA (filled, shadow) */
.exec-assign .ea-action-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--theme-white);
  background: linear-gradient(135deg, var(--theme-red-bright) 0%, var(--theme-red) 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.38);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.exec-assign .ea-action-primary-btn__icon {
  flex-shrink: 0;
  opacity: 0.95;
}

.exec-assign .ea-action-primary-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

.exec-assign .ea-action-primary-btn:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.98);
}

.exec-assign .ea-action-primary-btn:focus-visible {
  outline: 2px solid rgba(220, 38, 38, 0.55);
  outline-offset: 2px;
}

.exec-assign .ea-action-primary-btn:disabled {
  cursor: not-allowed;
  color: var(--theme-gray-400);
  background: linear-gradient(180deg, var(--theme-gray-100) 0%, var(--theme-gray-200) 100%);
  box-shadow: none;
  filter: none;
  transform: none;
  opacity: 0.85;
}

/* Table + loading */
.exec-assign .ea-table-panel.uv-table-card {
  border: 1px solid var(--ea-line, #e2e8f0);
  border-radius: var(--ea-radius-lg, 16px);
  background: var(--ea-surface, #fff);
  padding: 0;
  overflow: visible;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  gap: 0;
}

.exec-assign .ea-table-panel .uv-table-wrapper {
  border-radius: var(--ea-radius-lg, 16px) var(--ea-radius-lg, 16px) 0 0;
  overflow-x: auto;
}

.exec-assign .ea-table-panel .uv-table th {
  background: var(--ea-subtle, #f8fafc);
  color: #475569;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--ea-line, #e2e8f0);
  padding: 14px 12px;
}

.exec-assign .ea-table-panel .uv-table td {
  padding: 13px 12px;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
}

.exec-assign .ea-table-panel .uv-table tbody tr:hover td {
  background: rgba(248, 250, 252, 0.95);
}

.exec-assign .ea-table-panel .uv-table-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--ea-line, #e2e8f0);
  background: var(--ea-subtle, #f8fafc);
}

.exec-assign .ea-table-panel .uv-table-meta {
  font-size: 13px;
  color: var(--ea-muted, #64748b);
  font-weight: 500;
}

.exec-assign .ea-verifier-return-note {
  max-width: 260px;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.exec-assign .ea-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 56px 24px;
  color: var(--ea-muted, #64748b);
  font-size: 15px;
  font-weight: 500;
}

.exec-assign .ea-loading-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--theme-red);
  border-radius: 50%;
  animation: ea-assign-spin 0.75s linear infinite;
}

@keyframes ea-assign-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .exec-assign .ea-hero {
    padding: 18px 18px 20px;
  }

  .exec-assign .ea-hero-actions {
    width: 100%;
  }

  .exec-assign .ea-nav-btn {
    flex: 1 1 auto;
    min-width: 0;
  }
}
