/* S360 Brand Styling - from solutions360.com */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  --primary: #FEC10D;
  --primary-dark: #D4A00A;
  --primary-light: #FFF8E1;
  --bg-main: #FAFAFA;
  --bg-elevated: #FFFFFF;
  --text-primary: #0A0A0A;
  --text-secondary: #404040;
  --text-muted: #6B6B6B;
  --border: #E5E5E5;
  --error: #DC2626;
  --success: #16A34A;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.container {
  width: 100%;
  max-width: 480px;
}

.card {
  background: var(--bg-elevated);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 2.5rem;
}

.logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.logo img {
  height: 48px;
}

.logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-text span {
  color: var(--primary);
}

h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
}

input,
select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-elevated);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

input::placeholder {
  color: var(--text-muted);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(254, 193, 13, 0.4);
}

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

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

.message {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  display: none;
  white-space: pre-line;
}

.message.success {
  background: #DCFCE7;
  color: var(--success);
  display: block;
}

.message.error {
  background: #FEE2E2;
  color: var(--error);
  display: block;
}

.footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--primary-dark);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-primary);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}

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

/* Terms & Conditions */
.terms-container {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--bg-main);
}

.terms-content {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.terms-content h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.terms-content h3:first-child {
  margin-top: 0;
}

.terms-content p {
  margin-bottom: 0.75rem;
}

.terms-intro {
  font-weight: 500;
  color: var(--text-primary);
}

.terms-important {
  background: var(--primary-light);
  padding: 0.75rem;
  border-radius: 6px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.terms-content ol {
  margin-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.terms-content ol.alpha-list {
  list-style-type: upper-alpha;
}

.terms-content li {
  margin-bottom: 0.5rem;
}

.terms-content a {
  color: var(--primary-dark);
  text-decoration: none;
}

.terms-content a:hover {
  text-decoration: underline;
}

/* Checkbox styling */
.checkbox-group {
  margin-bottom: 1.5rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  font-weight: 400;
  gap: 0.75rem;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Button row */
.button-row {
  display: flex;
  gap: 1rem;
}

.button-row .btn {
  flex: 1;
}

.btn-secondary {
  background: var(--bg-main);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 540px) {
  body {
    padding: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }
}
