/* Halaman master data (card + tabel + drawer form) meniru tampilan Vuexy di dalam shell omnichannel platform. */
.page {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  padding: 22px 26px 40px;
  font-family: var(--font-shell);
  color: var(--text);
  background: var(--page-bg);
}

.page__bar {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.page__title {
  font-size: var(--fs-xl);
  font-weight: 700;
}

.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xs);
  background: var(--surface);
  box-shadow: 0 4px 24px 0 rgb(34 41 47 / 10%);
}

.card__toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
  gap: 16px;
  align-items: center;
  padding: 20px;
}

.card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 28px 20px;
  color: var(--text-muted);
}

.entries {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-md);
  white-space: nowrap;
}

.entries .select {
  width: 90px;
}

.card__search {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
}

.card__search .input {
  max-width: 320px;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-base);
}

.table th {
  padding: 10px 28px;
  border-bottom: 2px solid var(--border);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-secondary);
  background: var(--surface-muted);
}

.table td {
  padding: 10px 28px;
  border-top: 1px solid var(--border-soft);
  vertical-align: middle;
  white-space: nowrap;
}

.table tbody tr:hover {
  background: #f6f6f9;
}

.table__sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}

.table__sort .icon {
  width: 14px;
  height: 14px;
  color: var(--text-faint);
}

.table th[aria-sort="ascending"] .icon,
.table th[aria-sort="descending"] .icon {
  color: var(--text-secondary);
}

.table th[aria-sort="descending"] .icon {
  transform: rotate(180deg);
}

.table__empty {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
}

.table__actions {
  width: 1%;
  text-align: right;
}

.stage {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stage__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgb(130 134 139 / 12%);
}

.stage__dot--on {
  background: var(--nav-badge);
}

.stage .pill {
  margin-left: 4px;
  text-transform: capitalize;
}

.pagination {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius-full);
  background: var(--surface-muted);
}

.pagination__item {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-secondary);
}

.pagination__item:hover:not(:disabled) {
  color: var(--nav-badge);
}

.pagination__item:disabled {
  color: var(--text-faint);
}

.pagination__item[aria-current="page"] {
  color: #fff;
  background: var(--nav-badge);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgb(23 19 15 / 45%);
  animation: fade-in var(--duration) var(--ease);
}

.drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(30rem, 100%);
  font-family: var(--font-shell);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: drawer-in 220ms var(--ease);
}

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: var(--surface-muted);
}

.drawer__title {
  font-size: var(--fs-lg);
  font-weight: 600;
}

.drawer__body {
  display: grid;
  gap: 14px;
  flex: 1;
  align-content: start;
  padding: 20px;
  overflow-y: auto;
}

.drawer__section {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--nav-badge);
}

.drawer__divider {
  height: 1px;
  margin: 2px 0;
  background: var(--border);
}

.drawer__actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.drawer .textarea {
  min-height: 62px;
  padding-block: 8px;
  resize: vertical;
}

.drawer .field__label--plain {
  color: #5e5873;
}

.field__error {
  font-size: var(--fs-sm);
  color: var(--red-500);
}

.input.is-invalid,
.select.is-invalid {
  border-color: var(--red-500);
}

.journey {
  display: flex;
  align-items: center;
  gap: 6px;
}

.journey .icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.linked {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #82868b;
  border-radius: var(--radius-xs);
  font-size: var(--fs-sm);
}

.repeat-block--bordered {
  border-color: #82868b;
  border-radius: var(--radius-xs);
}

@keyframes drawer-in {
  from {
    transform: translateX(100%);
  }

  to {
    transform: none;
  }
}

@media (max-width: 1099px) {
  .page {
    padding: 16px;
  }

  .page__bar {
    display: flex;
  }

  .card__toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .card__search {
    justify-content: flex-start;
  }

  .card__search .input {
    max-width: none;
  }

  .table th,
  .table td {
    padding-inline: 16px;
  }

  .card__footer {
    justify-content: center;
    padding-inline: 16px;
  }
}
