:root {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --surface: #f7f7f5;
  --surface2: #f0efe9;
  --border: #e5e4df;
  --border2: #d0cfc8;
  --muted: #888880;
  --muted2: #b0afa8;
  --accent: #d7ff2f;
  --danger: #ff4444;
  --danger-light: #fff0f0;
  --success: #00c566;
  --success-light: #edfff5;
  --warning: #b77700;
  --warning-light: #fff7d6;
  --info: #0066ff;
  --font: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

button,
a,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

.center-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-card,
.panel,
.stat-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.auth-card {
  width: min(100%, 420px);
  padding: 30px;
}

.auth-card h1 {
  margin: 22px 0 8px;
  font-size: clamp(28px, 6vw, 42px);
  letter-spacing: 0;
  line-height: 1;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

.text-link {
  color: var(--info);
  font-weight: 700;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-center {
  justify-content: center;
  width: 100%;
}

.logo {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 900;
  font-size: 22px;
  font-style: italic;
  line-height: 1;
  flex-shrink: 0;
  transform: skew(-3deg);
}

.tag {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

label small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

input {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--border2);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
}

textarea {
  width: 100%;
  border: 1.5px solid var(--border2);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 13px;
  font: inherit;
  resize: vertical;
  outline: none;
}

textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.input-icon {
  position: relative;
  display: block;
}

.input-icon > span {
  position: absolute;
  left: 13px;
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
}

.input-icon input {
  padding-left: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-ghost {
  border-color: var(--border2);
  background: var(--paper);
  color: var(--ink);
}

.btn-danger-outline {
  border-color: var(--danger);
  background: var(--paper);
  color: var(--danger);
}

.btn-delete {
  color: var(--danger);
  border-color: var(--border2);
}

.btn-delete:hover {
  border-color: var(--danger);
  background: var(--danger-light);
}

.btn-full {
  width: 100%;
}

.btn-small {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.icon-btn {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.form-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-message.error {
  color: var(--danger);
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  width: 100%;
  padding-right: 64px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 600;
  padding: 4px 6px;
  line-height: 1;
  transition: color 0.15s;
}

.password-toggle:hover {
  color: var(--ink);
}

.demo-login {
  background: var(--surface);
  border: 1px dashed var(--border2);
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}

.demo-login:hover {
  background: var(--surface2);
  border-color: var(--muted2);
}

.demo-login strong {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.demo-login span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}

.demo-login-hint {
  font-size: 11px;
  color: var(--muted2);
  margin-top: 1px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  padding: 14px clamp(16px, 4vw, 36px);
  backdrop-filter: blur(12px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-email {
  max-width: 240px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--success);
  font-size: 13px;
  font-weight: 800;
}

.live-indicator span,
.badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  animation: pulse 1.4s infinite;
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #374151;
  animation: pulse 1.4s infinite;
  flex-shrink: 0;
}

.dashboard-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 48px;
}

.page-head,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: clamp(32px, 5vw, 58px);
  letter-spacing: 0;
  line-height: 1;
}

.page-head p {
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 18px;
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
  line-height: 1;
}

.panel {
  overflow: hidden;
}

.panel-head {
  border-bottom: 1px solid var(--border);
  padding: 14px;
}

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

.tab {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
}

.tab.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.search-input {
  width: 220px;
  height: 36px;
  border: 1.5px solid var(--border2);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

tbody tr.flash td {
  animation: rowFlash 2s forwards;
}

.client-cell {
  display: grid;
  gap: 4px;
  max-width: 300px;
}

.client-cell strong {
  font-size: 15px;
}

.client-cell span,
.client-cell a,
.timestamp {
  color: var(--muted);
  font-size: 12px;
}

.client-cell a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.badge-pending,
.badge-waiting {
  border-color: #f1c84b;
  background: var(--warning-light);
  color: var(--warning);
}

.badge-approved {
  border-color: #9be8bf;
  background: var(--success-light);
  color: #008744;
}

.badge-rejected {
  border-color: #ffc1c1;
  background: var(--danger-light);
  color: var(--danger);
}

.badge-revoked {
  border-color: #d1d5db;
  background: #f3f4f6;
  color: #6b7280;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--border2);
  border-radius: 999px;
  background: var(--surface);
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.code-pill.empty {
  color: var(--muted);
  font-family: var(--font);
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0;
}

.code-pop {
  animation: codePop 0.6s ease;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  display: grid;
  place-items: center;
  padding: 54px 20px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface2);
  color: var(--muted);
  font-weight: 900;
}

.empty-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.empty-state h3 {
  margin: 18px 0 6px;
  font-size: 22px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.45);
}

.modal-card {
  width: min(100%, 480px);
  border-radius: 8px;
  background: var(--paper);
  padding: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  animation: modalIn 0.18s ease;
}

.modal-wide {
  width: min(100%, 820px);
  max-height: min(90vh, 820px);
  overflow: auto;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.modal-head h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.modal-head p {
  margin: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 30;
  max-width: min(420px, calc(100% - 32px));
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid var(--border);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

.submitted-code {
  display: inline-flex;
  margin-top: 20px !important;
  border: 1.5px solid var(--border2);
  border-radius: 12px;
  background: var(--surface);
  padding: 11px 22px;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--ink);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  color: #374151;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.result-card {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  padding: 8px 0 4px;
}

.result-card h1 {
  margin: 4px 0 2px;
  font-size: clamp(24px, 5vw, 32px);
  letter-spacing: -0.02em;
}

.result-icon {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 50%;
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 10px;
}

.result-icon svg {
  width: 40px;
  height: 40px;
  fill: currentColor;
}

.success-icon {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 28px color-mix(in srgb, var(--accent) 50%, transparent);
}

.rejected-icon {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 8px 28px rgba(220, 38, 38, 0.35);
}

.invalid-icon {
  background: var(--surface2);
  color: var(--muted);
  box-shadow: 0 0 0 10px rgba(0,0,0,0.03);
}

.result-action-btn {
  min-width: 140px;
  flex: 1 1 auto;
}

.proceed-cta {
  width: 100%;
  margin-top: 20px;
  justify-self: stretch;
  text-decoration: none;
}

.otp-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.simple-code-card .muted {
  font-size: 14px;
  line-height: 1.65;
  color: #6b7280;
  margin: 0;
  font-weight: 400;
}

.otp-input {
  height: 64px;
  border-radius: 12px;
  text-align: center;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-primary);
}

.otp-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 14%, transparent);
}

.verify-busy {
  margin: 0;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.mini-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.simple-verify-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 18px;
  background: #f7f8fa;
}

.simple-verify-shell {
  width: min(100%, 520px);
}

.simple-verify-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  text-align: center;
}

.simple-verify-brand strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #374151;
}

.simple-verify-brand p {
  margin: 2px 0 0;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.simple-logo {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  overflow: hidden;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(135, 186, 0, 0.22);
  font-family: Inter, var(--font);
  font-size: 28px;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  transform: skew(-4deg);
}

.simple-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.simple-code-card {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  padding: 36px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}

.simple-code-card h1 {
  margin: 14px 0 10px;
  font-size: clamp(26px, 6vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.code-entry-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 24px;
  margin-top: 4px;
}

.simple-pill {
  display: inline-flex;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.simple-otp-group {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  position: relative;
}

.otp-char {
  height: 64px;
  border-radius: 10px;
  border: 1.5px solid #d1d5db;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  cursor: text;
  user-select: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.otp-char.active {
  border-color: #374151;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.12);
}

.otp-char.filled {
  background: #ffffff;
  border-color: #374151;
}

.loading-spinner-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.waiting-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: conic-gradient(transparent 0deg, #111827 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #fff calc(100% - 5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #fff calc(100% - 5px));
  animation: spin 0.9s linear infinite;
  margin: 28px auto 8px;
}

/* Step tracker on waiting screen */
.verify-steps {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 28px;
}

.vstep {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.vstep > span {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9ca3af;
  white-space: nowrap;
}

.vstep.done > span,
.vstep.current > span {
  color: #111827;
}

.vstep-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #d1d5db;
  background: #ffffff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.vstep.done .vstep-circle {
  background: var(--accent);
  border-color: transparent;
  color: var(--ink);
}

.vstep.done .vstep-circle svg {
  width: 16px;
  height: 16px;
}

.vstep.current .vstep-circle {
  background: #111827;
  border-color: transparent;
}

.vstep-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper);
  animation: pulse 1.4s infinite;
}

.vstep-line {
  flex: 1;
  height: 1.5px;
  background: #e5e7eb;
  margin-top: 16px;
  margin-left: 5px;
  margin-right: 5px;
}

.vstep-line.done {
  background: var(--accent);
}

/* Result screen animations */
#view-success:not(.hidden) .result-icon {
  animation: iconBounceIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

#view-rejected:not(.hidden) .result-icon {
  animation: iconShakeIn 0.45s ease both;
}

#view-invalid:not(.hidden) .result-icon {
  animation: iconFadeIn 0.35s ease both;
}

#view-success:not(.hidden) h1,
#view-success:not(.hidden) p,
#view-rejected:not(.hidden) h1,
#view-rejected:not(.hidden) p,
#view-invalid:not(.hidden) h1,
#view-invalid:not(.hidden) p {
  animation: fadeSlideUp 0.3s ease 0.18s both;
}

#view-success:not(.hidden) .result-actions,
#view-rejected:not(.hidden) .result-actions {
  animation: fadeSlideUp 0.3s ease 0.28s both;
}

.otp-real-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: none;
  background: transparent;
  cursor: text;
  z-index: 5;
  font-size: 16px;
  caret-color: transparent;
}

.simple-otp {
  height: 64px;
  border-radius: 12px;
  border: 2px solid #e4e4e0;
  background: #f8f8f6;
  text-align: center;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 900;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.simple-otp:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent);
}

.simple-otp:not(:placeholder-shown) {
  background: #ffffff;
  border-color: var(--border2);
}

.simple-submit {
  min-height: 52px;
  border-radius: 10px;
  border-color: #111827;
  background: #111827;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: none;
  transition: background 0.15s, opacity 0.15s;
}

.simple-submit:not(:disabled):hover {
  background: #1f2937;
  transform: none;
  box-shadow: none;
}

.simple-submit:disabled {
  opacity: 0.35;
  box-shadow: none;
}

.simple-note,
.simple-footer {
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.simple-note {
  margin: 20px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.note-icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
  flex-shrink: 0;
  opacity: 0.65;
}

.simple-footer {
  margin-top: 20px;
  font-weight: 600;
}

.verify-link-card {
  margin-bottom: 18px;
}

.verify-link-btn {
  text-decoration: none;
}

.verify-link-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #9ca3af;
}

.verify-link-url {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: #0052cc;
  word-break: break-all;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 82, 204, 0.35);
  transition: color 0.15s;
}

.verify-link-url:hover {
  color: #003d99;
  text-decoration-color: rgba(0, 61, 153, 0.5);
}

.applicant-confirm {
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
}

.applicant-confirm-label {
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #9ca3af;
}

.applicant-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.applicant-name-field {
  display: grid;
  gap: 3px;
}

.applicant-name-field span {
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.applicant-name-field strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-transform: capitalize;
}

.applicant-confirm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.applicant-confirm-head .applicant-confirm-label {
  margin: 0;
}

.applicant-edit-btn {
  background: none;
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font);
  font-weight: 700;
  padding: 3px 10px;
  transition: color 0.15s, border-color 0.15s;
}

.applicant-edit-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.applicant-name-input {
  height: 38px;
  border: 1.5px solid var(--border2);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 10px;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.applicant-name-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
}

.name-save-msg {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
}

.settings-section-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.logo-upload-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1.5px dashed var(--border2);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.15s;
}

.logo-preview-box {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface2);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.logo-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted2);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  padding: 4px;
}

.logo-preview-placeholder svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  opacity: 0.45;
}

.logo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-upload-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.logo-upload-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.logo-file-btn {
  cursor: pointer;
}

.logo-upload-hint {
  font-size: 11px;
  color: var(--muted2);
  font-weight: 500;
  line-height: 1.4;
}

.form-grid-full {
  grid-column: 1 / -1;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

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

@keyframes rowFlash {
  0% {
    background: #fff1a8;
  }
  100% {
    background: transparent;
  }
}

@keyframes codePop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes iconBounceIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  80% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@keyframes iconShakeIn {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.06); opacity: 1; }
  75% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

@keyframes iconFadeIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar-actions .btn {
    flex: 1 1 auto;
  }

  .user-email {
    width: 100%;
    max-width: 100%;
  }

  .page-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .page-head .btn {
    width: 100%;
  }

  .panel-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .search-input {
    width: 100%;
    height: 40px;
  }

  .tabs {
    flex-wrap: wrap;
  }

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

  .auth-card {
    padding: 22px;
  }

  .modal-card {
    padding: 22px;
    max-height: calc(100svh - 40px);
    overflow-y: auto;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .col-updated {
    display: none;
  }

  table {
    min-width: 640px;
  }
}

@media (max-width: 540px) {
  table {
    min-width: 480px;
  }

  .btn-small {
    min-height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .center-page {
    padding: 14px;
  }

  .dashboard-main {
    width: calc(100% - 20px);
    padding-top: 20px;
  }

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

  .tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .tab {
    width: 100%;
    padding: 0 8px;
    font-size: 12px;
  }

  table {
    min-width: 420px;
  }

  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal-card {
    border-radius: 16px 16px 0 0;
    max-height: 92svh;
    width: 100%;
  }

  .modal-wide {
    max-height: 92svh;
  }

  .otp-char {
    height: 52px;
    font-size: 21px;
  }

  .applicant-name-row {
    grid-template-columns: 1fr;
  }

  .simple-code-card {
    padding: 26px 20px;
  }

  .simple-verify-body {
    padding: 12px 10px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: #f7f8fa;
  }
}

@media (max-width: 480px) {
  .result-actions {
    flex-direction: column;
    width: 100%;
  }

  .result-action-btn {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
