/* John Burns Personal Hub — Style System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #F7F8FA;
  --surface-0: #FFFFFF;
  --surface-1: #F3F4F7;
  --surface-2: #EAECF0;
  --border: #E2E5EB;
  --border-strong: #CDD1DB;
  --text-1: #111827;
  --text-2: #374151;
  --text-3: #6B7280;
  --text-4: #9CA3AF;
  --accent: #1A3C5E;
  --accent-light: rgba(26,60,94,0.08);
  --green: #16A34A;
  --green-bg: #F0FDF4;
  --green-border: #BBF7D0;
  --yellow: #D97706;
  --yellow-bg: #FFFBEB;
  --yellow-border: #FDE68A;
  --red: #DC2626;
  --red-bg: #FEF2F2;
  --red-border: #FECACA;
  --blue: #2563EB;
  --blue-bg: #EFF6FF;
  --blue-border: #BFDBFE;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 2px 6px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.09);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.55; background: var(--bg); color: var(--text-1); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

/* NAV */
.nav { background: var(--accent); height: 48px; padding: 0 20px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-md); }
.nav-brand { font-size: 0.9rem; font-weight: 800; color: #fff; letter-spacing: -0.2px; }
.nav-pills { display: flex; gap: 4px; flex: 1; justify-content: center; overflow-x: auto; scrollbar-width: none; }
.nav-pills::-webkit-scrollbar { display: none; }
.nav-pill { font-size: 0.68rem; font-weight: 600; padding: 3px 10px; border-radius: var(--radius-full); border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.7); white-space: nowrap; transition: all 0.15s; }
.nav-pill:hover, .nav-pill.active { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.5); color: #fff; }
.nav-time { font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.6); font-variant-numeric: tabular-nums; }

/* HERO */
.hero { background: linear-gradient(135deg, #1A3C5E 0%, #0F2540 100%); padding: 28px 20px 22px; color: #fff; }
.hero-greeting { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.4px; }
.hero-sub { font-size: 0.8rem; color: rgba(255,255,255,0.55); margin-top: 4px; }
.hero-updated { font-size: 0.68rem; color: rgba(255,255,255,0.3); margin-top: 10px; }

/* URGENT */
.urgent-strip { background: #7F1D1D; border-bottom: 2px solid #DC2626; padding: 10px 20px; }
.urgent-label { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: #FCA5A5; margin-bottom: 5px; }
.urgent-item { font-size: 0.82rem; color: #FEE2E2; padding: 4px 0; display: flex; gap: 8px; align-items: flex-start; }
.urgent-item::before { content: "›"; font-weight: 800; flex-shrink: 0; }

/* CONTENT */
.content { max-width: 900px; margin: 0 auto; padding: 16px 16px 80px; display: flex; flex-direction: column; gap: 12px; }

/* SECTION CARDS */
.section-card { background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.sc-header { padding: 12px 16px 10px; border-bottom: 1px solid var(--border); background: var(--surface-1); display: flex; align-items: center; gap: 8px; border-top: 2px solid var(--accent); }
.sc-icon { font-size: 1rem; }
.sc-title { font-size: 0.85rem; font-weight: 800; color: var(--text-1); flex: 1; text-transform: uppercase; letter-spacing: 0.5px; }
.sc-badge { font-size: 0.62rem; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); }
.badge-red { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); border: 1px solid var(--yellow-border); }
.badge-green { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.badge-blue { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-border); }
.sc-body { padding: 12px 16px; }

/* ROWS */
.row { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.row:last-child { border-bottom: none; }
.row-label { font-size: 0.8rem; font-weight: 600; color: var(--text-2); flex: 1; }
.row-sub { font-size: 0.72rem; color: var(--text-3); margin-top: 1px; }
.row-value { font-size: 0.82rem; font-weight: 700; color: var(--text-1); text-align: right; }
.row-tag { font-size: 0.65rem; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); }

/* FAMILY CARDS */
.family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.family-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; text-align: center; }
.family-avatar { width: 36px; height: 36px; border-radius: var(--radius-full); margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 800; color: #fff; }
.family-name { font-size: 0.8rem; font-weight: 700; color: var(--text-1); }
.family-sub { font-size: 0.65rem; color: var(--text-3); margin-top: 2px; }
.family-status { font-size: 0.65rem; color: var(--text-3); margin-top: 6px; line-height: 1.4; }

/* TODO */
.todo-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border); }
.todo-item:last-child { border-bottom: none; }
.todo-check { width: 16px; height: 16px; border: 2px solid var(--border-strong); border-radius: 4px; flex-shrink: 0; margin-top: 1px; }
.todo-text { font-size: 0.82rem; color: var(--text-2); flex: 1; line-height: 1.5; }
.todo-cat { font-size: 0.65rem; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-full); margin-left: 4px; }

/* FINANCE TABLE */
.fin-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.fin-table th { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-3); padding: 6px 8px; text-align: left; background: var(--surface-1); border-bottom: 1.5px solid var(--border); }
.fin-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); color: var(--text-1); font-variant-numeric: tabular-nums; }
.fin-table tr:last-child td { border-bottom: none; }
.fin-table tr:hover td { background: var(--surface-1); }
.fin-total td { font-weight: 700; background: var(--surface-2) !important; border-top: 1.5px solid var(--border-strong); }

/* DEADLINE */
.deadline-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.deadline-row:last-child { border-bottom: none; }
.dl-what { font-size: 0.82rem; color: var(--text-2); font-weight: 600; }
.dl-sub { font-size: 0.7rem; color: var(--text-3); }
.dl-when { font-size: 0.72rem; font-weight: 800; padding: 2px 10px; border-radius: var(--radius-full); white-space: nowrap; }
.dl-red { background: var(--red-bg); color: var(--red); }
.dl-yellow { background: var(--yellow-bg); color: var(--yellow); }
.dl-green { background: var(--green-bg); color: var(--green); }

/* QUOTE */
.quote-block { border-left: 3px solid var(--accent); padding: 12px 16px; background: var(--blue-bg); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.quote-text { font-size: 0.85rem; color: var(--text-2); font-style: italic; line-height: 1.6; }
.quote-attr { font-size: 0.7rem; color: var(--text-3); margin-top: 5px; font-weight: 600; }

/* LINK BUTTON */
.link-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; color: var(--accent); text-decoration: none; padding: 4px 10px; border-radius: var(--radius-full); border: 1px solid var(--accent-light); background: var(--accent-light); transition: all 0.15s; }
.link-btn:hover { background: var(--accent); color: #fff; }

/* FOOTER */
.footer { text-align: center; font-size: 0.68rem; color: var(--text-4); padding: 16px; }

@media (max-width: 480px) {
  .family-grid { grid-template-columns: repeat(3, 1fr); }
  .nav-pills { display: none; }
}
