@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800;900&family=Inter:wght@400;500;600;700&display=swap");

:root {
  /* Brazilian Flag Inspired Theme - Premium Palette */
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --subtle: #f1f5f9;
  --line: #e2e8f0;
  
  /* Primary Green (Brazil Green) */
  --brand: #02522c;
  --brand-strong: #01371e;
  --brand-soft: #ecfdf5;
  --brand-border: #a7f3d0;
  
  /* Gold Accent (Brazil Yellow) */
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --accent-soft: #fef3c7;
  --accent-border: #fde68a;
  
  /* Status Colors */
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --danger-strong: #991b1b;
  --danger-border: #fca5a5;
  
  --info: #3b82f6;
  --info-soft: #eff6ff;
  --info-strong: #1e40af;
  --info-border: #bfdbfe;
  
  /* Shadows and Transitions */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 8px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -4px rgba(15, 23, 42, 0.1), 0 8px 16px -2px rgba(15, 23, 42, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --content: 1200px;
  
  font-family: "Inter", "DM Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

button, input, select, textarea {
  font-family: inherit;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, strong, .brand {
  font-family: "Manrope", Arial, sans-serif;
  letter-spacing: -0.02em;
  font-weight: 800;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.2s ease;
}

.nav {
  max-width: var(--content);
  min-height: 72px;
  margin: auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 1.15rem;
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: white;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(2, 82, 44, 0.2);
}

.nav-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  min-height: 42px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
}
.nav-link:hover, .nav-link.is-active {
  color: var(--brand);
  background: var(--brand-soft);
  text-decoration: none;
}
.nav-link svg, .btn svg, .icon-box svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}
.nav-link-label {
  display: none;
}

/* Page Layouts */
.page {
  max-width: var(--content);
  margin: auto;
  padding: 40px 24px 80px;
  animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-narrow {
  max-width: 860px;
}

.page-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.page-title {
  font-size: 2.2rem;
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
}
.page-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 720px;
  font-size: 1.05rem;
  font-weight: 400;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--ink);
}
.section-copy {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

/* Grid & Cards */
.grid {
  display: grid;
  gap: 20px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.panel-pad {
  padding: 32px;
}
.panel-flat {
  box-shadow: none;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 24px 0;
}

/* Buttons */
.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  min-height: 46px;
  padding: 10px 20px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn:active {
  transform: translateY(0);
}
.btn.primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: white;
  border: none;
}
.btn.primary:hover {
  background: linear-gradient(135deg, var(--brand-strong) 0%, #002613 100%);
  box-shadow: 0 8px 20px rgba(2, 82, 44, 0.25);
}
.btn.secondary {
  border-color: var(--line);
  background: var(--panel);
  color: var(--muted);
}
.btn.secondary:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--ink);
}
.btn.warning {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #3b2300;
  border: none;
}
.btn.warning:hover {
  background: linear-gradient(135deg, var(--accent-strong) 0%, #b25e02 100%);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25);
}
.btn.danger {
  background: var(--danger);
  color: white;
  border: none;
}
.btn.danger:hover {
  background: #dc2626;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25);
}
.btn.ghost {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}
.btn.ghost:hover {
  background: var(--subtle);
  color: var(--ink);
}
.btn.compact {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: 6px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.button-row.end {
  justify-content: flex-end;
}
.button-row.between {
  justify-content: space-between;
}

/* Forms & Fields */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.form-grid > *, .check span {
  min-width: 0;
}
.check span {
  overflow-wrap: anywhere;
}
.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.field label {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.88rem;
}
.field-hint {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: -4px;
}
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--ink);
  background: #ffffff;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(2, 82, 44, 0.08);
}
.field input::placeholder, .field textarea::placeholder {
  color: #94a3b8;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.88rem;
  cursor: pointer;
}
.check input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  cursor: pointer;
}
.auth-shell {
  max-width: 520px;
  margin: 40px auto;
}

/* Alert Notices */
.notice {
  display: none;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  border: 1px solid var(--brand-border);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.notice.is-visible {
  display: block;
}
.notice.error {
  background: var(--danger-soft);
  color: var(--danger-strong);
  border-color: var(--danger-border);
}

.hidden {
  display: none !important;
}

/* Status Badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 12px;
  background: var(--subtle);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status-approved, .status-paid, .status-submitted, .status-resolved {
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand-border);
}
.status-review, .status-pending {
  background: var(--info-soft);
  color: var(--info);
  border: 1px solid var(--info-border);
}
.status-required, .status-failed, .status-rejected {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}
.status-draft {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

/* Metric / Dashboard Widgets */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.metric, .dashboard-stat {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.metric:hover, .dashboard-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.metric-label, .dashboard-stat span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.metric-value, .dashboard-stat strong {
  display: block;
  margin-top: 8px;
  font-family: "Manrope", sans-serif;
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
}

.icon-box {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: inset 0 -2px 0 rgba(2, 82, 44, 0.05);
}

/* Stepper & Progress Indicators */
.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e2e8f0;
}
.progress-value {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-strong) 100%);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.application-grid {
  display: grid;
  gap: 16px;
}
.application-card {
  display: grid;
  gap: 20px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.application-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.application-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.application-id {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.application-name {
  margin: 4px 0 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
}
.application-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  background: var(--bg);
  padding: 16px;
  border-radius: var(--radius-sm);
}
.meta-item span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.meta-item strong {
  display: block;
  margin-top: 2px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}
.application-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.empty-state {
  padding: 64px 32px;
  text-align: center;
}
.empty-state .icon-box {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
}
.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.empty-state p {
  color: var(--muted);
  margin: 0 auto 24px;
  max-width: 440px;
  font-size: 0.95rem;
}

/* Multi-step Application Form Shell */
.application-shell {
  display: grid;
  gap: 24px;
  align-items: start;
}
.application-sidebar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.application-summary {
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.application-summary strong {
  display: block;
  font-size: 1.05rem;
  color: var(--ink);
}
.application-summary span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.steps {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px;
  scrollbar-width: none;
}
.steps::-webkit-scrollbar {
  display: none;
}
.step-chip {
  flex: 0 0 auto;
  min-width: 120px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.step-chip:hover {
  background: var(--subtle);
  color: var(--ink);
}
.step-number {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--subtle);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
}
.step-label {
  font-size: 0.85rem;
  font-weight: 700;
}
.step-chip.is-active {
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-color: var(--brand-border);
}
.step-chip.is-active .step-number {
  color: white;
  background: var(--brand);
}

.form-panel {
  min-width: 0;
}
.form-step {
  display: none;
}
.form-step.is-active {
  display: block;
}
.form-panel.is-locked input:not([type=hidden]),
.form-panel.is-locked select,
.form-panel.is-locked textarea {
  color: var(--muted);
  background: var(--subtle);
  border-color: var(--line);
  cursor: not-allowed;
}
.form-panel.is-locked .upload-zone {
  display: none;
}
.form-step-header {
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.form-step-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--ink);
}
.form-step-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin: 32px -32px -32px;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  flex-wrap: wrap;
}
.form-actions > div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.save-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.save-state::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}
.save-state.is-saving::before {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.save-state.is-saved::before {
  background: var(--brand);
  box-shadow: 0 0 8px var(--brand);
}

/* Query Review Actions */
.query-workspace {
  margin-bottom: 24px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  background: var(--accent-soft);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.query-workspace-head {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-strong);
  background: rgba(254, 243, 199, 0.6);
  border-bottom: 1px solid var(--accent-border);
}
.query-workspace-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-strong);
}
.query-list {
  display: grid;
  gap: 0;
}
.query-item {
  padding: 24px;
  border-bottom: 1px solid var(--accent-border);
  background: #ffffff;
}
.query-item:last-child {
  border-bottom: 0;
}
.query-item-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.query-item h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink);
}
.query-message {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}
.query-upload {
  padding: 20px;
  border: 2px dashed var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  transition: all 0.2s ease;
}
.query-upload label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--accent-strong);
}
.query-upload input[type=file] {
  width: 100%;
}
.query-success {
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 700;
  margin-top: 8px;
}

/* Document Cards */
.doc-list {
  display: grid;
  gap: 16px;
}
.doc-card {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}
.doc-card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--ink);
}
.doc-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.doc-card-head svg {
  color: var(--brand);
}
.file-meta {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}
.doc-preview {
  margin: 12px 0;
  min-height: 40px;
}
.doc-preview-img {
  width: 140px;
  height: 98px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--subtle);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}
.doc-preview-img:hover {
  transform: scale(1.03);
}
.upload-zone {
  position: relative;
  min-height: 120px;
  padding: 24px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
}
.upload-zone:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.upload-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}
.upload-zone strong {
  display: block;
  font-size: 0.9rem;
  color: var(--brand);
}
.upload-zone span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 4px;
}
.upload-zone span svg {
  color: var(--brand);
  margin-bottom: 8px;
}

/* Tracking / Status Screen */
.tracking-overview {
  padding: 32px;
  display: grid;
  gap: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.tracking-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.tracking-top h1 {
  margin: 0;
  font-size: 1.6rem;
  color: var(--ink);
}
.tracking-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}
.stage-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0 24px;
}
.stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #94a3b8;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stage::before {
  content: "";
  position: absolute;
  top: 15px;
  left: -50%;
  width: 100%;
  height: 3px;
  background: #e2e8f0;
  z-index: 0;
}
.stage:first-child::before {
  display: none;
}
.stage-dot {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 800;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.stage.is-done, .stage.is-current {
  color: var(--brand);
}
.stage.is-done::before, .stage.is-current::before {
  background: var(--brand);
}
.stage.is-done .stage-dot, .stage.is-current .stage-dot {
  color: white;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.tracking-layout {
  display: grid;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

/* Timeline */
.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline li {
  position: relative;
  padding: 0 0 24px 32px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 9px;
  bottom: -9px;
  width: 2px;
  background: var(--line);
}
.timeline li:last-child::before {
  display: none;
}
.timeline li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.timeline strong {
  font-size: 0.95rem;
  color: var(--ink);
}

/* Admin Screens */
.admin-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.search-box {
  position: relative;
  flex: 1;
}
.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  transform: translateY(-50%);
  color: var(--muted);
}
.search-box input {
  width: 100%;
  min-height: 46px;
  padding: 10px 16px 10px 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.filter-group {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.filter-chip {
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-chip:hover {
  background: var(--subtle);
}
.filter-chip.is-active {
  color: white;
  border-color: var(--brand);
  background: var(--brand);
}
.table-wrap {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}
th, td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}
tbody tr {
  transition: background 0.2s ease;
}
tbody tr:hover {
  background: #f8fafc;
}
.admin-review-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}
.review-data-grid {
  display: grid;
  gap: 16px;
}
.data-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-section h3 {
  margin: 0;
  padding: 14px 20px;
  font-size: 0.95rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.data-rows {
  display: grid;
  grid-template-columns: 1fr;
}
.data-row {
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
}
.data-row:last-child {
  border-bottom: 0;
}
.data-row span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.data-row strong {
  display: block;
  margin-top: 4px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.query-card {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}
.query-card.is-resolved {
  border-left-color: var(--brand);
  background: var(--brand-soft);
}
.query-target-grid {
  max-height: 300px;
  overflow-y: auto;
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
}
.query-target {
  min-height: 44px;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  font-size: 0.88rem;
  transition: background 0.2s ease;
}
.query-target:last-child {
  border-bottom: 0;
}
.query-target:hover {
  background: var(--brand-soft);
}
.query-target input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
}

/* Crop Modal */
.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
}
.crop-modal.is-open {
  display: flex;
}
.crop-box {
  width: min(880px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.crop-stage {
  max-height: 60vh;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: var(--radius-sm);
}
.crop-stage img {
  display: block;
  max-height: 60vh;
  margin: auto;
}

/* Homepage Hero, Copy, & Visuals */
.hero {
  display: grid;
  gap: 40px;
  align-items: center;
  min-height: min(640px, calc(100vh - 72px));
  padding-bottom: 40px;
}
.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.1;
  color: var(--brand-strong);
}
.hero-copy p {
  margin: 0 0 28px;
  max-width: 640px;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.6;
}
.hero-visual {
  min-height: 380px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(2, 82, 44, 0.88) 0%, rgba(1, 55, 30, 0.94) 100%),
              url("https://images.unsplash.com/photo-1483729558449-99ef09a8c325?auto=format&fit=crop&w=1200&q=80") center/cover;
  color: white;
  display: grid;
  align-content: end;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.hero-visual strong {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 4px;
}
.hero-visual span {
  opacity: 0.95;
  margin-top: 8px;
  font-size: 1rem;
  line-height: 1.5;
}
.landing-band {
  max-width: var(--content);
  margin: auto;
  padding: 0 24px 64px;
}
.mini-kicker {
  color: var(--accent-strong);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  display: block;
}
.feature-list {
  display: grid;
  gap: 16px;
}
.feature-list div {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.feature-list div:hover {
  border-color: var(--brand-border);
  box-shadow: var(--shadow);
}

/* Light Footer Section */
.site-footer {
  border-top: 1px solid var(--line);
  background: #ffffff; /* Reverted to white */
  color: var(--muted);
  padding: 32px 24px 20px;
}
.footer-inner {
  max-width: var(--content);
  margin: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.footer-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-column h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink); /* Reverted to ink */
  font-weight: 800;
  position: relative;
  padding-bottom: 6px;
}
.footer-column h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 2px;
  background: var(--brand); /* Green indicator */
  border-radius: 1px;
}
.footer-inner nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-inner nav a {
  color: var(--muted); /* Reverted to muted text */
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}
.footer-inner nav a:hover {
  color: var(--brand); /* Hover highlight with green */
  transform: translateX(2px);
  text-decoration: none;
}
.footer-note {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
  margin-top: 6px;
}
.footer-disclaimer-box {
  background: #faf8f2; /* Light yellow background */
  border: 1px solid #f2e2bd;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  line-height: 1.5;
  color: #78350f;
  margin-top: 18px;
}
.footer-disclaimer-box strong {
  color: var(--ink);
}

/* FAQ Accordion */
.faq-accordion {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq-question {
  padding: 18px 20px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
  user-select: none;
}
.faq-question:hover {
  background: var(--brand-soft);
}
.faq-question::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--brand);
  transition: transform 0.2s ease;
}
.faq-item.is-open .faq-question::after {
  content: "−";
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
  transition: max-height 0.25s cubic-bezier(0, 1, 0, 1), padding 0.25s ease;
}
.faq-item.is-open .faq-answer {
  max-height: 1000px;
  padding: 0 20px 20px;
  transition: max-height 0.5s cubic-bezier(1, 0, 1, 0), padding 0.25s ease;
}

/* Processing Times Table */
.table-responsive {
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.pricing-table {
  width: auto !important;
  background: white;
  border-collapse: collapse;
}
.pricing-table th {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 800;
  text-transform: none;
  font-size: 0.88rem;
  padding: 12px 6px;
  border-bottom: 2px solid var(--brand-border);
  white-space: nowrap;
}
.pricing-table td {
  padding: 12px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
}
.pricing-table th:nth-child(1),
.pricing-table td:nth-child(1),
.pricing-table th:nth-child(2),
.pricing-table td:nth-child(2),
.pricing-table th:nth-child(3),
.pricing-table td:nth-child(3) {
  width: auto !important;
}
.pricing-table th:nth-child(1),
.pricing-table td:nth-child(1) {
  text-align: left;
}
.pricing-table th:nth-child(2),
.pricing-table td:nth-child(2) {
  text-align: left;
}
.pricing-table th:nth-child(3),
.pricing-table td:nth-child(3) {
  text-align: left;
}
.pricing-table tr:last-child td {
  border-bottom: 0;
}
.pricing-table .time-badge {
  display: inline-flex;
  align-items: center;
  background: #fef3c7;
  color: #d97706;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
}
.pricing-table .price-val {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  color: var(--brand);
}

/* Media Queries */
@media (min-width: 640px) {
  .nav-link-label {
    display: inline;
  }
  .grid.two, .form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .eligibility-pricing-grid {
    grid-template-columns: 4fr 7fr !important;
  }
  .table-responsive {
    overflow-x: hidden !important;
  }
  .grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .panel-pad {
    padding: 36px;
  }
  .page-header {
    flex-direction: row;
    align-items: center;
  }
  .form-actions {
    margin: 32px -36px -36px;
    padding: 18px 36px;
  }
  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .application-card {
    grid-template-columns: 1.3fr 1.1fr auto;
    align-items: center;
  }
  .application-actions {
    padding: 0;
    border: 0;
    justify-content: flex-end;
  }
  .admin-toolbar {
    flex-direction: row;
    align-items: center;
  }
  .data-rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .nav {
    padding: 12px 12px;
    gap: 8px;
  }
  .nav-actions {
    gap: 6px;
  }
  .brand > span:last-child {
    display: none;
  }
  .nav-actions .btn.compact span {
    display: none;
  }
  .nav-actions .btn.compact {
    width: 38px;
    padding: 8px;
  }
  .nav-link {
    width: 36px;
    padding: 8px;
    justify-content: center;
  }
  .button-row {
    flex-direction: column;
    align-items: stretch;
  }
  .button-row .btn {
    width: 100%;
    justify-content: center;
  }
  .panel {
    min-width: 0;
    overflow: hidden;
  }
  .panel-pad {
    padding: 16px !important;
  }
  .table-responsive {
    width: fit-content !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }
  .pricing-table th,
  .pricing-table td {
    padding: 8px 3px !important;
    font-size: 0.75rem !important;
    white-space: nowrap !important;
  }
  .pricing-table th:nth-child(1),
  .pricing-table td:nth-child(1),
  .pricing-table th:nth-child(2),
  .pricing-table td:nth-child(2),
  .pricing-table th:nth-child(3),
  .pricing-table td:nth-child(3) {
    width: auto !important;
  }
  .pricing-table .time-badge {
    padding: 2px 4px !important;
    font-size: 0.72rem !important;
  }
  .page {
    padding: 24px 16px 48px;
  }
  .page-header {
    margin-bottom: 20px;
  }
  .page-title {
    font-size: 1.75rem;
  }
  .page-subtitle {
    font-size: 0.95rem;
  }
  .application-shell {
    gap: 16px;
  }
  .application-sidebar {
    overflow: hidden;
  }
  .application-summary {
    padding: 16px;
  }
  .steps {
    padding: 10px;
  }
  .step-chip {
    min-width: 100px;
    grid-template-columns: 22px 1fr;
    gap: 8px;
    padding: 8px 10px;
  }
  .step-number {
    width: 22px;
    height: 22px;
    font-size: 0.72rem;
  }
  .step-label {
    font-size: 0.8rem;
  }
  .panel-pad {
    padding: 20px;
  }
  .form-step-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
  }
  .form-step-header h2 {
    font-size: 1.25rem;
  }
  .form-actions {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    margin: 24px -20px -20px;
    padding: 16px 20px;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
  }
  .form-actions > .btn,
  .form-actions > div,
  .form-actions > div .btn {
    width: 100%;
  }
  .form-actions > div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .form-actions .save-state {
    width: 100%;
    order: -1;
    justify-content: center;
    margin-bottom: 8px;
  }
  .query-workspace-head {
    align-items: flex-start;
  }
  .query-item {
    padding: 16px;
  }
  .query-item-top {
    flex-direction: column;
    gap: 8px;
  }
  .upload-zone {
    min-height: 100px;
  }
}

@media (min-width: 900px) {
  .page {
    padding-top: 48px;
  }
  .application-shell {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 32px;
  }
  .application-sidebar {
    position: sticky;
    top: 96px;
  }
  .steps {
    display: grid;
    overflow: visible;
    padding: 12px;
    gap: 4px;
  }
  .step-chip {
    min-width: 0;
    width: 100%;
    border-radius: var(--radius-sm);
  }
  .tracking-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
    gap: 32px;
  }
  .admin-review-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.65fr);
    gap: 32px;
  }
  .review-sidebar {
    position: sticky;
    top: 96px;
  }
  .grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
  }
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* ==========================================================================
   Top Tourist Attractions Section
   ========================================================================== */
.attractions-section {
  padding: 100px 24px;
  background-color: #ffffff;
  border-top: 1px solid var(--line);
  position: relative;
}

.attractions-container {
  max-width: var(--content);
  margin: 0 auto;
}

.section-header-centered {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 72px;
}

.section-title-large {
  font-size: 2.5rem;
  color: var(--brand);
  margin: 12px 0 20px;
  line-height: 1.25;
  font-weight: 800;
}

.section-subtitle-centered {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--muted);
  font-weight: 400;
}

.section-subtitle-centered strong {
  color: var(--brand);
  font-weight: 700;
}

.attractions-list {
  display: flex;
  flex-direction: column;
  gap: 90px;
}

.attraction-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 80px;
  position: relative;
}

.attraction-item.alternate {
  flex-direction: row-reverse;
}

.attraction-image-wrapper {
  flex: 1.1;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  position: relative;
  aspect-ratio: 16 / 10.5;
  background: var(--subtle);
}

.attraction-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.attraction-item:hover .attraction-img {
  transform: scale(1.05);
}

.attraction-content {
  flex: 0.9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.attraction-number {
  font-family: "Manrope", sans-serif;
  font-size: 5.5rem;
  font-weight: 900;
  line-height: 1;
  color: rgba(2, 82, 44, 0.06);
  margin-bottom: -15px;
  letter-spacing: -0.05em;
  user-select: none;
}

.attraction-title {
  font-size: 1.75rem;
  color: var(--ink);
  margin-bottom: 18px;
  line-height: 1.35;
  font-weight: 800;
}

.attraction-description {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
}

/* Scroll Animations */
.js-enabled .animate-on-scroll {
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-enabled .animate-on-scroll.slide-in-left {
  transform: translateX(-60px);
}

.js-enabled .animate-on-scroll.slide-in-right {
  transform: translateX(60px);
}

.js-enabled .animate-on-scroll.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .attractions-section {
    padding: 80px 24px;
  }
  .attraction-item, .attraction-item.alternate {
    gap: 48px;
  }
  .attraction-title {
    font-size: 1.5rem;
  }
  .attraction-number {
    font-size: 4.5rem;
  }
}

@media (max-width: 768px) {
  .attractions-section {
    padding: 60px 20px;
  }
  .section-header-centered {
    margin-bottom: 48px;
  }
  .section-title-large {
    font-size: 2rem;
  }
  .attractions-list {
    gap: 60px;
  }
  .attraction-item, .attraction-item.alternate {
    flex-direction: column !important;
    gap: 28px;
  }
  .attraction-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10;
  }
  .attraction-content {
    width: 100%;
  }
  .attraction-number {
    font-size: 4rem;
    margin-bottom: -10px;
  }
  .js-enabled .animate-on-scroll.slide-in-left,
  .js-enabled .animate-on-scroll.slide-in-right {
    transform: translateY(40px); /* Slide up on mobile rather than sideways */
  }
}

