/* =========================================================
   SMARTGOAL — PREMIUM DESIGN SYSTEM
   Version 2.0
========================================================= */

/* ---------- ROOT ---------- */

:root {
  color-scheme: light;

  --font-main: "DM Sans", sans-serif;
  --font-heading: "Manrope", sans-serif;

  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #eef1f7;

  --text: #172033;
  --text-secondary: #68738a;
  --text-muted: #98a1b3;

  --primary: #6658e8;
  --primary-hover: #5547d5;
  --primary-soft: #eeecff;

  --accent: #16b8a6;
  --accent-soft: #e4f8f4;

  --blue: #4187ee;
  --blue-soft: #eaf2ff;

  --orange: #f39b4a;
  --orange-soft: #fff3e7;

  --red: #e45c70;
  --red-soft: #fff0f2;

  --green: #22a879;
  --green-soft: #e7f8f0;

  --border: #e8ebf2;
  --border-strong: #dce1eb;

  --sidebar-width: 264px;
  --topbar-height: 84px;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 8px rgba(26, 36, 60, .04);
  --shadow-md: 0 8px 28px rgba(26, 36, 60, .07);
  --shadow-lg: 0 20px 60px rgba(26, 36, 60, .12);

  --transition: .22s ease;
}

/* ---------- DARK THEME ---------- */

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #111522;
  --surface: #191f2f;
  --surface-2: #202739;
  --surface-3: #293247;

  --text: #f1f3fa;
  --text-secondary: #aab3c6;
  --text-muted: #77839a;

  --primary: #9285ff;
  --primary-hover: #a69cff;
  --primary-soft: #302c50;

  --accent: #35cdb9;
  --accent-soft: #183e3c;

  --blue: #71aaff;
  --blue-soft: #233750;

  --orange: #ffb46e;
  --orange-soft: #463324;

  --red: #ff8091;
  --red-soft: #482b38;

  --green: #55d5a2;
  --green-soft: #1d4038;

  --border: #2d3548;
  --border-strong: #3a455c;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .12);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, .18);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .28);
}

/* ---------- THEMES ---------- */

[data-color-theme="ocean"] {
  --primary: #2788cb;
  --primary-hover: #1675b8;
  --primary-soft: #e4f3ff;
}

[data-color-theme="emerald"] {
  --primary: #159b78;
  --primary-hover: #0c8062;
  --primary-soft: #e0f7ef;
}

[data-color-theme="sunset"] {
  --primary: #df7957;
  --primary-hover: #c96443;
  --primary-soft: #fff0e9;
}

[data-color-theme="rose"] {
  --primary: #d65c94;
  --primary-hover: #bc467e;
  --primary-soft: #ffedf5;
}

[data-color-theme="violet"] {
  --primary: #6658e8;
  --primary-hover: #5547d5;
  --primary-soft: #eeecff;
}

/* ---------- RESET ---------- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.55;
  transition: background var(--transition), color var(--transition);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(102, 88, 232, .24);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

.app {
  min-height: 100vh;
}

/* ---------- BRAND ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.8px;
}

.brand-large {
  font-size: 27px;
}

.brand-accent {
  color: var(--primary);
}

.brand-mark {
  width: 39px;
  height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--primary);
  color: white;
  box-shadow: 0 7px 18px rgba(102, 88, 232, .24);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

/* ---------- AUTH SCREEN ---------- */

.auth-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--surface);
}

.auth-layout {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-decoration {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(2px);
}

.auth-decoration-one {
  width: 460px;
  height: 460px;
  top: -240px;
  left: -180px;
  background: rgba(102, 88, 232, .08);
}

.auth-decoration-two {
  width: 380px;
  height: 380px;
  right: -180px;
  bottom: -200px;
  background: rgba(22, 184, 166, .08);
}

.auth-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 48px clamp(30px, 6vw, 100px);
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 85% 20%, rgba(142, 129, 255, .35), transparent 35%),
    radial-gradient(circle at 10% 85%, rgba(22, 184, 166, .20), transparent 35%),
    linear-gradient(145deg, #171b39, #27245d 60%, #343078);
}

.auth-showcase::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -180px;
  bottom: -180px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}

.auth-showcase::after {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  right: -105px;
  bottom: -105px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}

.auth-showcase .brand {
  position: relative;
  z-index: 2;
  color: white;
}

.auth-showcase .brand-accent {
  color: #a9a0ff;
}

.auth-showcase .brand-mark {
  background: rgba(255,255,255,.15);
  box-shadow: none;
}

.auth-showcase-content {
  position: relative;
  z-index: 2;
  max-width: 540px;
  margin: 50px 0;
}

.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.auth-showcase .eyebrow {
  color: #b9b2ff;
}

.auth-showcase h1 {
  max-width: 550px;
  margin-top: 22px;
  font-family: var(--font-heading);
  font-size: clamp(34px, 4.3vw, 58px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -2.2px;
}

.auth-showcase-content > p {
  max-width: 440px;
  margin-top: 20px;
  color: rgba(255,255,255,.72);
  font-size: 15px;
  line-height: 1.8;
}

.auth-feature-list {
  display: grid;
  gap: 24px;
  margin-top: 52px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 16px;
}

.feature-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  background: rgba(255,255,255,.09);
  color: #c6c0ff;
}

.feature-icon svg {
  width: 21px;
  height: 21px;
}

.auth-feature strong,
.auth-feature span {
  display: block;
}

.auth-feature strong {
  font-size: 14px;
  font-weight: 700;
}

.auth-feature div > span {
  margin-top: 3px;
  color: rgba(255,255,255,.58);
  font-size: 12px;
}

.auth-showcase-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255,255,255,.55);
  font-size: 11px;
}

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 55px 35px;
  background: var(--surface);
}

.auth-form-container {
  width: 100%;
  max-width: 430px;
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 35px;
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 800;
}

.auth-heading h2 {
  margin-top: 12px;
  font-family: var(--font-heading);
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -.8px;
}

.auth-heading p {
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 13px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 30px 0;
  padding: 5px;
  border-radius: 13px;
  background: var(--surface-2);
}

.auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: grid;
  gap: 19px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field > label {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.form-field small {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.6;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 49px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--surface);
  transition: border var(--transition), box-shadow var(--transition);
}

.input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 88, 232, .10);
}

.input-wrap > svg {
  width: 17px;
  height: 17px;
  margin-left: 15px;
  color: var(--text-muted);
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  height: 47px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.input-wrap input::placeholder {
  color: var(--text-muted);
}

.input-wrap input:focus-visible {
  outline: none;
}

.input-action {
  width: 42px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-muted);
}

.input-action svg {
  width: 17px;
  height: 17px;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkbox-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.6;
  cursor: pointer;
}

.checkbox-label input {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.terms-label {
  margin-top: 1px;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.text-button:hover {
  text-decoration: underline;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.primary-button:hover {
  transform: translateY(-2px);
  background: var(--primary-hover);
  box-shadow: 0 8px 20px rgba(102, 88, 232, .2);
}

.primary-button svg {
  width: 17px;
  height: 17px;
}

.auth-submit {
  width: 100%;
  margin-top: 5px;
}

.auth-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 27px 0 20px;
  color: var(--text-muted);
  font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  padding: 0 14px;
}

.auth-switch-text {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
}

.auth-legal {
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 10px;
  text-align: center;
}

/* ---------- APP SHELL ---------- */

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 25px 17px 17px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  transition: transform .3s ease, background var(--transition);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px 25px;
}

.sidebar-close {
  display: none !important;
}

.sidebar-profile {
  padding: 13px 8px;
  margin-bottom: 17px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.profile-mini {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  text-align: left;
}

.avatar {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}

.avatar svg {
  width: 45%;
  height: 45%;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-small {
  width: 37px;
  height: 37px;
}

.avatar-medium {
  width: 42px;
  height: 42px;
}

.avatar-large {
  width: 90px;
  height: 90px;
}

.profile-mini-info {
  min-width: 0;
  flex: 1;
}

.profile-mini-info strong,
.profile-mini-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-mini-info strong {
  font-size: 12px;
  font-weight: 800;
}

.profile-mini-info small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

.profile-chevron {
  width: 15px;
  color: var(--text-muted);
}

.main-navigation {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.nav-section-label {
  display: block;
  padding: 12px 12px 9px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.3px;
}

.nav-section-spaced {
  margin-top: 15px;
}

.nav-link {
  position: relative;
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  margin-bottom: 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}

.nav-link > svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-link.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}

.nav-link.active > svg {
  color: var(--primary);
}

.nav-badge {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 9px;
  font-weight: 800;
}

.notification-dot {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--red);
}

.sidebar-bottom {
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.sidebar-points {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--orange-soft);
}

.points-icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(243, 155, 74, .17);
  color: var(--orange);
}

.points-icon svg {
  width: 18px;
}

.sidebar-points small,
.sidebar-points strong {
  display: block;
}

.sidebar-points small {
  color: var(--text-secondary);
  font-size: 10px;
}

.sidebar-points strong {
  margin-top: 2px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.sidebar-logout {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
}

.sidebar-logout:hover {
  background: var(--red-soft);
  color: var(--red);
}

.sidebar-logout svg {
  width: 17px;
}

/* ---------- MAIN CONTENT ---------- */

.main-area {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 0 35px;
  transition: margin var(--transition);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.page-date {
  display: block;
  margin-bottom: 2px;
  color: var(--text-muted);
  font-size: 10px;
}

.page-heading h1 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.5px;
}

.topbar-right {
  gap: 13px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-secondary);
  transition: var(--transition);
}

.icon-button:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.menu-toggle {
  display: none;
}

.notification-button {
  position: relative;
}

.notification-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--surface);
  border-radius: 50%;
  background: var(--red);
}

.topbar-divider {
  width: 1px;
  height: 30px;
  background: var(--border);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.topbar-user:hover {
  background: var(--surface-2);
}

.topbar-user-name {
  max-width: 140px;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user > svg {
  width: 14px;
  color: var(--text-muted);
}

.global-search {
  position: sticky;
  z-index: 15;
  top: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.global-search > svg {
  width: 18px;
  color: var(--text-muted);
}

.global-search input {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.content-area {
  width: 100%;
  max-width: 1500px;
  min-height: calc(100vh - 145px);
  padding: 29px 0 45px;
  margin: 0 auto;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 0 22px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
}

/* ---------- CARDS ---------- */

.card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  border-color: var(--border-strong);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.3px;
}

.card-description {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
}

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.card-action svg {
  width: 14px;
}

/* ---------- PAGE HEADINGS ---------- */

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.7px;
}

.section-heading p {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 12px;
}

.section-label {
  display: block;
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

/* ---------- DASHBOARD ---------- */

.welcome-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  min-height: 190px;
  padding: 30px 34px;
  margin-bottom: 23px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 85% 15%, rgba(255,255,255,.18), transparent 30%),
    linear-gradient(110deg, #5145cf, #7969ef 70%, #9182fa);
  color: white;
}

.welcome-banner::before,
.welcome-banner::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  pointer-events: none;
}

.welcome-banner::before {
  width: 290px;
  height: 290px;
  right: 8%;
  top: -180px;
}

.welcome-banner::after {
  width: 210px;
  height: 210px;
  right: 2%;
  bottom: -160px;
}

.welcome-content {
  position: relative;
  z-index: 2;
  max-width: 590px;
}

.welcome-content .eyebrow {
  color: rgba(255,255,255,.7);
}

.welcome-content h2 {
  margin-top: 10px;
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -.8px;
}

.welcome-content p {
  max-width: 490px;
  margin-top: 8px;
  color: rgba(255,255,255,.76);
  font-size: 12px;
  line-height: 1.7;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 19px;
}

.welcome-banner .primary-button {
  background: white;
  color: #5145cf;
}

.welcome-banner .primary-button:hover {
  background: #f2f0ff;
}

.welcome-visual {
  position: relative;
  z-index: 2;
  width: 145px;
  height: 145px;
  display: grid;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 34px;
  background: rgba(255,255,255,.11);
  transform: rotate(8deg);
}

.welcome-visual svg {
  width: 75px;
  height: 75px;
  color: white;
  stroke-width: 1.4;
  transform: rotate(-8deg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card {
  position: relative;
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stat-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.stat-icon svg {
  width: 19px;
  height: 19px;
}

.stat-icon.purple {
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.stat-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.stat-icon.orange {
  background: var(--orange-soft);
  color: var(--orange);
}

.stat-label {
  margin-top: 17px;
  color: var(--text-secondary);
  font-size: 11px;
}

.stat-value {
  margin-top: 3px;
  font-family: var(--font-heading);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.7px;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
}

.stat-change svg {
  width: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .9fr);
  gap: 20px;
}

.dashboard-column {
  display: grid;
  align-content: start;
  gap: 20px;
}

/* ---------- PROGRESS ---------- */

.progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 30px;
  background: var(--surface-3);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width .5s ease;
}

.progress-fill.green {
  background: var(--green);
}

.progress-fill.orange {
  background: var(--orange);
}

.progress-fill.blue {
  background: var(--blue);
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.progress-row span {
  color: var(--text-secondary);
  font-size: 11px;
}

.progress-row strong {
  font-size: 11px;
}

/* ---------- TASKS ---------- */

.task-list {
  display: grid;
  gap: 10px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: var(--transition);
}

.task-item:hover {
  background: var(--surface-2);
}

.task-checkbox {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.task-info {
  min-width: 0;
  flex: 1;
}

.task-info strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-info small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.task-completed .task-info strong {
  color: var(--text-muted);
  text-decoration: line-through;
}

.task-reward {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.task-reward svg {
  width: 12px;
  height: 12px;
}

/* ---------- GOALS ---------- */

.goal-list {
  display: grid;
  gap: 14px;
}

.goal-item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.goal-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 13px;
}

.goal-item-header strong {
  font-size: 12px;
  font-weight: 800;
}

.goal-item-header small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.goal-percentage {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.goal-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 10px;
}

/* ---------- CHARTS ---------- */

.chart-container {
  position: relative;
  width: 100%;
  min-height: 210px;
}

.chart-container svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid-line {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.chart-label {
  fill: var(--text-muted);
  font-size: 10px;
  font-family: var(--font-main);
}

.chart-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: url(#chartGradient);
  opacity: .2;
}

.chart-point {
  fill: var(--primary);
  stroke: var(--surface);
  stroke-width: 3;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  margin-top: 15px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 10px;
}

.chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* ---------- PROFILE ---------- */

.profile-cover {
  position: relative;
  min-height: 185px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 80% 15%, rgba(255,255,255,.2), transparent 25%),
    linear-gradient(120deg, #5145cf, #9282f6);
}

.profile-cover::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  top: -150px;
  right: 15%;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
}

.profile-main-card {
  position: relative;
  padding: 0 25px 25px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.profile-avatar-wrap {
  position: relative;
  width: fit-content;
  margin-top: -48px;
}

.profile-avatar-wrap .avatar {
  width: 100px;
  height: 100px;
  border: 5px solid var(--surface);
  background: var(--primary-soft);
}

.profile-edit-avatar {
  position: absolute;
  right: 3px;
  bottom: 4px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--primary);
  color: white;
}

.profile-edit-avatar svg {
  width: 14px;
}

.profile-name {
  margin-top: 13px;
  font-family: var(--font-heading);
  font-size: 23px;
  font-weight: 800;
}

.profile-username {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.profile-bio {
  max-width: 600px;
  margin-top: 13px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.8;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 10px;
}

.profile-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-meta svg {
  width: 14px;
  color: var(--text-muted);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  transition: var(--transition);
}

.secondary-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.secondary-button svg {
  width: 15px;
}

.level-card {
  padding: 23px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.level-number {
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 35px;
  font-weight: 800;
}

.level-title {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 800;
}

.level-description {
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.7;
}

/* ---------- BADGES AND ACHIEVEMENTS ---------- */

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 13px;
}

.achievement-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 145px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  text-align: center;
}

.achievement-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.achievement-icon svg {
  width: 23px;
  height: 23px;
}

.achievement-card strong {
  margin-top: 12px;
  font-size: 11px;
  font-weight: 800;
}

.achievement-card small {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 9px;
}

.achievement-card.locked {
  opacity: .5;
  filter: grayscale(.7);
}

/* ---------- STORE ---------- */

.store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.store-item {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
  transition: transform var(--transition), box-shadow var(--transition);
}

.store-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.store-preview {
  position: relative;
  min-height: 135px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--surface-2);
}

.store-preview svg {
  width: 47px;
  height: 47px;
  color: var(--primary);
  stroke-width: 1.5;
}

.store-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-content {
  padding: 15px;
}

.store-content h3 {
  font-size: 12px;
  font-weight: 800;
}

.store-content p {
  min-height: 32px;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 10px;
}

.store-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 13px;
}

.store-price strong {
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
}

/* ---------- COMMUNITY ---------- */

.user-list {
  display: grid;
  gap: 11px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.user-item-info {
  flex: 1;
  min-width: 0;
}

.user-item-info strong {
  display: block;
  font-size: 12px;
}

.user-item-info small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

.user-rank {
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

/* ---------- FORMS ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  transition: var(--transition);
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 88, 232, .1);
}

.field-textarea {
  min-height: 100px;
  resize: vertical;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

/* ---------- SETTINGS ---------- */

.settings-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
}

.settings-nav {
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
}

.settings-nav button {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  font-size: 11px;
  font-weight: 600;
}

.settings-nav button.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.settings-nav button svg {
  width: 16px;
}

.settings-panel {
  padding: 23px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
}

.settings-section + .settings-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--border);
}

.settings-section h3 {
  font-size: 14px;
  font-weight: 800;
}

.settings-section > p {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 11px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-info {
  min-width: 0;
}

.setting-info strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.setting-info small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.toggle {
  position: relative;
  width: 43px;
  height: 24px;
  flex-shrink: 0;
  border: 0;
  border-radius: 30px;
  background: var(--surface-3);
  transition: background var(--transition);
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  transition: transform var(--transition);
}

.toggle.active {
  background: var(--primary);
}

.toggle.active::after {
  transform: translateX(19px);
}

.theme-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 13px;
}

.theme-option {
  width: 39px;
  height: 39px;
  border: 3px solid var(--surface);
  border-radius: 12px;
  outline: 1px solid var(--border-strong);
  cursor: pointer;
}

.theme-option.active {
  outline: 2px solid var(--primary);
}

.theme-option[data-color-theme="violet"] {
  background: #6658e8;
}

.theme-option[data-color-theme="ocean"] {
  background: #2788cb;
}

.theme-option[data-color-theme="emerald"] {
  background: #159b78;
}

.theme-option[data-color-theme="sunset"] {
  background: #df7957;
}

.theme-option[data-color-theme="rose"] {
  background: #d65c94;
}

/* ---------- MODAL ---------- */

.modal-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 18, 35, .58);
  backdrop-filter: blur(5px);
  animation: fadeIn .2s ease;
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: min(85vh, 750px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: modalIn .25s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 23px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin-top: 4px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
}

.modal-body {
  overflow-y: auto;
  padding: 23px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 23px;
  border-top: 1px solid var(--border);
}

/* ---------- TOAST ---------- */

.toast-container {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  width: min(370px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease;
}

.toast-icon {
  width: 34px;
  height: 34px;
  display: grid;
  flex-shrink: 0;
  place-items: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
}

.toast-icon svg {
  width: 18px;
}

.toast-message {
  flex: 1;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.toast-close {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-muted);
}

.toast-close svg {
  width: 15px;
}

/* ---------- EMPTY AND LOADING STATES ---------- */

.empty-state,
.loading-state {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px;
  text-align: center;
}

.empty-state-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: var(--primary-soft);
  color: var(--primary);
}

.empty-state-icon svg {
  width: 25px;
}

.empty-state h3 {
  font-size: 14px;
  font-weight: 800;
}

.empty-state p,
.loading-state p {
  max-width: 330px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.7;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* ---------- AI SECTION ---------- */

.ai-panel {
  position: relative;
  padding: 27px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 10%, rgba(255,255,255,.18), transparent 25%),
    linear-gradient(120deg, #26254f, #5145cf);
  color: white;
}

.ai-panel h2 {
  max-width: 600px;
  margin-top: 12px;
  font-family: var(--font-heading);
  font-size: 25px;
  font-weight: 800;
}

.ai-panel p {
  max-width: 550px;
  margin-top: 9px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  line-height: 1.8;
}

.ai-chat {
  display: grid;
  gap: 13px;
  margin-top: 20px;
}

.ai-message {
  max-width: 85%;
  padding: 13px 15px;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  line-height: 1.7;
}

.ai-message.user {
  justify-self: end;
  background: var(--primary-soft);
  color: var(--primary);
}

.ai-input-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}

.ai-input-row input {
  flex: 1;
  min-width: 0;
  height: 37px;
  padding: 0 10px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

/* ---------- NOTIFICATIONS ---------- */

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}

.notification-item.unread {
  border-left: 3px solid var(--primary);
  background: var(--surface-2);
}

.notification-item > div:last-child {
  flex: 1;
}

.notification-item strong {
  display: block;
  font-size: 12px;
}

.notification-item p {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.6;
}

.notification-item small {
  display: block;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 9px;
}

/* ---------- CALENDAR ---------- */

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.calendar-day {
  min-height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 11px;
}

.calendar-day.today {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}

.calendar-day small {
  font-size: 9px;
}

/* ---------- ANIMATIONS ---------- */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- RESPONSIVE: TABLET ---------- */

@media (max-width: 1100px) {
  :root {
    --sidebar-width: 235px;
  }

  .main-area {
    padding: 0 25px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(250px, .9fr);
  }

  .auth-showcase {
    padding: 40px;
  }
}

/* ---------- RESPONSIVE: SMALL TABLET ---------- */

@media (max-width: 850px) {
  .sidebar {
    z-index: 80;
    transform: translateX(-105%);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: inline-grid !important;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 70;
    inset: 0;
    display: none;
    background: rgba(10, 15, 30, .45);
    backdrop-filter: blur(2px);
  }

  .sidebar.open ~ .sidebar-backdrop {
    display: block;
  }

  .main-area {
    margin-left: 0;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    grid-template-columns: .8fr 1fr;
  }

  .auth-showcase {
    padding: 35px 28px;
  }

  .auth-showcase h1 {
    font-size: 36px;
  }

  .auth-feature-list {
    gap: 18px;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .settings-nav button {
    justify-content: center;
    padding: 7px;
    font-size: 10px;
  }
}

/* ---------- RESPONSIVE: MOBILE ---------- */

@media (max-width: 600px) {
  body {
    font-size: 13px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    display: none;
  }

  .auth-form-side {
    min-height: 100vh;
    align-items: flex-start;
    padding: 35px 22px;
  }

  .auth-form-container {
    max-width: 450px;
    margin: auto;
  }

  .auth-mobile-brand {
    display: flex;
  }

  .auth-heading h2 {
    font-size: 25px;
  }

  .auth-tabs {
    margin: 24px 0;
  }

  .auth-legal {
    margin-top: 28px;
  }

  .main-area {
    padding: 0 15px;
  }

  .topbar {
    min-height: 70px;
    gap: 8px;
  }

  .topbar-left {
    gap: 9px;
  }

  .topbar-right {
    gap: 7px;
  }

  .page-heading h1 {
    font-size: 16px;
  }

  .page-date {
    font-size: 9px;
  }

  .topbar-user-name,
  .topbar-user > svg,
  .topbar-divider {
    display: none;
  }

  .topbar-user {
    padding: 0;
  }

  .icon-button {
    width: 35px;
    height: 35px;
  }

  .content-area {
    min-height: calc(100vh - 130px);
    padding-top: 20px;
  }

  .welcome-banner {
    min-height: 0;
    padding: 23px;
    border-radius: 19px;
  }

  .welcome-content h2 {
    font-size: 23px;
  }

  .welcome-content p {
    font-size: 11px;
  }

  .welcome-visual {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-label {
    font-size: 10px;
  }

  .card {
    padding: 17px;
    border-radius: 16px;
  }

  .section-heading h2 {
    font-size: 18px;
  }

  .section-heading p {
    font-size: 10px;
  }

  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .store-preview {
    min-height: 100px;
  }

  .store-content {
    padding: 11px;
  }

  .store-content h3 {
    font-size: 11px;
  }

  .badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-cover {
    min-height: 125px;
  }

  .profile-main-card {
    padding: 0 17px 19px;
  }

  .profile-name {
    font-size: 20px;
  }

  .profile-avatar-wrap .avatar {
    width: 83px;
    height: 83px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .full-width {
    grid-column: auto;
  }

  .settings-panel {
    padding: 16px;
  }

  .settings-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-nav button {
    justify-content: flex-start;
  }

  .calendar-grid {
    gap: 4px;
  }

  .calendar-day {
    min-height: 52px;
    border-radius: 8px;
    font-size: 10px;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 17px;
    padding-right: 17px;
  }

  .app-footer {
    font-size: 9px;
  }
}

/* ---------- VERY SMALL SCREENS ---------- */

@media (max-width: 370px) {
  .main-area {
    padding: 0 11px;
  }

  .stats-grid {
    gap: 8px;
  }

  .stat-card {
    padding: 11px;
  }

  .stat-value {
    font-size: 19px;
  }

  .welcome-banner {
    padding: 18px;
  }

  .welcome-content h2 {
    font-size: 20px;
  }

  .topbar-right {
    gap: 5px;
  }
}/* =========================================================
   SMARTGOAL — PREMIUM DESIGN SYSTEM
   Version 2.0
========================================================= */

/* ---------- ROOT ---------- */

:root {
  color-scheme: light;

  --font-main: "DM Sans", sans-serif;
  --font-heading: "Manrope", sans-serif;

  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #eef1f7;

  --text: #172033;
  --text-secondary: #68738a;
  --text-muted: #98a1b3;

  --primary: #6658e8;
  --primary-hover: #5547d5;
  --primary-soft: #eeecff;

  --accent: #16b8a6;
  --accent-soft: #e4f8f4;

  --blue: #4187ee;
  --blue-soft: #eaf2ff;

  --orange: #f39b4a;
  --orange-soft: #fff3e7;

  --red: #e45c70;
  --red-soft: #fff0f2;

  --green: #22a879;
  --green-soft: #e7f8f0;

  --border: #e8ebf2;
  --border-strong: #dce1eb;

  --sidebar-width: 264px;
  --topbar-height: 84px;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 8px rgba(26, 36, 60, .04);
  --shadow-md: 0 8px 28px rgba(26, 36, 60, .07);
  --shadow-lg: 0 20px 60px rgba(26, 36, 60, .12);

  --transition: .22s ease;
}

/* ---------- DARK THEME ---------- */

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #111522;
  --surface: #191f2f;
  --surface-2: #202739;
  --surface-3: #293247;

  --text: #f1f3fa;
  --text-secondary: #aab3c6;
  --text-muted: #77839a;

  --primary: #9285ff;
  --primary-hover: #a69cff;
  --primary-soft: #302c50;

  --accent: #35cdb9;
  --accent-soft: #183e3c;

  --blue: #71aaff;
  --blue-soft: #233750;

  --orange: #ffb46e;
  --orange-soft: #463324;

  --red: #ff8091;
  --red-soft: #482b38;

  --green: #55d5a2;
  --green-soft: #1d4038;

  --border: #2d3548;
  --border-strong: #3a455c;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .12);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, .18);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .28);
}

/* ---------- THEMES ---------- */

[data-color-theme="ocean"] {
  --primary: #2788cb;
  --primary-hover: #1675b8;
  --primary-soft: #e4f3ff;
}

[data-color-theme="emerald"] {
  --primary: #159b78;
  --primary-hover: #0c8062;
  --primary-soft: #e0f7ef;
}

[data-color-theme="sunset"] {
  --primary: #df7957;
  --primary-hover: #c96443;
  --primary-soft: #fff0e9;
}

[data-color-theme="rose"] {
  --primary: #d65c94;
  --primary-hover: #bc467e;
  --primary-soft: #ffedf5;
}

[data-color-theme="violet"] {
  --primary: #6658e8;
  --primary-hover: #5547d5;
  --primary-soft: #eeecff;
}

/* ---------- RESET ---------- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.55;
  transition: background var(--transition), color var(--transition);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(102, 88, 232, .24);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

.app {
  min-height: 100vh;
}

/* ---------- BRAND ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.8px;
}

.brand-large {
  font-size: 27px;
}

.brand-accent {
  color: var(--primary);
}

.brand-mark {
  width: 39px;
  height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--primary);
  color: white;
  box-shadow: 0 7px 18px rgba(102, 88, 232, .24);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

/* ---------- AUTH SCREEN ---------- */

.auth-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--surface);
}

.auth-layout {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-decoration {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(2px);
}

.auth-decoration-one {
  width: 460px;
  height: 460px;
  top: -240px;
  left: -180px;
  background: rgba(102, 88, 232, .08);
}

.auth-decoration-two {
  width: 380px;
  height: 380px;
  right: -180px;
  bottom: -200px;
  background: rgba(22, 184, 166, .08);
}

.auth-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 48px clamp(30px, 6vw, 100px);
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 85% 20%, rgba(142, 129, 255, .35), transparent 35%),
    radial-gradient(circle at 10% 85%, rgba(22, 184, 166, .20), transparent 35%),
    linear-gradient(145deg, #171b39, #27245d 60%, #343078);
}

.auth-showcase::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -180px;
  bottom: -180px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}

.auth-showcase::after {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  right: -105px;
  bottom: -105px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}

.auth-showcase .brand {
  position: relative;
  z-index: 2;
  color: white;
}

.auth-showcase .brand-accent {
  color: #a9a0ff;
}

.auth-showcase .brand-mark {
  background: rgba(255,255,255,.15);
  box-shadow: none;
}

.auth-showcase-content {
  position: relative;
  z-index: 2;
  max-width: 540px;
  margin: 50px 0;
}

.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.auth-showcase .eyebrow {
  color: #b9b2ff;
}

.auth-showcase h1 {
  max-width: 550px;
  margin-top: 22px;
  font-family: var(--font-heading);
  font-size: clamp(34px, 4.3vw, 58px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -2.2px;
}

.auth-showcase-content > p {
  max-width: 440px;
  margin-top: 20px;
  color: rgba(255,255,255,.72);
  font-size: 15px;
  line-height: 1.8;
}

.auth-feature-list {
  display: grid;
  gap: 24px;
  margin-top: 52px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 16px;
}

.feature-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  background: rgba(255,255,255,.09);
  color: #c6c0ff;
}

.feature-icon svg {
  width: 21px;
  height: 21px;
}

.auth-feature strong,
.auth-feature span {
  display: block;
}

.auth-feature strong {
  font-size: 14px;
  font-weight: 700;
}

.auth-feature div > span {
  margin-top: 3px;
  color: rgba(255,255,255,.58);
  font-size: 12px;
}

.auth-showcase-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255,255,255,.55);
  font-size: 11px;
}

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 55px 35px;
  background: var(--surface);
}

.auth-form-container {
  width: 100%;
  max-width: 430px;
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 35px;
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 800;
}

.auth-heading h2 {
  margin-top: 12px;
  font-family: var(--font-heading);
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -.8px;
}

.auth-heading p {
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 13px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 30px 0;
  padding: 5px;
  border-radius: 13px;
  background: var(--surface-2);
}

.auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: grid;
  gap: 19px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field > label {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.form-field small {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.6;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 49px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--surface);
  transition: border var(--transition), box-shadow var(--transition);
}

.input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 88, 232, .10);
}

.input-wrap > svg {
  width: 17px;
  height: 17px;
  margin-left: 15px;
  color: var(--text-muted);
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  height: 47px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.input-wrap input::placeholder {
  color: var(--text-muted);
}

.input-wrap input:focus-visible {
  outline: none;
}

.input-action {
  width: 42px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-muted);
}

.input-action svg {
  width: 17px;
  height: 17px;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkbox-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.6;
  cursor: pointer;
}

.checkbox-label input {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.terms-label {
  margin-top: 1px;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.text-button:hover {
  text-decoration: underline;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.primary-button:hover {
  transform: translateY(-2px);
  background: var(--primary-hover);
  box-shadow: 0 8px 20px rgba(102, 88, 232, .2);
}

.primary-button svg {
  width: 17px;
  height: 17px;
}

.auth-submit {
  width: 100%;
  margin-top: 5px;
}

.auth-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 27px 0 20px;
  color: var(--text-muted);
  font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  padding: 0 14px;
}

.auth-switch-text {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
}

.auth-legal {
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 10px;
  text-align: center;
}

/* ---------- APP SHELL ---------- */

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 25px 17px 17px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  transition: transform .3s ease, background var(--transition);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px 25px;
}

.sidebar-close {
  display: none !important;
}

.sidebar-profile {
  padding: 13px 8px;
  margin-bottom: 17px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.profile-mini {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  text-align: left;
}

.avatar {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}

.avatar svg {
  width: 45%;
  height: 45%;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-small {
  width: 37px;
  height: 37px;
}

.avatar-medium {
  width: 42px;
  height: 42px;
}

.avatar-large {
  width: 90px;
  height: 90px;
}

.profile-mini-info {
  min-width: 0;
  flex: 1;
}

.profile-mini-info strong,
.profile-mini-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-mini-info strong {
  font-size: 12px;
  font-weight: 800;
}

.profile-mini-info small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

.profile-chevron {
  width: 15px;
  color: var(--text-muted);
}

.main-navigation {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.nav-section-label {
  display: block;
  padding: 12px 12px 9px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.3px;
}

.nav-section-spaced {
  margin-top: 15px;
}

.nav-link {
  position: relative;
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  margin-bottom: 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}

.nav-link > svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-link.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}

.nav-link.active > svg {
  color: var(--primary);
}

.nav-badge {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 9px;
  font-weight: 800;
}

.notification-dot {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--red);
}

.sidebar-bottom {
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.sidebar-points {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--orange-soft);
}

.points-icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(243, 155, 74, .17);
  color: var(--orange);
}

.points-icon svg {
  width: 18px;
}

.sidebar-points small,
.sidebar-points strong {
  display: block;
}

.sidebar-points small {
  color: var(--text-secondary);
  font-size: 10px;
}

.sidebar-points strong {
  margin-top: 2px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.sidebar-logout {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
}

.sidebar-logout:hover {
  background: var(--red-soft);
  color: var(--red);
}

.sidebar-logout svg {
  width: 17px;
}

/* ---------- MAIN CONTENT ---------- */

.main-area {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 0 35px;
  transition: margin var(--transition);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.page-date {
  display: block;
  margin-bottom: 2px;
  color: var(--text-muted);
  font-size: 10px;
}

.page-heading h1 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.5px;
}

.topbar-right {
  gap: 13px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-secondary);
  transition: var(--transition);
}

.icon-button:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.menu-toggle {
  display: none;
}

.notification-button {
  position: relative;
}

.notification-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--surface);
  border-radius: 50%;
  background: var(--red);
}

.topbar-divider {
  width: 1px;
  height: 30px;
  background: var(--border);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.topbar-user:hover {
  background: var(--surface-2);
}

.topbar-user-name {
  max-width: 140px;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user > svg {
  width: 14px;
  color: var(--text-muted);
}

.global-search {
  position: sticky;
  z-index: 15;
  top: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.global-search > svg {
  width: 18px;
  color: var(--text-muted);
}

.global-search input {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.content-area {
  width: 100%;
  max-width: 1500px;
  min-height: calc(100vh - 145px);
  padding: 29px 0 45px;
  margin: 0 auto;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 0 22px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
}

/* ---------- CARDS ---------- */

.card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  border-color: var(--border-strong);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.3px;
}

.card-description {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
}

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.card-action svg {
  width: 14px;
}

/* ---------- PAGE HEADINGS ---------- */

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.7px;
}

.section-heading p {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 12px;
}

.section-label {
  display: block;
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

/* ---------- DASHBOARD ---------- */

.welcome-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  min-height: 190px;
  padding: 30px 34px;
  margin-bottom: 23px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 85% 15%, rgba(255,255,255,.18), transparent 30%),
    linear-gradient(110deg, #5145cf, #7969ef 70%, #9182fa);
  color: white;
}

.welcome-banner::before,
.welcome-banner::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  pointer-events: none;
}

.welcome-banner::before {
  width: 290px;
  height: 290px;
  right: 8%;
  top: -180px;
}

.welcome-banner::after {
  width: 210px;
  height: 210px;
  right: 2%;
  bottom: -160px;
}

.welcome-content {
  position: relative;
  z-index: 2;
  max-width: 590px;
}

.welcome-content .eyebrow {
  color: rgba(255,255,255,.7);
}

.welcome-content h2 {
  margin-top: 10px;
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -.8px;
}

.welcome-content p {
  max-width: 490px;
  margin-top: 8px;
  color: rgba(255,255,255,.76);
  font-size: 12px;
  line-height: 1.7;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 19px;
}

.welcome-banner .primary-button {
  background: white;
  color: #5145cf;
}

.welcome-banner .primary-button:hover {
  background: #f2f0ff;
}

.welcome-visual {
  position: relative;
  z-index: 2;
  width: 145px;
  height: 145px;
  display: grid;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 34px;
  background: rgba(255,255,255,.11);
  transform: rotate(8deg);
}

.welcome-visual svg {
  width: 75px;
  height: 75px;
  color: white;
  stroke-width: 1.4;
  transform: rotate(-8deg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card {
  position: relative;
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stat-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.stat-icon svg {
  width: 19px;
  height: 19px;
}

.stat-icon.purple {
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.stat-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.stat-icon.orange {
  background: var(--orange-soft);
  color: var(--orange);
}

.stat-label {
  margin-top: 17px;
  color: var(--text-secondary);
  font-size: 11px;
}

.stat-value {
  margin-top: 3px;
  font-family: var(--font-heading);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.7px;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
}

.stat-change svg {
  width: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .9fr);
  gap: 20px;
}

.dashboard-column {
  display: grid;
  align-content: start;
  gap: 20px;
}

/* ---------- PROGRESS ---------- */

.progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 30px;
  background: var(--surface-3);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width .5s ease;
}

.progress-fill.green {
  background: var(--green);
}

.progress-fill.orange {
  background: var(--orange);
}

.progress-fill.blue {
  background: var(--blue);
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.progress-row span {
  color: var(--text-secondary);
  font-size: 11px;
}

.progress-row strong {
  font-size: 11px;
}

/* ---------- TASKS ---------- */

.task-list {
  display: grid;
  gap: 10px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: var(--transition);
}

.task-item:hover {
  background: var(--surface-2);
}

.task-checkbox {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.task-info {
  min-width: 0;
  flex: 1;
}

.task-info strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-info small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.task-completed .task-info strong {
  color: var(--text-muted);
  text-decoration: line-through;
}

.task-reward {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.task-reward svg {
  width: 12px;
  height: 12px;
}

/* ---------- GOALS ---------- */

.goal-list {
  display: grid;
  gap: 14px;
}

.goal-item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.goal-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 13px;
}

.goal-item-header strong {
  font-size: 12px;
  font-weight: 800;
}

.goal-item-header small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.goal-percentage {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.goal-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 10px;
}

/* ---------- CHARTS ---------- */

.chart-container {
  position: relative;
  width: 100%;
  min-height: 210px;
}

.chart-container svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid-line {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.chart-label {
  fill: var(--text-muted);
  font-size: 10px;
  font-family: var(--font-main);
}

.chart-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: url(#chartGradient);
  opacity: .2;
}

.chart-point {
  fill: var(--primary);
  stroke: var(--surface);
  stroke-width: 3;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  margin-top: 15px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 10px;
}

.chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* ---------- PROFILE ---------- */

.profile-cover {
  position: relative;
  min-height: 185px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 80% 15%, rgba(255,255,255,.2), transparent 25%),
    linear-gradient(120deg, #5145cf, #9282f6);
}

.profile-cover::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  top: -150px;
  right: 15%;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
}

.profile-main-card {
  position: relative;
  padding: 0 25px 25px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.profile-avatar-wrap {
  position: relative;
  width: fit-content;
  margin-top: -48px;
}

.profile-avatar-wrap .avatar {
  width: 100px;
  height: 100px;
  border: 5px solid var(--surface);
  background: var(--primary-soft);
}

.profile-edit-avatar {
  position: absolute;
  right: 3px;
  bottom: 4px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--primary);
  color: white;
}

.profile-edit-avatar svg {
  width: 14px;
}

.profile-name {
  margin-top: 13px;
  font-family: var(--font-heading);
  font-size: 23px;
  font-weight: 800;
}

.profile-username {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.profile-bio {
  max-width: 600px;
  margin-top: 13px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.8;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 10px;
}

.profile-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-meta svg {
  width: 14px;
  color: var(--text-muted);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  transition: var(--transition);
}

.secondary-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.secondary-button svg {
  width: 15px;
}

.level-card {
  padding: 23px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.level-number {
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 35px;
  font-weight: 800;
}

.level-title {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 800;
}

.level-description {
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.7;
}

/* ---------- BADGES AND ACHIEVEMENTS ---------- */

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 13px;
}

.achievement-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 145px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  text-align: center;
}

.achievement-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.achievement-icon svg {
  width: 23px;
  height: 23px;
}

.achievement-card strong {
  margin-top: 12px;
  font-size: 11px;
  font-weight: 800;
}

.achievement-card small {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 9px;
}

.achievement-card.locked {
  opacity: .5;
  filter: grayscale(.7);
}

/* ---------- STORE ---------- */

.store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.store-item {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
  transition: transform var(--transition), box-shadow var(--transition);
}

.store-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.store-preview {
  position: relative;
  min-height: 135px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--surface-2);
}

.store-preview svg {
  width: 47px;
  height: 47px;
  color: var(--primary);
  stroke-width: 1.5;
}

.store-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-content {
  padding: 15px;
}

.store-content h3 {
  font-size: 12px;
  font-weight: 800;
}

.store-content p {
  min-height: 32px;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 10px;
}

.store-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 13px;
}

.store-price strong {
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
}

/* ---------- COMMUNITY ---------- */

.user-list {
  display: grid;
  gap: 11px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.user-item-info {
  flex: 1;
  min-width: 0;
}

.user-item-info strong {
  display: block;
  font-size: 12px;
}

.user-item-info small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

.user-rank {
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

/* ---------- FORMS ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  transition: var(--transition);
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 88, 232, .1);
}

.field-textarea {
  min-height: 100px;
  resize: vertical;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

/* ---------- SETTINGS ---------- */

.settings-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
}

.settings-nav {
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
}

.settings-nav button {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  font-size: 11px;
  font-weight: 600;
}

.settings-nav button.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.settings-nav button svg {
  width: 16px;
}

.settings-panel {
  padding: 23px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
}

.settings-section + .settings-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--border);
}

.settings-section h3 {
  font-size: 14px;
  font-weight: 800;
}

.settings-section > p {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 11px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-info {
  min-width: 0;
}

.setting-info strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.setting-info small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.toggle {
  position: relative;
  width: 43px;
  height: 24px;
  flex-shrink: 0;
  border: 0;
  border-radius: 30px;
  background: var(--surface-3);
  transition: background var(--transition);
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  transition: transform var(--transition);
}

.toggle.active {
  background: var(--primary);
}

.toggle.active::after {
  transform: translateX(19px);
}

.theme-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 13px;
}

.theme-option {
  width: 39px;
  height: 39px;
  border: 3px solid var(--surface);
  border-radius: 12px;
  outline: 1px solid var(--border-strong);
  cursor: pointer;
}

.theme-option.active {
  outline: 2px solid var(--primary);
}

.theme-option[data-color-theme="violet"] {
  background: #6658e8;
}

.theme-option[data-color-theme="ocean"] {
  background: #2788cb;
}

.theme-option[data-color-theme="emerald"] {
  background: #159b78;
}

.theme-option[data-color-theme="sunset"] {
  background: #df7957;
}

.theme-option[data-color-theme="rose"] {
  background: #d65c94;
}

/* ---------- MODAL ---------- */

.modal-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 18, 35, .58);
  backdrop-filter: blur(5px);
  animation: fadeIn .2s ease;
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: min(85vh, 750px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: modalIn .25s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 23px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin-top: 4px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
}

.modal-body {
  overflow-y: auto;
  padding: 23px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 23px;
  border-top: 1px solid var(--border);
}

/* ---------- TOAST ---------- */

.toast-container {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  width: min(370px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease;
}

.toast-icon {
  width: 34px;
  height: 34px;
  display: grid;
  flex-shrink: 0;
  place-items: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
}

.toast-icon svg {
  width: 18px;
}

.toast-message {
  flex: 1;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.toast-close {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-muted);
}

.toast-close svg {
  width: 15px;
}

/* ---------- EMPTY AND LOADING STATES ---------- */

.empty-state,
.loading-state {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px;
  text-align: center;
}

.empty-state-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: var(--primary-soft);
  color: var(--primary);
}

.empty-state-icon svg {
  width: 25px;
}

.empty-state h3 {
  font-size: 14px;
  font-weight: 800;
}

.empty-state p,
.loading-state p {
  max-width: 330px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.7;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* ---------- AI SECTION ---------- */

.ai-panel {
  position: relative;
  padding: 27px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 10%, rgba(255,255,255,.18), transparent 25%),
    linear-gradient(120deg, #26254f, #5145cf);
  color: white;
}

.ai-panel h2 {
  max-width: 600px;
  margin-top: 12px;
  font-family: var(--font-heading);
  font-size: 25px;
  font-weight: 800;
}

.ai-panel p {
  max-width: 550px;
  margin-top: 9px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  line-height: 1.8;
}

.ai-chat {
  display: grid;
  gap: 13px;
  margin-top: 20px;
}

.ai-message {
  max-width: 85%;
  padding: 13px 15px;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  line-height: 1.7;
}

.ai-message.user {
  justify-self: end;
  background: var(--primary-soft);
  color: var(--primary);
}

.ai-input-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}

.ai-input-row input {
  flex: 1;
  min-width: 0;
  height: 37px;
  padding: 0 10px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

/* ---------- NOTIFICATIONS ---------- */

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}

.notification-item.unread {
  border-left: 3px solid var(--primary);
  background: var(--surface-2);
}

.notification-item > div:last-child {
  flex: 1;
}

.notification-item strong {
  display: block;
  font-size: 12px;
}

.notification-item p {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.6;
}

.notification-item small {
  display: block;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 9px;
}

/* ---------- CALENDAR ---------- */

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.calendar-day {
  min-height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 11px;
}

.calendar-day.today {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}

.calendar-day small {
  font-size: 9px;
}

/* ---------- ANIMATIONS ---------- */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- RESPONSIVE: TABLET ---------- */

@media (max-width: 1100px) {
  :root {
    --sidebar-width: 235px;
  }

  .main-area {
    padding: 0 25px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(250px, .9fr);
  }

  .auth-showcase {
    padding: 40px;
  }
}

/* ---------- RESPONSIVE: SMALL TABLET ---------- */

@media (max-width: 850px) {
  .sidebar {
    z-index: 80;
    transform: translateX(-105%);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: inline-grid !important;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 70;
    inset: 0;
    display: none;
    background: rgba(10, 15, 30, .45);
    backdrop-filter: blur(2px);
  }

  .sidebar.open ~ .sidebar-backdrop {
    display: block;
  }

  .main-area {
    margin-left: 0;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    grid-template-columns: .8fr 1fr;
  }

  .auth-showcase {
    padding: 35px 28px;
  }

  .auth-showcase h1 {
    font-size: 36px;
  }

  .auth-feature-list {
    gap: 18px;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .settings-nav button {
    justify-content: center;
    padding: 7px;
    font-size: 10px;
  }
}

/* ---------- RESPONSIVE: MOBILE ---------- */

@media (max-width: 600px) {
  body {
    font-size: 13px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    display: none;
  }

  .auth-form-side {
    min-height: 100vh;
    align-items: flex-start;
    padding: 35px 22px;
  }

  .auth-form-container {
    max-width: 450px;
    margin: auto;
  }

  .auth-mobile-brand {
    display: flex;
  }

  .auth-heading h2 {
    font-size: 25px;
  }

  .auth-tabs {
    margin: 24px 0;
  }

  .auth-legal {
    margin-top: 28px;
  }

  .main-area {
    padding: 0 15px;
  }

  .topbar {
    min-height: 70px;
    gap: 8px;
  }

  .topbar-left {
    gap: 9px;
  }

  .topbar-right {
    gap: 7px;
  }

  .page-heading h1 {
    font-size: 16px;
  }

  .page-date {
    font-size: 9px;
  }

  .topbar-user-name,
  .topbar-user > svg,
  .topbar-divider {
    display: none;
  }

  .topbar-user {
    padding: 0;
  }

  .icon-button {
    width: 35px;
    height: 35px;
  }

  .content-area {
    min-height: calc(100vh - 130px);
    padding-top: 20px;
  }

  .welcome-banner {
    min-height: 0;
    padding: 23px;
    border-radius: 19px;
  }

  .welcome-content h2 {
    font-size: 23px;
  }

  .welcome-content p {
    font-size: 11px;
  }

  .welcome-visual {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-label {
    font-size: 10px;
  }

  .card {
    padding: 17px;
    border-radius: 16px;
  }

  .section-heading h2 {
    font-size: 18px;
  }

  .section-heading p {
    font-size: 10px;
  }

  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .store-preview {
    min-height: 100px;
  }

  .store-content {
    padding: 11px;
  }

  .store-content h3 {
    font-size: 11px;
  }

  .badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-cover {
    min-height: 125px;
  }

  .profile-main-card {
    padding: 0 17px 19px;
  }

  .profile-name {
    font-size: 20px;
  }

  .profile-avatar-wrap .avatar {
    width: 83px;
    height: 83px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .full-width {
    grid-column: auto;
  }

  .settings-panel {
    padding: 16px;
  }

  .settings-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-nav button {
    justify-content: flex-start;
  }

  .calendar-grid {
    gap: 4px;
  }

  .calendar-day {
    min-height: 52px;
    border-radius: 8px;
    font-size: 10px;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 17px;
    padding-right: 17px;
  }

  .app-footer {
    font-size: 9px;
  }
}

/* ---------- VERY SMALL SCREENS ---------- */

@media (max-width: 370px) {
  .main-area {
    padding: 0 11px;
  }

  .stats-grid {
    gap: 8px;
  }

  .stat-card {
    padding: 11px;
  }

  .stat-value {
    font-size: 19px;
  }

  .welcome-banner {
    padding: 18px;
  }

  .welcome-content h2 {
    font-size: 20px;
  }

  .topbar-right {
    gap: 5px;
  }
}