/* Liberation v5.0: Home dashboard block (stats + quick actions + feed/sidebar) */

/* Pixel-match pass: hero proportions + wider dashboard container to match reference */
.hero-section.liberation-home-v48 {
  padding: 54px 0 44px;
  align-items: center;
}

body.route-mode .hero-section.liberation-home-v48.is-route-visible {
  min-height: 640px;
}

.home-digest-section .container + .container {
  margin-top: 30px;
}

.liberation-home-v48 .hero-bg {
  opacity: .97;
  filter: brightness(1) contrast(1.04) saturate(1.05);
  transform: scale(1.02);
}

.liberation-home-v48 .hero-overlay {
  background:
    linear-gradient(90deg, rgba(5,4,2,.97) 0%, rgba(6,4,2,.88) 28%, rgba(6,4,2,.4) 50%, rgba(6,4,2,.08) 66%, rgba(6,4,2,0) 100%),
    linear-gradient(180deg, rgba(5,4,2,.5) 0%, rgba(5,4,2,.02) 26%, rgba(5,4,2,.05) 74%, rgba(5,4,2,.55) 100%);
}

.hero-section.liberation-home-v48 .container,
#home-digest.home-digest-section .container {
  width: min(1650px, calc(100% - 64px));
}

.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.dash-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255, 207, 82, 0.05));
  box-shadow: 0 14px 40px rgba(0,0,0,0.24);
}

.dash-stat-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 12px;
  background: rgba(243, 199, 91, 0.16);
  font-size: 1rem;
}

.dash-stat strong {
  display: block;
  color: #fff6df;
  font-size: 1.3rem;
  line-height: 1.1;
}

.dash-stat > div > span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 246, 223, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-stat small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 246, 223, 0.5);
  font-size: 0.78rem;
}

.dash-actions-row {
  margin-bottom: 26px;
}

.dash-actions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dash-actions-head h3 {
  margin: 0;
  color: #fff6df;
  font-size: 1.2rem;
}

.dash-actions-link {
  color: var(--gold);
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

.dash-actions-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.dash-action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 16px;
  min-height: 104px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.dash-action-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
}

.dash-action-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(243, 199, 91, 0.17);
  color: #ffe58f;
  font-size: 1.05rem;
}

.dash-action-card strong {
  color: #fff6df;
  font-size: 0.98rem;
  line-height: 1.25;
}

.dash-action-card small {
  color: rgba(255, 246, 223, 0.6);
  font-size: 0.82rem;
  line-height: 1.4;
}

.dash-main-grid {
  align-items: start;
}

.dash-feed-panel {
  border-radius: 34px;
  padding: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255, 207, 82, 0.055));
  box-shadow: var(--shadow);
}

.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dash-panel-head h3 {
  margin: 0;
  color: #fff6df;
  font-size: 1.2rem;
}

.dash-panel-head span {
  color: rgba(255, 246, 223, 0.6);
  font-size: 0.88rem;
  font-weight: 700;
}

.dash-feed-list.db-post-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

.dash-feed-list .db-post-card {
  display: grid;
  grid-template-columns: 190px 1fr 72px auto;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
}

.dash-feed-list .db-post-head {
  align-items: center;
  margin-bottom: 0;
}

.dash-feed-list .db-post-card p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.92rem;
  line-height: 1.4;
}

.dash-feed-list .db-post-media {
  width: 72px;
  height: 56px;
  max-height: none;
  margin: 0;
  object-fit: cover;
  border-radius: 10px;
}

.dash-feed-list .db-post-meta {
  margin-top: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.dash-feed-list .db-post-meta .ghost-inline {
  display: none;
}

.dash-feed-list video.db-post-media {
  pointer-events: none;
}

@media (max-width: 900px) {
  .dash-feed-list .db-post-card {
    grid-template-columns: 1fr;
  }
  .dash-feed-list .db-post-media {
    width: 100%;
    height: 160px;
  }
  .dash-feed-list .db-post-meta {
    flex-direction: row;
    align-items: center;
  }
}

.dash-feed-more {
  display: block;
  margin-top: 18px;
  padding: 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--gold);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.dash-feed-more:hover {
  border-color: var(--gold);
}

.dash-sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
}

.dash-widget {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255, 207, 82, 0.055));
  box-shadow: 0 18px 50px rgba(0,0,0,0.26);
}

.dash-widget h4 {
  margin: 0 0 14px;
  color: #fff6df;
  font-size: 1.02rem;
}

.dash-value-widget .v48-progress-top {
  margin-bottom: 4px;
}

.dash-value-widget p {
  margin: 0;
  color: rgba(255, 246, 223, 0.6);
  font-size: 0.85rem;
}

.dash-trend-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dash-trend-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 246, 223, 0.85);
  font-weight: 700;
  font-size: 0.92rem;
}

.dash-trend-list b {
  color: var(--gold);
  font-weight: 900;
}

.dash-trend-note {
  margin: 12px 0 0;
  color: rgba(255, 246, 223, 0.45);
  font-size: 0.76rem;
}

.dash-avatar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dash-avatar-chip {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: rgba(243, 199, 91, 0.16);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: #ffe58f;
  font-weight: 800;
  font-size: 0.8rem;
}

@media (max-width: 1100px) {
  .dash-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dash-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dash-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .dash-stat {
    padding: 14px 16px;
  }
  .dash-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
