html, body { height: auto; overflow: auto; }
body {
  background: var(--foc-bg-darkest);
  color: var(--foc-text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Background decoration */
.dash-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.dash-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.45;
}
.orb-1 { width: 540px; height: 540px; top: -180px; left: -120px; background: radial-gradient(circle, #6D28D9, transparent 70%); }
.orb-2 { width: 480px; height: 480px; bottom: -180px; right: -150px; background: radial-gradient(circle, #A78BFA, transparent 70%); opacity: 0.5; }
.orb-3 { width: 360px; height: 360px; top: 40%; left: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, #4C1D95, transparent 70%); opacity: 0.25; }
.dash-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%);
}

/* Header */
.dash-header {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 2rem;
  background: rgba(13, 11, 34, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--foc-border);
}
.dash-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 800; font-size: 1.05rem;
  text-decoration: none; color: var(--foc-text-primary);
}
.dash-nav {
  display: flex; gap: 0.3rem;
  justify-content: center;
}
.dash-nav a {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--foc-text-secondary);
  transition: all 0.15s var(--foc-ease);
}
.dash-nav a:hover { background: var(--foc-hover-bg); color: var(--foc-text-primary); }
.dash-nav a.active {
  background: linear-gradient(135deg, var(--foc-vibrant-purple), var(--foc-accent-purple));
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}
.dash-header-right {
  display: flex; align-items: center; gap: 0.7rem;
}
.dash-user-chip {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--foc-bg-medium);
  border: 1px solid var(--foc-border);
  border-radius: 999px;
  padding: 0.3rem 0.4rem 0.3rem 0.4rem;
}
.dash-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--foc-vibrant-purple), var(--foc-light-purple));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 0.85rem;
}
.dash-username { font-size: 0.85rem; font-weight: 600; }
.dash-email { font-size: 0.72rem; color: var(--foc-text-muted); }
.dash-signout { padding: 0.35rem 0.7rem !important; font-size: 0.78rem !important; }

/* Main */
.dash-main {
  position: relative; z-index: 1;
  flex: 1;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
  display: grid;
  gap: 1.4rem;
}

/* Hero card */
.hero-card {
  background: linear-gradient(135deg, rgba(76, 29, 149, 0.45), rgba(20, 16, 42, 0.85));
  border: 1px solid var(--foc-border-strong);
  border-radius: var(--foc-radius-lg);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  box-shadow: var(--foc-shadow), 0 0 80px rgba(124, 58, 237, 0.2);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(167, 139, 250, 0.18), transparent 50%);
  pointer-events: none;
}

.hero-card-left {
  position: relative;
  display: flex; flex-direction: column; gap: 0.7rem;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  align-self: flex-start;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #34D399;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.status-pill.trial { background: rgba(34, 211, 238, 0.12); color: #22D3EE; border-color: rgba(34, 211, 238, 0.35); }
.status-pill.expired, .status-pill.locked { background: rgba(232, 92, 107, 0.12); color: #F87171; border-color: rgba(232, 92, 107, 0.4); }
.status-pill .status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-card-left h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, #A78BFA);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { color: var(--foc-text-secondary); font-size: 1rem; max-width: 540px; line-height: 1.6; }

.countdown-ring-wrap {
  position: relative;
  width: 200px; height: 200px;
  margin-top: 0.5rem;
  align-self: center;
}
.countdown-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(124, 58, 237, 0.15); stroke-width: 14; }
.ring-fg {
  fill: none; stroke: url(#ringGrad); stroke-width: 14; stroke-linecap: round;
  stroke-dasharray: 534.07; /* 2*PI*85 */
  stroke-dashoffset: 534.07;
  transition: stroke-dashoffset 1s var(--foc-ease);
}
.ring-fg.expired { stroke: #F87171; }
.ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
}
.ring-days {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #fff, #A78BFA);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ring-label {
  font-size: 0.85rem;
  color: var(--foc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 0.3rem;
  font-weight: 600;
}

.hero-card-right {
  position: relative;
  display: flex; flex-direction: column; gap: 1rem;
  justify-content: space-between;
}
.hero-meta {
  list-style: none;
  display: flex; flex-direction: column; gap: 0.6rem;
  background: rgba(7, 5, 26, 0.4);
  border: 1px solid var(--foc-border);
  border-radius: var(--foc-radius);
  padding: 1rem;
}
.hero-meta li {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--foc-border);
}
.hero-meta li:last-child { border-bottom: none; padding-bottom: 0; }
.meta-label { font-size: 0.78rem; color: var(--foc-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.meta-value { font-size: 0.92rem; font-weight: 600; color: var(--foc-text-primary); }
.meta-value.success { color: #34D399; }
.meta-value.warn { color: #FBBF24; }
.meta-value.danger { color: #F87171; }

.hero-actions {
  display: flex; flex-direction: column; gap: 0.5rem;
}

/* Progress card */
.progress-card {
  background: var(--foc-bg-card);
  border: 1px solid var(--foc-border);
  border-radius: var(--foc-radius);
  padding: 1.4rem 1.6rem;
}
.progress-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
}
.progress-card-head h3 { font-size: 1.05rem; font-weight: 700; }
.progress-percent {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #A78BFA);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.progress-track {
  position: relative;
  height: 10px;
  background: rgba(124, 58, 237, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #6D28D9, #A78BFA);
  border-radius: 999px;
  transition: width 1s var(--foc-ease);
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.6);
}
.progress-fill.expired { background: linear-gradient(90deg, #DC2626, #F87171); box-shadow: 0 0 16px rgba(248, 113, 113, 0.5); }
.progress-marks {
  display: flex; justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--foc-text-muted);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.stat-tile {
  background: var(--foc-bg-card);
  border: 1px solid var(--foc-border);
  border-radius: var(--foc-radius);
  padding: 1rem 1.2rem;
  display: flex; align-items: center; gap: 0.9rem;
}
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.stat-label { font-size: 0.74rem; color: var(--foc-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.3rem; font-weight: 800; }

/* Recent card */
.recent-card {
  background: var(--foc-bg-card);
  border: 1px solid var(--foc-border);
  border-radius: var(--foc-radius);
  padding: 1.4rem 1.6rem;
}
.recent-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
}
.recent-head h3 { font-size: 1.05rem; font-weight: 700; }
.recent-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.recent-item {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center; gap: 0.8rem;
  padding: 0.65rem 0.8rem;
  background: var(--foc-bg-medium);
  border: 1px solid var(--foc-border);
  border-radius: var(--foc-radius-sm);
}
.recent-item:hover { background: var(--foc-bg-light); }
.recent-thumb {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--foc-light-purple);
}
.recent-name { font-weight: 600; font-size: 0.92rem; }
.recent-meta { font-size: 0.74rem; color: var(--foc-text-muted); }

/* Tiers */
.tiers-card {
  background: var(--foc-bg-card);
  border: 1px solid var(--foc-border);
  border-radius: var(--foc-radius);
  padding: 1.4rem 1.6rem;
}
.tiers-head h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.2rem; }
.tier-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}
.tier-pill {
  background: rgba(7, 5, 26, 0.4);
  border: 1px solid var(--foc-border);
  border-radius: var(--foc-radius-sm);
  padding: 0.9rem 1rem;
  transition: all 0.15s var(--foc-ease);
}
.tier-pill:hover {
  border-color: var(--foc-border-strong);
  transform: translateY(-2px);
}
.tier-pill.popular {
  background: linear-gradient(135deg, rgba(76, 29, 149, 0.4), rgba(124, 58, 237, 0.2));
  border-color: var(--foc-border-strong);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.2);
  position: relative;
}
.tier-pill.popular::after {
  content: "POPULAR";
  position: absolute; top: -8px; right: 8px;
  background: linear-gradient(135deg, #10B981, #34D399);
  color: #fff;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.tier-name { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.2rem; }
.tier-desc { font-size: 0.78rem; color: var(--foc-text-muted); }

/* Footer */
.dash-footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 1.2rem;
  font-size: 0.82rem;
  color: var(--foc-text-muted);
  border-top: 1px solid var(--foc-border);
  margin-top: 1rem;
}
.dash-footer a { color: var(--foc-light-purple); }

.muted { color: var(--foc-text-muted); }

/* Mobile */
@media (max-width: 900px) {
  .hero-card { grid-template-columns: 1fr; }
  .dash-header { grid-template-columns: 1fr; }
  .dash-nav { order: 3; justify-content: center; }
  .dash-user-chip { font-size: 0.78rem; }
}
@media (max-width: 600px) {
  .dash-main { padding: 1rem; }
  .hero-card { padding: 1.4rem; }
  .hero-card-left h1 { font-size: 1.6rem; }
  .countdown-ring-wrap { width: 160px; height: 160px; }
  .ring-days { font-size: 2.4rem; }
}
