/* solar-dash.css — the SOLAR CUSTOMER dashboard inside apply.html.
 *
 * 2026-08-28 Stephen: "why is the solar for borrower's app showing this
 * isn't how the prototype for solar look like. This looks like cash
 * borrower dashboard." It did, because nothing implemented the solar
 * customer prototype — only a small Solar CARD was bolted onto the cash
 * home. This is the real thing.
 *
 * Design language is solar-customer-prototype.html verbatim, which in
 * turn is styles.css :root verbatim. Every token below already exists
 * globally; nothing here redefines a colour.
 *
 * Class prefix is `sd-` so nothing can collide with the cash app's
 * `dash-` rules, which still own the same #apply-shell.
 */

/* ---------------------------------------------------------------- chrome */

.sd-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0 12px;
}
.sd-bar-av {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-spark));
  color: var(--brand-900); font-weight: 800; font-size: 12.5px;
  display: flex; align-items: center; justify-content: center;
}
.sd-bar-t { font-size: 16px; font-weight: 800; color: var(--brand-900); line-height: 1.15; }
.sd-bar-s { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* Cards -------------------------------------------------------------- */

.sd-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-sm);
  margin-bottom: 12px; overflow: hidden;
}
.sd-card-p { padding: 14px 16px; }
.sd-sec {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
  margin: 16px 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sd-sec span.r { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11px; }

.sd-row {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 16px; border-top: 1px solid var(--border);
}
.sd-card > .sd-row:first-child { border-top: 0; }
.sd-row-ic {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: #F1F5F9; color: #475569;
}
.sd-row-ic.ok { background: #DCFCE7; color: #166534; }
.sd-row-ic.warn { background: #FEF3C7; color: #92400E; }
.sd-row-ic.info { background: #DBEAFE; color: #1E40AF; }
.sd-row-ic.money { background: var(--brand-50); color: #047857; }
.sd-row-b { flex: 1; min-width: 0; }
.sd-row-t { font-size: 13px; font-weight: 600; color: var(--text); }
.sd-row-s { font-size: 11px; color: var(--muted); margin-top: 1px; line-height: 1.4; }
.sd-row-a { font-size: 13px; font-weight: 700; white-space: nowrap; }

.sd-tbl { padding: 4px 16px 14px; }
.sd-tbl-r {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 8px 0; border-bottom: 1px solid #F1F5F9; font-size: 12.5px;
}
.sd-tbl-r:last-child { border-bottom: 0; }
.sd-tbl-r > span { color: var(--muted); flex: 0 0 auto; }
.sd-tbl-r > b { font-weight: 600; text-align: right; color: var(--text); }
.sd-tbl-r > b small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }

/* Badges — the state colour system. Meaning, not decoration. */
.sd-b {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  white-space: nowrap;
}
.sd-b-ok   { background: #DCFCE7; color: #166534; }
.sd-b-warn { background: #FEF3C7; color: #92400E; }
.sd-b-info { background: #DBEAFE; color: #1E40AF; }
.sd-b-mute { background: #F1F5F9; color: #475569; }
.sd-b-dang { background: #FEE2E2; color: #991B1B; }
.sd-b i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: block; }

.sd-note {
  background: var(--brand-50); border: 1px solid #A7F3D0; color: #065F46;
  border-radius: 12px; padding: 12px 14px; font-size: 12px; line-height: 1.55;
}
.sd-warn {
  background: #FFFBEB; border: 1px solid #FCD34D; color: #78350F;
  border-radius: 12px; padding: 12px 14px; font-size: 12px; line-height: 1.55;
}

/* Buttons ------------------------------------------------------------ */

.sd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer;
  padding: 10px 14px; border: 1px solid var(--border); background: #fff;
  color: var(--brand-900); text-decoration: none; font-family: inherit;
}
.sd-btn-pri { background: var(--brand-900); border-color: var(--brand-900); color: #fff; }
.sd-btn-spark { background: var(--accent-spark); border-color: var(--accent-spark); color: #14330A; font-weight: 800; }
.sd-btn-sm { padding: 5px 10px; font-size: 11px; font-weight: 600; border-radius: 8px; }
.sd-btn-w { width: 100%; }
.sd-btn-dang { color: var(--danger); border-color: #FECACA; }

/* Hero --------------------------------------------------------------- */

.sd-hero {
  background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
  color: #fff; border-radius: 16px; padding: 16px; margin-bottom: 12px;
  box-shadow: 0 10px 28px -14px rgba(2, 44, 34, .6);
}
.sd-hero-lbl {
  font-size: 9px; text-transform: uppercase; letter-spacing: .06em; opacity: .75;
}
.sd-hero-amt { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.sd-hero-sub { font-size: 11.5px; opacity: .8; margin-top: 3px; }
.sd-hero-cap { font-size: 10.5px; opacity: .72; margin-top: 6px; }
.sd-bar-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .18); overflow: hidden; margin-top: 12px; }
.sd-bar-track > i { display: block; height: 100%; background: var(--accent-spark); border-radius: 999px; }
.sd-bar-track.light { background: var(--border); }
.sd-bar-track.light > i { background: var(--accent); }
.sd-acct {
  margin-top: 12px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
}
.sd-acct-n { font-size: 14px; font-weight: 800; letter-spacing: .05em; }
.sd-acct-s { font-size: 10.5px; opacity: .78; margin-top: 1px; }
.sd-acct button {
  background: rgba(255, 255, 255, .16); border: 0; color: #fff; border-radius: 8px;
  padding: 6px 10px; font-size: 11px; font-weight: 700; cursor: pointer; font-family: inherit;
}

/* Quick actions ------------------------------------------------------ */

.sd-qa { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.sd-qa > * {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 10px; display: flex; flex-direction: column; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; color: var(--brand-900); cursor: pointer;
  text-decoration: none; font-family: inherit;
}
.sd-qa svg { color: var(--accent-dark); }

/* Stat pair ---------------------------------------------------------- */

.sd-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.sd-stat {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 13px;
}
.sd-stat.a { border-left: 3px solid var(--accent); }
.sd-stat-l { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sd-stat-v { font-size: 19px; font-weight: 800; margin-top: 3px; letter-spacing: -.02em; }
.sd-stat.a .sd-stat-v { color: var(--accent-dark); }
.sd-stat-s { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }

/* Segmented control -------------------------------------------------- */

.sd-seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px;
  background: var(--border); border-radius: 10px; margin-bottom: 10px;
}
.sd-seg button {
  border: 0; background: transparent; border-radius: 8px; padding: 8px 6px;
  font-size: 12px; font-weight: 700; color: #475569; cursor: pointer; font-family: inherit;
}
.sd-seg button.on { background: #fff; color: var(--brand-900); box-shadow: var(--shadow-sm); }

/* Shop --------------------------------------------------------------- */

.sd-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.sd-chips::-webkit-scrollbar { display: none; }
.sd-chip {
  flex: 0 0 auto; border: 1px solid var(--border); background: #fff; color: #475569;
  border-radius: 999px; padding: 6px 12px; font-size: 11.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap; font-family: inherit;
}
.sd-chip.on { background: var(--brand-900); border-color: var(--brand-900); color: #fff; }

.sd-search { position: relative; margin-bottom: 8px; }
.sd-search input {
  width: 100%; border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 14px 10px 36px; font-size: 13px; font-family: inherit; background: #fff;
}
.sd-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.sd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sd-fcard {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; cursor: pointer; text-align: left; padding: 0;
  font-family: inherit; display: block; width: 100%;
}
.sd-fcard-top {
  height: 118px; position: relative;
  background: linear-gradient(135deg, var(--brand-800), #0F766E);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .5);
}
.sd-fcard-cap {
  position: absolute; top: 7px; left: 7px; background: rgba(2, 44, 34, .72); color: #fff;
  font-size: 9.5px; font-weight: 700; padding: 3px 7px; border-radius: 999px;
}
.sd-fcard-b { padding: 9px 10px 11px; }
.sd-fcard-n { font-size: 12.5px; font-weight: 700; line-height: 1.25; }
.sd-fcard-s {
  font-size: 10px; color: var(--muted); margin-top: 2px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sd-fcard-mo { font-size: 13px; font-weight: 800; margin-top: 7px; color: var(--brand-900); }
.sd-fcard-mo small { font-size: 10px; font-weight: 600; color: var(--muted); }
.sd-fcard-cash { font-size: 10px; color: var(--muted); margin-top: 1px; }

.sd-empty { text-align: center; padding: 26px 16px; }
.sd-empty-t { font-size: 13.5px; font-weight: 700; }
.sd-empty-s { font-size: 12px; color: var(--muted); margin-top: 4px; }

.sd-skel {
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 37%, #F1F5F9 63%);
  background-size: 400% 100%; animation: sd-shim 1.3s ease infinite; border-radius: 12px;
}
@keyframes sd-shim { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Bottom nav — same geometry as the cash app so the two modes feel like
   one product. The cash rules are gated on body[data-route="dashboard"],
   which solar mode also sets, so `.dash-bottom-nav` styling applies and
   only the items differ. Nothing extra is needed here. */
