:root {
  --color-primary: #334155;
  --color-primary-hover: #1e293b;
  --color-text: #334155;
  --color-text-secondary: #6B6B6B;
  --color-text-muted: #999;
  --color-text-placeholder: #A0A0A0;
  --color-border: #E5E5E5;
  --color-bg: #FAFAFA;
  --color-surface: #FFFFFF;
  --color-surface-muted: #F5F5F5;
  --color-success: #059669;
  --color-success-bg: #D1FAE5;
  --color-success-border: #A7F3D0;
  --color-success-text: #065F46;
  --color-error: #DC2626;
  --color-error-bg: #FEE2E2;
  --color-error-border: #FECACA;
  --color-error-text: #991B1B;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.12);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  padding: 40px 20px;
}

.container {
  max-width: 500px;
  margin: 0 auto;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 48px;
  transition: box-shadow 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

h1 {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 16px;
  margin-bottom: 40px;
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="number"] {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  height: 48px;
  box-sizing: border-box;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="number"]::placeholder {
  color: var(--color-text-placeholder);
}

input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(51,65,85,0.1);
}

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

.error-message {
  color: var(--color-error);
  font-size: 13px;
  margin-top: 6px;
  display: none;
}

.error-message.show {
  display: block;
}

/* Date Mode Toggle */
.input-toggle-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.input-mode {
  display: none;
  flex: 1;
  height: 48px;
}

.input-mode.active {
  display: block;
}

.input-mode#daysMode {
  flex: 0 0 auto;
}

.input-mode#daysMode.active {
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-mode#daysMode input {
  width: 56px;
  flex: 0 0 56px;
  height: 48px;
  padding: 12px 8px;
  text-align: center;
  -moz-appearance: textfield;
}

.input-mode#daysMode input::-webkit-outer-spin-button,
.input-mode#daysMode input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-mode input {
  width: 100%;
  height: 48px;
}

.time-hint {
  font-size: 13px;
  color: #6B6B6B;
  white-space: nowrap;
  flex-shrink: 0;
}

.days-label {
  font-size: 15px;
  color: #334155;
  white-space: nowrap;
  flex-shrink: 0;
}

.days-separator {
  color: #6B6B6B;
  flex-shrink: 0;
}

.toggle-group {
  display: inline-flex;
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
  padding: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.toggle-btn {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.toggle-btn:hover:not(.active) {
  color: var(--color-primary);
}

/* Submit Button */
button[type="submit"] {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-surface);
  background-color: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}

button[type="submit"]:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

button[type="submit"]:active {
  transform: translateY(0);
}

button[type="submit"]:disabled {
  background-color: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
  transform: none;
}

.consent-notice {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 12px;
  text-align: center;
}

.consent-notice a {
  color: var(--color-text-muted);
  text-decoration: underline;
}

.consent-notice a:hover {
  color: var(--color-primary);
}

/* Flatpickr Custom Styles */
.flatpickr-calendar {
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border: none;
}

.flatpickr-months {
  background: var(--color-primary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month .numInputWrapper {
  color: white;
}

.flatpickr-prev-month,
.flatpickr-next-month {
  fill: white;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
  fill: rgba(255, 255, 255, 0.8);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.flatpickr-day:hover {
  background: #f7fafc;
  border-color: #e2e8f0;
}

.flatpickr-day.today {
  border-color: var(--color-primary);
}

.flatpickr-day.today:hover {
  background: #f7fafc;
  border-color: var(--color-primary);
}

/* Hide minute selector - hours only */
.flatpickr-time-separator,
.flatpickr-time > .numInputWrapper:nth-child(3) {
  display: none !important;
}

/* Turnstile */
.cf-turnstile {
  margin: 24px 0;
}

/* Messages */
.message {
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 14px;
  display: none;
}

.message.show {
  display: block;
}

.message.success {
  background-color: var(--color-success-bg);
  color: var(--color-success-text);
  border: 1px solid var(--color-success-border);
}

.message.error {
  background-color: var(--color-error-bg);
  color: var(--color-error-text);
  border: 1px solid var(--color-error-border);
}

/* Activation Panel */
.activation-panel {
  text-align: center;
}

.activation-header {
  margin-bottom: 32px;
}

.activation-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--color-success);
  color: var(--color-surface);
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.activation-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.activation-header p {
  font-size: 15px;
  color: var(--color-text-secondary);
}

.activation-steps {
  text-align: left;
  margin-bottom: 32px;
}

.activation-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.activation-step .step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-surface);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activation-step .step-content {
  flex: 1;
  padding-top: 4px;
}

.activation-step .step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.activation-step .step-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.activation-step.highlight {
  background-color: #FFFBEB;
  border: 1px solid #FDE68A;
}

.activation-step.highlight .step-number {
  background-color: #D97706;
}

.activation-footer {
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.activation-footer a {
  font-size: 15px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.activation-footer a:hover {
  color: var(--color-primary);
}

@media (max-width: 640px) {
  .activation-step {
    gap: 12px;
    padding: 12px;
  }

  .activation-step .step-number {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .activation-step .step-title {
    font-size: 14px;
  }

  .activation-step .step-desc {
    font-size: 12px;
  }

  .activation-header h2 {
    font-size: 20px;
  }
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 32px;
  color: var(--color-text-muted);
  font-size: 13px;
}

/* Content Sections */
section {
  margin-top: 24px;
}

/* Collapsible Section Styles */
.feature-details,
.how-details,
.faq-details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0;
  cursor: pointer;
}

.feature-details summary,
.how-details summary,
.faq-details summary {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  list-style: none;
  user-select: none;
}

.feature-details summary::-webkit-details-marker,
.how-details summary::-webkit-details-marker,
.faq-details summary::-webkit-details-marker {
  display: none;
}

.feature-details summary:after,
.how-details summary:after,
.faq-details summary:after {
  content: '+';
  float: right;
  font-size: 16px;
  color: var(--color-text-secondary);
}

.feature-details[open] summary:after,
.how-details[open] summary:after,
.faq-details[open] summary:after {
  content: '\2212';
}

.feature-content,
.how-content,
.faq-content {
  padding: 0 16px 16px;
}

.feature-content p,
.how-content p {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 8px 0;
}

.feature-content p:last-child,
.how-content p:last-child {
  margin-bottom: 0;
}

/* Nested details in FAQ */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  padding: 0;
  cursor: pointer;
}

.faq-item summary {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:after {
  content: '+';
  float: right;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.faq-item[open] summary:after {
  content: '\2212';
}

.faq-item div p {
  padding: 0 12px 8px;
  margin: 0;
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Mobile Responsive Styles */
@media (max-width: 640px) {
  body {
    padding: 20px 16px;
  }

  .card {
    padding: 32px 24px;
  }

  h1 {
    font-size: 24px;
    line-height: 1.2;
  }

  .subtitle {
    font-size: 15px;
    margin-bottom: 32px;
  }

  /* Fix toggle buttons layout on mobile */
  .input-toggle-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .input-mode {
    order: 2;
    width: 100%;
    flex: 0 0 auto;
    height: 48px;
  }

  .input-mode.active {
    display: block;
  }

  .input-mode#daysMode.active {
    display: flex;
  }

  .input-mode#daysMode input {
    flex: 0 0 56px;
  }

  .input-mode input {
    width: 100%;
    height: 48px;
  }

  .toggle-group {
    order: 1;
    width: 100%;
    justify-content: center;
  }

  .toggle-btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  label {
    font-size: 13px;
  }

  input[type="text"],
  input[type="email"],
  input[type="number"] {
    font-size: 16px;
    padding: 12px 14px;
  }

  .flatpickr-calendar {
    width: 100% !important;
    max-width: 340px;
  }

  .flatpickr-day {
    max-width: 42px;
    height: 42px;
    line-height: 42px;
  }

  button[type="submit"] {
    padding: 13px;
    font-size: 15px;
  }

  /* Collapsible sections on mobile */
  .features,
  .how-it-works,
  .faq {
    margin-top: 20px;
  }

  .feature-details summary,
  .how-details summary,
  .faq-details summary {
    font-size: 13px;
    padding: 10px 14px;
  }

  .feature-content p,
  .how-content p {
    font-size: 12px;
  }

  .faq-item summary {
    font-size: 12px;
    padding: 8px 10px;
  }

  .faq-item div p {
    font-size: 11px;
    padding: 0 10px 8px;
  }

  .footer {
    margin-top: 32px;
    font-size: 12px;
  }
}
