/* ═══════════════════════════════════════════════════════════════
   PulseCoach — Vercel-minimal light UI (biel / czerń / czerwień)
   Tokens → layout → login → app chrome → widgets → plan → kanban
   → social → ustawienia → modale → responsive
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* powierzchnie */
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-2: #F5F5F5;
  --surface-3: #ECECEC;
  --line: #EAEAEA;
  --line-strong: #D9D9D9;

  /* tekst */
  --text: #171717;
  --text-2: #555555;
  --muted: #8F8F8F;

  /* brand: czerwień jako akcent, czerń jako akcja */
  --red: #D93036;
  --red-strong: #C21F25;
  --red-soft: rgba(217, 48, 54, 0.07);
  --black: #171717;
  --black-hover: #000000;

  /* serie wykresów (walidowane: OKLCH 0.43–0.77, CVD-safe na #FFFFFF) */
  --ch-green: #5B8237;
  --ch-blue: #3E79B8;
  --ch-coral: #C94F44;
  --ch-teal: #0E8F79;
  --ch-violet: #6E51C8;
  --ch-amber: #A8761F;
  --ch-deep: #3D5FC4;

  /* statusy */
  --good: #2F9E44;
  --warn: #B07818;
  --bad: #D93036;

  --font-display: "Geist", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Geist", "Avenir Next", "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "SF Mono", ui-monospace, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, .num { font-family: var(--font-display); }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; }
button svg, .nav-item svg, li svg { width: 20px; height: 20px; }

.hidden { display: none !important; }

::selection { background: var(--red-soft); color: var(--red-strong); }

:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #D4D4D4; border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #BDBDBD; }
::-webkit-scrollbar-track { background: transparent; }

/* ═══════════════════════ LOGIN ═══════════════════════ */

.login {
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(400px, 1fr);
  min-height: 100vh;
  background: var(--surface);
}

.login-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 48px clamp(32px, 6vw, 96px);
  background:
    radial-gradient(900px 600px at -10% -20%, rgba(217, 48, 54, 0.05), transparent 60%),
    linear-gradient(160deg, #FAFAFA 0%, #FFFFFF 65%);
  border-right: 1px solid var(--line);
}
.login-brand::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg,
    rgba(23, 23, 23, 0.025) 0 1px, transparent 1px 90px);
  pointer-events: none;
}

.login-brand-inner { position: relative; max-width: 560px; }

.brand-mark { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 28px; height: 28px; color: var(--red); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
}
.brand-name em { font-style: normal; color: var(--red); }

.login-headline {
  margin-top: clamp(36px, 7vh, 72px);
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.login-sub {
  margin-top: 20px;
  font-size: 16.5px;
  color: var(--text-2);
  max-width: 46ch;
}

.login-feats { list-style: none; margin-top: clamp(28px, 5vh, 52px); display: grid; gap: 20px; }
.login-feats li { display: flex; gap: 15px; align-items: flex-start; }
.login-feats svg { width: 21px; height: 21px; color: var(--red); flex-shrink: 0; margin-top: 3px; }
.login-feats strong { display: block; font-size: 14.5px; font-weight: 600; }
.login-feats span { display: block; color: var(--muted); font-size: 13px; max-width: 52ch; margin-top: 2px; }

.login-foot { margin-top: clamp(30px, 6vh, 60px); font-size: 11.5px; color: var(--muted); line-height: 1.6; }

.login-panel {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 48px 32px;
  background: var(--surface);
  position: relative;
}
.lang-corner { position: absolute; top: 20px; right: 22px; }

.login-card {
  width: 100%; max-width: 384px;
  animation: rise .45s cubic-bezier(.2, .7, .2, 1) both;
}
.login-card h2 { font-size: 24px; letter-spacing: -0.02em; }
.login-card-sub { color: var(--text-2); font-size: 13.5px; margin: 8px 0 24px; }

/* ── pola formularzy ─────────────────────────────────── */
.field { display: block; margin-bottom: 14px; }
.field span {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--text-2); margin-bottom: 6px;
}
.field input, .field select, .goal-form input, .goal-form select {
  width: 100%; padding: 10px 13px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text); font-family: inherit; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
}
.field select, .goal-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.field input::placeholder { color: #B3B3B3; }
.field input:focus, .field select:focus, .goal-form input:focus, .goal-form select:focus {
  outline: none; border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.08);
}
.field input[type="date"], .field input[type="time"] { color-scheme: light; }

/* ── przyciski ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 18px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-primary { background: var(--black); color: #fff; }
.btn-primary:hover { background: var(--black-hover); box-shadow: var(--shadow-1); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text-2); }
.btn-ghost:hover { border-color: #ABABAB; color: var(--text); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 7px; }
.btn-sm svg { width: 14px; height: 14px; }

.btn-spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin .7s linear infinite;
  display: none;
}
.btn.loading .btn-spinner { display: block; }
.btn.loading .btn-label { opacity: .75; }

.demo-hint {
  font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  background: var(--surface-2); color: var(--muted);
  padding: 3px 8px; border-radius: 99px;
}

.login-secure {
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 13px; font-size: 12px; color: var(--muted); line-height: 1.5;
}
.login-secure svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }

.login-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 20px 0; color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: .1em;
}
.login-divider::before, .login-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.form-error {
  background: var(--red-soft);
  border: 1px solid rgba(217, 48, 54, .3);
  color: var(--red-strong);
  font-size: 13px;
  padding: 10px 13px; border-radius: var(--r-sm); margin-bottom: 14px;
}

/* ═══════════════════════ APP CHROME ═══════════════════════ */

.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 24px 14px 16px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.side-brand { padding: 0 10px 24px; }

.nav { display: grid; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  transition: background .13s, color .13s;
  text-align: left; position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.nav-item.active::before {
  content: ""; position: absolute; left: -14px; top: 22%; bottom: 22%;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--red);
}
.nav-item.active svg { color: var(--red); }
.nav-item svg { width: 18px; height: 18px; }
.nav-badge {
  margin-left: auto; font-size: 10.5px; font-weight: 600;
  background: var(--surface-3); color: var(--text-2);
  border-radius: 99px; padding: 1px 7px;
}
.nav-badge:empty { display: none; }

.sidebar-foot {
  margin-top: auto; display: flex; align-items: center; gap: 4px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--black); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 12px;
  flex-shrink: 0;
}
.user-meta { min-width: 0; }
.user-meta strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--muted);
  transition: background .13s, color .13s;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }

.main { padding: 0 clamp(20px, 3.5vw, 44px) 56px; min-width: 0; }

.topbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 26px 0 20px;
}
.topbar h1 { font-size: 24px; letter-spacing: -0.025em; }
.topbar-date { color: var(--muted); font-size: 13px; margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.sync-note { font-size: 12px; color: var(--muted); }
.demo-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .09em;
  background: var(--red-soft); color: var(--red-strong);
  padding: 4px 10px; border-radius: 99px;
}

/* przełącznik języka */
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 7px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .04em;
}
.lang-btn:hover { border-color: #ABABAB; color: var(--text); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-2);
  padding: 4px; min-width: 150px;
}
.lang-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border-radius: 7px; font-size: 13px; text-align: left;
}
.lang-item:hover { background: var(--surface-2); }
.lang-item.active { font-weight: 600; }
.lang-item.active::after { content: "✓"; margin-left: auto; color: var(--red); }

.loader {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 120px 0; color: var(--text-2);
}
.loader-ring {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--surface-3); border-top-color: var(--red);
  animation: spin .8s linear infinite;
}
.loader #loader-hint, .loader span { font-size: 12.5px; color: var(--muted); }

/* ═══════════════════════ WIDGETS ═══════════════════════ */

.view { animation: rise .4s cubic-bezier(.2, .7, .2, 1) both; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-1);
}
.panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 15px;
}
.panel-title svg { width: 15px; height: 15px; }
.panel-title .spacer { flex: 1; }
.panel-title .note { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }

/* — hero — */
.hero {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.ready-card { display: flex; align-items: center; gap: 22px; }

.ring-wrap { position: relative; width: 128px; height: 128px; flex-shrink: 0; }
.ring-wrap svg.ring { width: 128px; height: 128px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.ring-val {
  fill: none; stroke-width: 9; stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(.3, .7, .2, 1);
}
.ring-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-center .num { font-size: 34px; font-weight: 700; line-height: 1; }
.ring-center small { display: block; font-size: 10px; color: var(--muted); letter-spacing: .07em; text-transform: uppercase; margin-top: 4px; }

.ready-meta h2 { font-size: 18px; letter-spacing: -0.015em; margin-bottom: 8px; }
.ready-parts { display: grid; gap: 5px; font-size: 12px; color: var(--text-2); }
.ready-parts .row { display: flex; align-items: center; gap: 8px; }
.ready-parts .bar { flex: 1; max-width: 110px; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.ready-parts .bar i { display: block; height: 100%; border-radius: 2px; background: var(--text-2); }
.ready-parts .lbl { width: 82px; color: var(--muted); }
.ready-parts .num { width: 26px; text-align: right; font-size: 12px; }

.coach-card { position: relative; display: flex; flex-direction: column; justify-content: center; }
.coach-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--red-strong); margin-bottom: 9px;
}
.coach-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.coach-card h2 { font-size: clamp(19px, 1.8vw, 23px); letter-spacing: -0.02em; margin-bottom: 7px; }
.coach-card p { color: var(--text-2); max-width: 70ch; font-size: 14px; }
.coach-tips { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 7px; }
.coach-tip {
  font-size: 12px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 99px;
}

.src-chip {
  font-size: 10px; font-weight: 600; letter-spacing: .04em;
  background: var(--surface-2); color: var(--muted);
  padding: 2px 8px; border-radius: 99px; margin-left: 8px; text-transform: none;
}
.coach-eyebrow svg { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; }
.briefing-workout {
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 10px; padding: 10px 13px;
  background: var(--red-soft); border-radius: var(--r-sm);
  color: var(--text) !important; font-weight: 500; font-size: 13.5px;
}
.briefing-workout svg { width: 15px; height: 15px; color: var(--red); flex-shrink: 0; margin-top: 2px; }
.briefing-caution {
  margin-top: 10px; font-size: 12.5px; color: var(--warn);
  border-left: 2px solid var(--warn); padding-left: 10px;
}
.briefing-refresh { position: absolute; top: 12px; right: 12px; opacity: .45; }
.briefing-refresh:hover { opacity: 1; }
.briefing-loading { opacity: .6; }
.briefing-loading::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(23, 23, 23, .03) 50%, transparent 70%);
  animation: shimmer 1.2s infinite; border-radius: var(--r-lg);
}
@keyframes shimmer { from { transform: translateX(-60%); } to { transform: translateX(60%); } }

/* — kafle — */
.tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 1240px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, 1fr); } }

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px 13px;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: var(--shadow-1);
}
.tile:hover { border-color: var(--line-strong); }
.tile-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500; letter-spacing: .03em; text-transform: uppercase;
  color: var(--muted);
}
.tile-label svg { width: 14px; height: 14px; }
.tile-value { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin-top: 7px; letter-spacing: -0.02em; }
.tile-value small { font-size: 12.5px; font-weight: 500; color: var(--text-2); margin-left: 3px; letter-spacing: 0; }
.tile-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.tile-sub .up { color: var(--good); }
.tile-sub .down { color: var(--bad); }
.tile-bar { height: 4px; border-radius: 2px; background: var(--surface-3); margin-top: 9px; overflow: hidden; }
.tile-bar i { display: block; height: 100%; border-radius: 2px; background: var(--red); transition: width .8s cubic-bezier(.3, .7, .2, 1); }

/* — siatka dashboardu — */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: start;
}
.dash-col { display: grid; gap: 16px; min-width: 0; }

.chart-box { position: relative; width: 100%; }
.chart-box canvas { width: 100% !important; }

.legend { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.line { height: 3px; border-radius: 2px; width: 14px; }

.metric-row { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 4px; }
.metric { min-width: 72px; }
.metric b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.metric span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.acwr-pill {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 99px; padding: 4px 12px;
  font-size: 12px; font-weight: 600;
}
.acwr-pill i { width: 7px; height: 7px; border-radius: 50%; }
.acwr-optimal { background: rgba(47, 158, 68, .09); color: #237633; }
.acwr-optimal i { background: var(--good); }
.acwr-low { background: rgba(62, 121, 184, .1); color: #2D5F94; }
.acwr-low i { background: var(--ch-blue); }
.acwr-high { background: rgba(176, 120, 24, .1); color: #8A5E13; }
.acwr-high i { background: var(--warn); }
.acwr-danger { background: var(--red-soft); color: var(--red-strong); }
.acwr-danger i { background: var(--bad); }

/* — listy aktywności — */
.act-list { display: grid; }
.act-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 13px; align-items: center;
  padding: 12px 8px;
  border-top: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .12s;
  text-align: left; width: 100%;
}
.act-row:first-child { border-top: 0; }
.act-row:hover { background: var(--surface-2); }
.act-ico {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
}
.act-ico svg { width: 19px; height: 19px; }
.act-ico.running { background: #EDF3E4; color: #4A6B2B; }
.act-ico.cycling { background: #E7EFF7; color: #2D5F94; }
.act-ico.strength { background: #EDE9F8; color: #55409E; }
.act-ico.swimming { background: #E2F1EE; color: #0B6E5D; }
.act-ico.walking { background: #F5EDDD; color: #82590F; }
.act-ico.other, .act-ico.yoga { background: var(--surface-2); color: var(--text-2); }
.act-main { min-width: 0; }
.act-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-name .src-ico { width: 12px; height: 12px; display: inline-block; vertical-align: -1px; }
.act-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.act-stats { display: flex; gap: 17px; align-items: baseline; }
.act-stat { text-align: right; }
.act-stat b { display: block; font-family: var(--font-display); font-size: 14.5px; font-weight: 600; }
.act-stat span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  padding: 6px 14px; border-radius: 99px;
  border: 1px solid var(--line-strong);
  font-size: 13px; font-weight: 500; color: var(--text-2);
  transition: all .13s; background: var(--surface);
}
.chip:hover { color: var(--text); border-color: #ABABAB; }
.chip.active { background: var(--black); color: #fff; border-color: var(--black); font-weight: 500; }

/* — sen — */
.sleep-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 15px; }
.sleep-score {
  width: 74px; height: 74px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
}
.sleep-meta b { font-family: var(--font-display); font-size: 21px; font-weight: 700; }
.sleep-meta div { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stage-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; margin: 13px 0 10px; }
.stage-bar i { display: block; height: 100%; }
.stage-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 12px; color: var(--text-2); }
.stage-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stage-legend i { width: 9px; height: 9px; border-radius: 3px; }

.empty {
  padding: 24px 10px; text-align: center; color: var(--muted); font-size: 13px;
}
.empty svg { width: 24px; height: 24px; margin: 0 auto 8px; opacity: .45; }

/* ═══════════════════════ PLAN ═══════════════════════ */

.goal-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 13px 18px; margin-bottom: 14px;
}
.goal-bar .spacer { flex: 1; }
.goal-summary { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.goal-summary svg { width: 16px; height: 16px; color: var(--red); }
.goal-days { color: var(--muted); font-size: 12px; }
.goal-empty { color: var(--muted); font-size: 13px; }
.phase-chip {
  font-size: 11px; font-weight: 600; letter-spacing: .03em;
  background: rgba(62, 121, 184, .1); color: #2D5F94;
  padding: 4px 11px; border-radius: 99px;
}
.plan-disclaimer { margin-top: 13px; font-size: 11px; color: var(--muted); }

.plan-intro {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 16px; margin-bottom: 18px; align-items: stretch;
}
.plan-rationale h2 { font-size: 19px; margin-bottom: 9px; letter-spacing: -0.015em; }
.plan-rationale p { color: var(--text-2); max-width: 78ch; font-size: 14px; }
.plan-totals { display: flex; gap: 24px; margin-top: 16px; flex-wrap: wrap; }

.plan-week {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
  gap: 12px;
}
@media (min-width: 1560px) { .plan-week { grid-template-columns: repeat(7, 1fr); } }

.day-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 14px 13px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 205px;
  position: relative;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  animation: rise .45s cubic-bezier(.2, .7, .2, 1) both;
  box-shadow: var(--shadow-1);
}
.day-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.day-card.hard { border-top: 3px solid var(--red); }
.day-card.moderate { border-top: 3px solid var(--ch-blue); }
.day-card.easy { border-top: 3px solid var(--ch-teal); }
.day-card.rest { border-top: 3px solid var(--line-strong); }
.day-head { display: flex; justify-content: space-between; align-items: baseline; }
.day-dow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.day-date { font-size: 11px; color: var(--muted); }
.day-icon {
  width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-2);
}
.day-card.hard .day-icon { background: var(--red-soft); color: var(--red-strong); }
.day-card.moderate .day-icon { background: rgba(62, 121, 184, .1); color: #2D5F94; }
.day-card.easy .day-icon { background: rgba(14, 143, 121, .09); color: #0B6E5D; }
.day-icon svg { width: 17px; height: 17px; }
.day-title { font-weight: 600; font-size: 14px; line-height: 1.25; }
.day-specs { display: flex; gap: 6px; flex-wrap: wrap; }
.spec {
  font-size: 11px; font-weight: 500; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 7px;
  font-variant-numeric: tabular-nums;
}
.spec-lock { display: inline-flex; align-items: center; gap: 4px; color: var(--red-strong); border-color: rgba(217, 48, 54, .2); background: var(--red-soft); }
.spec-lock svg { width: 11px; height: 11px; }
.spec-time { color: var(--text); font-weight: 600; }
.day-desc { font-size: 12px; color: var(--muted); line-height: 1.45; flex: 1; }
.day-why {
  font-size: 11.5px; line-height: 1.45; color: var(--text-2);
  border-top: 1px dashed var(--line-strong);
  padding-top: 8px;
}
.day-why b { color: var(--red-strong); font-weight: 600; }
.day-extra { font-size: 11.5px; color: var(--text-2); border-top: 1px solid var(--line); padding-top: 7px; }
.day-extra b { font-weight: 600; }

.races { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.race {
  text-align: center; padding: 15px 8px 13px;
  background: var(--surface-2); border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.race b { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.race span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* status realizacji na karcie dnia */
.day-status {
  position: absolute; top: -9px; right: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-size: 12px; font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}

/* kropki dni + słupki zgodności w przeglądzie */
.rev-dots { display: flex; gap: 8px; justify-content: space-between; margin-bottom: 4px; }
.rev-dot { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.rev-dot i { width: 14px; height: 14px; border-radius: 50%; display: block; }
.rev-dot em { font-style: normal; font-size: 9.5px; color: var(--muted); }
.rev-hist { display: flex; gap: 12px; align-items: flex-end; }
.rev-hist-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.rev-hist-bar {
  width: 100%; max-width: 44px; height: 52px; border-radius: 6px;
  background: var(--surface-2); position: relative; overflow: hidden;
}
.rev-hist-bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px 6px 0 0; }
.rev-hist-col span { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* analiza aktywności */
.ins-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.ins-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ins-row span { color: var(--muted); }
.ins-row b { font-weight: 600; text-align: right; }

/* trasa */
.route-wrap {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 8px;
}
.route-svg { width: 100%; height: auto; display: block; }
.route-map {
  height: 320px; border-radius: var(--r-md);
  border: 1px solid var(--line); overflow: hidden;
  background: var(--surface-2);
}
.route-map .leaflet-control-attribution { font-size: 9px; opacity: .8; }

/* podsumowanie tygodnia (plan vs realizacja) */
.review-grid { display: grid; gap: 10px; }
.review-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; font-size: 12.5px; }
.review-row .lbl { color: var(--muted); }
.review-row .bar { position: relative; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.review-row .bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--ch-blue); }
.review-row .bar em { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--black); }
.review-row .val { font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.review-verdict {
  margin-top: 12px; padding: 10px 13px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500;
}
.review-verdict.ok { background: rgba(47, 158, 68, .08); color: #1F6E30; }
.review-verdict.under { background: rgba(62, 121, 184, .08); color: #2D5F94; }
.review-verdict.over { background: var(--red-soft); color: var(--red-strong); }

/* ═══════════════════════ MÓJ TYDZIEŃ — KANBAN ═══════════════════════ */

.week-intro { margin-bottom: 16px; }

.kanban {
  display: grid;
  grid-template-columns: repeat(7, minmax(168px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  align-items: start;
}
.kb-col {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px;
  min-height: 210px;
  display: flex; flex-direction: column; gap: 8px;
  transition: background .15s, border-color .15s;
}
.kb-col.drag-over { background: #EFF6FF; border-color: var(--ch-blue); }
.kb-col.is-rest, .kb-col.is-busy { background: repeating-linear-gradient(135deg, var(--surface-2) 0 12px, #F0F0F0 12px 24px); }
.kb-col-head { display: flex; align-items: center; gap: 6px; }
.kb-col-head b { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); flex: 1; }
.kb-flag {
  font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 99px;
  color: var(--muted); border: 1px solid var(--line-strong); background: var(--surface);
}
.kb-flag.active-rest { background: var(--black); color: #fff; border-color: var(--black); }
.kb-flag.active-busy { background: var(--red); color: #fff; border-color: var(--red); }
.kb-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  cursor: grab;
  box-shadow: var(--shadow-1);
  transition: box-shadow .15s, transform .12s, opacity .15s;
  position: relative;
}
.kb-card:hover { box-shadow: var(--shadow-2); }
.kb-card.dragging { opacity: .45; transform: rotate(2deg); }
.kb-card-top { display: flex; align-items: center; gap: 7px; }
.kb-card-top svg { width: 14px; height: 14px; color: var(--text-2); flex-shrink: 0; }
.kb-card-top b { font-size: 12.5px; font-weight: 600; line-height: 1.3; flex: 1; }
.kb-card-meta { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.kb-card-meta span { font-size: 10.5px; color: var(--muted); background: var(--surface-2); border-radius: 5px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
.kb-actions {
  position: absolute; top: 4px; right: 4px; display: flex; gap: 2px;
  opacity: 0; transition: opacity .12s;
}
.kb-card:hover .kb-actions { opacity: 1; }
.kb-act {
  width: 20px; height: 20px; display: grid; place-items: center;
  border-radius: 5px; color: var(--muted); background: var(--surface);
}
.kb-act svg { width: 12px; height: 12px; }
.kb-dup:hover { background: var(--surface-2); color: var(--text); }
.kb-del:hover { background: var(--red-soft); color: var(--red); }
.kb-add {
  border: 1px dashed var(--line-strong); border-radius: 10px;
  padding: 7px; font-size: 12px; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: border-color .13s, color .13s, background .13s;
  margin-top: auto;
}
.kb-add:hover { border-color: var(--black); color: var(--text); background: var(--surface); }
.kb-hint { font-size: 11px; color: var(--muted); text-align: center; padding: 8px 4px; }

/* popover dodawania kafelka */
.kb-form { display: grid; gap: 10px; }
.kb-form .week-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.type-opt {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 10px 4px; font-size: 10.5px; color: var(--text-2);
  transition: all .12s; text-align: center;
}
.type-opt svg { width: 17px; height: 17px; }
.type-opt:hover { border-color: #ABABAB; }
.type-opt.active { border-color: var(--black); background: var(--surface-2); color: var(--text); font-weight: 600; }

/* ═══════════════════════ SPOŁECZNOŚĆ ═══════════════════════ */

.lb { display: grid; gap: 3px; }
.lb-row {
  display: grid; grid-template-columns: 30px minmax(0,1fr) 74px 56px 84px minmax(60px, 130px);
  gap: 10px; align-items: center;
  padding: 9px 11px; border-radius: var(--r-sm); font-size: 13px;
}
.lb-row.me { background: var(--red-soft); }
.lb-row.me .lb-name { color: var(--red-strong); font-weight: 700; }
.lb-rank {
  font-family: var(--font-display); font-weight: 700; text-align: center;
  width: 25px; height: 25px; line-height: 25px; border-radius: 50%;
  background: var(--surface-3); font-size: 12px;
}
.lb-rank.gold { background: #F6E7C6; color: #8A6410; }
.lb-rank.silver { background: #E8E8E8; color: #555; }
.lb-rank.bronze { background: #F0DDCB; color: #8A5A2B; }
.lb-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-name em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 11px; }
.lb-stat { text-align: right; color: var(--text-2); font-size: 12px; }
.lb-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.lb-bar i { display: block; height: 100%; background: var(--ch-blue); border-radius: 3px; }
.lb-foot { margin-top: 11px; font-size: 11px; color: var(--muted); }

.ach-grid { display: grid; gap: 9px; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); }
.ach {
  display: flex; gap: 11px; align-items: center;
  padding: 11px 13px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  position: relative; overflow: hidden;
}
.ach-ico {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; background: var(--surface-2); color: var(--muted);
}
.ach-ico svg { width: 17px; height: 17px; }
.ach.earned.tier-gold .ach-ico { background: #F6E7C6; color: #8A6410; }
.ach.earned.tier-silver .ach-ico { background: #E8E8E8; color: #444; }
.ach.earned.tier-bronze .ach-ico { background: #F0DDCB; color: #8A5A2B; }
.ach.locked { opacity: .5; }
.ach.locked .ach-ico { background: var(--surface-2); }
.ach-meta { min-width: 0; }
.ach-meta b { display: block; font-size: 12.5px; }
.ach-meta span { display: block; font-size: 10.5px; color: var(--muted); line-height: 1.35; }
.ach-tier {
  position: absolute; top: 7px; right: 10px;
  font-size: 8.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted);
}

.friend-row { display: flex; align-items: center; gap: 11px; padding: 8px 4px; border-top: 1px solid var(--line); }
.friend-row:first-of-type { border-top: 0; }
.friend-name { flex: 1; font-weight: 600; font-size: 13.5px; }
.friend-del { opacity: .35; }
.friend-del:hover { opacity: 1; color: var(--bad); }

.invite-code {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 12px; padding: 13px;
  background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--r-md);
}
.invite-code code {
  font-family: var(--font-mono); font-size: 24px; font-weight: 600;
  letter-spacing: .28em; color: var(--red-strong);
}
.invite-in {
  flex: 1; padding: 10px 13px; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  color: var(--text); font-family: var(--font-mono); font-size: 14px; letter-spacing: .18em;
}
.invite-in:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px rgba(23,23,23,.08); }

/* ═══════════════════════ USTAWIENIA / AUTH ═══════════════════════ */

.token-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 7px 7px 7px 13px; margin-bottom: 6px;
}
.token-row code {
  flex: 1; font-size: 11.5px; font-family: var(--font-mono); color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.set-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; line-height: 1.5; }
.set-hint a { color: var(--red-strong); }
.pro-card {
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
  background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 13px 15px; margin-bottom: 6px;
}
.pro-card b { font-family: var(--font-display); font-size: 15px; }
.pro-card span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; max-width: 42ch; }
.btn.danger { border-color: rgba(217, 48, 54, .35); color: var(--red-strong); background: var(--surface); }
.btn.danger:hover { border-color: var(--red); background: var(--red-soft); }
.btn.danger svg { width: 14px; height: 14px; }

.legal-links { display: block; margin-top: 6px; }
.legal-links a { color: var(--muted); text-decoration: underline; }
.legal-links a:hover { color: var(--text-2); }

/* auth: taby + social + connect */
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 9px; padding: 3px; gap: 2px; margin-bottom: 20px;
}
.auth-tab {
  padding: 8px; font-size: 13px; font-weight: 500; color: var(--muted);
  border-radius: 7px; transition: all .12s;
}
.auth-tab.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-1); }
.social-row { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 4px; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; background: var(--surface);
  transition: border-color .13s, background .13s;
}
.social-btn:hover { border-color: #ABABAB; }
.social-btn[disabled], .social-btn[data-off] { opacity: .45; cursor: not-allowed; }
.social-btn svg { width: 16px; height: 16px; }

.connect-card {
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 16px; display: flex; align-items: center; gap: 13px; margin-bottom: 10px;
  background: var(--surface);
}
.connect-ico {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--surface-2); color: var(--text-2);
}
.connect-ico svg { width: 20px; height: 20px; }
.connect-meta { flex: 1; min-width: 0; }
.connect-meta b { display: block; font-size: 14px; }
.connect-meta span { display: block; font-size: 12px; color: var(--muted); }
.connect-state { font-size: 12px; font-weight: 600; }
.connect-state.on { color: var(--good); }
.connect-state.off { color: var(--muted); }

/* ═══════════════════════ ADMIN ═══════════════════════ */

.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600; padding: 7px 8px;
  border-bottom: 1px solid var(--line-strong);
}
.adm-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-table select {
  padding: 5px 24px 5px 9px; font-size: 12.5px; border: 1px solid var(--line-strong);
  border-radius: 7px; background-position: right 7px center;
}
.adm-links { white-space: nowrap; }
.adm-links span { display: inline-block; margin-right: 6px; }
.adm-links svg { width: 15px; height: 15px; }
.adm-del { opacity: .4; }
.adm-del:hover { opacity: 1; color: var(--bad); }

/* ═══════════════════════ MODAL / TOAST ═══════════════════════ */

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(23, 23, 23, .4); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; width: min(660px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-2);
  animation: rise .28s cubic-bezier(.2, .7, .2, 1) both;
}
.modal-close { position: absolute; top: 14px; right: 14px; }
.modal-head { display: flex; gap: 15px; align-items: center; margin-bottom: 4px; padding-right: 40px; }
.modal-head h2 { font-size: 20px; letter-spacing: -0.015em; }
.modal-date { color: var(--muted); font-size: 13px; margin-bottom: 17px; }
.modal-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 9px; margin-bottom: 20px;
}
.mstat { background: var(--surface-2); border-radius: var(--r-sm); padding: 11px 12px; }
.mstat b { display: block; font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.mstat span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.zone-rows { display: grid; gap: 6px; margin-bottom: 6px; }
.zone-row { display: grid; grid-template-columns: 34px 1fr 74px; gap: 12px; align-items: center; font-size: 12.5px; }
.zone-row .zl { color: var(--muted); font-weight: 600; }
.zone-row .zb { height: 13px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.zone-row .zb i { display: block; height: 100%; border-radius: 4px; }
.zone-row .zt { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }

.splits-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.splits-table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600; padding: 7px 8px;
  border-bottom: 1px solid var(--line-strong);
}
.splits-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.splits-table td:last-child, .splits-table th:last-child { text-align: right; }
.split-bar { display: inline-block; height: 8px; border-radius: 4px; background: var(--ch-blue); vertical-align: middle; }

.section-title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); margin: 20px 0 11px;
}
.howto { margin: 4px 0 0 18px; font-size: 13px; color: var(--text-2); display: grid; gap: 8px; }
.howto a { color: var(--red-strong); }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--black); border: 1px solid var(--black);
  color: #fff; font-size: 13.5px;
  padding: 11px 19px; border-radius: var(--r-md);
  box-shadow: var(--shadow-2); z-index: 90;
  animation: rise .3s both;
}
.toast.error { background: var(--red-strong); border-color: var(--red-strong); }

/* ═══════════════════════ ANIM / RESPONSIVE ═══════════════════════ */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.stagger > * { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
.stagger > *:nth-child(2) { animation-delay: .04s; }
.stagger > *:nth-child(3) { animation-delay: .08s; }
.stagger > *:nth-child(4) { animation-delay: .12s; }
.stagger > *:nth-child(5) { animation-delay: .16s; }
.stagger > *:nth-child(6) { animation-delay: .2s; }
.stagger > *:nth-child(7) { animation-delay: .24s; }

@media (max-width: 1140px) {
  .dash-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .plan-intro { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { min-height: 34vh; padding: 40px 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-headline { margin-top: 24px; }
  .login-feats { display: none; }
}

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; z-index: 50;
    flex-direction: row; align-items: center;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); border-right: 0;
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px);
  }
  .side-brand, .sidebar-foot { display: none; }
  .nav { display: flex; flex: 1; justify-content: space-around; gap: 0; min-width: 0; }
  .nav-item { flex-direction: column; gap: 3px; font-size: 9.5px; padding: 6px 3px; min-width: 0; flex: 1; }
  .nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .nav-item.active::before { display: none; }
  .nav-badge { display: none; }
  .main { padding-bottom: 104px; }
  .topbar { padding-top: 18px; }
  .topbar h1 { font-size: 21px; }
  .sync-note { display: none; }
  .act-stats .act-stat:nth-child(3) { display: none; }
  .lb-row { grid-template-columns: 26px minmax(0,1fr) 70px 50px; }
  .lb-stat.hide-m, .lb-bar { display: none; }
  .goal-bar { padding: 12px 14px; }
  .kanban { grid-template-columns: repeat(7, minmax(180px, 1fr)); }
}
