/* ComplyKit Shared App Styles */
/* Design tokens from landing page */
:root {
  --ink: #0a0f1a;
  --paper: #f7f5f0;
  --accent: #1a5c3a;
  --accent-light: #e8f2ec;
  --warm: #c4a35a;
  --warm-light: #faf6eb;
  --muted: #6b7280;
  --border: #e2dfd8;
  --white: #ffffff;
  --danger: #dc2626;
  --danger-light: #fef2f2;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* NAV */
.app-nav {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.app-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover {
  background: #155a30;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 92, 58, 0.3);
}
.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: white;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}
.btn-lg {
  padding: 16px 36px;
  font-size: 17px;
}

/* FORMS */
.form-group {
  margin-bottom: 24px;
}
.form-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.form-hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.form-input,
.form-select {
  width: 100%;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 92, 58, 0.1);
}
.form-input::placeholder {
  color: #aaa;
}

/* CHECKBOX / RADIO GROUPS */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14px;
}
.check-item:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.check-item input[type="checkbox"],
.check-item input[type="radio"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}
.check-item.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* RADIO BUTTONS */
.radio-group {
  display: flex;
  gap: 12px;
}
.radio-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14px;
}
.radio-item:hover {
  border-color: var(--accent);
}
.radio-item.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}
.radio-item input[type="radio"] {
  accent-color: var(--accent);
}

/* STEP INDICATOR */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 32px 0 8px;
}
.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--muted);
  transition: all 0.3s ease;
}
.step-dot.active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}
.step-dot.done {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}
.step-line {
  width: 48px;
  height: 2px;
  background: var(--border);
  transition: background 0.3s ease;
}
.step-line.done {
  background: var(--accent);
}

/* CARDS */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}
.card-header {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* DOCUMENT VIEWER */
.doc-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}
.doc-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(26, 92, 58, 0.08);
}
.doc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.doc-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
}
.doc-card-actions {
  display: flex;
  gap: 8px;
}
.doc-card-body {
  padding: 24px;
  max-height: 500px;
  overflow-y: auto;
  display: none;
}
.doc-card-body.open {
  display: block;
}
.doc-card-body h2 { font-size: 20px; color: var(--accent); margin: 24px 0 12px; }
.doc-card-body h3 { font-size: 17px; margin: 20px 0 10px; }
.doc-card-body p { margin-bottom: 12px; font-size: 15px; }
.doc-card-body ul, .doc-card-body ol { padding-left: 20px; margin-bottom: 12px; }
.doc-card-body li { margin-bottom: 6px; font-size: 14px; }

/* LOADING */
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pulse {
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* PROGRESS */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* UTILITY */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-4 { margin-top: 16px; }
.hidden { display: none !important; }

/* SECTION HEADER */
.section-header {
  padding: 48px 0 16px;
}
.section-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
}
.section-header p {
  font-size: 17px;
  color: var(--muted);
  margin-top: 8px;
}

/* FOOTER */
.app-footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.app-footer p {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* MOBILE */
@media (max-width: 768px) {
  .check-grid { grid-template-columns: 1fr; }
  .radio-group { flex-direction: column; }
  .step-line { width: 24px; }
  .card { padding: 20px; }
  .doc-card-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .section-header h1 { font-size: 26px; }
  .btn-lg { padding: 14px 24px; font-size: 15px; }
}
