/* Everbound Approvals — clean, mobile-first */
:root {
  --ink: #2b2b26;
  --muted: #6f6f66;
  --line: #ddd8cc;
  --bg: #ebefe7;
  --card: #ffffff;
  --brand: #2a3613;
  --brand-ink: #ffffff;
  --accent: #f0523d;
  --ok: #1c7c3e;
  --ok-bg: #e6f4ea;
  --warn: #9a6a00;
  --warn-bg: #fdf3d7;
  --bad: #b3261e;
  --bad-bg: #fdecea;
  --gray-bg: #eef1f5;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
.topbar { background: var(--brand); color: #fff; }
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; }
.brand span { font-weight: 400; opacity: .85; }
.topbar nav { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.topbar nav a { color: #fff; text-decoration: none; font-size: 14px; opacity: .92; }
.topbar nav a:hover { opacity: 1; text-decoration: underline; }
.who { font-size: 13px; opacity: .75; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 20px 16px 60px; }
.wrap.wide { max-width: 1440px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; }

h1 { font-size: 26px; margin: 8px 0 4px; }
h2 { font-size: 19px; margin: 28px 0 10px; }
h3 { font-size: 16px; margin: 16px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 12px 0;
}
.card.narrow { max-width: 460px; }
.card.wide { max-width: 720px; }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: var(--accent); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card.item { border-left: 5px solid var(--line); }
.card.item h3 { margin: 6px 0 4px; font-size: 16px; }
.item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.platform { font-size: 12px; color: var(--muted); text-transform: capitalize; }

.badge {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; background: var(--gray-bg); color: var(--ink); text-transform: capitalize;
}
.badge.big { font-size: 14px; padding: 5px 14px; margin-bottom: 6px; }
.status-draft .badge, .cal-item.status-draft { background: var(--gray-bg); }
.status-in_review .badge { background: var(--warn-bg); color: var(--warn); }
.status-approved .badge { background: var(--ok-bg); color: var(--ok); }
.status-changes_requested .badge { background: var(--bad-bg); color: var(--bad); }
.card.item.status-in_review { border-left-color: #e0a800; }
.card.item.status-approved { border-left-color: var(--ok); }
.card.item.status-changes_requested { border-left-color: var(--bad); }

.btn {
  display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 9px 16px; border-radius: 8px; font-size: 14px; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.approve { background: var(--ok); border-color: var(--ok); color: #fff; font-size: 16px; padding: 12px 28px; }
.btn.changes { background: #fff; border-color: var(--bad); color: var(--bad); }
.btn.deny { background: var(--bad); border-color: var(--bad); color: #fff; font-size: 16px; padding: 12px 28px; }
.decision-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.decision-row .inline-form { margin: 0; }
.btn.danger-ghost { color: var(--bad); border-color: transparent; }
.inline-form { display: inline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }

label { display: block; margin: 12px 0; font-weight: 600; font-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 8px; font-family: inherit; background: #fff;
}
textarea { resize: vertical; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }

.flashes { margin: 12px 0; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 8px; font-size: 14px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--bad-bg); color: var(--bad); }

.comment-list { list-style: none; padding: 0; margin: 0 0 12px; }
.comment-list li { border-top: 1px solid var(--line); padding: 10px 0; }
.comment-list li:first-child { border-top: none; }
.comment-list p { margin: 6px 0; white-space: pre-wrap; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; }
.tag.team { background: #dbe7fb; color: #1a4fa0; }
.tag.client { background: #e8e0f7; color: #5b2ea6; }

.detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
@media (max-width: 760px) { .detail-grid { grid-template-columns: 1fr; } }
.preview { max-width: 100%; border-radius: 8px; display: block; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 8px; }
.previews .preview { margin: 0; width: 100%; }
.file-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.file-list .ms-option { border: 1px solid var(--line); }
button.mini { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px 8px; cursor: pointer; font-size: 13px; }
button.mini:hover { border-color: var(--accent); color: var(--accent); }
.contact-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.contact-row input[type=text], .contact-row input[type=email] { flex: 1; min-width: 0; }
.remove-check { white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.body-text { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.email-mock { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.email-subject { background: var(--bg); padding: 12px 14px; margin: 0; border-bottom: 1px solid var(--line); }
.email-mock .body-text { border: none; background: #fff; }

.linkrow { display: flex; gap: 8px; }
.linkrow input { flex: 1; font-size: 13px; }

/* calendar */
.cal-nav { display: flex; gap: 8px; margin-bottom: 10px; }
.calendar { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-head span { background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 8px 4px; text-align: center; }
.cal-day { min-height: 128px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 6px; font-size: 12px; position: relative; }
.cal-week:first-of-type .cal-day { border-top: none; }
.cal-day:nth-child(7n+1) { border-left: none; }
.cal-day.empty { background: #fafbfc; }
.cal-add { position: absolute; inset: 0; border-radius: 6px; }
.cal-add:hover { background: rgba(42, 54, 19, 0.07); }
.cal-add:hover::after {
  content: "+"; position: absolute; top: 2px; right: 6px;
  color: var(--brand); font-weight: 800; font-size: 16px; line-height: 1;
}
.day-num { font-weight: 700; color: var(--muted); font-size: 12px; position: relative; }
.cal-item {
  display: block; margin-top: 4px; padding: 3px 6px; border-radius: 6px; font-size: 12px;
  text-decoration: none; color: var(--ink); background: var(--gray-bg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  position: relative; z-index: 1;
}
.cal-item.status-in_review { background: var(--warn-bg); }
.cal-item.status-approved { background: var(--ok-bg); }
.cal-item.status-changes_requested { background: var(--bad-bg); }
.type-icon { margin-right: 3px; }
.plat-dots { white-space: nowrap; margin-left: 4px; margin-right: 6px; }
.plat-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-left: 2px; vertical-align: baseline;
}
.platform .plat-dot { width: 9px; height: 9px; }

.ms-dropdown { position: relative; margin-top: 6px; }
.ms-button {
  width: 100%; text-align: left; padding: 10px 12px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  cursor: pointer; font-family: inherit; color: var(--ink);
}
.ms-button::after { content: "\25be"; float: right; color: var(--muted); }
.ms-panel {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  margin-top: 4px; padding: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
label.ms-option {
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 8px; border-radius: 6px;
  font-weight: 400; font-size: 14px; cursor: pointer;
}
label.ms-option:hover { background: var(--gray-bg); }
.ms-option input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); }
#platform-select { display: none; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px;
  font-size: 13px; text-decoration: none; color: var(--ink);
}
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.review-actions .btn.approve { margin-bottom: 0; }
.back { display: inline-block; margin-bottom: 8px; text-decoration: none; color: var(--accent); font-size: 14px; }
.from-client { background: #faf7ff; border-radius: 8px; padding-left: 10px !important; }
.from-team { background: #f4f8ff; border-radius: 8px; padding-left: 10px !important; }

@media (max-width: 640px) {
  h1 { font-size: 22px; }
  .cal-day { min-height: 64px; }
  .cal-item { font-size: 11px; }
  .topbar-inner { padding: 10px 12px; }
}
