/*
 * Reusable work table surface used by the contact-center list as the first extraction step.
 */

.cc-work-table-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
}

.cc-work-table-section {
  padding: 0.75rem 1rem 1rem;
}

.cc-work-table-toolbar {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: #fff;
  position: relative;
  z-index: 2;
}

.cc-work-table-toolbar-left,
.cc-work-table-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cc-work-table-toolbar-right {
  gap: 0.35rem;
  justify-content: flex-end;
  flex: 1;
}

.cc-work-table-toolbar-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border: 1px solid var(--app-border, #e5e7eb);
  border-radius: var(--app-radius-xs, 0.4rem);
  background: var(--app-surface, #fff);
  color: var(--app-text-muted, #475569);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cc-work-table-toolbar-action:hover {
  border-color: var(--app-accent, #10b981);
  color: var(--app-accent-strong, #047857);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.1);
}

.cc-work-table-toolbar-action[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.cc-work-table-toolbar-action[disabled]:hover {
  border-color: var(--app-border, #e5e7eb);
  color: var(--app-text-muted, #475569);
}

.cc-work-table-toolbar-action .material-symbols-outlined {
  font-size: 0.95rem;
}

.cc-work-table-toolbar-action--icon {
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
}

.cc-work-table-toolbar-action--button {
  min-height: 1.9rem;
  padding: 0 0.65rem;
  font-size: 0.76rem;
  font-weight: 600;
}

.cc-work-table-toolbar-action.is-active {
  background: var(--app-accent, #10b981);
  border-color: var(--app-accent, #10b981);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.cc-work-table-toolbar-action.is-active:hover {
  background: var(--app-accent-strong, #047857);
  border-color: var(--app-accent-strong, #047857);
  color: #fff;
}

.cc-work-table-toolbar-badge {
  position: absolute;
  top: 0.1rem;
  right: 0.1rem;
  min-width: 0.9rem;
  height: 0.9rem;
  padding: 0 0.15rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cc-work-table-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #64748b;
  font-size: 0.76rem;
}

.cc-work-table-counter-label {
  font-weight: 500;
}

.cc-work-table-counter-value {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #059669;
  font-size: 0.76rem;
  font-weight: 700;
}

.cc-work-table-search-wrap {
  position: relative;
  width: 100%;
  max-width: 20rem;
}

.cc-work-table-search-icon {
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: #94a3b8;
  pointer-events: none;
}

.cc-work-table-search-input {
  width: 100%;
  padding: 0.3rem 1.8rem 0.3rem 1.9rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 0.38rem;
  font-size: 0.78rem;
  color: #334155;
  outline: none;
  transition: border-color 0.15s ease;
}

.cc-work-table-batch-wrap {
  position: relative;
}

.cc-work-table-search-input:focus {
  border-color: var(--cc-list-accent, #10b981);
}

.cc-work-table-search-clear {
  position: absolute;
  inset-block: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding-inline: 0.5rem;
  color: #94a3b8;
}

.cc-work-table-search-clear:hover {
  color: #475569;
}

.cc-work-table-search-clear-icon {
  font-size: 0.82rem;
}

.cc-work-table-active-bar {
  padding: 0.35rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
}

.cc-work-table-shell {
  overflow-x: auto;
}

.cc-work-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  text-align: left;
}

.cc-work-table-head {
  background: rgba(248, 250, 252, 0.9);
  position: sticky;
  top: 0;
  z-index: 1;
}

.cc-work-table-body {
  border-top: 0;
}

.cc-work-table-body tr + tr {
  border-top: 1px solid #e2e8f0;
}

.cc-work-table-row {
  transition: background-color 0.15s ease;
}

.cc-work-table-row:nth-child(odd) {
  background: #fff;
}

.cc-work-table-row:nth-child(even) {
  background: rgba(248, 250, 252, 0.72);
}

.cc-work-table-row:hover {
  background: rgba(236, 253, 245, 0.7);
}

.cc-work-table-th {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cc-work-table-th-id {
  width: 6rem;
}

.cc-work-table-cell-right {
  text-align: right;
}

.cc-work-table-cell-edge-right {
  padding-right: 0.4rem;
}

.cc-work-table-td {
  padding: 0.375rem 0.75rem;
  color: #475569;
  font-size: 0.75rem;
}

.cc-work-table-td-nowrap {
  white-space: nowrap;
}

.cc-work-table-td-muted {
  color: #64748b;
}

.cc-work-table-td-soft {
  color: #94a3b8;
}

.cc-work-table-td-strong {
  color: #1e293b;
  font-weight: 600;
}

.cc-work-table-id-link {
  color: #059669;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
}

.cc-work-table-id-link:hover {
  color: #047857;
}

.cc-work-table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.cc-work-table-action {
  min-height: 1.75rem;
  padding: 0.22rem 0.55rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  white-space: nowrap;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.cc-work-table-action:hover {
  border-color: var(--cc-list-accent, #10b981);
  color: #047857;
}

.cc-work-table-action .material-symbols-outlined {
  font-size: 0.95rem;
}

.cc-work-table-action--icon {
  min-width: 1.85rem;
  padding-inline: 0.42rem;
}

.cc-work-table-action--danger {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.cc-work-table-action--danger:hover {
  border-color: #fb7185;
  color: #9f1239;
}

.cc-work-table-action--info {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
}

.cc-work-table-action--info:hover {
  border-color: #7dd3fc;
  color: #075985;
}

.cc-work-table-action--download {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.cc-work-table-action--download:hover {
  border-color: #fda4af;
  color: #9f1239;
}

.cc-work-table-action:disabled,
.cc-work-table-action.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cc-work-table-status-row td {
  padding: 2.5rem 1rem;
  text-align: center;
  font-size: 0.82rem;
}

.cc-work-table-status-loading td,
.cc-work-table-status-empty td {
  color: #94a3b8;
}

.cc-work-table-status-error td {
  color: #b91c1c;
}

.cc-work-table-pagination-bar {
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid #f1f5f9;
  background: #fff;
}

.cc-work-table-page-size {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #64748b;
  font-size: 0.76rem;
}

.cc-work-table-page-size-select {
  padding: 0.18rem 0.45rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.32rem;
  font-size: 0.76rem;
  color: #475569;
  outline: none;
}

.cc-work-table-page-size-select:focus {
  border-color: var(--cc-list-accent, #10b981);
}

.cc-work-table-pagination {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cc-work-table-pagination-info {
  margin-right: 0.35rem;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
}

.cc-work-table-pagination-dots {
  padding: 0 0.15rem;
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.7rem;
}

.cc-work-table-pagination-btn {
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.3rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.35rem;
  background: #fff;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
}

.cc-work-table-pagination-btn:hover {
  border-color: var(--cc-list-accent, #10b981);
  color: #059669;
}

.cc-work-table-pagination-btn.is-active {
  border-color: var(--cc-list-accent, #10b981);
  background: var(--cc-list-accent, #10b981);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.cc-work-table-pagination-btn:disabled,
.cc-work-table-pagination-btn.is-disabled {
  border-color: #f1f5f9;
  background: #f8fafc;
  color: #cbd5e1;
  cursor: not-allowed;
  box-shadow: none;
}

.cc-table-select-cell {
  width: 3rem;
  min-width: 3rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  text-align: center;
}

.cc-table-select-checkbox {
  margin: 0 auto;
}

.cc-work-table-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}

.cc-work-table-modal-backdrop.is-open {
  display: flex;
}

.cc-work-table-modal {
  width: min(520px, 100%);
  max-height: min(80vh, 760px);
  border: 1px solid #e5e7eb;
  border-radius: 0.95rem;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16), 0 10px 26px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cc-work-table-modal-head,
.cc-work-table-modal-body,
.cc-work-table-modal-foot {
  padding: 1rem 1.1rem;
}

.cc-work-table-modal-head {
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.cc-work-table-modal-title {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
}

.cc-work-table-modal-subtitle {
  margin: 0.22rem 0 0;
  color: #64748b;
  font-size: 0.76rem;
}

.cc-work-table-modal-close {
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cc-work-table-modal-body {
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.55;
  overflow: auto;
}

.cc-work-table-modal-foot {
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  background: #f8fafc;
}

.cc-work-table-modal-btn {
  min-height: 2rem;
  padding: 0.42rem 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
}

.cc-work-table-modal-btn-primary {
  border-color: var(--cc-list-accent, #10b981);
  background: var(--cc-list-accent, #10b981);
  color: #fff;
}

.cc-work-table-modal-btn-danger {
  border-color: #f43f5e;
  background: #e11d48;
  color: #fff;
}

.cc-work-table-modal-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cc-work-table-modal-item {
  border: 1px solid #e5e7eb;
  border-radius: 0.8rem;
  background: #f8fafc;
  padding: 0.85rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cc-work-table-modal-item-main {
  min-width: 0;
}

.cc-work-table-modal-item-title {
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 700;
}

.cc-work-table-modal-item-meta {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.74rem;
}
