@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #1c78b7;
  --blue-dark: #155f91;
  --blue-soft: #e8f3fa;
  --green: #65b450;
  --green-dark: #4e8f3c;
  --ink: #1a1f24;
  --muted: #5b6570;
  --line: #d7dee4;
  --paper: #f4f7f9;
  --white: #ffffff;
  --warn: #c47b16;
  --warn-soft: #fdf3e3;
  --danger: #b42318;
  --pending: #6b7280;
  --shadow: 0 8px 24px rgba(20, 40, 60, 0.08);
  --radius: 16px;
  --header: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Montserrat", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.25; margin: 0; }

.site-header {
  background: var(--blue);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: var(--header);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brand-logo { height: 36px; width: auto; }
.brand-text { font-size: 1.05rem; white-space: nowrap; }
.site-nav {
  display: flex;
  gap: 6px;
  flex: 1;
}
.site-nav a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 999px;
}
.site-nav a:hover, .site-nav a.is-active {
  background: rgba(255,255,255,0.16);
  color: var(--white);
}
.site-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  font-size: 0.85rem;
}
.reviewer-chip { color: rgba(255,255,255,0.92); }
.reviewer-chip strong { font-weight: 700; }
.header-accent { height: 4px; background: var(--green); }
.text-btn {
  background: none;
  border: 0;
  color: inherit;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}
.site-header .text-btn { color: var(--white); }

.site-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}
.hero { margin-bottom: 24px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue);
  margin: 0 0 6px;
}
.hero h1, .pack-heading h1, .report-toolbar h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--ink);
}
.lede, .card-range { color: var(--muted); margin: 8px 0 0; }
.section-head { margin: 32px 0 16px; }
.section-head h2 { font-size: 1.25rem; font-weight: 700; }

.glance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 8px 0 8px;
}
.glance-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.glance-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.glance-item strong { font-size: 1.25rem; font-weight: 700; }

.card-grid, .pack-feed { display: grid; gap: 20px; }
.pack-grid { grid-template-columns: repeat(2, 1fr); }
.dash-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.card-top h3, .report-copy h3 { font-size: 1.15rem; }
.card-due { margin: 0; font-weight: 600; color: var(--blue-dark); font-size: 0.92rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.badge-open { background: var(--blue-soft); color: var(--blue-dark); }
.badge-soon { background: #eceff2; color: var(--pending); }
.badge-approved, .status-pill.approved { background: #e7f6e3; color: var(--green-dark); }
.badge-changes, .status-pill.needs_changes { background: var(--warn-soft); color: var(--warn); }
.badge-pending, .status-pill.pending { background: #eef0f2; color: var(--pending); }

.count-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
}
.count-pills li {
  background: var(--paper);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--muted);
}
.count-pills strong { color: var(--ink); }
.count-pills .is-approved strong { color: var(--green-dark); }
.count-pills .is-changes strong { color: var(--warn); }

.report-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.report-card {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.report-copy { min-width: 0; }
.report-copy h3 { margin-bottom: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: var(--blue-soft); color: var(--blue-dark); }
.btn-secondary:hover { background: #d5eaf6; }
.btn-approve { background: var(--green); color: var(--white); }
.btn-approve:hover, .btn-approve.is-active { background: var(--green-dark); }
.btn-changes { background: var(--warn-soft); color: #8a5a10; }
.btn-changes:hover, .btn-changes.is-active { background: #f3e0be; }
.btn-disabled, .btn:disabled {
  background: #e6e8eb;
  color: #8b939b;
  cursor: not-allowed;
}
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: var(--paper);
}
body.is-login { background: var(--paper); }
body.is-login main { max-width: none; padding: 0; margin: 0; }
.login-card {
  width: min(420px, 100%);
  background: var(--white);
  border-radius: 20px;
  padding: 36px 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.login-logo { height: 52px; width: auto; margin: 0 auto 16px; }
.login-card h1 { font-size: 1.6rem; margin-bottom: 8px; }
.login-lede { color: var(--muted); margin: 0 0 24px; }
.login-form { text-align: left; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-weight: 600; font-size: 0.88rem; }
.field input, .field textarea, .field select, .review-comment {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--white);
  color: var(--ink);
  width: 100%;
}
.field textarea, .review-comment { min-height: 72px; resize: vertical; }
.form-error { background: #fdecec; color: var(--danger); padding: 10px 12px; border-radius: 8px; font-weight: 600; }

.pack-toolbar { margin-bottom: 20px; }
.back-link {
  display: inline-block;
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.pack-tools { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.metric {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}
.metric strong { font-weight: 700; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.filters select { min-width: 180px; }

.pack-feed { grid-template-columns: repeat(2, 1fr); align-items: start; }
.feed-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.feed-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 12px 16px 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.mock-shell {
  margin: 10px 16px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.mock { color: #050505; }
.mock-fb { font-family: Helvetica, Arial, system-ui, sans-serif; }
.mock-ig, .mock-li, .mock-x, .mock-th {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.mock-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
}
.mock-ig .mock-head { padding: 10px 12px; }
.mock-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: #e4e6eb;
  flex-shrink: 0;
}
.mock-ig .mock-avatar { width: 32px; height: 32px; }
.mock-li .mock-avatar { width: 48px; height: 48px; }
.mock-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mock-name { font-weight: 700; font-size: 15px; line-height: 20px; }
.mock-sub { font-size: 13px; color: #65676b; display: flex; align-items: center; gap: 4px; }
.mock-li .mock-name { font-weight: 600; font-size: 14px; }
.mock-li .mock-sub { font-size: 12px; color: #666; line-height: 16px; }
.mock-caption {
  padding: 4px 16px 12px;
  font-size: 15px;
  line-height: 20px;
  white-space: pre-wrap;
  word-break: break-word;
}
.mock-ig .mock-caption { padding: 0 12px 14px; font-size: 14px; line-height: 18px; }
.mock-ig .ig-user { font-weight: 600; margin-right: 6px; }
.mock-x .mock-caption, .mock-th .mock-caption { padding: 4px 0 12px; }
.mock-actions {
  display: flex;
  padding: 8px;
  color: #65676b;
  font-size: 13px;
  font-weight: 600;
  border-top: 1px solid #ced0d4;
}
.mock-actions span, .mock-actions div {
  flex: 1;
  text-align: center;
}
.mock-ig-actions { display: flex; gap: 14px; padding: 10px 12px 6px; font-size: 18px; }
.mock-ig-actions .push { margin-left: auto; }
.mock-media { background: #fff; }
.mock-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.mock-carousel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #fff;
}
.mock-x, .mock-th { padding: 12px 16px 8px; }
.mock-x-wrap, .mock-th-wrap { display: flex; gap: 10px; }
.mock-handle { color: #536471; font-weight: 400; margin-left: 6px; }
.mock-x .mock-media, .mock-th .mock-media {
  border: 1px solid #cfd9de;
  border-radius: 16px;
  overflow: hidden;
}
.mock-x-actions, .mock-th-actions {
  display: flex;
  justify-content: space-between;
  max-width: 420px;
  padding: 10px 8px 2px;
  color: #536471;
  font-size: 13px;
}

.review-panel {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.review-error { color: var(--danger); font-size: 0.85rem; font-weight: 600; margin: 0; }
.notes details {
  font-size: 0.88rem;
  color: var(--muted);
}
.notes summary { cursor: pointer; font-weight: 600; color: var(--blue-dark); }
.notes p { white-space: pre-wrap; margin: 8px 0 0; }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.history li {
  background: var(--paper);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.82rem;
}
.history .who { font-weight: 700; }
.history .when { color: var(--muted); margin-left: 6px; }
.history .comment { margin: 4px 0 0; white-space: pre-wrap; }

.caption-link { text-decoration: none; }
.caption-link:hover { text-decoration: underline; }

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(16, 28, 40, 0.45);
  display: grid;
  place-items: center;
  z-index: 80;
  padding: 20px;
}
.modal-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  width: min(420px, 100%);
  box-shadow: var(--shadow);
}
.modal-card h2 { margin-bottom: 8px; }
.modal-card p { color: var(--muted); margin: 0 0 16px; }

.report-toolbar, .pack-heading { margin-bottom: 16px; }
.report-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.report-main { max-width: 980px; }
.pdf-frame-wrap {
  background: #d9e0e6;
  border-radius: 12px;
  overflow: hidden;
  min-height: 70vh;
  border: 1px solid var(--line);
}
.pdf-frame { width: 100%; height: 80vh; border: 0; background: #525659; }

.muted, .empty-note { color: var(--muted); }
.day-group { grid-column: 1 / -1; }
.day-group h2 {
  font-size: 1.05rem;
  margin: 8px 0 0;
}
.day-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 12px; align-items: start; }

@media (max-width: 900px) {
  .pack-grid, .pack-feed, .day-grid, .glance { grid-template-columns: 1fr; }
  .report-card { flex-direction: column; align-items: flex-start; }
  .site-header-inner { gap: 10px; }
  .site-nav { order: 3; width: 100%; }
  .brand-logo { height: 30px; }
}
@media (max-width: 560px) {
  .site-main { padding: 20px 14px 48px; }
  .dash-card, .login-card { padding: 18px 16px; }
  .filters { width: 100%; }
  .filters label, .filters select, .btn { width: 100%; }
  .site-header-actions { width: 100%; justify-content: space-between; }
}
