/* Dashboard layout. Uses the theme variables from site.css. */

.dash-page main { min-height: calc(100vh - 64px - 110px); }

/* ---- signed out ---------------------------------------------------------------------- */
.auth-shell { padding: 64px 0 80px; }
.auth-grid { display: grid; grid-template-columns: 1fr 480px; gap: 56px; align-items: start; }
.auth-intro h1 { font-size: clamp(30px, 3.6vw, 42px); margin: 18px 0 8px; }
.auth-logo { width: 64px; height: 64px; }
.perk-list { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 18px; }
.perk-list li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.perk-list b { display: block; font-size: 16px; }
.perk-list span:not(.perk-icon) { color: var(--text-2); font-size: 14px; }
.perk-icon {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px;
}
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
.auth-card .tabs { margin-bottom: 8px; }
.form-title { font-size: 20px; margin: 14px 0 2px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.optional { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 4px; }

/* ---- signed in ----------------------------------------------------------------------- */
.dash-shell { padding: 40px 0 72px; }
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.who-block { display: flex; align-items: center; gap: 16px; }
.avatar {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 24px; text-transform: uppercase;
}
.eyebrow-sm { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.dash-title { font-size: clamp(24px, 3vw, 32px); margin: 2px 0; }
.dash-head-actions { display: flex; gap: 8px; }
#flash { margin: 0 0 16px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 2px;
}
.stat-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.stat-sub { font-size: 13px; color: var(--muted); }

.dash-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.dash-main, .dash-aside { display: grid; gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { font-size: 18px; margin: 0; }
.panel-text { color: var(--text-2); font-size: 14px; margin: 0 0 12px; }
.form-actions.stack { flex-direction: column; }

.pill {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); background: var(--bg-2); white-space: nowrap;
}
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.pill.warn { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

/* products */
.product-list { display: grid; gap: 12px; }
.product-card {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center;
  padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2);
}
.product-card.owned { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.product-mark {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 20px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line);
}
.product-card.owned .product-mark { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.product-name { font-weight: 700; font-size: 16px; }
.product-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.product-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* downloads */
.dl-table { display: grid; }
.dl-row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.dl-row:first-child { border-top: 0; }
.dl-file { font-weight: 600; word-break: break-all; }
.dl-sub { color: var(--muted); font-size: 13px; }
.dl-size { color: var(--muted); font-size: 13px; white-space: nowrap; }
.empty-state { text-align: center; padding: 28px 12px; color: var(--muted); font-size: 14px; border: 1px dashed var(--line); border-radius: 10px; }

/* hwid */
.kv { margin: 0 0 4px; display: grid; gap: 8px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

@media (max-width: 960px) {
  .auth-grid, .dash-grid { grid-template-columns: 1fr; }
  .auth-card { order: -1; }
  .auth-grid { gap: 36px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .product-card { grid-template-columns: 44px 1fr; }
  .product-mark { width: 44px; height: 44px; }
  .product-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .dl-row { grid-template-columns: 1fr auto; }
  .dl-size { display: none; }
  .auth-shell { padding: 32px 0 56px; }
  .dash-head-actions { width: 100%; }
  .dash-head-actions .btn { flex: 1; }
}
[data-theme="ivory"] .auth-logo { background: #1c1a17; border-radius: 14px; padding: 8px; }
