/* Olive & Vine Socials — Global Design System */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..700&family=Figtree:wght@400;500;600;700&family=Jost:wght@400;500;600&display=swap');

@font-face {
  font-family: 'NOIR et BLANC';
  src: url('../assets/fonts/noir-et-blanc.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NOIR et BLANC';
  src: url('../assets/fonts/noir-et-blanc-medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NOIR et BLANC';
  src: url('../assets/fonts/noir-et-blanc-medium-bold.otf') format('opentype');
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --sage: #7A8C6E;
  --gold: #C8A84B;
  --cream: #F5F0E8;
  --ink: #1E1E1E;
  --muted: #6B6B6B;
  --border: #E0D8CC;
  --surface: #FFFFFF;
  --danger: #C0392B;
  --success: #2D6A4F;

  --font-display: 'NOIR et BLANC', 'Fraunces', serif;
  --font-body: 'Figtree', sans-serif;
  --font-subhead: 'Jost', 'Helvetica Neue', sans-serif;

  /* Type tokens — mirror DS tokens/typography.css */
  --text-subhead: 500 14px/1.4 var(--font-subhead);
  --text-caption: 500 11px/1.4 var(--font-subhead);
  --tracking-subhead: 0.06em;
  --tracking-caption: 0.08em;

  --sidebar-width: 232px;
  --sidebar-width-collapsed: 64px;
  --radius: 6px;
  --radius-sm: 3px;
  --radius-md: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.5em 0;
  letter-spacing: -0.01em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em 0; }

a {
  color: var(--sage);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ============================================================
   LAYOUT
   ============================================================ */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.2s ease;
  padding: 32px 40px;
  max-width: 1400px;
  min-width: 0; /* prevent flex children from overflowing */
}

.app-shell.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-width-collapsed);
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: #2F3525;
  border-right: none;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  z-index: 100;
  overflow: hidden;
}

.app-shell.sidebar-collapsed .sidebar {
  width: var(--sidebar-width-collapsed);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 22px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  white-space: nowrap;
}

.sidebar-header .brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #FCFAF8;
  letter-spacing: -0.01em;
}

.sidebar-header .brand span {
  color: var(--sage);
}

.sidebar-header .brand-sub {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  margin-top: 4px;
}

.app-shell.sidebar-collapsed .sidebar-header .brand-text {
  display: none;
}

.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(252,250,248,0.4);
  display: flex;
  align-items: center;
  padding: 4px;
}
.sidebar-toggle:hover { color: #FCFAF8; }

.sidebar-nav {
  flex: 1;
  padding: 14px 0;
  overflow-y: auto;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: rgba(252,250,248,0.75);
  font-family: var(--font-subhead);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  margin: 1px 10px;
  transition: background 0.12s, color 0.12s;
}

.sidebar-nav a:hover {
  color: #FCFAF8;
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.sidebar-nav a.active {
  color: #FCFAF8;
  border-left-color: transparent;
  background: rgba(255,255,255,0.12);
}

.sidebar-nav a svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  opacity: 0.75;
}

.sidebar-nav a:hover svg,
.sidebar-nav a.active svg {
  opacity: 1;
}

.app-shell.sidebar-collapsed .sidebar-nav a span {
  display: none;
}

.sidebar-footer {
  padding: 20px 22px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #FCFAF8;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.sidebar-user-info {
  min-width: 0;
}

.sidebar-user-name {
  font-family: var(--font-subhead);
  font-size: 13px;
  font-weight: 600;
  color: #FCFAF8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-family: var(--font-subhead);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--sage);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-signout {
  display: flex;
  align-items: center;
  color: rgba(252,250,248,0.35);
  padding: 4px;
  flex-shrink: 0;
  text-decoration: none;
}
.sidebar-signout:hover { color: rgba(252,250,248,0.8); }
.sidebar-signout svg { width: 16px; height: 16px; }

.app-shell.sidebar-collapsed .sidebar-user-info,
.app-shell.sidebar-collapsed .sidebar-signout { display: none; }
.app-shell.sidebar-collapsed .sidebar-footer { justify-content: center; }

.sidebar-header .brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #FCFAF8;
  letter-spacing: -0.01em;
}

.sidebar-header .brand-sub {
  font-family: var(--font-subhead);
}

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */

.eyebrow {
  font-family: var(--font-subhead);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
  font-weight: 500;
  margin-bottom: 4px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
  min-width: 0;
}

.page-header .subtitle {
  color: var(--muted);
  margin-top: 4px;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  font-family: var(--font-subhead);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  line-height: 1;
}

.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--sage);
  color: var(--surface);
}
.btn-primary:hover { background: #6c7d61; }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--sage); }

.btn-gold {
  background: var(--gold);
  color: var(--surface);
}
.btn-gold:hover { background: #b3933e; }

.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--border);
}
.btn-danger:hover { border-color: var(--danger); }

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--sage); color: var(--sage); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-icon:hover { color: var(--ink); border-color: var(--sage); }

/* ============================================================
   CARDS / SURFACES
   ============================================================ */

.card {
  background: var(--surface);
  border: 1px solid #D8D6CC;
  border-radius: var(--radius-md);
  padding: 24px;
}

.card-title {
  font: var(--text-subhead);
  letter-spacing: var(--tracking-subhead);
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 12px;
}

.quick-link {
  display: block;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.quick-link:last-child { border-bottom: none; }
.quick-link:hover { color: var(--sage); }

.grid {
  display: grid;
  gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1100px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .main-content { padding: 24px 28px; }
}
@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
}

.stat-card .stat-label {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ============================================================
   FORMS
   ============================================================ */

label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.field { margin-bottom: 18px; }

.field-hint {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 4px;
}

/* Service toggles + contract zone (client modal) */
.toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-top: 8px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--sage);
}

.contract-zone {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 4px;
  margin-bottom: 16px;
}

.contract-zone legend {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--sage);
}

textarea { resize: vertical; min-height: 90px; font-family: var(--font-body); }

.radio-group, .checkbox-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-group label, .checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  margin-bottom: 0;
}

.tag-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  background: var(--surface);
}

.tag {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 10px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  padding: 0;
}

.tag-input-wrap input {
  border: none;
  flex: 1;
  min-width: 100px;
  padding: 4px;
}

/* ============================================================
   TABLES
   ============================================================ */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--cream);
}

tbody tr:hover { background: var(--cream); }

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  overflow-x: auto; /* tables scroll horizontally instead of getting cut off */
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  min-width: 560px; /* prevent columns from collapsing below readable width */
}

/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.badge-draft { background: var(--cream); color: var(--muted); }
.badge-review { background: #FBF1DC; color: #93701F; border-color: #EDD9AE; }
.badge-approved { background: #E7F0E9; color: var(--success); border-color: #CFE3D5; }
.badge-published { background: #E7EDE3; color: var(--sage); border-color: #D4DECB; }

.badge-high { background: #FBEAE7; color: var(--danger); border-color: #F3D0CA; }
.badge-med { background: #FBF1DC; color: #93701F; border-color: #EDD9AE; }
.badge-low { background: #E7F0E9; color: var(--success); border-color: #CFE3D5; }

.priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.priority-dot.high { background: var(--danger); }
.priority-dot.med { background: var(--gold); }
.priority-dot.low { background: var(--success); }

/* ============================================================
   TABS
   ============================================================ */

.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-bar button {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-bar button:hover { color: var(--ink); }

.tab-bar button.active {
  color: var(--ink);
  border-bottom-color: var(--sage);
}

.subtab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.subtab-bar button {
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
}

.subtab-bar button.active {
  color: var(--surface);
  background: var(--sage);
  border-color: var(--sage);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   MODALS
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 30, 30, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
}

.modal.modal-lg { max-width: 880px; }
.modal.modal-xl { max-width: 1100px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 { margin: 0; }

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  display: flex;
}
.modal-close:hover { color: var(--ink); }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Narrow: collapse sidebar to icon-only mode automatically */
@media (max-width: 860px) {
  :root {
    --sidebar-width: var(--sidebar-width-collapsed);
  }
  .sidebar {
    width: var(--sidebar-width-collapsed);
  }
  .sidebar-header .brand-text,
  .sidebar-nav a span,
  .sidebar-footer span {
    display: none;
  }
  .main-content {
    padding: 20px 16px;
  }
}

/* Very narrow: give the main area full width with minimal chrome */
@media (max-width: 600px) {
  .main-content {
    margin-left: 0;
    padding: 12px;
  }
  .sidebar {
    display: none;
  }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  width: 100%;
  max-width: 400px;
}

.auth-card .brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 4px;
}

.auth-card .brand span { color: var(--sage); }

.auth-card .tagline {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.auth-error {
  background: #FBEAE7;
  border: 1px solid #F3D0CA;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

.auth-error.visible { display: block; }

.auth-note {
  background: var(--cream);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-top: 16px;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state svg {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--sage);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.ai-panel {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.ai-result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
  white-space: pre-wrap;
  font-size: 0.9rem;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  background: var(--ink);
  color: var(--surface);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: toast-in 0.2s ease;
}

.toast.toast-error { background: var(--danger); }
.toast.toast-success { background: var(--success); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   NOTIFICATION CENTER
   ============================================================ */

/* Bell badge — unread count, visible in collapsed sidebar too */
.notif-badge {
  position: absolute;
  top: 6px;
  left: 28px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-body);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--surface);
  pointer-events: none;
}

/* Slide-out panel — right side */
.notif-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 100vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0,0,0,0.10);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease;
}

.notif-panel.notif-panel-hidden {
  transform: translateX(100%);
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.notif-panel-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.notif-empty {
  padding: 40px 24px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

.notif-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: background 0.1s;
}

.notif-item:hover { background: var(--cream); }

.notif-item-unread { background: #f8f6f1; }
.notif-item-unread:hover { background: #f0ede5; }

.notif-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage);
  margin-top: 2px;
}

.notif-content { flex: 1; min-width: 0; }

.notif-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 2px;
}

.notif-item-unread .notif-title { font-weight: 700; }

.notif-body {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.notif-ts {
  font-size: 0.72rem;
  color: var(--muted);
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
  margin-top: 6px;
}

/* @mention notification gets gold accent */
.notif-item[data-event-type="mention"] .notif-icon {
  background: #FBF1DC;
  border-color: #EDD9AE;
  color: #93701F;
}

/* ============================================================
   RESEARCH HUB
   ============================================================ */

.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 640px) {
  .research-grid { grid-template-columns: 1fr; }
}

.research-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}

.research-card:hover {
  border-color: var(--sage);
  background: var(--cream);
}

.research-card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage);
}

.research-card:hover .research-card-icon {
  background: var(--surface);
}

.research-card-body { flex: 1; min-width: 0; }

.research-card-label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 3px;
}

.research-card-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.research-card-arrow {
  flex-shrink: 0;
  color: var(--muted);
  transition: color 0.15s;
}

.research-card:hover .research-card-arrow { color: var(--sage); }

/* ============================================================
   STAGE PILLS — shared across dashboard and workspace
   ============================================================ */

.stage-pill {
  display: inline-block;
  font-family: var(--font-subhead);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.stage-needs-keyword  { background: #E5C576; color: #2F3525; }
.stage-questionnaire  { background: #D9AF62; color: #2F3525; }
.stage-writing        { background: #F7DDC8; color: #2F3525; }
.stage-needs-photos   { background: #E4A96F; color: #2F3525; }
.stage-waiting-edits  { background: #949780; color: #FCFAF8; }
.stage-final-edits    { background: #6E7260; color: #FCFAF8; }
.stage-ready-publish  { background: #2F3525; color: #FCFAF8; }
