/* Яснум — dashboard-service /app/ — «Главная — без данных» (Figma 3:52, Clarity 3.0) */

:root {
  /* Clarity 3.0 tokens (brandbook_03_main/tokens.css) */
  --ys-ink: #102C37;
  --ys-white: #FFFFFF;
  --ys-mist: #F6F9FB;
  --ys-ice: #E9F6FF;
  --ys-teal: #166F82;
  --ys-signal: #32A5BB;
  --ys-muted: #4D6370;
  --ys-line: #BFD4DE;
  --ys-font: 'Manrope', -apple-system, system-ui, sans-serif;
  --ys-font-data: 'IBM Plex Mono', monospace;
  --ys-radius-card: 16px;
  --ys-radius-field: 12px;
}

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

body {
  font-family: var(--ys-font);
  background: var(--ys-mist);
  color: var(--ys-ink);
  display: flex;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============ Sidebar (288 px) ============ */
.sidebar {
  width: 288px;
  flex-shrink: 0;
  background: var(--ys-white);
  border-right: 1px solid var(--ys-line);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 20px;
}

/* Логотип */
.brand-logo {
  height: 52px;
  display: flex;
  align-items: center;
}

.brand-logo .logo {
  height: 32px;
  width: auto;
}

/* Рабочее пространство (248×48) */
.workspace-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 12px;
  border: 1px solid var(--ys-line);
  border-radius: var(--ys-radius-field);
  background: var(--ys-white);
  cursor: pointer;
  font-family: var(--ys-font);
  transition: background 0.15s;
}

.workspace-selector:hover {
  background: var(--ys-mist);
}

.workspace-selector .icon {
  flex-shrink: 0;
}

.ws-label {
  flex: 1;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ys-ink);
  text-align: left;
}

.workspace-selector .chevron {
  color: var(--ys-muted);
  flex-shrink: 0;
}

/* Навигация */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
  min-height: 0;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-section-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: var(--ys-muted);
}

.nav-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 12px;
  border-radius: var(--ys-radius-field);
  text-decoration: none;
  color: var(--ys-ink);
  transition: background 0.15s;
}

.nav-item .icon {
  color: var(--ys-muted);
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.nav-item.active {
  background: var(--ys-ice);
}

.nav-item.active .nav-label {
  color: var(--ys-teal);
  font-weight: 600;
}

.nav-item.active .icon {
  color: var(--ys-teal);
}

.nav-item:not(.disabled):not(.active):hover {
  background: var(--ys-mist);
}

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

.nav-badge {
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  padding: 0 8px;
  border: 1px solid var(--ys-line);
  border-radius: 999px;
  color: var(--ys-muted);
  background: var(--ys-white);
  flex-shrink: 0;
}

.nav-divider {
  height: 1px;
  background: var(--ys-line);
  width: 100%;
}

.sidebar-spacer {
  flex: 1;
  min-height: 24px;
}

/* Нижняя навигация + профиль */
.bottom-nav {
  gap: 12px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--ys-radius-field);
  cursor: pointer;
  transition: background 0.15s;
}

.user-profile:hover {
  background: var(--ys-mist);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ys-teal);
  color: var(--ys-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--ys-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-subtitle {
  font-size: 12px;
  line-height: 16px;
  color: var(--ys-muted);
}

.user-profile .exit-icon {
  color: var(--ys-muted);
  flex-shrink: 0;
}

/* ============ Main ============ */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar (72 px) */
.topbar {
  height: 72px;
  flex-shrink: 0;
  background: var(--ys-white);
  border-bottom: 1px solid var(--ys-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ys-ink);
}

.breadcrumb .separator {
  color: var(--ys-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.health {
  font-family: var(--ys-font-data);
  font-size: 12px;
  line-height: 20px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--ys-line);
  color: var(--ys-muted);
}

.health.ok {
  color: var(--ys-teal);
  border-color: var(--ys-teal);
}

.help-button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--ys-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.help-button:hover {
  background: var(--ys-mist);
}

/* Content (padding 40, gap 20) */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 40px;
  overflow-y: auto;
}

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: var(--ys-muted);
}

.title {
  font-size: 40px;
  font-weight: 700;
  line-height: 48px;
  color: var(--ys-ink);
}

.subtitle {
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  color: var(--ys-muted);
}

/* Первый график / Шаги (48 px) */
.onboarding-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--ys-white);
  border: 1px solid var(--ys-line);
  color: var(--ys-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  flex-shrink: 0;
}

.step.active .step-number {
  background: var(--ys-teal);
  border-color: var(--ys-teal);
  color: var(--ys-white);
}

.step-label {
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--ys-muted);
}

.step.active .step-label {
  color: var(--ys-ink);
}

.step-separator {
  width: 80px;
  height: 1px;
  background: var(--ys-line);
  flex-shrink: 0;
}

/* Карточка (radius 16, border #bfd4de, padding 24, gap 16) */
.card {
  background: var(--ys-white);
  border: 1px solid var(--ys-line);
  border-radius: var(--ys-radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  color: var(--ys-ink);
}

.card-description {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--ys-muted);
}

/* Область загрузки (304 px, Ice, рамка Signal 1 px, radius 12) */
.upload-area {
  height: 304px;
  background: var(--ys-ice);
  border: 1px solid var(--ys-signal);
  border-radius: var(--ys-radius-field);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.upload-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--ys-radius-field);
  background: var(--ys-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.upload-icon {
  color: var(--ys-teal);
}

.upload-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: var(--ys-ink);
}

.upload-hint {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--ys-muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 228px;
  height: 48px;
  padding: 12px;
  border: none;
  border-radius: var(--ys-radius-field);
  background: var(--ys-ink);
  color: var(--ys-white);
  font-family: var(--ys-font);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}

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

.upload-formats {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ys-muted);
}

/* Ссылка «Скачать пример таблицы» (Appearance: Link) */
.download-example {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 292px;
  height: 24px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--ys-teal);
  text-decoration: none;
  cursor: pointer;
}

.download-example:hover {
  color: var(--ys-signal);
}

/* Что будет дальше (88 px, Ice, radius 16, padding 24, gap 20) */
.callout {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  background: var(--ys-ice);
  border: 1px solid var(--ys-line);
  border-radius: var(--ys-radius-card);
}

.callout-icon {
  color: var(--ys-teal);
  flex-shrink: 0;
}

.callout-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.callout-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--ys-ink);
}

.callout-description {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--ys-muted);
}

/* Empty status */
.empty-status {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ys-muted);
  text-align: center;
}
