/* ─────────────────────────────────────────────
   Design tokens
   ───────────────────────────────────────────── */
:root {
  --primary:        #FF6B00;
  --primary-h:      #E55A00;
  --primary-light:  #FF8C38;
  --primary-bg:     #FFF3E8;
  --primary-border: #FFD0A8;

  --black:     #0D0D0D;
  --dark:      #1C1C1E;
  --g900:      #212529;
  --g700:      #495057;
  --g500:      #6C757D;
  --g400:      #ADB5BD;
  --g300:      #DEE2E6;
  --g200:      #E9ECEF;
  --g100:      #F4F5F7;
  --g50:       #FAFAFA;
  --white:     #FFFFFF;

  --success:    #16A34A;
  --success-bg: #F0FDF4;
  --success-bd: #BBF7D0;
  --warning:    #D97706;
  --warning-bg: #FFFBEB;
  --warning-bd: #FDE68A;
  --danger:     #DC2626;
  --danger-bg:  #FEF2F2;
  --danger-bd:  #FECACA;

  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow:    0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.05);
  --shadow-md: 0 4px 8px rgba(0,0,0,.07), 0 12px 28px rgba(0,0,0,.06);

  --header-h:  64px;
  --sidebar-w: 230px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

/* ─── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--g50);
  color: var(--g900);
  min-height: 100vh;
  line-height: 1.6;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ─── Scrollbar ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--g300); border-radius: 99px; }

/* ─── Header ─────────────────────────────────── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--g200);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px 0 0;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.header-brand {
  display: flex; align-items: center; gap: 0;
  width: var(--sidebar-w);
  padding: 0 20px;
  border-right: 1px solid var(--g200);
  height: 100%;
}
.brand-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-right: 10px; flex-shrink: 0;
}
.brand-icon svg { width: 20px; height: 20px; }
.brand-name {
  font-size: .9rem; font-weight: 700; color: var(--dark);
  line-height: 1.2;
}
.brand-sub { font-size: .7rem; color: var(--g500); font-weight: 400; }
.header-actions {
  display: flex; align-items: center; gap: 10px;
}
.header-project {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: var(--g500);
}
.header-project strong { color: var(--g900); }
#headerProjectName {
  font-size: .82rem; font-weight: 600; color: var(--dark);
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ─── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: .82rem; font-weight: 600; transition: all .15s;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: var(--primary); color: var(--white);
  box-shadow: 0 2px 8px rgba(255,107,0,.30);
}
.btn-primary:hover { background: var(--primary-h); box-shadow: 0 4px 14px rgba(255,107,0,.35); }
.btn-outline {
  background: var(--white); color: var(--g700);
  border: 1.5px solid var(--g300);
}
.btn-outline:hover { border-color: var(--g400); background: var(--g50); }
.btn-ghost {
  background: transparent; color: var(--g700); padding: 8px 12px;
}
.btn-ghost:hover { background: var(--g100); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #B91C1C; }
.btn-sm { padding: 6px 12px; font-size: .78rem; }
.btn-lg { padding: 12px 24px; font-size: .9rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ─── Layout ─────────────────────────────────── */
.app-layout {
  display: flex;
  padding-top: var(--header-h);
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────── */
.sidebar {
  position: fixed; top: var(--header-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--g200);
  display: flex; flex-direction: column;
  padding: 16px 12px;
  overflow-y: auto; z-index: 90;
}
.sidebar-section {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  color: var(--g400); text-transform: uppercase;
  padding: 12px 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: .84rem; font-weight: 500; color: var(--g700);
  transition: all .12s; width: 100%; text-align: left;
  margin-bottom: 2px;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--g400); }
.nav-item:hover { background: var(--g100); color: var(--g900); }
.nav-item:hover svg { color: var(--g700); }
.nav-item.active {
  background: var(--primary-bg); color: var(--primary);
  font-weight: 600;
}
.nav-item.active svg { color: var(--primary); }
.sidebar-divider { height: 1px; background: var(--g200); margin: 12px 0; }
.sidebar-sims {
  flex: 1; overflow-y: auto;
}
.sim-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: .78rem; cursor: pointer; transition: all .12s;
  border: 1px solid transparent;
}
.sim-item:hover { background: var(--g100); border-color: var(--g200); }
.sim-item-name { font-weight: 600; color: var(--g900); }
.sim-item-meta { font-size: .72rem; color: var(--g500); margin-top: 1px; }
.sim-item-del {
  padding: 3px 5px; border-radius: 5px; opacity: 0;
  color: var(--danger); transition: all .12s;
}
.sim-item:hover .sim-item-del { opacity: 1; }
.sim-item-del:hover { background: var(--danger-bg); }

/* ─── Content area ───────────────────────────── */
.content {
  margin-left: var(--sidebar-w);
  flex: 1; min-width: 0;
  padding: 28px 32px;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Page header ────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px;
}
.page-title { font-size: 1.4rem; font-weight: 700; color: var(--dark); }
.page-sub   { font-size: .83rem; color: var(--g500); margin-top: 2px; }

/* ─── Status badge ───────────────────────────── */
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 99px;
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.status-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
}
.status-viável   { background: var(--success-bg); color: var(--success); border: 1.5px solid var(--success-bd); }
.status-viável .dot   { background: var(--success); }
.status-atenção  { background: var(--warning-bg); color: var(--warning); border: 1.5px solid var(--warning-bd); }
.status-atenção .dot  { background: var(--warning); }
.status-inviável { background: var(--danger-bg);  color: var(--danger);  border: 1.5px solid var(--danger-bd);  }
.status-inviável .dot { background: var(--danger); }

/* ─── Metric cards ───────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.metric-card {
  background: var(--white);
  border: 1px solid var(--g200);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s;
}
.metric-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.metric-card.highlight {
  border-color: var(--primary-border);
  background: var(--primary-bg);
}
.metric-card.positive { border-left: 3px solid var(--success); }
.metric-card.negative { border-left: 3px solid var(--danger); }
.metric-card.neutral  { border-left: 3px solid var(--g300); }
.card-label {
  font-size: .73rem; font-weight: 600; letter-spacing: .04em;
  color: var(--g500); text-transform: uppercase; margin-bottom: 8px;
  display: flex; align-items: center; gap: 5px;
}
.card-label svg { width: 13px; height: 13px; }
.card-value {
  font-size: 1.5rem; font-weight: 700; color: var(--dark);
  letter-spacing: -.02em; line-height: 1;
}
.card-value.big  { font-size: 1.8rem; }
.card-value.good { color: var(--success); }
.card-value.bad  { color: var(--danger); }
.card-sub {
  font-size: .73rem; color: var(--g500); margin-top: 5px;
}

/* ─── Empty state ────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 64px 32px; text-align: center;
  background: var(--white); border: 1px dashed var(--g300);
  border-radius: var(--radius-lg);
}
.empty-icon {
  width: 60px; height: 60px; background: var(--primary-bg);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.empty-icon svg { width: 28px; height: 28px; color: var(--primary); }
.empty-title { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
.empty-sub   { font-size: .83rem; color: var(--g500); margin-bottom: 20px; max-width: 340px; }

/* ─── Panel / Card container ─────────────────── */
.panel {
  background: var(--white);
  border: 1px solid var(--g200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--g200);
}
.panel-title {
  font-size: .9rem; font-weight: 700; color: var(--dark);
  display: flex; align-items: center; gap: 8px;
}
.panel-title svg { width: 16px; height: 16px; color: var(--primary); }
.panel-body { padding: 20px; }

/* ─── Form ───────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.form-grid-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.form-group  { display: flex; flex-direction: column; gap: 5px; }
.form-group.span-2 { grid-column: span 2; }
.form-group.span-3 { grid-column: span 3; }
.form-label {
  font-size: .77rem; font-weight: 600; color: var(--g700); letter-spacing: .02em;
}
.form-label .required { color: var(--primary); margin-left: 2px; }
.form-input, .form-select {
  padding: 10px 13px; border: 1.5px solid var(--g300);
  border-radius: var(--radius-sm); font-size: .86rem;
  background: var(--white); color: var(--g900);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.form-input:focus, .form-select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,107,0,.12);
}
.form-input::placeholder { color: var(--g400); }
.form-hint { font-size: .72rem; color: var(--g500); }
.input-prefix-wrap {
  position: relative; display: flex; align-items: center;
}
.input-prefix {
  position: absolute; left: 12px; font-size: .83rem;
  color: var(--g500); font-weight: 600; pointer-events: none;
}
.input-prefix-wrap .form-input { padding-left: 28px; }
.input-suffix-wrap {
  position: relative; display: flex; align-items: center;
}
.input-suffix {
  position: absolute; right: 12px; font-size: .83rem;
  color: var(--g500); font-weight: 600; pointer-events: none;
}
.input-suffix-wrap .form-input { padding-right: 32px; }

.form-section {
  margin-bottom: 28px;
}
.form-section-title {
  font-size: .82rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--primary);
  padding-bottom: 10px; margin-bottom: 16px;
  border-bottom: 2px solid var(--primary-bg);
  display: flex; align-items: center; gap: 7px;
}
.form-section-title svg { width: 15px; height: 15px; }

/* Toggle switch */
.toggle-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--g50);
  border: 1.5px solid var(--g200); border-radius: var(--radius-sm);
  cursor: pointer; transition: all .12s;
}
.toggle-wrap:hover { border-color: var(--primary-border); background: var(--primary-bg); }
.toggle-label { font-size: .82rem; font-weight: 500; color: var(--g700); flex: 1; }
.toggle-switch {
  width: 36px; height: 20px; background: var(--g300);
  border-radius: 99px; position: relative; transition: background .15s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: ''; position: absolute;
  width: 14px; height: 14px; background: var(--white);
  border-radius: 50%; top: 3px; left: 3px;
  transition: transform .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-wrap.on .toggle-switch { background: var(--primary); }
.toggle-wrap.on .toggle-switch::after { transform: translateX(16px); }

/* Reinforcement list */
.reinf-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.reinf-item {
  display: grid; grid-template-columns: 120px 1fr 32px;
  gap: 8px; align-items: center;
}
.reinf-item .form-input { padding: 8px 12px; }
.reinf-del {
  width: 32px; height: 32px; display: flex; align-items: center;
  justify-content: center; border-radius: var(--radius-sm);
  color: var(--danger); transition: all .12s;
}
.reinf-del:hover { background: var(--danger-bg); }
.reinf-del svg { width: 15px; height: 15px; }

/* ─── Table ──────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
thead th {
  background: var(--g50); padding: 11px 14px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--g500);
  border-bottom: 2px solid var(--g200); text-align: right;
  white-space: nowrap;
}
thead th:first-child, thead th:nth-child(2) { text-align: left; }
tbody tr { border-bottom: 1px solid var(--g100); transition: background .10s; }
tbody tr:hover { background: var(--g50); }
tbody td {
  padding: 10px 14px; color: var(--g700); text-align: right;
}
tbody td:first-child, tbody td:nth-child(2) { text-align: left; color: var(--g900); }
.td-mono { font-family: var(--mono); font-size: .80rem; }
.td-neg  { color: var(--danger);  font-weight: 600; }
.td-pos  { color: var(--success); font-weight: 600; }
.td-zero { color: var(--g400); }
.td-event {
  display: inline-flex; gap: 4px; flex-wrap: wrap;
}
.event-chip {
  padding: 2px 7px; border-radius: 4px; font-size: .70rem; font-weight: 600;
  background: var(--g100); color: var(--g700);
}
.event-chip.venda   { background: var(--success-bg); color: var(--success); }
.event-chip.parcela { background: var(--primary-bg);  color: var(--primary); }
.event-chip.reforço { background: var(--warning-bg);  color: var(--warning); }
.event-chip.chaves  { background: #EDE9FE; color: #7C3AED; }
tbody tr.sale-row { background: #F0FDF4 !important; }
tfoot td {
  padding: 12px 14px; font-weight: 700; color: var(--dark);
  border-top: 2px solid var(--g200); text-align: right;
  background: var(--g50);
}
tfoot td:first-child, tfoot td:nth-child(2) { text-align: left; }

/* ─── Scenarios ──────────────────────────────── */
.scenarios-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.scenario-card {
  background: var(--white); border: 1.5px solid var(--g200);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.scenario-card.conservador { border-top: 3px solid #0891B2; }
.scenario-card.base        { border-top: 3px solid var(--primary); }
.scenario-card.agressivo   { border-top: 3px solid var(--success); }
.scenario-name {
  font-size: .8rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; margin-bottom: 12px;
}
.scenario-card.conservador .scenario-name { color: #0891B2; }
.scenario-card.base        .scenario-name { color: var(--primary); }
.scenario-card.agressivo   .scenario-name { color: var(--success); }
.scenario-metric {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0; border-bottom: 1px solid var(--g100);
  font-size: .82rem;
}
.scenario-metric:last-child { border-bottom: none; }
.scenario-metric-label { color: var(--g500); }
.scenario-metric-val   { font-weight: 700; color: var(--dark); font-family: var(--mono); }

/* ─── Charts ─────────────────────────────────── */
.charts-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.chart-card {
  background: var(--white); border: 1px solid var(--g200);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
}
.chart-title {
  font-size: .84rem; font-weight: 700; color: var(--dark);
  margin-bottom: 16px; display: flex; align-items: center; gap: 7px;
}
.chart-title svg { width: 15px; height: 15px; color: var(--primary); }
.chart-wrap { position: relative; height: 260px; }

/* ─── Memory of calculation ──────────────────── */
.memory-section {
  background: var(--white); border: 1px solid var(--g200);
  border-radius: var(--radius); overflow: hidden;
}
.memory-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; cursor: pointer;
  font-size: .84rem; font-weight: 600; color: var(--g700);
  transition: background .12s;
}
.memory-toggle:hover { background: var(--g50); }
.memory-toggle svg { width: 16px; height: 16px; transition: transform .2s; }
.memory-toggle.open svg { transform: rotate(180deg); }
.memory-body {
  display: none; border-top: 1px solid var(--g200);
}
.memory-body.open { display: block; }
.memory-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 20px; border-bottom: 1px solid var(--g100);
  font-size: .81rem;
}
.memory-row:last-child { border-bottom: none; }
.memory-row-label { color: var(--g600); }
.memory-row-val   { font-weight: 600; color: var(--dark); font-family: var(--mono); font-size: .79rem; }
.memory-row.total { background: var(--g50); }
.memory-row.total .memory-row-label { font-weight: 700; color: var(--g900); }
.memory-row.total .memory-row-val   { color: var(--primary); font-size: .87rem; }

/* ─── Toast ──────────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  transform: translateY(100px); opacity: 0; transition: all .3s;
  pointer-events: none;
}
#toast.show { transform: translateY(0); opacity: 1; }
.toast-inner {
  background: var(--dark); color: var(--white);
  padding: 12px 18px; border-radius: var(--radius);
  font-size: .83rem; font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 8px;
}
.toast-inner.success { background: var(--success); }
.toast-inner.error   { background: var(--danger); }

/* ─── Loading overlay ────────────────────────── */
#loading {
  position: fixed; inset: 0; background: rgba(255,255,255,.7);
  z-index: 999; display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
#loading.show { display: flex; }
.spinner {
  width: 40px; height: 40px; border: 3px solid var(--g200);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Divider ────────────────────────────────── */
.divider { height: 1px; background: var(--g200); margin: 24px 0; }

/* ─── Comparison table ───────────────────────── */
.cmp-table table thead th { text-align: center; }
.cmp-table table thead th:first-child { text-align: left; }
.cmp-table table tbody td { text-align: center; }
.cmp-table table tbody td:first-child { text-align: left; }
.cmp-best  { color: var(--success); font-weight: 700; }
.cmp-worst { color: var(--danger); }

/* ─── Tag/Chip ───────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 6px;
  font-size: .72rem; font-weight: 600;
  background: var(--primary-bg); color: var(--primary);
}

/* ─── Op-type buttons ────────────────────────── */
.op-type-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: .82rem; font-weight: 500; cursor: pointer;
  border: 1.5px solid var(--g300); background: var(--white); color: var(--g700);
  transition: all .15s;
}
.op-type-btn input[type="radio"] { display: none; }
.op-type-btn:has(input:checked) {
  border-color: var(--primary); background: var(--primary-bg); color: var(--primary);
  font-weight: 700;
}
.op-type-btn:hover { border-color: var(--primary-border); }

/* Cessão de direito highlight no dashboard */
.cessao-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 99px; font-size: .75rem; font-weight: 700;
  background: #EDE9FE; color: #7C3AED; border: 1.5px solid #DDD6FE;
  margin-left: 10px;
}

/* ─── Modal ──────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 200; display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); width: 480px; max-width: 95vw;
  overflow: hidden;
}
.modal-header {
  padding: 18px 22px; border-bottom: 1px solid var(--g200);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: .95rem; font-weight: 700; color: var(--dark); }
.modal-close {
  width: 28px; height: 28px; display: flex; align-items: center;
  justify-content: center; border-radius: 6px; color: var(--g500);
  transition: all .12s;
}
.modal-close:hover { background: var(--g100); color: var(--g900); }
.modal-close svg { width: 16px; height: 16px; }
.modal-body   { padding: 20px 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--g200); display: flex; justify-content: flex-end; gap: 10px; }

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { width: 60px; }
  .nav-item span, .sidebar-section, .sim-item-name, .sim-item-meta { display: none; }
  .content { margin-left: 60px; padding: 20px 16px; }
  .header-brand { width: 60px; }
  .brand-name, .brand-sub { display: none; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .scenarios-grid { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .form-grid, .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .form-group.span-2, .form-group.span-3 { grid-column: span 1; }
  .cards-grid { grid-template-columns: 1fr; }
}
