/* Единое оформление рабочих экранов и чата. Ресурсы загружаются с сервера Orchestra. */
.workshop-stack { display: grid; align-content: start; gap: 16px; min-width: 0; }
.workshop-stack p, .workshop-stack h2, .workshop-stack h3 { margin: 0; }
.workshop-stack details > summary { cursor: pointer; font-weight: 650; }
.workshop-stack details[open] > summary { margin-bottom: 16px; }
.workshop-stack .button { justify-self: start; }
.workshop-bar, .workshop-toolbar, .workshop-version { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.workshop-bar { justify-content: space-between; }
.workshop-toolbar { padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.workshop-toolbar label { display: flex; align-items: center; gap: 10px; }
.workshop-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; }
.workshop-kpi { display: grid; align-content: space-between; gap: 8px; padding: 18px; min-width: 0;
  border: 1px solid var(--border); border-top: 3px solid #45619a; border-radius: 10px; background: var(--surface); }
.workshop-kpi span, .workshop-kpi small { color: var(--muted); font-size: 13px; }
.workshop-kpi strong { font-variant-numeric: tabular-nums; font-size: clamp(22px,2.2vw,34px); line-height: 1.15; overflow-wrap: anywhere; }
.workshop-note { padding: 14px 18px; background: var(--accent-soft); color: var(--text); border-radius: 10px; }
.workshop-note p { margin-top: 4px; line-height: 1.55; font-size: 14px; }
.workshop-table { font-variant-numeric: tabular-nums; }
.workshop-version { padding: 10px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.workshop-priority { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:start; padding-top:13px; border-top:1px solid var(--border); }
.workshop-priority p,.workshop-priority small { color:var(--muted); }
.workshop-priority-value { color:var(--text); font-variant-numeric:tabular-nums; }
.workshop-priority-source { grid-column:1/-1; min-width:0; font-size:14px; }
.workshop-stack .table-wrap { max-width: 100%; overflow-x: auto; }
@media(max-width:520px) { .workshop-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); } .workshop-toolbar { align-items: stretch; } }
:root {
  --bg: #f5f7fa;
  --surface: #fff;
  --surface-2: #f8fafc;
  --text: #182638;
  --muted: #5e6d80;
  --faint: #738196;
  --border: #dfe5ed;
  --accent: #3958c8;
  --accent-soft: #edf1ff;
  --sidebar: #172638;
  --sidebar-text: #c6d2e1;
  --radius: 12px;
  --shadow: 0 2px 6px rgb(22 38 57 / 3%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01";
}

button, input, select, textarea { font: inherit; }
.admin-center__hero { padding: clamp(24px,4vw,42px); border-radius: 22px; background: linear-gradient(115deg,#172b48,#263f71); color:#fff; box-shadow: 0 12px 32px #18345b18; }
.admin-center__hero h1 { margin: 12px 0; color:inherit; font-size:clamp(26px,3.2vw,38px); letter-spacing:-.8px; }
.admin-center__hero p { color:#d2dded; max-width:720px; line-height:1.65; }
.admin-center__eyebrow { color:#b8caff; font-size:11px; font-weight:700; letter-spacing:1.7px; }
.admin-center__status { display:inline-block; padding:10px 14px; margin-top:10px; border:1px solid #ffffff30; border-radius:10px; font-size:13px; color:#dae9ff; }
.admin-center__grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin:24px 0; }
.admin-center__card { display:flex; flex-direction:column; align-items:flex-start; text-align:left; gap:14px; padding:25px; border:1px solid var(--border); border-radius:16px; background:var(--surface); color:var(--text); cursor:pointer; box-shadow:var(--shadow); transition:border-color .15s,box-shadow .15s; }
.admin-center__card:hover { border-color:#8ea4e3; box-shadow:0 6px 20px #1d355d12; }
.admin-center__card strong { font-size:18px; font-weight:650; letter-spacing:-.3px; }
.admin-center__card > span:not(.admin-center__symbol) { font-size:14px; color:var(--muted); line-height:1.6; }
.admin-center__symbol { display:grid; place-items:center; width:44px; height:44px; background:var(--accent-soft); border-radius:13px; color:var(--accent); font-size:23px; }
.admin-center__card .admin-center__open { color:var(--accent)!important; margin-top:auto; padding-top:7px; font-weight:650; }
.discussion-context { border:1px solid var(--border); border-radius:11px; background:var(--surface); font-size:13px; margin:8px 0; }
.discussion-context summary { padding:12px 14px; cursor:pointer; color:var(--muted); font-weight:600; }
.discussion-context__body { padding:0 14px 14px; line-height:1.6; }
.discussion-context__events { max-height:220px; overflow:auto; }
.discussion-context__events p { border-bottom:1px solid var(--border); padding-bottom:10px; overflow-wrap:anywhere; }
.discussion-context__body .row { display:flex; flex-wrap:wrap; gap:8px; }
.chat > #discussion-context { margin:0 16px; }
@media(max-width:1050px) { .admin-center__grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:620px) { .admin-center__grid { grid-template-columns:1fr; gap:12px; } .admin-center__card { padding:20px; } }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #6986ed; outline-offset: 3px; }
::selection { background: #dce5ff; color: #182638; }

.shell { grid-template-columns: 256px minmax(0, 1fr); }
.shell .sidebar { padding: 28px 16px 20px; gap: 26px; border-right: 1px solid #21364e; }
.shell .brand { padding: 0 8px 25px; border-bottom: 1px solid #314155; }
.brand-mark { background: #e6ecff; color: #243f9b; border-radius: 10px; box-shadow: none; }
.brand-text strong { font-size: 21px; letter-spacing: -0.6px; font-weight: 650; }
.shell .brand-text small { margin-top: 4px; color: #aabbd0; max-width: 146px; line-height: 1.5; }
.shell .nav-link { min-height: 43px; padding: 10px 12px; gap: 12px; font-size: 13px; border-radius: 7px; }
.shell .nav-link.active { background: #304867; box-shadow: inset 3px 0 #a9bcff; }
.shell .nav-link:hover { background: #263b54; }
.shell .nav-icon { font-size: 17px; opacity: 1; }
.shell .sidebar-foot { padding-top: 18px; border-top: 1px solid #314155; gap: 8px; color: #aabbd0; }
.shell .sidebar-foot .muted, .shell .link-button { color: #aabbd0; }
.view { width: 100%; max-width: 1600px; margin: 0 auto; padding: 38px clamp(24px, 3vw, 52px) 64px; }
.page-head { align-items: center; gap: 20px; margin-bottom: 30px; padding-bottom: 25px; border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: clamp(25px, 2.3vw, 34px); font-weight: 650; letter-spacing: -0.9px; }
.page-head p { font-size: 14px; line-height: 1.7; margin-top: 9px; max-width: 740px; }
.card { padding: 24px; box-shadow: var(--shadow); }
.card h2 { font-size: 18px; letter-spacing: -0.35px; font-weight: 650; }
.card h3 { font-size: 15px; font-weight: 650; }
.card--accent { background: var(--surface); border-color: #ccd6ed; }
.card-head { margin-bottom: 20px; }
.grid, .stack { gap: 20px; }
.kpi { min-height: 128px; justify-content: center; gap: 9px; }
.kpi-label { font-size: 13px; font-weight: 500; }
.kpi-value { font-size: clamp(25px, 2.3vw, 34px); font-weight: 650; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.kpi-source { font-family: inherit; }
.button { min-height: 40px; padding: 9px 15px; border-radius: 8px; font-weight: 600; font-size: 13px; transition: background-color 120ms ease, border-color 120ms ease; }
.button--primary { background: var(--accent); border-color: var(--accent); box-shadow: 0 1px 2px rgb(30 55 110 / 12%); }
.button--primary:hover:not(:disabled) { background: #2d47a8; }
.button--ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.button--ghost:hover:not(:disabled) { background: var(--surface-2); border-color: #b9c5d5; }
input[type="text"], input[type="email"], input[type="search"], input[type="date"], input[type="datetime-local"], select, textarea,
.identity-admin input[type="email"] { border: 1px solid #cdd6e2; border-radius: 8px; background: #fff; color: var(--text); padding: 11px 12px; min-height: 42px; }
input::placeholder, textarea::placeholder { color: #738196; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
label { line-height: 1.5; }
table.data th { background: #f7f9fc; padding: 13px 16px; font-weight: 600; color: var(--muted); }
table.data td { padding: 16px; font-variant-numeric: tabular-nums; }
table.data tbody tr:hover { background: #fafbfe; }
.badge { border-radius: 6px; font-weight: 500; padding: 3px 8px; }
.confirm-dialog { border-radius: 16px; padding: 28px; box-shadow: 0 24px 90px rgb(15 28 49 / 24%); }
.confirm-dialog::backdrop { background: rgb(15 28 49 / 48%); backdrop-filter: blur(3px); }
.confirm-dialog__actions { padding-top: 18px; border-top: 1px solid var(--border); }
.data-workspace { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr); gap: 24px; align-items: start; }
.data-library { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.data-files { display: flex; flex-direction: column; gap: 12px; }
.data-files > h2 { font-size: 16px; margin-top: 6px; }
.data-document { padding: 18px 20px; }
.data-document label { display: flex; align-items: center; gap: 12px; overflow-wrap: anywhere; font-weight: 600; }
.data-question { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 24px; }
.data-question label { font-size: 13px; font-weight: 600; }
.data-question textarea { min-height: 140px; resize: vertical; }
.data-upload { border: 1px dashed #b6c4db; background: #fcfdff; }
.data-upload > p { font-size: 13px; line-height: 1.7; }
.data-upload .row { gap: 12px; padding: 12px 0; }
.identity-admin .card { box-shadow: none; }
.identity-admin form { padding: 20px; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; }
.identity-admin .px-check { padding: 8px 10px; background: #f6f8fc; border-radius: 6px; }

/* Чат использует те же цвет, размеры элементов и интервалы. */
.app .topbar { background: #172638; border-bottom: 1px solid #314155; padding: 16px 24px; }
.app .brand { color: #fff; }
.app .subtitle, .app .health__label { color: #b8c8dc; }
.app .sidebar { background: #fff; border-right: 1px solid var(--border); padding: 20px 16px; }
.app .list__item { border-radius: 8px; padding: 13px 12px; }
.app .list__item.is-current { background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.app .messages { background: var(--bg); padding: 28px clamp(18px, 5vw, 72px); }
.app .message__body { line-height: 1.75; border-radius: 12px; }
.app .message--user .message__body { background: #e9eefc; color: var(--text); }
.app .composer { background: #fff; padding: 20px clamp(18px, 5vw, 72px); border-top: 1px solid var(--border); }
.app .composer textarea { border-radius: 10px; }

@media (max-width: 1100px) {
  .shell { grid-template-columns: 224px minmax(0, 1fr); }
  .shell .sidebar { padding-inline: 10px; }
  .data-workspace { grid-template-columns: minmax(0, 1fr); }
  .data-question { position: static; }
}
@media (max-width: 860px) {
  .shell { display: block; }
  .shell .sidebar { padding: 0; border: 0; }
  .shell .brand { border: 0; padding: 14px 18px; }
  .shell .nav-main .nav-link { min-height: 54px; padding: 7px 4px; font-size: 11px; gap: 3px; }
  .shell .nav-main .nav-link.active { background: #edf1ff; color: #304cae; box-shadow: none; }
  .shell .nav-main .nav-link:hover { background: #edf1ff; }
  .shell .nav-sheet .nav-link { min-height: 44px; font-size: 14px; }
  .view { padding: 24px 20px calc(96px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 22px; padding-bottom: 20px; }
}
@media (max-width: 600px) {
  .view { padding-inline: 16px; }
  .card { padding: 18px; }
  .page-head h1 { font-size: 27px; }
  .grid, .stack { gap: 14px; }
  .kpi { min-height: 110px; }
  .button { min-height: 44px; }
  input[type="text"], input[type="email"], input[type="search"], select, textarea { font-size: 16px; }
  .data-workspace { gap: 18px; }
  .data-upload .row > span { width: 100%; order: 3; overflow-wrap: anywhere; }
  .confirm-dialog { padding: 20px; }
  .app .topbar { padding: 12px 16px; }
  .app .composer { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.data-privacy-note { padding: 14px 16px; border-radius: 12px; background: #edf3ff; color: #24416b; }
.data-library-tools { margin: 20px 0; flex-wrap: wrap; }
.data-library-tools input { flex: 1; min-width: 180px; }
.data-access-label { font-size: 13px; font-weight: 600; color: #35549b; }
.data-access-form { display: grid; gap: 14px; }
.data-access-form p { margin: 0; line-height: 1.55; }
.data-access-form select, .data-access-form textarea { width: 100%; }
.data-document .row { flex-wrap: wrap; }
/* Проверяемая запись бизнес-данных. */
.data-tabs { margin-bottom: 20px; }
.data-workspace[hidden], .import-workspace [hidden] { display: none !important; }
.import-workspace { display: grid; gap: 22px; max-width: 1280px; }
.import-intro { padding: 28px; border-radius: 20px; background: linear-gradient(130deg,#e8eefc,#f2f6fc); color: #172d4c; }
.import-intro h2 { font-size: clamp(24px,3vw,34px); margin: 6px 0 14px; }
.import-intro p { max-width: 820px; line-height: 1.65; }
.import-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 16px; margin: 18px 0; }
.import-field { display: grid; gap: 8px; font-size: 14px; align-content: start; }
.import-field input,.import-field select,.import-field textarea { width: 100%; min-width: 0; box-sizing: border-box; padding: 11px; border: 1px solid #bccbe0; border-radius: 8px; font: inherit; background: #fff; color: #142a48; }
.import-field input:focus,.import-field select:focus { outline: 3px solid #bcd1ff; border-color: #4566be; }
.import-table-scroll { overflow-x: auto; max-height: 440px; border: 1px solid #dce4ef; border-radius: 10px; margin: 14px 0; }
.import-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.import-table th,.import-table td { padding: 11px 14px; border-bottom: 1px solid #e5ebf4; text-align: left; vertical-align: top; min-width: 120px; max-width: 380px; overflow-wrap: anywhere; }
.import-table th { background: #edf2f9; color: #243b60; position: sticky; top: 0; }
.import-table tr:nth-child(even) { background: #f8faff; }
.import-counts { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 20px 0; }
.import-counts > div { display: grid; gap: 4px; border: 1px solid #dce4ef; border-radius: 12px; padding: 18px; }
.import-counts strong { font-size: 28px; color: #24478e; }
.import-counts span { font-size: 13px; }
.import-plan { border-top: 4px solid #4667c4; scroll-margin-top: 22px; }
.import-plan details { margin: 20px 0; }
.import-plan summary { cursor: pointer; font-weight: 600; }
.import-history-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid #e5ebf4; }
@media(max-width:650px) { .import-counts { grid-template-columns: repeat(2,1fr); } .import-history-row { align-items: stretch; flex-direction: column; } .import-intro { padding: 20px; } }
