.demo-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: #eff6ff;
  color: #1e3a8a;
  line-height: 1.5;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.soft-card {
  background: var(--panel-soft);
  border: 1px solid #cfe0ff;
  border-radius: var(--radius);
  padding: 18px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2,
.section-title h3 {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

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

.user-pill {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-unverified-badge {
  border: 1px solid #f59e0b;
  border-radius: var(--radius);
  padding: 8px 11px;
  min-height: 38px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 800;
}

.email-unverified-badge:hover {
  background: #fef3c7;
}

.pulse-soft {
  animation: pulse-soft 1.8s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.28);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
  }
}

.btn {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 14px;
  min-height: 42px;
  background: #eef2f7;
  color: var(--text);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

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

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: #ffffff;
  border-color: var(--line);
}

.btn-danger {
  background: #fff1f2;
  color: #b91c1c;
  border-color: #fecdd3;
}

.btn-large {
  min-height: 58px;
  padding: 14px 20px;
  font-size: 1.05rem;
}

.nav-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-btn {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  padding: 12px 13px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 700;
}

.nav-btn:hover,
.nav-btn.active {
  background: #e8f0ff;
  color: var(--primary-dark);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field label,
.field-label {
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  background: #ffffff;
  color: var(--text);
  min-height: 44px;
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.field-error {
  color: var(--danger);
  font-size: 0.9rem;
  min-height: 1.2em;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 9px 0;
  line-height: 1.5;
}

.check-row input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #eef2f7;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.86rem;
}

.pill-ok {
  background: #dcfce7;
  color: #166534;
}

.pill-warn {
  background: #fef3c7;
  color: #92400e;
}

.pill-danger {
  background: #fee2e2;
  color: #991b1b;
}

.progress {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.25s ease;
}

.meter {
  width: 100%;
  height: 12px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
}

.meter::-webkit-progress-bar {
  background: #e5e7eb;
}

.meter::-webkit-progress-value {
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.meter::-moz-progress-bar {
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.stack-gap {
  margin-top: 18px;
}

.action-gap {
  margin-top: 16px;
}

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

.simple-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
}

.modal {
  width: min(720px, 100%);
  max-height: min(84vh, 780px);
  overflow: auto;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.25);
  padding: 20px;
}

.modal h2 {
  margin-top: 0;
}

.verification-cell {
  display: grid;
  gap: 10px;
}

.verification-modal {
  display: grid;
  gap: 16px;
}

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

.modal-heading-row h2 {
  margin: 8px 0 0;
}

.modal-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
  background: #f8fafc;
}

.verification-email-box {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: #eff6ff;
}

.verification-email-box span {
  color: #1e40af;
  font-size: 0.9rem;
  font-weight: 800;
}

.verification-guide {
  color: var(--text);
  line-height: 1.65;
}

.verification-guide p {
  margin: 0 0 6px;
}

.verification-warning {
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  background: #fff1f2;
  color: #991b1b;
  line-height: 1.55;
}

.verification-warning ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.verification-warning li + li {
  margin-top: 5px;
}

.verification-result {
  margin: 0;
}

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

.btn-pulse {
  animation: btn-pulse 1.65s ease-in-out infinite;
}

@keyframes btn-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.28);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0);
  }
}

.toast-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: grid;
  gap: 10px;
}

.toast {
  width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #111827;
  color: #ffffff;
  box-shadow: var(--shadow);
}

@media (max-width: 640px) {
  .topbar-actions {
    justify-content: flex-start;
  }

  .topbar-actions .btn,
  .topbar-actions .email-unverified-badge,
  .verification-actions .btn {
    width: 100%;
  }

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

  .modal-heading-row {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-soft,
  .btn-pulse {
    animation: none;
  }
}
