/* AdventIQ · оболочка прототипов: токены, марка, меню-остров, шапка — как у консоли HUB и AGENTRIS
 * © 2026 ООО «ИТЕРА». Все права защищены.
 *
 * История изменений:
 *   17.11.2026 03:20 · Виноградов Александр Владимирович · файл создан (задание № 482): общая оболочка главной и
 *                      «Моего подразделения»; меню — одним списком данных в shell.js
 */
@font-face { font-family: 'Unbounded'; font-weight: 600; font-display: swap;
  src: url('fonts/unbounded-600-latin.woff2') format('woff2'); }

/* токены — как у консоли HUB и AGENTRIS (docs/spec/hub/proto), светлая и тёмная темы */
:root {
  color-scheme: light;
  --deep: #0A2470; --acc: #2F6BFF; --sky: #39A0FF; --card: #EEF5FF; --sel: #DCEBFF; --line: #D3E2F7;
  --bg: #F6F9FE; --surface: #FFFFFF; --text: #14213D; --muted: #5A6A8A; --row-line: #EDF2FA; --btn-line: #BFD0EA;
  --ok: #0E7A50; --okbg: #E3F6EC; --warn: #9A5B00; --warnbg: #FFF4DE; --err: #C8102E; --errbg: #FDECEF;
  --violet: #7B4DFF; --violetbg: #F0EBFF;
  --shadow: 0 1px 2px rgba(10,36,112,.06), 0 8px 24px rgba(10,36,112,.07);
  --shadow-sel: 0 2px 10px rgba(47,107,255,.2);
  --word: #0A2470; --iq-1: #5b6cff; --iq-2: #b44bff;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --menu-w: 288px; --gap: 16px;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --deep: #CFE0FF; --acc: #6E98FF; --sky: #5BB8FF; --card: #13244D; --sel: #1C3672; --line: #26407A;
  --bg: #081230; --surface: #0E1B40; --text: #E2EBFF; --muted: #9AAED6; --row-line: #1A2D5C; --btn-line: #2E4A88;
  --ok: #5AD6A0; --okbg: #0E3329; --warn: #F3BE62; --warnbg: #3A2B0D; --err: #FF7A8C; --errbg: #3E1621;
  --violet: #B79BFF; --violetbg: #2A1F55;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); --shadow-sel: 0 2px 10px rgba(0,0,0,.35);
  --word: #FFFFFF; --iq-1: #8b7dff; --iq-2: #d07bff;
}
.tone-blue { --t1: #5BB8FF; --t2: #2F6BFF; } .tone-indigo { --t1: #8FA2FF; --t2: #4B5BFF; }
.tone-violet { --t1: #C08BFF; --t2: #7B4DFF; } .tone-teal { --t1: #5FE0D0; --t2: #1B9AAA; }
.tone-sky { --t1: #6FD3FF; --t2: #2A8BF0; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14.5px/1.45 var(--font); color: var(--text); background: var(--bg); }
button, input { font: inherit; color: inherit; }
.one { white-space: nowrap; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; }

.shell { display: grid; grid-template-columns: var(--menu-w) minmax(0, 1fr); gap: 0 40px; padding: 16px 16px 16px;
  min-height: 100dvh; }

/* ---- марка и меню-остров ---- */
.side { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; position: sticky; top: 16px; z-index: 2;
  height: calc(100dvh - 32px); min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; border-bottom: 1px solid var(--line); }
.brand svg.sign { width: 40px; height: 35px; flex: none; }
.word { font: 600 19px/1 'Unbounded', var(--font); letter-spacing: .06em; color: var(--word); }
.word b { font-weight: 600; background: linear-gradient(90deg, var(--iq-1), var(--iq-2));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { display: block; margin-top: 5px; font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
nav.menu { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); padding: 12px; overflow: auto;
  min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 10px; position: relative; }
.grp { border-radius: 18px; box-shadow: 0 0 0 1px var(--line) inset; padding: 6px; }
.grp > .gh { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 8px;
  border-radius: 12px; cursor: pointer; font-weight: 700; color: var(--deep); text-align: left; }
.tile { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--t1), var(--t2)); box-shadow: 0 4px 10px -4px var(--t2); }
.tile svg.i { width: 17px; height: 17px; }
.gh .chev { margin-left: auto; color: var(--muted); width: 16px; height: 16px; }
.item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; color: var(--text);
  text-decoration: none; position: relative; }
.item .ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--card);
  color: var(--t2); flex: none; }
.item .ico svg.i { width: 15px; height: 15px; }
.item:hover { background: var(--card); }
.item.cur { background: var(--sel); box-shadow: var(--shadow-sel); font-weight: 700; color: var(--deep); }
.item.cur::before { content: ''; position: absolute; left: -2px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px;
  background: var(--acc); }
.collapse { position: absolute; right: -32px; top: 50%; translate: 0 -50%; cursor: pointer; width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: var(--surface); box-shadow: var(--shadow); color: var(--muted); display: grid; place-items: center; }

/* ---- шапка ---- */
.main { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--gap); min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 20px; padding: 10px 12px 10px 16px;
  box-shadow: var(--shadow); }
.top h1 { margin: 0; font-size: 15px; color: var(--deep); }
.sq.burger { display: none; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 12px;
  background: var(--bg); box-shadow: 0 0 0 1px var(--line) inset; color: var(--muted); }
.search span { overflow: hidden; text-overflow: clip; white-space: nowrap; }
.switcher { display: inline-flex; padding: 3px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line) inset; }
.switcher a { padding: 8px 12px; border-radius: 9px; text-decoration: none; font: 600 12px/1 'Unbounded', var(--font);
  letter-spacing: .06em; color: var(--muted); }
.switcher a[aria-current] { background: var(--sel); color: var(--deep); box-shadow: var(--shadow-sel); }
.sq { width: 44px; height: 44px; border-radius: 12px; border: 0; background: none; box-shadow: 0 0 0 1px var(--line) inset;
  display: grid; place-items: center; color: var(--deep); position: relative; cursor: pointer; }
.sq .badge { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--err);
  color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
.me { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 4px; border-radius: 22px;
  box-shadow: 0 0 0 1px var(--line) inset; }
.ava { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px;
  background: linear-gradient(135deg, #5BB8FF, #2F6BFF); }
.me b { display: block; color: var(--deep); font-size: 14px; } .me small { color: var(--muted); font-size: 12px; }

/* пункты меню одним списком (замечание к прототипу 1.0: разделы без группировки) */
.menu .item { font-weight: 600; }
.item .tile { width: 30px; height: 30px; border-radius: 9px; }
.item .tile svg.i { width: 16px; height: 16px; }
.item.soon { color: var(--muted); font-weight: 500; }
.item.soon .tile { filter: saturate(.55); opacity: .8; }
.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 30; padding: 12px 18px; border-radius: 14px;
  background: var(--deep); color: var(--surface); font-weight: 600; box-shadow: var(--shadow); max-width: min(560px, 92vw); }
.foot { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12.5px; padding: 4px 8px; }

@media (max-width: 1100px) { .search { display: none; } .top h1 { flex: 1; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 8px; }
  .side { position: fixed; inset: 0 auto 0 0; z-index: 20; width: min(320px, 86vw); height: 100dvh; padding: 12px;
    background: var(--bg); box-shadow: var(--shadow); transform: translateX(-105%); transition: transform .2s; }
  :root[data-menu='open'] .side { transform: none; }
  .collapse { display: none; }
  .sq.burger { display: grid; }
  .me div { display: none; } .me { padding: 0 4px; }
  .switcher a { padding: 8px; }
}
@media (max-width: 480px) { .switcher { display: none; } .foot { flex-direction: column; } }
/* узкий телефон: тема — в меню человека, шапка плотнее */
@media (max-width: 420px) {
  .top { gap: 6px; padding: 8px; }
  .top #theme { display: none; }
  .sq { width: 40px; height: 40px; }
  .me { height: 40px; } .ava { width: 32px; height: 32px; }
  .top h1 { font-size: 14px; }
  .brand small { letter-spacing: .04em; }
}

/* человек в шапке — кнопка: второе нажатие — «Выйти» (задание № 483) */
button.me { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
