/* SIG My — токени й компоненти з docs/kit/layout (як у SIG Analytics): шрифт Raleway, фірмові кольори SIG, світла й темна теми за системою. */
@font-face { font-family: "Raleway"; font-style: normal; font-weight: 400; font-display: swap; src: url("/brand/fonts/Raleway-Regular.ttf") format("truetype"); }
@font-face { font-family: "Raleway"; font-style: normal; font-weight: 700; font-display: swap; src: url("/brand/fonts/Raleway-Bold.ttf") format("truetype"); }

:root {
  --sig-navy: #13132A; --sig-magenta: #C250AE; --sig-violet: #9A469E; --sig-lime: #D0F53A; --sig-pink: #C84490; --sig-indigo: #534191;
  --brand: var(--sig-violet);
  --font: "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --r-card: 16px; --r-ctl: 10px; --gap: 18px;
  --bg: #F5F4FA; --surface: #FFFFFF; --surface-2: #EFEDF7; --border: #E3E0F0; --border-strong: #C4BEDB;
  --ink: #0F0C10; --ink-2: #58526A; --ink-3: #6E6882;
  --ok: #2C7A3D; --bad: #B42318; --warn: #A8500C;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, var(--surface));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: var(--sig-magenta);
    --bg: var(--sig-navy); --surface: #1B1B3A; --surface-2: #232347; --border: #FFFFFF1A; --border-strong: #FFFFFF3D;
    --ink: #F4F2FA; --ink-2: #ADA7BE; --ink-3: #8F899F;
    --ok: #7FD48F; --bad: #FF8A7A; --warn: #FFB36B;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); }
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
code { font-size: 13px; background: var(--surface-2); padding: 1px 5px; border-radius: 6px; }

/* ── Шапка — завжди темна (оболонка SIG), фірмовий фон із затемненням ── */
.top { color-scheme: dark; color: #fff; border-bottom: 1px solid #FFFFFF1A;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sig-navy) 70%, transparent), color-mix(in srgb, var(--sig-navy) 88%, transparent)), url("/brand/bg.jpg") center / cover no-repeat, var(--sig-navy); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; }
.logo img { display: block; height: 30px; width: auto; }
.brand-ttl { display: flex; flex-direction: column; line-height: 1.15; padding-left: 16px; border-left: 1px solid #FFFFFF3D; }
.brand-ttl b { font-size: 16px; } .brand-ttl small { color: #C9C5DA; font-size: 12px; }
.user { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.user .ava { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #232347; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.user .who { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.out { margin: 0; }

main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 24px; display: flex; flex-direction: column; gap: var(--gap); }
.foot { text-align: center; color: var(--ink-3); font-size: 12px; padding: 18px; }

/* ── Заголовок ── */
.head .ttl { display: flex; align-items: flex-start; gap: 12px; }
.head .ttl .squares { margin-top: 13px; }
h1 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.01em; }
.sub { color: var(--ink-2); margin-top: 4px; max-width: 72ch; }
.squares { display: inline-flex; gap: 3px; flex: none; } .squares i { display: block; width: 8px; height: 8px; }
.squares i:first-child { background: var(--sig-pink); } .squares i:last-child { background: var(--sig-indigo); }

/* ── Плитки сервісів ── */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.tile { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border);
  color: inherit; text-decoration: none; transition: border-color .12s, transform .12s, box-shadow .12s; min-width: 0; }
.tile:hover, .tile:focus-visible { border-color: var(--brand); transform: translateY(-1px); box-shadow: 0 10px 28px #13132A1f; }
.tile .ic { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.tile .tx { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile b { font-size: 18px; line-height: 1.2; }
.tile .arr { color: var(--brand); font-weight: 700; }
.tile .d { color: var(--ink-2); font-size: 14px; }
.tile .pill { align-self: flex-start; white-space: normal; border-radius: 8px; line-height: 1.35; }
.tile.muted { border-style: dashed; border-color: var(--border-strong); }
.tile.muted .ic { background: var(--surface-2); color: var(--ink-3); }
.tile.muted b, .tile.muted .arr { color: var(--ink-2); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pill.muted { background: var(--surface-2); color: var(--ink-2); }

.note { color: var(--ink-3); font-size: 13px; margin: 0; }
.empty { padding: 18px; border: 1px dashed var(--border-strong); border-radius: 12px; color: var(--ink-2); }
.empty .squares { margin-right: 10px; vertical-align: 1px; }

/* ── Кнопки, картки, форми ── */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--ink); font: 600 13px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--brand); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; color: #fff; border-color: #FFFFFF3D; }
.btn.ghost:hover { border-color: var(--sig-lime); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 28px; }
.center { flex: 1; display: grid; place-items: center; padding: 24px 0; }
.narrow { width: min(440px, 100%); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.form { display: flex; flex-direction: column; gap: 12px; width: 100%; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.inp { height: 38px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font: inherit; }

@media (max-width: 640px) {
  .top-in { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .brand-ttl { padding-left: 10px; }
  .user .who { display: none; }
  main { padding: 20px 16px; }
  h1 { font-size: 24px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
}
