/* Единый вид (аудит 17.10): группа u-team. Префикс html[data-theme] body, грузится после unify.css */
/* Разделы: KPI, Отчёты, Оргструктура, Материалы CSM, Предложения, Уведомления, Настройки, шапка Дашборда */

/* 1. Сегменты: один вид для переключателей (Материалы «Все/Мои», кварталы KPI, период отчёта, период выгрузки,
      «Команда / Моя работа» на главной). Высота 44, скругление 10, активный — залитый, без градиентов и теней. */
html[data-theme] body .u-seg.u-seg{display:inline-flex;align-items:stretch;gap:4px;width:auto;max-width:100%;height:44px;min-height:44px;margin-top:0;padding:4px;border:1px solid var(--line);border-radius:10px;background:var(--surface);box-shadow:none;box-sizing:border-box;flex-wrap:nowrap}
html[data-theme] body .u-seg.u-seg>:is(a,button,.chip,.segmented-option){flex:0 0 auto;min-width:0}
html[data-theme] body .u-seg.u-seg>:is(a,button,.chip),html[data-theme] body .u-seg.u-seg .segmented-option>span{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:100%;min-height:0;margin:0;padding:0 14px;border:0;border-radius:7px;background:transparent;box-shadow:none;color:var(--muted);font:inherit;font-size:13.5px;font-weight:650;line-height:1.15;text-decoration:none;white-space:nowrap;cursor:pointer;transform:none}
html[data-theme] body .u-seg.u-seg .segmented-option{display:flex}
html[data-theme] body .u-seg.u-seg>:is(a,button,.chip):hover,html[data-theme] body .u-seg.u-seg .segmented-option:hover>span{background:var(--soft);color:var(--ink)}
html[data-theme] body .u-seg.u-seg>:is(.is-active,.active,[aria-current="page"]),html[data-theme] body .u-seg.u-seg>:is(.is-active,.active,[aria-current="page"]):hover,html[data-theme] body .u-seg.u-seg .segmented-option input:checked+span{background:var(--primary);color:#fff;box-shadow:none}
html[data-theme] body .u-seg.u-seg .segmented-option input:focus-visible+span,html[data-theme] body .u-seg.u-seg>:is(a,button):focus-visible{outline:2px solid var(--primary);outline-offset:2px}
html[data-theme] body .u-seg.u-seg :is(b,small){min-width:0;padding:1px 6px;border-radius:999px;background:var(--soft);color:var(--muted);font-size:11px;font-weight:700}
html[data-theme] body .u-seg.u-seg>:is(.is-active,.active,[aria-current="page"]) :is(b,small){background:#ffffff33;color:#fff}
/* кварталы KPI — лента с прокруткой, если кварталов много */
html[data-theme] body .kpi-quarters.u-seg{display:flex;width:max-content;margin:0 0 16px;overflow-x:auto;scrollbar-width:none}
html[data-theme] body .kpi-quarters.u-seg::-webkit-scrollbar{display:none}
/* главная: «Мой экран» — нейтральная полоса, без тёмной заливки */
html[data-theme] body .dashboard-view-switch{border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:none}
html[data-theme] body .dashboard-view-switch :is(.dashboard-view-switch-label,.dashboard-view-switch-hint){color:var(--muted)}
html[data-theme] body .dashboard-view-switch-label{font-size:12px;font-weight:700;letter-spacing:.06em}
html[data-theme] body .dashboard-view-switch-hint{font-size:12.5px}
@media(max-width:767px){
 html[data-theme] body .u-seg.u-seg:not(.kpi-quarters){display:flex;width:100%}
 html[data-theme] body .u-seg.u-seg:not(.kpi-quarters)>:is(a,button,.chip,.segmented-option){flex:1 1 0}
 html[data-theme] body .u-seg.u-seg>:is(a,button,.chip),html[data-theme] body .u-seg.u-seg .segmented-option>span{width:100%;padding:0 8px;font-size:13px;white-space:normal;text-align:center}
 html[data-theme] body .kpi-quarters.u-seg{max-width:100%}
 /* выгрузка: пять периодов — сетка 2 колонки, «Свой период» на всю ширину */
 html[data-theme] body .export-period.u-seg.u-seg{display:grid;grid-template-columns:1fr 1fr;height:auto}
 html[data-theme] body .export-period.u-seg .segmented-option>span{min-height:36px}
 html[data-theme] body .export-period.u-seg .segmented-option:last-child:nth-child(odd){grid-column:1/-1}
}

/* 2. Подзаголовок-«бровь» — один класс .eyebrow */
html[data-theme] body .kpi-hero .eyebrow{font-size:12px;margin:0 0 8px}
html[data-theme] body .org2-head .eyebrow{margin:0 0 2px}
html[data-theme] body .dashboard-heading .eyebrow{display:flex;align-items:center;gap:0}
@media(max-width:767px){html[data-theme] body .kpi-hero .eyebrow{padding-right:0}}

/* 3. Вкладки «Название · N»: Предложения, Отчёты, Настройки — как во «Задачах» (task-tabs).
      На телефоне у «Предложений» пять статусов — лентой с прокруткой. */
html[data-theme] body .task-tabs.tabs a[aria-current="page"]{color:var(--primary)}
@media(max-width:767px){
 html[data-theme] body .idea-tabs.task-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
 html[data-theme] body .idea-tabs.task-tabs::-webkit-scrollbar{display:none}
 html[data-theme] body .idea-tabs.task-tabs a{flex:0 0 auto;padding:0 12px;white-space:nowrap}
}

/* 4. Плитки показателей: стандарт как .plan-count — рамка var(--line), скругление 14, число 24/800, подпись 12.5 бледная */
html[data-theme] body :is(.stat-grid .stat,.org2-head-stats>.org2-stat){display:flex;flex-direction:column;justify-content:center;gap:4px;min-width:0;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:none;color:var(--ink);text-align:left;text-decoration:none}
html[data-theme] body :is(.stat-grid .stat-value,.org2-head-stats>.org2-stat>strong){margin:0;font-size:24px;line-height:1.05;font-weight:800;letter-spacing:0;font-variant-numeric:tabular-nums;color:var(--ink)}
html[data-theme] body :is(.stat-grid .stat-label,.org2-head-stats>.org2-stat>span){font-size:12.5px;font-weight:700;line-height:1.3;color:var(--muted)}
html[data-theme] body .stat-grid .stat-action{font-size:12px;font-weight:650;color:var(--primary)}
html[data-theme] body a.stat-link:hover{border-color:color-mix(in srgb,var(--primary) 30%,var(--line));box-shadow:var(--shadow)}
html[data-theme] body .org2-head-stats{gap:8px}
html[data-theme] body .org2-head-stats>.org2-stat>strong{order:1}
html[data-theme] body .org2-head-stats>.org2-stat{min-width:96px;padding:10px 14px}
/* главная: плитки показателей — та же рамка и шкала, без декоративного круга и прыжка при наведении */
html[data-theme] body .kpi-row .kpi-tile{border:1px solid var(--line);border-radius:14px;box-shadow:none}
html[data-theme] body .kpi-row .kpi-tile::after{display:none}
html[data-theme] body .kpi-row .kpi-tile:hover{transform:none;border-color:color-mix(in srgb,var(--primary) 30%,var(--line));box-shadow:var(--shadow)}
html[data-theme] body .kpi-row .kpi-label{font-size:12.5px;font-weight:700;color:var(--muted)}
html[data-theme] body .kpi-row .kpi-value{font-size:24px;font-weight:800;letter-spacing:0}
html[data-theme] body .kpi-row .kpi-tile.is-alert .kpi-value{color:#e5484d}
@media(min-width:768px){html[data-theme] body .kpi-row .kpi-value{font-size:28px}}
@media(max-width:767px){
 html[data-theme] body .stat-grid .stat{padding:12px}
 html[data-theme] body .stat-grid .stat-value{font-size:20px}
 html[data-theme] body .org2-head-stats>.org2-stat{flex:1;min-width:0;padding:10px 12px}
}

/* 5. Списки на телефоне (Отчёты): карточки — как стандартная .tile */
@media(max-width:767px){
 html[data-theme] body .mobile-only>.meeting-card,html[data-theme] body .mobile-only>.rm-group{padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:none}
 html[data-theme] body .mobile-only>.meeting-card+.meeting-card{margin-top:8px}
 html[data-theme] body .mobile-only>.rm-group{padding:0;margin-bottom:8px;overflow:hidden}
 html[data-theme] body .mobile-only>.rm-group>summary{padding:14px 16px;background:transparent}
}

/* 6. Действия в строке: KPI ↑ ↓ / изменить / удалить — квадратные кнопки-иконки 40 px */
html[data-theme] body .kpi-metric-tools{gap:6px}
html[data-theme] body .kpi-metric-tools .icon-button{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted);text-decoration:none}
html[data-theme] body .kpi-metric-tools .icon-button:not(:disabled):hover{background:var(--soft);color:var(--primary)}
html[data-theme] body .kpi-metric-tools .icon-button .ui-icon{width:18px;height:18px}
html[data-theme] body .icon-button.is-danger{color:#d93a42}
html[data-theme] body .icon-button.is-danger:not(:disabled):hover{background:color-mix(in srgb,#e5484d 10%,var(--surface));color:#d93a42}
/* Оргструктура: меню РМ/МКК — как «⋯» (proto-more), без рамки, всплывающая панель как proto-more-menu */
html[data-theme] body .org2-menu>summary{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:10px;background:none;color:var(--muted);font-weight:400}
html[data-theme] body .org2-menu>summary .ui-icon{width:20px;height:20px}
html[data-theme] body .org2-menu>summary:hover,html[data-theme] body .org2-menu[open]>summary{background:var(--soft);color:var(--primary)}
html[data-theme] body .org2-menu.mini>summary{width:26px;height:26px;border-radius:8px}
html[data-theme] body .org2-menu.mini>summary .ui-icon{width:14px;height:14px}
html[data-theme] body .org2-pop{display:grid;gap:4px;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:0 12px 32px rgba(15,23,42,.16)}
html[data-theme] body .org2-pop .org2-inline{margin:0;padding:4px}
html[data-theme] body .org2-pop .danger-text-btn{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:0 12px;border:0;border-radius:8px;background:transparent;font-size:15px;font-weight:600;text-align:left}
html[data-theme] body .org2-pop .danger-text-btn:hover{background:var(--soft)}
html[data-theme] body .org2-pop .danger-text-btn .ui-icon{width:18px;height:18px}
html[data-theme] body .org2-pop form+form{border-top:1px solid var(--line);padding-top:4px}
html[data-theme] body .org2-add>summary{display:inline-flex;align-items:center;gap:6px;min-height:44px}
html[data-theme] body .org2-add>summary .ui-icon{width:18px;height:18px}
html[data-theme] body .org2-editing{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;padding:10px 10px 10px 16px;border:1px dashed color-mix(in srgb,var(--primary) 45%,var(--line));border-radius:14px;background:color-mix(in srgb,var(--primary) 5%,var(--surface));font-size:14px;font-weight:600}
@media(max-width:767px){html[data-theme] body .org2-editing{flex-direction:column;align-items:stretch;padding:12px}html[data-theme] body .org2-editing .button{width:100%}}
/* Оргструктура: «аватар» сотрудника структуры — тот же круг, что у аватаров платформы */
html[data-theme] body .org2-avatar{border-radius:50%;background:var(--soft);color:var(--primary);font-weight:750}
html[data-theme] body .org2-avatar.sm{border-radius:50%}
html[data-theme] body .org2-id.is-active .org2-avatar{background:var(--primary);color:#fff}

/* 7. Аватары в списках команды/приглашений/KPI — компонент avatar.html внутри .avatar */
html[data-theme] body .avatar>.avatar-initials{font-size:inherit;font-weight:inherit;color:inherit;letter-spacing:0}
html[data-theme] body .team-tile .tile-meta .status{align-self:center}

/* 8. Пустые состояния: .card.empty — заголовок, пояснение, кнопка; по центру. Внутри панели — .empty одной строкой */
html[data-theme] body .empty>strong{display:block;color:var(--ink);font-size:16px;font-weight:700}
html[data-theme] body .empty.task-empty>p.meta{margin:0;max-width:56ch}
html[data-theme] body .empty.task-empty>.actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:4px}
html[data-theme] body .empty.task-empty>.actions form{margin:0}
html[data-theme] body .kpi-metrics .empty.task-empty{padding:24px 16px;border:1px dashed var(--line);border-radius:14px}
html[data-theme] body .org2-rms>.empty{grid-column:1/-1;padding:20px 16px;font-size:14px}
html[data-theme] body .report-index-archive .empty{margin:0;padding:18px 24px;border-top:1px solid var(--line);font-size:14px}
html[data-theme] body .org2-empty{font-size:12.5px;color:var(--muted)}
@media(max-width:767px){html[data-theme] body .empty.task-empty>.actions{flex-direction:column;align-items:stretch;width:100%}html[data-theme] body .empty.task-empty>.actions .button{width:100%}}

/* 9. Статусы: идеи, значок iPhone, тона KPI — та же шкала, что .status good / info / warning / danger / muted */
html[data-theme="light"] body .idea-status-new{background:#eff1f5;color:#596579}
html[data-theme="light"] body .idea-status-backlog{background:#fff4df;color:#805500}
html[data-theme="light"] body .idea-status-prom{background:#eaf7f0;color:#176648}
html[data-theme="light"] body .idea-status-rejected{background:#fff0f2;color:#a83248}
html[data-theme="dark"] body .idea-status-new{background:#2b3b51;color:#c3d0df}
html[data-theme="dark"] body .idea-status-backlog{background:#584324;color:#ffe2a3}
html[data-theme="dark"] body .idea-status-prom{background:#1b513f;color:#b7f3d0}
html[data-theme="dark"] body .idea-status-rejected{background:#602e40;color:#ffd0d8}
html[data-theme] body .push-card .push-badge{height:auto;padding:4px 8px;border-radius:6px;font-size:11px;font-weight:650;line-height:1.4}
html[data-theme="light"] body .push-card .push-badge{background:#eff1f5;color:#596579}
html[data-theme="light"] body .push-card .push-badge.is-ok{background:#eaf7f0;color:#176648}
html[data-theme="dark"] body .push-card .push-badge{background:#2b3b51;color:#c3d0df}
html[data-theme="dark"] body .push-card .push-badge.is-ok{background:#1b513f;color:#b7f3d0}
html[data-theme="light"] body .kpi-cell.kpi-cell.kpi-good{background:#eaf7f0;color:#176648}
html[data-theme="light"] body .kpi-cell.kpi-cell.kpi-track{background:#eef3ff;color:#365fb5}
html[data-theme="light"] body .kpi-cell.kpi-cell.kpi-low{background:#fff4df;color:#805500}
html[data-theme="dark"] body .kpi-cell.kpi-cell.kpi-good{background:#1b513f;color:#b7f3d0}
html[data-theme="dark"] body .kpi-cell.kpi-cell.kpi-track{background:#223d68;color:#c1d7ff}
html[data-theme="dark"] body .kpi-cell.kpi-cell.kpi-low{background:#584324;color:#ffe2a3}
html[data-theme="light"] body .kpi-my.kpi-good .kpi-my-nums b{color:#176648}
html[data-theme="light"] body .kpi-my.kpi-track .kpi-my-nums b{color:#365fb5}
html[data-theme="light"] body .kpi-my.kpi-low .kpi-my-nums b{color:#805500}
html[data-theme="dark"] body .kpi-my.kpi-good .kpi-my-nums b{color:#b7f3d0}
html[data-theme="dark"] body .kpi-my.kpi-track .kpi-my-nums b{color:#c1d7ff}
html[data-theme="dark"] body .kpi-my.kpi-low .kpi-my-nums b{color:#ffe2a3}
html[data-theme] body .kpi-cell{border-radius:6px}

/* 10. Шапки: «⋯» со статусом предложения; «+» на главной справа, как в других разделах (на всех ширинах) */
html[data-theme] body .idea-status-head .proto-more-menu{min-width:220px}
html[data-theme] body .idea-status-head .proto-more-menu button{justify-content:space-between}
html[data-theme] body .idea-status-head .proto-more-menu button.is-current{color:var(--primary)}
html[data-theme] body .idea-status-head .proto-more-menu button.is-current .ui-icon{color:var(--primary)}
html[data-theme] body .proto-more-menu .proto-more-label{margin:4px 12px 2px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
html[data-theme] body .head-menus>.dash-plus{display:block;position:relative;top:auto;right:auto}
html[data-theme] body .head-menus>.dash-plus>summary{font-size:inherit}
html[data-theme] body .dashboard-heading.has-head-menu .dash-greeting{padding-right:48px}
html[data-theme] body .dashboard-heading.has-head-menu>.dashboard-quick-actions{display:none}

/* 11. Значки вместо символов: закреп, видео, внешняя ссылка, загрузка, раскрытие архива отчётов, переход к РМ */
html[data-theme] body :is(.mat-item,.idea-card) .task-pin-mark{display:inline-flex;vertical-align:-2px;margin-right:6px;color:var(--primary)}
html[data-theme] body :is(.mat-item,.idea-card) .task-pin-mark .ui-icon{width:16px;height:16px;stroke-width:2}
html[data-theme] body .mat-thumb i .ui-icon{width:22px;height:22px;fill:#fff;stroke:none;filter:drop-shadow(0 1px 3px rgba(0,0,0,.6))}
html[data-theme] body .mat-open-hint{display:inline-flex;align-items:center;padding:5px}
html[data-theme] body .mat-open-hint .ui-icon{width:16px;height:16px;stroke:#fff}
html[data-theme] body .mat-drop-icon{display:inline-flex;color:var(--primary)}
html[data-theme] body .mat-drop-icon .ui-icon{width:28px;height:28px}
html[data-theme] body :is(.report-index-archive-count,.report-index-week>summary small) .ui-icon{width:18px;height:18px;margin-left:6px;vertical-align:-4px;transition:transform .16s}
html[data-theme] body .report-index-archive[open]>summary .report-index-archive-count .ui-icon,html[data-theme] body .report-index-week[open]>summary small .ui-icon{transform:rotate(180deg)}
html[data-theme] body .rm-drill-link .ui-icon{width:14px;height:14px;margin-left:4px;vertical-align:-2px}
@media(prefers-reduced-motion:reduce){html[data-theme] body :is(.report-index-archive-count,.report-index-week>summary small) .ui-icon{transition:none}}

/* 12. Формы: карточка сотрудника — form-page + form-section + form-footer; без inline-стилей */
html[data-theme] body .team-form-who{display:flex;align-items:center;gap:12px;margin:0 0 18px;padding-bottom:16px;border-bottom:1px solid var(--line)}
html[data-theme] body .team-form-who>div{display:grid;gap:2px;min-width:0}
html[data-theme] body .team-form-who .avatar{width:44px;height:44px;font-size:15px}
html[data-theme] body .team-enabled{min-height:44px;font-size:15px}
html[data-theme] body .team-invites-title{margin-top:28px}
html[data-theme] body .settings-kpi-note{margin:0 0 10px}
html[data-theme] body .report-foot-note{margin-top:18px}
html[data-theme] body :is(.form-page>form>.form-section+.form-footer,.kpi-table+.form-footer){margin-top:16px}
html[data-theme] body .form-page>.danger-zone{margin-top:16px}
/* Замещение — компактно: статус «Вы замещаете …» в правом верхнем углу, поля и кнопка одной строкой */
html[data-theme] body .sub-card .sub-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:6px}
html[data-theme] body .sub-card .sub-head h2{margin:0}
html[data-theme] body .sub-card .sub-head .status{margin-left:auto;white-space:nowrap}
html[data-theme] body .sub-card>.meta{margin:0 0 12px}
html[data-theme] body .sub-card .sub-row{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr) auto;gap:12px;align-items:end}
html[data-theme] body .sub-card .sub-row .field{margin:0;min-width:0}
html[data-theme] body .sub-card .sub-submit{height:44px;min-width:140px}
@media(max-width:767px){html[data-theme] body .sub-card .sub-row{grid-template-columns:1fr 1fr}html[data-theme] body .sub-card .sub-row>.field:first-child,html[data-theme] body .sub-card .sub-submit{grid-column:1/-1;width:100%}}
