/* Resourcing → Activity workspace */

.resource-command-page.is-activity .resource-cmd-header-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.resource-command-page.is-activity .resource-cmd-header-copy p {
  max-width: none;
}

.resource-command-page.is-activity .resource-command {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
}

.resource-command-page.is-activity .resource-tab-body,
.resource-command-page.is-activity .resource-command-main {
  min-width: 0;
}

.resource-command-page.is-activity .resource-cmd-rail.resource-act-rail {
  width: 280px;
  max-width: 280px;
  min-width: 0;
}

.resource-act-workspace {
  --act-placeholder: var(--text-muted, #999994);
  --act-tone-agent: #b7a4d8;
  --act-tone-agent-bg: rgba(155, 130, 196, 0.12);
  --act-tone-agent-border: rgba(155, 130, 196, 0.26);
  --act-tone-sync: #8aa4c4;
  --act-tone-sync-bg: rgba(90, 130, 176, 0.12);
  --act-tone-sync-border: rgba(90, 130, 176, 0.26);
  --act-tone-staffing: var(--resource-gold, var(--brand-gold, #c9a96e));
  --act-tone-staffing-bg: rgba(201, 169, 110, 0.12);
  --act-tone-staffing-border: rgba(201, 169, 110, 0.28);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  width: 100%;
}

.resource-act-card {
  padding: 16px 18px 14px;
  border: 1px solid rgba(201, 169, 110, 0.22);
  border-radius: 4px;
  background: #101010;
  min-width: 0;
}

.resource-act-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  margin-bottom: 12px;
}

.resource-act-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--resource-gold, #c9a96e);
}

.resource-act-card-copy p {
  margin: 0;
  max-width: 72ch;
  font-size: 11px;
  line-height: 1.45;
  color: var(--resource-muted, #8a9099);
}

.resource-act-card-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.app-shell .secondary-btn.resource-act-export,
.theme-dark .secondary-btn.resource-act-export,
.resource-act-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--resource-gold, var(--brand-gold, #c9a96e));
  background:
    linear-gradient(
      118deg,
      rgba(201, 169, 110, 0.16) 0%,
      rgba(201, 169, 110, 0.05) 48%,
      rgba(201, 169, 110, 0.12) 100%
    );
  border: 1px solid rgba(201, 169, 110, 0.42);
}

.app-shell .secondary-btn.resource-act-export:hover:not(:disabled),
.theme-dark .secondary-btn.resource-act-export:hover:not(:disabled),
.resource-act-export:hover:not(:disabled) {
  border-color: rgba(201, 169, 110, 0.68);
  background:
    linear-gradient(
      118deg,
      rgba(201, 169, 110, 0.24) 0%,
      rgba(201, 169, 110, 0.08) 48%,
      rgba(201, 169, 110, 0.18) 100%
    );
}

.app-shell .secondary-btn.resource-act-export:active:not(:disabled),
.resource-act-export:active:not(:disabled) {
  background:
    linear-gradient(
      118deg,
      rgba(201, 169, 110, 0.12) 0%,
      rgba(201, 169, 110, 0.04) 100%
    );
}

.app-shell .secondary-btn.resource-act-export:disabled,
.resource-act-export:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.resource-act-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.resource-act-chip {
  appearance: none;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 3px;
  background: #0c0c0c;
  color: #8a8480;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.resource-act-chip:hover,
.resource-act-chip:focus-visible {
  color: var(--resource-gold, #c9a96e);
  outline: none;
}

.resource-act-chip.is-sync {
  color: var(--act-tone-sync);
}

.resource-act-chip.is-staffing {
  color: var(--act-tone-staffing);
}

.resource-act-chip.is-agent {
  color: var(--act-tone-agent);
}

.resource-act-chip.is-active {
  border-color: var(--resource-gold, #c9a96e);
  background: rgba(201, 169, 110, 0.08);
  color: var(--resource-gold, #c9a96e);
}

.resource-act-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 132px) minmax(0, 132px) minmax(0, 132px) auto 22px;
  gap: 8px 10px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 0 10px;
}

.resource-act-search,
.resource-act-filter,
.resource-act-clear {
  min-width: 0;
}

.resource-act-search {
  position: relative;
}

.resource-act-search-icon {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  color: #8a8480;
  pointer-events: none;
}

.resource-act-search input,
.resource-act-filters select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(201, 169, 110, 0.22);
  border-radius: 3px;
  background: #0c0c0c;
  color: var(--text-secondary, #c8c0b0);
  font: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
  color-scheme: dark;
  accent-color: var(--resource-gold, var(--brand-gold, #c9a96e));
}

.resource-act-search input {
  padding-left: 32px;
}

.resource-act-search input::placeholder,
.resource-act-filters select.is-placeholder {
  color: var(--act-placeholder, var(--text-muted, #999994));
}

.resource-act-search input:focus,
.resource-act-filters select:focus,
.resource-act-chip:focus-visible,
.resource-act-page-btn:focus-visible,
.resource-act-row:focus-visible,
.resource-act-link:focus-visible,
.resource-act-clear:focus-visible {
  outline: 1px solid rgba(201, 169, 110, 0.7);
  outline-offset: 1px;
}

.app-shell .resource-act-clear,
.resource-act-clear {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--resource-gold, #c9a96e);
  font: inherit;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
  height: 36px;
  padding: 0 8px;
  margin: 0;
  justify-self: start;
  white-space: nowrap;
}

.resource-act-clear:not(.is-active) {
  opacity: 0.72;
}

.resource-act-table-wrap {
  overflow-x: auto;
  min-width: 0;
}

.resource-act-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.resource-act-col-date { width: 16%; }
.resource-act-col-action { width: 15%; }
.resource-act-col-details { width: 28%; }
.resource-act-col-user { width: 11%; }
.resource-act-col-impact { width: 11%; }
.resource-act-col-related { width: 11%; }
.resource-act-col-status { width: 8%; }

.app-shell .resource-act-table th,
.app-shell .resource-act-table td,
.resource-act-table th,
.resource-act-table td {
  overflow: hidden;
  vertical-align: middle;
}

.app-shell .resource-act-table th,
.resource-act-table th {
  height: 36px;
  padding: 0 8px;
  text-align: left;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8480;
  border-bottom: 1px solid rgba(201, 169, 110, 0.18);
  white-space: nowrap;
}

.app-shell .resource-act-table td,
.resource-act-table td {
  height: 50px;
  max-height: 62px;
  padding: 8px;
  font-size: 11px;
  line-height: 1.35;
  border-bottom: 1px solid rgba(201, 169, 110, 0.12);
}

.resource-act-row {
  cursor: pointer;
}

.resource-act-row:hover {
  background: rgba(201, 169, 110, 0.04);
}

.resource-act-date time {
  display: block;
  font-size: 11px;
  color: #d8d0c4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-act-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  height: 22px;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.resource-act-action-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.resource-act-action-icon svg {
  width: 12px;
  height: 12px;
}

.resource-act-action.is-agent {
  color: var(--act-tone-agent);
  background: var(--act-tone-agent-bg);
  border: 1px solid var(--act-tone-agent-border);
}

.resource-act-action.is-sync {
  color: var(--act-tone-sync);
  background: var(--act-tone-sync-bg);
  border: 1px solid var(--act-tone-sync-border);
}

.resource-act-action.is-staffing {
  color: var(--act-tone-staffing);
  background: var(--act-tone-staffing-bg);
  border: 1px solid var(--act-tone-staffing-border);
}

.app-shell .resource-act-table .resource-act-primary,
.resource-act-table .resource-act-primary {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: #f3efe6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-shell .resource-act-table .resource-act-secondary,
.app-shell .resource-act-table .resource-act-actor-meta,
.resource-act-table .resource-act-secondary,
.resource-act-table .resource-act-actor-meta {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.3;
  color: #8a8480;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .resource-act-table .resource-act-user,
.app-shell .resource-act-table .resource-act-impact,
.app-shell .resource-act-table .resource-act-related,
.resource-act-table .resource-act-user,
.resource-act-table .resource-act-impact,
.resource-act-table .resource-act-related {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-act-muted {
  color: #8a8480;
}

.resource-act-link {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--resource-gold, #c9a96e);
  font: inherit;
  font-size: 11px;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.resource-act-status-cell {
  white-space: nowrap;
}

.resource-act-status {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  border: 1px solid rgba(201, 169, 110, 0.28);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d8d0c4;
  white-space: nowrap;
}

.resource-act-status.is-completed,
.resource-act-status.is-applied {
  border-color: rgba(90, 150, 110, 0.55);
  color: #8fbf9a;
}

.resource-act-status.is-pending {
  border-color: rgba(201, 169, 110, 0.55);
  color: var(--resource-gold, #c9a96e);
}

.resource-act-status.is-failed,
.resource-act-status.is-rejected {
  border-color: rgba(180, 80, 70, 0.55);
  color: #d08a82;
}

.resource-act-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(201, 169, 110, 0.16);
}

.resource-act-pager-meta {
  margin: 0;
  font-size: 11px;
  color: #8a8480;
}

.resource-act-pager-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.resource-act-page-btn {
  min-width: 30px;
  height: 30px;
  border: 1px solid rgba(201, 169, 110, 0.28);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.resource-act-page-btn.is-current {
  border-color: var(--resource-gold, #c9a96e);
  color: var(--resource-gold, #c9a96e);
}

.resource-act-page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.resource-act-empty {
  padding: 28px 8px;
  text-align: left;
}

.resource-act-empty strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.resource-act-empty p {
  margin: 0 0 10px;
  font-size: 12px;
  color: #8a8480;
}

.resource-act-rail-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--resource-gold, #c9a96e);
}

.resource-act-insight-list,
.resource-act-action-list,
.resource-act-link-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.resource-act-insight,
.resource-act-action-list button,
.resource-act-link-list button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid rgba(201, 169, 110, 0.1);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
}

.resource-act-insight {
  min-height: 56px;
}

.resource-act-rail-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--resource-gold, #c9a96e);
}

.resource-act-insight-copy {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
}

.resource-act-chevron {
  margin-left: auto;
  color: #8a8480;
}

.resource-act-insight.is-critical {
  color: #d08a82;
}

.resource-act-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.55);
}

.resource-act-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 41;
  width: min(480px, 100vw);
  height: 100vh;
  overflow: auto;
  padding: 20px 22px 32px;
  border-left: 1px solid rgba(201, 169, 110, 0.22);
  background: #0c0c0c;
}

.resource-act-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.resource-act-drawer-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 500;
}

.resource-act-drawer-section {
  margin-bottom: 18px;
}

.resource-act-drawer-section h3 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--resource-gold, #c9a96e);
}

.resource-act-drawer-section p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.resource-act-drawer-section dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.resource-act-drawer-section dl div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  font-size: 12px;
}

.resource-act-drawer-section dt {
  color: #8a8480;
}

.resource-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.theme-light .resource-act-card,
.theme-light .resource-act-drawer,
.theme-light .resource-act-search input,
.theme-light .resource-act-filters select,
.theme-light .resource-act-chip {
  background: var(--panel-bg, #fff);
}

@media (max-width: 1280px) {
  .resource-command-page.is-activity .resource-command {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .resource-command-page.is-activity .resource-cmd-rail.resource-act-rail {
    width: 260px;
    max-width: 260px;
  }
}

@media (max-width: 1100px) {
  .resource-command-page.is-activity .resource-command,
  .resource-command:has(.resource-act-workspace) {
    grid-template-columns: minmax(0, 1fr);
  }

  .resource-command-page.is-activity .resource-cmd-rail.resource-act-rail,
  .resource-act-rail {
    position: static;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 1180px) {
  .resource-command-page.is-activity .resource-act-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto 22px;
  }

  .resource-command-page.is-activity .resource-act-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .resource-act-card-head,
  .resource-act-pager {
    flex-direction: column;
    align-items: stretch;
  }

  .resource-act-filters,
  .resource-command-page.is-activity .resource-act-filters {
    grid-template-columns: 1fr;
  }

  .resource-act-search,
  .resource-command-page.is-activity .resource-act-search,
  .resource-act-clear,
  .resource-command-page.is-activity .resource-act-clear {
    grid-column: auto;
    justify-self: start;
  }

  .resource-act-drawer {
    width: 100vw;
  }
}
