/* dashboard.css — Clearbase account dashboard styles.
   Extends the landing page theme.css design tokens.
   Mobile-first, single-column layout that expands on larger screens. */

.dash-page { min-height: 100vh; background: var(--bg); }

.dash-header {
  padding: 28px 32px 0;
  max-width: 1200px;
  margin: 0 auto;
}
.dash-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.dash-sub { font-size: 14px; color: var(--text2); }

/* main grid */
.dash-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  gap: 20px;
}

/* ── Summary cards (3-column grid) ── */
.dash-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
}
.dash-card-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}
.dash-card-value {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.dash-card-sub {
  font-size: 13px;
  color: var(--text2);
}
.positive { color: var(--positive); }
.negative { color: var(--alert); }

/* ── AI Insight card ── */
.dash-ai {
  background: rgba(245,158,11,0.06);
  border-color: var(--amber);
  position: relative;
}
.ai-badge {
  position: absolute;
  top: 14px;
  right: 16px;
  background: var(--amber);
  color: var(--bg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 100px;
}
.dash-ai .dash-card-label { color: var(--amber); }
.dash-ai p { font-size: 14px; color: var(--text2); line-height: 1.6; }

/* ── Accounts table ── */
.dash-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 12px;
}
.acct-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.acct-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.acct-row:last-child { border-bottom: none; }
.acct-row:hover { background: var(--surface2); }
.acct-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: var(--amber-glow);
  color: var(--amber);
  flex-shrink: 0;
}
.acct-name { font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.acct-type-sub { font-size: 12px; color: var(--text3); }
.acct-balance { font-size: 16px; font-weight: 600; text-align: right; }

/* ── Transaction list ── */
.txn-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.txn-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
}
.txn-row:last-child { border-bottom: none; }
.txn-merchant { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.txn-meta { font-size: 12px; color: var(--text3); }
.txn-amount { font-size: 14px; font-weight: 600; }
.txn-amount.income { color: var(--positive); }
.txn-amount.expense { color: var(--text); }

/* ── Tax summary section ── */
.dash-tax {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}
.dash-tax h3 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.dash-tax p { font-size: 14px; color: var(--text2); margin-bottom: 20px; }
.dash-tax-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Plaid link states ── */
.plaid-connect-prompt {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 48px;
  text-align: center;
}
.plaid-connect-prompt p { font-size: 15px; color: var(--text2); margin-bottom: 20px; }
.plaid-connect-prompt .hint {
  font-size: 12px;
  color: var(--text3);
  margin-top: 12px;
}

/* ── Loading skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ── Responsive ── */
@media (max-width: 900px) {
  .dash-body { padding: 20px 16px; }
  .dash-summary { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .dash-header { padding: 20px 16px 0; }
  .acct-row { grid-template-columns: auto 1fr auto; }
  .dash-tax-actions { flex-direction: column; }
}