/* =========================================================
   DLE Content Hub — Brand Stylesheet
   Colors: #1e1b4b (navy) · #b08a50 (gold)
   Fonts:  Outfit (body) · Cormorant Garamond (display)
   ========================================================= */

/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #1e1b4b;
  --navy-light: #2d2963;
  --navy-dark:  #13112e;
  --gold:       #b08a50;
  --gold-light: #c9a96e;
  --gold-pale:  #f5edd9;
  --green:      #16a34a;
  --green-pale: #dcfce7;
  --amber:      #d97706;
  --amber-pale: #fef3c7;
  --red:        #dc2626;
  --red-pale:   #fee2e2;
  --slate-50:   #f8fafc;
  --slate-100:  #f1f5f9;
  --slate-200:  #e2e8f0;
  --slate-300:  #cbd5e1;
  --slate-400:  #94a3b8;
  --slate-500:  #64748b;
  --slate-600:  #475569;
  --slate-700:  #334155;
  --slate-800:  #1e293b;
  --sidebar-w:  240px;
  --topbar-h:   60px;
  --radius:     8px;
  --radius-lg:  12px;
  --shadow:     0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.10), 0 4px 6px -2px rgba(0,0,0,.05);
}

html, body { margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--slate-100);
  color: var(--slate-700);
  line-height: 1.65;
}
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; }

/* ── Typography ───────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  color: var(--navy);
  line-height: 1.3;
}
h1 { font-size: 1.875rem; font-weight: 700; }
h2 { font-size: 1.45rem;  font-weight: 700; }
h3 { font-size: 1.15rem;  font-weight: 600; }
h4 { font-size: 1rem;     font-weight: 600; }
p  { margin-bottom: .875rem; }

/* ── Layout ───────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, var(--navy), #2d1b69);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform .25s ease;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}

.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 100;
  box-shadow: var(--shadow);
}
.topbar-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-700);
  flex: 1;
  margin: 0;
}
.topbar-right { display: flex; align-items: center; gap: 8px; }

.page-content {
  flex: 1;
  padding: 28px 32px;
  width: 100%;
}

/* ── Sidebar ──────────────────────────────────────────── */
.sidebar-logo {
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.logo-icon { font-size: 1.6rem; color: var(--gold); }
.logo-text  { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-weight: 600; color: #fff; letter-spacing: .5px; line-height: 1.3; }

.sidebar-nav {
  padding: 16px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: rgba(255,255,255,.75);
  font-size: .875rem;
  font-weight: 500;
  transition: background .15s, color .15s;
  cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: var(--gold); color: #fff; }
.nav-item svg { flex-shrink: 0; opacity: .85; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}
.sidebar-user-name { font-size: .875rem; font-weight: 600; color: #fff; }
.sidebar-user-role  { font-size: .75rem; color: var(--gold-light); text-transform: capitalize; margin-bottom: 8px; }
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  transition: color .15s;
}
.sidebar-logout:hover { color: var(--gold-light); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px; height: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.hamburger span { display: block; width: 100%; height: 2px; background: var(--slate-600); border-radius: 2px; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 190;
}

/* ── Cards ────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.card-title { font-size: 1rem; font-weight: 600; color: var(--navy); margin: 0; }

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  border: 1px solid var(--slate-200);
}
.stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--slate-400); margin-bottom: 8px; font-weight: 600; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat-sub   { font-size: .8rem; color: var(--slate-400); margin-top: 6px; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-family: 'Outfit', sans-serif;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background .15s, opacity .15s, box-shadow .15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  vertical-align: middle;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.btn:hover { box-shadow: var(--shadow-md); }
.btn:active { opacity: .85; }

.btn-primary   { background: var(--navy);  color: #fff; }
.btn-gold      { background: var(--gold);  color: #fff; }
.btn-success   { background: var(--green); color: #fff; }
.btn-warning   { background: var(--amber); color: #fff; }
.btn-danger    { background: var(--red);   color: #fff; }
.btn-outline   { background: transparent; border: 1px solid var(--slate-300) !important; color: var(--slate-600); }

.btn-primary:hover  { background: #161340; color: #fff; }
.btn-gold:hover     { background: #9a7440; color: #fff; }
.btn-success:hover  { background: #15803d; color: #fff; }
.btn-warning:hover  { background: #b45309; color: #fff; }
.btn-danger:hover   { background: #b91c1c; color: #fff; }
.btn-outline:hover  { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-sm { padding: 5px 12px; font-size: .8rem; }
.btn-lg { padding: 11px 24px; font-size: 1rem; }

/* ── Forms ────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--slate-600);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius);
  font-family: 'Outfit', sans-serif;
  font-size: .9rem;
  color: var(--slate-700);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30,27,75,.08);
}
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control   { cursor: pointer; }
.form-hint { font-size: .78rem; color: var(--slate-400); margin-top: 4px; }
.form-error { font-size: .8rem; color: var(--red); margin-top: 4px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* ── Badges ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
}
.badge-pending   { background: var(--gold-pale);   color: #7a5e20; border: 1px solid #e5c97e; }
.badge-approved  { background: var(--green-pale);  color: #166534; border: 1px solid #86efac; }
.badge-revision  { background: var(--amber-pale);  color: #92400e; border: 1px solid #fcd34d; }
.badge-rejected  { background: var(--slate-100);   color: var(--slate-500); border: 1px solid var(--slate-200); text-decoration: line-through; }
.badge-owner     { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; }
.badge-admin     { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.badge-employee  { background: var(--slate-100); color: var(--slate-600); border: 1px solid var(--slate-300); }

/* Service color dots */
.service-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}

/* ── Tables ───────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--slate-500);
  border-bottom: 2px solid var(--slate-200);
  white-space: nowrap;
}
tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--slate-100);
  vertical-align: middle;
}
tbody tr:hover { background: var(--slate-50); }
tbody tr:last-child td { border-bottom: none; }

/* ── Alerts ───────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: .875rem;
  font-weight: 500;
  border: 1px solid;
}
.alert-success { background: var(--green-pale);  color: #166534; border-color: #86efac; }
.alert-error   { background: var(--red-pale);    color: #991b1b; border-color: #fca5a5; }
.alert-warning { background: var(--amber-pale);  color: #92400e; border-color: #fcd34d; }
.alert-info    { background: #eff6ff;            color: #1e40af; border-color: #93c5fd; }

/* ── Notifications ────────────────────────────────────── */
.notif-wrapper { position: relative; }
.notif-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  color: var(--slate-500);
  display: flex;
  align-items: center;
  transition: background .15s, color .15s;
}
.notif-btn:hover { background: var(--slate-100); color: var(--navy); }
.notif-badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--red);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid #fff;
}
.notif-dropdown {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 8px);
  width: 320px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--slate-200);
  z-index: 300;
  overflow: hidden;
}
.notif-dropdown.open { display: block; }
.notif-header {
  padding: 12px 16px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--slate-700);
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mark-all-read { font-size: .75rem; color: var(--gold); font-weight: 500; }
.mark-all-read:hover { color: var(--gold-light); }
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--slate-50);
  transition: background .1s;
}
.notif-item:hover { background: var(--slate-50); }
.notif-item.unread { background: #fafaf0; border-left: 3px solid var(--gold); }
.notif-msg  { display: block; font-size: .8rem; color: var(--slate-700); line-height: 1.4; }
.notif-time { display: block; font-size: .72rem; color: var(--slate-400); margin-top: 3px; }
.notif-empty { padding: 20px 16px; text-align: center; color: var(--slate-400); font-size: .85rem; }

/* ── Filters bar ──────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.filter-bar select,
.filter-bar input[type="text"] {
  padding: 7px 10px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius);
  font-family: 'Outfit', sans-serif;
  font-size: .83rem;
  color: var(--slate-600);
  background: var(--slate-50);
  cursor: pointer;
}
.filter-bar select:focus,
.filter-bar input:focus {
  outline: none;
  border-color: var(--navy);
}
.filter-label { font-size: .78rem; font-weight: 600; color: var(--slate-500); white-space: nowrap; }

/* ── Content cards (review queue / my-content) ────────── */
.content-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.content-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--slate-200);
  transition: box-shadow .15s;
}
.content-card:hover { box-shadow: var(--shadow-md); }

.content-card-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 5px;
}
.content-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: .78rem;
  color: var(--slate-500);
}
.content-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Feedback box */
.feedback-box {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--amber-pale);
  border-radius: var(--radius);
  font-size: .83rem;
  color: var(--slate-700);
}
.feedback-box strong { color: var(--amber); }

/* ── Calendar ─────────────────────────────────────────── */
.calendar-wrap {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--slate-200);
  overflow: visible;
}
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--slate-100);
}
.calendar-nav h2 { font-size: 1.1rem; font-weight: 600; margin: 0; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.cal-dow {
  padding: 10px 0;
  text-align: center;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--slate-400);
  border-bottom: 1px solid var(--slate-100);
  background: var(--slate-50);
}
.cal-cell {
  min-height: 108px;
  min-width: 0;
  padding: 6px 6px;
  border-right: 1px solid var(--slate-100);
  border-bottom: 1px solid var(--slate-100);
  vertical-align: top;
  position: relative;
  overflow: hidden;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-date {
  font-size: .78rem;
  font-weight: 600;
  color: var(--slate-400);
  margin-bottom: 4px;
  display: block;
}
.cal-cell.today .cal-date {
  background: var(--navy);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-cell.other-month { background: var(--slate-50); opacity: .6; }
.cal-pill {
  display: block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .1s;
}
.cal-pill:hover { opacity: .85; }
.cal-pill.muted { opacity: .45; }

/* Calendar filter bar */
.cal-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 24px;
  border-bottom: 1px solid var(--slate-100);
  background: var(--slate-50);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 400;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp .2s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body    { padding: 20px 24px; }
.modal-footer  { padding: 14px 24px; border-top: 1px solid var(--slate-100); display: flex; gap: 10px; justify-content: flex-end; }
.modal-close   { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--slate-400); line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--slate-700); }

/* Detail rows */
.detail-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--slate-100);
  font-size: .875rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { font-weight: 600; color: var(--slate-500); font-size: .78rem; text-transform: uppercase; letter-spacing: .3px; }
.detail-value { color: var(--slate-700); word-break: break-word; }

/* ── KPI Charts ───────────────────────────────────────── */
.kpi-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--slate-200);
  margin-bottom: 24px;
}
.kpi-tab {
  padding: 10px 20px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--slate-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Outfit', sans-serif;
}
.kpi-tab:hover   { color: var(--navy); }
.kpi-tab.active  { color: var(--navy); border-bottom-color: var(--gold); font-weight: 600; }
.kpi-panel       { display: none; }
.kpi-panel.active { display: block; }

.phase-banner {
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}
.phase-1 { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; }
.phase-2 { background: var(--gold-pale); color: #7a5e20; border: 1px solid #e5c97e; }
.phase-icon { font-size: 1.4rem; }

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.chart-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
}
.chart-title { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--slate-500); margin-bottom: 12px; }
.bar-chart   { display: flex; align-items: flex-end; gap: 5px; height: 80px; }
.bar-item    { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.bar-fill    { width: 100%; background: var(--navy); border-radius: 3px 3px 0 0; min-height: 2px; transition: height .3s; }
.bar-label   { font-size: .6rem; color: var(--slate-400); white-space: nowrap; }

/* ── Login page ───────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  padding: 20px;
}
.login-box {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo .logo-icon { font-size: 2.2rem; color: var(--gold); display: block; margin-bottom: 6px; }
.login-logo h1 { font-size: 1.5rem; }
.login-logo p  { font-size: .83rem; color: var(--slate-400); margin: 0; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 260px;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-wrapper { margin-left: 0; }
  .hamburger { display: flex; }
  .page-content { padding: 20px 16px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .notif-dropdown { width: 280px; right: -40px; }
  .detail-row { grid-template-columns: 100px 1fr; }
  .content-card { grid-template-columns: 1fr; }
  .content-card-actions { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .cal-cell   { min-height: 70px; padding: 3px 4px; }
  .cal-pill   { font-size: .6rem; padding: 1px 4px; }
}

/* ── Misc utilities ───────────────────────────────────── */
.text-muted   { color: var(--slate-400); }
.text-small   { font-size: .8rem; }
.text-center  { text-align: center; }
.mt-1  { margin-top: 4px; }
.mt-2  { margin-top: 8px; }
.mt-3  { margin-top: 16px; }
.mt-4  { margin-top: 24px; }
.mb-3  { margin-bottom: 16px; }
.mb-4  { margin-bottom: 24px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.w-full { width: 100%; }
.hidden { display: none; }

/* ── Character counter ────────────────────────────────── */
.char-counter-wrap { position: relative; }
.char-counter {
  position: absolute;
  bottom: 8px; right: 10px;
  font-size: .72rem;
  color: var(--slate-400);
  pointer-events: none;
  background: rgba(255,255,255,.85);
  padding: 1px 5px;
  border-radius: 4px;
}
.char-counter.warn  { color: var(--amber); }
.char-counter.over  { color: var(--red); font-weight: 600; }

/* ── Post template selector ───────────────────────────── */
.template-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.template-bar-label { font-size: .75rem; font-weight: 600; color: var(--slate-500); white-space: nowrap; }
.template-btn {
  padding: 4px 10px;
  border: 1px solid var(--slate-300);
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 500;
  background: #fff;
  color: var(--slate-600);
  cursor: pointer;
  transition: all .15s;
  font-family: 'Outfit', sans-serif;
}
.template-btn:hover { border-color: var(--navy); color: var(--navy); background: var(--slate-50); }

/* ── Content Briefs ───────────────────────────────────── */
.brief-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.brief-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--slate-200);
  padding: 18px 20px;
  transition: box-shadow .15s;
}
.brief-card:hover { box-shadow: var(--shadow-md); }
.brief-card.open   { border-top: 3px solid var(--gold); }
.brief-card.filled { border-top: 3px solid var(--green); }
.brief-card.closed { border-top: 3px solid var(--slate-300); opacity: .7; }
.brief-title { font-size: .95rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.brief-meta  { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.brief-desc  { font-size: .82rem; color: var(--slate-500); line-height: 1.5; margin-bottom: 12px; }
.brief-due   { font-size: .75rem; color: var(--slate-400); }
.brief-due strong { color: var(--amber); }

/* Brief status badges */
.badge-brief-open   { background: var(--gold-pale);  color: #7a5e20; border: 1px solid #e5c97e; }
.badge-brief-filled { background: var(--green-pale); color: #166534; border: 1px solid #86efac; }
.badge-brief-closed { background: var(--slate-100);  color: var(--slate-500); border: 1px solid var(--slate-200); }

/* ── Revision history ─────────────────────────────────── */
.revision-log { display: flex; flex-direction: column; gap: 0; }
.revision-item {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--slate-100);
  font-size: .82rem;
}
.revision-item:last-child { border-bottom: none; }
.revision-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
  color: #fff;
}
.rev-submitted   { background: var(--slate-400); }
.rev-resubmitted { background: var(--navy); }
.rev-approved    { background: var(--green); }
.rev-needs_revision { background: var(--amber); }
.rev-rejected    { background: var(--red); }
.rev-published   { background: #7c3aed; }
.revision-body   { flex: 1; }
.revision-action { font-weight: 600; color: var(--slate-700); margin-bottom: 2px; }
.revision-actor  { color: var(--slate-400); }
.revision-time   { font-size: .72rem; color: var(--slate-400); }
.revision-meta   { font-size: .75rem; color: var(--slate-400); }
.revision-feedback { margin-top: 4px; color: var(--slate-600); font-style: italic; }

/* ── Published badge (calendar + cards) ──────────────── */
.badge-published { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; }
.published-check {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .72rem; font-weight: 600; color: #5b21b6;
}

/* ── Approval rate widget ─────────────────────────────── */
.approval-rate-bar {
  height: 6px;
  background: var(--slate-100);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.approval-rate-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width .6s ease;
}

/* ── Week strip (calendar) ────────────────────────────── */
.cal-view-toggle {
  display: flex;
  gap: 4px;
  padding: 0 24px 14px;
}
.view-btn {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 500;
  border: 1px solid var(--slate-200);
  background: #fff;
  color: var(--slate-500);
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: all .15s;
}
.view-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--slate-100);
}
.week-day {
  padding: 10px 8px;
  border-right: 1px solid var(--slate-100);
  min-height: 180px;
}
.week-day:last-child { border-right: none; }
.week-day-header {
  text-align: center;
  margin-bottom: 8px;
}
.week-day-name {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--slate-400);
}
.week-day-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  display: block;
}
.week-day.today .week-day-num {
  background: var(--navy);
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px auto 0;
  font-size: .9rem;
}
.week-post-card {
  padding: 6px 8px;
  border-radius: var(--radius);
  margin-bottom: 5px;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,.06);
  transition: opacity .1s;
}
.week-post-card:hover { opacity: .85; }
.week-post-title { font-size: .72rem; font-weight: 600; color: #fff; line-height: 1.3; }
.week-post-meta  { font-size: .65rem; color: rgba(255,255,255,.8); margin-top: 2px; }

/* ── Search bar ───────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Outfit', sans-serif;
  font-size: .875rem;
  color: var(--slate-700);
  background: transparent;
}
.search-bar input::placeholder { color: var(--slate-400); }
.search-bar svg { color: var(--slate-400); flex-shrink: 0; }

/* ── KPI week-over-week change ────────────────────────── */
.kpi-change {
  font-size: .75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
}
.kpi-change.up, .kpi-change.positive   { color: var(--green); }
.kpi-change.down, .kpi-change.negative { color: var(--red); }
.kpi-change.flat { color: var(--slate-400); }

/* ── Inline date-picker dialog (approve action) */
.inline-approve {
  display: none;
  margin-top: 12px;
  padding: 14px;
  background: var(--green-pale);
  border-radius: var(--radius);
  border: 1px solid #86efac;
}
.inline-approve.open { display: block; }
.inline-revision {
  display: none;
  margin-top: 12px;
  padding: 14px;
  background: var(--amber-pale);
  border-radius: var(--radius);
  border: 1px solid #fcd34d;
}
.inline-revision.open { display: block; }
