﻿* {
  box-sizing: border-box;
}

:root {
  --color-page-bg: #f4f7fb;
  --color-surface: #ffffff;
  --color-surface-soft: #f8fafc;
  --color-sidebar: #0f172a;
  --color-sidebar-surface: #111c30;
  --color-sidebar-hover: #1e293b;
  --color-sidebar-active: #2563eb;
  --color-sidebar-border: rgba(148, 163, 184, 0.14);

  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-success: #16a34a;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-purple: #8b5cf6;
  --color-cyan: #06b6d4;

  --color-text-primary: #172033;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-border: #e5eaf2;
  --color-control-border: #dbe3ef;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-card: 0 8px 24px rgba(15, 23, 42, 0.055);
  --shadow-hover: 0 12px 30px rgba(15, 23, 42, 0.085);

  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-section: 40px;
  --sidebar-width: 216px;
  --sidebar-width-collapsed: 72px;

  /* Legacy aliases: keep existing selectors compatible with the new system. */
  --bg: var(--color-page-bg);
  --panel: var(--color-surface);
  --panel-soft: var(--color-surface-soft);
  --border: var(--color-border);
  --text: var(--color-text-primary);
  --muted: var(--color-text-secondary);
  --green: var(--color-success);
  --green-1: #dcfce7;
  --green-2: #15803d;
  --green-3: #22c55e;
  --blue: var(--color-primary);
  --danger: var(--color-danger);
  --radius-card: var(--radius-lg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text-primary);
  background: var(--color-page-bg);
}

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

.app {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  margin: 0;
  padding: 0;
  background: var(--color-page-bg);
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-screen[hidden],
.guest-landing[hidden],
.app[hidden] {
  display: none;
}

.app [hidden] {
  display: none !important;
}

/* Глобально: атрибут [hidden] всегда побеждает любые display: grid/flex/block
   из классов (.edit-form, .modal-card и т.п.). Без этого правила
   [hidden] молча игнорируется для элементов вне .app (модалки и т.п.). */
[hidden] {
  display: none !important;
}

.auth-card {
  width: min(460px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(21, 31, 50, 0.95);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.auth-card p {
  color: var(--muted);
  line-height: 1.5;
}

.guest-landing {
  min-height: 100vh;
  padding: 24px;
}

.guest-header,
.guest-page {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.guest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 28px;
}

.guest-brand {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
}

.guest-header-actions,
.guest-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guest-language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(16, 24, 39, 0.9);
}

.language-tab {
  min-width: 42px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.language-tab.active {
  color: #052e16;
  background: var(--green);
}

.guest-page,
.guest-hero-copy,
.guest-preview-card,
.guest-card,
.pricing-card,
.preview-table {
  display: grid;
}

.guest-page {
  gap: 28px;
}

.guest-hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  align-items: center;
  gap: 18px;
  padding: 42px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 28%, rgba(34, 197, 94, 0.16), transparent 18rem),
    rgba(21, 31, 50, 0.88);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.guest-hero-copy {
  gap: 18px;
}

.guest-hero h1 {
  max-width: 720px;
  font-size: clamp(42px, 7vw, 76px);
  letter-spacing: 0;
}

.guest-lead {
  max-width: 620px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.guest-small,
.guest-card p,
.guest-section p,
.pricing-card li,
.built-for li {
  color: var(--muted);
  line-height: 1.5;
}

.guest-preview-card,
.guest-card,
.pricing-card,
.preview-table {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(16, 24, 39, 0.92);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.guest-preview-card {
  gap: 18px;
  padding: 22px;
}

.preview-header,
.preview-table div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.preview-header span,
.preview-metrics span,
.preview-table span {
  color: var(--muted);
  font-size: 13px;
}

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

.preview-metrics div,
.preview-table div {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(29, 42, 64, 0.78);
}

.preview-metrics div {
  display: grid;
  gap: 6px;
}

.mini-calendar {
  display: grid;
  grid-template-columns: repeat(8, 13px);
  gap: 4px;
}

.mini-calendar i {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: #26364f;
}

.mini-calendar .l1 { background: #14532d; }
.mini-calendar .l2 { background: #166534; }
.mini-calendar .l3 { background: #16a34a; }
.mini-calendar .l4 { background: #22c55e; }
.mini-calendar .l5 { background: #86efac; }

.guest-benefits,
.why-dev-tracker,
.pricing-section,
.guest-section {
  display: grid;
  gap: 18px;
}

.guest-benefits {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guest-card,
.pricing-card,
.guest-section {
  padding: 22px;
}

.guest-card,
.pricing-card {
  gap: 12px;
}

.product-preview,
.built-for {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(21, 31, 50, 0.76);
}

.preview-table {
  gap: 8px;
  padding: 12px;
}

.why-dev-tracker,
.pricing-section {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.muted-card {
  background: rgba(15, 23, 42, 0.9);
}

.accent-card,
.pro-card {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(34, 197, 94, 0.08);
}

.guest-card strong {
  font-size: 24px;
  line-height: 1.25;
}

/* === Гостевая: сетка модулей === */
.guest-modules {
  display: grid;
  gap: 18px;
}

.guest-modules-head {
  display: grid;
  gap: 8px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.guest-modules-head h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 0;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.module-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(21, 31, 50, 0.92);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: var(--green-2);
  background: var(--panel-soft);
}

.module-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  font-size: 22px;
  line-height: 1;
}

.module-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.module-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.built-for ul,
.pricing-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.pricing-card > strong {
  font-size: 34px;
}

.pricing-badge {
  justify-self: start;
  padding: 7px 10px;
  border-radius: 999px;
  color: #052e16;
  background: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.guest-final-cta {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 40px 20px 56px;
  text-align: center;
}

.auth-status {
  padding: 12px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.08);
  font-weight: 700;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.header,
.header-actions,
.panel-title,
.actions,
.log-meta {
  display: flex;
  align-items: center;
}

.header {
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  margin-bottom: 20px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 13, 23, 0.88);
  backdrop-filter: blur(16px);
}

.header-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 36px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
}

.version-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.version-pill {
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
}

.app-main {
  min-width: 0;
  width: min(100% - 64px, 1440px);
  margin: 0 auto;
  padding: 12px 0 56px;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 18px;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(7, 12, 22, 0.98), rgba(9, 16, 29, 0.98));
  box-shadow: 22px 0 60px rgba(0, 0, 0, 0.24);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.sidebar-brand,
.sidebar-user,
.top-header-meta {
  display: flex;
  align-items: center;
}

.sidebar-brand {
  gap: 12px;
  padding: 4px 8px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.sidebar-brand strong,
.sidebar-user strong {
  display: block;
  color: var(--text);
}

.sidebar-brand span,
.sidebar-user span,
.sidebar-pro-card span {
  color: var(--muted);
  font-size: 13px;
}

.sidebar-logo,
.sidebar-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  color: #052e16;
  background: var(--green);
  font-weight: 900;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
}

.sidebar-nav {
  display: grid;
  grid-auto-rows: minmax(42px, auto);
  align-content: start;
  gap: 4px;
  padding-right: 4px;
}

.nav-link {
  min-height: 42px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 10px;
  color: #d8e2f0;
  background: transparent;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.nav-link:hover {
  color: var(--text);
  border-color: rgba(34, 197, 94, 0.18);
  background: rgba(34, 197, 94, 0.08);
  transform: translateX(2px);
}

.nav-link.active {
  border-color: rgba(34, 197, 94, 0.32);
  color: var(--green);
  background: rgba(34, 197, 94, 0.16);
}

.sidebar-nav .nav-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 9px;
  color: inherit;
  background: rgba(148, 163, 184, 0.08);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.sidebar-nav .nav-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(34, 197, 94, 0.14);
}

.sidebar-bottom {
  display: grid;
  align-content: start;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  padding-bottom: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.sidebar-pro-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.1), rgba(15, 23, 42, 0.76));
}

.sidebar-feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 12px;
  color: inherit;
  text-align: left;
  background: rgba(15, 23, 42, 0.52);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.sidebar-feedback:hover,
.sidebar-feedback:focus-visible {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.sidebar-feedback-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.16);
}

.sidebar-feedback-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-feedback > span:last-child {
  font-size: 14px;
  font-weight: 600;
}

.sidebar-user {
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  color: inherit;
  text-align: left;
  background: rgba(15, 23, 42, 0.52);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.sidebar-user:hover,
.sidebar-user:focus-visible {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.sidebar-user-body {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.sidebar-user span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user strong {
  font-size: 15px;
  line-height: 1.2;
}

.top-header-meta {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cloud-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 999px;
  padding: 0 12px;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.sidebar-toggle,
.sidebar-backdrop {
  display: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app[data-route="dashboard"] .productivity-panel .productivity-header,
.app[data-route="dashboard"] .productivity-panel .productivity-stats,
.app[data-route="dashboard"] .productivity-panel .calendar-legend {
  display: none;
}

.stats-grid,
.dashboard,
.goal-panel,
.insights-grid,
.field-grid,
.filters {
  display: grid;
  gap: 14px;
}

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

.dashboard-summary-panel {
  padding: 20px;
  margin-bottom: 18px;
}

.dashboard-summary-compact {
  display: none;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: #101827;
  font-weight: 700;
}

.dashboard-summary-panel.collapsed .dashboard-summary-compact {
  display: block;
}

.dashboard-summary-panel.collapsed .hero-metrics,
.dashboard-summary-panel.collapsed .dashboard-hub {
  display: none;
}

.stat-card,
.panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(21, 31, 50, 0.92);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.26);
}

.stat-card {
  display: grid;
  gap: 10px;
  min-height: 104px;
  padding: 18px;
}

.stat-card span,
.field span,
.timer-label,
.panel-title span,
.session-summary span {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.stat-card:nth-child(n + 7) strong {
  font-size: clamp(18px, 2.2vw, 24px);
}

.dashboard {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  margin-bottom: 18px;
}

/* === Dashboard hero (главная — сводка дня) === */
.dashboard-hero {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-greeting {
  margin: 0;
  color: var(--text);
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero-head .dashboard-summary-compact {
  margin: 4px 0 0;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.hero-metric {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-soft);
}

.hero-metric span {
  color: var(--muted);
  font-size: 12px;
}

.hero-metric strong {
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* === Карточка «Начни с этого» === */
.focus-start-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(34, 197, 94, 0.42);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(15, 23, 42, 0.76));
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.12);
}

.focus-start-card.session-active {
  border-color: rgba(56, 189, 248, 0.42);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.76));
  box-shadow: 0 12px 32px rgba(56, 189, 248, 0.12);
}

.focus-start-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.focus-start-label {
  margin: 0;
  color: var(--green-3);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.focus-start-card.session-active .focus-start-label {
  color: var(--blue);
}

.focus-start-body strong {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  overflow-wrap: anywhere;
}

.focus-start-meta {
  color: var(--muted);
  font-size: 13px;
}

/* === Dashboard hub (плитки разделов) === */
.dashboard-hub {
  display: grid;
  gap: 14px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hub-tile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.hub-tile:hover {
  transform: translateY(-2px);
  border-color: var(--green-2);
  background: var(--panel-soft);
}

.hub-tile:active {
  transform: translateY(0);
}

.hub-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  font-size: 20px;
  line-height: 1;
}

.hub-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hub-body strong {
  font-size: 15px;
  font-weight: 700;
}

.hub-meta {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.hub-arrow {
  color: var(--muted);
  font-size: 18px;
  transition: transform 0.15s ease, color 0.15s ease;
}

.hub-tile:hover .hub-arrow {
  transform: translateX(3px);
  color: var(--green-3);
}

.goal-panel {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  margin-bottom: 18px;
}

.goal-column {
  display: grid;
  align-content: start;
  gap: 14px;
}

.insights-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  margin-top: 18px;
}

.tracker-panel,
.session-panel,
.goal-panel,
.projects-panel,
.logs-panel,
.public-feed-panel,
.table-panel,
.category-panel {
  padding: 20px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.goal-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.quick-goals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-goal {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: #101827;
  cursor: pointer;
  font-weight: 700;
}

.quick-goal:hover {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(34, 197, 94, 0.1);
}

/* === Онбординг === */
.onboarding-card {
  max-width: 480px;
}

/* === Магазин === */
.shop-card {
  max-width: 720px;
}

.shop-status {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.shop-status-ok {
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
  color: var(--green-3);
}

.shop-status-warn {
  border: 1px solid rgba(251, 113, 133, 0.4);
  background: rgba(251, 113, 133, 0.1);
  color: var(--danger);
}

.shop-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.shop-plan {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  text-align: center;
}

.shop-plan-popular {
  border-color: rgba(34, 197, 94, 0.5);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(15, 23, 42, 0.76));
}

.shop-badge {
  justify-self: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green);
  color: #052e16;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.shop-plan strong {
  font-size: 16px;
  color: var(--text);
}

.shop-price {
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
}

.shop-price-unit {
  color: var(--muted);
  font-size: 12px;
}

.shop-features {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 14px 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.onboarding-step {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.onboarding-step-content {
  display: grid;
  gap: 14px;
}

.onboarding-step-content p {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.onboarding-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
  color: var(--text);
  font: inherit;
}

.onboarding-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s ease;
}

.onboarding-dot.active {
  background: var(--green);
}

.onboarding-quick-goals {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.goal-progress {
  display: grid;
  gap: 10px;
}

.goal-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.goal-progress-row strong {
  color: var(--text);
}

.goal-track {
  height: 10px;
  border-radius: 999px;
  background: #101827;
  overflow: hidden;
}

.goal-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-2), var(--green-3));
}

.focus-text {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.1);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: #101827;
  outline: none;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  min-height: 120px;
  padding: 12px;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

input:disabled,
select:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.quick-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tracker-panel .timer-fields { grid-template-columns: minmax(180px, 1fr) minmax(0, 1.6fr); align-items: start; }
.timer-category-field .quick-categories { margin-top: 0; }
@media (max-width: 760px) {
  .tracker-panel .timer-fields { grid-template-columns: minmax(0, 1fr); }
}

.quick-category {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: #101827;
  cursor: pointer;
}

.quick-category.active {
  border-color: rgba(34, 197, 94, 0.5);
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
}

.quick-category:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.project-create {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(150px, auto) auto;
  gap: 10px;
  margin-top: 14px;
}

.projects-panel {
  margin-bottom: 18px;
}

.experiments-panel {
  padding: 20px;
  margin-bottom: 18px;
  scroll-margin-top: 18px;
}

.analytics-panel,
.community-panel,
.knowledge-panel,
.resources-panel,
.reports-panel {
  padding: 20px;
  margin-bottom: 18px;
  scroll-margin-top: 18px;
}

.profile-panel {
  padding: 20px;
  margin-bottom: 18px;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.tasks-panel,
.today-tasks-panel {
  padding: 20px;
  margin-bottom: 18px;
}

.tasks-dashboard {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.tasks-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) minmax(140px, 0.7fr) minmax(160px, 0.8fr) minmax(0, 1.4fr) auto;
  gap: 10px;
  margin-bottom: 16px;
}

.tasks-controls {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(180px, 0.9fr) minmax(240px, 1.2fr);
  gap: 10px;
  margin-bottom: 16px;
}

.tasks-list {
  display: grid;
  gap: 12px;
}

.compact-tasks-list {
  gap: 10px;
}

.task-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #101827;
}

.task-card.compact {
  padding: 14px;
}

.task-card-head,
.task-badges,
.task-meta,
.task-actions {
  display: flex;
  gap: 10px;
}

.task-card-head {
  align-items: flex-start;
  justify-content: space-between;
}

.task-card-head > div:first-child {
  display: grid;
  gap: 4px;
}

.task-card-head span,
.task-meta {
  color: var(--muted);
  font-size: 13px;
}

.task-description {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.task-meta,
.task-actions {
  flex-wrap: wrap;
}

.priority-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.priority-high {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
}

.priority-medium {
  color: #fde68a;
  background: rgba(234, 179, 8, 0.14);
}

.priority-low {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.14);
}

.status-todo,
.status-in_progress {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
}

.status-done {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.14);
}

.status-cancelled {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.14);
}

.profile-compact-row {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text);
  font-weight: 800;
}

.profile-expanded-content {
  display: grid;
  gap: 14px;
  max-height: 900px;
  opacity: 1;
  padding-top: 14px;
  transition: max-height 0.22s ease, opacity 0.18s ease, padding 0.18s ease;
}

.account-overview {
  display: grid;
  gap: 14px;
}

.account-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 14px;
}

.account-identity,
.account-plan-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #101827;
}

.account-identity {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.account-identity-copy {
  display: grid;
  gap: 6px;
}

.account-note,
.plan-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.profile-panel.collapsed .profile-expanded-content {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  pointer-events: none;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
}

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

.account-settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.profile-card span {
  color: var(--muted);
  font-size: 13px;
}

.compact-select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: #101827;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  display: none;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar.visible {
  display: block;
}

.section-subtitle {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.panel-title.compact {
  align-items: center;
}

.experiment-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.experiments-knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.mini-panel {
  padding: 16px;
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: #101827;
}

.empty-state strong {
  color: var(--text);
}

.analytics-dashboard,
.knowledge-dashboard,
.resources-dashboard,
.reports-dashboard {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.community-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.analytics-controls,
.community-controls,
.knowledge-controls,
.resources-controls,
.reports-controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.community-controls input,
.community-controls select,
.knowledge-controls input,
.knowledge-controls select,
.resources-controls input,
.resources-controls select {
  min-width: min(240px, 100%);
  flex: 1;
}

.knowledge-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.resources-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.resources-form {
  display: grid;
  gap: 10px;
}

.knowledge-form textarea,
.knowledge-form .button {
  grid-column: 1 / -1;
}

.resource-category-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.resource-tab {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--color-text-primary);
  background: var(--color-surface);
  cursor: pointer;
  font-weight: 700;
}

.resource-tab:hover {
  border-color: #93c5fd;
  color: var(--color-primary-hover);
  background: #eff6ff;
}

.resource-tab.active {
  border-color: rgba(34, 197, 94, 0.45);
  color: #052e16;
  background: var(--green);
}

.resources-count {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--muted);
}

.knowledge-feed {
  display: grid;
  gap: 12px;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.resources-list {
  display: grid;
  gap: 10px;
}

.knowledge-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.resource-card,
.resource-list-item {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(17, 27, 43, 0.98), rgba(12, 20, 34, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.resource-card:hover,
.resource-list-item:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, 0.28);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.resource-card {
  display: grid;
  gap: 14px;
  min-height: 180px;
  padding: 16px;
}

.resource-card-top,
.resource-card-header,
.resource-list-item {
  display: flex;
  align-items: center;
}

.resource-card-top {
  justify-content: space-between;
}

.resource-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  color: #dff7eb;
  background: radial-gradient(circle at 30% 20%, rgba(34, 197, 94, 0.28), rgba(15, 23, 42, 0.96));
  font-size: 18px;
  font-weight: 900;
}

.resource-icon.compact {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 14px;
}

.resource-icon img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
}

.resource-icon-fallback {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.resource-more {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 20px;
}

.resource-card-main {
  display: grid;
  gap: 7px;
}

.resource-card-main strong,
.resource-list-main strong {
  color: var(--text);
  font-size: 17px;
}

.resource-card-main p,
.resource-list-main span {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.resource-badge {
  width: fit-content;
  border: 1px solid rgba(59, 130, 246, 0.32);
  border-radius: 999px;
  padding: 3px 9px;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.16);
  font-size: 12px;
  font-weight: 800;
}

.resource-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.resource-action.icon-only {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  gap: 8px;
}

.resource-action {
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.74);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.resource-action:hover {
  transform: scale(1.06);
}

.resource-action.open {
  border-color: rgba(34, 197, 94, 0.28);
  color: var(--green);
  box-shadow: 0 0 0 rgba(34, 197, 94, 0);
}

.resource-action.open:hover {
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.28);
}

.resource-action.favorite {
  border-color: rgba(59, 130, 246, 0.26);
  color: #93c5fd;
}

.resource-action.favorite:hover {
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.24);
}

.resource-action.favorite.active {
  border-color: rgba(59, 130, 246, 0.46);
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.18);
}

.resource-action.edit {
  color: #e2e8f0;
}

.resource-action.edit:hover {
  box-shadow: 0 0 18px rgba(148, 163, 184, 0.18);
}

.resource-action.delete {
  border-color: rgba(239, 68, 68, 0.34);
  color: #f87171;
}

.resource-action.delete:hover {
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.24);
}

.resource-list-item {
  gap: 14px;
  padding: 12px;
}

.resource-list-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

@media (max-width: 1180px) {
  .resources-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

.knowledge-card-header,
.knowledge-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.knowledge-card-header,
.resource-card-header {
  justify-content: space-between;
}

.knowledge-tags span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
  font-size: 12px;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.community-feed {
  display: grid;
  gap: 12px;
}

.community-experiment-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.community-author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.community-author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.community-card-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.like-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.like-button:hover {
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.5);
}

.like-button.liked {
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.5);
  background: rgba(251, 113, 133, 0.12);
}

.community-coming-soon {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.09), rgba(16, 24, 39, 0.92));
}

.community-coming-soon ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.analytics-controls select {
  width: min(260px, 100%);
}

.analytics-form,
.reports-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.analytics-form .button,
.reports-form .button {
  grid-column: span 5;
}

.reports-chart-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.reports-chart {
  min-height: 170px;
  display: flex;
  align-items: end;
  gap: 8px;
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.report-chart-bar {
  min-width: 34px;
  display: grid;
  align-items: end;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  /* Кнопка, а не div: сбрасываем дефолтные браузерные стили и включаем курсор-указатель. */
  background: transparent;
  border: 0;
  padding: 4px;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 120ms ease;
}

.report-chart-bar:hover {
  background-color: rgba(34, 197, 94, 0.08);
}

.report-chart-bar:focus-visible {
  outline: 2px solid var(--green-2);
  outline-offset: 2px;
}

.report-chart-bar span {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--green-3), var(--green-2));
  transition: filter 120ms ease;
}

.report-chart-bar:hover span {
  filter: brightness(1.15);
}

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

.analytics-compare {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

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

.traffic-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.traffic-card h3 {
  margin: 0;
  font-size: 16px;
}

.traffic-card span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.traffic-card strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.reports-row-button {
  border: 0;
  padding: 0;
  color: #bae6fd;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.reports-row-button:hover {
  text-decoration: underline;
}

.top-projects {
  margin-top: 18px;
}

.top-project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.top-list {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.top-list h3 {
  margin: 0;
  font-size: 15px;
}

.top-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.top-item strong {
  color: var(--text);
}

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

.experiment-create textarea {
  min-height: 88px;
}

.experiment-create textarea,
.experiment-create .button {
  grid-column: span 3;
}

.experiments-list {
  display: grid;
  gap: 12px;
}

.experiment-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.experiment-card-header,
.experiment-card-actions,
.experiment-meta,
.metric-grid {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.experiment-card-header {
  justify-content: space-between;
}

.experiment-meta {
  color: var(--muted);
  font-size: 13px;
}

.experiment-text {
  display: grid;
  gap: 6px;
  color: var(--text);
  line-height: 1.5;
}

.experiment-text span {
  color: var(--muted);
  font-size: 13px;
}

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

.metric-deltas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.metric-delta {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.08);
}

.project-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.projects-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, 260px);
  gap: 10px;
  margin-bottom: 14px;
}

.sort-field {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr);
  align-items: center;
  gap: 8px;
}

.sort-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-filter {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: #101827;
  cursor: pointer;
  font-weight: 700;
}

.status-filter.active {
  border-color: rgba(34, 197, 94, 0.44);
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
}

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

.project-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.compact-project-card {
  gap: 10px;
}

.clickable-project-card {
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.clickable-project-card:hover,
.clickable-project-card:focus {
  border-color: rgba(56, 189, 248, 0.48);
  background: #111c2e;
  transform: translateY(-1px);
  outline: none;
}

.project-card-header,
.project-card-footer,
.project-card-actions,
.project-metrics {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.project-card-header {
  justify-content: space-between;
}

.project-card-actions {
  justify-content: flex-end;
}

.project-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.project-title strong {
  overflow-wrap: anywhere;
}

.project-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-store-link {
  color: #bae6fd;
  text-decoration: none;
  font-weight: 700;
}

.project-store-link:hover {
  text-decoration: underline;
}

.project-metric {
  display: grid;
  gap: 4px;
  min-width: 120px;
}

.compact-project-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-project-metrics .project-metric {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
}

.project-metric span {
  color: var(--muted);
  font-size: 12px;
}

.project-metric strong {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.projects-show-more {
  display: block;
  width: fit-content;
  margin: 14px auto 0;
}

.projects-show-more[hidden] {
  display: none;
}

.projects-empty-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  color: var(--muted);
  background: #101827;
}

.projects-empty-state strong {
  color: var(--text);
  font-size: 18px;
}

.project-details-panel {
  padding: 20px;
  margin-bottom: 18px;
  scroll-margin-top: 18px;
}

.project-details-panel[hidden] {
  display: none;
}

.project-details-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin-bottom: 16px;
}

.project-details-hero {
  min-width: 0;
}

.project-hero {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) minmax(0, auto);
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(34, 197, 94, 0.06)), #101827;
}

.project-hero-icon,
.project-hero-placeholder {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  object-fit: cover;
}

.project-hero-placeholder {
  display: grid;
  place-items: center;
  border: 1px solid rgba(34, 197, 94, 0.32);
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  font-size: 36px;
  font-weight: 900;
}

.project-hero-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.project-hero h2 {
  font-size: 30px;
  line-height: 1.1;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.project-hero-meta,
.project-hero-actions,
.project-tab-toolbar,
.platform-actions,
.project-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-hero-meta {
  color: var(--muted);
  font-size: 13px;
}

.project-hero-meta span,
.project-hero-meta a {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.08);
  text-decoration: none;
}

.project-hero-description {
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.project-hero-actions {
  justify-content: flex-end;
}

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

.project-health-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.project-health-card.healthy {
  border-color: rgba(34, 197, 94, 0.38);
}

.project-health-card.attention {
  border-color: rgba(250, 204, 21, 0.38);
}

.project-health-card.inactive {
  border-color: rgba(251, 113, 133, 0.38);
}

.project-health-card span {
  color: var(--muted);
}

.project-details-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.project-tab {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.project-tab.active {
  color: #052e16;
  background: var(--green);
}

.project-details-content {
  display: grid;
  gap: 14px;
}

.project-overview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.platforms-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 14px;
}

.platforms-list,
.platform-create,
.details-list {
  display: grid;
  gap: 10px;
}

.platform-create,
.platform-item,
.detail-row {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.platform-create h3 {
  margin: 0;
  font-size: 16px;
}

.platform-item div,
.detail-row {
  display: grid;
  gap: 6px;
}

.platform-item a {
  color: #bae6fd;
  font-size: 13px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.project-platform-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.platforms-v2 {
  display: grid;
  gap: 16px;
}

.platform-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.platform-create-v2 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.platform-create-v2 .panel-title,
.platform-create-v2 textarea,
.platform-create-v2 .button {
  grid-column: 1 / -1;
}

.platform-select-wrapper {
  position: relative;
  grid-column: 1 / -1;
}

.platform-select {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #0f1726;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.platform-select-caret {
  color: var(--muted);
}

.platform-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b1220;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
}

.platform-dropdown[hidden] {
  display: none;
}

.platform-dropdown-item {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.platform-dropdown-item:hover {
  background: rgba(34, 197, 94, 0.12);
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.platform-card-v2 {
  grid-template-columns: 1fr;
  align-items: stretch;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(17, 27, 43, 0.98), rgba(12, 20, 34, 0.98));
}

.platform-card-head,
.platform-meta-grid {
  display: grid;
  gap: 8px;
}

.platform-card-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.platform-card-head strong {
  color: var(--text);
  font-size: 17px;
}

.platform-card-head span,
.platform-card-v2 p,
.platform-meta-grid span {
  color: var(--muted);
}

.platform-meta-grid {
  grid-template-columns: 1fr;
  font-size: 13px;
}

.platform-meta-grid strong {
  color: var(--text);
}

.platform-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.status-draft {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.14);
}

.status-published {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
}

.status-in_review {
  color: #fde68a;
  background: rgba(234, 179, 8, 0.14);
}

.status-rejected {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.16);
}

.status-archived {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
}

.project-devlog-filter {
  justify-self: start;
}

.project-settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.project-settings-wide,
.project-settings-actions {
  grid-column: 1 / -1;
}

.platform-item a:hover {
  text-decoration: underline;
}

.detail-row {
  color: var(--muted);
  line-height: 1.45;
}

.detail-row strong,
.detail-row p {
  color: var(--text);
}

.detail-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.edit-form {
  display: grid;
  gap: 12px;
}

/* Два поля в одну строку внутри модалки (даты / Android+HTML). */
.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-row .field {
  min-width: 0;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.timer-card {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-soft);
}

.timer {
  font-size: clamp(42px, 8vw, 76px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.actions {
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.compact {
  white-space: nowrap;
}

.primary {
  background: var(--green);
  color: #052e16;
}

.primary:hover {
  background: #4ade80;
}

.secondary {
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.1);
  color: #bae6fd;
}

.secondary:hover {
  background: rgba(56, 189, 248, 0.18);
}

.danger {
  border: 1px solid rgba(251, 113, 133, 0.34);
  background: rgba(251, 113, 133, 0.14);
  color: #fecdd3;
}

.danger:hover {
  background: rgba(251, 113, 133, 0.22);
}

.ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
}

.ghost:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.save {
  background: #2563eb;
}

.save:hover {
  background: #1d4ed8;
}

.panel-title {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.session-panel {
  display: grid;
  align-content: start;
}

.session-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.session-summary div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.session-summary strong {
  font-size: 20px;
  line-height: 1.2;
}

.session-actions .button {
  flex: 1 1 96px;
}

.productivity-panel {
  padding: 20px;
  margin-bottom: 18px;
}

.productivity-header {
  margin-bottom: 18px;
}

.productivity-header h2 {
  font-size: 24px;
}

.productivity-header p {
  margin-top: 6px;
  color: var(--muted);
}

.productivity-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.productivity-goals {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.productivity-goals-title {
  margin-bottom: 0;
}

.productivity-goals-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.productivity-goal-card {
  min-height: 120px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.productivity-goal-card:hover {
  border-color: rgba(56, 189, 248, 0.38);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.24);
}

.productivity-goal-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.productivity-goal-card__icon {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

.productivity-goal-card strong {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.1;
}

.compact-stat {
  min-height: 92px;
  box-shadow: none;
}

.compact-stat strong {
  font-size: clamp(17px, 1.7vw, 22px);
}

.calendar-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}

.calendar-wrap {
  width: max-content;
  min-width: 100%;
  --calendar-cell-size: 12px;
  --calendar-gap: 3px;
}

.calendar-months {
  position: relative;
  display: block;
  margin-left: 34px;
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.calendar-month {
  position: absolute;
  top: 0;
  white-space: nowrap;
}

.calendar-body {
  display: flex;
  gap: 8px;
}

.calendar-weekdays {
  display: grid;
  grid-template-rows: repeat(7, var(--calendar-cell-size));
  gap: var(--calendar-gap);
  width: 26px;
  color: var(--muted);
  font-size: 12px;
  line-height: var(--calendar-cell-size);
}

.productivity-calendar {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, var(--calendar-cell-size));
  grid-template-columns: repeat(53, var(--calendar-cell-size));
  gap: var(--calendar-gap);
}

.calendar-day,
.calendar-legend i {
  width: var(--calendar-cell-size);
  height: var(--calendar-cell-size);
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #101827;
}

.calendar-day {
  cursor: pointer;
}

.calendar-day:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.16);
}

.calendar-day.level-1,
.calendar-legend .level-1 {
  background: var(--green-1);
}

.calendar-day.level-2,
.calendar-legend .level-2 {
  background: #15803d;
}

.calendar-day.level-3,
.calendar-legend .level-3 {
  background: var(--green-2);
}

.calendar-day.level-4,
.calendar-legend .level-4 {
  background: var(--green-3);
}

.calendar-day.level-5,
.calendar-legend .level-5 {
  background: #bbf7d0;
  border-color: rgba(187, 247, 208, 0.78);
}

.calendar-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.day-details-card {
  width: min(680px, 100%);
}

.day-details-content {
  display: grid;
  gap: 12px;
}

.day-details-summary {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.day-log-list {
  display: grid;
  gap: 10px;
  max-height: 50vh;
  overflow: auto;
}

.day-log-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.filters {
  grid-template-columns: 1fr 1fr 160px;
  margin-bottom: 16px;
}

.logs-list {
  display: grid;
  gap: 10px;
}

.public-feed-panel {
  margin-bottom: 18px;
}

.logs-list,
.public-feed-list {
  display: grid;
  gap: 10px;
}

.log-item,
.public-post {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.log-meta,
.public-post-meta {
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.log-note,
.public-post-note {
  color: var(--text);
  line-height: 1.5;
}

.log-footer,
.public-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.privacy-badge {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
  font-size: 12px;
  font-weight: 700;
}

.privacy-badge.public {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
}

.tiny-button {
  min-height: 32px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 0 10px;
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.1);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.tiny-button:hover {
  background: rgba(56, 189, 248, 0.18);
}

.danger-link {
  border-color: rgba(251, 113, 133, 0.34);
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.12);
}

.danger-link:hover {
  background: rgba(251, 113, 133, 0.22);
}

.publish-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--text);
  font-size: 14px;
}

.publish-toggle input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green);
}

.empty {
  color: var(--muted);
  line-height: 1.5;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 700;
}

.category-stats {
  display: grid;
  gap: 10px;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.segment {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.segment.active {
  color: #052e16;
  background: var(--green);
}

.category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101827;
}

.category-row strong {
  font-variant-numeric: tabular-nums;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  z-index: 20;
}

.modal.open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(520px, 100%);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

@media (max-width: 900px) {
  .app {
    display: block;
  }

  .app-main {
    width: min(100% - 28px, 1180px);
    padding-bottom: 28px;
  }

  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 80;
    width: min(248px, 86vw);
    height: 100dvh;
    gap: 18px;
    padding: 18px 14px;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

  .sidebar-nav {
    gap: 3px;
  }

  .nav-link {
    min-height: 40px;
  }

  .sidebar-brand {
    padding: 4px 6px 14px;
  }

  .sidebar-bottom {
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 18px;
  }

  .sidebar-pro-card,
  .sidebar-user {
    padding: 10px 12px;
  }

  .app.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: none;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(4px);
  }

  .app.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--color-text-primary);
    background: var(--color-surface);
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
  }

  .sidebar-toggle svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body.sidebar-scroll-lock {
    overflow: hidden;
    touch-action: none;
  }

  .guest-hero,
  .guest-benefits,
  .product-preview,
  .built-for,
  .why-dev-tracker,
  .pricing-section,
  .modules-grid {
    grid-template-columns: 1fr;
  }

  .guest-hero {
    min-height: auto;
    padding: 28px;
  }

  .stats-grid,
  .profile-grid,
  .productivity-stats,
  .productivity-goals-grid,
  .project-overview-grid,
  .knowledge-dashboard,
  .resources-dashboard,
  .community-stats,
  .community-coming-soon,
  .experiment-stats,
  .experiments-knowledge-grid,
  .analytics-dashboard,
  .reports-dashboard,
  .traffic-compare-grid,
  .reports-top-grid,
  .insights-grid,
  .hero-metrics,
  .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .productivity-goals-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .goal-panel {
    grid-template-columns: 1fr;
  }

  .focus-start-card {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-plans {
    grid-template-columns: 1fr;
  }

  .platforms-layout {
    grid-template-columns: 1fr;
  }

  .project-hero,
  .project-platform-card,
  .project-settings-form {
    grid-template-columns: 1fr;
  }

  .project-hero-actions {
    justify-content: flex-start;
  }

  .project-create,
  .knowledge-form,
  .resources-form,
  .projects-list,
  .compact-project-metrics {
    grid-template-columns: 1fr;
  }

  .resources-header,
  .resources-controls,
  .resource-list-item {
    display: grid;
  }

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

  .account-hero-card,
  .account-settings-grid,
  .account-stats-grid,
  .tasks-dashboard,
  .tasks-form,
  .tasks-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .guest-landing {
    padding: 16px;
  }

  .guest-header {
    display: grid;
  }

  .guest-hero {
    padding: 20px;
  }

  .guest-hero h1 {
    font-size: 40px;
  }

  .preview-metrics {
    grid-template-columns: 1fr;
  }

  .app {
    width: 100%;
    padding: 0;
  }

  .header,
  .field-grid,
  .project-create,
  .experiment-create,
    .analytics-form,
    .reports-form,
    .knowledge-form,
    .resources-form,
    .knowledge-dashboard,
    .resources-dashboard,
    .community-stats,
    .community-coming-soon,
    .experiment-stats,
    .experiments-knowledge-grid,
    .analytics-dashboard,
    .reports-dashboard,
    .traffic-compare-grid,
    .reports-top-grid,
    .project-overview-grid,
    .top-project-grid,
    .metric-grid,
    .metric-deltas,
  .goal-controls,
  .stats-grid,
  .profile-grid,
  .account-hero-card,
  .account-stats-grid,
  .account-settings-grid,
  .tasks-dashboard,
  .tasks-form,
  .tasks-controls,
  .productivity-stats,
  .productivity-goals-grid,
  .filters,
  .goal-panel,
  .insights-grid {
    grid-template-columns: 1fr;
  }

  .productivity-goal-card {
    min-height: 108px;
  }

  .header {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .top-header-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .projects-controls,
  .sort-field,
  .project-details-header {
    grid-template-columns: 1fr;
  }

  .resources-grid {
    grid-template-columns: 1fr;
  }

  .platforms-grid,
  .platform-stats-grid,
  .platform-create-v2 {
    grid-template-columns: 1fr;
  }

  .resources-header {
    align-items: stretch;
  }

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

  .project-hero {
    padding: 14px;
  }

  .project-hero h2 {
    font-size: 24px;
  }

  .project-hero-icon,
  .project-hero-placeholder {
    width: 68px;
    height: 68px;
  }

  .project-health-card {
    display: grid;
  }

  .experiment-create textarea,
  .experiment-create .button {
    grid-column: auto;
  }
}

/* ========================================================================
   Design-system compatibility layer. Legacy selectors below are grouped
   with the public CSS API so current markup and future screens stay aligned.
   ======================================================================== */

.ui-card {
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-primary);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.ui-card:hover {
  border-color: #d6deea;
  box-shadow: var(--shadow-hover);
}

.ui-card--blue {
  border-color: #dbeafe;
  background: #eff6ff;
}

.ui-card--green {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.ui-card--orange {
  border-color: #fde68a;
  background: #fffbeb;
}

.ui-card--purple {
  border-color: #e9d5ff;
  background: #faf5ff;
}

.ui-card--neutral {
  border-color: var(--color-border);
  background: var(--color-surface-soft);
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 var(--space-md);
  color: var(--color-text-primary);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.btn-primary {
  color: #fff;
  background: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-secondary {
  border-color: #bfdbfe;
  color: var(--color-primary-hover);
  background: #eff6ff;
}

.btn-success {
  color: #fff;
  background: var(--color-success);
}

.btn-success:hover {
  background: #15803d;
}

.btn-danger {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fef2f2;
}

.btn-ghost {
  border-color: var(--color-border);
  color: var(--color-text-secondary);
  background: transparent;
}

.btn-icon {
  width: 42px;
  padding: 0;
}

.btn:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.ui-page-title {
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.ui-section-title {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.ui-card-title {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.ui-body {
  color: var(--color-text-primary);
  font-size: 15px;
  line-height: 1.55;
}

.ui-secondary {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.ui-caption {
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.status-badge {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border: 0;
  border-radius: 999px;
  padding: 0 var(--space-sm);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.status-active {
  color: #166534;
  background: #dcfce7;
}

.status-warning {
  color: #92400e;
  background: #fef3c7;
}

.status-danger {
  color: #b91c1c;
  background: #fee2e2;
}

.status-neutral {
  color: #475569;
  background: #f1f5f9;
}

.status-info {
  color: #1d4ed8;
  background: #dbeafe;
}

.header {
  min-height: 84px;
  margin-bottom: 28px;
  padding: 18px 0;
  border-color: var(--color-border);
  background: rgba(244, 246, 251, 0.88);
  box-shadow: none;
}
.header h1 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.035em; }
.eyebrow { color: var(--color-text-secondary); font-size: 11px; letter-spacing: .11em; }
.version-pill { border-color: var(--color-border); color: var(--color-text-secondary); background: var(--color-surface); }

.app-sidebar {
  width: var(--sidebar-width);
  gap: 12px;
  padding: 14px 10px 12px;
  border: 0;
  background: var(--color-sidebar);
  box-shadow: 12px 0 32px rgba(15, 23, 42, .08);
}
.sidebar-brand { gap: 10px; min-height: 48px; padding: 2px 7px 11px; border-bottom-color: rgba(255,255,255,.1); }
.sidebar-brand strong, .sidebar-user strong { color: #f8fafc; }
.sidebar-brand span, .sidebar-user span, .sidebar-pro-card span { color: var(--color-text-muted); }
.sidebar-brand-copy { display: grid; gap: 2px; min-width: 0; }
.sidebar-brand-copy strong { overflow: hidden; font-size: 14px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-brand-copy span { font-size: 11px; }
.sidebar-logo { width: 34px; height: 34px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 8px 16px rgba(37,99,235,.24); }
.sidebar-logo svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-nav { gap: 3px; padding-right: 0; }
.sidebar-nav .nav-link {
  position: relative;
  grid-template-columns: 27px minmax(0, 1fr);
  min-height: 40px;
  gap: 9px;
  border: 0;
  border-radius: 10px;
  padding: 0 9px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 650;
  transform: none;
}
.sidebar-nav .nav-link::before {
  display: none;
}
.sidebar-nav .nav-link:hover { color: #fff; background: var(--color-sidebar-hover); transform: none; }
.sidebar-nav .nav-link.active { color: #fff; background: rgba(37, 99, 235, .78); }
.sidebar-nav .nav-icon {
  width: 27px !important;
  height: 27px !important;
  min-width: 27px !important;
  min-height: 27px !important;
  display: grid !important;
  visibility: visible !important;
  place-items: center;
  overflow: visible;
  border: 0;
  border-radius: 8px;
  color: currentColor;
  background: transparent;
  opacity: 1 !important;
}
.sidebar-nav .nav-icon svg {
  display: block !important;
  width: 19px !important;
  height: 19px !important;
  min-width: 19px !important;
  min-height: 19px !important;
  overflow: visible;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.sidebar-nav .nav-link:hover .nav-icon, .sidebar-nav .nav-link.active .nav-icon { background: transparent; }
.sidebar-bottom { gap: 6px; padding: 9px 0 0; border-top-color: rgba(255,255,255,.1); }
.sidebar-pro-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 6px;
  padding: 8px 9px;
  border: 1px solid rgba(96,165,250,.2);
  border-radius: 10px;
  background: rgba(30,41,59,.72);
  box-shadow: none;
}
.sidebar-pro-card strong { color: #f8fafc; font-size: 12px; }
.sidebar-pro-card > span { display: none; }
.sidebar-pro-card .button { min-height: 30px; padding: 0 9px; border-radius: 8px; font-size: 11px; }
.sidebar-feedback, .sidebar-user { border-radius: 12px; color: #e2e8f0; background: transparent; }
.sidebar-feedback:hover, .sidebar-user:hover { background: rgba(255,255,255,.075); }
.sidebar-feedback { min-height: 38px; gap: 8px; padding: 5px 8px; }
.sidebar-feedback-icon { width: 26px; height: 26px; background: rgba(59,130,246,.14); }
.sidebar-feedback-icon svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-feedback > span:last-child { font-size: 12px; }
.sidebar-user { align-items: center; min-height: 44px; padding: 6px 8px; }
.sidebar-avatar { width: 32px; height: 32px; }
.sidebar-user-body { gap: 2px; }
.sidebar-user strong { font-size: 12px; }
.sidebar-user span { font-size: 10px; }
.sidebar-user-settings { display: grid !important; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; color: #94a3b8 !important; }
.sidebar-user-settings svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.ui-card, .panel, .stat-card, .timer-card, .task-card, .project-card, .profile-card,
.account-identity, .account-plan-card, .platform-create, .platform-item, .detail-row,
.project-health-card, .session-summary div, .empty-state, .projects-empty-state,
.community-experiment-card, .community-coming-soon, .reports-chart-panel, .top-list,
.knowledge-item, .resource-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-primary);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}
.panel { padding: var(--space-lg); margin-bottom: var(--space-xl); }
.stat-card { min-height: 116px; padding: var(--space-lg); box-shadow: none; }
.stat-card span, .field span, .timer-label, .panel-title span, .session-summary span,
.section-subtitle, .task-card-head span, .task-meta, .project-description,
.project-metric span, .profile-card span, .detail-row, .platform-card-v2 p,
.platform-meta-grid span { color: var(--color-text-secondary); }
.stat-card strong { color: var(--color-text-primary); letter-spacing: -.03em; }
.panel-title { margin-bottom: var(--space-md); }
.panel-title h2 { font-size: 22px; letter-spacing: -.025em; }

input, select, textarea, .compact-select, .platform-select {
  min-height: 44px;
  border: 1px solid var(--color-border) !important;
  border-radius: 10px !important;
  color: var(--color-text-primary) !important;
  background: var(--color-surface-soft) !important;
  box-shadow: none;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
textarea {
  min-height: 96px;
}
input:hover, select:hover, textarea:hover, .platform-select:hover { border-color: #cbd5e1 !important; background: var(--color-surface) !important; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .platform-select:focus-visible, button:focus-visible, a:focus-visible {
  outline: none;
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,.16) !important;
}
input:disabled, select:disabled, textarea:disabled {
  color: var(--color-text-muted) !important;
  background: #eef2f7 !important;
  cursor: not-allowed;
  opacity: .72;
}
.btn, .button { min-height: 42px; border-radius: 10px; padding: 0 var(--space-md); font-size: 14px; font-weight: 700; transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.btn:hover:not(:disabled), .button:hover:not(:disabled) { box-shadow: 0 4px 12px rgba(15,23,42,.08); }
.btn-primary, .button.primary, .primary { color: #fff; background: var(--color-primary); box-shadow: 0 7px 14px rgba(37,99,235,.18); }
.btn-primary:hover, .button.primary:hover, .primary:hover { background: var(--color-primary-hover); }
.btn-secondary, .button.secondary, .secondary { border-color: #bfdbfe; color: var(--color-primary-hover); background: #eff6ff; }
.btn-success { color: #fff; background: var(--color-success); }
.btn-danger, .button.danger, .danger { border-color: #fecaca; color: #b91c1c; background: #fef2f2; }
.btn-ghost, .button.ghost, .ghost { border-color: var(--color-border); color: var(--color-text-secondary); background: var(--color-surface); }
.btn-icon { width: 42px; padding: 0; }
.btn:disabled, .button:disabled { cursor: not-allowed; opacity: .5; }
.tiny-button, .segment, .quick-goal, .status-filter, .project-tab { border-color: var(--color-border); color: var(--color-text-secondary); background: var(--color-surface); }
.tiny-button:hover, .segment:hover, .quick-goal:hover, .status-filter:hover { border-color: #93c5fd; color: var(--color-primary-hover); background: #eff6ff; }

.dashboard-summary-panel { border: 0; padding: 0; background: transparent; box-shadow: none; }
.dashboard-hero { gap: 22px; margin-bottom: 28px; }
.hero-greeting { color: #172033; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.04em; }
.hero-head .dashboard-summary-compact { color: #718096; font-size: 14px; }
.hero-metrics { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.hero-metric { position: relative; min-height: 142px; gap: 8px; overflow: hidden; border: 0; border-radius: 18px; padding: 20px; box-shadow: var(--shadow-card); }
.hero-metric::before { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 2px; border-radius: 11px; color: currentColor; font-weight: 900; content: ""; }
.hero-metric:nth-child(1) { color: #1d4ed8; background: #e8f1ff; }.hero-metric:nth-child(1)::before { content: "▦"; background: #d7e7ff; }
.hero-metric:nth-child(2) { color: #047857; background: #e7f9ef; }.hero-metric:nth-child(2)::before { content: "↗"; background: #d4f5e1; }
.hero-metric:nth-child(3) { color: #b45309; background: #fff5dd; }.hero-metric:nth-child(3)::before { content: "✓"; background: #ffebbf; }
.hero-metric:nth-child(4) { color: #7e22ce; background: #f5ecff; }.hero-metric:nth-child(4)::before { content: "◈"; background: #ead7ff; }
.hero-metric strong { color: currentColor; font-size: clamp(24px,2.5vw,32px); }.hero-metric span { color: currentColor; font-weight: 700; }.hero-metric small { color: currentColor; opacity: .72; font-size: 12px; }
.dashboard-v2-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.dashboard-v2-card { display:grid; gap:7px; min-height:148px; border-radius:18px; padding:20px; box-shadow:var(--shadow-card); }
.dashboard-v2-card > span:not(.dashboard-v2-icon) { font-size:13px; font-weight:750; }.dashboard-v2-card strong { font-size:clamp(26px,3vw,34px); line-height:1; letter-spacing:-.04em; }.dashboard-v2-card small { font-size:12px; opacity:.72; }
.dashboard-v2-icon { display:grid; place-items:center; width:34px; height:34px; border-radius:11px; }.dashboard-v2-icon svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.dashboard-v2-projects { color:#1d4ed8; background:#e8f1ff; }.dashboard-v2-projects .dashboard-v2-icon { background:#d7e7ff; }.dashboard-v2-revenue { color:#047857; background:#e7f9ef; }.dashboard-v2-revenue .dashboard-v2-icon { background:#d4f5e1; }
.focus-start-card { border: 0; border-radius: var(--radius-card); background: #172033; box-shadow: 0 16px 32px rgba(15,23,42,.13); }.focus-start-body strong { color: #fff; }.focus-start-meta { color: #cbd5e1; }.focus-start-label { color: #86efac; }
.dashboard-hub { display:grid; gap:16px; }
.hub-grid { gap:14px; }
.hub-tile { border:1px solid #edf0f5; border-radius:14px; background:#fff; box-shadow:none; transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.hub-tile:hover { border-color:#bfdbfe; background:#fff; box-shadow:var(--shadow-card); transform:translateY(-2px); }
.hub-icon { color:#2563eb; background:#eff6ff; }

.goal-panel, .dashboard, .insights-grid { gap: 24px; }
.goal-panel { border: 0; background: transparent; box-shadow: none; }
.goal-column { border: 1px solid #edf0f5; border-radius: var(--radius-card); padding: 24px; background: #fff; box-shadow: var(--shadow-card); }
.tracker-panel, .session-panel, .today-tasks-panel { border-radius: var(--radius-card); }

.tasks-dashboard, .analytics-dashboard, .knowledge-dashboard, .resources-dashboard,
.reports-dashboard, .productivity-stats, .experiment-stats { gap: 16px; }
.tasks-dashboard .stat-card, .analytics-dashboard .stat-card, .knowledge-dashboard .stat-card,
.resources-dashboard .stat-card, .reports-dashboard .stat-card, .productivity-stats .stat-card,
.experiment-stats .stat-card, .community-stats .stat-card { border-radius: 15px; background: #fff; }
.task-card { gap: var(--space-md); border-left: 4px solid #93c5fd; padding: var(--space-lg); }
.task-card:hover, .project-card:hover { box-shadow: var(--shadow-hover); }
.priority-badge, .status-badge, .platform-status {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border: 0;
  border-radius: 999px;
  padding: 0 var(--space-sm);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.priority-high, .status-danger, .status-rejected, .status-failed { color: #b91c1c; background: #fee2e2; }
.priority-medium, .status-warning, .status-in_review, .status-running { color: #92400e; background: #fef3c7; }
.priority-low, .status-active, .status-done, .status-published, .status-success { color: #166534; background: #dcfce7; }
.status-info, .status-todo, .status-in_progress { color: #1d4ed8; background: #dbeafe; }
.status-neutral, .status-cancelled, .status-draft, .status-archived { color: #475569; background: #f1f5f9; }

.projects-list { gap: 18px; }.project-card { padding: 20px; transition: transform .18s ease, box-shadow .18s ease; }.compact-project-metrics .project-metric { border-color:#edf0f5; border-radius:12px; background:#f8fafc; }.clickable-project-card:hover,.clickable-project-card:focus { border-color:#bfdbfe; background:#fff; }.project-hero { border:0; border-radius:20px; padding:26px; background:linear-gradient(135deg,#eef6ff,#fff); box-shadow:var(--shadow-card); }.project-hero h2 { color:#172033; }.project-hero-meta span,.project-hero-meta a { border:0; color:#475569; background:#f1f5f9; }.project-details-tabs { border:0; border-radius:14px; padding:5px; background:#f1f5f9; }.project-tab { border:0; border-radius:10px; background:transparent; }.project-tab.active { color:#1d4ed8; background:#fff; box-shadow:0 2px 5px rgba(30,41,59,.08); }

.productivity-panel, .reports-panel, .community-panel, .resources-panel, .knowledge-panel, .experiments-panel, .tasks-panel { border-radius: var(--radius-card); }.reports-chart-panel,.top-list { padding:22px; }.reports-chart, .calendar-month, .productivity-chart { border-color:#edf0f5; background:#fff; }.community-experiment-card { padding:20px; }.community-feed { gap:16px; }.resources-feed.resources-grid { gap:18px; }.resource-card { overflow:hidden; transition:transform .18s ease,box-shadow .18s ease; }.resource-card:hover { transform:translateY(-2px); box-shadow:0 16px 28px rgba(30,41,59,.1); }

.modal-card { border:1px solid #edf0f5; border-radius:20px; color:var(--text); background:#fff; box-shadow:0 24px 72px rgba(15,23,42,.22); }.modal-backdrop { background:rgba(15,23,42,.42); }.account-identity,.account-plan-card { border-radius:18px; }.profile-card { border-radius:14px; }.plan-badge { border:0; color:#047857; background:#dcfce7; }

.guest-card, .module-card, .guest-preview-card {
  border-color: var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

@media (max-width: 1180px) { .hero-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 900px) { .app-main { width:min(100% - 32px, 920px); }.app-sidebar { width:min(248px, 86vw); background:var(--color-sidebar); }.header { margin-bottom:20px; }.panel { padding:20px; }.sidebar-nav .nav-icon { display:grid !important; } }
@media (max-width: 620px) { .app-main { width:calc(100% - 24px); padding-top:4px; }.header { position:relative; min-height:64px; }.header .eyebrow,.version-pill { display:none; }.header h1 { font-size:27px; }.hero-metrics { grid-template-columns:1fr; }.hero-metric { min-height:124px; }.goal-column,.panel { padding:16px; }.focus-start-card { align-items:flex-start; flex-direction:column; }.focus-start-card .button { width:100%; }.tasks-dashboard,.analytics-dashboard,.knowledge-dashboard,.resources-dashboard,.reports-dashboard,.productivity-stats,.experiment-stats,.community-stats { grid-template-columns:1fr; } }

/* Guest landing contrast and surface corrections for the v2 light theme. */
.guest-landing {
  color: var(--color-text-primary);
  background:
    radial-gradient(circle at 50% 0, rgba(59, 130, 246, .08), transparent 34rem),
    var(--color-page-bg);
}

.guest-header {
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-card);
}

.guest-brand {
  color: var(--color-text-primary);
}

.guest-language-switch {
  border-color: var(--color-border);
  background: #eef2f7;
}

.language-tab {
  color: var(--color-text-secondary);
}

.language-tab.active {
  color: #fff;
  background: #16a34a;
}

.guest-hero {
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  color: #f8fafc;
  background:
    radial-gradient(circle at 74% 24%, rgba(34, 197, 94, .18), transparent 20rem),
    linear-gradient(135deg, #172033 0%, #24324a 100%);
  box-shadow: 0 28px 70px rgba(15, 23, 42, .2);
}

.guest-hero h1,
.guest-hero .guest-preview-card strong {
  color: #f8fafc;
}

.guest-hero .eyebrow {
  color: #7dd3fc;
}

.guest-hero .guest-lead,
.guest-hero .guest-small {
  color: #cbd5e1;
}

.guest-hero .auth-status {
  border-color: rgba(125, 211, 252, .26);
  color: #e0f2fe;
  background: rgba(56, 189, 248, .1);
}

.guest-hero .guest-preview-card {
  border: 1px solid rgba(255, 255, 255, .12);
  color: #f8fafc;
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 22px 48px rgba(2, 6, 23, .22);
  backdrop-filter: blur(12px);
}

.guest-hero .preview-header span,
.guest-hero .preview-metrics span {
  color: #cbd5e1;
}

.guest-hero .preview-metrics div {
  border-color: rgba(255, 255, 255, .1);
  color: #f8fafc;
  background: rgba(15, 23, 42, .42);
}

.guest-section {
  border-radius: 20px;
}

.guest-modules {
  padding: 34px 22px;
  background: transparent;
}

.guest-modules-head h2,
.module-card h3,
.why-dev-tracker strong,
.pricing-card h2,
.pricing-card > strong {
  color: #172033;
}

.guest-modules-head .guest-lead,
.module-card p,
.guest-card span,
.pricing-card li {
  color: #64748b;
}

.module-card {
  border-color: #e8edf4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(30, 41, 59, .07);
}

.module-card:hover {
  border-color: #bfdbfe;
  background: #fff;
  box-shadow: 0 16px 34px rgba(30, 41, 59, .11);
}

.module-icon {
  border-color: #dbeafe;
  color: #2563eb;
  background: #eff6ff;
}

.product-preview,
.built-for {
  border: 0;
  border-radius: 20px;
  color: #f8fafc;
  background: linear-gradient(135deg, #25324a, #36435a);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .13);
}

.product-preview h2,
.built-for h2 {
  color: #f8fafc;
}

.product-preview p,
.built-for li {
  color: #cbd5e1;
}

.product-preview .eyebrow,
.built-for .eyebrow {
  color: #7dd3fc;
}

.product-preview .preview-table {
  border-color: rgba(255, 255, 255, .12);
  color: #f8fafc;
  background: rgba(15, 23, 42, .55);
  box-shadow: none;
}

.product-preview .preview-table div {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .06);
}

.product-preview .preview-table span {
  color: #cbd5e1;
}

.product-preview .preview-table strong {
  color: #86efac;
}

.why-dev-tracker {
  padding: 0;
  background: transparent;
}

.why-dev-tracker .guest-card {
  min-height: 138px;
  border-color: #e8edf4;
  border-radius: 16px;
  background: #fff;
}

.why-dev-tracker .accent-card {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.pricing-section {
  padding: 0;
  background: transparent;
}

.pricing-card {
  border: 1px solid #e8edf4;
  border-radius: 20px;
  color: #172033;
  background: #fff;
  box-shadow: 0 16px 40px rgba(30, 41, 59, .08);
}

.pricing-card.pro-card {
  border-color: #86efac;
  background: linear-gradient(145deg, #f0fdf4, #ecfdf5);
}

.pricing-badge {
  color: #fff;
  background: #16a34a;
}

.guest-final-cta h2 {
  color: #172033;
}

@media (max-width: 620px) {
  .guest-header {
    padding: 12px;
  }

  .guest-hero {
    border-radius: 18px;
  }

  .guest-modules {
    padding: 24px 12px;
  }
}

/* Dashboard workday layout */
.dashboard-sidebar-create {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
}

.dashboard-sidebar-create svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app[data-route="dashboard"] .dashboard-sidebar-create {
  display: inline-flex;
}

.dashboard-workday {
  display: grid;
  gap: 18px;
  padding: 0;
  margin-bottom: 24px;
}

.dashboard-legacy-compat {
  display: none !important;
}

.dashboard-legacy-compat .hero-metric::before {
  content: none !important;
}

.dashboard-welcome {
  min-height: 112px;
  display: flex;
  align-items: center;
  padding: 24px 28px;
  border: 1px solid #dbeafe;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 85% 0, rgba(37, 99, 235, .14), transparent 42%),
    linear-gradient(135deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow-card);
}

.dashboard-welcome > div {
  display: grid;
  gap: 5px;
}

.dashboard-welcome-kicker {
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.dashboard-welcome h2 {
  color: var(--color-text-primary);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.035em;
}

.dashboard-welcome p:last-child {
  color: var(--color-text-secondary);
  font-size: 14px;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-metric {
  min-height: 112px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 17px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.dashboard-metric > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dashboard-metric-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, .62);
}

.dashboard-metric-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-metric span {
  color: currentColor;
  font-size: 12px;
  font-weight: 750;
}

.dashboard-metric strong {
  color: currentColor;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}

.dashboard-metric small {
  overflow: hidden;
  color: currentColor;
  font-size: 11px;
  line-height: 1.3;
  opacity: .72;
  text-overflow: ellipsis;
}

.dashboard-metric-blue { color: #1d4ed8; border-color: #dbeafe; background: #eff6ff; }
.dashboard-metric-orange { color: #b45309; border-color: #fde7c2; background: #fff7ed; }
.dashboard-metric-green { color: #047857; border-color: #d1fae5; background: #ecfdf5; }
.dashboard-metric-purple { color: #7e22ce; border-color: #eadcff; background: #faf5ff; }

.today-workspace-section {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr);
  grid-template-areas:
    "heading heading"
    "timer goal";
  gap: 18px;
  padding: 22px;
}

.today-workspace-heading {
  grid-area: heading;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.today-workspace-heading > div {
  display: grid;
  gap: 4px;
}

.today-workspace-heading h2 {
  font-size: 22px;
  letter-spacing: -.025em;
}

.today-workspace-heading p:last-child {
  color: var(--color-text-secondary);
  font-size: 13px;
}

.today-workspace-section > .dashboard {
  grid-area: timer;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 12px;
  margin: 0;
}

.today-workspace-section > .goal-panel {
  grid-area: goal;
  display: block;
  min-width: 0;
  padding: 18px;
  margin: 0;
  border-color: #dbeafe;
  background: #f8fbff;
  box-shadow: none;
}

.today-workspace-section .tracker-panel,
.today-workspace-section .session-panel {
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.today-workspace-section .tracker-panel {
  display: grid;
  gap: 13px;
}

.today-workspace-section .field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.today-workspace-section .timer-card {
  gap: 12px;
  padding: 22px;
  margin: 0;
  border-color: #dbeafe;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #f8fbff, #eef5ff);
}

.today-workspace-section .timer {
  color: #172033;
  font-size: clamp(48px, 6vw, 72px);
  letter-spacing: -.045em;
}

.today-workspace-section .session-panel {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 11px;
  background: var(--color-surface-soft);
}

.today-workspace-section .session-panel .panel-title {
  align-items: center;
  margin: 0;
}

.today-workspace-section .session-panel h2 {
  font-size: 14px;
}

.today-workspace-section:not(.session-active) .session-summary,
.today-workspace-section:not(.session-active) .session-actions {
  display: none;
}

.today-workspace-section .session-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.today-workspace-section .session-summary > div {
  min-height: 58px;
  padding: 10px;
  border-radius: 9px;
  background: var(--color-surface);
}

.today-workspace-section .session-actions {
  margin-top: 0;
}

.today-workspace-section .goal-column {
  gap: 14px;
}

.today-workspace-section .goal-column > .panel-title {
  margin-bottom: 12px;
}

.today-workspace-section .goal-controls {
  grid-template-columns: minmax(0, 1fr);
}

.today-workspace-section .goal-controls .button {
  width: 100%;
}

.today-workspace-section .quick-goals {
  gap: 7px;
}

.today-workspace-section .quick-goal {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.today-workspace-section .goal-progress {
  padding-top: 4px;
}

.today-tasks-panel {
  padding: 22px;
}

.today-tasks-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.today-tasks-panel .compact-tasks-list {
  display: grid;
  gap: 10px;
}

.today-tasks-panel .task-card.compact {
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: none;
}

.today-tasks-panel .empty-state {
  min-height: 128px;
  place-content: center;
  text-align: center;
}

.dashboard-productivity-summary {
  display: none;
}

.app[data-route="dashboard"] .productivity-panel {
  padding: 22px;
}

.app[data-route="dashboard"] .dashboard-productivity-summary {
  display: grid;
  gap: 16px;
}

.app[data-route="dashboard"] .productivity-header,
.app[data-route="dashboard"] .productivity-stats,
.app[data-route="dashboard"] .productivity-goals,
.app[data-route="dashboard"] .calendar-legend {
  display: none;
}

.dashboard-productivity-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-productivity-heading > div {
  display: grid;
  gap: 4px;
}

.dashboard-productivity-heading h2 {
  font-size: 22px;
  letter-spacing: -.025em;
}

.dashboard-productivity-heading p:last-child {
  color: var(--color-text-secondary);
  font-size: 13px;
}

.dashboard-productivity-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-productivity-metrics > div {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface-soft);
}

.dashboard-productivity-metrics span {
  color: var(--color-text-secondary);
  font-size: 11px;
}

.dashboard-productivity-metrics strong {
  color: var(--color-text-primary);
  font-size: 17px;
}

.app[data-route="dashboard"] .productivity-panel .calendar-scroll {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 1180px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .today-workspace-section {
    grid-template-columns: 1fr;
    grid-template-areas:
      "heading"
      "timer"
      "goal";
  }
}

@media (max-width: 620px) {
  .dashboard-welcome {
    min-height: 96px;
    padding: 20px;
  }

  .dashboard-welcome h2 {
    font-size: 25px;
  }

  .dashboard-metrics,
  .dashboard-productivity-metrics {
    grid-template-columns: 1fr;
  }

  .dashboard-metric {
    min-height: 98px;
  }

  .today-workspace-section,
  .today-tasks-panel,
  .app[data-route="dashboard"] .productivity-panel {
    padding: 16px;
  }

  .today-workspace-heading,
  .dashboard-productivity-heading,
  .today-tasks-panel .panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .today-workspace-section .field-grid {
    grid-template-columns: 1fr;
  }

  .today-workspace-section .timer {
    font-size: clamp(42px, 15vw, 60px);
  }

  .today-workspace-section .session-summary {
    grid-template-columns: 1fr;
  }

  .today-tasks-actions {
    justify-content: space-between;
  }

  .dashboard-productivity-heading .button {
    width: 100%;
  }
}

/* Light theme visual polish: keep legacy selectors on the shared token system. */
body,
.app {
  color: var(--color-text-primary);
  background: var(--color-page-bg);
}

.header {
  background: rgba(244, 247, 251, .9);
}

.app-sidebar {
  border-right: 1px solid var(--color-sidebar-border);
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  box-shadow: 12px 0 32px rgba(15, 23, 42, .08);
}

.sidebar-brand,
.sidebar-bottom {
  border-color: var(--color-sidebar-border);
}

.sidebar-brand strong,
.sidebar-user strong {
  color: #e2e8f0;
}

.sidebar-brand span,
.sidebar-user span,
.sidebar-pro-card span {
  color: #94a3b8;
}

.sidebar-nav {
  gap: 4px;
}

.sidebar-nav .nav-link {
  grid-template-columns: 27px minmax(0, 1fr);
  min-height: 44px;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  color: #e2e8f0;
  background: transparent;
  font-size: 14px;
  font-weight: 650;
  box-shadow: none;
}

.sidebar-nav .nav-link .nav-icon {
  color: #94a3b8;
}

.sidebar-nav .nav-link:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, .06);
  box-shadow: none;
}

.sidebar-nav .nav-link:hover .nav-icon {
  color: #cbd5e1;
}

.sidebar-nav .nav-link.active {
  color: #fff;
  background: var(--color-sidebar-active);
  box-shadow: 0 6px 18px rgba(37, 99, 235, .24);
}

.sidebar-nav .nav-link.active .nav-icon {
  color: #fff;
}

.sidebar-nav .nav-icon,
.sidebar-nav .nav-icon svg {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.sidebar-nav .nav-icon svg {
  width: 19px !important;
  height: 19px !important;
  min-width: 19px !important;
  min-height: 19px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
}

.sidebar-pro-card {
  border-color: rgba(148, 163, 184, .16);
  background: var(--color-sidebar-surface);
}

.sidebar-feedback,
.sidebar-user {
  color: #e2e8f0;
}

.sidebar-feedback:hover,
.sidebar-user:hover {
  background: rgba(255, 255, 255, .06);
}

.ui-card,
.panel,
.stat-card,
.timer-card,
.task-card,
.project-card,
.profile-card,
.account-identity,
.account-plan-card,
.platform-create,
.platform-item,
.detail-row,
.project-health-card,
.session-summary div,
.empty-state,
.projects-empty-state,
.community-experiment-card,
.community-coming-soon,
.reports-chart-panel,
.reports-chart,
.traffic-card,
.top-list,
.knowledge-card,
.knowledge-item,
.resource-card,
.experiment-card,
.day-details-summary,
.day-log-item,
.log-item,
.public-post,
.category-row {
  border-color: var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-primary);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.ui-card:hover,
.task-card:hover,
.project-card:hover,
.profile-card:hover,
.community-experiment-card:hover,
.knowledge-card:hover,
.resource-card:hover,
.experiment-card:hover {
  transform: none;
  box-shadow: var(--shadow-hover);
}

.empty-state,
.projects-empty-state {
  border-style: dashed;
  color: var(--color-text-secondary);
  background: var(--color-surface-soft);
  box-shadow: none;
}

.empty-state strong,
.projects-empty-state strong {
  color: var(--color-text-primary);
}

.dashboard-metric-blue,
.ui-card--blue {
  color: #1d4ed8;
  border-color: #dbeafe;
  background: #eff6ff;
}

.dashboard-metric-green,
.ui-card--green {
  color: #047857;
  border-color: #d1fae5;
  background: #ecfdf5;
}

.dashboard-metric-orange,
.ui-card--orange {
  color: #b45309;
  border-color: #fed7aa;
  background: #fff7ed;
}

.dashboard-metric-purple,
.ui-card--purple {
  color: #7c3aed;
  border-color: #eadcff;
  background: #faf5ff;
}

input,
select,
textarea,
.compact-select,
.onboarding-select,
.platform-select {
  border-color: var(--color-control-border) !important;
  color: var(--color-text-primary) !important;
  background: var(--color-surface) !important;
}

input:hover,
select:hover,
textarea:hover,
.compact-select:hover,
.onboarding-select:hover,
.platform-select:hover {
  border-color: #cbd5e1 !important;
  background: var(--color-surface) !important;
}

input:focus,
select:focus,
textarea:focus,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.compact-select:focus-visible,
.onboarding-select:focus-visible,
.platform-select:focus-visible {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12) !important;
}

.btn-primary,
.button.primary,
.primary {
  border-color: transparent;
  color: #fff;
  background: var(--color-primary);
}

.btn-primary:hover:not(:disabled),
.button.primary:hover:not(:disabled),
.primary:hover:not(:disabled) {
  color: #fff;
  background: var(--color-primary-hover);
}

.btn-secondary,
.button.secondary,
.secondary {
  border: 1px solid var(--color-control-border);
  color: #334155;
  background: #fff;
}

.btn-secondary:hover:not(:disabled),
.button.secondary:hover:not(:disabled),
.secondary:hover:not(:disabled) {
  border-color: #bfdbfe;
  color: var(--color-primary-hover);
  background: #eff6ff;
}

.btn-danger,
.button.danger,
.danger {
  border: 1px solid #fecdd3;
  color: #dc2626;
  background: #fff1f2;
}

.btn-danger:hover:not(:disabled),
.button.danger:hover:not(:disabled),
.danger:hover:not(:disabled) {
  border-color: #fda4af;
  color: #b91c1c;
  background: #ffe4e6;
}

.btn-ghost,
.button.ghost,
.ghost,
.tiny-button,
.segment,
.quick-goal,
.quick-category,
.status-filter,
.project-tab,
.resource-tab {
  border-color: var(--color-control-border);
  color: #334155;
  background: #fff;
}

.quick-category:hover,
.status-filter:hover,
.resource-tab:hover {
  border-color: #93c5fd;
  color: var(--color-primary-hover);
  background: #eff6ff;
}

.quick-category.active,
.status-filter.active,
.resource-tab.active,
.segment.active {
  border-color: transparent;
  color: #fff;
  background: var(--color-primary);
}

.resource-action {
  border-color: var(--color-control-border);
  color: #475569;
  background: #fff;
  box-shadow: none;
}

.resource-action:hover {
  transform: none;
}

.resource-action.open {
  border-color: #bbf7d0;
  color: #15803d;
  background: #f0fdf4;
}

.resource-action.favorite,
.resource-action.favorite.active {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

.resource-action.edit {
  color: #475569;
}

.resource-action.delete {
  border-color: #fecdd3;
  color: #dc2626;
  background: #fff1f2;
}

.segmented,
.project-details-tabs {
  border-color: var(--color-border);
  background: var(--color-surface-soft);
}

.platform-dropdown {
  border-color: var(--color-border);
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
}

.platform-dropdown-item {
  color: var(--color-text-primary);
}

.platform-dropdown-item:hover {
  color: var(--color-primary-hover);
  background: #eff6ff;
}

.goal-track {
  background: #e8edf5;
}

.calendar-day,
.calendar-legend i {
  border-color: #dbe3ef;
  background: #e8edf5;
}

.calendar-day:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

.calendar-day.level-1,
.calendar-legend .level-1 {
  background: #bbf7d0;
}

.calendar-day.level-2,
.calendar-legend .level-2 {
  background: #4ade80;
}

.calendar-day.level-3,
.calendar-legend .level-3 {
  background: #22c55e;
}

.calendar-day.level-4,
.calendar-legend .level-4,
.calendar-day.level-5,
.calendar-legend .level-5 {
  background: #15803d;
}

.modal-card {
  border-color: var(--color-border);
  color: var(--color-text-primary);
  background: #fff;
  box-shadow: 0 24px 72px rgba(15, 23, 42, .22);
}

@media (max-width: 900px) {
  .app-sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  }
}

/* Compact dashboard and task workspace. Scoped to preserve other pages. */
.app[data-route="resources"] .header { position: relative; margin-bottom: 16px; }
.resources-panel .resources-header { padding-top: 4px; align-items: flex-start; }
.resources-panel .resources-header .section-subtitle { margin-top: 6px; line-height: 1.5; }
.report-form-error { flex-basis: 100%; margin: 0 0 8px; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 8px; color: #991b1b; background: #fef2f2; font-size: 13px; line-height: 1.5; }
.app:is([data-route="dashboard"], [data-route="tasks"]) .header {
  position: relative;
  min-height: 48px;
  margin-bottom: 14px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.app:is([data-route="dashboard"], [data-route="tasks"]) .header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.app:is([data-route="dashboard"], [data-route="tasks"]) .top-header-meta {
  display: none;
}

.app[data-route="dashboard"] .dashboard-workday { gap: 12px; margin-bottom: 16px; }
.app[data-route="dashboard"] .dashboard-welcome { min-height: 0; padding: 18px 22px; }
.app[data-route="dashboard"] .dashboard-welcome h2 { font-size: clamp(23px, 2.2vw, 28px); }
.app[data-route="dashboard"] .dashboard-metrics { gap: 12px; }
.app[data-route="dashboard"] .dashboard-metric { min-height: 96px; gap: 10px; padding: 15px; }
.app[data-route="dashboard"] .dashboard-metric strong { font-size: 25px; line-height: 1.15; }

/* The wrapper must not remain as an empty panel when its children are hidden. */
.app:not([data-route="dashboard"]):not([data-route="tasks"]) .today-workspace-section {
  display: none;
}

.workspace-open-button { display: none; }
.app[data-route="tasks"] .today-workspace-section {
  display: block;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-color: var(--color-border);
  background: #f8fafc;
  box-shadow: none;
}
.app[data-route="tasks"] .today-workspace-heading {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0;
  border: 0;
}
.app[data-route="tasks"] .today-workspace-heading h2 { font-size: 13px; font-weight: 650; }
.app[data-route="tasks"] .today-workspace-heading p { display: none; }
.app[data-route="tasks"] .today-workspace-heading > .status-badge { margin-left: auto; }
.app[data-route="tasks"] .workspace-open-button { display: inline-flex; min-height: 34px; padding: 6px 12px; }
.app[data-route="tasks"] .today-workspace-section > .dashboard,
.app[data-route="tasks"] .today-workspace-section > .goal-panel { display: none; }

.app[data-route="tasks"] .tasks-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.tasks-panel .tasks-dashboard {
  gap: 0;
  margin-bottom: 16px;
  padding: 14px 0;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
}
.tasks-panel .tasks-dashboard .stat-card {
  min-height: 0;
  gap: 5px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.tasks-panel .tasks-dashboard .stat-card:last-child { border-right: 0; }
.tasks-panel .tasks-dashboard .stat-card span { font-size: 12px; line-height: 1.4; }
.tasks-panel .tasks-dashboard .stat-card strong { font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tasks-panel .tasks-form {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.7fr) minmax(0, .8fr) minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
}
.tasks-form-heading { grid-column: 1 / -1; margin: 0; font-size: 15px; line-height: 1.4; }
.tasks-panel .field { min-width: 0; gap: 6px; }
.tasks-panel .field > span { color: var(--color-text-secondary); font-size: 12px; font-weight: 600; }
.tasks-panel :is(input, select, textarea) { min-width: 0; width: 100%; min-height: 40px; padding: 9px 11px; font-size: 13px; }
.tasks-panel .task-description-field { grid-column: 1 / 4; }
.tasks-panel textarea { min-height: 54px; resize: vertical; line-height: 1.4; }
.tasks-panel #saveTaskButton { min-height: 40px; margin-bottom: 7px; padding: 10px 14px; font-size: 13px; }
.tasks-panel .tasks-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 12px; margin-bottom: 16px; }
.tasks-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tasks-list-heading h2 { margin: 0; font-size: 15px; }
.tasks-list-heading > span { color: var(--color-text-secondary); font-size: 12px; }
.tasks-panel .tasks-list { gap: 10px; }
.tasks-panel .task-card { gap: 10px; padding: 16px 18px; border-radius: 12px; background: #fff; box-shadow: none; }
.tasks-panel .task-card-head { flex-wrap: wrap; gap: 12px; }
.tasks-panel .task-card-head > div:first-child { flex: 1 1 240px; min-width: 0; }
.tasks-panel .task-card-head strong { font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.tasks-panel .task-card-head > div:first-child > span { color: var(--color-text-secondary); font-size: 12px; }
.tasks-panel .task-badges { align-items: center; flex-wrap: wrap; gap: 6px; }
.tasks-panel :is(.priority-badge, .status-badge) { min-height: 25px; padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 650; line-height: 1.3; }
.tasks-panel .task-description { font-size: 13px; overflow-wrap: anywhere; }
.tasks-panel .task-meta { gap: 16px; font-size: 12px; }
.tasks-panel .task-actions { gap: 8px; padding-top: 10px; border-top: 1px solid var(--color-border); }
.tasks-panel .task-actions .tiny-button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 6px 11px; border: 1px solid var(--color-border); border-radius: 7px; color: var(--color-text-secondary); background: #fff; font-size: 12px; font-weight: 600; }
.tasks-panel .task-actions [data-task-start] { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.tasks-panel .task-actions [data-task-complete] { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.tasks-panel .task-actions [data-task-delete] { color: #b91c1c; border-color: #fecaca; background: #fff; }
.tasks-panel .task-actions .tiny-button:hover { filter: brightness(.97); }

@media (max-width: 1100px) {
  .app[data-route="dashboard"] .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tasks-panel .tasks-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tasks-panel .task-description-field { grid-column: 1 / -1; }
  .tasks-panel #saveTaskButton { justify-self: start; margin: 0; }
}

@media (max-width: 620px) {
  .app:is([data-route="dashboard"], [data-route="tasks"]) .header { min-height: 42px; margin-bottom: 10px; }
  .app:is([data-route="dashboard"], [data-route="tasks"]) .header h1 { font-size: 24px; }
  .app[data-route="dashboard"] .dashboard-welcome { padding: 16px; }
  .app[data-route="dashboard"] .dashboard-metric { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .app[data-route="dashboard"] .dashboard-metric small { white-space: normal; }
  .app[data-route="tasks"] .today-workspace-heading { flex-wrap: wrap; gap: 8px; }
  .app[data-route="tasks"] .today-workspace-heading h2 { font-size: 12px; }
  .app[data-route="tasks"] .today-workspace-heading > .status-badge { margin-left: 0; font-size: 11px; }
  .app[data-route="tasks"] .workspace-open-button { margin-left: auto; min-height: 40px; }
  .tasks-panel .tasks-dashboard { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 0; }
  .tasks-panel .tasks-dashboard .stat-card { padding: 0 12px; border: 0; }
  .tasks-panel .tasks-dashboard .stat-card span { font-size: 11px; }
  .tasks-panel .tasks-form { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .tasks-panel .task-description-field { grid-column: auto; }
  .tasks-panel #saveTaskButton { width: 100%; }
  .tasks-panel .tasks-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tasks-panel .tasks-controls .field:last-child { grid-column: 1 / -1; }
  .tasks-panel .task-card { padding: 14px; }
  .tasks-panel .task-actions .tiny-button { min-height: 40px; }
}



/* Compact page hierarchy, aligned with the dashboard. */
.app:is([data-route="projects"], [data-route="productivity"], [data-route="experiments"]) .header {
  position: relative; min-height: 48px; margin-bottom: 14px; padding: 4px 0;
  border: 0; background: transparent; backdrop-filter: none;
}
.app:is([data-route="projects"], [data-route="productivity"], [data-route="experiments"]) .header h1 {
  margin: 0; font-size: 28px; line-height: 1.2;
}
.app:is([data-route="projects"], [data-route="productivity"], [data-route="experiments"]) .top-header-meta { display: none; }
.app[data-route="projects"] #projects,
.app[data-route="productivity"] .productivity-panel,
.app[data-route="experiments"] #experiments { padding: 20px; }
.app[data-route="projects"] #projects > .panel-title { justify-content: flex-end; margin-bottom: 12px; }
.app[data-route="projects"] #projects .header-actions { width: 100%; justify-content: space-between; }
.app[data-route="projects"] .project-status-filters { gap: 8px; margin-bottom: 12px; }
.app[data-route="projects"] .projects-controls { margin-bottom: 16px; gap: 12px; }
.app[data-route="productivity"] .productivity-header,
.app[data-route="experiments"] #experiments > .panel-title { margin-bottom: 14px; }
.app[data-route="productivity"] .productivity-header p,
.app[data-route="experiments"] .section-subtitle { margin: 0; font-size: 14px; line-height: 1.5; }
.app[data-route="productivity"] .productivity-stats,
.app[data-route="experiments"] .experiment-stats { gap: 12px; margin-bottom: 20px; }
.app[data-route="productivity"] .productivity-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.app[data-route="experiments"] .experiment-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.app[data-route="productivity"] .productivity-stats .stat-card,
.app[data-route="experiments"] .experiment-stats .stat-card { min-height: 92px; padding: 14px 16px; box-shadow: none; }
.app[data-route="productivity"] .productivity-stats .stat-card strong,
.app[data-route="experiments"] .experiment-stats .stat-card strong { font-size: 23px; line-height: 1.3; }
@media (max-width: 1100px) {
  .app[data-route="productivity"] .productivity-stats,
  .app[data-route="experiments"] .experiment-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .app:is([data-route="projects"], [data-route="productivity"], [data-route="experiments"]) .header { min-height: 42px; margin-bottom: 10px; }
  .app:is([data-route="projects"], [data-route="productivity"], [data-route="experiments"]) .header h1 { font-size: 24px; }
  .app[data-route="projects"] #projects,
  .app[data-route="productivity"] .productivity-panel,
  .app[data-route="experiments"] #experiments { padding: 16px; }
  .app[data-route="productivity"] .productivity-stats,
  .app[data-route="experiments"] .experiment-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app[data-route="experiments"] #experiments > .panel-title { align-items: flex-start; flex-direction: column; gap: 8px; }
  .app[data-route="projects"] .projects-controls { grid-template-columns: minmax(0, 1fr); }
}

/* Resources: compact catalog toolbar and consistent actions. */
.app[data-route="resources"] .header { position:relative; min-height:48px; margin-bottom:14px; padding:4px 0; border:0; background:transparent; backdrop-filter:none; }
.app[data-route="resources"] .header h1 { margin:0; font-size:28px; line-height:1.2; }
.app[data-route="resources"] .top-header-meta { display:none; }
#resources { padding:20px; }
#resources .resources-header { gap:16px; margin-bottom:16px; align-items:center; }
#resources .resources-header .section-subtitle { margin:0; font-size:14px; line-height:1.5; max-width:680px; }
#resources #openResourceModalButton { min-height:40px; padding:9px 14px; font-size:13px; white-space:nowrap; box-shadow:none; }
#resources .resources-controls { display:grid; grid-template-columns:minmax(180px, 1fr) minmax(160px, 220px) auto auto; gap:12px; align-items:center; margin-bottom:12px; }
#resources .resources-controls :is(input[type="search"],select) { min-width:0; height:42px; padding:9px 12px; font-size:13px; }
#resources .checkbox-line { display:flex; align-items:center; gap:8px; min-height:42px; padding:0 10px; white-space:nowrap; font-size:13px; cursor:pointer; }
#resources .checkbox-line input { min-width:17px; width:17px; height:17px; min-height:0; padding:0; margin:0; accent-color:var(--color-primary, #2563eb); flex:none; }
#resources .checkbox-line span { display:inline; }
#resources .resources-view-toggle { padding:3px; }
#resources .resources-view-toggle .segment { min-height:34px; padding:6px 10px; font-size:12px; }
#resources .resource-category-tabs { display:flex; flex-wrap:wrap; gap:6px; padding-bottom:14px; margin-bottom:14px; }
#resources .resource-tab { min-height:34px; padding:6px 11px; border-radius:7px; font-size:12px; font-weight:600; }
#resources .resources-dashboard { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:0; padding:14px 0; margin-bottom:14px; border-bottom:1px solid var(--color-border); }
#resources .resources-dashboard .stat-card { min-height:0; padding:0 16px; border:0; border-right:1px solid var(--color-border); border-radius:0; box-shadow:none; background:transparent; }
#resources .resources-dashboard .stat-card:first-child { padding-left:0; }
#resources .resources-dashboard .stat-card:last-child { border-right:0; }
#resources .resources-dashboard .stat-card span { font-size:12px; }
#resources .resources-dashboard .stat-card strong { font-size:22px; line-height:1.3; overflow-wrap:anywhere; }
#resources .resources-count { display:block; margin-bottom:12px; font-size:12px; }
#resources .resources-grid { grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px; }
#resources .resource-card { padding:16px; border-radius:12px; box-shadow:none; gap:12px; min-width:0; }
#resources .resource-icon { width:42px; height:42px; border-radius:10px; font-size:22px; }
#resources .resource-icon img { width:26px; height:26px; object-fit:contain; }
#resources .resource-card-main strong { font-size:15px; }
#resources .resource-card-main p { margin:6px 0 10px; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
#resources .resource-badge { font-size:11px; padding:4px 8px; color:#1d4ed8; background:#eff6ff; border-color:#bfdbfe; }
#resources .resource-actions { display:flex; gap:7px; margin-top:4px; padding-top:12px; border-top:1px solid var(--color-border); }
#resources .resource-action { width:34px; height:34px; min-height:34px; padding:0; border-radius:7px; font-size:17px; background:#fff; border:1px solid var(--color-border); color:var(--color-text-secondary); }
#resources .resource-action.open { color:#2563eb; background:#eff6ff; border-color:#bfdbfe; }
#resources .resource-action.favorite.active { color:#b45309; background:#fffbeb; border-color:#fde68a; }
#resources .resource-action.delete { color:#b91c1c; }
#resources .resource-list-item { padding:14px; gap:12px; border-radius:10px; box-shadow:none; }
#resources .resource-list-item .resource-actions { padding-top:0; border-top:0; margin-top:0; }
@media(max-width:1100px) {
 #resources .resources-controls { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
 #resources .resources-view-toggle { justify-self:end; }
}
@media(max-width:620px) {
 .app[data-route="resources"] .header { min-height:42px; margin-bottom:10px; }
 .app[data-route="resources"] .header h1 { font-size:24px; }
 #resources { padding:16px; }
 #resources .resources-header { align-items:flex-start; flex-direction:column; gap:12px; }
 #resources .resources-controls { gap:8px; }
 #resources #resourceSearchInput { grid-column:1/-1; }
 #resources .resources-view-toggle { justify-self:start; }
 #resources .checkbox-line { grid-column:1/-1; padding-left:0; }
 #resources .resources-dashboard { grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px 0; }
 #resources .resources-dashboard .stat-card { padding:0 10px; border:0; }
 #resources .resources-dashboard .stat-card strong { font-size:19px; }
 #resources .resources-grid { grid-template-columns:minmax(0,1fr); }
 #resources .resource-action { width:40px; height:40px; }
 #resources .resource-list-item { display:flex; flex-wrap:wrap; }
 #resources .resource-list-main { flex:1; min-width:0; overflow-wrap:anywhere; }
}

#resources .resource-icon { background:#f1f5f9; color:#475569; border:1px solid #e2e8f0; }
#resources .resource-icon-fallback { width:100%; height:100%; font-size:20px; }
#resources .resource-icon-fallback[hidden] { display:none; }

#resources .resource-icon { position:relative; }
#resources .resource-icon img { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); }
/* Knowledge library: scoped layout, shared application colors. */
#knowledge { min-width:0; }
.knowledge-library-header { display:flex; align-items:start; justify-content:space-between; gap:16px; margin-bottom:12px; }
.knowledge-library-header p { margin:0; }
#knowledgeCount { flex:none; color:var(--muted); font-size:12px; }
.knowledge-compact-stats { font-size:12px; color:var(--muted); margin-bottom:16px; }
.knowledge-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:20px 0 24px; }
.knowledge-toolbar > input[type=search] { flex:1 1 170px; min-width:0; width:170px; }
.knowledge-category-tabs { display:flex; flex-wrap:wrap; gap:5px; flex:2 1 370px; }
.knowledge-category-tabs .quick-category { font-size:12px; padding:0 10px; }
.knowledge-toolbar .button { flex:none; white-space:nowrap; padding:10px 12px; }
.knowledge-toolbar [hidden] { display:none !important; }
#knowledge .knowledge-feed { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
#knowledge .knowledge-card { padding:20px; display:flex; flex-direction:column; gap:14px; min-width:0; overflow:visible; border:1px solid var(--border); border-radius:16px; background:#fff; }
#knowledge .knowledge-card-header { display:flex; align-items:start; gap:12px; justify-content:space-between; }
.knowledge-note-title { padding:0; border:0; background:none; color:var(--text,#172237); font:inherit; font-size:17px; font-weight:700; text-align:left; line-height:1.4; overflow-wrap:anywhere; cursor:pointer; }
.knowledge-note-title:hover { color:var(--primary,#2563eb); }
.knowledge-visibility { flex:none; font-size:14px; }
#knowledge .knowledge-preview { margin:0; color:var(--muted); font-size:14px; line-height:1.6; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; overflow-wrap:anywhere; white-space:pre-wrap; }
.knowledge-note-badges { display:flex; flex-wrap:wrap; gap:6px; }
.knowledge-note-badges span { font-size:11px; color:#365c9a; background:#eef4ff; border-radius:6px; padding:4px 8px; overflow-wrap:anywhere; }
#knowledge .knowledge-tags { display:flex; gap:6px; flex-wrap:wrap; }
#knowledge .knowledge-tags span { padding:0; background:none; color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.knowledge-card-footer { display:flex; gap:8px; align-items:center; margin-top:auto; padding-top:10px; border-top:1px solid var(--border); }
.knowledge-card-footer small { margin-right:auto; color:var(--muted); font-size:11px; }
.knowledge-icon-button,.knowledge-card-menu summary { display:grid; place-items:center; width:36px; height:36px; border:0; border-radius:8px; background:#f5f7fb; color:#6c7a90; font-size:22px; cursor:pointer; }
.knowledge-icon-button.is-favorite { color:#bc8914; background:#fff7e3; }
.knowledge-card-menu { position:relative; }
.knowledge-card-menu summary { list-style:none; }
.knowledge-card-menu summary::-webkit-details-marker { display:none; }
.knowledge-card-menu[open] { z-index:5; }
.knowledge-card-menu > div { position:absolute; right:0; top:40px; min-width:170px; padding:6px; border:1px solid var(--border); border-radius:10px; background:white; box-shadow:0 8px 24px #17223722; }
.knowledge-card-menu button { display:block; width:100%; padding:10px; border:0; border-radius:6px; background:none; text-align:left; cursor:pointer; }
.knowledge-card-menu button:hover { background:#eef4ff; }
.knowledge-empty { grid-column:1/-1; display:flex; align-items:center; flex-direction:column; text-align:center; padding:70px 20px; border:1px dashed #dbe4f0; border-radius:16px; background:linear-gradient(135deg,#f9fbff,#fff); }
.knowledge-empty-icon { display:grid; place-items:center; width:70px; height:70px; border-radius:20px; color:#3764d4; background:#edf3ff; font-size:38px; }
.knowledge-empty h2 { margin:20px 0 8px; font-size:22px; }
.knowledge-empty p { max-width:430px; margin:0 0 22px; color:var(--muted); line-height:1.6; }
.knowledge-empty small { margin-top:18px; color:var(--muted); }
.knowledge-editor,.knowledge-reader { padding:28px; border:0; background:white; color:#172237; box-shadow:-12px 0 60px #17223722; }
.knowledge-editor { width:min(600px,100vw); max-width:100vw; height:100dvh; max-height:100dvh; margin:0 0 0 auto; border-radius:18px 0 0 18px; overflow:auto; }
.knowledge-editor::backdrop,.knowledge-reader::backdrop { background:#18263e66; }
.knowledge-editor-header { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:24px; }
.knowledge-editor-header h2 { margin:0; font-size:23px; overflow-wrap:anywhere; }
.knowledge-editor-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.knowledge-editor-fields .field { min-width:0; }
.knowledge-wide { grid-column:1/-1; }
.knowledge-editor textarea { width:100%; min-height:260px; resize:vertical; }
.knowledge-editor-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:24px; }
.knowledge-reader { width:min(760px,calc(100vw - 32px)); max-height:85dvh; border-radius:18px; }
#knowledgeReaderContent { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.8; }
@media(max-width:1200px) { #knowledge .knowledge-feed { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:620px) {
  #knowledge .knowledge-feed { grid-template-columns:minmax(0,1fr); }
  .knowledge-library-header { flex-direction:column; gap:8px; }
  .knowledge-toolbar > input[type=search] { flex-basis:100%; width:100%; }
  .knowledge-category-tabs { flex-basis:100%; }
  .knowledge-toolbar .button { flex:1; }
  .knowledge-empty { padding:42px 16px; }
  .knowledge-editor { padding:20px; border-radius:0; }
  .knowledge-editor-fields { grid-template-columns:minmax(0,1fr); gap:14px; }
  .knowledge-editor-actions { flex-wrap:wrap; }
}
.knowledge-favorite-filter[aria-pressed="true"] { color:#2563eb; background:#edf3ff; border-color:#bfd2ff; }
/* Dashboard welcome replaces its redundant page heading. Keep mobile navigation. */
.app[data-route="dashboard"] #pageTitle { display: none; }
@media (min-width: 901px) {
  .app[data-route="dashboard"] .header { display: none; }
}
