/* ============================================================
   Aura (OperMAX) UI Emulator v2 — Halo Design System styles
   Цвета из HaloColorScheme.kt (platform/common/ui/ds/theme)
   Шрифт — X5 Sans (те же ttf, что подключены в HaloTypography.kt)
   ============================================================ */

/* Шрифты Halo DS: Normal→x5_sans_regular, Medium→x5_sans_medium, Bold→x5_sans_bold */
@font-face {
  font-family: 'X5 Sans';
  src: url('fonts/x5_sans_regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'X5 Sans';
  src: url('fonts/x5_sans_medium.ttf') format('truetype');
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'X5 Sans';
  src: url('fonts/x5_sans_bold.ttf') format('truetype');
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Halo core */
  --halo-primary: #4E9C1F;
  --halo-on-primary: #FFFFFF;
  --halo-primary-container: #D0F0BB;
  --halo-on-primary-container: #0D6706;
  --halo-primary-fixed: #97D26D;
  --halo-primary-fixed-dim: #84C950;
  --halo-secondary: #55624B;
  --halo-secondary-container: #F5FCF0;
  --halo-tertiary: #386666;
  --halo-tertiary-container: #BBEBEB;
  --halo-background: #F5F7F7;
  --halo-on-background: #222626;
  --halo-surface: #FFFFFF;
  --halo-on-surface: #25303C;
  --halo-surface-variant: #F5FCF0;
  --halo-on-surface-variant: #7B8F9E;
  --halo-surface-container: #EAEDEF;
  --halo-surface-container-high: #D0D7DC;
  --halo-surface-container-low: #F3F5F6;
  --halo-error: #E6341C;
  --halo-error-container: #FFEBED;
  --halo-outline: #9AA9B5;
  --halo-outline-variant: #637889;
  /* Halo Ext colors */
  --halo-ext1: #1E88E5;
  --halo-ext2: #56B238;
  --halo-ext2-low: #A8DB97;
  --halo-ext2-lowest: #CCEDC1;
  --halo-ext2-highest: #3B961D;
  --halo-ext3: #F45948;
  --halo-ext3-highest: #D82A13;
  --halo-ext4-high: #F9820B;
  --halo-ext4-highest: #F26202;
  --halo-ext5-high: #8247E1;
  --halo-ext9-low: #F5D142;
  /* Misc */
  --halo-warning: #F59E0B;
  --halo-warning-container: #FEF3C7;
  --radius-card: 16px;
  --radius-sheet: 24px;
  --shadow-card: 0 1px 3px rgba(34,38,38,.08), 0 1px 2px rgba(34,38,38,.04);
  --shadow-float: 0 4px 16px rgba(34,38,38,.18);
}

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

/* Атрибут hidden должен побеждать любые display из классов */
[hidden] { display: none !important; }

/* ============ Welcome (кандидат) — копия DemoInitialScreenComponentContent ============ */
.screen.screen--welcome {
  background: #0D6706; /* HaloTheme.colors.onPrimaryContainer */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* position задаёт .screen (absolute + inset:0) — absolute сам является positioned-контейнером для welcome__lines/__logo */
}
/* Декоративные линии фона: реальный background_lines.xml (alpha 0.1, tint onPrimaryFixed — в SVG) */
.welcome__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
/* Логотип: реальный logo.xml, 274×86 scale 0.6 → 164×52, top m8 */
.welcome__logo {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 164px;
  height: auto;
  letter-spacing: .02em;
}
.welcome__text {
  margin: auto 16px;
  padding-bottom: 60px; /* Compose: bottom = 60.dp */
  position: relative;
}
.welcome__title {
  font-size: 24px;   /* headlineSmall: 24sp */
  line-height: 32px;
  font-weight: 500;
  color: #fff;       /* onPrimary */
}
.welcome__desc {
  margin-top: 8px;   /* spacings.m8 */
  font-size: 16px;   /* bodyLarge: 16sp */
  line-height: 24px;
  color: #fff;
}
.welcome__buttons {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 8px 8px; /* horizontal m8, bottom m8 */
}
.btn--welcome-secondary,
.btn--welcome-ghost {
  height: 56px;
  border-radius: 20px;           /* HaloShapes.xLarge */
  font-size: 16px;
  font-weight: 500;              /* labelExtraLarge */
  border: none;
  cursor: pointer;
}
.btn--welcome-secondary {
  background: #D0F0BB;           /* primaryContainer */
  color: #0D6706;                /* onPrimaryContainer */
}
.btn--welcome-ghost {
  background: transparent;       /* HaloPrimaryLargeButton + transparent container */
  color: #fff;                   /* onPrimary */
}

/* ============ Demo auth (кандидат): вход / регистрация ============ */
.demo-auth { padding-top: 8px; }

/* ============ BasicQuickAction (QR-привязка и др.) — копия BasicQuickAction.kt ============ */
.qa-row {
  display: flex;
  align-items: center;
  gap: 12px; /* spacings.m6 */
  width: calc(100% - 32px);
  background: var(--halo-surface-container-low, #F3F5F6); /* Surface color */
  border: none;
  border-radius: 20px; /* HaloShapes.xLarge */
  padding: 12px 12px;  /* vertical m5, horizontal m6 */
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.qa-row__leading { font-size: 22px; line-height: 1; }
.qa-row__content { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.qa-row__title {
  font-size: 14px;      /* titleSmall */
  line-height: 20px;
  font-weight: 500;
  color: var(--halo-on-surface, #25303C);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qa-row__desc {
  font-size: 12px;      /* bodySmall */
  line-height: 16px;
  color: var(--halo-on-surface-variant, #7B8F9E);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qa-row__qr {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--halo-primary-container, #D0F0BB); /* QrCodeButton */
  color: var(--halo-on-primary-container, #0D6706);
  border-radius: 16px; /* HaloShapes.large */
  padding: 6px 8px;
}

/* Блок «Отчётность» (ReportingBlockComponentContent + HaloStatisticWidget) */
.reporting { padding: 10px 0; }
.reporting__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 16px;
}
.reporting__title {
  flex: 1;
  font-size: 22px; line-height: 28px; font-weight: 500; /* titleExtraLarge */
  color: var(--halo-on-surface, #25303C);
}
.reporting__all {
  display: flex;
  align-items: center;
  gap: 4px;
  border: none;
  height: 32px;
  padding: 0 12px;
  border-radius: 16px; /* HaloShapes.large */
  background: var(--halo-primary-container, #D0F0BB); /* HaloSecondarySmallButton */
  color: var(--halo-on-primary-container, #0D6706);
  font-size: 14px; line-height: 20px; font-weight: 500; /* labelLarge */
  cursor: pointer;
}
.reporting__row {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 6px 18px 2px;
  scrollbar-width: none;
}
.reporting__row::-webkit-scrollbar { display: none; }
.stat-widget {
  position: relative;
  flex: 0 0 auto;
  min-width: 200px;
  min-height: 130px;
  border: none;
  border-radius: 28px; /* HaloShapes.xxLarge */
  background: var(--halo-surface-container-low, #F3F5F6);
  padding: 16px 20px; /* m8 / m10 */
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.stat-widget::before {
  /* радиальный градиент из правого верхнего угла (ext.color2, alpha .85→0) */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 340px at 100% 0%,
    rgba(86, 178, 56, .85), rgba(86, 178, 56, .70) 22%,
    rgba(86, 178, 56, .40) 50%, rgba(86, 178, 56, .10) 75%, transparent 100%);
  pointer-events: none;
}
.stat-widget > * { position: relative; }
.stat-widget__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.stat-widget__titles { display: flex; flex-direction: column; min-width: 0; }
.stat-widget__title {
  font-size: 12px; line-height: 16px; font-weight: 500; /* labelMedium */
  color: var(--halo-on-surface, #25303C);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-widget__subtitle {
  font-size: 12px; line-height: 12px; /* textLineSmall */
  color: var(--halo-outline-variant, #637889);
  margin-top: 2px;
}
.stat-widget__headline {
  display: flex;
  align-items: flex-end;
  gap: 6px; /* m3 */
  margin-top: 6px;
}
.stat-widget__main {
  font-size: 24px; line-height: 32px; font-weight: 500; /* headlineSmall */
}
.stat-widget__add {
  font-size: 12px; line-height: 16px; /* bodySmall */
  color: var(--halo-outline-variant, #637889);
  padding-bottom: 4px; /* m2 */
}
.stat-widget__line {
  font-size: 12px; line-height: 16px; /* bodySmall */
  color: var(--halo-outline-variant, #637889);
  white-space: nowrap;
}

/* Экран «Права и доступы» (R7) */
.card--tint { background: var(--halo-surface-container, #EAEDEF); }
.perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--halo-outline, #9AA9B5);
}
.perm-row:last-child { border-bottom: none; }
.perm-row__text { min-width: 0; }
.perm-row__code {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--halo-on-surface, #25303C);
  word-break: break-all;
}
.perm-row__desc {
  font-size: 12px;
  color: var(--halo-on-surface-variant, #5A6B78);
  margin-top: 2px;
}
.badge--success {
  background: var(--halo-green, #56B238);
  color: #fff;
  flex-shrink: 0;
}

body {
  font-family: 'X5 Sans', Roboto, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", sans-serif;
  background: #1a1d1e;
  color: var(--halo-on-background);
  min-height: 100vh;
}

/* ============ Layout: dev panel + phone ============ */
.emulator-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 24px;
  min-height: 100vh;
}

/* ============ Dev panel ============ */
.dev-panel {
  width: 320px;
  background: #232728;
  border: 1px solid #33383a;
  border-radius: 16px;
  padding: 20px;
  color: #cfd6d8;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  position: sticky;
  top: 32px;
}
.dev-panel__title { font-size: 20px; color: #fff; font-weight: 700; }
.dev-panel__ver { font-size: 12px; color: var(--halo-primary-fixed); font-weight: 600; }
.dev-panel__sub { font-size: 11px; color: #7b8f9e; margin: 4px 0 16px; }
.dev-panel__section { margin-bottom: 18px; }
.dev-panel__section h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: #7b8f9e; margin-bottom: 8px;
}
.dev-panel__hint { font-size: 10px; color: #637889; margin-top: 6px; line-height: 1.4; }
.dev-input {
  width: 100%; padding: 8px 10px; border-radius: 8px;
  border: 1px solid #3a4042; background: #1a1d1e; color: #e5eaec; font-size: 12px;
}
.dev-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; padding: 4px 0; cursor: pointer; user-select: none;
}
.dev-toggle input { accent-color: var(--halo-primary); }
.dev-btn {
  width: 100%; padding: 8px; margin-bottom: 6px; border-radius: 8px;
  border: 1px solid #3a4042; background: #2c3133; color: #cfd6d8;
  font-size: 12px; cursor: pointer; transition: background .15s;
}
.dev-btn:hover { background: #383e41; }
.nav-stack { display: flex; flex-direction: column; gap: 3px; }
.nav-stack__item {
  font-size: 11px; padding: 5px 8px; background: #2c3133; border-radius: 6px;
  color: #9fb3bf; font-family: ui-monospace, monospace;
}
.nav-stack__item--top { color: var(--halo-primary-fixed); font-weight: 600; }
.api-log { max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.api-log__entry {
  font-size: 10px; font-family: ui-monospace, monospace; padding: 3px 6px;
  border-radius: 4px; background: #1a1d1e; color: #8fa8b8; word-break: break-all;
}
.api-log__entry--ok { color: #84C950; }
.api-log__entry--err { color: #F45948; }

/* ============ Phone frame ============ */
.phone {
  width: 390px; height: 844px;
  background: #000; border-radius: 54px;
  padding: 12px; position: relative;
  box-shadow: 0 0 0 2px #3a3f41, 0 24px 60px rgba(0,0,0,.6);
  flex-shrink: 0;
}
.phone__notch {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 34px; background: #000; border-radius: 20px; z-index: 100;
}
.phone__home-indicator {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  width: 140px; height: 5px; background: rgba(255,255,255,.9); border-radius: 3px; z-index: 100;
}
.phone__screen {
  width: 100%; height: 100%;
  background: var(--halo-background);
  border-radius: 42px; overflow: hidden;
  display: flex; flex-direction: column; position: relative;
}

/* ============ Status bar ============ */
.status-bar {
  height: 54px; flex-shrink: 0;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 28px 8px; z-index: 50;
}
.status-bar__time { font-size: 15px; font-weight: 600; color: var(--halo-on-background); }
.status-bar__icons { display: flex; gap: 6px; align-items: center; }

/* ============ Screen container ============ */
.screen-container {
  flex: 1; overflow: hidden; position: relative;
  display: flex; flex-direction: column;
}
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--halo-background);
  animation: screen-in .22s ease;
}
@keyframes screen-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.screen--fade { animation: screen-fade .18s ease; }
@keyframes screen-fade { from { opacity: 0; } to { opacity: 1; } }
.screen__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.screen__scroll::-webkit-scrollbar { width: 0; }

/* ============ Top app bar ============ */
.top-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px 12px; flex-shrink: 0;
  background: var(--halo-background);
}
.top-bar--surface { background: var(--halo-surface); }
.top-bar__title { font-size: 20px; font-weight: 700; color: var(--halo-on-surface); flex: 1; }
.top-bar__title--center { text-align: center; font-size: 17px; }
.top-bar__icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: transparent; color: var(--halo-on-surface);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.top-bar__icon-btn:active { background: var(--halo-surface-container); }
.top-bar__icon-btn svg { width: 22px; height: 22px; }
.top-bar__badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--halo-error); color: #fff;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ============ Cards / blocks ============ */
.card {
  background: var(--halo-surface); border-radius: var(--radius-card);
  padding: 16px; margin: 0 16px 12px; box-shadow: var(--shadow-card);
}
.card--flat { box-shadow: none; background: var(--halo-surface-container-low); }
.block-title {
  font-size: 22px; line-height: 28px; font-weight: 600; /* titleExtraLarge */
  color: var(--halo-on-surface);
  margin: 8px 16px 8px;
}
.section-gap { height: 8px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 22px; border: none;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: filter .15s, transform .05s;
  font-family: inherit;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--halo-primary); color: var(--halo-on-primary); }
.btn--primary:disabled { background: var(--halo-surface-container-high); color: var(--halo-on-surface-variant); }
.btn--tonal { background: var(--halo-secondary-container); color: var(--halo-on-primary-container); }
.btn--outlined { background: transparent; color: var(--halo-primary); border: 1px solid var(--halo-outline); }
.btn--text { background: transparent; color: var(--halo-primary); height: 40px; }
.btn--danger { background: var(--halo-error-container); color: var(--halo-ext3-highest); }
.btn--block { width: 100%; }

/* ============ List items ============ */
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; cursor: pointer; background: var(--halo-surface);
  transition: background .12s;
}
.list-item:active { background: var(--halo-surface-container-low); }
.list-item__icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.list-item__content { flex: 1; min-width: 0; }
.list-item__title { font-size: 15px; color: var(--halo-on-surface); font-weight: 500; }
.list-item__subtitle { font-size: 12px; color: var(--halo-on-surface-variant); margin-top: 2px; }
.list-item__chevron { color: var(--halo-outline); flex-shrink: 0; }
.list-divider { height: 1px; background: var(--halo-surface-container-low); margin-left: 68px; }
.list-card {
  background: var(--halo-surface); border-radius: var(--radius-card);
  margin: 0 16px 12px; overflow: hidden; box-shadow: var(--shadow-card);
}

/* ============ Chips ============ */
.chip-row { display: flex; gap: 8px; padding: 4px 16px 12px; overflow-x: auto; }
.chip-row::-webkit-scrollbar { height: 0; }
.chip {
  height: 32px; padding: 0 14px; border-radius: 16px;
  border: 1px solid var(--halo-outline); background: transparent;
  font-size: 13px; color: var(--halo-on-surface); cursor: pointer;
  white-space: nowrap; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip--active { background: var(--halo-secondary-container); border-color: var(--halo-primary); color: var(--halo-on-primary-container); font-weight: 600; }

/* ============ Tabs ============ */
.tab-bar {
  display: flex; padding: 0 8px; gap: 4px; flex-shrink: 0;
  border-bottom: 1px solid var(--halo-surface-container);
  background: var(--halo-background);
}
.tab-bar__item {
  flex: 1; padding: 10px 4px; border: none; background: transparent;
  font-size: 13px; font-weight: 600; color: var(--halo-on-surface-variant);
  cursor: pointer; position: relative; font-family: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tab-bar__item--active { color: var(--halo-primary); }
.tab-bar__item--active::after {
  content: ''; position: absolute; bottom: 0; left: 20%; right: 20%;
  height: 3px; border-radius: 3px 3px 0 0; background: var(--halo-primary);
}

/* ============ Badges / statuses ============ */
.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 11px; font-size: 11px; font-weight: 600;
}
.badge--green { background: var(--halo-primary-container); color: var(--halo-on-primary-container); }
.badge--blue { background: #E3F0FC; color: #1565C0; }
.badge--red { background: var(--halo-error-container); color: var(--halo-ext3-highest); }
.badge--gray { background: var(--halo-surface-container); color: var(--halo-on-surface-variant); }
.badge--yellow { background: var(--halo-warning-container); color: #92600A; }
.badge--teal { background: var(--halo-tertiary-container); color: var(--halo-tertiary); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot--green { background: var(--halo-ext2); }
.dot--gray { background: var(--halo-outline); }

/* ============ Bottom navigation ============ */
.bottom-nav {
  flex-shrink: 0; display: flex;
  background: var(--halo-surface);
  border-top: 1px solid var(--halo-surface-container);
  padding: 6px 8px calc(10px + 8px);
  z-index: 40;
}
.bottom-nav__item {
  flex: 1; border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--halo-on-surface-variant); font-family: inherit; padding: 4px 0;
}
.bottom-nav__item svg { width: 24px; height: 24px; }
.bottom-nav__item span { font-size: 10px; font-weight: 600; }
.bottom-nav__item--active { color: var(--halo-on-surface); }
.bottom-nav__item--active svg { color: var(--halo-primary); }

/* ============ Snackbar ============ */
.snackbar {
  position: absolute; bottom: 90px; left: 16px; right: 16px;
  background: #313638; color: #F3F5F6;
  border-radius: 12px; padding: 13px 16px; font-size: 13px;
  box-shadow: var(--shadow-float); z-index: 200;
  animation: snackbar-in .2s ease;
}
@keyframes snackbar-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ============ Bottom sheet ============ */
.sheet-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.4);
  z-index: 150; display: flex; align-items: flex-end;
  animation: fade-in .18s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-height: 82%;
  background: var(--halo-surface);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  padding: 12px 0 24px; overflow-y: auto;
  animation: sheet-in .25s cubic-bezier(.2,.8,.3,1);
}
@keyframes sheet-in { from { transform: translateY(60%); } to { transform: none; } }
.sheet__handle { width: 36px; height: 4px; border-radius: 2px; background: var(--halo-surface-container-high); margin: 0 auto 12px; }
.sheet__title { font-size: 18px; font-weight: 700; padding: 0 20px 12px; color: var(--halo-on-surface); }

/* ============ Dialog ============ */
.dialog-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.4);
  z-index: 160; display: flex; align-items: center; justify-content: center;
  animation: fade-in .18s ease; padding: 32px;
}
.dialog {
  width: 100%; background: var(--halo-surface);
  border-radius: 24px; padding: 22px;
  animation: dialog-in .2s cubic-bezier(.2,.8,.3,1);
}
@keyframes dialog-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.dialog__title { font-size: 17px; font-weight: 700; color: var(--halo-on-surface); margin-bottom: 10px; }
.dialog__text { font-size: 14px; color: var(--halo-on-surface-variant); line-height: 1.45; margin-bottom: 20px; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* ============ Text fields ============ */
.text-field { margin: 0 16px 14px; }
.text-field label { display: block; font-size: 12px; color: var(--halo-on-surface-variant); margin-bottom: 6px; font-weight: 500; }
.text-field input, .text-field textarea, .text-field select {
  width: 100%; height: 48px; border-radius: 12px;
  border: 1px solid var(--halo-outline); background: var(--halo-surface);
  padding: 0 14px; font-size: 15px; color: var(--halo-on-surface);
  font-family: inherit; outline: none;
}
.text-field textarea { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.text-field input:focus, .text-field textarea:focus { border-color: var(--halo-primary); border-width: 2px; }
.search-field {
  margin: 4px 16px 12px; height: 44px; border-radius: 22px;
  background: var(--halo-surface-container); border: none;
  padding: 0 16px; font-size: 14px; width: calc(100% - 32px);
  outline: none; font-family: inherit; color: var(--halo-on-surface);
}

/* ============ Loader / placeholder ============ */
.loader-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 0; gap: 12px; }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--halo-primary-container); border-top-color: var(--halo-primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.placeholder-illustration { font-size: 44px; margin-bottom: 4px; }
.placeholder-text { font-size: 14px; color: var(--halo-on-surface-variant); text-align: center; padding: 0 32px; line-height: 1.4; }

/* ============ Splash (SplashComponentContent.kt) ============ */
.screen--splash {
  background: var(--halo-on-primary-container);
  align-items: center; justify-content: center;
}
.splash-column { width: 226px; display: flex; flex-direction: column; }
.splash-brands {
  display: flex; gap: 4px; align-items: center;
  justify-content: flex-end; height: 15px;
}
.splash-brands__chizhik { transform: rotate(-10deg); }
.splash-logo-row { display: flex; align-items: flex-end; gap: 16px; }
.splash-logo { width: 51px; height: 51px; }
.splash-name { width: 126px; height: 40px; }
.splash-spacer { height: 15px; }

/* ============ Auth ============ */
.auth-hero { padding: 40px 24px 24px; text-align: center; }
.auth-hero__icon { font-size: 56px; }
.auth-hero__title { font-size: 22px; font-weight: 700; margin-top: 12px; color: var(--halo-on-surface); }
.auth-hero__text { font-size: 14px; color: var(--halo-on-surface-variant); margin-top: 8px; line-height: 1.45; }

/* ============ Onboarding (OnboardingComponentContent.kt) ============ */
.onboarding-top { display: flex; justify-content: flex-end; padding: 4px 16px; }
.onboarding-skip {
  background: none; border: none; cursor: pointer;
  color: var(--halo-primary); font: 500 14px/20px 'X5 Sans', Roboto, sans-serif;
  padding: 8px 12px; border-radius: 20px;
}
.onboarding-slide {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px; width: 320px; margin: 0 auto; padding-top: 16px; text-align: center;
}
.onboarding-slide__title { font-size: 22px; font-weight: 700; line-height: 28px; color: var(--halo-on-surface); }
.onboarding-slide__media {
  width: 240px; height: 240px; border-radius: 24px;
  background: var(--halo-surface-container-low);
  display: flex; align-items: center; justify-content: center; font-size: 96px;
}
.onboarding-slide__body { display: flex; flex-direction: column; gap: 12px; padding: 0 12px; }
.onboarding-slide__summary { font-size: 22px; font-weight: 700; line-height: 28px; color: var(--halo-on-surface); }
.onboarding-slide__text { font-size: 14px; line-height: 20px; color: var(--halo-on-surface-variant); }
.onboarding-bottom { padding: 0 16px 16px; }
.onboarding-dots { display: flex; gap: 8px; justify-content: center; padding: 16px 0; }
.onboarding-dots__dot { width: 8px; height: 8px; border-radius: 4px; background: var(--halo-surface-container-high); transition: all .2s; }
.onboarding-dots__dot--active { width: 22px; background: var(--halo-primary); }

/* ============ Home / ReMain ============ */
/* HaloTopBar (HeaderBlockComponentContent.kt) */
.home-header {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 8px 12px 12px;
}
.home-header__profile {
  display: flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 4px;
  border-radius: 12px; font-family: inherit; min-width: 0;
}
.home-header__avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--halo-surface); color: var(--halo-on-surface);
  border: 1px solid rgba(37, 48, 60, .1);
  display: flex; align-items: center; justify-content: center;
}
.home-header__name {
  font-size: 14px; line-height: 20px; font-weight: 500; /* labelLarge */
  color: var(--halo-on-surface); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; padding: 0 4px;
}
.home-header__action {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: transparent; cursor: pointer; position: relative;
  display: flex; align-items: center; justify-content: center; color: var(--halo-on-surface);
}
.home-header__action:active { background: var(--halo-surface-container); }

/* HaloSelectedListButton (StoreSelectionBlockComponentContent.kt) */
.store-selector {
  display: flex; align-items: center; gap: 8px;
  margin: 0 16px 12px; padding: 14px 16px;
  background: var(--halo-surface-container-low, #F3F5F6); border-radius: 16px;
  cursor: pointer; border: none; width: calc(100% - 32px);
  font-family: inherit; text-align: left;
  min-width: 0; overflow: hidden;
}
.store-selector__name {
  flex: 1; font-size: 16px; line-height: 24px; font-weight: 500; /* titleMedium */
  color: var(--halo-on-surface);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.store-selector svg { flex-shrink: 0; color: var(--halo-on-surface); }

/* QuickActionsBlockComponentContent.kt: ряд Button M, gap 4 */
.quick-actions { display: flex; gap: 4px; margin: 0 16px 12px; }
.quick-action {
  flex: 1; min-width: 0; min-height: 48px;
  background: var(--halo-surface-container-low, #F3F5F6); border-radius: 16px;
  border: none; padding: 6px 4px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-family: inherit; color: var(--halo-on-surface);
}
.quick-action:active { background: var(--halo-surface-container); }
.quick-action__label {
  font-size: 11px; line-height: 1.2; font-weight: 500; color: var(--halo-on-surface);
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Карточка задачи — TaskCard.kt (task_manager): surfaceContainerLow, xxLarge 28 */
.task-card {
  background: var(--halo-surface-container-low, #F3F5F6);
  border-radius: 28px; /* HaloShapes.xxLarge */
  margin: 0 16px 10px; padding: 16px;
  cursor: pointer; border: none; width: calc(100% - 32px);
  text-align: left; font-family: inherit;
  display: flex; flex-direction: column;
}
.task-card__head { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.task-card__flag { flex-shrink: 0; }
.task-card__state { font-size: 12px; line-height: 16px; } /* bodySmall */
.task-card__spacer { flex: 1; }
.task-card__deadline { font-size: 12px; line-height: 16px; color: var(--halo-on-surface-variant, #7B8F9E); }
.task-card__deadline--overdue { color: var(--halo-ext3-highest, #D82A13); }
.task-card__title {
  font-size: 16px; line-height: 24px; font-weight: 500; /* titleMedium */
  color: var(--halo-on-surface, #25303C);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.task-card__dept { font-size: 12px; line-height: 16px; color: var(--halo-outline-variant, #637889); margin-top: 4px; }
.task-card__foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.task-card__avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--halo-on-primary, #FFFFFF); /* AvatarWithoutPhoto */
  border: 1px solid var(--halo-surface-container-high, #D0D7DC);
  display: flex; align-items: center; justify-content: center;
  color: var(--halo-on-surface-variant, #7B8F9E);
}
.task-card__assignee {
  flex: 1; min-width: 0;
  font-size: 12px; line-height: 16px; color: var(--halo-on-surface, #25303C);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.task-card__counter { display: flex; align-items: center; gap: 2px; font-size: 12px; line-height: 16px; color: var(--halo-on-surface, #25303C); }
.task-card__counter svg { color: var(--halo-outline, #9AA9B5); }

/* HaloProcessCard: surfaceContainerLow, shapes.large 16, padding m6, круг 32 + иконка */
.processes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 16px 12px; }
.process-tile {
  background: var(--halo-surface-container-low, #F3F5F6); border-radius: 16px;
  border: none; padding: 12px; cursor: pointer; text-align: left;
  font-family: inherit; min-width: 0;
  display: flex; align-items: center; gap: 8px;
}
.process-tile:active { background: var(--halo-surface-container); }
.process-tile__icon {
  position: relative; width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--halo-surface-container-high, #D0D7DC); color: var(--halo-on-surface);
  display: flex; align-items: center; justify-content: center;
}
.process-tile__pin {
  position: absolute; top: -2px; right: -2px; color: var(--halo-primary);
  display: flex;
}
.process-tile__name {
  flex: 1; min-width: 0; font-size: 14px; line-height: 18px; /* bodyMediumCompact */
  color: var(--halo-on-surface);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* HaloBanner (ATTENTION): заголовок + описание + text-action + Close */
.banner {
  margin: 0 16px 12px; padding: 12px 14px; border-radius: 16px;
  display: flex; gap: 8px; align-items: flex-start;
}
.banner--attention { background: #FFF1BF; color: #6D4C00; }
.banner--info { background: #E3F0FC; color: #0D47A1; }
.banner--warning { background: var(--halo-warning-container); color: #92600A; }
.banner--promo { background: var(--halo-secondary-container); color: var(--halo-on-primary-container); }
.banner__body { flex: 1; min-width: 0; }
.banner__title { font-size: 14px; line-height: 20px; font-weight: 600; }
.banner__desc { font-size: 13px; line-height: 18px; margin-top: 2px; }
.banner__action {
  background: none; border: none; cursor: pointer; padding: 4px 0 0;
  font: 600 14px/20px 'X5 Sans', Roboto, sans-serif; color: inherit;
}
.banner__close { border: none; background: none; cursor: pointer; color: inherit; opacity: .7; padding: 0; flex-shrink: 0; }
.banner__icon { font-size: 18px; flex-shrink: 0; }

/* ============ Digital Core task card ============ */
.dc-card {
  margin: 0 16px 12px; border-radius: 20px; padding: 20px;
  background: linear-gradient(135deg, var(--halo-primary) 0%, #3B7D18 100%);
  color: #fff; box-shadow: var(--shadow-float);
}
.dc-card--idle { background: var(--halo-surface); color: var(--halo-on-surface); }
.dc-card__state-label { font-size: 12px; opacity: .85; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.dc-card__title { font-size: 20px; font-weight: 700; margin-top: 6px; }
.dc-card__desc { font-size: 13px; margin-top: 6px; opacity: .9; line-height: 1.4; }
.dc-card__timer { font-size: 32px; font-weight: 800; margin-top: 12px; font-variant-numeric: tabular-nums; }
.dc-card__actions { display: flex; gap: 10px; margin-top: 16px; }
.dc-card .btn--on-primary { background: #fff; color: var(--halo-on-primary-container); flex: 1; }
.dc-card .btn--on-primary-outline { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.5); flex: 1; }
.dc-card--idle .btn--on-primary { background: var(--halo-primary); color: #fff; }
.dc-card--idle .btn--on-primary-outline { background: transparent; color: var(--halo-primary); border-color: var(--halo-outline); }

/* ============ Analytics ============ */
.metric-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px 12px; }
.metric-card {
  background: var(--halo-surface); border-radius: var(--radius-card);
  padding: 14px; box-shadow: var(--shadow-card);
}
.metric-card__label { font-size: 11px; color: var(--halo-on-surface-variant); }
.metric-card__value { font-size: 24px; font-weight: 800; color: var(--halo-on-surface); margin-top: 4px; }
.metric-card__delta { font-size: 11px; font-weight: 600; margin-top: 4px; }
.metric-card__delta--up { color: var(--halo-ext2); }
.metric-card__delta--down { color: var(--halo-ext3-highest); }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 8px 4px 0; }
.bar-chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bar-chart__bar { width: 100%; border-radius: 6px 6px 2px 2px; background: var(--halo-primary-fixed); }
.bar-chart__bar--hl { background: var(--halo-primary); }
.bar-chart__label { font-size: 9px; color: var(--halo-on-surface-variant); }

/* ============ LI schedule (График ЛИ) ============ */
.li-week-header { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 16px 8px; }
.li-week-header__day { text-align: center; font-size: 10px; color: var(--halo-on-surface-variant); font-weight: 600; }
.li-grid { display: flex; flex-direction: column; gap: 6px; margin: 0 16px 12px; }
.li-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.li-cell {
  aspect-ratio: 1; border-radius: 10px; background: var(--halo-surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--halo-on-surface);
  box-shadow: var(--shadow-card); cursor: pointer; border: none; font-family: inherit;
  position: relative;
}
.li-cell--out { color: var(--halo-outline); background: transparent; box-shadow: none; }
.li-cell--plan { background: var(--halo-ext2-lowest); color: var(--halo-on-primary-container); }
.li-cell--progress { background: var(--halo-ext2-low); }
.li-cell--done { background: var(--halo-primary-container); color: var(--halo-on-primary-container); }
.li-cell--today { outline: 2px solid var(--halo-primary); outline-offset: 1px; }
.li-cell__mark { position: absolute; bottom: 4px; font-size: 7px; }
.li-legend { display: flex; gap: 14px; padding: 0 20px 12px; flex-wrap: wrap; }
.li-legend__item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--halo-on-surface-variant); }
.li-legend__swatch { width: 12px; height: 12px; border-radius: 4px; }
.li-dot { width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--halo-on-surface-variant); display: inline-block; box-sizing: border-box; }
.li-dot--progress { background: var(--halo-on-surface-variant); }
.process-detail__icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--halo-surface-container-high);
  display: flex; align-items: center; justify-content: center;
  color: var(--halo-on-surface); margin-bottom: 8px;
}

/* ============ Support requests ============ */
.request-card {
  background: var(--halo-surface); border-radius: var(--radius-card);
  margin: 0 16px 10px; padding: 14px 16px; box-shadow: var(--shadow-card);
  cursor: pointer; border: none; width: calc(100% - 32px); text-align: left; font-family: inherit;
}
.request-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.request-card__num { font-size: 12px; color: var(--halo-on-surface-variant); font-weight: 600; }
.request-card__title { font-size: 15px; font-weight: 600; color: var(--halo-on-surface); margin-top: 4px; }
.request-card__meta { font-size: 12px; color: var(--halo-on-surface-variant); margin-top: 4px; }

/* ============ FAB ============ */
.fab {
  position: absolute; right: 16px; bottom: 16px;
  width: 56px; height: 56px; border-radius: 18px; border: none;
  background: var(--halo-primary-container); color: var(--halo-on-primary-container);
  font-size: 24px; cursor: pointer; box-shadow: var(--shadow-float); z-index: 30;
  display: flex; align-items: center; justify-content: center;
}
.fab:active { transform: scale(.96); }

/* ============ Store team ============ */
.team-member { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.team-member__avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff;
}
.team-member__content { flex: 1; min-width: 0; }
.team-member__name { font-size: 15px; font-weight: 600; color: var(--halo-on-surface); }
.team-member__role { font-size: 12px; color: var(--halo-on-surface-variant); }

/* ============ Notifications (NotificationsListComponentContent.kt) ============ */
.screen--surface { background: var(--halo-surface); }
/* GroupTitle: surface bg, minHeight 52, padding 16, titleSmall 14/20 */
.notif-group-title {
  display: flex; align-items: center; gap: 4px; /* m2 */
  min-height: 52px; padding: 16px;
  background: var(--halo-surface);
  position: sticky; top: 0; z-index: 2;
}
.notif-group-title__primary { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--halo-on-surface); } /* titleSmall */
.notif-group-title__count { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--halo-outline-variant); }
/* NotificationCard: surfaceContainerLow, shape xLarge(20), padding m8, h-margin m8, top m2 */
.notif-card {
  display: flex; align-items: center;
  background: var(--halo-surface-container-low, #F3F5F6);
  border-radius: 20px; /* HaloShapes.xLarge */
  padding: 16px; /* m8 */
  margin: 4px 16px 0; /* m2 / m8 */
  cursor: pointer;
}
.notif-card:active { background: var(--halo-surface-container); }
.notif-card__main { flex: 1; min-width: 0; }
.notif-card__head { display: flex; align-items: center; }
.notif-dot {
  width: 8px; height: 8px; border-radius: 8px; flex-shrink: 0;
  background: var(--halo-error);
  margin-right: 6px; /* m3 */
}
.notif-card__title {
  font-size: 16px; line-height: 24px; font-weight: 500; /* titleMedium */
  color: var(--halo-on-surface);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-card__text {
  font-size: 12px; line-height: 16px; /* bodySmall */
  color: var(--halo-on-surface);
  margin-top: 2px; /* m1 */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-card__time { font-size: 12px; line-height: 16px; color: var(--halo-outline-variant); margin-top: 12px; } /* bodySmall / m6 */
.notif-card__chevron { color: var(--halo-on-surface-variant); flex-shrink: 0; margin-left: 10px; } /* m5 */

/* ============ Schedule (ScheduleComponentContent.kt) ============ */
.schedule-sheet {
  flex: 1; background: var(--halo-surface);
  border-radius: 16px; /* Content clip 16dp */
  overflow: hidden;
}
/* SelectMonth: SecondaryTabRow, padding m12 */
.schedule-tabs { display: flex; gap: 8px; padding: 24px; }
.schedule-tab {
  flex: 1; height: 40px; border-radius: 20px;
  border: 1px solid var(--halo-outline); background: var(--halo-surface);
  font-size: 14px; line-height: 20px; font-weight: 500; /* labelLarge */
  color: var(--halo-on-surface); cursor: pointer; font-family: inherit;
  white-space: nowrap;
}
.schedule-tab--active {
  background: var(--halo-primary-container); color: var(--halo-on-primary-container);
  border-color: transparent; font-weight: 600;
}
/* ScheduleCalendar: padding m4 */
.sched-calendar { padding: 8px; }
.sched-month {
  font-size: 24px; line-height: 32px; font-weight: 500; /* headlineSmall */
  color: var(--halo-on-surface);
  padding: 16px 8px; /* v m8 / h m4 */
}
.sched-dow-row { display: grid; grid-template-columns: repeat(7, 1fr); }
.sched-dow {
  text-align: center; padding: 4px; /* m2 */
  font-size: 16px; line-height: 16px; /* textLineLarge */
  color: var(--halo-on-surface);
}
.sched-week { display: grid; grid-template-columns: repeat(7, 1fr); }
.sched-cell {
  aspect-ratio: 1; padding: 2px; /* m1 */
  background: var(--halo-background);
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
}
.sched-cell__num { font-size: 16px; line-height: 24px; color: var(--halo-on-primary-container); } /* FUTURE: bodyMedium / onSecondaryContainer */
.sched-cell__num--dim { color: var(--halo-outline); } /* PAST / WEEKEND */
.sched-cell__num--current { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--halo-on-surface); } /* CURRENT: titleSmall */
.sched-cell__times {
  text-align: center;
  font-size: 10px; line-height: 12px; /* labelTiny */
  color: var(--halo-outline);
}

/* ============ Profile (ProfileComponentContent.kt) ============ */
.profile-scroll { padding: 4px 16px 0; }
/* ProfileInfo: Surface(shape large, surface) + padding h16 */
.profile-info {
  background: var(--halo-surface); border-radius: var(--radius-card); /* HaloShapes.large */
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-card);
}
.profile-info__head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.profile-avatar {
  position: relative; width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  background: var(--halo-surface-container); color: var(--halo-on-surface-variant);
  display: flex; align-items: center; justify-content: center;
}
.profile-avatar__badge {
  position: absolute; right: 0; bottom: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--halo-primary); color: var(--halo-on-primary);
  border: 2px solid var(--halo-surface);
  display: flex; align-items: center; justify-content: center;
}
.profile-info__names { min-width: 0; }
.profile-info__name {
  font-size: 20px; line-height: 24px; font-weight: 500; /* titleLarge */
  color: var(--halo-on-surface);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-row { padding: 10px 0; }
.profile-row__label { font-size: 16px; line-height: 16px; color: var(--halo-on-surface-variant); } /* textLineLarge */
.profile-row__value { font-size: 16px; line-height: 16px; color: var(--halo-on-surface); margin-top: 6px; }
.profile-divider { height: 1px; background: var(--halo-surface-container-low); }
/* ProfileCard: Surface(large) + Row(padding m6, gap m4) + icon 24dp primary + text textLineLarge */
.profile-card {
  display: flex; align-items: center; gap: 8px;
  background: var(--halo-surface); border-radius: var(--radius-card);
  padding: 12px; margin-bottom: 12px; box-shadow: var(--shadow-card);
  cursor: pointer; border: none; width: 100%; font-family: inherit; text-align: left;
}
.profile-card:active { background: var(--halo-surface-container-low); }
.profile-card__icon {
  padding: 4px; /* m4 */
  color: var(--halo-primary);
  display: flex; align-items: center;
}
.profile-card__icon svg { width: 24px; height: 24px; }
.profile-card__text { flex: 1; min-width: 0; font-size: 16px; line-height: 16px; color: var(--halo-on-surface); } /* textLineLarge */
.profile-card__badge {
  min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px;
  background: var(--halo-error); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile-card__badge--done { background: var(--halo-ext2-highest); }
.profile-card .list-item__chevron { color: var(--halo-outline); flex-shrink: 0; }
/* InfoList: Surface(large) + padding v16; header titleLarge; rows textLineLarge */
.profile-infolist {
  background: var(--halo-surface); border-radius: var(--radius-card);
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-card);
}
.profile-infolist__header {
  font-size: 20px; line-height: 24px; font-weight: 500; /* titleLarge */
  color: var(--halo-on-surface); margin-bottom: 8px;
}
.profile-infolist__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 0;
}
.profile-infolist__label { font-size: 16px; line-height: 16px; color: var(--halo-on-surface-variant); flex-shrink: 0; }
.profile-infolist__value {
  font-size: 16px; line-height: 16px; color: var(--halo-on-surface);
  text-align: right; word-break: break-all;
}
.profile-version {
  text-align: center; padding: 8px 0 24px;
  font-size: 12px; line-height: 16px; /* bodySmall */
  color: var(--halo-on-surface-variant);
}

/* ============ Empty states ============ */
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 56px 32px; gap: 10px; }
.empty-state__icon { font-size: 48px; }
.empty-state__title { font-size: 16px; font-weight: 700; color: var(--halo-on-surface); }
.empty-state__text { font-size: 13px; color: var(--halo-on-surface-variant); text-align: center; line-height: 1.45; }

/* ============ Debug menu ============ */
.debug-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; font-size: 13px; }
.debug-row__key { color: var(--halo-on-surface-variant); font-family: ui-monospace, monospace; font-size: 11px; }
.debug-row__val { font-weight: 600; color: var(--halo-on-surface); font-family: ui-monospace, monospace; font-size: 11px; }

/* ============ VPN lock / Force update ============ */
.lock-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 40px; text-align: center; gap: 8px; }
.lock-screen__icon { font-size: 64px; }
.lock-screen__title { font-size: 20px; font-weight: 700; color: var(--halo-on-surface); }
.lock-screen__text { font-size: 14px; color: var(--halo-on-surface-variant); line-height: 1.5; }

/* ============ Scanner ============ */
.scanner-screen { flex: 1; background: #111; position: relative; display: flex; flex-direction: column; }
.scanner-frame {
  position: absolute; top: 30%; left: 10%; right: 10%; height: 220px;
  border: 2px solid rgba(255,255,255,.7); border-radius: 16px;
}
.scanner-frame::before, .scanner-frame::after {
  content: ''; position: absolute; width: 28px; height: 28px;
  border: 4px solid var(--halo-primary-fixed);
}
.scanner-frame::before { top: -4px; left: -4px; border-right: none; border-bottom: none; border-radius: 16px 0 0 0; }
.scanner-frame::after { bottom: -4px; right: -4px; border-left: none; border-top: none; border-radius: 0 0 16px 0; }
.scanner-line {
  position: absolute; top: 30%; left: 10%; right: 10%; height: 220px; overflow: hidden; border-radius: 16px;
}
.scanner-line::after {
  content: ''; position: absolute; left: 8%; right: 8%; height: 2px;
  background: var(--halo-primary-fixed); box-shadow: 0 0 12px var(--halo-primary-fixed);
  animation: scanline 2s ease-in-out infinite alternate;
}
@keyframes scanline { from { top: 8%; } to { top: 90%; } }
.scanner-hint { position: absolute; bottom: 120px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.85); font-size: 14px; }

/* ============ QR ============ */
.qr-box { display: flex; justify-content: center; padding: 24px 0; }
.qr-code {
  width: 220px; height: 220px; border-radius: 16px; background: #fff;
  display: grid; grid-template-columns: repeat(21, 1fr); grid-template-rows: repeat(21, 1fr);
  padding: 12px; gap: 0; box-shadow: var(--shadow-card);
}
.qr-code__px { background: transparent; }
.qr-code__px--on { background: #222626; }

/* ============ Misc ============ */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.px-16 { padding-left: 16px; padding-right: 16px; }
.caption { font-size: 12px; color: var(--halo-on-surface-variant); }
.headline { font-size: 17px; font-weight: 700; color: var(--halo-on-surface); }
.flex-spacer { flex: 1; }
.link { color: var(--halo-primary); font-weight: 600; cursor: pointer; }

@media (max-width: 900px) {
  .emulator-layout { flex-direction: column; align-items: center; }
  .dev-panel { width: 100%; max-width: 390px; position: static; max-height: none; }
}
