:root {
  --navy: #1a3a5c; --blue: #2563a8; --light-blue: #dbeafe;
  --green: #166534; --light-green: #dcfce7;
  --yellow: #92400e; --light-yellow: #fef3c7;
  --red: #991b1b; --light-red: #fee2e2;
  --orange: #c2410c; --light-orange: #fff7ed;
  --purple: #5b21b6; --light-purple: #ede9fe;
  --teal: #0f766e; --light-teal: #ccfbf1;
  --gray: #6b7280; --bg: #f0f4f8; --white: #ffffff; --border: #e2e8f0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; background: var(--bg); color: #1e293b; font-size: 14px; line-height: 1.5; }

.header { background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%); color: white; padding: 20px 32px; display: flex; align-items: center; justify-content: space-between; }
.header-left h1 { font-size: 24px; font-weight: 700; }
.header-left .subtitle { opacity: 0.8; font-size: 12px; margin-top: 3px; }
.header-right { text-align: right; font-size: 12px; opacity: 0.8; }
.header-right .date { font-size: 18px; font-weight: 600; opacity: 1; }

.main { max-width: 1280px; margin: 0 auto; padding: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.full-width { margin-bottom: 18px; }

.card { background: var(--white); border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); overflow: hidden; }
.card-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-header h2 { font-size: 12px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 0.5px; }
.card-header .tag { font-size: 10px; background: var(--light-blue); color: #1e40af; padding: 1px 7px; border-radius: 10px; font-weight: 600; }
.card-header .tag.work { background: var(--light-teal); color: var(--teal); }
.card-icon { font-size: 15px; }
.card-body { padding: 14px 16px; }

.stats-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-box { background: var(--white); border-radius: 10px; padding: 14px 10px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.07); }
.stat-box .num { font-size: 26px; font-weight: 800; color: var(--blue); }
.stat-box .lbl { font-size: 10px; color: var(--gray); text-transform: uppercase; margin-top: 2px; letter-spacing: 0.3px; }
.stat-box.red .num { color: var(--red); }
.stat-box.orange .num { color: var(--orange); }
.stat-box.green .num { color: var(--green); }
.stat-box.teal .num { color: var(--teal); }
.stat-box.purple .num { color: var(--purple); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; }
.badge-red { background: var(--light-red); color: var(--red); }
.badge-yellow { background: var(--light-yellow); color: var(--yellow); }
.badge-green { background: var(--light-green); color: var(--green); }
.badge-blue { background: var(--light-blue); color: #1e40af; }
.badge-teal { background: var(--light-teal); color: var(--teal); }
.badge-purple { background: var(--light-purple); color: var(--purple); }
.badge-orange { background: var(--light-orange); color: var(--orange); }

.priority-item { display: flex; gap: 10px; padding: 10px; background: #f8fafc; border-radius: 8px; margin-bottom: 8px; border: 1px solid var(--border); }
.priority-num { background: var(--blue); color: white; min-width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.priority-num.work { background: var(--teal); }
.priority-body .p-title { font-weight: 700; font-size: 13px; color: var(--navy); margin-bottom: 3px; }
.priority-body .p-desc { font-size: 12px; color: #374151; line-height: 1.4; }

.qw-item { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-bottom: 1px dashed #e5e7eb; font-size: 12px; }
.qw-item:last-child { border-bottom: none; }
.qw-check { color: #16a34a; font-size: 14px; flex-shrink: 0; }

.email-table { width: 100%; border-collapse: collapse; }
.email-table th { background: #f8fafc; font-size: 10px; color: var(--gray); text-align: left; padding: 7px 10px; border-bottom: 2px solid var(--border); text-transform: uppercase; letter-spacing: 0.3px; }
.email-table td { padding: 7px 10px; border-bottom: 1px solid #f1f5f9; font-size: 12px; vertical-align: top; }
.email-table tr:last-child td { border-bottom: none; }
.email-table tr:hover td { background: #f8fafc; }
.email-sender { font-size: 10px; color: var(--gray); margin-top: 1px; }
.email-action { font-size: 11px; color: #374151; margin-top: 2px; }

.cal-day-block { margin-bottom: 12px; }
.cal-day-label { font-size: 11px; font-weight: 700; color: var(--navy); background: #f0f4fa; padding: 4px 8px; border-radius: 4px; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.3px; }
.cal-event-item { display: flex; align-items: flex-start; gap: 7px; padding: 4px 6px; border-radius: 4px; margin-bottom: 2px; font-size: 12px; }
.cal-event-item:hover { background: #f8fafc; }
.cal-event-item.conflict { background: #fff7ed; border-left: 3px solid #f97316; }
.cal-event-item.work-event { background: #f0fdfa; border-left: 3px solid var(--teal); }
.cal-event-item.needs-rsvp { background: #ede9fe; border-left: 3px solid var(--purple); }
.cal-event-icon { font-size: 12px; flex-shrink: 0; margin-top: 1px; }
.cal-event-body { flex: 1; }
.cal-event-title { font-weight: 600; color: #1e293b; }
.cal-event-meta { font-size: 10px; color: var(--gray); margin-top: 1px; }

.conflict-item { padding: 10px 12px; border-radius: 8px; margin-bottom: 8px; border-left: 4px solid; }
.conflict-item.hard { background: var(--light-red); border-color: #dc2626; }
.conflict-item.soft { background: var(--light-orange); border-color: #f97316; }
.conflict-item.check { background: var(--light-yellow); border-color: #f59e0b; }
.conflict-item.work-conf { background: var(--light-teal); border-color: var(--teal); }
.conflict-item .c-title { font-weight: 700; font-size: 12px; margin-bottom: 3px; }
.conflict-item.hard .c-title { color: var(--red); }
.conflict-item.soft .c-title { color: var(--orange); }
.conflict-item.check .c-title { color: var(--yellow); }
.conflict-item.work-conf .c-title { color: var(--teal); }
.conflict-item p { font-size: 11px; color: #374151; line-height: 1.4; }

.header-link { font-size: 10px; margin-left: auto; color: var(--gray); text-decoration: none; padding: 2px 8px; border: 1px solid var(--border); border-radius: 4px; white-space: nowrap; flex-shrink: 0; }
.header-link:hover { background: #f0f4f8; color: var(--blue); }
.header-link.work { color: var(--teal); border-color: var(--teal); }
.header-link.work:hover { background: var(--light-teal); }
a.inline-link { font-size: 10px; color: var(--blue); text-decoration: none; }
a.inline-link:hover { text-decoration: underline; }

.meal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.meal-day-card { border-radius: 8px; padding: 10px 12px; border: 1px solid var(--border); background: #f8fafc; }
.meal-day-card.today { background: #fefce8; border-color: #f59e0b; }
.meal-day-card.empty { background: #f1f5f9; opacity: 0.55; }
.meal-day-label { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--gray); letter-spacing: 0.3px; margin-bottom: 5px; }
.meal-day-card.today .meal-day-label { color: #b45309; }
.meal-name { font-size: 12px; font-weight: 700; color: var(--navy); line-height: 1.3; margin-bottom: 6px; }
.meal-name a { color: var(--navy); text-decoration: none; }
.meal-name a:hover { text-decoration: underline; color: var(--blue); }
.meal-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.meal-tip { font-size: 10px; color: #6b7280; font-style: italic; line-height: 1.3; margin-top: 3px; }

.section-divider { font-size: 11px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: 0.5px; padding: 6px 0 4px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }

.footer { text-align: center; padding: 14px; color: var(--gray); font-size: 11px; background: var(--white); border-top: 1px solid var(--border); margin-top: 8px; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .stats-row { grid-template-columns: 1fr; }
  .header { flex-direction: column; gap: 8px; }
  .meal-grid { grid-template-columns: 1fr 1fr; }
}
