*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --border: #ede9e3;
  --border-strong: #d6cfc4;
  --text: #1c1917;
  --text-muted: #78716c;
  --text-faint: #a8a29e;
  --accent: #16793a;
  --accent-light: #dcfce7;

  --cat-education: #dbeafe; --cat-education-text: #1e40af;
  --cat-ticket: #fef9c3; --cat-ticket-text: #854d0e;
  --cat-brand: #fce7f3; --cat-brand-text: #9d174d;
  --cat-fundraising: #ede9fe; --cat-fundraising-text: #5b21b6;
  --cat-announcement: #ffedd5; --cat-announcement-text: #9a3412;

  --status-Draft: #f3f4f6; --status-Draft-text: #6b7280;
  --status-Needs-Review: #fef9c3; --status-Needs-Review-text: #854d0e;
  --status-Scheduled: #dbeafe; --status-Scheduled-text: #1e40af;
  --status-Posted: #dcfce7; --status-Posted-text: #166534;
  --status-On-Hold: #fee2e2; --status-On-Hold-text: #991b1b;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
}

/* ── HEADER ── */
.header {
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo span { color: var(--accent); }

.read-only-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 4px;
}

/* ── CONTROLS ── */
.controls {
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}

.search-wrap input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.search-wrap input:focus { border-color: var(--accent); background: white; }
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 14px;
  pointer-events: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border-strong);
  background: white;
  color: var(--text-muted);
  transition: all 0.15s;
}
.btn:hover { background: var(--border); color: var(--text); }
.btn.active { background: var(--text); color: white; border-color: var(--text); }

.sep { width: 1px; height: 24px; background: var(--border); }

.week-nav { display: flex; align-items: center; gap: 6px; }
.week-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  min-width: 180px;
  text-align: center;
}

/* ── CAT FILTER PILLS ── */
.cat-filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.cat-pill {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  opacity: 0.5;
  transition: opacity 0.15s;
  background: var(--border);
  color: var(--text-muted);
}
.cat-pill.active { opacity: 1; }
.cat-pill.all.active { background: var(--text); color: white; }
.cat-pill.Education.active { background: var(--cat-education); color: var(--cat-education-text); border-color: #93c5fd; }
.cat-pill.Ticket-Sales.active { background: var(--cat-ticket); color: var(--cat-ticket-text); border-color: #fcd34d; }
.cat-pill.Brand-Building.active { background: var(--cat-brand); color: var(--cat-brand-text); border-color: #f9a8d4; }
.cat-pill.Fundraising.active { background: var(--cat-fundraising); color: var(--cat-fundraising-text); border-color: #c4b5fd; }
.cat-pill.Announcement.active { background: var(--cat-announcement); color: var(--cat-announcement-text); border-color: #fdba74; }

/* ── MAIN ── */
.main { padding: 20px 28px 60px; max-width: 1300px; margin: 0 auto; }

/* ── WEEK GRID ── */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day-col {
  background: var(--surface);
  border-radius: 10px;
  border: 1.5px solid var(--border);
  overflow: hidden;
  min-height: 160px;
}
.day-col.today { border-color: var(--accent); }

.day-header {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.day-name {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.day-num {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  line-height: 1;
  color: var(--text);
}
.day-col.today .day-name,
.day-col.today .day-num { color: var(--accent); }

.day-body { padding: 6px; display: flex; flex-direction: column; gap: 4px; }

/* ── CARDS ── */
.cal-card {
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  border: 1.5px solid #e5e7eb;
  background: white;
  transition: all 0.15s;
}
.cal-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.1); transform: translateY(-1px); }

.card-theme {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Status chips */
.status-Draft { background: #f3f4f6; color: #6b7280; }
.status-Needs-Review { background: #fef9c3; color: #854d0e; }
.status-Scheduled { background: #dbeafe; color: #1e40af; }
.status-Posted { background: #dcfce7; color: #166534; }
.status-Approved { background: #dcfce7; color: #166534; }
.status-On-Hold { background: #fee2e2; color: #991b1b; }

/* Category chips */
.cat-Education { background: var(--cat-education); color: var(--cat-education-text); }
.cat-Ticket-Sales { background: var(--cat-ticket); color: var(--cat-ticket-text); }
.cat-Brand-Building { background: var(--cat-brand); color: var(--cat-brand-text); }
.cat-Fundraising { background: var(--cat-fundraising); color: var(--cat-fundraising-text); }
.cat-Announcement { background: var(--cat-announcement); color: var(--cat-announcement-text); }

/* ── LIST VIEW ── */
.list-view { display: flex; flex-direction: column; gap: 6px; }

.list-date-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 16px 0 6px;
  border-bottom: 1px solid var(--border);
}

.list-row {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 18px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.list-row:hover { border-color: var(--border-strong); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.list-date { font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap; min-width: 80px; }
.list-theme { font-size: 14px; font-weight: 600; color: var(--text); flex: 1; }
.list-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ── POST DETAIL PANEL ── */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,25,23,0.4);
  backdrop-filter: blur(2px);
  z-index: 500;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.2s;
}
.panel-overlay.open { opacity: 1; }

.detail-panel {
  background: white;
  width: 100%;
  max-width: 440px;
  height: 100%;
  overflow-y: auto;
  padding: 28px;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
.panel-overlay.open .detail-panel { transform: translateX(0); }

.panel-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-faint);
  cursor: pointer;
  float: right;
}
.panel-close:hover { color: var(--text); }

.detail-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
  margin-top: 16px;
}
.detail-value {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}
.detail-title {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  line-height: 1.2;
  margin: 12px 0 4px;
}
.detail-copy {
  background: var(--bg);
  border-radius: 8px;
  padding: 14px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
  border: 1px solid var(--border);
}

/* ── RESULTS COUNT ── */
.results-count {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 12px;
  font-weight: 500;
}

/* ── EMPTY ── */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-faint);
}
.empty .icon { font-size: 48px; margin-bottom: 12px; }
.empty .title { font-weight: 600; color: var(--text-muted); font-size: 16px; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
