/* Геометрия концепции v1 (concepts-cofein/ui.css). Данные приходят из кабинета. */
.concept-app { background: var(--paper); font-size: 15px; position: relative; min-height: 100dvh; }
.concept-app h1, .concept-app h2, .concept-app h3, .concept-app p { margin: 0; }
.concept-app a { text-decoration: none; }
.concept-app a:hover { text-decoration: underline; }
.concept-app h1 { font-family: var(--text); font-size: 17px; letter-spacing: 0; }
.concept-app h2, .concept-app h3 { font-size: 15px; font-weight: 700; }
.sidebar { position: absolute; inset: 0 auto 0 0; width: 224px; background: var(--night);
  color: #dfe8e3; padding: 16px 12px; display: flex; flex-direction: column; overflow-y: auto; }
.client-brand { font-family: var(--display); font-weight: 700; font-size: 16px;
  letter-spacing: .01em; color: #dfe8e3; padding: 0 10px; }
.workspace-label { font-size: 10.5px; color: #7f948d; margin: 4px 10px 14px; }
.client-nav { display: grid; gap: 2px; }
.nav-section { display: grid; gap: 2px; margin-top: 10px; }
.nav-heading { font-size: 10px; letter-spacing: .09em; text-transform: uppercase;
  color: #6d837c; padding: 0 10px 3px; }
.nav { display: flex; align-items: center; gap: 9px; padding: 6px 10px;
  border-radius: 8px; font-size: 13.5px; color: #c4d1cb; min-height: 30px; }
.nav i { width: 11px; height: 11px; border-radius: 3px; background: #35514c; flex: none; }
.nav.on { background: #1d3532; color: white; font-weight: 600; }
.nav.on i { background: #2fb3ab; }
.nav:hover { background: var(--night-2); text-decoration: none !important; }
.sidebar-bottom { margin-top: auto; padding-top: 14px; }
.profile { border-top: 1px solid #29413b; padding-top: 14px; display: flex; gap: 10px;
  align-items: center; font-size: 12.5px; overflow-wrap: anywhere; }
.profile small { display: block; color: #a0b2ab; font-size: 11.5px; }
.avatar { width: 30px; height: 30px; border-radius: 9px; background: #294440;
  color: #8ed6ce; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 12px; }
.logout-button { color: #a0b2ab; background: transparent; border: 0; font-size: 12px; }
.client-workspace { margin-left: 224px; min-width: 0; }
.client-topbar { min-height: 52px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 8px 20px; }
.top-title { min-width: 0; }
.top-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.breadcrumbs { font-size: 11px; color: var(--muted); }
.topbar-slash { padding: 0 4px; }
.concept-app main { max-width: none; margin: 0; padding: 16px 20px 40px; }
.concept-app .btn, .concept-app button { min-height: 38px; padding: 7px 22px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
  font-weight: 600; line-height: 1.25; border-radius: var(--r-pill); }
.concept-app input, .concept-app select { min-height: 42px; }
.concept-app .sub { color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.concept-app .panel, .chart-panel { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 18px 20px 20px; margin: 0; min-width: 0; }
.concept-app main > .panel + .panel { margin-top: 20px; }
.concept-app .panel > header, .section-head { display: flex; align-items: baseline;
  gap: 12px; margin-bottom: 16px; }
.section-head .chart-caption, .panel header .meta { margin-left: auto; }
.concept-app .note, .chart-caption, .chart-foot { color: var(--muted); font-size: 11.5px; }
.concept-app .note { margin-top: 12px; line-height: 1.55; }
.concept-app .badge { padding: 5px 11px; font-size: 11.5px; white-space: normal; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 16px 18px; min-height: 183px; }
.metric-label { font-size: 12.5px; color: var(--muted); }
.metric-value { font-family: var(--display); font-size: 29px; font-weight: 700;
  letter-spacing: -.055em; margin: 8px 0 4px; }
.metric p { font-size: 11.5px; color: var(--muted); }
.metric.alert .metric-value { color: var(--signal); }
.period-switch { display: flex; border: 1px solid var(--line); border-radius: var(--r-pill);
  overflow: hidden; }
.period-switch a { padding: 7px 14px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.period-switch a.selected { background: var(--night); color: white; }
.analytics-grid { display: grid; gap: 20px; }
.chart-panel { min-height: 300px; }
.trend-panel { min-height: 339px; }
.hours-panel { min-height: 327px; }
.ranking-panel { min-height: 314px; }
.trend-chart { display: block; width: 100%; height: 188px; }
.trend-chart text { font-family: var(--text); font-size: 10.5px; fill: var(--muted); }
.gridline { stroke: var(--line); stroke-width: 1px; }
.calendar-tick { display: none; }
.trend-line { fill: none; stroke-width: 2px; }
.trend-total { stroke: var(--crema); }
.trend-recognized { stroke: var(--teal); }
.trend-dot { fill: var(--teal); }
.trend-dot-total { fill: var(--crema); }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  color: var(--muted); font-size: 11.5px; margin-top: 10px; }
.chart-legend .key { width: 10px; height: 10px; border-radius: 3px; margin-left: 10px; }
.chart-legend .key:first-child { margin-left: 0; }
.key-total { background: var(--crema); }
.key-recognized { background: var(--teal); }
.chart-foot { margin-top: 10px !important; }
.chart-table { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.chart-table summary { cursor: pointer; }
.table-scroll { overflow-x: auto; }
.fleet-lifecycle-history table { min-width: 900px; }
.hours-chart { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 5px; margin-top: 36px; }
.hour-column { min-width: 0; text-align: center; }
.hour-number { display: block; height: 20px; font-size: 10px; color: #4c554f; }
.hour-bar { height: 130px; position: relative; border-bottom: 1px solid var(--line-soft); }
.bar-total, .bar-recognized { position: absolute; bottom: 0; left: 0; right: 0;
  border-radius: 3px 3px 0 0; background: var(--crema-pale); }
.bar-recognized { background: var(--teal-deep); }
.hour-label { font-size: 10.5px; color: var(--muted); }
.location-rank { display: grid; grid-template-columns: minmax(0, 1fr) 96px 46px; gap: 12px;
  align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px; color: var(--ink); }
.location-rank:last-child { border-bottom: 0; }
.rank-track { height: 9px; background: var(--idle); border-radius: 5px; overflow: hidden; }
.rank-track span { display: block; height: 100%; background: var(--teal); }
.location-rank strong { text-align: right; }
.chart-empty { min-height: 180px; display: grid; place-content: center; text-align: center;
  color: var(--muted); gap: 8px; }
.chart-empty small { font-size: 12px; }
.concept-app .alerts { display: grid; gap: 10px; margin: 16px 0 0; }
.concept-app .alerts li { display: flex; align-items: baseline; gap: 11px; border-radius: 12px; background: var(--crema-pale);
  color: var(--crema-deep); padding: 10px 12px; font-size: 13.5px; }
.concept-app .alerts li:has(.error) { background: var(--signal-pale); color: var(--signal); }
.concept-app .alerts .badge { padding: 0; font-size: 0; width: 8px; height: 8px; flex: none;
  border-radius: 50%; background: var(--crema); }
.concept-app .alerts .badge.error { background: var(--signal); }
.alert-detail { display: block; font-size: 11.5px; margin-top: 10px; opacity: .8; }
.concept-app .report { white-space: normal; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 16px 18px; margin: 0; font-size: 13.5px;
  line-height: 1.5; overflow-wrap: anywhere; }
.report-text { white-space: pre-wrap; }
.concept-app .report .when { color: var(--ink); font-size: 14.5px; font-weight: 700; margin-bottom: 10px; }
.reportlist { display: grid; gap: 14px; margin-top: 16px; }
.report-more { margin-top: 8px; white-space: pre-wrap; }
.report-more summary { color: var(--teal-deep); font-weight: 600; cursor: pointer; font-size: 13px; }
.report-more .label-open { display: none; }
.report-more[open] .label-open { display: inline; }
.report-more[open] .label-closed { display: none; }
.latest-report .report { border: 0; padding: 0; margin-top: 16px; }
.more-link { font-size: 13px; display: inline-block; margin-top: 12px; font-weight: 600; }
.staff-list { display: grid; gap: 9px; margin-top: 16px; font-size: 13.5px; }
.staff-list .badge { margin-right: 10px; padding: 3px 9px; font-size: 11px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.location-panels { display: grid; gap: 12px; }
.location-panels .report { margin-top: 12px; }
.devcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.dev { border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; min-width: 0; }
.dev h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dev .nums { display: flex; flex-wrap: wrap; gap: 12px 18px; font-size: 12.5px; color: var(--muted); }
.wavebox { display: flex; align-items: center; gap: 3px; height: 34px; margin: 14px 0 12px; }
.wavebox i { width: 3px; border-radius: 2px; background: var(--crema); }
.wavebox.off i { height: 3px !important; background: var(--line); }
.concept-app table { font-size: 13.5px; }
.concept-app th { font-size: 11.5px; padding: 10px 12px; }
.concept-app td { padding: 13px 12px; border-color: var(--line-soft); }
.concept-app td:first-child, .concept-app th:first-child { padding-left: 0; }
.concept-app .row { margin-top: 12px; }
.registry-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.registry-card { box-shadow: var(--shadow-pop); }
.registry-details { margin-top: 16px; }
.registry-details summary { cursor: pointer; }
.registry-slug { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.registry-grid table { table-layout: fixed; }
.registry-grid > section table { min-width: 620px; }
.registry-details > .panel { overflow-x: auto; margin-top: 12px; }
.registry-grid table th:first-child { width: 28%; }
.registry-grid table th:nth-child(2) { width: 9%; white-space: nowrap; }
.registry-grid table th:nth-child(3) { width: 19%; }
.registry-grid td > a { color: var(--ink); }
.registry-card > h2 { font-family: var(--display); font-size: 19px; margin-top: 8px; }
.registry-filters { display: flex; gap: 10px; margin: 18px 0; }
.registry-filters input { width: 320px; max-width: 100%; border-radius: var(--r-pill);
  border: 1px solid var(--line); padding: 0 16px; font: inherit; font-size: 13.5px; }
.ops-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.ops-column { display: grid; gap: 20px; min-width: 0; }
.ops-grid th, .ops-grid td { padding: 10px 6px; overflow-wrap: normal; }
.ops-grid .table-scroll table { min-width: 300px; }
.ops-grid .badge { overflow-wrap: normal; }
/* Выбор профиля аналитики: карточки-переключатели вместо выпадающего списка. */
.profile-picker { display: grid; gap: 10px; }
.profile-option { display: grid; grid-template-columns: auto auto minmax(0, 1fr);
  align-items: start; gap: 11px;
  border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 14px;
  background: var(--surface); cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s; }
.profile-option:hover { border-color: var(--teal);
  box-shadow: 0 6px 18px rgba(18, 33, 31, .07); }
.profile-option.checked { border-color: var(--teal);
  background: linear-gradient(180deg, var(--teal-pale), var(--surface) 75%);
  box-shadow: 0 6px 18px rgba(8, 126, 130, .10); }
.profile-option .profile-avatar.small { width: 32px; height: 32px;
  border-radius: 10px; font-size: 13px; margin-top: 2px; }
.profile-option.checked .profile-avatar.small { background: var(--teal); }
.profile-option-body { min-width: 0; display: grid; }
.profile-option input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--teal); }
.profile-option .name { display: block; font-weight: 600; font-size: 13.5px; }
.profile-option .desc { display: block; color: var(--muted); font-size: 12px;
  line-height: 1.45; margin-top: 2px; }
.profile-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.profile-kinds span { font-size: 11px; padding: 3px 10px; border-radius: var(--r-pill);
  border: 1px solid var(--line-soft); color: var(--teal-deep); background: var(--surface); }
.profile-option.checked .profile-kinds span { border-color: var(--teal); }
.profile-kinds span.more { color: var(--muted); border-style: dashed; }
/* Редактор текста промпта под карточками выбора профиля. */
.profile-prompt { display: grid; gap: 6px; margin-top: 14px; }
.profile-prompt .name { font-size: 12px; color: var(--muted); }
.profile-prompt textarea { width: 100%; min-height: 200px; resize: vertical;
  font: inherit; font-size: 12.5px; line-height: 1.5; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-field);
  background: var(--surface); color: var(--ink); }
.profile-prompt textarea:focus { outline: 2px solid var(--teal); outline-offset: -1px; }
/* Страница управления профилями: карточки, форма, строки видов. */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.profile-card { border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 16px 18px; background: var(--surface); display: grid; gap: 10px;
  align-content: start; transition: border-color .15s, box-shadow .15s, transform .15s; }
.profile-card:hover { border-color: var(--teal);
  box-shadow: 0 6px 18px rgba(18, 33, 31, .07); }
.profile-card.active { border-color: var(--teal);
  background: linear-gradient(180deg, var(--teal-pale), var(--surface) 70%);
  box-shadow: 0 6px 18px rgba(8, 126, 130, .10); }
.profile-card-top { display: flex; gap: 12px; align-items: center; }
.profile-avatar { width: 40px; height: 40px; border-radius: 13px; flex: none;
  display: grid; place-items: center; background: var(--night); color: var(--paper);
  font-family: var(--display); font-weight: 700; font-size: 15px; }
.profile-card.active .profile-avatar { background: var(--teal); }
.profile-card-title { min-width: 0; }
.profile-card .name { font-weight: 600; font-size: 14.5px; display: block; }
.profile-card .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.profile-card .desc { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 0; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 2px; }
.profile-actions form { display: contents; }
.profile-add-card { border-style: dashed; color: var(--muted); align-content: center;
  justify-items: start; gap: 8px; font-size: 12.5px; line-height: 1.45; }
.profile-add-card:hover { color: var(--teal-deep); text-decoration: none; }
.profile-add-glyph { width: 40px; height: 40px; border-radius: 13px; display: grid;
  place-items: center; border: 1.5px dashed var(--line); font-size: 22px;
  font-weight: 400; color: var(--teal); background: var(--surface-2); }
/* Форма профиля: секции и поля. */
.profile-editor .form-section { border-top: 1px solid var(--line-soft);
  padding-top: 14px; margin-top: 18px; }
.profile-editor .form-section:first-of-type { border-top: 0; margin-top: 6px; padding-top: 0; }
.profile-editor .form-section h3 { margin-bottom: 10px; }
.profile-editor .readonly-line { font-size: 13px; margin: 0; color: var(--muted); }
.profile-editor .readonly-line code { background: var(--surface-2);
  border: 1px solid var(--line-soft); border-radius: var(--r-field);
  padding: 2px 8px; color: var(--ink); }
.profile-editor label.field { display: grid; gap: 6px; font-size: 12px;
  color: var(--muted); min-width: 0; }
.profile-editor input, .profile-editor select { width: 100%; min-height: 40px;
  border: 1px solid var(--line); border-radius: var(--r-field); padding: 7px 12px;
  font: inherit; font-size: 13px; background: var(--surface); color: var(--ink); }
.profile-editor input:focus, .profile-editor select:focus {
  outline: 2px solid var(--teal); outline-offset: -1px; }
.profile-editor .field-grid { display: grid; gap: 12px 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.profile-editor .field.wide { grid-column: 1 / -1; }
.profile-editor .form-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.kind-row { border: 1px solid var(--line-soft); border-radius: var(--r-field);
  padding: 14px; margin: 0 0 12px; background: var(--surface-2); }
.kind-row legend { font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--teal-deep); padding: 0 8px; }
.kind-row .field-grid { display: grid; gap: 10px 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kind-row .kind-hint { grid-column: 1 / -1; }
.button-link { display: inline-flex; align-items: center; min-height: 36px;
  padding: 6px 16px; font-size: 13px; font-weight: 600; border-radius: var(--r-pill);
  border: 1px solid var(--line); color: var(--teal-deep); background: var(--surface); }
.button-link:hover { border-color: var(--teal); text-decoration: none; }
.button-link.primary-link { background: var(--night); color: white; border-color: var(--night); }
button.danger { color: var(--signal); border-color: var(--signal); background: transparent; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } }
.panel > form + .note, .panel > form + form { margin-top: 4px; }
.service-item { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.service-item header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.service-item b { font-size: 13.5px; }
.service-item details { margin-top: 8px; color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.service-item summary { cursor: pointer; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: 13px;
  margin: 16px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.toggle-row { display: flex; gap: 12px; align-items: center; padding: 14px 0;
  border-bottom: 1px solid var(--line-soft); }
.toggle-row form { flex: none; }
.concept-app .switch { display: block; padding: 0; min-height: 24px; width: 42px; height: 24px;
  background: #cdc8ba; border: 0; position: relative; }
.switch::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: white; top: 3px; left: 3px; }
.concept-app .switch.on { background: var(--teal); }
.switch.on::after { left: 21px; }
.toggle-row b { font-size: 13.5px; }
.toggle-row small { display: block; color: var(--muted); font-size: 11.5px; }
.gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.gauge { background: var(--surface-2); padding: 12px 14px; border: 1px solid var(--line-soft);
  border-radius: 12px; }
.gauge b { font-family: var(--display); font-size: 21px; }
.gauge span { display: block; font-size: 11.5px; color: var(--muted); }
.more-menu { display: none; }
.concept-app .mobile-menu { display: none; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 30; background: var(--surface); padding: 12px; }
.skip-link:focus { top: 12px; }
[id] { scroll-margin-top: 20px; }
@media (max-width: 1190px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 145px; }
  .registry-grid { grid-template-columns: minmax(0, 1fr); }
  .ops-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .sidebar { width: 192px; }
  .client-workspace { margin-left: 192px; }
  .client-topbar { flex-wrap: wrap; }
  .top-actions { margin-left: 0; }
  .hours-chart { gap: 3px; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .client-workspace { margin-left: 0; }
  .client-topbar { padding: 16px 18px; min-height: 62px; }
  .concept-app h1 { font-size: 15.5px; }
  .concept-app main { padding: 16px 18px 100px; }
  .concept-app .btn, .concept-app button, .concept-app input, .concept-app select { min-height: 44px; }
  .top-actions { width: 100%; gap: 10px; }
  .period-switch { flex: 1; }
  .period-switch a { flex: 1; text-align: center; padding: 11px 10px; }
  .metrics { grid-template-columns: 1fr; }
  .metric { min-height: 125px; padding: 16px 18px; }
  .concept-app .panel, .chart-panel { padding: 16px 18px; }
  .section-head { flex-wrap: wrap; }
  .section-head .chart-caption { margin-left: 0; }
  .devcards { grid-template-columns: minmax(0, 1fr); }
  .hours-chart { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px 5px; }
  .hour-bar { height: 85px; }
  .more-menu:target { display: grid; gap: 16px; position: fixed; inset: 0;
    padding: 24px; background: var(--night); color: white; z-index: 20; overflow-y: auto; }
  .platform-app .client-topbar::after { content: ""; }
  .platform-app .mobile-menu { display: inline-flex; }
  /* Платформа на мобильном: сайдбар скрыт целиком (как у клиентского кабинета),
     навигация живёт в #more по кнопке «Меню». Первый экран начинается с
     заголовка и полезного содержимого, а не со всей навигации. */
  .registry-filters { flex-wrap: wrap; }
  .registry-filters input { width: 100%; }
  .location-rank { grid-template-columns: minmax(0, 1fr) 64px 40px; }
}
@media (prefers-reduced-motion: no-preference) {
  .concept-app a, .concept-app button { transition: background-color 160ms ease; }
}

/* Публичные страницы: вход, приглашение, регистрация по промокоду, юрист.
   Боковой панели у них нет — один столбец по центру и та же шапка. */
.public-app { display: flex; flex-direction: column; min-height: 100dvh; }
.public-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.public-app .public-head .wordmark { display: flex; align-items: baseline; gap: 12px;
  width: min(100% - 40px, 1240px); margin: 0 auto; padding: 17px 0;
  font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: .01em;
  color: var(--ink); }
.public-app .wordmark span { font-family: var(--text); color: var(--muted);
  font-size: 11.5px; font-weight: 500; }
.concept-app.public-app main.public-shell { width: min(100% - 40px, 34rem);
  max-width: none; margin: 0 auto; padding: 40px 0 56px; flex: 1; }
.concept-app.public-app main.public-shell.wide { width: min(100% - 40px, 46rem); }
.public-app h1 { font-size: 25px; }
.public-app .sub { font-size: 13.5px; margin: 0 0 24px; }
.public-app .panel { margin: 0 0 16px; }
.public-app .panel:last-child { margin-bottom: 0; }
.public-app .public-foot { width: min(100% - 40px, 1240px); margin: 0 auto;
  padding: 18px 0 28px; border-top: 1px solid var(--line); color: var(--muted);
  font-size: 11.5px; }
.public-app .public-foot a { color: var(--teal-deep); }
.public-app .updated { color: var(--muted); font-size: 12px; margin: 0 0 18px; }
.public-app .intro { font-size: 15px; color: var(--ink); }
.public-app .facts { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.public-app .draft-note { margin-top: 28px; border-left: 2px solid var(--line);
  padding-left: 16px; color: var(--muted); font-size: 12.5px; }
.public-app .button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.public-app #feed { display: grid; gap: 10px; }
.public-app .bubble { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 12px 16px; font-size: 13.5px; }
.public-app .meta { color: var(--muted); font-size: 11.5px; margin-bottom: 4px; }
.public-app .pending { color: var(--muted); font-style: italic; }

/* Служебная панель платформы: те же токены и шрифты, но плотнее — это
   инструмент, а не витрина. */
.dev-app { padding: 28px 0 56px; }
.dev-shell { width: min(100% - 40px, 1180px); margin: 0 auto; }
.dev-app h1 { font-family: var(--text); font-size: 22px; margin: 0 0 4px; }
.dev-app .dev-org { color: var(--muted); font-size: 12px; margin: 0 0 20px;
  overflow-wrap: anywhere; }
.dev-app section { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 18px 20px 20px; margin-bottom: 16px; }
.dev-app h2 { font-size: 15px; margin: 0 0 12px; }
.dev-app table { border-collapse: collapse; width: 100%; margin-top: 8px; }
.dev-app th, .dev-app td { text-align: left; padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft); font-size: 13px; overflow-wrap: anywhere; }
.dev-app th { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.dev-app td { border-color: var(--line-soft); }
.dev-app textarea { width: 100%; min-height: 8rem; font-family: var(--text);
  font-size: 13px; border: 1px solid var(--line); border-radius: var(--r-field);
  background: var(--surface); color: var(--ink); padding: 10px 12px; }
.dev-app label { display: block; margin: 8px 0 4px; color: var(--muted); font-size: 12px; }
.dev-app button { padding: 8px 18px; margin-right: 8px; }
.dev-app input[type=number], .dev-app input[type=text] { padding: 8px 10px; }
.dev-app .muted { color: var(--muted); font-size: 12.5px; }
.dev-app .error { color: var(--signal); }
.dev-app .ok { color: var(--teal-deep); }
.dev-app .big { font-family: var(--display); font-size: 19px; font-weight: 700; }
.dev-app .transcript-row { border-left: 2px solid var(--teal); margin: 6px 0;
  padding: 4px 12px; background: var(--surface-2); border-radius: 0 var(--r-field) var(--r-field) 0; }
.dev-app details { margin-top: 8px; }
.dev-app details > summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.dev-app details > summary::before { content: ""; }

@media (max-width: 760px) {
  .public-app .public-head .wordmark { flex-wrap: wrap; gap: 4px; }
  .concept-app.public-app main.public-shell { padding: 28px 0 40px; }
  .public-app .public-foot { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .dev-app .dev-shell { width: calc(100% - 32px); }
}

.concept-app .host-panel { margin-bottom: 20px; }
.system-overview { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.system-overview .section-head { margin: 0; }
.system-overview .note { margin: 0; flex: 1 1 240px; }
.system-state { padding: 8px 16px; font-size: 14.5px; font-weight: 700; border-radius: var(--r-pill); }
.system-state.ok { background: var(--teal-pale); color: var(--teal-deep); }
.system-state.warn { background: var(--crema-pale); color: var(--crema-deep); }
.system-state.error { background: var(--signal-pale); color: var(--signal); }
.alerts.critical li { font-weight: 600; }
.host-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.host-chart { min-width: 0; padding: 14px; background: var(--surface-2); border-radius: var(--r-field); }
.host-chart header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.host-chart h3 { font-size: 14px; }
.host-chart strong { font-size: 22px; white-space: nowrap; }
.host-chart svg { display: block; width: 100%; overflow: visible; }
.host-chart svg text { font-size: 10px; fill: var(--muted); }
.chart-grid { stroke: var(--line); fill: none; }
.chart-line { stroke: var(--teal-deep); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.service-control .row { flex-wrap: wrap; margin-top: 12px; }
.service-control button { min-height: 44px; }
.service-control button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 800px) { .host-charts { grid-template-columns: minmax(0, 1fr); } }

/* --- R69: системные показатели мини-ПК ---
   Четыре плитки в стиле `.gauge` со страницы «Система»: число, подпись,
   пояснение и полоса заполнения. Полоса — только вспомогательный признак,
   число и подпись читаются и без неё. */
.device-system { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; margin: 12px 0 4px; }
.device-system .gauge { min-width: 0; }
.device-system .gauge b { font-size: 20px; font-variant-numeric: tabular-nums; }
.device-system .gauge span { font-size: 11px; }
.device-system .gauge small { display: block; font-size: 10.5px; color: var(--muted);
  margin-top: 3px; line-height: 1.4; }
.device-system .gauge.warn b { color: var(--crema-deep); }
.device-system .gauge.error b { color: var(--signal); }
.device-system .system-bar { height: 6px; border-radius: 999px; background: var(--line-soft);
  overflow: hidden; margin-top: 8px; }
.device-system .system-bar i { display: block; height: 100%; background: var(--teal); }
.device-system .system-bar i.warn { background: var(--crema); }
.device-system .system-bar i.error { background: var(--signal); }
.device-system-rows { margin: 12px 0 0; }
@media (max-width: 1100px) { .device-system { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- R69: компактное «Состояние» и свёрнутые подробности ---
   Первый экран: связь/запись, активность, CPU/RAM/disk, очередь и кнопки
   записи. Подробная телеметрия, таблицы архивов/процессов и SSH-статус —
   в details[data-key]: автообновление (r69.js) сохраняет их раскрытие. */
.r69-summary { display: grid; gap: 12px; }
.r69-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 12px 20px; align-items: start; }
.r69-block h4, .r69-record h4 { margin: 0 0 8px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.r69-block h4 .r69-state { font-weight: 500; text-transform: none; letter-spacing: 0;
  margin-left: 8px; }
.r69-details { margin-top: 10px; }
.r69-details > summary { cursor: pointer; min-height: 24px; font-size: 12.5px;
  font-weight: 600; color: var(--teal-deep); }
.r69-details[open] > summary { margin-bottom: 10px; }
.r69-record { margin-top: 14px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.r69-record .record-controls { margin-left: 0; }


/* --- Устройство: ритм речи, ползунки, лента этого устройства ---
   Геометрия взята из concepts-cofein/mock-location.html и ui.css: состояние
   точкой, поле полос — ритм речи крема, распознанная речь бирюзой. */
.concept-app .instrument { padding-bottom: 18px; }
.instrument-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.instrument-head .state { display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--teal-deep); }
.instrument-head .state i { width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal); flex: none; }
.instrument-head .state.off { color: var(--muted); }
.instrument-head .state.off i { background: #b8bfb8; }
.instrument-head .state.warn { color: var(--crema-deep); }
.instrument-head .state.warn i { background: var(--crema); }
.record-controls { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.record-controls button { min-height: 38px; }

/* Поле полос: единственное, что движется на странице, и только по новому
   замеру. В покое полосы замирают на минимальной высоте. */
.wavebox { display: flex; align-items: center; gap: 3px; height: 48px; margin: 18px 0 12px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
.wavebox i { width: 4px; height: 4px; border-radius: 2px; background: var(--crema);
  transition: height .32s ease-out; }
.wavebox.rest i { background: #cdc8ba; }
@media (prefers-reduced-motion: reduce) { .wavebox i { transition: none; } }

.instrument-nums { display: flex; gap: 28px; align-items: flex-end; flex-wrap: wrap; }
.instrument-nums p { display: grid; gap: 2px; }
.instrument-nums span { color: var(--muted); font-size: 11.5px; }
.instrument-nums b { font-size: 14px; font-weight: 600; }
.instrument-nums .lead { display: flex; align-items: baseline; gap: 10px; margin-right: 6px; }
.instrument-nums .lead b { font-family: var(--display); font-size: 30px; line-height: 1;
  font-weight: 700; letter-spacing: -.03em; color: var(--night); }
.instrument-nums .lead span { font-size: 12px; }
#audio-clip.loud { color: var(--signal); }

.device-workspace { display: grid; gap: 20px;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 1fr); align-items: start; margin-top: 20px; }
.device-settings .panel + .panel, .device-live .panel + .panel { margin-top: 20px; }
.device-settings .panel > header, .device-live .panel > header { margin-bottom: 4px; gap: 12px; }
.device-settings .panel > header .meta-sm,
.device-live .panel > header .meta-sm { margin-left: auto; }
.device-save { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.device-save .note { flex: 1 1 240px; margin: 0; }
.device-save .primary { min-height: 44px; padding-inline: 26px; }
/* Поле устройства: подпись сверху, орган управления во всю ширину. */
.device-settings label.field { display: grid; gap: 6px; margin-top: 14px; }
.device-settings label.field input,
.device-settings label.field select { width: 100%; }

/* Ползунок: подпись и значение сверху, края шкалы снизу, подсказка под ними.
   Заполнение дорожки показывает, где значение стоит между краями, — то же
   правило, что у полос ритма: цвет без подписи ничего не значит. */
.audio-slider { margin-top: 18px; }
.slider-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.slider-top label { font-size: 13.5px; font-weight: 600; }
.slider-top output { font-weight: 700; color: var(--teal-deep); }
.slider-scale { display: flex; justify-content: space-between; color: var(--muted);
  font-size: 11px; margin-top: -2px; }
.audio-slider input[type="range"] { -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 40px; margin: 0; padding: 10px 0; cursor: pointer;
  border-radius: 3px; background: linear-gradient(to right, var(--teal) var(--fill, 0%),
  var(--idle) var(--fill, 0%)) center / 100% 6px no-repeat; }
.audio-slider input[type="range"]::-webkit-slider-runnable-track { height: 6px;
  background: transparent; }
.audio-slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none;
  appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--teal);
  box-shadow: 0 1px 2px rgba(18, 33, 31, .18); }
.audio-slider input[type="range"]::-moz-range-track { height: 6px; background: transparent; }
.audio-slider input[type="range"]::-moz-range-thumb { width: 16px; height: 16px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--teal); }
.audio-slider .note { margin-top: 0; }

/* Лента: записанное — крема, распознанное — бирюза, и у каждой строки подпись. */
.device-live { position: sticky; top: 84px; }
#feed-pause { min-height: 34px; padding: 5px 14px; font-size: 12.5px; }
#device-feed { margin-top: 12px; display: grid; gap: 12px; max-height: 58vh; overflow-y: auto; }
.feed-line { border-left: 3px solid var(--teal); padding: 2px 0 2px 12px; }
.feed-line.pending { border-left-color: var(--crema); }
.feed-meta { color: var(--muted); font-size: 11.5px; min-width: 0; overflow-wrap: anywhere; }
.feed-text { margin-top: 3px; font-size: 13.5px; color: #3f4844; overflow-wrap: anywhere; }
.device-live .kv { margin-top: 10px; }
@media (max-width: 1040px) {
  .device-workspace { grid-template-columns: minmax(0, 1fr); }
  .device-live { position: static; }
}

/* Компактная карточка: управление и речь одного устройства в общем контуре. */
.device-card-list { display: grid; gap: 20px; margin: 14px 0 28px; }
.concept-app .device-card { padding: 18px 22px 12px; }
.device-card > .device-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; }
.device-eyebrow { display: block; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .12em; margin-bottom: 6px; }
.device-card-title { min-width: 0; }
.device-card-title h2 { font-size: 19px; margin: 0 0 6px; overflow-wrap: anywhere; }
.device-card .state { display: inline-flex; gap: 7px; align-items: center; font-size: 11.5px; color: var(--teal-deep); }
.device-card .state i, .live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); flex: none; }
.device-card .state.off { color: var(--muted); }
.device-card .state.off i { background: var(--muted); }
.device-card .state.warn { color: var(--crema-deep); }
.device-card .record-controls { margin-left: auto; gap: 5px; }
.concept-app .device-card .record-controls button { min-height: 40px; padding: 7px 14px; font-size: 12px; }
.device-card-signal { display: flex; align-items: center; gap: 12px; padding: 4px 0 8px; margin: 5px 0 12px; border-bottom: 1px solid var(--line-soft); }
.device-card-signal .wavebox { width: 170px; height: 32px; margin: 0; flex: none; gap: 2px; mask-image: none; }
.device-card-signal .wavebox i { flex: 1; min-width: 1px; max-height: 30px; }
.device-card-signal b { font-size: 16px; font-variant-numeric: tabular-nums; }
.device-card-signal small, .device-signal-note { color: var(--muted); font-size: 11.5px; min-width: 0; overflow-wrap: anywhere; }
.device-card-signal #audio-direction { font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: anywhere; min-width: 0; }
/* Управление и лента — в две колонки, архив — общей полосой под ними:
   шкала архива шире любой колонки, в колонке он расширял страницу вбок. */
.device-card-columns { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; }
.device-card-controls, .device-card-transcript { min-width: 0; }
.device-card-controls { grid-area: 1 / 1; }
.device-card-transcript { grid-area: 1 / 2; }
.device-card-columns > .recordings-archive { grid-area: 2 / 1 / 3 / -1; min-width: 0; border-top: 1px solid var(--line-soft); padding-top: 16px; }
.device-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.device-section-title h3 { margin: 0; font-size: 14px; }
.device-section-title h3 .live-dot { margin-right: 6px; }
.device-section-title > span { font-size: 10.5px; color: var(--muted); }
.device-primary-sliders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; row-gap: 8px; margin-top: 8px; }
.device-card .audio-slider { margin: 0; min-width: 0; }
.device-card .device-primary-sliders .audio-slider .note { display: none; }
.device-card .slider-top { gap: 8px; }
.device-card .slider-top label { font-weight: 500; font-size: 12px; }
.device-card .slider-top output { font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.device-card .audio-slider input[type="range"] { min-height: 30px; padding-block: 7px; border: 0; }
.device-card .slider-scale { display: none; }
.device-card .audio-slider .note { font-size: 10px; line-height: 1.35; margin: 0; }
.device-advanced { margin: 16px 0 0; padding: 12px 0; border-block: 1px solid var(--line-soft); }
.device-advanced summary, .device-diagnostics summary { font-size: 12px; color: var(--muted); cursor: pointer; min-height: 24px; }
.device-advanced[open] summary { margin-bottom: 12px; color: var(--ink); }
.device-advanced-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.device-card label.field { display: grid; gap: 5px; font-size: 12px; }
.device-card label.field input, .device-card label.field select { width: 100%; min-width: 0; font-size: 12px; }
.device-card-save { display: flex; align-items: center; gap: 12px; padding-top: 10px; }
.xvf-profile { margin-top: 18px; padding: 16px; }
.xvf-profile form { display: grid; gap: 12px; margin-top: 12px; }
.xvf-profile .xvf-control { display: grid; grid-template-columns: minmax(135px, 1fr) minmax(100px, 1.5fr) 90px auto; align-items: center; gap: 10px; }
.xvf-profile .xvf-control label { font-size: 12px; }
.xvf-profile input[type="range"] { width: 100%; }
.xvf-profile input[type="number"] { width: 90px; font-variant-numeric: tabular-nums; }
.xvf-profile [data-xvf-feedback] { color: var(--muted); font-size: 12px; }
.xvf-profile details pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; }
.xvf-profile button:disabled { opacity: .5; cursor: not-allowed; }
.concept-app .device-card-save button { min-height: 40px; padding: 8px 17px; font-size: 12px; }
.device-card-save [role="status"] { color: var(--muted); font-size: 11px; }
.device-card.is-dirty .device-card-save [role="status"] { color: var(--teal-deep); }
.device-card [data-part="device-application"] { font-size: 10.5px; margin-top: 8px; }
.device-card-transcript { border-left: 1px solid var(--line-soft); padding-left: 28px; }
.concept-app .device-card [data-part="feed-pause"] { min-height: 32px; padding: 4px 10px; font-size: 11px; border-color: transparent; background: var(--surface-2); }
.device-card [data-part="device-feed-status"] { margin: 6px 0 10px; font-size: 10.5px; }
.device-card [data-part="device-feed"] { display: grid; align-content: start; gap: 8px; min-height: 125px; min-width: 0; max-height: 205px; overflow-y: auto; scrollbar-width: thin; padding-right: 6px; margin: 0; }
.device-card .feed-line { padding: 6px 9px; background: var(--surface-2); border-left-width: 2px; border-radius: 0 8px 8px 0; min-width: 0; }
.device-card .feed-meta { font-size: 10px; min-width: 0; overflow-wrap: anywhere; }
.device-card .feed-text { font-size: 12.5px; line-height: 1.55; margin-top: 4px; }
.device-feed-caption { color: var(--muted); font-size: 10px; margin-top: 12px; }
.device-audio-player { display: block; width: 100%; height: 34px; margin-top: 10px; }
/* Явно: display:block выше перебивает UA-правило [hidden]. */
.device-audio-player[hidden] { display: none; }
.device-card .feed-text.playable { cursor: pointer; }
.device-card .feed-text.playable:hover { color: var(--teal); }
.device-card .feed-text.playable::before { content: '▶ '; font-size: 10px; opacity: .65; }
.device-card-save .reset-settings { min-height: 40px; padding: 8px 14px; font-size: 12px; }
.device-diagnostics { border-top: 1px solid var(--line-soft); margin-top: 12px; padding-top: 8px; }
.device-diagnostics-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 8px 0; }
.device-card [data-part="audio-clip"].loud { color: var(--signal); }
.device-card button:disabled { opacity: .55; cursor: wait; }
/* Выключенная кнопка светодиодов — это «текущее состояние», а не «занято»:
   остаётся узнаваемой кнопкой, но пунктиром и без курсора ожидания. */
.hardware-controls button:disabled { opacity: .7; cursor: default; border-style: dashed; }
@media (max-width: 1100px) {
  .device-card-columns { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .device-card-controls, .device-card-transcript, .device-card-columns > .recordings-archive { grid-area: auto; }
  .device-card-transcript { border-left: 0; border-top: 1px solid var(--line-soft); padding: 16px 0 0; }
}
@media (max-width: 600px) {
  .concept-app .device-card { padding: 16px; }
  .device-card > .device-card-head { align-items: flex-start; flex-direction: column; }
  .device-card .record-controls { margin-left: 0; }
  .device-signal-note { display: none; }
  .device-primary-sliders, .device-advanced-fields, .device-diagnostics-content { grid-template-columns: minmax(0, 1fr); }
  .device-card-save { flex-wrap: wrap; }
  .device-section-title > span { display: none; }
}
.concept-app .location-latest-report { margin: 22px 0; }
.location-latest-report > header { justify-content: space-between; flex-wrap: wrap; }
.location-latest-report > header a { font-size: 12px; }
.concept-app .device-card > .device-card-head { margin-bottom: 0; gap: 16px; }
.concept-app .device-card .device-card-title h2 { margin: 0 0 4px; font-size: 18px; }
.device-card-signal { margin: 6px 0 12px; }

.device-registry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.device-registry-card { display: grid; gap: 12px; }
.device-registry-card h2 { margin: 0 0 5px; font-size: 18px; }
.device-registry-card code { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.device-registry-card .device-action { align-items: end; flex-wrap: wrap; }
.device-registry-card .device-action .field { min-width: 180px; flex: 1; }
.device-registry-card .field.compact { margin: 0; }
.token-output { width: 100%; min-height: 44px; font-family: ui-monospace, monospace; }
.recordings-archive { display: grid; gap: 12px; min-width: 0; }
/* Форма переносится на несколько строк, а не растягивает страницу вбок. */
.recordings-archive .archive-query { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.recordings-archive .archive-query label { flex: 1 1 190px; }
.recordings-archive .archive-query button { flex: 0 0 auto; }
.recordings-archive .archive-query label, .archive-seek label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.recordings-archive input, .recordings-archive select { min-width: 0; }
.recordings-archive .archive-player { display: grid; gap: 12px; }
.archive-player audio { width: 100%; }
.archive-seek { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.archive-seek label { flex: 1 1 auto; min-width: 0; }
.archive-seek input { display: block; min-width: 0; }
.archive-timeline { position: relative; min-height: 24px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.archive-timeline > div { position: absolute; inset: 0; }
.archive-mark { position: absolute; top: 2px; height: 18px; min-width: 3px; padding: 0; border: 0; border-radius: 3px; }
.archive-mark-track { background: var(--teal); cursor: pointer; }
.archive-mark-track:hover { filter: brightness(1.15); }
.archive-mark-gap { background: repeating-linear-gradient(135deg, var(--signal), var(--signal) 3px, transparent 3px, transparent 6px); pointer-events: none; }
.archive-mark-profile { position: absolute; z-index: 2; top: 0; height: 100%; border-left: 2px solid var(--ink); pointer-events: none; }
.archive-items { display: grid; gap: 6px; max-height: 300px; margin: 0; padding-left: 24px; overflow: auto; }
.archive-items li { padding: 5px 0; }
.archive-item-play { min-height: 40px; margin-right: 8px; }
.archive-page-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.archive-only > .recordings-archive { margin-top: 14px; }
@media (max-width: 560px) { .recordings-archive .archive-query label { flex-basis: 100%; } .archive-seek { align-items: stretch; flex-direction: column; } }
@media (max-width: 760px) {
  .device-registry-grid { grid-template-columns: minmax(0, 1fr); }
  .device-registry-card .device-action { align-items: stretch; }
  .device-registry-card .device-action .field, .device-registry-card .device-action button { width: 100%; }
}

/* --- Мониторинг: карточка устройства, цепочка, графики, AI-отчёт --------- */
.monitoring-head { display: grid; gap: 10px; }
.monitoring-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.monitoring-title h2 { margin: 0; font-family: var(--display); font-size: 22px; }
.monitoring-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.monitoring-kv .kv-item { display: grid; gap: 2px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-field); }
.monitoring-kv dt { color: var(--muted); font-size: 12px; }
.monitoring-kv dd { margin: 0; font-weight: 600; }

.pipeline { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.pipeline-step { display: grid; gap: 3px; justify-items: center; padding: 10px 14px; border: 1px solid var(--line-soft); border-radius: var(--r-field); background: var(--surface-2); min-width: 92px; }
.pipeline-step.ok { border-color: var(--teal); }
.pipeline-step.ok .pipeline-mark { color: var(--teal-deep); }
.pipeline-step.warn { border-color: var(--crema); background: var(--crema-pale); }
.pipeline-step.warn .pipeline-mark { color: var(--crema-deep); }
.pipeline-step.error { border-color: var(--signal); background: var(--signal-pale); }
.pipeline-step.error .pipeline-mark { color: var(--signal); }
.pipeline-step.idle { opacity: 0.75; }
.pipeline-mark { font-size: 18px; font-weight: 700; line-height: 1; }
.pipeline-name { font-size: 13px; font-weight: 600; }
.pipeline-detail { color: var(--muted); font-size: 11px; text-align: center; max-width: 130px; }
.pipeline-link { align-self: center; width: 18px; height: 2px; background: var(--line); flex: 0 0 auto; }

.monitoring-charts-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.monitor-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.monitor-chart { border: 1px solid var(--line-soft); border-radius: var(--r-card); padding: 12px; display: grid; gap: 8px; background: var(--surface); }
.monitor-chart-head strong { font-size: 13px; }
.monitor-chart-body { display: grid; gap: 4px; }
.monitor-chart-svg { width: 100%; height: auto; }
.monitor-chart-svg .chart-grid { fill: none; stroke: var(--line-soft); stroke-width: 1; }
.monitor-chart-svg .chart-line { fill: none; stroke: var(--teal); stroke-width: 2; stroke-linejoin: round; }

.table-note { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.ai-report-head { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.ai-summary { font-size: 15px; line-height: 1.5; }
.ai-report-list { margin: 6px 0 12px; padding-left: 20px; display: grid; gap: 4px; }
.ai-report-list li { line-height: 1.45; }
[data-ai-form] { display: contents; }
@media (max-width: 760px) {
  .pipeline { gap: 8px; }
  .pipeline-link { display: none; }
  .monitoring-kv { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* --- Плотность платформенной оболочки -------------------------------------
   Панель — ежедневный инструмент, а не витрина: панели, таблицы, кнопки и
   поля компактнее публичных страниц. Скоуп .platform-app не даёт правкам
   задеть публичные страницы и служебную панель, которые грузят тот же CSS. */
.platform-app h1 { font-size: 16px; }
.platform-app .sub { margin-bottom: 12px; font-size: 12.5px; }
.platform-app .panel, .platform-app .chart-panel { padding: 14px 16px; border-radius: 14px; }
.platform-app main > .panel + .panel { margin-top: 14px; }
.platform-app .section-head, .platform-app .panel > header { margin-bottom: 10px; }
.platform-app h2 { margin: 1.2rem 0 .5rem; font-size: 14.5px; }
.platform-app table { font-size: 13px; }
.platform-app th { padding: 6px 10px; }
.platform-app td { padding: 8px 10px; }
.platform-app .btn, .platform-app button { min-height: 32px; padding: 4px 14px; font-size: 13px; }
.platform-app .btn.primary, .platform-app button.primary { min-height: 32px; }
.platform-app input, .platform-app select { min-height: 34px; }
.platform-app .badge { padding: 3px 9px; font-size: 11px; }
.platform-app .card { padding: .7rem .9rem; }
.platform-app .card .num { font-size: 1.25rem; }
.platform-app .row { margin-top: 10px; }
.platform-app .empty { padding: .8rem 1rem; font-size: 13px; }
.platform-app .kv { margin: 10px 0; font-size: 12.5px; gap: 6px 12px; }
.platform-app .registry-filters { margin: 12px 0; }
.platform-app .registry-filters input { width: 280px; }

/* --- Вкладки карточки устройства ------------------------------------------
   Одна карточка вместо простыни: Состояние / Управление / Журнал. Вкладка —
   часть адреса (?tab=), поэтому обновление страницы и ссылки не теряют её. */
.device-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line);
  margin: 0 0 14px; }
.device-tabs a { padding: 7px 13px; font-size: 13px; font-weight: 600; color: var(--muted);
  border: 1px solid transparent; border-width: 1px 1px 0; border-radius: 9px 9px 0 0;
  margin-bottom: -1px; }
.device-tabs a:hover { color: var(--ink); text-decoration: none; background: var(--surface-2); }
.device-tabs a[aria-current="page"] { background: var(--surface); border-color: var(--line);
  color: var(--teal-deep); }
.device-tab-panel[hidden] { display: none; }

/* Список точек выбранного клиента на стартовой странице. */
.location-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.location-list li { border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; }
.location-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.location-link { font-weight: 600; font-size: 13.5px; }
.location-list .note { display: inline-block; margin-left: 8px; }
/* Устройства точки — по строке на устройство: имя и его бейджи не слипаются
   с соседними. */
.location-devices { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 5px; }
.location-device { display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 12.5px; }
.location-device .badge { font-size: 10px; }
