:root {
  --bg: #070c12;
  --card: rgba(255,255,255,0.05);
  --card-solid: #0f1a26;
  --border: rgba(255,255,255,0.08);
  --text: #eef2f7;
  --muted: #6b849e;
  --accent: #4ade80;
  --accent-dim: rgba(74, 222, 128, 0.10);
  --accent-blue: #60a5fa;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --nav-h: 64px;
  --touch-min: 48px;
  --radius: 16px;
  --font: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --glow-green: rgba(74, 222, 128, 0.18);
  --glow-blue: rgba(96, 165, 250, 0.12);
}

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

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

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

/* ——— Animated background ——— */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 45% at 15% 0%, var(--glow-green), transparent 60%),
    radial-gradient(ellipse 55% 40% at 85% 100%, var(--glow-blue), transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(74,222,128,0.04), transparent);
  pointer-events: none;
}

/* subtle moving orbs */
body::after {
  content: '';
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  top: -120px;
  right: -80px;
  z-index: -1;
  background: radial-gradient(circle, rgba(96,165,250,0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* grid dots overlay */
.app-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
}

/* ——— Shell: sidebar + body ——— */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ——— Sidebar ——— */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 220px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: rgba(7,12,18,0.85);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-right: 1px solid var(--border);
  padding: 0 0 16px;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar { display: none; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #eef2f7 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ——— Sidebar nav ——— */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 12px 10px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 10px 14px 4px;
  opacity: 0.55;
}

/* top-level nav items (Сегодня, Отчёт) */
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  transition: background 0.14s, color 0.14s;
  white-space: nowrap;
  width: 100%;
}

.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); }
.nav-item.active .nav-svg { filter: drop-shadow(0 0 5px rgba(74,222,128,0.45)); }

/* ——— Accordion groups ——— */
.nav-group {
  margin-top: 6px;
}

.nav-group summary { list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }

.nav-group-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px 9px 14px;
  cursor: pointer;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  user-select: none;
  transition: background 0.14s;
  -webkit-user-select: none;
}

.nav-group-header:hover { background: rgba(255,255,255,0.05); }

.nav-group[open] > .nav-group-header {
  color: var(--accent);
}

.nav-group-header span { flex: 1; }

.chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s;
}

.nav-group[open] > summary .chevron { transform: rotate(180deg); }

.nav-children {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 0 6px 14px;
  margin-left: 14px;
  border-left: 1px solid var(--border);
}

.nav-child {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 400;
  text-align: left;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
  width: 100%;
}

.nav-child:hover { background: rgba(255,255,255,0.05); color: var(--text); }

.nav-child.active-child {
  color: var(--accent);
  background: var(--accent-dim);
  font-weight: 500;
}

.child-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  transition: background 0.12s;
}

.nav-child.active-child .child-dot { background: var(--accent); }

.child-dot-portal {
  background: var(--accent-blue);
  opacity: 0.7;
}

.nav-child.active-child .child-dot-portal { opacity: 1; }

.nav-svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* ——— Anchor targets ——— */
.section-anchor {
  scroll-margin-top: 24px;
}

/* ——— Sidebar bottom: hero + date ——— */
.sidebar-meta {
  padding: 14px 16px 4px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-hero .hero-label {
  font-size: 0.65rem;
  margin-bottom: 2px;
}

.sidebar-hero .hero-title {
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.35;
}

.sidebar-hero .hero-next {
  font-size: 0.75rem;
  margin-top: 4px;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
}
.btn-logout:hover { background: rgba(248,113,113,0.1); color: var(--bad); border-color: rgba(248,113,113,0.3); }
.btn-logout svg { width: 15px; height: 15px; flex-shrink: 0; }

.sidebar-updated {
  font-size: 0.68rem;
  margin-top: 8px;
  opacity: 0.7;
}

/* ——— App body ——— */
.app-body {
  margin-left: 220px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-main {
  flex: 1;
  padding: 28px 36px 40px;
  max-width: 1160px;
  width: 100%;
}

/* ——— Legacy header (hidden) ——— */
.app-header { display: none; }
.header-meta { display: none; }

/* bottom-nav removed — using sidebar */

.big-stat {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin-bottom: 8px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(30, 42, 58, 0.8);
  font-size: 0.92rem;
}

.stat-row:last-child {
  border-bottom: none;
}

.card-inner-block {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.card-inner-block:last-child {
  border-bottom: none;
}

.card-inner-block .stat-row {
  padding: 4px 0;
  border-bottom: none;
}

.card-inner-block .bar {
  margin-top: 8px;
}

.meal-list {
  list-style: none;
  margin: 8px 0;
}

.meal-list li {
  padding: 6px 0;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(30, 42, 58, 0.5);
}

.meal-list li:last-child {
  border-bottom: none;
}

.collapsible details summary {
  cursor: pointer;
  font-weight: 600;
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
}

.collapsible details[open] summary {
  margin-bottom: 12px;
  color: var(--accent);
}

.panel.hidden {
  display: none !important;
}

#sphere-b24,
#sphere-health,
#sphere-rest,
#sphere-growth {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ——— Sticky hero ——— */
.hero-sentinel {
  height: 1px;
  margin: 0;
}

.hero-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--hero-bg);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}

.hero-sticky.is-pinned {
  box-shadow: var(--sticky-shadow);
}

.top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 10px;
}

.top-brand h1 {
  font-size: 1.25rem;
  font-weight: 600;
}

.muted {
  color: var(--muted);
  font-size: 0.875rem;
}

.muted.sub {
  font-weight: 400;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  min-height: var(--touch-min);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  white-space: nowrap;
}

.tab.active,
.tab:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

/* ——— Hero «Сейчас» ——— */
.hero-now {
  padding: 14px 16px 18px;
  border-top: 1px solid var(--border);
}

.hero-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 4px;
}

.hero-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hero-next {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ——— Main ——— */
main {
  padding: 12px 16px 32px;
  max-width: 720px;
  margin: 0 auto;
}

.panel {
  display: none;
}

.panel.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 2-column layout inside panels */
.panel-cols {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  align-items: start;
}

.panel-col-main,
.panel-col-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card:hover {
  border-color: rgba(255,255,255,0.13);
  transition: border-color 0.2s;
}

h2 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

h3 {
  font-size: 0.95rem;
  margin: 16px 0 8px;
  color: var(--muted);
}

/* ——— Info cards row ——— */
.cards-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 480px) {
  .cards-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 88px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s;
}

.info-card:hover {
  border-color: rgba(74, 222, 128, 0.25);
  background: rgba(255,255,255,0.07);
}

.info-icon {
  font-size: 1.25rem;
}

.info-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.info-value {
  font-size: 0.85rem;
  line-height: 1.35;
  word-break: break-word;
}

.info-sub {
  font-size: 0.72rem;
  line-height: 1.3;
}

/* ——— Lists & checklist ——— */
.list {
  list-style: none;
}

.list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(36, 48, 65, 0.6);
  font-size: 1rem;
}

.list li:last-child {
  border-bottom: none;
}

.list.tasks li.overdue {
  border-left: 3px solid var(--bad);
  padding-left: 10px;
  margin-left: -4px;
}

.check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  min-height: var(--touch-min);
  padding: 4px 0;
}

.check-row input[type='checkbox'] {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.check-row.done span {
  text-decoration: line-through;
  color: var(--muted);
}

.check-row span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.check-plan,
.check-result {
  display: block;
  font-size: 0.82rem;
  line-height: 1.35;
}

.check-result {
  color: var(--ok);
}

.check-row.done .check-result {
  color: var(--muted);
}

.check-time {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ——— B24 tasks ——— */
.task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-info {
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
}

.btn-open {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch-min);
  min-height: 40px;
  padding: 8px 14px;
  background: var(--accent);
  color: #0a0e13;
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

.btn-open:active {
  opacity: 0.85;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.filter-row h2 {
  margin-bottom: 0;
}

.select {
  min-height: var(--touch-min);
  padding: 8px 12px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.portal-section {
  margin-top: 16px;
}

.portal-section:first-child {
  margin-top: 8px;
}

/* ——— Timeline ——— */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding: 12px;
  border-left: 3px solid var(--border);
  background: rgba(36, 48, 65, 0.25);
  border-radius: 0 10px 10px 0;
}

.timeline-row.is-now {
  border-left-color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
}

.timeline-time {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.875rem;
}

.timeline-title {
  font-size: 0.95rem;
}

.plan-details {
  margin-top: 12px;
}

.plan-details summary {
  cursor: pointer;
  color: var(--muted);
  margin-bottom: 8px;
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
}

.plan-md {
  white-space: pre-wrap;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  max-height: 60vh;
  overflow: auto;
  color: #cbd5e1;
}

/* ——— Goals ——— */
.red-flags {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.red-flag {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
}

.bar-row {
  margin: 10px 0;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.bar {
  height: 10px;
  background: #1e293b;
  border-radius: 5px;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--ok));
  border-radius: 5px;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  margin-left: 6px;
}

/* ——— Help tab ——— */
.help-list {
  padding-left: 1.2rem;
  margin-bottom: 16px;
}

.help-list li {
  margin-bottom: 8px;
  font-size: 1rem;
}

.help-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.help-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(36, 48, 65, 0.6);
  vertical-align: top;
}

.help-table td:first-child {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  width: 38%;
}

/* ——— Desktop ——— */
@media (min-width: 768px) {
  .top {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px 24px 12px;
  }

  .hero-now {
    padding: 14px 24px 18px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

}

/* ——— Login ——— */
.login-body {
  min-height: 100vh;
  background: var(--bg);
}

.login-body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 50% -5%, rgba(74, 222, 128, 0.13), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 110%, rgba(96, 165, 250, 0.10), transparent 60%);
}

.login-body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  gap: 24px;
}

.login-brand {
  text-align: center;
}

.login-logo {
  margin-bottom: 12px;
}

.login-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.accent-dot {
  color: var(--accent);
}

.login-tagline {
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.95rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(74,222,128,0.06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.login-card h2 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.login-form {
  margin-top: 16px;
}

.field-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-card input {
  width: 100%;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  min-height: var(--touch-min);
}

.login-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #0a0e13;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  min-height: var(--touch-min);
  font-family: inherit;
  margin-top: 8px;
}

.btn-primary:active {
  opacity: 0.9;
}

.login-foot {
  font-size: 0.78rem;
  text-align: center;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.err {
  color: var(--bad);
  font-size: 0.85rem;
  min-height: 1.2em;
}

/* ——— Report / KPI ——— */
.report-live {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.report-sphere-card {
  margin-bottom: 12px;
}

.sphere-goal {
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 480px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.kpi-card.status-ok {
  border-color: rgba(34, 197, 94, 0.45);
}

.kpi-card.status-bad {
  border-color: rgba(239, 68, 68, 0.45);
}

.kpi-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 4px 0;
  font-variant-numeric: tabular-nums;
}

.kpi-target {
  font-size: 0.78rem;
  margin-bottom: 8px;
}

.kpi-local {
  font-size: 0.72rem;
  margin-top: 6px;
}

.results-list li.result-ok {
  border-left: 3px solid var(--ok);
  padding-left: 10px;
}

.results-list li.result-fail {
  border-left: 3px solid var(--bad);
  padding-left: 10px;
}

/* ════════════════════════════════════════
   CALENDAR
════════════════════════════════════════ */

/* ── Header ── */
.cal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.cal-nav-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.14s;
}
.cal-nav-btn:hover { background: rgba(255,255,255,0.08); }
.cal-nav-btn svg { width: 18px; height: 18px; }

.cal-title {
  font-size: 1.15rem;
  font-weight: 600;
  min-width: 220px;
  text-align: center;
}

.cal-view-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}

.cal-view-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.cal-view-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.btn-add-task {
  display: flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.14s;
}
.btn-add-task:hover { background: rgba(74,222,128,0.18); }
.btn-add-task svg { width: 16px; height: 16px; }

.cal-fold-btns { display: flex; gap: 4px; }
.cal-fold-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.cal-fold-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }

/* ── Day stats ── */
.cal-day-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.stat-chip {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  border: 1px solid var(--border);
}
.stat-chip.ok { background: var(--accent-dim); color: var(--accent); border-color: transparent; }

/* ── Slot accordion ── */
.cal-slot {
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  backdrop-filter: blur(12px);
}

.cal-slot summary { list-style: none; }
.cal-slot summary::-webkit-details-marker { display: none; }

.cal-slot-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.12s;
}
.cal-slot-header:hover { background: rgba(255,255,255,0.04); }

.slot-time {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 70px;
  font-family: var(--font-display);
}

.slot-tasks-count {
  font-size: 0.78rem;
  color: var(--muted);
  flex-shrink: 0;
}

.slot-progress {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.slot-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s;
}

.cal-slot[open] > .cal-slot-header .chevron { transform: rotate(180deg); }
.chevron { transition: transform 0.2s; flex-shrink: 0; width: 14px; height: 14px; }

/* ── Task list ── */
.cal-task-list {
  list-style: none;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cal-task-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  transition: background 0.12s, border-color 0.12s;
}
.cal-task-row:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); }

.cal-task-row.status-done .task-title { text-decoration: line-through; opacity: 0.5; }
.cal-task-row.status-cancelled .task-title { text-decoration: line-through; opacity: 0.35; }
.cal-task-row.status-moved { opacity: 0.55; }

.task-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

.task-title {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.4;
  word-break: break-word;
}

.task-status-mark {
  font-weight: 700;
  margin-right: 4px;
  color: var(--accent);
}

.task-notes {
  display: block;
  font-size: 0.78rem;
  margin-top: 2px;
  line-height: 1.4;
}

.task-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.cal-task-row:hover .task-actions { opacity: 1; }

.ta-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.ta-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.ta-done.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
.ta-cancel.active { background: rgba(248,113,113,0.12); color: var(--bad); border-color: var(--bad); }
.ta-move:hover { background: rgba(96,165,250,0.12); color: var(--accent-blue); }
.ta-link { text-decoration: none; color: var(--muted); }
.ta-link:hover { background: rgba(96,165,250,0.12); color: var(--accent-blue); border-color: var(--accent-blue); }

/* ── Category colors ── */
.cat-b24     { --cat-c: #60a5fa; }
.cat-health  { --cat-c: #4ade80; }
.cat-rest    { --cat-c: #a78bfa; }
.cat-growth  { --cat-c: #fbbf24; }
.cat-other   { --cat-c: #94a3b8; }

.cal-task-row.cat-b24    { border-left: 3px solid #60a5fa; }
.cal-task-row.cat-health { border-left: 3px solid #4ade80; }
.cal-task-row.cat-rest   { border-left: 3px solid #a78bfa; }
.cal-task-row.cat-growth { border-left: 3px solid #fbbf24; }
.cal-task-row.cat-other  { border-left: 3px solid #475569; }

/* ── Week view ── */
.cal-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.cal-week-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 8px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}
.cal-week-col.is-today { border-color: var(--accent); }

.week-col-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.week-day-name {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.week-day-num {
  font-size: 1rem;
  font-weight: 700;
}

.week-task-count {
  font-size: 0.68rem;
  color: var(--muted);
  margin-left: auto;
}

.week-task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.week-task-item {
  font-size: 0.75rem;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-left: 2px solid var(--cat-c, #475569);
  transition: background 0.1s;
}
.week-task-item:hover { background: rgba(255,255,255,0.1); }
.week-task-item.status-done { opacity: 0.45; text-decoration: line-through; }
.week-task-item.status-cancelled { opacity: 0.3; }

.week-task-more {
  font-size: 0.72rem;
  padding: 4px 6px;
  text-align: center;
}

.week-add-btn {
  margin-top: 8px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  font-size: 1.2rem;
  height: 28px;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}
.week-add-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Month view ── */
.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.month-day-name {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 0;
}

.month-cell {
  min-height: 80px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.month-cell:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); }
.month-cell.is-today { border-color: var(--accent); }
.month-cell-empty { background: transparent; border-color: transparent; cursor: default; }

.month-num {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1;
}

.today-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: #070c12;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
}

.month-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.month-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cat-c, #475569);
  flex-shrink: 0;
}
.month-dot.status-done { opacity: 0.4; }
.month-dot.status-cancelled { opacity: 0.2; }

.month-dot-more { font-size: 0.6rem; line-height: 7px; }

.month-pending-count {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Modal */
.task-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.task-modal.hidden { display: none; }

.task-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7,12,18,0.78);
  backdrop-filter: blur(6px);
}

.task-modal-box {
  position: relative;
  z-index: 1;
  background: #0f1a26;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

.task-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.task-modal-head h3 { font-size: 1.1rem; font-weight: 700; }

.task-modal-close {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.12s;
}
.task-modal-close:hover { color: var(--text); }

.task-form label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 12px;
}

.task-form input[type=text],
.task-form input[type=date],
.task-form input[type=time],
.task-form select,
.task-form textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.14s;
  color-scheme: dark;
}
.task-form input:focus,
.task-form select:focus,
.task-form textarea:focus { border-color: var(--accent); }
.task-form textarea { resize: vertical; }

.tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tf-row.hidden { display: none; }

.task-form-actions { display: flex; gap: 10px; margin-top: 20px; }

.btn-primary {
  flex: 1;
  background: var(--accent);
  color: #070c12;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px;
  cursor: pointer;
  transition: opacity 0.14s;
}
.btn-primary:hover { opacity: 0.9; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 11px 18px;
  cursor: pointer;
  transition: color 0.12s;
}
.btn-ghost:hover { color: var(--text); }

.cal-loading, .cal-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

/* ── Nutrition block in day view ── */
.cal-kcal-chip {
  background: rgba(74, 222, 128, 0.08);
  color: var(--accent) !important;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

/* Slot-level meal block (inside accordion) */
.slot-meal-block {
  margin: 4px 16px 14px;
  padding: 12px 16px 14px;
  border-radius: 10px;
  border: 1px solid rgba(74, 222, 128, 0.15);
  background: rgba(74, 222, 128, 0.05);
}
.slot-meal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.meal-icon {
  font-size: 1.1rem;
  line-height: 1;
}
.slot-meal-title {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
.slot-meal-kcal {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-blue);
  background: rgba(96, 165, 250, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}
.slot-meal-block .meal-items {
  list-style: none;
  padding: 0;
  margin: 0 0 0 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.slot-meal-block .meal-items li {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-left: 12px;
  position: relative;
}
.slot-meal-block .meal-items li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.meal-supps {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.slot-meal-badge {
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(74, 222, 128, 0.08);
  border-radius: 6px;
  padding: 1px 7px;
  margin-right: 4px;
}

/* Старый standalone блок — скрыт */
.cal-nutrition-block { display: none; }
.cal-nutrition-head, .cal-nutrition-title, .cal-nutrition-meta, .cal-nutrition-meals { display: none; }

/* ── Slot instruction block (schedule item) ── */
.slot-info-block {
  margin: 4px 14px 14px;
  padding: 12px 16px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
/* Тип-цвета */
.slot-info-block.type-meal     { border-color: rgba(74,222,128,0.2);  background: rgba(74,222,128,0.04); }
.slot-info-block.type-workout  { border-color: rgba(251,146,60,0.25); background: rgba(251,146,60,0.05); }
.slot-info-block.type-walk     { border-color: rgba(96,165,250,0.2);  background: rgba(96,165,250,0.04); }
.slot-info-block.type-course   { border-color: rgba(167,139,250,0.25);background: rgba(167,139,250,0.05); }
.slot-info-block.type-supplements { border-color: rgba(250,204,21,0.2); background: rgba(250,204,21,0.04); }
.slot-info-block.type-evening   { border-color: rgba(96,165,250,0.22); background: rgba(96,165,250,0.05); }
.slot-info-block.type-checkin  { border-color: rgba(148,163,184,0.25); background: rgba(148,163,184,0.05); }
.slot-info-block.type-sleep     { border-color: rgba(129,140,248,0.25); background: rgba(129,140,248,0.06); }
.slot-info-block.type-review    { border-color: rgba(244,114,182,0.22); background: rgba(244,114,182,0.05); }
.slot-info-block.type-family    { border-color: rgba(251,191,36,0.2); background: rgba(251,191,36,0.04); }

.sib-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.sib-emoji { font-size: 1.1rem; flex-shrink: 0; }
.sib-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.sib-sphere {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(167,139,250,0.12);
  color: #a78bfa;
  border: 1px solid rgba(167,139,250,0.25);
}
.type-evening .sib-sphere { background: rgba(96,165,250,0.1); color: var(--accent-blue); border-color: rgba(96,165,250,0.25); }

.sib-targets { display: flex; gap: 6px; flex-wrap: wrap; }
.sib-target-chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
}
.type-meal     .sib-target-chip { background: rgba(74,222,128,0.1);  color: var(--accent); }
.type-workout  .sib-target-chip { background: rgba(251,146,60,0.12); color: #fb923c; }
.type-walk     .sib-target-chip { background: rgba(96,165,250,0.1);  color: var(--accent-blue); }
.type-course   .sib-target-chip { background: rgba(167,139,250,0.12);color: #a78bfa; }
.type-supplements .sib-target-chip { background: rgba(250,204,21,0.1); color: #fbbf24; }
.type-evening   .sib-target-chip { background: rgba(96,165,250,0.1); color: var(--accent-blue); }
.type-checkin  .sib-target-chip { background: rgba(148,163,184,0.12); color: #94a3b8; }
.type-sleep     .sib-target-chip { background: rgba(129,140,248,0.12); color: #818cf8; }
.type-review    .sib-target-chip { background: rgba(244,114,182,0.12); color: #f472b6; }
.type-family    .sib-target-chip { background: rgba(251,191,36,0.1); color: #fbbf24; }

.sib-actions {
  list-style: none;
  padding: 0;
  margin: 0 0 0 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sib-actions li {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
  line-height: 1.4;
}
.sib-actions li::before {
  content: '→';
  position: absolute;
  left: 0;
  font-size: 0.7rem;
  color: var(--muted);
  top: 2px;
}
.sib-actions li.sib-subhead {
  font-weight: 600;
  color: var(--text);
  margin-top: 6px;
  padding-left: 0;
  list-style: none;
}
.sib-actions li.sib-subhead::before { content: none; }
.sib-actions li.sib-subhead + li { margin-top: 2px; }
.sib-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--accent-blue);
  text-decoration: none;
  padding: 3px 10px;
  border: 1px solid rgba(96,165,250,0.25);
  border-radius: 6px;
  transition: background 0.12s;
}
.sib-link:hover { background: rgba(96,165,250,0.1); }

/* B24 task block */
.cal-b24-slot { margin-top: 20px; border-color: rgba(248,113,113,0.2) !important; }
.cal-b24-slot .cal-slot-header { opacity: 0.75; }
.b24-slot-label { color: #f87171 !important; }
.stat-chip.b24-chip {
  background: rgba(248,113,113,0.08);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.2);
}

/* Badge в заголовке слота */
.slot-sched-badge {
  font-size: 0.75rem;
  padding: 1px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  margin-right: 4px;
  white-space: nowrap;
}
.meal-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.meal-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.meal-icon { font-size: 1rem; }
.meal-name {
  font-weight: 600;
  font-size: 0.85rem;
  flex: 1;
  color: var(--text);
}
.meal-time {
  font-size: 0.75rem;
  color: var(--muted);
}
.meal-kcal {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-blue);
  white-space: nowrap;
}
.meal-items {
  list-style: none;
  padding: 0;
  margin: 0;
}
.meal-items li {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
  padding-left: 10px;
  position: relative;
}
.meal-items li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.meal-iron-badge {
  font-size: 0.7rem;
  cursor: help;
}
.meal-supps {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.meal-supps strong {
  color: var(--text);
}

/* ── Calorie balance card ── */
.cal-period-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 700px) {
  .cal-period-grid { grid-template-columns: 1fr; }
}
.cal-period-cell {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.cal-period-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cal-period-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.cal-period-val span { font-size: .75rem; font-weight: 400; }
.cal-period-sub {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 3px;
}

.cal-days-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.cal-stat-row {
  display: grid;
  grid-template-columns: 28px 1fr 16px 1fr 60px;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
}
.cal-day-name   { color: var(--muted); font-weight: 600; }
.cal-consumed   { color: var(--text); }
.cal-arrow      { text-align: center; }
.cal-burned     { color: var(--accent-blue); }
.cal-balance    { text-align: right; font-weight: 600; }
.cal-balance.ok { color: var(--accent); }
.cal-balance.muted { color: var(--muted); }

/* Block log + trends + review */
.btn-block-log {
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.08);
  color: var(--accent);
  font-size: 0.82rem;
  cursor: pointer;
  width: 100%;
}
.btn-block-log.is-done,
.slot-info-block.block-logged .btn-block-log {
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(74, 222, 128, 0.15);
}
.slot-info-block.block-logged {
  border-left: 3px solid var(--accent);
}

.trend-row {
  margin-bottom: 16px;
}
.trend-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 48px;
}
.trend-bar {
  flex: 1;
  min-width: 4px;
  background: linear-gradient(180deg, var(--accent-blue), rgba(96, 165, 250, 0.3));
  border-radius: 2px 2px 0 0;
}

.review-q {
  display: block;
  margin-bottom: 14px;
  font-size: 0.9rem;
}
.review-q textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  resize: vertical;
}
.review-hint { margin-top: 12px; font-size: 0.85rem; }

.type-widis .sib-target-chip { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }
.type-finance .sib-target-chip { background: rgba(250, 204, 21, 0.1); color: #fbbf24; }
.type-learning .sib-target-chip { background: rgba(167, 139, 250, 0.12); color: #a78bfa; }
.type-weight .sib-target-chip { background: rgba(74, 222, 128, 0.1); color: var(--accent); }
.type-sysadmin .sib-target-chip { background: rgba(96, 165, 250, 0.1); color: var(--accent-blue); }
