/* AGM brand color variables — change these if branding ever updates */
:root {
  --navy: #1F3864;
  --blue: #3FA7F2;
  --light-blue: #D6EAFB;
  --gray-bg: #F4F6F9;
  --gray-row: #F0F0F0;
  --border: #D0D7E2;
  --text: #1a1a2e;
  --success: #2e7d32;
  --warn: #e65100;
}

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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--gray-bg);
  color: var(--text);
  min-height: 100vh;
}

/* ---- Header bar ---- */
header {
  background: var(--navy);
  color: white;
  padding: 18px 36px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
header .logo { font-size: 22px; font-weight: 700; letter-spacing: 0.5px; }
header .sub  { font-size: 13px; opacity: 0.7; margin-top: 2px; }
header .badge {
  margin-left: auto;
  background: var(--blue);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* ---- Main content area ---- */
.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ---- Step panels ---- */
.step {
  background: white;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
  overflow: hidden;
}
.step-header {
  background: var(--navy);
  color: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.step-header:hover { background: #263f72; }
.step-num {
  background: var(--blue);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.step-title  { font-weight: 600; font-size: 15px; }
.step-status { margin-left: auto; font-size: 12px; opacity: 0.8; display: flex; align-items: center; gap: 6px; }
.dot         { width: 8px; height: 8px; border-radius: 50%; background: #aaa; }
.dot.ok      { background: #69e06a; }
.dot.warn    { background: #ffd740; }
.chevron     { margin-left: 8px; transition: transform 0.2s; }
.chevron.open { transform: rotate(180deg); }

.step-body      { padding: 20px; display: none; }
.step-body.open { display: block; }

/* ---- Upload zones ---- */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--gray-bg);
  position: relative;
}
.upload-zone:hover,
.upload-zone.drag   { border-color: var(--blue); background: var(--light-blue); }
.upload-zone.loaded { border-color: var(--success); border-style: solid; background: #f0fff0; }
.upload-zone input  { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-icon     { font-size: 24px; margin-bottom: 6px; }
.upload-label    { font-size: 13px; font-weight: 600; color: var(--navy); }
.upload-hint     { font-size: 11px; color: #666; margin-top: 4px; }
.upload-filename { font-size: 11px; color: var(--success); font-weight: 600; margin-top: 6px; }

/* ---- Form fields ---- */
.field-group       { margin-bottom: 18px; }
.field-group label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field-group textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 12px; font-size: 13px; font-family: inherit;
  resize: vertical; min-height: 80px; color: var(--text);
  transition: border-color 0.2s;
}
.field-group textarea:focus { outline: none; border-color: var(--blue); }
.field-group input[type=text],
.field-group input[type=date] {
  width: 100%; border: 1px solid var(--border); border-radius: 6px;
  padding: 9px 12px; font-size: 13px; font-family: inherit; color: var(--text);
}
.field-group input:focus { outline: none; border-color: var(--blue); }
.hint { font-size: 11px; color: #888; margin-top: 4px; }

.two-col   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ---- Data preview tables ---- */
.preview-table-wrap { overflow-x: auto; margin-top: 12px; }
.preview-table      { width: 100%; border-collapse: collapse; font-size: 12px; }
.preview-table th   { background: var(--navy); color: white; padding: 7px 10px; text-align: left; font-weight: 600; white-space: nowrap; }
.preview-table td   { padding: 6px 10px; border-bottom: 1px solid #eee; }
.preview-table tr:nth-child(even) td { background: var(--gray-row); }
.preview-label      { font-size: 12px; font-weight: 600; color: #666; margin-top: 12px; margin-bottom: 4px; }

/* ---- Generate button bar (sticks to bottom of screen) ---- */
.generate-bar {
  position: sticky; bottom: 0;
  background: white;
  border-top: 2px solid var(--border);
  padding: 16px 24px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}
.btn-generate {
  background: var(--navy);
  color: white; border: none; border-radius: 8px;
  padding: 12px 32px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
  display: flex; align-items: center; gap: 8px;
}
.btn-generate:hover    { background: var(--blue); }
.btn-generate:disabled { background: #aaa; cursor: not-allowed; }
.gen-status { font-size: 13px; color: #666; }

/* ---- Add row button in prospect table ---- */
.add-row-btn {
  background: none; border: 1px dashed var(--blue); border-radius: 6px;
  color: var(--blue); padding: 6px 14px; font-size: 12px; cursor: pointer;
  margin-top: 8px; display: inline-flex; align-items: center; gap: 4px;
}
.add-row-btn:hover { background: var(--light-blue); }

/* ---- Toast notification ---- */
#toast {
  position: fixed; bottom: 80px; right: 24px;
  background: var(--navy); color: white;
  padding: 12px 20px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none; z-index: 9999;
}
#toast.show { opacity: 1; }

.section-divider {
  font-size: 12px; font-weight: 700; color: var(--blue);
  text-transform: uppercase; letter-spacing: 1px;
  margin: 20px 0 12px; border-bottom: 1px solid var(--light-blue); padding-bottom: 6px;
}

.delinquency-bullets {
  font-size: 12px; color: #444; margin-top: 8px;
  padding: 10px; background: #f9f9f9;
  border-radius: 6px; border: 1px solid #eee;
}
