body {
  background: #f0f2f5;
  font-family: Arial, sans-serif;
}

.app-shell {
  width: 400px;
  margin: 80px auto;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#captcha-frame {
  margin: 20px 0;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  overflow: hidden;
  background: #e9eef3;
}

#captcha-header {
  background: #f5f5f5;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: bold;
  border-bottom: 1px solid #ccc;
}

#canvas-container {
  width: 100%;
  height: 220px; /* IMPORTANT: fixed height */
}

#instructions {
  padding: 8px;
  font-size: 12px;
  background: #111;
  color: white;
  text-align: center;
}

.red {
  color: #ff4d4d;
  font-weight: bold;
}

/* Page layout (flex min-h-screen items-center justify-center bg-gray-50) */
.body-loader {
  margin: 0;
  font-family: monospace;
  background: #eef3f8;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card */
.card {
  width: 100%;
  max-width: 24rem; /* max-w-sm */
  background: #ffffff;
  padding: 2rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  border-top: 4px solid #d0b787;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* Title */
.title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #003595;
  margin-bottom: 1.5rem;
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.field input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  font-size: 0.875rem;
}

.field input:focus {
  outline: none;
  border-color: #003595;
}

/* Messages */
.error {
  font-size: 0.875rem;
  color: #dc2626;
}

.success {
  font-size: 0.875rem;
  color: #16a34a;
}

/* Button */
.btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.6rem;
  background: #003595;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  opacity: 0.9;
}

/* Footer text */
.switch-text {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: #4b5563;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.25rem;
  font-weight: 500;
  color: #003595;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

.captcha-container {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.875rem;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.sqr-captcha {
  width: 20px;
  height: 20px;
  background: white;
  border: #111 solid 1px;
  border-radius: 4px;
  cursor: pointer;
}

.captcha-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.captcha-overlay iframe {
  width: 500px;
  height: 420px;
  border: none;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.hidden {
  display: none;
}

/* iframe */
iframe {
  width: 500px;
  height: 420px;
  border: none;
  background: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  margin-left: 2rem;
}

#canvas-container {
  position: relative;
  width: 100%;
  height: 100%;
}

#canvas-container canvas {
  display: block; /* remove inline canvas spacing */
  width: 100%;
  height: 100%;
}

#canvas-container img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  width: 32px;
  height: 32px;
}
