/* Nordic Wellness Dashboard — styles
   Built on the Nordic Wellness brand tokens (forest / gold / sage / birch / ink) */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,500&family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400;1,500&display=swap');

:root {
  --nw-forest:      #243D35;
  --nw-gold:        #C49B2D;
  --nw-sage:        #8A9B7C;
  --nw-birch:       #F5F2EB;
  --nw-ink:         #1C1C1A;

  --nw-forest-mid:  #2E5046;
  --nw-forest-deep: #1B2E28;
  --nw-white:       #FDFAF5;
  --nw-cream-2:     #EFEBE1;
  --nw-line:        #E0DACE;
  --nw-line-dark:   rgba(196,155,45,0.20);
  --nw-gold-soft:   #D9BC6B;
  --nw-gold-deep:   #A37F1F;
  --nw-sage-soft:   #C4CFB9;

  --nw-bg:          var(--nw-birch);
  --nw-surface:     var(--nw-white);
  --nw-fg:          var(--nw-ink);
  --nw-fg-2:        #5A5A56;
  --nw-fg-3:        #8A8A86;
  --nw-danger:      #B04040;
  --nw-success:     #4C6B43;

  --nw-font-sans:   'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nw-font-serif:  'Cormorant Garamond', Georgia, 'Times New Roman', serif;

  --nw-radius-xs: 2px;
  --nw-radius-sm: 3px;
  --nw-radius-md: 6px;
  --nw-radius-lg: 12px;

  --nw-shadow-sm: 0 1px 2px rgba(28,28,26,0.05);
  --nw-shadow-md: 0 6px 20px rgba(28,28,26,0.08);

  --nw-dur: 200ms;
  --nw-ease: cubic-bezier(0.4, 0.0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--nw-font-sans);
  background: var(--nw-bg);
  color: var(--nw-fg);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.6;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
input, select, textarea {
  font-family: inherit;
  font-size: 13px;
  padding: 9px 12px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius-sm);
  background: var(--nw-white);
  color: var(--nw-fg);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--nw-gold);
  box-shadow: 0 0 0 3px rgba(196,155,45,0.15);
}
label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nw-fg-3);
  margin-bottom: 6px;
}

/* ---------- utility / type ---------- */
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nw-gold);
}
.serif-italic {
  font-family: var(--nw-font-serif);
  font-style: italic;
  font-weight: 300;
}
.hidden { display: none !important; }

/* ---------- login screen ---------- */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nw-forest);
  padding: 24px;
}
.login-card {
  background: var(--nw-white);
  border-radius: var(--nw-radius-lg);
  padding: 48px 40px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 18px 48px rgba(0,0,0,0.25);
}
.login-card .eyebrow { display: block; margin-bottom: 14px; }
.login-card h1 {
  font-family: var(--nw-font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 32px;
  color: var(--nw-forest);
  margin-bottom: 8px;
}
.login-card p.tagline {
  font-size: 13px;
  color: var(--nw-fg-3);
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}
.login-card form { display: flex; flex-direction: column; gap: 14px; }
#login-error {
  color: var(--nw-danger);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

/* ---------- app shell ---------- */
#app-shell { display: none; min-height: 100vh; }
.app-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--nw-forest);
  color: var(--nw-white);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
}
.sidebar-brand { margin-bottom: 36px; padding: 0 8px; }
.sidebar-brand .eyebrow { color: var(--nw-gold-soft); display: block; margin-bottom: 4px; }
.sidebar-brand h2 {
  font-family: var(--nw-font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 22px;
  color: var(--nw-white);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--nw-radius-sm);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(253,250,245,0.65);
  transition: background var(--nw-dur) var(--nw-ease), color var(--nw-dur) var(--nw-ease);
  margin-bottom: 4px;
}
.nav-item:hover { background: rgba(253,250,245,0.06); color: var(--nw-white); }
.nav-item.active { background: rgba(196,155,45,0.16); color: var(--nw-gold-soft); }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-footer {
  margin-top: auto;
  padding: 12px 8px 0;
  border-top: 1px solid rgba(253,250,245,0.1);
}
.sidebar-footer button {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(253,250,245,0.45);
  padding: 12px 0 0;
}
.sidebar-footer button:hover { color: var(--nw-white); }

.main-content { padding: 36px 44px; overflow-x: hidden; }
.page-head { margin-bottom: 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 {
  font-family: var(--nw-font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 30px;
  color: var(--nw-forest);
}
.page-head .eyebrow { display: block; margin-bottom: 6px; }

.view { display: none; }
.view.active { display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 11px 20px;
  border-radius: var(--nw-radius-sm);
  transition: all var(--nw-dur) var(--nw-ease);
  white-space: nowrap;
}
.btn-primary { background: var(--nw-forest); color: var(--nw-white); }
.btn-primary:hover { background: var(--nw-forest-mid); }
.btn-gold { background: var(--nw-gold); color: var(--nw-ink); }
.btn-gold:hover { background: var(--nw-gold-soft); }
.btn-outline { background: transparent; color: var(--nw-forest); box-shadow: inset 0 0 0 1px var(--nw-line); }
.btn-outline:hover { box-shadow: inset 0 0 0 1px var(--nw-forest); }
.btn-sm { padding: 7px 13px; font-size: 10px; }
.btn-danger-text { color: var(--nw-danger); background: none; box-shadow: none; padding: 7px 10px; font-size: 10px; }
.btn-danger-text:hover { text-decoration: underline; }

/* ---------- stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 32px; }
.stat-card {
  background: var(--nw-surface);
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius-md);
  padding: 18px 20px;
}
.stat-card .label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nw-fg-3); margin-bottom: 8px; }
.stat-card .value { font-family: var(--nw-font-serif); font-style: italic; font-weight: 400; font-size: 30px; color: var(--nw-forest); }

/* ---------- cards / surfaces ---------- */
.surface {
  background: var(--nw-surface);
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius-md);
}
.surface-pad { padding: 22px 24px; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nw-fg-3);
  padding: 12px 16px;
  background: var(--nw-cream-2);
  border-bottom: 1px solid var(--nw-line);
  white-space: nowrap;
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--nw-line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(196,155,45,0.04); }
.cell-muted { color: var(--nw-fg-3); font-size: 12px; }
.cell-links { display: flex; gap: 10px; }
.cell-links a { color: var(--nw-forest); }
.cell-links a:hover { color: var(--nw-gold-deep); }

/* ---------- status badges ---------- */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.badge-new { background: var(--nw-sage-soft); color: #354A2B; }
.badge-contacted { background: #DCE6F1; color: #2A4A6B; }
.badge-quoted { background: #F1E6CF; color: var(--nw-gold-deep); }
.badge-negotiating { background: #F1DCC2; color: #8A4F1E; }
.badge-installed { background: #D9E8D4; color: var(--nw-success); }
.badge-lost { background: #F1D9D9; color: var(--nw-danger); }

/* ---------- toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar-filters input { width: auto; min-width: 200px; }

/* ---------- column header filters ---------- */
.th-filterable { padding: 10px 16px; }
.th-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nw-fg-3);
  margin-bottom: 5px;
}
.th-select {
  width: 100%;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius-sm);
  background: var(--nw-white);
  color: var(--nw-forest);
  cursor: pointer;
  letter-spacing: 0.02em;
}
.th-select:focus {
  outline: none;
  border-color: var(--nw-gold);
  box-shadow: 0 0 0 2px rgba(196,155,45,0.15);
}

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(28,28,26,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 24px;
}
.modal {
  background: var(--nw-surface);
  border-radius: var(--nw-radius-lg);
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  padding: 28px 30px;
}
.modal h3 {
  font-family: var(--nw-font-serif); font-style: italic; font-weight: 300;
  font-size: 22px; color: var(--nw-forest); margin-bottom: 20px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- empty state ---------- */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--nw-fg-3);
}
.empty-state p.serif-italic { font-size: 18px; color: var(--nw-forest); margin-bottom: 6px; }

/* ---------- asset cards ---------- */
.asset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.asset-card {
  background: var(--nw-surface);
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.asset-card-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-bottom: 1px solid var(--nw-line);
  background: var(--nw-cream-2);
  position: relative;
}
.asset-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.asset-card-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  color: var(--nw-sage);
}
.asset-card-body {
  padding: 14px 16px;
  flex: 1;
}
.asset-card-body .eyebrow { display: block; margin-bottom: 6px; }
.asset-card-body h4 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.asset-card-body .cell-muted { font-size: 12px; margin-top: 4px; }
.asset-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--nw-line);
  background: var(--nw-cream-2);
}

@media (max-width: 1100px) {
  .asset-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .asset-grid { grid-template-columns: 1fr; }
}

/* ---------- content cards ---------- */
.content-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.content-card {
  background: var(--nw-surface);
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.content-card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--nw-line);
  background: var(--nw-cream-2);
}
.content-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.content-card-body {
  padding: 14px 16px;
  flex: 1;
}
.content-card-body .eyebrow { display: block; margin-bottom: 6px; }
.content-card-body h4 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.content-card .caption-preview {
  font-size: 12px;
  color: var(--nw-fg-2);
  margin-top: 8px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.content-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--nw-line);
  background: var(--nw-cream-2);
}

/* ---------- image upload area ---------- */
.image-upload-area {
  border: 2px dashed var(--nw-line);
  border-radius: var(--nw-radius-md);
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--nw-dur) var(--nw-ease);
}
.image-upload-area:hover { border-color: var(--nw-gold); }
#content-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 16px;
  color: var(--nw-fg-3);
  font-size: 12px;
  letter-spacing: 0.03em;
}
#content-image-placeholder i { font-size: 30px; }
#content-image-preview-wrap { position: relative; }
#content-image-preview { width: 100%; max-height: 220px; object-fit: cover; display: block; }
#content-image-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(28,28,26,0.72);
  color: #fff;
  border-radius: var(--nw-radius-sm);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
#content-image-remove:hover { background: rgba(28,28,26,0.92); }

@media (max-width: 1100px) {
  .content-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .content-grid { grid-template-columns: 1fr; }
}

/* ---------- leads — contact cell ---------- */
.contact-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

/* ---------- leads — notes cell ---------- */
.cell-notes { max-width: 200px; }
.notes-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  color: var(--nw-fg-2);
  line-height: 1.5;
}

/* ---------- leads — expandable row ---------- */
.btn-expand {
  color: var(--nw-fg-3);
  padding: 5px 6px;
  margin-right: 2px;
  border-radius: var(--nw-radius-sm);
  transition: color var(--nw-dur);
}
.btn-expand:hover { color: var(--nw-forest); }
.lead-expand-row td { padding: 0; }
.lead-expand-content {
  padding: 16px 20px 20px;
  background: var(--nw-cream-2);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  border-bottom: 1px solid var(--nw-line);
}
.expand-field { display: flex; flex-direction: column; gap: 3px; min-width: 140px; }
.expand-field-full { flex: 1 1 100%; }
.expand-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nw-fg-3);
  margin-bottom: 2px;
}
.expand-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1 1 100%; }
.expand-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--nw-forest);
  padding: 5px 12px;
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius-sm);
  background: var(--nw-surface);
  transition: border-color var(--nw-dur);
}
.expand-link:hover { border-color: var(--nw-forest); }

/* ---------- lead details side panel ---------- */
.details-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28,28,26,0.3);
  z-index: 140;
  opacity: 0;
  transition: opacity 280ms var(--nw-ease);
}
.details-backdrop.open { opacity: 1; }

.details-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100vh;
  background: var(--nw-surface);
  border-left: 1px solid var(--nw-line);
  box-shadow: -8px 0 32px rgba(28,28,26,0.12);
  z-index: 150;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 280ms var(--nw-ease);
}
.details-panel.open { transform: translateX(0); }

.details-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--nw-line);
  gap: 12px;
}
.details-panel-header .eyebrow { display: block; margin-bottom: 6px; }
.details-panel-header h3 {
  font-family: var(--nw-font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 22px;
  color: var(--nw-forest);
}
#details-close-btn {
  font-size: 18px;
  color: var(--nw-fg-3);
  padding: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}
#details-close-btn:hover { color: var(--nw-fg); }

.details-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.details-section { margin-bottom: 24px; }
.details-section-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nw-gold);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--nw-line);
  margin-bottom: 14px;
}
.details-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 14px;
}
.details-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nw-fg-3);
}
.details-value {
  font-size: 13px;
  color: var(--nw-fg);
  line-height: 1.6;
  word-break: break-word;
}
.details-value a { color: var(--nw-forest); text-decoration: underline; text-underline-offset: 2px; }
.details-value a:hover { color: var(--nw-gold-deep); }
.details-value.empty { color: var(--nw-fg-3); font-style: italic; }

.details-panel-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--nw-line);
  background: var(--nw-cream-2);
}

@media (max-width: 480px) {
  .details-panel { width: 100vw; }
}

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--nw-forest); color: var(--nw-white);
  padding: 13px 22px; border-radius: var(--nw-radius-sm);
  font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  box-shadow: var(--nw-shadow-md);
  z-index: 200; display: none;
}

/* ---------- content calendar tabs ---------- */
.content-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--nw-line);
  padding-bottom: 0;
}
.content-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 11px 18px;
  color: var(--nw-fg-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--nw-dur) var(--nw-ease), border-color var(--nw-dur) var(--nw-ease);
}
.content-tab:hover { color: var(--nw-fg); }
.content-tab.active { color: var(--nw-forest); border-bottom-color: var(--nw-gold); }
.content-tab-panel { display: none; }
.content-tab-panel.active-panel { display: block; }

/* ---------- monthly plan header ---------- */
.plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.plan-month-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.plan-month-title {
  font-family: var(--nw-font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 22px;
  color: var(--nw-forest);
  min-width: 160px;
  text-align: center;
}
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--nw-radius-sm);
  color: var(--nw-fg-3);
  transition: background var(--nw-dur), color var(--nw-dur);
  font-size: 18px;
}
.btn-icon:hover { background: var(--nw-cream-2); color: var(--nw-forest); }

/* ---------- plan loading ---------- */
.plan-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: var(--nw-cream-2);
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius-md);
  font-size: 13px;
  color: var(--nw-fg-2);
  margin-bottom: 18px;
}
.plan-loading i { font-size: 20px; color: var(--nw-gold); }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin 1s linear infinite; }

/* ---------- social plan grid ---------- */
.social-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* ---------- plan cards ---------- */
.plan-card {
  background: var(--nw-surface);
  border: 1px solid var(--nw-line);
  border-radius: var(--nw-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.plan-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 12px;
  background: var(--nw-forest);
  color: var(--nw-white);
}
.plan-week-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nw-gold-soft);
  display: block;
  margin-bottom: 3px;
}
.plan-date-str {
  font-family: var(--nw-font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 17px;
  color: var(--nw-white);
}
.badge-segment-airbnb   { background: #DCE6F1; color: #2A4A6B; }
.badge-segment-ecostay  { background: #D9E8D4; color: #2D5C27; }
.badge-segment-arch     { background: #F1E6CF; color: var(--nw-gold-deep); }
.badge-segment-general  { background: var(--nw-sage-soft); color: #354A2B; }

.plan-card-section {
  padding: 13px 16px;
  border-bottom: 1px solid var(--nw-line);
}
.plan-card-section:last-of-type { border-bottom: none; }

.plan-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.plan-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nw-gold-deep);
  display: flex;
  align-items: center;
  gap: 5px;
}
.plan-section-label i { font-size: 13px; }

.plan-design-brief {
  font-size: 12px;
  color: var(--nw-fg-2);
  line-height: 1.65;
  background: var(--nw-cream-2);
  border-radius: var(--nw-radius-sm);
  padding: 10px 12px;
  margin-top: 7px;
}

.plan-caption {
  font-size: 13px;
  color: var(--nw-fg);
  line-height: 1.7;
  white-space: pre-wrap;
}
.plan-hashtags {
  font-size: 12px;
  color: var(--nw-forest-mid);
  line-height: 1.7;
  word-break: break-word;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: var(--nw-radius-sm);
  color: var(--nw-forest);
  background: var(--nw-cream-2);
  border: 1px solid var(--nw-line);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--nw-dur), border-color var(--nw-dur);
}
.btn-copy:hover { background: var(--nw-line); border-color: var(--nw-sage); }
.btn-copy.copied { color: var(--nw-success); border-color: var(--nw-success); }

.plan-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--nw-line);
  background: var(--nw-cream-2);
}

@media (max-width: 1100px) {
  .social-plan-grid { grid-template-columns: 1fr; }
}

/* ---------- overview hero ---------- */
.overview-hero {
  margin-bottom: 28px;
}

.overview-headline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 600;
  line-height: 1.18;
  color: var(--nw-fg);
  margin: 6px 0 12px;
  letter-spacing: -0.02em;
}

.overview-sub {
  font-size: 14px;
  color: var(--nw-fg-2);
  line-height: 1.7;
  max-width: 560px;
}

/* ---------- overview bento grid ---------- */
.overview-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 14px;
}

.bento-card {
  border-radius: 14px;
  border: 1px solid var(--nw-line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--nw-surface);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  overflow: hidden;
  position: relative;
  cursor: default;
}

button.bento-card { cursor: pointer; }

button.bento-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(36,61,53,0.12);
  border-color: var(--nw-gold);
}

.bento-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nw-fg-3);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bento-label-cream { color: rgba(245,242,235,0.55); }

.bento-big-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--nw-forest);
  letter-spacing: -0.02em;
}

.bento-number-sub {
  font-size: 12px;
  color: var(--nw-fg-3);
  margin-top: 4px;
  margin-bottom: 16px;
}

.bento-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.bento-pill {
  font-size: 11px;
  background: rgba(36,61,53,0.07);
  color: var(--nw-fg-2);
  border-radius: 20px;
  padding: 3px 10px;
  font-weight: 500;
}

.bento-cta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--nw-gold);
  letter-spacing: 0.04em;
  margin-top: auto;
}

.bento-cta-cream { color: rgba(196,155,45,0.85); }

/* Leads card — warm imagery via layered gradients */
.bento-leads {
  grid-column: 1;
  grid-row: 1;
  background:
    radial-gradient(ellipse at 90% 0%, rgba(196,155,45,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(196,155,45,0.10) 0%, transparent 50%),
    var(--nw-surface);
}

.bento-card-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 1px solid rgba(196,155,45,0.12);
  pointer-events: none;
}

.bento-card-glow::before {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px solid rgba(196,155,45,0.08);
}

/* Brand visual card — tall, dark, atmospheric */
.bento-visual {
  grid-column: 2;
  grid-row: 1 / 3;
  background: linear-gradient(165deg, #1a2d25 0%, #243D35 45%, #1e3530 75%, #162820 100%);
  border-color: transparent;
  min-height: 380px;
  justify-content: flex-end;
}

.bento-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.bento-orb-1 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(196,155,45,0.22) 0%, transparent 68%);
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
}

.bento-orb-2 {
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(245,242,235,0.06) 0%, transparent 70%);
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
}

.bento-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(36,61,53,0.5) 0%, transparent 70%);
  bottom: -60px;
  right: -60px;
}

.bento-visual-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bento-visual-est {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(196,155,45,0.65);
  text-transform: uppercase;
}

.bento-visual-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.55;
  color: rgba(245,242,235,0.9);
  margin: 0;
}

.bento-visual-divider {
  width: 36px;
  height: 1px;
  background: rgba(196,155,45,0.4);
}

.bento-visual-brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(196,155,45,0.7);
}

/* Content calendar card */
.bento-content {
  grid-column: 3;
  grid-row: 1;
}

/* Marketing hub card — dark with warm glow */
.bento-marketing {
  grid-column: 4;
  grid-row: 1;
  background:
    radial-gradient(ellipse at 15% 85%, rgba(196,155,45,0.22) 0%, transparent 55%),
    linear-gradient(150deg, #2d4a3e 0%, #1a2e27 100%);
  border-color: transparent;
  color: var(--nw-cream);
}

.bento-marketing-glow {
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,155,45,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.bento-marketing-copy {
  font-size: 13px;
  color: rgba(245,242,235,0.65);
  line-height: 1.6;
  margin: 0 0 auto;
}

/* Focus card */
.bento-focus {
  grid-column: 1;
  grid-row: 2;
}

.bento-focus-text {
  font-size: 13px;
  color: var(--nw-fg-2);
  line-height: 1.7;
  margin: 8px 0 0;
}

/* Users card */
.bento-users {
  grid-column: 3 / 5;
  grid-row: 2;
}

.bento-users-copy {
  font-size: 13px;
  color: var(--nw-fg-2);
  line-height: 1.6;
  margin: 0 0 auto;
}

/* ---------- role-based visibility ---------- */
body:not(.role-admin) .requires-admin { display: none !important; }
body.role-viewer .requires-editor { display: none !important; }

/* ---------- role badges ---------- */
.badge-role-admin   { background: #2a4a3e; color: #C49B2D; }
.badge-role-editor  { background: #3a4a2e; color: #b8d87a; }
.badge-role-viewer  { background: #3a3a4a; color: #9ab0d8; }

/* ---------- sidebar user info ---------- */
.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--nw-fg-2);
  border-top: 1px solid var(--nw-line);
  margin-bottom: 6px;
}

/* ---------- field hint ---------- */
.field-hint { font-size: 12px; font-weight: 400; color: var(--nw-fg-3); margin-left: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .app-grid { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; padding: 14px 16px; align-items: center; }
  .sidebar-brand { margin-bottom: 0; margin-right: 18px; }
  .sidebar-footer { display: none; }
  .nav-item { margin-bottom: 0; }
  .main-content { padding: 24px 18px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .overview-bento { grid-template-columns: 1fr 1fr; }
  .bento-visual { grid-column: 1 / 3; grid-row: auto; min-height: 240px; justify-content: center; }
  .bento-users { grid-column: 1 / 3; }
}
