/* ============================================
   MomentBerry Řídící Panel — Styles
   ============================================ */

:root {
  --charcoal: #2D2D2D;
  --gold: #C9A96E;
  --gold-light: #D4BC8E;
  --beige: #F5EDE5;
  --cream: #FBF8F4;
  --rose: #D4908A;
  --deep-dark: #0F0F14;
  --sidebar-bg: #1A1A22;
  --sidebar-hover: #252530;
  --sidebar-active: #2A2A38;
  --content-bg: #F3F4F8;
  --card-bg: #FFFFFF;
  --text-primary: #2D2D2D;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --success: #22C55E;
  --warning: #F59E0B;
  --info: #3B82F6;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --transition: 150ms ease;

  /* Content pillar colors */
  --pillar-love: #E8B4BC;
  --pillar-parenting: #A8C5E2;
  --pillar-growth: #C9B8DB;
  --pillar-wellness: #B5D4C8;
  --pillar-home: #E2C9A8;

  /* Topic status colors */
  --status-draft: #B0B0B0;
  --status-ready: #D4A017;
  --status-published: #4A7C59;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background: var(--content-bg);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 14px;
  overflow: hidden;
  height: 100vh;
}

/* ---- Layout ---- */
.app {
  display: flex;
  height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--sidebar-bg);
  color: #E5E7EB;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo {
  height: 28px;
  opacity: 0.95;
}

.sidebar-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-top: 10px;
  font-weight: 600;
}

.sidebar-nav {
  padding: 12px 10px;
  flex: 1;
}

.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.3);
  padding: 16px 12px 6px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 13.5px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  user-select: none;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: rgba(255,255,255,0.9);
}

.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
}

.nav-item.active .nav-icon {
  color: var(--gold);
}

.nav-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}


.nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 500;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11px;
  color: rgba(255,255,255,0.25);
}

/* ---- Main Content ---- */
.main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.topbar-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.content {
  padding: 28px 32px;
  flex: 1;
}

/* ---- Page sections ---- */
.page { display: none; }
.page.active { display: block; }

/* ---- Metric Cards ---- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.metric-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 4px;
}

.metric-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.metric-icon-wrap.highlight {
  background: rgba(201, 169, 110, 0.2);
  color: var(--gold-light);
}

.metric-icon-wrap.published {
  background: #DBEAFE;
  color: #2563EB;
}

.metric-icon-wrap.in-progress {
  background: #FEF3C7;
  color: #D97706;
}

.metric-icon-wrap.review {
  background: #FEE2E2;
  color: #DC2626;
}

.metric-icon-wrap.completed {
  background: #D1FAE5;
  color: #059669;
}

.metric-icon-wrap.collections {
  background: #F3E8FF;
  color: #7C3AED;
}

.metric-card .metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.metric-card .metric-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.metric-card .metric-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.metric-card.highlight {
  background: linear-gradient(135deg, var(--charcoal), #3a3a3a);
  color: white;
}

.metric-card.highlight .metric-value { color: var(--gold); }
.metric-card.highlight .metric-label { color: rgba(255,255,255,0.6); }
.metric-card.highlight .metric-sub { color: rgba(255,255,255,0.5); }

/* ---- Cards / Panels ---- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2 {
  font-size: 15px;
  font-weight: 600;
}

.card-body {
  padding: 20px;
}

/* ---- Two-column layout ---- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

/* ---- Status Badges ---- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
}

.status-planned {
  background: #F3F4F6;
  color: #6B7280;
}

.status-in-progress {
  background: #FEF3C7;
  color: #92400E;
}

.status-review {
  background: #FEE2E2;
  color: #991B1B;
}

.status-completed {
  background: #D1FAE5;
  color: #065F46;
}

.status-published {
  background: #DBEAFE;
  color: #1E40AF;
}

.status-active {
  background: #D1FAE5;
  color: #065F46;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---- Tables ---- */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover {
  background: #F9FAFB;
}

tbody tr.clickable {
  cursor: pointer;
}

/* ---- Activity Feed ---- */
.activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-dot.system { background: var(--info); }
.activity-dot.product { background: var(--gold); }
.activity-dot.brand { background: var(--rose); }

.activity-text {
  font-size: 13px;
  color: var(--text-primary);
}

.activity-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- Section Cards ---- */
.section-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  margin-bottom: 10px;
  overflow: hidden;
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 14px;
  transition: background var(--transition);
}

.section-card-header:hover {
  background: var(--content-bg);
}

.section-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-emoji {
  font-size: 28px;
  line-height: 1;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.section-tagline {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  margin: 2px 0 0;
}

.section-card-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.section-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.section-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.section-status-summary {
  font-size: 11px;
  color: var(--text-muted);
}

.section-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.section-chevron {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.section-chevron.rotated {
  transform: rotate(180deg);
}

.section-card-body {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border-light);
}

.section-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 14px 0;
}

.section-products-table {
  width: 100%;
}

.section-products-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.section-products-table td {
  font-size: 13px;
}

.section-actions {
  padding-top: 12px;
  text-align: right;
}

.section-show-all {
  font-size: 12px;
  color: var(--gold);
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
}

.section-show-all:hover {
  text-decoration: underline;
}

/* ---- Product Detail ---- */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 20px;
  text-decoration: none;
  transition: color var(--transition);
}

.detail-back:hover { color: var(--text-primary); }

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.detail-header h1 {
  font-size: 24px;
  font-weight: 700;
}

.detail-header .subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.trust-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--beige);
  color: var(--charcoal);
  font-weight: 500;
}

.detail-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.detail-tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.detail-tab:hover { color: var(--text-primary); }

.detail-tab.active {
  color: var(--charcoal);
  border-bottom-color: var(--gold);
}

.detail-tab-content { display: none; }
.detail-tab-content.active { display: block; }

/* ---- Info Grid ---- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.info-item label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 4px;
}

.info-item .value {
  font-size: 14px;
  font-weight: 500;
}

/* ---- Etsy Section ---- */
.etsy-field {
  margin-bottom: 20px;
}

.etsy-field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
}

.etsy-field .etsy-value {
  font-size: 13.5px;
  background: #F9FAFB;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  line-height: 1.6;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  background: #EEF2FF;
  color: #4338CA;
}

/* ---- Listing Images Checklist ---- */
.image-checklist {
  list-style: none;
}

.image-checklist li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.image-checklist li:last-child { border-bottom: none; }

.check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.check-icon.done {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

/* ---- Etsy Enhanced ---- */
.etsy-char-count {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
}

.etsy-title-value {
  font-weight: 600;
  font-size: 14px !important;
}

.etsy-field-row {
  display: flex;
  gap: 16px;
  margin-bottom: 0;
}

.etsy-description-value pre {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  max-height: 400px;
  overflow-y: auto;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 5px 12px;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-copy:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-copy.copied {
  border-color: var(--success);
  color: var(--success);
}

.etsy-attributes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.etsy-attr {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: #F9FAFB;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.etsy-attr-key {
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: capitalize;
}

.etsy-attr-val {
  font-weight: 500;
}

/* ---- File Download List ---- */
.file-download-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-download-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #F9FAFB;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}

.file-download-item:hover {
  border-color: var(--gold);
  background: #FFFDF8;
}

.file-download-item > i:first-child {
  font-size: 24px;
  color: #DC2626;
}

.file-download-item .file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.file-download-item .file-name {
  font-size: 13px;
  font-weight: 600;
}

.file-download-item .file-label {
  font-size: 11px;
  color: var(--text-secondary);
}

.file-download-item > i:last-child {
  color: var(--gold);
  font-size: 16px;
}

/* ---- Listing Images Grid ---- */
.listing-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.listing-image-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  transition: all 0.15s;
}

.listing-image-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}

.listing-image-card.done {
  border-color: var(--success);
}

.listing-image-preview {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #F3F4F6;
  overflow: hidden;
}

.listing-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
  font-size: 40px;
}

.listing-image-slot {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  background: rgba(0,0,0,0.6);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.listing-image-card.done .listing-image-slot {
  background: var(--success);
}

.listing-image-info {
  padding: 12px;
}

.listing-image-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.listing-image-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.listing-image-download {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.listing-image-download:hover {
  text-decoration: underline;
}

.listing-image-status {
  font-size: 11px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---- Brand Page ---- */
.brand-section {
  margin-bottom: 24px;
}

.brand-section h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}

.color-swatches {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.color-swatch {
  text-align: center;
}

.color-swatch .swatch {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 6px;
}

.color-swatch .swatch-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}

.color-swatch .swatch-hex {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.logo-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.logo-preview.dark {
  background: var(--deep-dark);
}

.logo-preview img {
  max-width: 180px;
  max-height: 60px;
}

.logo-preview-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

.brand-values-list {
  list-style: none;
}

.brand-values-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13.5px;
}

.brand-values-list li:last-child { border-bottom: none; }

.brand-values-list strong {
  color: var(--charcoal);
}

.tone-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13.5px;
}

.tone-do { color: #059669; }
.tone-dont { color: #DC2626; }

/* ---- Project Page ---- */
.skill-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.skill-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.skill-trigger {
  font-size: 11px;
  color: var(--gold);
  font-weight: 500;
  margin-top: 8px;
  font-family: monospace;
}

.tree {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.tree .folder { color: var(--gold); font-weight: 600; }
.tree .file { color: var(--text-primary); }
.tree .desc { color: var(--text-muted); font-style: italic; font-family: -apple-system, sans-serif; }

/* Roadmap */
.roadmap-phase {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.roadmap-phase:last-child { border-bottom: none; }

.roadmap-phase h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.roadmap-task {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}

.roadmap-check {
  font-size: 14px;
}

/* ---- Etsy Dashboard Section ---- */
.etsy-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.etsy-placeholder .icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.etsy-placeholder p {
  font-size: 13px;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---- Filters ---- */
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: var(--gold);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--charcoal);
  color: white;
  border-color: var(--charcoal);
}

.filter-separator {
  width: 1px;
  height: 20px;
  background: var(--border);
  align-self: center;
  margin: 0 8px;
}

.filter-select {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
  font-family: inherit;
}

.filter-select:hover,
.filter-select:focus {
  border-color: var(--gold);
  color: var(--text-primary);
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.empty-state p {
  font-size: 13px;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
}

@media (max-width: 800px) {
  .section-card-header { flex-direction: column; align-items: flex-start; }
  .section-card-right { width: 100%; justify-content: space-between; }
}

/* ---- Section Badge (product detail) ---- */
.section-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---- Metric: Segments ---- */
.metric-icon-wrap.segments {
  background: #FEE2E2;
  color: #B91C1C;
}

/* ---- Utility ---- */
.mb-0 { margin-bottom: 0; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.font-mono { font-family: 'SF Mono', 'Fira Code', monospace; }

/* ============================================
   CONTENT SECTION
   ============================================ */

.metric-icon-wrap.content-icon {
  background: rgba(168, 197, 226, 0.3);
  color: #234D77;
}

.topic-filters {
  display: flex;
  gap: 1.5rem;
  padding: 14px 18px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--cream);
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.topic-filters:empty { display: none; }

.pillar-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.pillar-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.pillar-chip:hover { border-color: var(--gold); }
.pillar-chip.active {
  background: var(--charcoal);
  color: #fff;
  border-color: var(--charcoal);
}

.status-tabs { display: flex; gap: 2px; }
.status-tab {
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  user-select: none;
}
.status-tab.active {
  border-bottom-color: var(--gold);
  font-weight: 600;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.topic-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.topic-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--beige);
  display: block;
}

.topic-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.topic-card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.35;
}
.topic-card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 10px;
  line-height: 1.45;
  flex: 1;
}

.topic-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  align-items: center;
}

.pillar-badge,
.status-badge {
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.pillar-badge[data-pillar="love-partnership"] { background: var(--pillar-love); color: #6B2F3A; }
.pillar-badge[data-pillar="parenting-family"] { background: var(--pillar-parenting); color: #234D77; }
.pillar-badge[data-pillar="personal-growth"] { background: var(--pillar-growth); color: #4A3566; }
.pillar-badge[data-pillar="wellness-selfcare"],
.pillar-badge[data-pillar="wellness-self-care"] { background: var(--pillar-wellness); color: #2E5C49; }
.pillar-badge[data-pillar="home-everyday"] { background: var(--pillar-home); color: #6B4A1E; }

.status-badge[data-status="draft"] { background: var(--status-draft); color: #fff; }
.status-badge[data-status="ready"] { background: var(--status-ready); color: #fff; }
.status-badge[data-status="published"] { background: var(--status-published); color: #fff; }

.topic-card-counts {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.topic-card-counts .count-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.topic-card-counts .count-item.zero { opacity: 0.35; }

/* Detail view */
.topic-detail-header {
  position: sticky;
  top: 0;
  background: var(--content-bg);
  z-index: 5;
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.topic-detail-breadcrumb {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.topic-detail-breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.topic-detail-breadcrumb a:hover { text-decoration: underline; }

.topic-detail-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}
.topic-detail-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 10px;
}

/* Tab bar */
.topic-tabs {
  display: flex;
  gap: 2px;
  padding: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 92px; /* below the detail header */
  background: var(--content-bg);
  z-index: 4;
}
.tab-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--charcoal); }
.tab-btn.active {
  color: var(--charcoal);
  border-bottom-color: var(--gold);
  font-weight: 600;
}
.tab-btn .tab-count {
  background: var(--beige);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.tab-btn.active .tab-count {
  background: var(--gold);
  color: #fff;
}

.tab-panel {
  display: none;
  padding: 18px 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.tab-panel.active { display: block; }
.tab-panel h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 14px 0 8px;
}
.tab-panel h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 12px 0 6px;
  color: var(--text-secondary);
}

/* Key parameters card on Overview */
.topic-keys {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 18px;
  padding: 14px 18px;
  background: var(--cream);
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 20px;
}
.topic-keys dt {
  color: var(--text-secondary);
  font-weight: 500;
}
.topic-keys dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Approvals gate indicator (inline icons) */
.gate-indicator {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
}
.gate-indicator .gate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
}
.gate-indicator .gate.approved { color: var(--status-published); font-weight: 500; }
.gate-indicator .gate.rejected { color: #B02A37; font-weight: 500; }
.gate-indicator .gate.pending { opacity: 0.7; }

/* Per-format production plan collapsible */
.format-plan {
  margin-top: 14px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
.format-plan-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 4px 0;
  user-select: none;
}
.format-plan-toggle:hover { color: var(--charcoal); }
.format-plan-body {
  display: none;
  margin-top: 8px;
  padding: 10px 14px;
  background: var(--cream);
  border-radius: 8px;
}
.format-plan-body.open { display: block; }

.blog-rendered {
  max-width: 720px;
  line-height: 1.7;
  font-size: 14px;
}
.blog-rendered h1 { font-size: 20px; margin-top: 1.4em; }
.blog-rendered h2 { font-size: 17px; margin-top: 1.4em; }
.blog-rendered h3 { font-size: 15px; margin-top: 1.2em; }
.blog-rendered p { margin: 0.7em 0; }
.blog-rendered ul, .blog-rendered ol { padding-left: 1.5em; margin: 0.6em 0; }
.blog-rendered li { margin: 0.25em 0; }
.blog-rendered code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  background: var(--beige);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 12.5px;
}

.blog-meta {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 10px 0 12px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 16px;
}

/* Blog hero image */
.blog-hero {
  margin: -18px -20px 24px;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.blog-hero img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
}
.blog-hero figcaption {
  padding: 10px 20px;
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--cream);
  font-style: italic;
}

/* Blog reading time */
.blog-reading-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 8px;
}

/* Callout blocks inside rendered blog */
.blog-rendered .blog-callout {
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: 10px;
  border-left: 4px solid var(--gold);
  background: var(--cream);
  font-size: 14.5px;
  line-height: 1.6;
}
.blog-rendered .blog-callout strong {
  color: var(--charcoal);
}
.blog-rendered .callout-insight {
  border-left-color: var(--pillar-parenting);
  background: #EDF3FA;
}
.blog-rendered .callout-tip {
  border-left-color: var(--status-published);
  background: #E8F1EB;
}
.blog-rendered .callout-warn {
  border-left-color: var(--status-ready);
  background: #FDF5E0;
}

/* Timeline block */
.blog-rendered .blog-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0 26px;
}
.blog-rendered .blog-timeline .stage {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.blog-rendered .blog-timeline .stage::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--pillar-parenting);
  border-radius: 10px 10px 0 0;
}
.blog-rendered .blog-timeline .stage-age {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #234D77;
}
.blog-rendered .blog-timeline .stage-headline {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.3;
}
.blog-rendered .blog-timeline .stage-detail {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .blog-rendered .blog-timeline {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Inline figures with captions in blog body */
.blog-rendered figure {
  margin: 22px 0;
}
.blog-rendered figure img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}
.blog-rendered figure figcaption {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 8px;
}

/* Wide figure — used for infographics spanning full content width */
.blog-rendered .blog-figure-wide {
  margin: 26px -20px;
  background: var(--cream);
  padding: 14px 20px 18px;
  border-radius: 0;
}
.blog-rendered .blog-figure-wide img {
  border-radius: 8px;
}

/* Three-column tip grid (replaces a prose "ways to support" section) */
.blog-rendered .blog-tip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0 26px;
}
.blog-rendered .tip-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.blog-rendered .tip-item i {
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
}
.blog-rendered .tip-item h4 {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0;
  color: var(--charcoal);
}
.blog-rendered .tip-item p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

@media (max-width: 760px) {
  .blog-rendered .blog-tip-grid {
    grid-template-columns: 1fr;
  }
}

.carousel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}
.carousel-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity var(--transition);
  background: var(--beige);
}
.carousel-thumb:hover { opacity: 0.85; }

.social-caption {
  max-width: 640px;
  background: var(--cream);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  white-space: pre-wrap;
  margin: 10px 0;
  line-height: 1.55;
}
.social-hashtags {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: 'SF Mono', 'Fira Code', monospace;
  max-width: 640px;
  white-space: pre-wrap;
}

.topic-video {
  max-width: 540px;
  width: 100%;
  border-radius: 10px;
  background: #000;
  display: block;
}

.production-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 0;
  user-select: none;
}
.production-toggle:hover { color: var(--charcoal); }

.production-body {
  display: none;
  margin-top: 10px;
}
.production-body.open { display: block; }

.approvals-table {
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}
.approvals-table th, .approvals-table td {
  padding: 6px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.approvals-table th {
  background: var(--beige);
  font-weight: 600;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 4px 40px rgba(0,0,0,0.5);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.28);
}
.lightbox-close { top: 18px; right: 18px; }
.lightbox-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ============================================
   Product Concept — block & filters
   ============================================ */

.metric-icon-wrap.concepts {
  background: rgba(201, 169, 110, 0.15);
  color: var(--gold);
}

/* Concept card */
.concept-card {
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
}

.concept-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.concept-card .card-header h2 {
  display: flex;
  align-items: center;
  font-size: 16px;
}

.concept-body-empty {
  padding: 18px 20px;
  background: var(--cream);
}

/* Tagline */
.concept-tagline {
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--gold);
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 14px;
}

/* Section rows */
.concept-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.concept-section {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-primary);
  margin: 0;
}

.concept-section-label {
  font-weight: 700;
  color: var(--charcoal);
  margin-right: 4px;
}

/* Footer: pillar badge + updated */
.concept-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.concept-pillar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--beige);
  color: var(--charcoal);
  border: 1px solid rgba(201, 169, 110, 0.3);
}

.concept-updated {
  font-size: 12px;
}

/* Status pill */
.concept-status-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: lowercase;
  letter-spacing: 0.3px;
}

.concept-status-none {
  background: rgba(156, 163, 175, 0.18);
  color: var(--text-secondary);
  border: 1px solid rgba(156, 163, 175, 0.4);
}

.concept-status-draft {
  background: rgba(245, 158, 11, 0.15);
  color: #B45309;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.concept-status-approved {
  background: rgba(34, 197, 94, 0.15);
  color: #15803D;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

/* Concept status dot — left of product name in list */
.concept-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--card-bg);
}

.concept-dot-none {
  background: #9CA3AF;
}

.concept-dot-draft {
  background: #F59E0B;
}

/* Concept filter chips */
.concept-filter-group {
  display: inline-flex;
  gap: 4px;
}

.filter-btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

/* ---- Plán swim lanes ---- */
.plan-swim {
  display: grid;
  grid-template-columns: 90px repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-top: 16px;
  overflow-x: auto;
}
.plan-day-hdr {
  background: var(--card-bg);
  padding: 8px 4px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
}
.plan-day-hdr .date { color: var(--text-muted); font-weight: 400; font-size: 12px; }
.plan-day-hdr.today { background: #FFF8E6; border: 1px solid var(--gold); }
.plan-ch-label {
  background: var(--card-bg);
  padding: 8px;
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 6px;
}
.plan-lane-cell {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 4px;
  min-height: 44px;
  min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.plan-chip {
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.25;
  border-left: 3px solid;
  background: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  min-width: 0;
  display: block;
}
.plan-chip:hover { filter: brightness(0.96); }
.plan-chip-num {
  display: inline-block;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 6px;
  letter-spacing: 0.02em;
}
.plan-chip-title { font-weight: 500; }

.plan-chip.is-published {
  background: #E8F5EC !important;
  border-left-color: #2E7D32 !important;
}
.plan-chip.is-published .plan-chip-title { color: #2E7D32; }
.plan-chip-check {
  display: inline-block;
  width: 14px; height: 14px;
  line-height: 14px;
  text-align: center;
  border-radius: 50%;
  background: #2E7D32;
  color: white;
  font-size: 10px;
  font-weight: 700;
  margin-right: 6px;
  vertical-align: middle;
}

/* ---- Plán swim-lane toolbar (day navigation) ---- */
.plan-swim-toolbar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 4px 0;
  margin-top: 4px;
}
.plan-nav-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1;
}
.plan-nav-btn:hover { background: var(--cream); }
.plan-swim-range {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.plan-nav-today {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}
.plan-nav-today:hover { background: var(--cream); }
.plan-nav-today.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: white;
}

.today-row-num {
  display: inline-block;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 8px;
  letter-spacing: 0.02em;
}

.detail-num {
  display: inline-block;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 12px;
  letter-spacing: 0.02em;
  vertical-align: baseline;
}

.detail-published-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #E8F5EC;
  border: 1.5px solid #2E7D32;
  color: #1B5E20;
  border-radius: 999px;
  padding: 6px 14px 6px 8px;
  font-size: 13px;
  font-weight: 600;
  margin: 4px 0 12px;
}
.detail-published-mark .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #2E7D32;
  color: white;
  font-size: 13px;
  font-weight: 700;
}
.detail-page.is-published .detail-header { border-left: 4px solid #2E7D32; padding-left: 12px; }

/* ---- Plán today widget ---- */
.plan-today-card {
  background: linear-gradient(135deg, #FFF8E6 0%, var(--cream) 100%);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.plan-today-card .today-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.plan-today-card .today-head h3 { margin: 0; font-size: 15px; }
.today-count-pill { background: var(--gold); color: white; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; }
.today-rows { display: flex; flex-direction: column; gap: 6px; }
.today-row {
  display: block;
  background: white;
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid;
  text-decoration: none;
  color: inherit;
}
.today-row:hover { filter: brightness(0.97); }
.today-row-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.today-row-title { font-weight: 600; font-size: 13px; line-height: 1.3; }
.today-row-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.today-empty { color: var(--text-muted); font-size: 13px; margin: 0; }
.today-published-note { color: var(--text-muted); font-size: 11px; margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--border-light); }

/* ---- Plán overdue cards ---- */
.plan-overdue-card {
  background: linear-gradient(135deg, #FFF0F0 0%, #FFE8E8 100%);
  border: 1.5px solid #D4908A;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.plan-overdue-card .today-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.plan-overdue-card .today-head h3 { margin: 0; font-size: 15px; color: #B94040; }
.overdue-count-pill { background: #C0392B; color: white; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; }

/* ---- Plán strip ---- */
.plan-strip { margin-bottom: 16px; }
.strip-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; font-weight: 600; letter-spacing: 0.08em; margin-bottom: 6px; }
.strip-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.strip-day { background: var(--card-bg); border-radius: 6px; padding: 6px 3px; text-align: center; font-size: 11px; }
.strip-day.warn { background: #FDECE9; }
.strip-day .d-name { color: var(--text-muted); font-size: 11px; font-weight: 600; }
.strip-day .d-num { font-weight: 700; font-size: 13px; margin: 2px 0; }
.strip-day .d-count { font-size: 10px; padding: 1px 6px; border-radius: 8px; background: var(--gold); color: white; font-weight: 600; display: inline-block; }
.strip-day .d-count.empty { background: var(--border); color: var(--text-muted); }
.strip-day.warn .d-count { background: #D4908A; color: white; }

/* ---- Plán violation banner ---- */
.plan-banner {
  background: #FDECE9;
  border-left: 4px solid #D4908A;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 13px;
}
.plan-banner-head { font-weight: 600; margin-bottom: 6px; }
.plan-banner-list { margin: 0; padding-left: 18px; color: var(--text-secondary); }
.plan-banner-list li { padding: 2px 0; }

/* ---- Sidebar alert badge (red dot on Plán nav item) ---- */
.nav-badge-alert {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #D4908A;
  margin-left: auto;
  vertical-align: middle;
}

/* ---- Content buffer landing card ---- */
#metric-content-buffer-card.buffer-ok .metric-icon-wrap { background: linear-gradient(135deg, #FFF8E6, #F9F3E6); color: var(--gold); }
#metric-content-buffer-card.buffer-warn { border-color: #FFE9A8; }
#metric-content-buffer-card.buffer-warn .metric-icon-wrap { background: #FFF3CD; color: #856404; }
#metric-content-buffer-card.buffer-alert { border-color: #F5C2BA; }
#metric-content-buffer-card.buffer-alert .metric-icon-wrap { background: #FDECE9; color: #9C4A48; }

/* ---- Post detail page ---- */
.detail-page { padding: 8px 0; }
.detail-back { margin-bottom: 8px; }
.detail-back a { color: var(--gold); font-weight: 600; font-size: 13px; text-decoration: none; }
.detail-header {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.detail-header h1 { margin: 0 0 10px 0; font-size: 22px; font-weight: 700; line-height: 1.3; }
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.detail-badge { padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.detail-badge.channel { background: #FDECE9; color: #9C4A48; }
.detail-badge.kind { background: var(--cream); color: #8A7547; border: 1px solid #E5D5B8; }
.detail-badge.pillar { background: #EEF3F9; color: #2D5D8A; }
.detail-badge.status-planned { background: var(--border); color: var(--text-secondary); }
.detail-badge.status-draft { background: #FFF3CD; color: #856404; }
.detail-badge.status-ready { background: #D4EDDA; color: #155724; }
.detail-badge.status-published { background: #4A7C59; color: white; }
.detail-time { font-size: 13px; color: var(--text-muted); }

.detail-body { display: grid; grid-template-columns: 1fr 360px; gap: 14px; }
.detail-main, .detail-side { display: flex; flex-direction: column; gap: 10px; }

.detail-gallery { background: var(--card-bg); border-radius: var(--radius); padding: 16px; }
.detail-gallery h4 { margin: 0 0 10px 0; font-size: 14px; }

.gallery-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.save-all-btn { background: transparent; border: none; color: var(--gold); font-weight: 600; font-size: 12px; cursor: pointer; }

.slide-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.slide-thumb {
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, #A8C5E2, #E8B4BC);
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.slide-thumb .slide-num {
  position: absolute; top: 6px; left: 6px;
  background: rgba(0,0,0,0.55); color: white;
  padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 700;
}
.slide-save {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(255,255,255,0.95);
  color: var(--charcoal);
  padding: 3px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 700;
  text-decoration: none;
}

.detail-gallery.single .single-image {
  aspect-ratio: 4/5;
  background-color: var(--cream);
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.detail-gallery.single .single-image.story {
  aspect-ratio: 9/16;
}

/* --- Story video section --- */
.story-video-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.story-video {
  width: 100%;
  max-width: 320px;
  border-radius: 10px;
  background: var(--umber-deep, #1F140D);
  box-shadow: var(--shadow-sm);
}
.story-video-download {
  font-size: 13px;
  text-decoration: none;
}

/* --- Story publishing card (side panel) --- */
.story-publishing-card h5 { margin-bottom: 14px; }
.story-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border, #E8E0D4);
}
.story-meta-row:last-of-type { border-bottom: none; }
.meta-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #8A7A6A);
  min-width: 90px;
}
.meta-value { font-size: 13px; color: var(--text, #2C1A0E); }
.meta-value a { color: var(--accent, #C9703A); text-decoration: none; }
.meta-value a:hover { text-decoration: underline; }
.story-highlight-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--accent-light, #F5E6DA);
  color: var(--accent, #C9703A);
}
.story-ig-instructions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border, #E8E0D4);
}
.story-ig-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #8A7A6A);
  margin-bottom: 8px;
}
.story-ig-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.story-ig-list li { font-size: 13px; color: var(--text, #2C1A0E); line-height: 1.5; }

/* --- Carousel viewer (big stage + arrows + numbered dots) --- */
.carousel-viewer { display: flex; flex-direction: column; gap: 14px; }
.carousel-stage {
  position: relative;
  aspect-ratio: 4/5;
  background-color: var(--cream);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.carousel-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
  font-weight: 300;
  color: var(--charcoal);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, background 0.15s ease;
  padding: 0;
}
.carousel-nav:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.carousel-nav:active { transform: translateY(-50%) scale(0.98); }
.carousel-nav-prev { left: 12px; }
.carousel-nav-next { right: 12px; }
.carousel-download {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--charcoal);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.carousel-download:hover { background: #fff; }
.carousel-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.carousel-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid #d6d6d6;
  background: var(--card-bg);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
  font-family: inherit;
}
.carousel-dot:hover { border-color: var(--gold); color: var(--charcoal); }
.carousel-dot.active {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.carousel-counter {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 12px;
  margin-left: 6px;
}
.discount-callout {
  background: linear-gradient(135deg, #FFF8E6, #F9F3E6);
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
  text-align: center;
}
.discount-code { font-size: 24px; font-weight: 700; color: var(--charcoal); letter-spacing: 0.05em; }
.discount-meta { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.pin-preview { aspect-ratio: 2/3; background: var(--cream); border-radius: 8px; }

.detail-gallery.pin .pin-link {
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}
.detail-gallery.pin .pin-link:hover { text-decoration: underline; }

/* Pin-resave chip in calendar — dashed left border to signal "secondary action" */
.plan-chip.is-resave {
  border-left-style: dashed;
  border-left-width: 3px;
  font-style: italic;
}
.plan-chip.is-resave .plan-chip-title { opacity: 0.85; }

.detail-gallery.pin-resave .resave-caption {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 12px 0 0 0;
  text-align: center;
  font-style: italic;
}

.pin-resave-instructions h5 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 700;
}
.resave-step {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 12px 0;
}
ol.resave-steps-list {
  margin: 0;
  padding: 0 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.5;
}
ol.resave-steps-list li { color: var(--charcoal); }
ol.resave-steps-list strong { color: var(--gold); }

.pin-parent-card h5 {
  margin: 0 0 10px 0;
  font-size: 13px;
  font-weight: 700;
}
.pin-parent-card .pin-sibling { margin-bottom: 10px; }

/* Pin gallery — single image on left, 2:3 aspect */
.detail-gallery.single .single-image.pin {
  aspect-ratio: 2/3;
  max-width: 480px;
  margin: 0 auto;
}

/* Pin side panel cards */
.pin-side-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: 6px;
}
.pin-side-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--charcoal);
  white-space: pre-wrap;
  word-break: break-word;
}
.pin-side-text.pin-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--gold);
  word-break: break-all;
}

/* Tagged topics card — chips with click-to-copy each */
.pin-tags-card .copy-head { margin-bottom: 6px; }
.pin-tags-card h5 { margin: 0; font-size: 13px; font-weight: 700; }
.pin-tags-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: 6px;
}
.pin-tags-hint {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin: 0 0 10px 0;
  line-height: 1.45;
}
.pin-tags-hint strong { color: var(--gold); }
.pin-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pin-tag-chip {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(143, 161, 181, 0.4);
  background: var(--cream);
  color: var(--charcoal);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
  line-height: 1.3;
}
.pin-tag-chip:hover {
  background: #fff;
  border-color: var(--gold);
  color: var(--gold);
}
.pin-tag-chip.copied {
  background: rgba(76,175,80,0.18);
  border-color: #4caf50;
  color: #2e7d32;
}

.pin-boards-card h5 {
  margin: 0 0 10px 0;
  font-size: 13px;
  font-weight: 700;
}
ul.pin-boards-list {
  list-style: none;
  margin: 0 0 8px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
ul.pin-boards-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  padding: 6px 10px;
  background: var(--cream);
  border-radius: 6px;
}
.pin-board-day {
  font-weight: 700;
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  min-width: 28px;
}
.pin-board-name { color: var(--charcoal); }
.pin-boards-hint {
  font-size: 11px;
  color: var(--text-secondary);
  margin: 8px 0 0 0;
  line-height: 1.4;
}

/* Sibling variants nav */
.pin-siblings-card h5 {
  margin: 0 0 10px 0;
  font-size: 13px;
  font-weight: 700;
}
.pin-sibling-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pin-sibling {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  background: var(--cream);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.pin-sibling:hover { background: #fff; }
.pin-sibling-thumb {
  width: 48px;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 4px;
  background: #ece6dc;
}
.pin-sibling-thumb.empty { background: rgba(0,0,0,0.06); }
.pin-sibling-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pin-sibling-row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; }
.pin-sibling-num { font-weight: 700; color: var(--gold); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pin-sibling-date { color: var(--text-secondary); }
.pin-sibling-status {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  color: var(--text-secondary);
}
.pin-sibling-status.status-ready { background: rgba(201,169,110,0.18); color: var(--gold); }
.pin-sibling-status.status-published { background: rgba(76,175,80,0.18); color: #2e7d32; }
.pin-sibling-title {
  font-size: 12px;
  line-height: 1.35;
  color: var(--charcoal);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.article-excerpt { color: var(--text-secondary); line-height: 1.6; font-size: 13px; }
.article-link { color: var(--gold); font-weight: 600; text-decoration: none; }

.action-bar {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.action-btn {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-align: left;
  background: var(--content-bg);
  color: var(--text-primary);
}
.action-btn.primary { background: var(--gold); color: white; }
.action-btn.ghost { background: transparent; border: 1.5px solid var(--border); }
.action-btn.share { background: var(--charcoal); color: white; }
.action-btn:hover { filter: brightness(0.96); }

.detail-toast {
  position: fixed;
  right: 16px; bottom: 16px;
  max-width: 480px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-md);
  z-index: 100;
}
.detail-toast pre { font-size: 12px; background: var(--cream); padding: 8px; border-radius: 6px; overflow: auto; white-space: pre-wrap; }
.toast-actions { display: flex; gap: 6px; margin-top: 8px; justify-content: flex-end; }

.detail-body .card { background: var(--card-bg); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); margin-bottom: 0; }
.detail-body .copy-card .copy-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.detail-body .copy-card h5 { margin: 0; font-size: 13px; }
.detail-body .copy-btn { background: transparent; border: none; color: var(--gold); font-weight: 600; font-size: 12px; cursor: pointer; }
.detail-body .caption-preview { background: var(--cream); padding: 10px; border-radius: 6px; font-size: 13px; line-height: 1.5; max-height: 180px; overflow: auto; white-space: pre-wrap; }
.detail-body .hashtags-preview { background: #F0F7FF; color: #3B82F6; padding: 8px 10px; border-radius: 6px; font-size: 12px; line-height: 1.6; }
.detail-body .music-card { background: linear-gradient(135deg, #FFF8E6, #F9F3E6); border: 1px solid #E5D5B8; }
.detail-body .music-row { display: flex; align-items: center; gap: 10px; }
.detail-body .music-cover { width: 40px; height: 40px; background: var(--charcoal); border-radius: 6px; color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.detail-body .music-info { flex: 1; min-width: 0; }
.detail-body .music-title { font-weight: 600; font-size: 13px; }
.detail-body .music-artist { font-size: 12px; color: var(--text-secondary); }
.detail-body .music-note { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; font-style: italic; }
.detail-body .music-link { color: #1DB954; font-weight: 600; font-size: 12px; text-decoration: none; }
.detail-body .links-card .link-row { padding: 7px 0; border-bottom: 1px solid var(--border-light); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.detail-body .links-card .link-row:last-child { border-bottom: none; }
.detail-body .links-card .link-row a { color: var(--text-primary); text-decoration: none; font-weight: 500; }

/* ============================================
   MOBILE RESPONSIVE (Tasks 14+15+16)
   ============================================ */

/* ---- Desktop-only default: hide day stack, hide hamburger ---- */
.plan-day-stack { display: none; }
.topbar-hamburger {
  display: none;
  background: transparent; border: none;
  font-size: 22px;
  padding: 4px 12px 4px 0;
  cursor: pointer;
  color: var(--text-primary);
}

/* ---- Day-card markup (used only on mobile) ---- */
.day-card { background: var(--card-bg); border-radius: var(--radius); padding: 12px; }
.day-card.empty { opacity: 0.6; }
.day-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.day-title { font-weight: 700; font-size: 14px; }
.day-count { background: var(--content-bg); padding: 2px 10px; border-radius: 10px; font-size: 11px; color: var(--text-secondary); font-weight: 600; }
.day-card-posts { display: flex; flex-direction: column; gap: 6px; }

/* ---- Reel concept card ---- */
.reel-concept-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  border: 1.5px solid #D4663F;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.reel-hook {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  border-left: 3px solid #D4663F;
  padding-left: 14px;
}
.reel-concept-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.reel-meta-row {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}
.reel-meta-label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 70px;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.06em;
  padding-top: 1px;
}

/* ---- Tablet (700–900px) ---- */
@media (min-width: 701px) and (max-width: 900px) {
  /* Swim lanes: horizontal scroll */
  .plan-swim { overflow-x: auto; }
  .plan-ch-label {
    position: sticky;
    left: 0;
    background: var(--card-bg);
    z-index: 2;
  }

  /* Sidebar: collapse to icons only */
  .sidebar {
    width: 52px;
    overflow: hidden;
  }
  .sidebar-header { padding: 12px 0; justify-content: center; }
  .sidebar-logo { display: none; }
  .sidebar-label { display: none; }
  .nav-item { padding: 10px 0; justify-content: center; }
  .nav-item .nav-icon { margin: 0; font-size: 18px; }
  .nav-item span:not(.nav-icon):not(.nav-badge):not(.nav-badge-alert) { display: none; }
  .nav-section-label { display: none; }
  .nav-badge { display: none; }
  .sidebar-footer { display: none; }

  /* Cards: 2 columns */
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Mobile (<700px) ---- */
@media (max-width: 700px) {
  .app { flex-direction: column; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 200ms ease;
    z-index: 50;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 2px 0 12px rgba(0,0,0,0.2); }
  .topbar-hamburger { display: inline-block; }
  .main { width: 100%; }
  .topbar { padding-left: 12px; padding-right: 12px; }
  .sidebar-overlay { display: none; }
  .sidebar-overlay.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 49; /* sidebar is z-index: 50 */
  }

  /* Plán: hide swim lanes, show day cards */
  .plan-swim { display: none; }
  .plan-day-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

  /* Detail page: single column */
  .detail-body { grid-template-columns: 1fr; }

  /* Slides on mobile: 1 column for bigger save-to-Photos target */
  .slide-grid { grid-template-columns: 1fr; }
  .slide-thumb { aspect-ratio: 4/5; max-height: 70vh; }

  /* Metric grid: 1 col */
  .metrics-grid { grid-template-columns: 1fr; }
}

.plan-banner { position: relative; padding-right: 40px; }
.plan-banner-close {
  position: absolute;
  top: 8px; right: 10px;
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: 4px;
}
.plan-banner-close:hover { background: rgba(0,0,0,0.06); }

.metric-card.clickable { cursor: pointer; transition: transform 120ms ease; }
.metric-card.clickable:hover { transform: translateY(-1px); }

/* ===== Brand Guidelines Page ===== */

/* Font specimens for typography tab */
.font-specimen {
  border-radius: 10px;
  padding: 22px 26px;
  margin-bottom: 10px;
}
.font-specimen.dark { background: #1F140D; }
.font-specimen.light { background: #FBF8F4; border: 1px solid #E8E0D8; }
.font-specimen-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #C7B89C;
  margin-bottom: 10px;
}
.font-specimen-headline {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #F2E8D8;
}
.font-specimen.light .font-specimen-headline { color: #1F140D; }
.font-specimen-headline em { font-style: italic; }
.font-specimen-headline .accent { color: #D4663F; font-style: italic; }
.font-specimen-body {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 13px;
  color: #C7B89C;
  margin-top: 10px;
  line-height: 1.5;
}
.font-specimen.light .font-specimen-body { color: #7A6E68; }
.font-specimen-attribution {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: #C7B89C;
  margin-top: 12px;
  letter-spacing: 0.03em;
}

/* Vizuály reference grid */
.viz-item {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  background: #E8E0D8;
}
.viz-item:hover { transform: scale(1.03); box-shadow: 0 4px 16px rgba(0,0,0,0.18); }
.viz-item img { width: 100%; height: auto; display: block; }
.viz-item-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
  padding: 20px 7px 6px;
  font-size: 9px;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.15s;
}
.viz-item:hover .viz-item-label { opacity: 1; }
/* ---- Mentions card (tagged profiles) ---- */
.detail-body .mentions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--cream);
  padding: 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.detail-body .mention-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.detail-body .mention-row:last-child {
  border-bottom: none;
}
.detail-body .mention-handle {
  font-weight: 600;
  color: var(--charcoal, #2d2a26);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.detail-body .mention-handle:hover {
  text-decoration: underline;
}
.detail-body .mention-ext-icon {
  font-size: 10px;
  opacity: 0.5;
}
.detail-body .mention-reason {
  font-size: 12px;
  color: var(--text-secondary);
}
.detail-body .mention-dm-chip {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  background: #D4663F;
  color: #fff;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  width: fit-content;
}
.detail-body .copy-head-count {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 4px;
}

/* Deploy banner */
.deploy-banner {
  background: #f59e0b;
  color: #1a1a1a;
  text-align: center;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  box-sizing: border-box;
}
.deploy-banner code {
  background: rgba(0,0,0,0.12);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
}
