/* ==========================================================================
   WRA Omnilert Registration – Modern Design
   ========================================================================== */

:root {
  --wra-green:    #005c34;
  --wra-green-light: #007a46;
  --wra-green-pale: #e6f4ed;
  --bg:           #f1f5f9;
  --card-bg:      #ffffff;
  --text:         #1e293b;
  --text-muted:   #64748b;
  --border:       #e2e8f0;
  --error:        #dc2626;
  --error-bg:     #fef2f2;
  --success:      #16a34a;
  --success-bg:   #f0fdf4;
  --radius:       12px;
  --shadow:       0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
}

/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Layout */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.site-header {
  background: var(--wra-green);
  padding: 1rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.header-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

/* Main */
.main-content {
  flex: 1 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2.5rem 1.5rem;
}

/* Card */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 640px;
  padding: 2.5rem;
}

.card-header {
  margin-bottom: 2rem;
}

.card-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wra-green);
  margin: 0.5rem 0 0.25rem;
}

.card-header .subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Badge */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.badge-student  { background: #dbeafe; color: #1d4ed8; }
.badge-employee { background: #d1fae5; color: #047857; }
.badge-parent   { background: #fef3c7; color: #92400e; }

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--text);
}

.required {
  color: var(--error);
}

.hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.field-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--wra-green);
  box-shadow: 0 0 0 3px rgba(0,92,52,0.15);
}

input.input-error,
select.input-error {
  border-color: var(--error);
}

/* Checkbox */
.checkbox-group {
  margin-top: 0.25rem;
}

.voice-option {
  margin-top: -0.75rem;
  margin-bottom: -0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--wra-green);
}

.checkbox-label a {
  color: var(--wra-green-light);
  text-decoration: underline;
}

/* Alerts */
.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #fecaca;
}

.field-error-list ul {
  margin: 0.25rem 0 0 1.25rem;
  padding: 0;
}

.field-error-list li {
  margin-bottom: 0.15rem;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}

.btn-primary {
  background: var(--wra-green);
  color: #fff;
}

.btn-primary:hover {
  background: var(--wra-green-light);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Success panel */
.success-panel {
  text-align: center;
  padding: 1rem 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border: 2px solid #bbf7d0;
}

.success-panel h2 {
  color: var(--success);
  margin-bottom: 0.5rem;
}

.steps {
  text-align: left;
  max-width: 420px;
  margin: 1rem auto;
  padding-left: 1.25rem;
}

.steps li {
  margin-bottom: 0.75rem;
  font-size: 0.925rem;
}

.steps code {
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.help-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1.25rem;
}

.help-text a {
  color: var(--wra-green-light);
}

/* Thank You page */
.thankyou-card {
  max-width: 640px;
  text-align: center;
}

.thankyou-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fef3c7;
  color: #d97706;
  margin-bottom: 1.25rem;
}

.thankyou-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wra-green);
  margin-bottom: 0.75rem;
}

.thankyou-intro {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.verification-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
  text-align: left;
}

.step-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wra-green);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.step-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.step-content code {
  background: #fff;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

.thankyou-warning {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  text-align: left;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--wra-green-light);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 600px) {
  .card {
    padding: 1.5rem;
  }

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

  .card-header h1 {
    font-size: 1.25rem;
  }
}
