:root {
  --nc-deep: #150833;
  --nc-deep-2: #1d0f44;
  --nc-accent: #f2b742;
  --nc-green: #19b46b;
  --nc-red: #f05454;
  --nc-surface: #f8f7fb;
  --nc-text: #0f172a;
  --nc-subtext: #6b7280;
  --nc-border: #e6e8ef;
  --nc-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
}

body {
  background: #f1f2f9;
  font-family: "Inter", "Poppins", system-ui, -apple-system, sans-serif;
}

.dash-wrapper {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 48px;
  padding: 0 12px 48px;
  min-height: 100vh;
}

.hero-card {
  position: relative;
  margin: 10px 0 80px;
  padding: 24px 16px 120px;
  border-radius: 32px;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 40%),
    linear-gradient(150deg, var(--nc-deep), var(--nc-deep-2));
  box-shadow: var(--nc-shadow);

  /* ✅ IMPORTANT FIX:
     avatar is positioned outside hero-card, so we must NOT clip it */
  overflow: visible;

  color: #fff;
  text-align: center;
}

/* keep glow layer clipped nicely without clipping children */
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.12), transparent 30%);
  pointer-events: none;
  z-index: 0;
}

.hero-actions {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 8px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.icon-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
}

.avatar-shell {
  position: absolute;
  left: 50%;
  bottom: -80px;
  transform: translateX(-50%);
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 18px 30px rgba(21, 8, 51, 0.25);

  /* ✅ ensure avatar is above the glow layers */
  z-index: 3;
}

.avatar-shell .ring {
  width: 152px;
  height: 152px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f7d185, #b4792c);
  display: grid;
  place-items: center;
  padding: 6px;
}

.avatar-shell img,
.avatar-shell .avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;

  /* ✅ better “face centering” for portraits */
  object-position: center 30%;

  background: #f4f6ff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
  display: block;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 36px;
  color: var(--nc-deep);
}

.welcome-text {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  text-align: center;
}

.welcome-text h4 {
  font-weight: 800;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
  color: #fff;
}

.welcome-text .user-name {
  font-size: 20px;
  font-weight: 700;
  color: #f8fafc;
}

.chip-row {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}

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

.stat-card {
  border-radius: 22px;
  padding: 16px;
  background: linear-gradient(145deg, #2b175c, #34206f);
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 140px;
  box-shadow: 0 12px 28px rgba(52, 32, 111, 0.4);
}

.stat-card.alt {
  background: linear-gradient(145deg, #15315c, #0e223f);
  box-shadow: 0 12px 28px rgba(14, 34, 63, 0.35);
}

.stat-card .label {
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 8px;
}

.stat-card .value {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 4px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 12px;
}

.mini-pill {
  border-radius: 18px;
  padding: 14px;
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.1);
}

.mini-pill .count {
  font-size: 22px;
}

.mini-pill.green {
  background: linear-gradient(135deg, #27c96e, #19b46b);
}

.mini-pill.red {
  background: linear-gradient(135deg, #ff6b6b, #f05454);
}

.cta-card {
  background: linear-gradient(145deg, #1d1548, #0f0c2c);
  color: #fff;
  border-radius: 24px;
  padding: 20px 18px;
  box-shadow: 0 14px 30px rgba(15, 12, 44, 0.35);
  margin: -6px 0 16px;
}

.cta-card h5 {
  font-weight: 800;
  margin-bottom: 6px;
}

.cta-card p {
  color: #e5e7eb;
  margin-bottom: 14px;
}

.cta-card button {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #46c0ff, #6c7bff);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 12px 22px rgba(108, 123, 255, 0.38);
  transition: transform 140ms ease, box-shadow 160ms ease;
}

.cta-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(108, 123, 255, 0.42);
}

.status-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.status-chip {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px dashed rgba(255, 255, 255, 0.25);
}

.list-section {
  margin-top: 6px;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.list-header h6 {
  font-weight: 800;
  margin: 0;
}

.task-card {
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  margin-bottom: 12px;
}

.task-card .title {
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--nc-text);
}

.task-card .meta {
  color: var(--nc-subtext);
  font-size: 13px;
  margin-bottom: 10px;
}

.task-card .tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 12px;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 700;
  font-size: 12px;
  margin-right: 6px;
}

.task-card form button {
  width: 100%;
}

.alert-soft {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.14);
  padding: 10px 12px;
  color: #fff;
  margin: 10px 0;
}

@media (max-width: 480px) {
  .dash-wrapper {
    padding: 0 12px 40px;
  }
  .stat-grid,
  .mini-grid,
  .status-row {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  .hero-card {
    margin-bottom: 110px;
  }
}
