@font-face {
  font-family: "Prompt";
  src: url("/assets/fonts/Prompt-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Prompt";
  src: url("/assets/fonts/Prompt-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Prompt";
  src: url("/assets/fonts/Prompt-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sarabun";
  src: url("/assets/fonts/Sarabun-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sarabun";
  src: url("/assets/fonts/Sarabun-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sarabun";
  src: url("/assets/fonts/Sarabun-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ui-font-body: "Sarabun", "Tahoma", "Segoe UI", sans-serif;
  --ui-font-heading: "Prompt", "Tahoma", "Segoe UI", sans-serif;
  --ui-font: "Sarabun", "Tahoma", "Segoe UI", sans-serif;
  --ui-text: #0f172a;
  --ui-muted: #64748b;
  --ui-surface: #ffffff;
  --ui-surface-alt: #f8fafc;
  --ui-border: #e2e8f0;
  --ui-border-strong: #cbd5e1;
  --ui-border-width: 1.5px;
  --ui-radius: 12px;
  --ui-radius-sm: 10px;
  --ui-radius-lg: 18px;
  --ui-primary: #2563eb;
  --ui-primary-strong: #1d4ed8;
  --ui-primary-hover: #1b44c2;
  --ui-primary-soft: #e0e7ff;
  --ui-primary-contrast: #ffffff;
  --ui-shadow-card: 0 4px 14px rgba(15, 23, 42, 0.06);
  --ui-shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--ui-font-body);
  background: #f6f7fb;
  color: var(--ui-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  color: var(--ui-text);
  font-family: var(--ui-font-heading);
}

p {
  margin: 0 0 0.85rem;
  color: var(--ui-text);
}

a {
  color: var(--ui-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.12s ease;
}

a:hover {
  color: var(--ui-primary-strong);
}

small,
.muted {
  color: var(--ui-muted);
}

code {
  background: var(--ui-surface-alt);
  border-radius: 8px;
  padding: 2px 6px;
  font-size: 0.9em;
  border: 1px solid var(--ui-border);
}

.container {
  width: min(1100px, 100% - 32px);
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: 18px;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.card,
article {
  background: var(--ui-surface);
  border: var(--ui-border-width) solid var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow-card);
  padding: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ui-surface-alt);
  border: 1px solid var(--ui-border);
  color: var(--ui-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ui-surface);
}

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--ui-border);
  text-align: left;
}

.table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ui-muted);
}

.table tr:last-child td {
  border-bottom: none;
}

.stack {
  margin-top: 12px;
}

.mb-12 {
  margin-bottom: 12px;
}

.mt-16 {
  margin-top: 16px;
}

button,
input[type="submit"],
input[type="reset"],
input[type="button"],
.btn,
a[role="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--ui-radius-sm);
  border: var(--ui-border-width) solid var(--ui-primary);
  background: var(--ui-primary);
  color: var(--ui-primary-contrast);
  font-weight: 700;
  font-family: var(--ui-font-heading);
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
.btn:hover,
a[role="button"]:hover {
  background: var(--ui-primary-hover);
  border-color: var(--ui-primary-hover);
  color: var(--ui-primary-contrast);
  transform: translateY(-1px);
}

button:active,
input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active,
.btn:active,
a[role="button"]:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
}

.btn.primary,
.btn.btn-primary {
  background: var(--ui-primary);
  border-color: var(--ui-primary-strong);
  color: var(--ui-primary-contrast);
}

.btn.primary:hover,
.btn.btn-primary:hover {
  background: var(--ui-primary-hover);
  border-color: var(--ui-primary-hover);
  color: var(--ui-primary-contrast);
}

.btn.ghost {
  background: transparent;
  color: var(--ui-primary);
  border-color: var(--ui-primary);
  box-shadow: none;
}

.btn.ghost:hover {
  background: var(--ui-primary-soft);
}

.btn.secondary,
.secondary {
  background: var(--ui-surface);
  color: var(--ui-primary);
  border-color: var(--ui-border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.btn.secondary:hover,
.secondary:hover {
  background: var(--ui-primary-soft);
  border-color: var(--ui-primary);
  color: var(--ui-primary);
}

.btn-muted {
  background: #f1f5f9;
  border-color: var(--ui-border);
  color: var(--ui-text);
  box-shadow: none;
}

.btn-muted:hover {
  background: #e2e8f0;
  border-color: #e2e8f0;
  color: var(--ui-text);
}

.btn-danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(185, 28, 28, 0.18);
}

.btn-danger:hover {
  background: #991b1b;
  border-color: #991b1b;
  color: #ffffff;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
}

.btn.disabled {
  pointer-events: none;
  opacity: 0.6;
  box-shadow: none;
}

.btn-blocked {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  background: #d1d5db;
  border-color: #d1d5db;
  color: #475569;
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: block;
  font-weight: 700;
  color: var(--ui-text);
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  border: var(--ui-border-width) solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
  padding: 10px 12px;
  font: inherit;
  background: #ffffff;
  color: var(--ui-text);
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--ui-primary);
  box-shadow: 0 0 0 3px var(--ui-primary-soft);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.row-actions {
  white-space: nowrap;
  display: flex;
  gap: 8px;
}

.table .avatar-cell {
  width: 52px;
}

.avatar {
  width: 44px;
  height: 58px;
  border-radius: 12px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-hover {
  position: relative;
  display: inline-block;
}

.photo-hover .photo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  text-align: center;
  padding: 8px;
}

.photo-hover:hover .photo-overlay {
  opacity: 1;
  pointer-events: auto;
}

.photo-hover .photo-overlay svg {
  color: #fff;
}

.upload-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 9999;
}

.upload-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.upload-modal__card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #fff;
  color: #111;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.upload-modal__spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  border-top-color: #111;
  animation: uploadSpin 0.9s linear infinite;
}

@keyframes uploadSpin {
  to {
    transform: rotate(360deg);
  }
}

.alert-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--ui-radius);
  border: 2px solid #16a34a;
  background: #f0fdf4;
  box-shadow: var(--ui-shadow-soft);
  margin-bottom: 12px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.alert-toast__icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #16a34a;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}

.alert-toast strong {
  display: block;
}

.alert-toast.is-fading {
  opacity: 0;
  transform: translateY(-8px);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 0.8rem;
}

.badge.badge-draft {
  background: #e2e8f0;
  color: #475569;
}

.badge.badge-active {
  background: #dcfce7;
  color: #166534;
}

.badge.badge-inactive {
  background: #f1f5f9;
  color: #475569;
}

.badge.badge-suspended {
  background: #fef3c7;
  color: #92400e;
}

.badge.badge-resigned {
  background: #fef2f2;
  color: #b91c1c;
}

.badge.badge-unknown {
  background: #e2e8f0;
  color: #475569;
}

/* Admin shell */
body.admin-shell {
  background: #f4f5f7;
}

.admin-shell .layout {
  display: flex;
  min-height: 100vh;
}

.admin-shell .sidebar {
  width: 240px;
  background: #ffffff;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  box-shadow: var(--ui-shadow-card);
  border-right: 1px solid var(--ui-border-strong);
}

.admin-shell .brand {
  padding: 20px;
  display: flex;
  align-items: center;
}

.admin-shell .brand .verify-logo {
  height: 64px;
  margin-bottom: 0;
}

.admin-shell .userbox {
  padding: 0 20px 16px;
  font-size: 0.85rem;
  color: #475569;
}

.admin-shell .menu {
  list-style: none;
  margin: 0;
  padding: 8px;
}

.admin-shell .menu a {
  display: block;
  color: #334155;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: var(--ui-radius-sm);
  font-family: var(--ui-font-heading);
}

.admin-shell .menu a.active,
.admin-shell .menu a:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.admin-shell .content {
  flex: 1;
  padding: 24px;
}

.admin-shell .grid {
  gap: 12px;
}

.admin-shell .page {
  max-width: 1100px;
}

.admin-shell .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-shell .page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  justify-content: space-between;
}

.admin-shell .page-actions .btn {
  width: auto;
  min-width: 140px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  margin: 0;
  line-height: 1;
}

.admin-shell .page-actions__right {
  margin-left: auto;
}

.admin-shell .alert-draft {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--ui-radius);
  border: 2px solid #e11d48;
  background: #fff;
  box-shadow: var(--ui-shadow-soft);
  margin-bottom: 16px;
}

.admin-shell .alert-draft__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #e11d48;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.admin-shell .alert-draft__body strong {
  display: block;
}

.admin-shell .alert-draft__actions {
  margin-left: auto;
}

.admin-shell .card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-shell .card-tile {
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background:
    linear-gradient(135deg, #e5e7eb, #cfd4dc),
    linear-gradient(120deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 45%);
  box-shadow:
    0 16px 36px rgba(15, 23, 42, 0.14);
  padding: 18px 20px 20px;
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.admin-shell .card-tile h4 {
  margin-bottom: 4px;
}

.admin-shell .card-tile__label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}

.admin-shell .card-actions {
  display: grid;
  grid-template-columns: 1fr repeat(2, auto);
  gap: 5px;
  align-items: stretch;
}

.admin-shell .btn-issue {
  width: 100%;
  justify-content: center;
  padding: 12px 16px;
  height: 52px;
  border-radius: 10px;
  font-size: 1rem;
}

.admin-shell .btn-icon {
  width: 52px;
  height: 52px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
  border-color: #e2e8f0;
  color: #0f172a;
}

.admin-shell .btn-icon-muted {
  background: #f1f5f9;
  border-color: var(--ui-border);
}

.admin-shell .btn-icon-muted:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.admin-shell .btn-icon svg {
  width: 18px;
  height: 18px;
}

.admin-shell .btn-icon:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #0f172a;
}

.has-tooltip {
  position: relative;
}

.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  background: #111827;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
  z-index: 5;
}

.has-tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%) translateY(4px);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: #111827 transparent transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;
}

.has-tooltip:hover::after,
.has-tooltip:hover::before,
.has-tooltip:focus-visible::after,
.has-tooltip:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.admin-shell .btn-icon-sm {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.admin-shell .btn-icon-danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.admin-shell .btn-icon-danger:hover {
  background: #ffe4e6;
  border-color: #fecdd3;
  color: #9f1239;
}

.admin-shell .danger-zone {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.admin-shell .profile-card {
  padding: 20px;
}

.admin-shell .profile-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}

.admin-shell .profile-photo {
  display: grid;
  gap: 10px;
}

.admin-shell .photo-frame {
  width: 200px;
  height: 240px;
  border-radius: var(--ui-radius);
  border: var(--ui-border-width) solid var(--ui-border);
  background: #f1f5f9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-shell .photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-shell .photo-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-shell .photo-toolbar form {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.admin-shell .photo-toolbar button[type="submit"] {
  margin-bottom: 0;
}

.admin-shell .photo-toolbar label {
  margin-bottom: 0;
}

.admin-shell .input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.admin-shell .profile-header {
  display: grid;
  grid-template-columns: 5fr 1fr;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.admin-shell .profile-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.admin-shell .profile-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-shell .profile-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.admin-shell .profile-secondary {
  margin: 0 0 6px;
}

.admin-shell .profile-actions {
  display: grid;
  gap: 10px;
  justify-items: stretch;
  min-width: 220px;
  max-width: 320px;
}

.admin-shell .status-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-shell .status-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-shell .status-control {
  display: grid;
  gap: 6px;
}

.admin-shell .status-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}

.admin-shell .profile-name {
  margin: 10px 0 4px;
}

.admin-shell .profile-code {
  margin: 0;
}

.admin-shell .status-stack {
  display: grid;
  gap: 12px;
}

.admin-shell .status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: var(--ui-radius);
  border: var(--ui-border-width) solid var(--ui-border);
  background: #f8fafc;
}

.admin-shell .status-row strong {
  display: block;
}

.admin-shell .status-row small {
  display: block;
}

.admin-shell .status-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-shell .status-form select {
  width: auto;
  min-width: 180px;
}

.admin-shell .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.admin-shell .btn-icon-sm {
  line-height: 1;
}

.admin-shell .photo-toolbar .btn-icon-sm {
  width: 42px;
  height: 42px;
  padding: 0;
  box-sizing: border-box;
}

.admin-shell .page-actions .action-btn {
  box-sizing: border-box;
}

.admin-shell .profile-main,
.admin-shell .page-actions,
.admin-shell .profile-actions {
  width: 100%;
}

.admin-shell .page-actions__right {
  margin-left: auto;
}

.admin-shell .card {
  box-shadow: var(--ui-shadow-card);
}

@media (max-width: 900px) {
  .admin-shell .layout {
    flex-direction: column;
  }

  .admin-shell .sidebar {
    width: 100%;
  }

  .admin-shell .menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-shell .card-grid {
    grid-template-columns: 1fr;
  }

  .admin-shell .card-actions {
    grid-template-columns: 1fr;
  }

  .admin-shell .profile-grid {
    grid-template-columns: 1fr;
  }

  .admin-shell .profile-header {
    grid-template-columns: 1fr;
  }

  .admin-shell .photo-frame {
    width: 100%;
    height: 260px;
  }

  .admin-shell .page-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-shell .page-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .admin-shell .page-actions__right {
    margin-left: 0;
  }

  .admin-shell .profile-actions {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
  }

  .admin-shell .status-controls {
    grid-template-columns: 1fr;
  }

  .admin-shell .status-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-shell .status-form {
    width: 100%;
  }
}

/* Landing page */
body.landing {
  background:
    radial-gradient(900px 500px at 10% 0%, #fdf8ee 0%, transparent 60%),
    radial-gradient(700px 500px at 90% 20%, #e6f0fb 0%, transparent 65%),
    linear-gradient(160deg, #f4efe6 0%, #e7f0f5 100%);
}

.landing .wrap {
  padding: 32px 0 48px;
}

.landing .brand {
  margin-bottom: 24px;
}

.landing .brand h1 {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
}

.landing .eyebrow {
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.landing .hero {
  align-items: center;
}

.landing .cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.landing .steps {
  padding-left: 18px;
}

@media (max-width: 900px) {
  .landing .wrap {
    padding: 24px 0 40px;
  }
}

/* Auth page */
body.auth-page {
  background: #f5f5f5;
}

.auth-page main {
  padding: 8vh 0;
}

.auth-page .wrap {
  max-width: 420px;
  margin: 0 auto;
}

.auth-page .error {
  color: #b00020;
  font-size: 14px;
}

/* Verify page */
body.verify-page {
  background: #d1d1d1
}

body.verify-page main {
  padding: 28px 0 48px;
}

.verify-layout {
  display: grid;
  gap: 16px;
}

.verify-logo {
  height: 64px;
  width: auto;
  margin-bottom: 10px;
}

.verify-card {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.verify-title h1 {
  margin-bottom: 6px;
  font-size: 1.6rem;
  text-align: center;
}

.verify-subtitle {
  margin: 0;
  color: var(--ui-muted);
  text-align: center;
}

.verify-status {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--ui-border);
  background: #f8fafc;
}

.verify-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.verify-summary,
.verify-note {
  margin: 0;
}

.verify-summary {
  text-align: center;
}

.verify-note {
  color: var(--ui-muted);
  font-size: 0.85rem;
}

.verify-status--valid {
  background: #f0fdf4;
  border-color: #16a34a;
}

.verify-status--valid .verify-badge {
  background: #16a34a;
  color: #ffffff;
}

.verify-status--revoked {
  background: #fef2f2;
  border-color: #dc2626;
}

.verify-status--revoked .verify-badge {
  background: #dc2626;
  color: #ffffff;
}

.verify-status--suspended {
  background: #fffbeb;
  border-color: #f59e0b;
}

.verify-status--suspended .verify-badge {
  background: #f59e0b;
  color: #111827;
}

.verify-status--resigned {
  background: #fef2f2;
  border-color: #dc2626;
}

.verify-status--resigned .verify-badge {
  background: #dc2626;
  color: #ffffff;
}

.verify-status--not_found {
  background: #f8fafc;
  border-color: #94a3b8;
}

.verify-status--not_found .verify-badge {
  background: #1f2937;
  color: #ffffff;
}

.verify-details {
  display: grid;
  gap: 12px;
}

.verify-details__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.verify-details__header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.verify-time {
  font-size: 0.82rem;
  color: var(--ui-muted);
  text-align: center;
}

.verify-details__body {
  grid-template-columns: 160px 1fr;
  align-items: start;
}

.verify-page .photo {
  width: 160px;
  height: 200px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ui-radius);
  overflow: hidden;
  border: 1px solid var(--ui-border);
}

.verify-page .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.verify-fields {
  display: grid;
  gap: 12px;
}

.verify-field {
  display: grid;
  gap: 4px;
}

.verify-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ui-muted);
  font-weight: 700;
}

.verify-value {
  font-weight: 600;
}

.verify-contact {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--ui-border);
  background: #f8fafc;
  text-align: center;
  justify-items: center;
}

.verify-contact h2 {
  margin: 0;
  font-size: 0.95rem;
}

.verify-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.verify-actions .btn {
  min-width: 150px;
}

.verify-footer {
  border-top: 1px dashed var(--ui-border);
  padding-top: 12px;
  font-size: 0.82rem;
  color: var(--ui-muted);
  text-align: center;
  max-width: 320px;
  margin: 0 auto;
}

@media (max-width: 520px) {
  .verify-details__body {
    grid-template-columns: 1fr;
  }

  .verify-page .photo {
    width: 100%;
    max-width: 180px;
    height: auto;
    aspect-ratio: 3/4;
    margin: 0 auto 16px;
  }
}

/* Digital card pages */
body.digital-card-page {
  background: #f1f5f9;
}

.digital-card-page main.card-page {
  padding: 32px 0 60px;
  display: grid;
  gap: 16px;
}

.digital-card {
  background: #fff;
  border: 2px solid #0f172a;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 18px;
}

.digital-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.digital-card .card-brand {
  font-weight: 700;
  font-size: 1.2rem;
}

.digital-card .card-title {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}

.digital-card .pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.digital-card .card-body {
  display: grid;
  gap: 20px;
  align-items: center;
}

.digital-card .card-info {
  display: grid;
  gap: 8px;
}

.digital-card .card-info h1 {
  margin: 0;
  font-size: 1.7rem;
}

.digital-card .card-code {
  margin: 0;
  font-weight: 600;
  color: #475569;
}

.digital-card .meta {
  display: grid;
  gap: 10px;
}

.digital-card .meta-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 4px;
}

.digital-card .card-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
}

.digital-card .qr {
  width: 140px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  text-align: center;
}

.digital-card .qr img {
  width: 100%;
  height: auto;
  display: block;
}

.digital-card .qr span {
  display: block;
  margin-top: 6px;
  font-size: 0.7rem;
  color: #475569;
}

.digital-card .photo-frame {
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.digital-card .photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.digital-card .muted {
  color: #6b7280;
}

.digital-card.digital-id .card-body {
  grid-template-columns: 180px 1fr;
}

.digital-card.digital-id .photo-frame {
  width: 180px;
  height: 220px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.digital-card.digital-biz .card-body {
  grid-template-columns: 1fr 160px;
}

.digital-card.digital-biz .photo-frame {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  margin-left: auto;
}

@media (max-width: 520px) {
  .digital-card .card-body {
    grid-template-columns: 1fr;
  }

  .digital-card.digital-id .photo-frame {
    width: 100%;
    height: 240px;
  }

  .digital-card.digital-biz .photo-frame {
    width: 160px;
    height: 160px;
    margin-left: 0;
  }

  .digital-card .card-footer {
    grid-template-columns: 1fr;
  }

  .digital-card .qr {
    width: 100%;
    max-width: 200px;
  }
}

@media (max-width: 520px) {
  .container {
    width: calc(100% - 24px);
  }
}