:root {
  --primary: #003366;
  --primary-dark: #001f40;
  --secondary: #ffffff;
  --bg: #f5f7fb;
  --text: #111827;
  --muted: #6b7280;
  --radius-lg: 18px;
  --radius-md: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: linear-gradient(135deg, #002650, #0050a0);
  color: white;
  padding: 16px 16px 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: white;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.header-text h1 {
  font-size: 1.25rem;
  margin: 0 0 4px;
  font-weight: 700;
}

.header-text p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

.app-main {
  flex: 1;
  padding: 16px;
  max-width: 640px;
  margin: 0 auto;
}

.cta-section {
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  border: none;
  font-size: 1rem;
  padding: 14px 18px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.1s ease;
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.35);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  flex: 1;
  background: white;
  color: var(--primary);
  font-weight: 600;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 2px 6px rgba(148, 163, 184, 0.35);
  font-size: 0.9rem;
}

.btn-secondary:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 1px 3px rgba(148, 163, 184, 0.6);
}

.btn-submit {
  margin-top: 4px;
}

.cta-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.pain-points {
  list-style: none;
  padding: 10px 12px;
  margin: 14px 0 0;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.8rem;
  color: var(--muted);
}

.pain-points li {
  margin-bottom: 4px;
}

/* Form Section */

.form-section {
  background: white;
  border-radius: 24px;
  padding: 16px 16px 18px;
  margin-top: 16px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.form-section h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 700;
}

.form-subtext {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.field span {
  font-weight: 600;
  margin-bottom: 4px;
}

.field input,
.field select,
.field textarea {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 10px 12px;
  font-size: 0.95rem;
  outline: none;
  background: #f9fafb;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.15);
}

.hint {
  margin: 0 0 4px;
  font-size: 0.78rem;
  color: var(--muted);
}

#quote_files {
  padding: 8px 4px;
  background: #f9fafb;
}

/* Two-column layout on wider screens */

.two-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.checkbox-field input[type="checkbox"] {
  margin-top: 3px;
}

/* Success message */

.success-message {
  display: none;
  text-align: center;
  margin-top: 12px;
  padding: 16px 12px;
  border-radius: 20px;
  background: #ecfdf3;
  border: 1px solid #22c55e;
  color: #166534;
}

.success-message.visible {
  display: block;
}

.success-message .checkmark {
  font-size: 2rem;
  margin-bottom: 4px;
}

.success-message h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.success-message p {
  margin: 0 0 10px;
  font-size: 0.9rem;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Install section */

.install-section {
  margin-top: 20px;
  margin-bottom: 32px;
}

.install-section h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.install-block {
  background: white;
  border-radius: 18px;
  padding: 12px 12px 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.install-block h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.install-block ol {
  margin: 0;
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--muted);
}

.app-footer {
  padding: 10px 16px 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Larger screens */

@media (min-width: 640px) {
  .app-header {
    padding-left: 24px;
    padding-right: 24px;
  }

  .app-main {
    padding: 20px 24px 24px;
  }

  .two-col {
    flex-direction: row;
  }

  .two-col .field {
    flex: 1;
  }

  .success-actions {
    flex-direction: row;
  }
}