/* Цвета и шрифты iStudio — одно место для всех страниц (подключается первым).
   Стиль: середина между KODA (монохром, тонкие рамки), oopsie.bio (разделы слева, крупные цифры, розовый для данных)
   и Claude (тёплый светлый фон, спокойные заголовки). Главные кнопки и выбранное — монохром (--accent: чёрный в
   светлой теме, белый в тёмной); розовый (--rose) — только то, что требует внимания: «идёт», «нужен человек», счётчики.
   Тема: html[data-theme="light|dark"] — выбор человека (theme.js, хранится в браузере); без атрибута — как в системе. */
:root {
  /* светлая — тёплый песочный фон (не белый) с мягкими пятнами света; карточки — сливочные */
  --bg: #f2ece2; --panel: #fbf8f2; --panel-2: #f0e9dd; --hover: #e9e0d2; --border: #e3dacb; --border-strong: #d3c7b4;
  --text: #24211c; --muted: #7b7366; --faint: #a99f90;
  --accent: #24211c; --accent-hover: #3d3830; --accent-soft: #ebe3d5; --on-accent: #fbf8f2;
  --glass: rgba(242, 236, 226, .78);
  --bg-art: radial-gradient(1100px 620px at 92% -8%, rgba(214, 83, 127, .10), transparent 62%),
            radial-gradient(900px 560px at -8% 105%, rgba(201, 158, 98, .20), transparent 60%),
            radial-gradient(700px 420px at 40% 45%, rgba(255, 252, 245, .55), transparent 70%);
  --primary: var(--accent); --on-primary: var(--on-accent);
  --rose: #d6537f; --rose-soft: #fbe9ef; --rose-text: #b43c66; --accent-text: var(--rose-text);
  --ok: #1f8a5b; --ok-soft: #e3f4ec; --warn: #a8680c; --warn-soft: #fbf0dc; --err: #c2413b; --err-soft: #fbe8e6;
  --shadow: 0 1px 2px rgba(20, 20, 18, .04);
  --radius: 12px; --radius-lg: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --side-w: 240px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121013; --panel: #1a181c; --panel-2: #211e23; --hover: #29262b; --border: #2a272d; --border-strong: #3a363d;
  --text: #efeaf0; --muted: #948d97; --faint: #625c66;
  --accent: #efeaf0; --accent-hover: #ffffff; --accent-soft: #29262b; --on-accent: #121013;
  --glass: rgba(18, 16, 19, .72);
  --bg-art: radial-gradient(1000px 600px at 95% -10%, rgba(236, 126, 161, .13), transparent 60%),
            radial-gradient(900px 600px at -10% 110%, rgba(120, 92, 160, .12), transparent 60%);
  --rose: #ec7ea1; --rose-soft: #3a1f2a; --rose-text: #f29ab7;
  --ok: #4cc493; --ok-soft: #12291f; --warn: #e9a23b; --warn-soft: #2e2311; --err: #f0807a; --err-soft: #331817;
  --shadow: none; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121013; --panel: #1a181c; --panel-2: #211e23; --hover: #29262b; --border: #2a272d; --border-strong: #3a363d;
    --text: #efeaf0; --muted: #948d97; --faint: #625c66;
    --accent: #efeaf0; --accent-hover: #ffffff; --accent-soft: #29262b; --on-accent: #121013;
    --glass: rgba(18, 16, 19, .72);
    --bg-art: radial-gradient(1000px 600px at 95% -10%, rgba(236, 126, 161, .13), transparent 60%),
              radial-gradient(900px 600px at -10% 110%, rgba(120, 92, 160, .12), transparent 60%);
    --rose: #ec7ea1; --rose-soft: #3a1f2a; --rose-text: #f29ab7;
    --ok: #4cc493; --ok-soft: #12291f; --warn: #e9a23b; --warn-soft: #2e2311; --err: #f0807a; --err-soft: #331817;
    --shadow: none; color-scheme: dark;
  }
}

/* фон страниц: цвет + мягкие пятна света (не однотонно); html body — сильнее, чем body в стилях страниц */
html body { background: var(--bg-art), var(--bg); background-attachment: fixed; }

/* левая панель разделов (shell.js) — на компьютере; на телефоне у страниц свои вкладки */
.ist-side { display: none; }
@media (min-width: 1000px) {
  body.has-side { padding-left: var(--side-w); }
  .ist-side { display: flex; flex-direction: column; gap: 2px; position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: var(--side-w);
    padding: 16px 12px 12px; background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-right: 1px solid var(--border); overflow-y: auto; font: 14px/1.45 var(--font); }
  body.has-side .ist-hide-desktop { display: none !important; }
}
.ist-side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; font-weight: 700; font-size: 16.5px; letter-spacing: -.01em;
  color: var(--text); text-decoration: none; }
.ist-side .brand img { width: 26px; height: 26px; border-radius: 8px; }
.ist-side .brand .mark { width: 28px; height: 28px; color: var(--text); flex: none; }
.ist-side .brand span { letter-spacing: -.02em; }
.ist-side .group { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 14px 10px 6px; }
.ist-side a.nav { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 500; }
.ist-side a.nav:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.ist-side a.nav.on { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--border), var(--shadow); }
.ist-side a.nav svg { width: 18px; height: 18px; flex: none; }
.ist-side a.nav .count { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--rose-text); background: var(--rose-soft); border-radius: 999px; padding: 0 7px; }
.ist-side .grow { flex: 1; min-height: 12px; }
.ist-side .theme { display: flex; padding: 3px; gap: 2px; margin: 6px 4px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--border); }
.ist-side .theme button { flex: 1; display: grid; place-items: center; height: 28px; min-height: 0; padding: 0; border: 0; border-radius: 8px; background: none;
  color: var(--muted); cursor: pointer; }
.ist-side .theme button.on { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.ist-side .theme svg { width: 16px; height: 16px; }
.ist-side .me { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; margin: 6px 4px 0; border-radius: 14px; color: var(--text);
  background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); }
.ist-side .me .av { width: 30px; height: 30px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center;
  font-size: 13px; font-weight: 700; flex: none; }
.ist-side .me > div { min-width: 0; flex: 1; }
.ist-side .me b { display: block; font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ist-side .me span { font-size: 11.5px; color: var(--muted); }
.ist-side .me button, .ist-side .me a { width: 30px; height: 30px; min-height: 0; padding: 0; border: 0; border-radius: 9px; background: none; color: var(--muted);
  cursor: pointer; display: grid; place-items: center; flex: none; text-decoration: none; }
.ist-side .me button:hover, .ist-side .me a:hover { background: var(--hover); color: var(--text); }
.ist-side .me a.on { background: var(--panel-2); color: var(--text); }
.ist-side .me svg { width: 17px; height: 17px; }
/* роль не залезает под кнопки: обрезается многоточием; кнопки настроек и выхода — вплотную */
.ist-side .me .me-role { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ist-side .me a.me-set + .me-out { margin-left: -8px; }
.ist-side .me { gap: 9px; }

/* «Есть обновление» в боковой панели */
.ist-side .upd { display: flex; align-items: center; gap: 9px; margin: 0 4px 8px; padding: 9px 12px; border-radius: 12px;
  border: 1px solid var(--rose); background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.ist-side .upd[hidden] { display: none; }
.ist-side .upd .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); flex: none; }
.ist-side .upd:disabled { opacity: .6; cursor: default; }
