:root {
  --color-primary: #9463ae;
  --color-primary-hover: #7f4e9a;
  --color-primary-active: #693d82;
  --color-primary-subtle: #f5eff8;
  --color-secondary: #2f5aae;
  --color-secondary-hover: #274d98;
  --color-secondary-active: #203f7d;
  --color-secondary-subtle: #eef3fc;
  --color-accent: #4583ff;
  --color-accent-hover: #286aec;
  --color-accent-active: #1553c7;
  --color-accent-subtle: #edf3ff;
  --color-background: #f8fafc;
  --color-surface: #fff;
  --color-border: #e2e8f0;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-success: #15803d;
  --color-warning: #a16207;
  --color-danger: #b42318;
  --color-info: #1553c7;
  --font-sans: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgb(15 23 42/8%);
  --shadow-md: 0 6px 16px rgb(15 23 42/12%);
  --focus-ring: 0 0 0 3px rgb(69 131 255/35%);
}
html {
  color-scheme: light;
}
body {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}
button,
a,
input,
select,
textarea {
  transition:
    color 0.18s ease-out,
    background-color 0.18s ease-out,
    border-color 0.18s ease-out,
    box-shadow 0.18s ease-out,
    transform 0.18s ease-out;
}
button,
input,
select,
textarea {
  min-height: 40px;
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border-color: var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid transparent !important;
  box-shadow: var(--focus-ring) !important;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-accent) !important;
}
thead {
  background: var(--color-primary-subtle) !important;
  color: var(--color-primary-active) !important;
}
tbody tr:hover {
  background: var(--color-accent-subtle);
}
a.text-blue-600,
a.text-blue-700 {
  color: var(--color-accent-active) !important;
}
button:disabled,
input:disabled,
select:disabled {
  background: var(--color-background);
  cursor: not-allowed;
  opacity: 0.7;
}
.swal2-popup {
  border-radius: var(--radius-lg) !important;
}
.swal2-confirm {
  border-radius: var(--radius-md) !important;
}
.swal2-cancel {
  border-radius: var(--radius-md) !important;
}
.hover\:bg-blue-800:hover {
  background: var(--color-primary-hover) !important;
}
.hover\:bg-blue-50:hover {
  background: var(--color-primary-subtle) !important;
}
.action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
/* Keep absolutely positioned accessible labels inside horizontally scrolling tables. */
.overflow-x-auto { position: relative; max-width: 100%; }
.action-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 8px 15px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.action-button:hover {
  transform: translateY(-1px);
}
.action-button:active {
  transform: translateY(0);
}
.action-button--sm {
  min-height: 34px !important;
  padding: 5px 11px !important;
  font-size: 13px !important;
  border-radius: 6px !important;
  line-height: 18px !important;
}
.action-button--lg {
  min-height: 46px !important;
  padding: 11px 22px !important;
  font-size: 15px !important;
  border-radius: 8px !important;
}
.action-button--primary {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff !important;
  box-shadow: 0 1px 3px rgb(148 99 174 / 20%);
}
.action-button--primary:hover {
  border-color: var(--color-primary-hover);
  background: var(--color-primary-hover);
  color: #fff !important;
  box-shadow: 0 4px 12px rgb(148 99 174 / 30%);
}
.action-button--primary:active {
  border-color: var(--color-primary-active);
  background: var(--color-primary-active);
}
.action-button--secondary {
  border-color: var(--color-border);
  background: #fff;
  color: var(--color-text) !important;
  box-shadow: var(--shadow-sm);
}
.action-button--secondary:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
  color: var(--color-primary-active) !important;
  box-shadow: 0 4px 12px rgb(15 23 42 / 6%);
}
.action-button--secondary:active {
  background: #ebdff1;
}
.action-button--info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8 !important;
}
.action-button--info:hover {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff !important;
  box-shadow: 0 4px 12px rgb(37 99 235 / 25%);
}
.action-button--info:active {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff !important;
}
.action-button--danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: var(--color-danger) !important;
}
.action-button--danger:hover {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff !important;
  box-shadow: 0 4px 12px rgb(220 38 38 / 25%);
}
.action-button--danger:active {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #fff !important;
}
.action-button--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--color-success) !important;
}
.action-button--success:hover {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff !important;
  box-shadow: 0 4px 12px rgb(22 163 74 / 25%);
}
.action-button--success:active {
  border-color: #15803d;
  background: #15803d;
  color: #fff !important;
}
.action-button--warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: var(--color-warning) !important;
}
.action-button--warning:hover {
  border-color: #d97706;
  background: #d97706;
  color: #fff !important;
  box-shadow: 0 4px 12px rgb(217 119 6 / 25%);
}
.action-button--warning:active {
  border-color: #b45309;
  background: #b45309;
  color: #fff !important;
}
.action-button:focus-visible {
  outline: 2px solid var(--color-accent) !important;
  outline-offset: 2px;
  box-shadow: var(--focus-ring) !important;
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.admin-badge--pending {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.admin-badge--approved {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.admin-badge--rejected {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}
.admin-badge--info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}
.admin-badge--purple {
  background: #f5eff8;
  border-color: #e5d6ed;
  color: #693d82;
}
.admin-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.admin-badge--pending .admin-badge-dot { background: #d97706; }
.admin-badge--approved .admin-badge-dot { background: #16a34a; }
.admin-badge--rejected .admin-badge-dot { background: #dc2626; }
.admin-badge--info .admin-badge-dot { background: #2563eb; }
.admin-badge--purple .admin-badge-dot { background: #9463ae; }
.admin-form-layout { width: 100%; max-width: 672px; margin-inline: auto; }
.admin-form-card {
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.admin-form-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; color: var(--color-primary-active); }
.admin-data-form { display: grid; gap: 20px; margin-top: 24px; }
.admin-data-form > label { min-width: 0; font-size: 14px; line-height: 20px; }
.admin-data-form > label > span { margin-bottom: 8px; font-size: 14px; line-height: 20px; font-weight: 600; }
.admin-data-form small { font-size: 14px; line-height: 20px; }
.admin-data-form input:not([type="hidden"]):not([type="checkbox"]),
.admin-data-form select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
  line-height: 24px;
}
.admin-form-checkbox { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.admin-form-checkbox input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; flex-shrink: 0; accent-color: var(--color-primary); }
.admin-form-actions { gap: 12px; padding-top: 20px; border-top: 1px solid var(--color-border); }
.admin-primary-actions .admin-form-layout .action-button { min-height: 48px; padding: 12px 20px; font-size: 14px; line-height: 20px; border-radius: 8px; }
.admin-form-actions .action-button { min-width: 120px; }
@media (max-width: 640px) {
  .admin-form-card { padding: 20px; }
  .admin-form-actions .action-button { flex: 1; min-width: 0; }
}
.registration-detail { max-width: 1200px; margin-inline: auto; }
.detail-back { min-height: 44px; border-color: var(--color-primary); background: var(--color-primary-subtle); color: var(--color-primary-active); white-space: normal; }
.detail-back:hover { background: var(--color-primary-hover); color: #fff; box-shadow: 0 5px 14px rgb(148 99 174 / 20%); }
.detail-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 20px; padding: 32px; border: 1px solid #e5d6ed; border-top: 4px solid var(--color-primary); border-radius: 16px; background: var(--color-primary-subtle); }
.detail-identity { display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0; }
.detail-avatar { display: grid; place-items: center; flex-shrink: 0; width: 64px; height: 64px; border-radius: 18px; background: var(--color-primary-hover); color: #fff; font-size: 28px; font-weight: 700; box-shadow: 0 5px 12px rgb(148 99 174 / 20%); }
.detail-heading { min-width: 0; }
.detail-eyebrow { color: var(--color-primary-active); font-size: 13px; font-weight: 600; }
.detail-heading h2 { margin-top: 6px; color: var(--color-text); font-size: 26px; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; }
.detail-subtitle { margin-top: 6px; font-size: 14px; color: #64748b; overflow-wrap: anywhere; }
.detail-hero-meta { display: grid; gap: 12px; justify-items: start; }
.detail-hero-meta p { color: #64748b; font-size: 13px; }
.detail-status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid; border-radius: 999px; font-size: 14px; font-weight: 600; }
.detail-status--pending { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.detail-status--approved { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.detail-status--rejected { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; margin-top: 24px; align-items: start; }
.detail-main { display: grid; gap: 24px; min-width: 0; }
.detail-card { min-width: 0; padding: 28px; border: 1px solid var(--color-border); border-radius: 14px; background: #fff; box-shadow: 0 2px 6px rgb(15 23 42 / 4%); }
.detail-card h3 { font-size: 18px; line-height: 26px; color: var(--color-text); font-weight: 700; }
.detail-card-heading { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid #f1f5f9; }
.detail-card-heading p { margin-top: 3px; font-size: 14px; color: #64748b; }
.detail-section-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--color-primary-subtle); color: var(--color-primary-active); font-size: 14px; font-weight: 700; }
.detail-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.detail-field dt { margin-bottom: 7px; font-size: 13px; font-weight: 600; color: #64748b; }
.detail-field dd { font-size: 15px; line-height: 1.7; color: #334155; white-space: pre-line; overflow-wrap: anywhere; }
.detail-field dd a { color: var(--color-primary-active); text-decoration: underline; text-underline-offset: 3px; }
.detail-field--wide { grid-column: 1 / -1; }
.detail-field .detail-highlight { padding: 12px 16px; border-left: 3px solid var(--color-primary); border-radius: 6px; background: var(--color-primary-subtle); color: var(--color-primary-active); }
.detail-field .detail-article-title { font-size: 19px; font-weight: 600; color: #0f172a; }
.detail-field .detail-abstract { line-height: 1.9; }
.detail-summary .detail-fields { grid-template-columns: minmax(0,1fr); gap: 18px; margin-top: 22px; }
.detail-summary .detail-field + .detail-field { border-top: 1px solid #f1f5f9; padding-top: 16px; }
.detail-topics { list-style: decimal; padding-left: 24px; }
.detail-topics li { padding: 10px 0 10px 8px; color: #334155; line-height: 1.7; overflow-wrap: anywhere; }
.detail-topics li::marker { color: var(--color-primary-active); font-weight: 700; }
.detail-proof { display: grid; justify-items: start; gap: 16px; margin-top: 20px; }
.detail-proof img { width: 100%; max-height: 360px; object-fit: contain; border: 1px solid var(--color-border); border-radius: 12px; background: #f8fafc; }
.detail-empty { margin-top: 16px; padding: 20px; border: 1px dashed var(--color-border); border-radius: 10px; color: #64748b; font-size: 14px; }
@media (max-width: 1100px) { .detail-layout { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 640px) {
  .detail-hero, .detail-card { padding: 20px; }
  .detail-identity { align-items: flex-start; gap: 12px; }
  .detail-avatar { width: 48px; height: 48px; font-size: 22px; border-radius: 12px; }
  .detail-heading h2 { font-size: 22px; }
  .detail-fields { grid-template-columns: minmax(0,1fr); }
  .detail-layout, .detail-main { gap: 16px; }
}
.admin-pager {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 12px 18px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}
.pager-overview {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 18px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.pager-count {
  margin: 0;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.pager-count strong {
  color: var(--color-text);
  font-weight: 600;
}
.pager-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.pager-navigation {
  display: flex;
  align-items: center;
}
.pager-nav-cluster {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.pager-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pager-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.pager-jump strong {
  color: var(--color-text);
  font-weight: 600;
}
.pager-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
  cursor: pointer;
  user-select: none;
}
.pager-nav-symbol {
  font-size: 15px;
  line-height: 1;
}
.pager-nav[rel="next"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  font-weight: 600;
}
.pager-nav:disabled {
  border-color: #e2e8f0;
  color: #94a3b8;
  background: #f8fafc;
  cursor: not-allowed;
  opacity: 0.65;
}
.admin-pager select {
  width: auto;
  min-width: 66px;
  min-height: 36px;
  height: 36px;
  padding: 0 24px 0 9px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.admin-pager select:hover {
  border-color: var(--color-primary-light);
}
.admin-pager a:focus-visible,
.admin-pager select:focus-visible,
.admin-pager button:focus-visible {
  outline: 2px solid var(--color-primary) !important;
  outline-offset: 2px;
}
@media (hover: hover) {
  a.pager-nav:hover {
    background: #f8fafc;
    border-color: var(--color-primary-light);
    color: var(--color-primary-active);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgb(116 67 138 / 15%);
  }
  a.pager-nav[rel="next"]:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: #ffffff;
    box-shadow: 0 2px 6px rgb(116 67 138 / 25%);
  }
}
a.pager-nav:active {
  background: var(--color-primary-subtle);
  border-color: var(--color-primary);
  color: var(--color-primary-active);
  transform: translateY(0);
}
@media (max-width: 860px) {
  .admin-pager {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
  }
  .pager-overview {
    width: 100%;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
  }
  .pager-navigation {
    width: 100%;
    justify-content: center;
  }
  .pager-nav-cluster {
    justify-content: center;
  }
}
@media (max-width: 540px) {
  .pager-overview {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
  }
  .pager-nav-text {
    display: none;
  }
  .pager-nav {
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
  }
  .pager-nav-symbol {
    font-size: 16px;
  }
  .pager-jump {
    padding: 0 2px;
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  a.pager-nav:hover, a.pager-nav:active { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-primary-actions .action-button:not(:disabled):hover,
  .admin-primary-actions .action-button:not(:disabled):active { transform: none; }
  a.pagination-button:hover,
  a.pagination-button:active { transform: none; }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
