/* Dashboard app shell */
.dashboard-page {
  background:
    radial-gradient(circle at 14% 10%, rgba(245, 166, 35, 0.16), transparent 28rem),
    radial-gradient(circle at 86% 4%, rgba(0, 212, 170, 0.12), transparent 26rem),
    linear-gradient(180deg, #08090c 0%, #0d1018 46%, #090a0d 100%);
}

.dashboard-page .navbar {
  background: rgba(8, 9, 12, 0.84);
}

.dashboard-shell {
  width: min(100%, 1220px);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 28px) 24px 56px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.46fr);
  gap: 18px;
  align-items: stretch;
}

.hero-copy,
.tonight-panel,
.metric-card,
.dashboard-panel,
.action-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
}

.hero-copy {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  padding: 32px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(245, 166, 35, 0.16), rgba(0, 212, 170, 0.07) 46%, rgba(123, 47, 247, 0.13)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: auto -18% -42% 36%;
  height: 300px;
  transform: rotate(-6deg);
  background: linear-gradient(90deg, rgba(245, 166, 35, 0.22), rgba(255, 77, 106, 0.12), transparent);
  filter: blur(18px);
  pointer-events: none;
}

.profile-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-avatar {
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  border-radius: 50%;
  border: 2px solid rgba(245, 166, 35, 0.78);
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--accent-gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 16px currentColor;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0 0 10px;
  font-size: 3.1rem;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 620px;
  margin: 0;
  color: rgba(240, 240, 240, 0.78);
  font-size: 1.02rem;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tonight-panel,
.dashboard-panel {
  border-radius: 12px;
  background: rgba(14, 16, 24, 0.82);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.tonight-panel {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 24px;
}

.panel-topline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-teal);
  box-shadow: 0 0 18px rgba(0, 212, 170, 0.75);
}

.tonight-panel h2 {
  margin: 22px 0 8px;
  font-size: 1.65rem;
}

.tonight-panel p {
  margin: 0 0 18px;
  color: rgba(240, 240, 240, 0.72);
  font-size: 0.95rem;
}

.tonight-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.tonight-step {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tonight-step time {
  color: var(--accent-gold);
  font-size: 0.82rem;
  font-weight: 800;
}

.tonight-step strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.95rem;
}

.tonight-step small {
  display: block;
  color: var(--text-secondary);
  line-height: 1.45;
}

.panel-link,
.section-link {
  color: var(--accent-gold);
  font-weight: 800;
  font-size: 0.9rem;
}

.panel-link {
  margin-top: auto;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.metric-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03)),
    rgba(14, 18, 29, 0.84);
}

.metric-card strong {
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 2.35rem;
  line-height: 1;
}

.metric-label {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card small {
  color: rgba(240, 240, 240, 0.58);
  font-size: 0.82rem;
}

.dashboard-section,
.dashboard-grid {
  margin-top: 34px;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading-row h2 {
  margin: 0;
  font-size: 1.9rem;
}

.section-heading-row.compact {
  align-items: start;
  margin-bottom: 16px;
}

.section-heading-row.compact h2 {
  font-size: 1.24rem;
}

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

.action-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 22px;
  gap: 14px;
  align-items: center;
  min-height: 118px;
  padding: 18px;
  border-radius: 10px;
  background: rgba(15, 17, 27, 0.78);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.action-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 166, 35, 0.36);
  background: rgba(25, 29, 44, 0.9);
  color: var(--text-primary);
}

.action-icon {
  width: 58px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #050608;
  font-size: 0.62rem;
  font-weight: 900;
}

.action-rose { background: linear-gradient(135deg, #ff4d6a, #ff9f7c); }
.action-gold { background: linear-gradient(135deg, #f5a623, #ffd166); }
.action-violet { background: linear-gradient(135deg, #9d5cff, #d4b4ff); }
.action-teal { background: linear-gradient(135deg, #00d4aa, #9af2dd); }
.action-blue { background: linear-gradient(135deg, #64b5ff, #b7ddff); }
.action-mint { background: linear-gradient(135deg, #85e0c2, #f5f0b7); }

.action-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 1.02rem;
}

.action-card small {
  display: block;
  color: var(--text-secondary);
  line-height: 1.45;
}

.action-arrow {
  color: var(--accent-gold);
  font-weight: 900;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 14px;
}

.dashboard-panel {
  padding: 22px;
}

.dashboard-shell,
.dashboard-hero,
.dashboard-panel,
.action-card,
.metric-card,
.person-row,
.activity-row {
  min-width: 0;
}

.feed-panel {
  grid-column: 1 / -1;
}

.people-list,
.activity-feed {
  display: grid;
  gap: 12px;
}

.person-row,
.activity-row {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.person-row {
  grid-template-columns: 48px minmax(0, 1fr) auto;
}

.person-row:first-child,
.activity-row:first-child {
  border-top: 0;
}

.person-row img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.person-row strong,
.activity-row strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.96rem;
}

.person-row small,
.activity-row small {
  display: block;
  color: var(--text-secondary);
  line-height: 1.45;
}

.mini-action {
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid rgba(245, 166, 35, 0.28);
  border-radius: 8px;
  color: var(--accent-gold);
  font-size: 0.82rem;
  font-weight: 800;
}

.pulse-visual {
  height: 150px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  align-items: end;
  margin: 12px 0 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
    rgba(255, 255, 255, 0.025);
}

.pulse-visual span {
  min-height: 22px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, rgba(245, 166, 35, 0.95), rgba(0, 212, 170, 0.68));
  box-shadow: 0 0 22px rgba(0, 212, 170, 0.12);
}

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

.pulse-stats div {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.pulse-stats dt {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pulse-stats dd {
  margin: 6px 0 0;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 1.28rem;
  font-weight: 800;
}

.activity-row {
  grid-template-columns: 54px minmax(0, 1fr) auto;
}

.activity-mark {
  width: 54px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(245, 166, 35, 0.12);
  color: var(--accent-gold);
  font-size: 0.62rem;
  font-weight: 900;
}

.activity-time {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-tabbar {
  display: none;
}

@media (max-width: 1080px) {
  .dashboard-hero,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dashboard-page {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .dashboard-shell {
    padding: calc(var(--nav-height) + 16px) 14px 28px;
  }

  .dashboard-hero {
    gap: 12px;
  }

  .hero-copy,
  .tonight-panel,
  .dashboard-panel {
    border-radius: 10px;
  }

  .hero-copy {
    min-height: 280px;
    padding: 20px;
  }

  .profile-lockup {
    align-items: flex-start;
    gap: 14px;
  }

  .profile-avatar {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .hero-copy h1 {
    font-size: 2rem;
  }

  .hero-copy p,
  .tonight-panel p {
    font-size: 0.92rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
    min-width: 0;
    padding-left: 12px;
    padding-right: 12px;
  }

  .tonight-panel {
    min-height: 0;
    padding: 18px;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
  }

  .metric-card {
    min-height: 118px;
    padding: 15px;
  }

  .metric-card strong {
    font-size: 1.85rem;
  }

  .dashboard-section,
  .dashboard-grid {
    margin-top: 26px;
  }

  .section-heading-row,
  .section-heading-row.compact {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .section-heading-row h2 {
    font-size: 1.52rem;
  }

  .action-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .action-card {
    min-height: 96px;
    padding: 15px;
  }

  .dashboard-panel {
    padding: 18px;
  }

  .person-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .person-row .mini-action {
    grid-column: 2;
    justify-self: start;
  }

  .pulse-stats {
    grid-template-columns: 1fr;
  }

  .activity-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .activity-time {
    grid-column: 2;
  }

  .mobile-tabbar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 995;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(10, 12, 18, 0.92);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
  }

  .mobile-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 54px;
    padding: 5px 3px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.05;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .mobile-tabbar a.active {
    color: #050608;
    background: var(--gradient-cta);
  }

  .mobile-tabbar span {
    font-size: 0.7rem;
    line-height: 1;
  }

  .mobile-tabbar strong {
    margin-top: 0;
    overflow: visible;
    max-width: 100%;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.05;
  }

  .mobile-tabbar a[href$="planner.html"] strong {
    font-size: 0;
  }

  .mobile-tabbar a[href$="planner.html"] strong::after {
    content: "Planner";
    font-size: 0.68rem;
  }
}

@media (max-width: 390px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 112px;
  }

  .section-link,
  .panel-link {
    font-size: 0.84rem;
  }

  .section-heading-row,
  .section-heading-row.compact {
    display: grid;
    gap: 8px;
  }

  .mobile-tabbar {
    left: 6px;
    right: 6px;
    gap: 3px;
  }

  .mobile-tabbar a,
  .mobile-tabbar a[href$="planner.html"] strong::after {
    font-size: 0.62rem;
  }
}

@media (max-width: 430px) {
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 92px;
  }

  .metric-card strong {
    font-size: 1.65rem;
  }
}
