
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.listing-table-card {
  max-width: 100%;
  min-width: 0;
  overflow: auto hidden;
  border-color: rgba(128, 159, 196, 0.38);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 34px rgba(26, 79, 139, 0.08);
}

.admin-table-card {
  border-color: rgba(104, 139, 183, 0.28);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 30px rgba(26, 79, 139, 0.07);
}

.admin-type-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.admin-type-filter-btn {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid rgba(128, 159, 196, 0.22);
  border-radius: 999px;
  background: rgba(232, 241, 255, 0.74);
  color: #1a4f8b;
  font-size: 0.88rem;
  font-weight: 700;
}

.admin-type-filter-btn.is-active {
  background: #1a4f8b;
  color: #fff;
}

.modal-dialog {
  width: min(500px, calc(100vw - 28px));
  border: 0;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 24px 60px rgba(17, 32, 49, 0.24);
}

.modal-dialog::backdrop {
  background: rgba(17, 32, 49, 0.45);
}

.danger-summary {
  border-color: #fecaca;
  background: #fff5f5;
  color: #991b1b;
}

.modal-form {
  padding: 16px;
  background: #fff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.data-table th,
.data-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #f7fbff;
  color: #1a4f8b;
  font-size: 0.92rem;
}

.data-table tbody tr:hover {
  background: #fbfdff;
}

.admin-table-card .data-table th,
.admin-table-card .data-table td {
  padding: 9px 10px;
  vertical-align: middle;
}

.admin-table-card .data-table th {
  border-bottom-color: rgba(128, 159, 196, 0.26);
  background: rgba(247, 251, 255, 0.72);
}

.admin-table-card .data-table tbody tr {
  transition: background 0.14s ease;
}

.admin-table-card .inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-table-card .inline-actions button {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
  font-size: 0.88rem;
}

.admin-table-card .inline-actions .secondary-btn {
  border-color: rgba(82, 103, 129, 0.18);
  background: #edf4ff;
  color: #1a4f8b;
}

.admin-table-card .inline-actions .secondary-btn:hover,
.admin-table-card .inline-actions .secondary-btn:focus-visible {
  border-color: rgba(26, 79, 139, 0.32);
  background: #e4f0ff;
}

.admin-table-card .inline-actions .danger-btn {
  border-color: rgba(179, 41, 41, 0.2);
  background: #fff1f1;
  color: #b32929;
}

.admin-table-card .inline-actions .danger-btn:hover,
.admin-table-card .inline-actions .danger-btn:focus-visible {
  border-color: rgba(179, 41, 41, 0.36);
  background: #ffe8e8;
}

.admin-primary-title {
  display: block;
  color: #143a67;
}

.admin-muted-meta {
  display: block;
  margin-top: 2px;
  color: #526981;
  font-size: 0.82rem;
  line-height: 1.35;
}

.reply-email-admin-panel {
  margin-top: 16px;
}

.emails-panel {
  max-width: 1120px;
}

.email-config-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(260px, 1fr);
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.email-config-toolbar .status {
  min-height: 0;
  margin: 0 0 4px;
  line-height: 1.35;
}

.reply-email-form-grid input[type="email"] {
  min-height: 38px;
  height: 38px;
}

.reply-email-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.reply-email-admin-header h3 {
  margin: 0;
  color: #12477d;
  font-size: 1rem;
}

.reply-email-table-card {
  margin-top: 12px;
  overflow-x: hidden;
}

.reply-email-admin-table {
  min-width: 0;
  table-layout: fixed;
}

.reply-email-admin-table th:nth-child(1),
.reply-email-admin-table td:nth-child(1) {
  width: 34%;
}

.reply-email-admin-table th:nth-child(2),
.reply-email-admin-table td:nth-child(2) {
  width: auto;
}

.reply-email-admin-table th:nth-child(3),
.reply-email-admin-table td:nth-child(3) {
  width: 136px;
}

.reply-email-admin-table th:nth-child(4),
.reply-email-admin-table td:nth-child(4) {
  width: 132px;
}

.reply-email-admin-table .admin-muted-meta,
.reply-email-address {
  overflow-wrap: anywhere;
}

.reply-email-status-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.email-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 2px 0 10px;
  color: #526981;
  font-size: 0.86rem;
  font-weight: 700;
}

.email-status-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.email-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #87909a;
}

.email-status-dot.is-sent {
  background: #34a853;
}

.email-status-dot.is-pending {
  background: #d89b16;
}

.email-status-dot.is-muted {
  background: #8f9388;
}

.email-status-dot.is-error {
  background: #e34b4b;
}

.certificates-table {
  min-width: 1180px;
}

.certificates-table th,
.certificates-table td {
  overflow-wrap: anywhere;
}

.certificates-table th {
  white-space: nowrap;
}

.certificates-table .cert-col-select {
  min-width: 42px;
  width: 42px;
  text-align: center;
}

.certificates-table .cert-col-select input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #145491;
  cursor: pointer;
}

.certificates-table .cert-col-code {
  min-width: 132px;
  width: 132px;
  white-space: nowrap;
}

.certificates-table .cert-col-participant,
.certificates-table .cert-name-cell {
  min-width: 220px;
  width: 24%;
}

.certificates-table .cert-col-course {
  min-width: 240px;
  width: 26%;
}

.certificates-table .cert-col-secondary {
  min-width: 118px;
}

.certificates-table th.cert-col-secondary,
.certificates-table td.cert-col-secondary {
  white-space: nowrap;
}

.certificates-table .cert-col-email-status {
  min-width: 130px;
  width: 130px;
  white-space: nowrap;
}

.cert-name-title {
  display: block;
  margin-bottom: 2px;
  color: #143a67;
  white-space: normal;
}

.cert-trash-meta {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.cert-email-meta {
  display: block;
  margin-top: 1px;
  color: #526981;
  font-size: 0.82rem;
  line-height: 1.35;
  word-break: break-word;
}

.cert-email-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  padding: 7px 10px;
  border: 1px solid rgba(128, 159, 196, 0.42);
  border-radius: 9px;
  background: #fff;
  color: #1f3654;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.cert-email-status-badge.is-sent {
  border-color: rgba(52, 168, 83, 0.26);
  background: #edf9f0;
  color: #087a35;
}

.cert-email-status-badge.is-pending {
  border-color: rgba(216, 155, 22, 0.28);
  background: #fff8e8;
  color: #8b5d00;
}

.cert-email-status-badge.is-muted {
  border-color: rgba(143, 147, 136, 0.24);
  background: #f4f4ef;
  color: #555a50;
}

.cert-email-status-badge.is-error {
  border-color: rgba(227, 75, 75, 0.28);
  background: #fff1f1;
  color: #b32929;
}

.table-mobile-meta {
  display: none;
}

.table-mobile-meta-item {
  display: block;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.35;
}

.cert-actions {
  align-items: center;
  flex-wrap: nowrap;
  min-width: 142px;
}

.certificates-table .cert-col-actions {
  min-width: 142px;
  width: 142px;
}

.user-admin-table {
  min-width: 920px;
}

.secretaria-admin-table {
  min-width: 620px;
}

.template-admin-table,
.asset-admin-table {
  min-width: 980px;
}

.user-admin-table th:nth-child(1),
.user-admin-table td:nth-child(1) {
  min-width: 210px;
}

.user-admin-table th:nth-child(4),
.user-admin-table td:nth-child(4) {
  min-width: 220px;
}

.template-admin-table th:nth-child(2),
.template-admin-table td:nth-child(2),
.asset-admin-table th:nth-child(3),
.asset-admin-table td:nth-child(3) {
  min-width: 220px;
}

.user-admin-table th:last-child,
.user-admin-table td:last-child,
.secretaria-admin-table th:last-child,
.secretaria-admin-table td:last-child {
  width: 148px;
  min-width: 148px;
}

.template-admin-table th:last-child,
.template-admin-table td:last-child,
.asset-admin-table th:last-child,
.asset-admin-table td:last-child {
  width: 190px;
  min-width: 190px;
}

.audit-table {
  min-width: 980px;
}

.audit-table th:nth-child(1),
.audit-table td:nth-child(1) {
  width: 150px;
  white-space: nowrap;
}

.audit-table th:nth-child(2),
.audit-table td:nth-child(2) {
  width: 168px;
}

.audit-table th:nth-child(3),
.audit-table td:nth-child(3) {
  width: 132px;
}

.audit-table th:nth-child(4),
.audit-table td:nth-child(4) {
  width: 96px;
}

.audit-table th:nth-child(5),
.audit-table td:nth-child(5) {
  width: 132px;
}

.audit-table th:nth-child(6),
.audit-table td:nth-child(6) {
  min-width: 320px;
  width: 38%;
}

.audit-table td:nth-child(3),
.audit-table td:nth-child(4),
.audit-table td:nth-child(5) {
  color: var(--muted);
  font-size: 0.88rem;
}

.audit-table td:nth-child(4),
.audit-table td:nth-child(5) {
  white-space: nowrap;
}

.audit-table td:nth-child(6) {
  color: #1f3654;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.audit-table .code-chip {
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 16px;
}

.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-actions button {
  padding: 8px 10px;
}

.icon-btn {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: #1a4f8b;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  border-color: #9dbce3;
  background: #f2f7ff;
  box-shadow: 0 0 0 3px rgba(11, 110, 253, 0.12);
}

.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.icon-btn-svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.action-menu {
  flex: 0 0 auto;
  position: relative;
}

.action-menu summary {
  list-style: none;
}

.action-menu summary::-webkit-details-marker {
  display: none;
}

.action-menu-content {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(17, 56, 108, 0.14);
}

.action-menu:not([open]) .action-menu-content {
  display: none;
}

.action-menu-item {
  width: 100%;
  justify-content: flex-start;
  border-radius: 8px;
  background: transparent;
  color: #1f3654;
}

.action-menu-item:hover,
.action-menu-item:focus-visible {
  background: #f2f7ff;
}

.action-menu-item.danger-action {
  color: #b32929;
}

.action-menu-item.danger-action:hover,
.action-menu-item.danger-action:focus-visible {
  background: #fff1f1;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.pagination-indicator {
  color: var(--muted);
  font-weight: 600;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-pill.ok {
  background: #e8f7ee;
  color: #12763a;
}

.status-pill.warn {
  background: #fff4dd;
  color: #9a6700;
}

.code-chip {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f2f7ff;
  color: #1a4f8b;
  font-weight: 700;
  white-space: nowrap;
}

#canvas {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 168px);
  height: auto;
  border: 0;
  border-radius: 6px;
  background: #fff;
}
