:root {
  --bg-1: #edf6ff;
  --bg-2: #dbeeff;
  --bg-3: #f9fcff;
  --text-main: #17324d;
  --text-soft: #5f7890;
  --stroke: rgba(255, 255, 255, 0.55);
  --shadow: 0 20px 45px rgba(40, 82, 128, 0.16);
  --accent: #4ba3ff;
  --accent-strong: #2477df;
  --success: #23b07d;
  --warning: #f29f4b;
  --danger: #ef6461;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.85), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(122, 196, 255, 0.38), transparent 26%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2) 44%, var(--bg-3));
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(32px);
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 240px;
  height: 240px;
  top: 10%;
  right: 8%;
  background: rgba(63, 170, 255, 0.18);
}

body::after {
  width: 300px;
  height: 300px;
  bottom: 8%;
  left: 4%;
  background: rgba(255, 255, 255, 0.5);
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.glass-card {
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.22));
  backdrop-filter: blur(26px) saturate(145%);
  -webkit-backdrop-filter: blur(26px) saturate(145%);
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

.auth-shell {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
}

.auth-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.auth-card {
  border-radius: 30px;
  padding: 28px;
}

.auth-intro h1,
.hero h1,
.panel h2,
.chart-card h3,
.task-card h4,
.goal-card h4,
.session-card h4,
.friend-card h4 {
  margin: 0;
}

.auth-intro h1,
.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-copy,
.inline-message,
.task-card p,
.goal-card p,
.session-card p,
.insight-card p,
.friend-card p,
.friend-feed-card p,
.empty-state {
  color: var(--text-soft);
}

.hero-copy {
  max-width: 720px;
  margin: 12px 0 0;
  font-size: 1.02rem;
}

.auth-highlights {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent-strong);
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.tab-btn,
.primary-btn,
.secondary-btn,
.ghost-btn {
  cursor: pointer;
  border-radius: 18px;
  font: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.tab-btn,
.secondary-btn,
.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.46);
  color: var(--text-main);
}

.tab-btn {
  padding: 12px 16px;
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(75, 163, 255, 0.92), rgba(36, 119, 223, 0.92));
  color: #fff;
  box-shadow: 0 12px 26px rgba(36, 119, 223, 0.22);
}

.auth-form,
.task-form,
.session-form,
.friend-form {
  display: grid;
  gap: 14px;
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.94rem;
  color: var(--text-soft);
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(134, 172, 208, 0.24);
  background: rgba(255, 255, 255, 0.54);
  color: var(--text-main);
  padding: 14px 16px;
  outline: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(36, 119, 223, 0.48);
  box-shadow: 0 0 0 4px rgba(75, 163, 255, 0.12);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
}

.full-width {
  grid-column: 1 / -1;
}

button {
  border: 0;
  padding: 13px 18px;
}

button:hover {
  transform: translateY(-2px);
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 26px rgba(36, 119, 223, 0.28);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 30px;
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.hero-stats,
.session-summary,
.goal-insights,
.chart-grid,
.social-columns {
  display: grid;
  gap: 14px;
}

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

.stat-pill,
.mini-card {
  min-width: 126px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.stat-pill span,
.mini-card strong {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
}

.stat-pill small,
.mini-card span {
  color: var(--text-soft);
}

.profile-strip,
.badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.55);
}

.badge.priority-high {
  color: var(--danger);
}

.badge.priority-medium {
  color: var(--warning);
}

.badge.priority-low {
  color: var(--success);
}

.dashboard {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.panel {
  border-radius: 28px;
  padding: 24px;
}

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

.section-heading,
.subheading-row,
.card-row,
.goal-meta,
.session-meta,
.friend-row,
.feed-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.task-list-block,
.goal-insights,
.goal-list,
.session-list,
.friend-list,
.friend-feed {
  margin-top: 22px;
}

.task-list,
.goal-list,
.session-list,
.friend-list,
.friend-feed {
  display: grid;
  gap: 12px;
}

.task-card,
.goal-card,
.session-card,
.insight-card,
.friend-card,
.friend-feed-card {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.46);
}

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

.insight-card strong {
  display: block;
  font-size: 1.4rem;
}

.session-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
}

.social-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

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

.chart-card {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.44);
}

canvas {
  width: 100%;
  height: auto;
  margin-top: 14px;
}

.inline-message {
  min-height: 24px;
  margin: 14px 2px 0;
}

.inline-message.success {
  color: var(--success);
}

.inline-message.error {
  color: var(--danger);
}

.friend-actions {
  display: flex;
  gap: 8px;
}

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

.feed-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  font-size: 0.8rem;
}

.empty-state {
  text-align: center;
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px dashed rgba(116, 152, 187, 0.32);
}

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

  .analytics-panel {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 18px 14px 30px;
  }

  .hero,
  .section-heading,
  .subheading-row,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats,
  .session-summary,
  .goal-insights,
  .chart-grid,
  .task-form,
  .session-form,
  .social-columns,
  .friend-stats {
    grid-template-columns: 1fr;
  }
}
