/* DueLoad — кабинет app.dueload.com (макеты v2). Токены тёмной (по умолчанию) и светлой темы, каркас, окно установки расширения.
   Светлая тема: лайм — только заливка под тёмным текстом; мелкий акцентный текст — Forest #3F6212; главная кнопка — графит + лайм. */
:root {
  --bg: #0A0A09; --s1: #111110; --s2: #161614; --s3: #1D1D1B; --s4: #262624; --s4h: #34342F;
  --side-bg: #0C0C0B; --inset: #0D0D0C; --pop: #1D1D1B; --tabbar: #161614;
  --line: rgba(245, 245, 240, .08); --line2: rgba(245, 245, 240, .14); --line3: rgba(245, 245, 240, .24);
  --text: #F5F5F0; --muted: #A9A9A1; --dim: #8E8E86;
  --accent: #C5F26B; --accent-display: #C5F26B; --fill: #C5F26B; --on-fill: #0A0A09; --bar: #C5F26B; --bar-glow: rgba(197, 242, 107, .55);
  --accent-soft: rgba(197, 242, 107, .12); --accent-soft2: rgba(197, 242, 107, .22); --accent-ring: rgba(197, 242, 107, .25); --accent-tint: rgba(197, 242, 107, .06);
  --hero-glow: rgba(197, 242, 107, .20);
  --cta-bg: #C5F26B; --cta-fg: #0A0A09; --cta-hover: #D4F78E; --cta-shadow: 0 8px 28px -10px rgba(197, 242, 107, .55);
  --hover: rgba(245, 245, 240, .06); --hover2: rgba(245, 245, 240, .08); --dots: rgba(245, 245, 240, .045);
  --warn: #F5C77A; --warn-soft: rgba(245, 199, 122, .12); --red: #FF8A7A; --red-soft: rgba(255, 138, 122, .12);
  --on-warn: #0A0A09; --on-red: #0A0A09;   /* текст на заливке --warn / --red */
  --toast-bg: #F5F5F0; --toast-fg: #0A0A09; --toast-act-bg: #0A0A09; --toast-act-fg: #C5F26B;
  --shadow-pop: 0 0 0 1px var(--line2), 0 20px 40px -10px rgba(0, 0, 0, .7); --shadow-bar: 0 0 0 1px var(--line2), 0 20px 50px -10px rgba(0, 0, 0, .7);
  --scrim: rgba(0, 0, 0, .72);
  --chart-found: #6F6F68; --chart-found-dot: #A9A9A1; --chart-grid: rgba(245, 245, 240, .07); --chart-label: #8E8E86; --chart-hair: rgba(245, 245, 240, .35);
  --slash: #C5F26B; --focus: #C5F26B;
  --side: 264px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F7F7F3; --s1: #FFFFFF; --s2: #F2F2EC; --s3: #EAEAE3; --s4: #DEDED6; --s4h: #CFCFC6;
  --side-bg: #FBFBF8; --inset: #FBFBF8; --pop: #FFFFFF; --tabbar: #FFFFFF;
  --line: rgba(15, 15, 14, .08); --line2: rgba(15, 15, 14, .13); --line3: rgba(15, 15, 14, .24);
  --text: #0F0F0E; --muted: #4F4F4A; --dim: #66665F;
  --accent: #3F6212; --accent-display: #5B8C0A; --fill: #C5F26B; --on-fill: #0A0A09; --bar: #5B8C0A; --bar-glow: rgba(91, 140, 10, .3);
  --accent-soft: rgba(132, 204, 22, .16); --accent-soft2: rgba(132, 204, 22, .26); --accent-ring: rgba(77, 124, 15, .3); --accent-tint: rgba(132, 204, 22, .08);
  --hero-glow: rgba(197, 242, 107, .45);
  --cta-bg: #0F0F0E; --cta-fg: #C5F26B; --cta-hover: #26261F; --cta-shadow: 0 8px 24px -12px rgba(15, 15, 14, .45);
  --hover: rgba(15, 15, 14, .05); --hover2: rgba(15, 15, 14, .07); --dots: rgba(15, 15, 14, .06);
  --warn: #8A4B0B; --warn-soft: rgba(180, 110, 20, .12); --red: #B3261E; --red-soft: rgba(179, 38, 30, .09);
  --on-warn: #FFFFFF; --on-red: #FFFFFF;
  --toast-bg: #0F0F0E; --toast-fg: #F5F5F0; --toast-act-bg: #C5F26B; --toast-act-fg: #0A0A09;
  --shadow-pop: 0 0 0 1px var(--line2), 0 18px 40px -14px rgba(15, 15, 14, .28); --shadow-bar: 0 0 0 1px var(--line2), 0 16px 40px -14px rgba(15, 15, 14, .22);
  --scrim: rgba(15, 15, 14, .42);
  --chart-found: #9A9A92; --chart-found-dot: #66665F; --chart-grid: rgba(15, 15, 14, .07); --chart-label: #66665F; --chart-hair: rgba(15, 15, 14, .3);
  --slash: #5B8C0A; --focus: #3F6212;
  color-scheme: light;
}
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
html { background: var(--bg); }
body { background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; overflow-x: clip; }
::selection { background: var(--fill); color: var(--on-fill); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.s { width: 16px; height: 16px; }

/* ---------- каркас ---------- */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; min-height: 100dvh; }
/* точечная текстура фона (идея из 21st.dev «Analytics Bento») — вместо стекла */
.main { background-image: radial-gradient(circle, var(--dots) 0 1px, transparent 1.4px); background-size: 22px 22px; background-position: -6px -6px; }
.side { flex: 0 0 var(--side); display: flex; flex-direction: column; gap: 6px; padding: 20px 14px; border-right: 1px solid var(--line); background: var(--side-bg); }
.side .logo { font-size: 24px; padding: 6px 10px 18px; }
.co { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 14px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); text-align: left; cursor: pointer; margin-bottom: 14px; }
.co:hover { background: var(--s3); }
.co .av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--fill); color: var(--on-fill); font-weight: 750; font-size: 13px; flex: none; }
.co b { display: block; font-size: 14px; font-weight: 650; line-height: 1.2; }
.co small { display: block; font-size: 12px; color: var(--dim); font-family: var(--mono); }
.co .ico { margin-left: auto; color: var(--dim); }
.snav { display: flex; flex-direction: column; gap: 2px; position: relative; }
.snav a { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14.5px; transition: color .2s; }
.snav a:hover { color: var(--text); }
.snav a[aria-current="page"] { color: var(--text); }
.snav a[aria-current="page"] .ico { color: var(--accent); }
.snav .ind { position: absolute; left: 0; right: 0; top: 0; height: 44px; border-radius: 12px; background: var(--s3); box-shadow: inset 0 0 0 1px var(--line); z-index: 0; }
.snav .cnt { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--fill); color: var(--on-fill); font-size: 12px; font-weight: 750; display: grid; place-items: center; }
.side .sep { height: 1px; background: var(--line); margin: 12px 4px; }
.ext { margin-top: auto; display: block; color: inherit; text-decoration: none; border-radius: 16px; padding: 14px; background: linear-gradient(180deg, var(--accent-tint), transparent); box-shadow: inset 0 0 0 1px var(--accent-ring); }
.ext + .ext { margin-top: 10px; }
.ext.off .row i { background: var(--muted); box-shadow: none; animation: none; }
.ext:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.ext-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.ext-col { display: flex; flex-direction: column; gap: 10px; }
.ext-col h3 { margin: 0; font-size: 16px; font-weight: 700; }
.ext-col .ext-stat { margin: 0; font-size: 13.5px; font-weight: 600; }
@media (max-width: 860px) { .ext-grid { grid-template-columns: 1fr; } }
.ext .row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.ext .row i { width: 8px; height: 8px; border-radius: 50%; background: var(--bar); box-shadow: 0 0 10px var(--bar-glow); animation: pulse 2s infinite; }
.ext p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.ext .btn { width: 100%; margin-top: 12px; height: 40px; font-size: 13px; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; font-size: 13.5px; }
.me .av { width: 32px; height: 32px; border-radius: 50%; background: var(--s4); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.me small { display: block; color: var(--dim); font-size: 12px; }

.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: 68px; padding: 0 32px; border-bottom: 1px solid var(--line); background: var(--bg); }
.topbar .crumbs { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 14px; }
.topbar .crumbs b { color: var(--text); font-weight: 650; }
.topbar .logo-m { display: none; font-size: 22px; }
.search { margin-left: auto; display: flex; align-items: center; gap: 8px; height: 38px; width: min(320px, 30vw); padding: 0 12px; border-radius: 11px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); color: var(--dim); font-size: 13.5px; }
.search kbd { margin-left: auto; font-family: var(--mono); font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--s4); color: var(--muted); }
.ibtn { position: relative; width: 44px; height: 44px; border: 0; border-radius: 11px; display: grid; place-items: center; background: transparent; color: var(--muted); cursor: pointer; }
.ibtn:hover { background: var(--s2); color: var(--text); }
.ibtn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--bar); box-shadow: 0 0 0 2px var(--bg); }
.ibtn svg { grid-area: 1 / 1; }
.theme-ico-moon { display: none; }
:root[data-theme="light"] .theme-ico-sun { display: none; }
:root[data-theme="light"] .theme-ico-moon { display: block; }
.content { padding: 32px clamp(32px, 2.2vw, 48px); width: 100%; } /* на всю ширину: без max-width, сетки страниц тянутся сами */

/* ---------- кнопки, чипы ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border: 0; border-radius: 12px; font-weight: 650; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .2s var(--ease), box-shadow .2s var(--ease), color .2s; }
.btn-lime { background: var(--cta-bg); color: var(--cta-fg); box-shadow: var(--cta-shadow); }
.btn-lime:hover { background: var(--cta-hover); }
.btn-ghost { background: var(--s2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.btn-ghost:hover { background: var(--s3); }
.btn-text { background: transparent; color: var(--muted); }
.btn-text:hover { color: var(--text); background: var(--s2); }
.btn-lg { height: 48px; padding: 0 20px; font-size: 15px; border-radius: 14px; }
.btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.ready { background: var(--accent-soft); color: var(--accent); }
.chip.sub { background: var(--hover2); color: var(--text); }
.chip.ok { background: var(--fill); color: var(--on-fill); }
.chip.part { background: var(--warn-soft); color: var(--warn); }
.chip.new { background: var(--hover); color: var(--muted); }
.chip.urgent { background: var(--red-soft); color: var(--red); }

.card { position: relative; border-radius: 22px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.card-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 20px 22px 0; }
.card-h h2, .card-h h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 680; letter-spacing: -0.015em; }
.card-h small { color: var(--dim); font-size: 13px; }
.mono { font-family: var(--mono); }

/* сегмент-переключатель с плавающим индикатором */
.seg { position: relative; display: inline-flex; padding: 3px; border-radius: 12px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { position: relative; z-index: 1; height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; cursor: pointer; transition: color .2s; }
.seg button[aria-pressed="true"] { color: var(--on-fill); }
.seg .ind { position: absolute; top: 3px; left: 0; height: 36px; border-radius: 9px; background: var(--fill); z-index: 0; }

/* тост */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; display: flex; align-items: center; gap: 10px; padding: 12px 16px 12px 12px; border-radius: 14px; background: var(--toast-bg); color: var(--toast-fg); font-weight: 650; font-size: 14px; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .5); translate: -50% 0; /* отдельное свойство: Motion пишет transform */ pointer-events: none; opacity: 0; }
.toast.has-act { pointer-events: auto; }
.toast .act { margin-left: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--toast-act-bg); color: var(--toast-act-fg); font-weight: 700; font-size: 13px; cursor: pointer; }
.toast .act:focus-visible { outline: 2px solid var(--toast-fg); outline-offset: 2px; }
.toast .bx { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--fill); color: var(--on-fill); }
.toast.err .bx { background: var(--red); color: var(--on-red); }

/* ---------- окно установки расширения ---------- */
.install { width: min(880px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 26px; background: var(--s1); color: var(--text); box-shadow: 0 0 0 1px var(--line2), 0 40px 100px -30px rgba(0, 0, 0, .6); overflow: auto; }
.install::backdrop { background: var(--scrim); }
.install-h { display: flex; align-items: flex-start; gap: 16px; padding: 26px 26px 0; }
.install-h .mark { width: 52px; height: 52px; border-radius: 15px; flex: none; }
.install-h h2 { margin: 2px 0 0; font-size: 24px; letter-spacing: -0.035em; font-weight: 740; line-height: 1.15; }
.install-h p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.install-h .inst-browser { margin-top: 8px; font-size: 13.5px; }
.install-h .inst-browser.warn { padding: 8px 10px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.install-x { margin-left: auto; flex: none; }
.install-b { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; padding: 22px 26px 8px; }
.dl-card { border-radius: 20px; padding: 20px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 12px; }
.dl-card .file { display: flex; align-items: center; gap: 12px; }
.dl-card .zip { width: 44px; height: 52px; border-radius: 10px; background: var(--fill); color: var(--on-fill); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 700; flex: none; }
.dl-card .file b { display: block; font-size: 14.5px; font-family: var(--mono); word-break: break-all; }
.dl-card .file small { display: block; color: var(--dim); font-size: 12.5px; }
.dl-card .btn { width: 100%; }
.dl-card .soon { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line2); font-size: 13.5px; color: var(--muted); }
.dl-card .facts { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--muted); }
.dl-card .facts li { display: flex; gap: 8px; align-items: flex-start; }
.dl-card .facts .ico { color: var(--accent); margin-top: 1px; }
.isteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: st; }
.isteps li { counter-increment: st; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 12px 12px; border-radius: 16px; transition: background-color .2s; }
.isteps li:hover { background: var(--hover); }
.isteps li::before { content: counter(st); width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--s3); font-size: 13px; font-weight: 750; color: var(--text); }
.isteps li.on::before { background: var(--fill); color: var(--on-fill); }
.isteps b { display: block; font-size: 14.5px; font-weight: 650; margin-top: 4px; }
.isteps span { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.isteps code { font-family: var(--mono); font-size: 12.5px; padding: 2px 6px; border-radius: 6px; background: var(--s3); color: var(--text); }
.isteps .copyline { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; }
.copyline .btn { height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; }
.isteps .code6 { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--s3); }
.isteps .code6 b { display: inline; font-family: var(--mono); font-size: 20px; letter-spacing: .18em; color: var(--text); margin: 0; }
.isteps .code6 .btn { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.install-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 26px 24px; border-top: 1px solid var(--line); margin-top: 14px; }
.install-f a { color: var(--accent); font-weight: 650; font-size: 14px; text-decoration: none; }
.install-f a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .install-b { grid-template-columns: 1fr; padding: 18px 16px 4px; }
  .install-h { padding: 20px 16px 0; }
  .install-h h2 { font-size: 20px; }
  .install-f { padding: 14px 16px 20px; }
}

/* ---------- мобильная версия: нижняя панель ---------- */
.tabbar { display: none; }
@media (max-width: 900px) {
  .side { display: none; }
  .topbar { padding: 0 16px; height: 60px; gap: 4px; }
  .topbar .crumbs { display: none; }
  .topbar .logo-m { display: inline-flex; }
  .search { display: none; }
  .topbar .ibtn:first-of-type { margin-left: auto; }
  .topbar .btn .lbl { display: none; }
  .topbar .btn { padding: 0 12px; }
  .content { padding: 20px 16px 110px; }
  .tabbar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: 22px; background: var(--tabbar); box-shadow: var(--shadow-bar); padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 52px; padding: 8px 0 6px; border-radius: 16px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 650; }
  .tabbar a[aria-current="page"] { color: var(--on-fill); background: var(--fill); }
  /* счётчики — как в боковом меню: обычный (готовые Disputes) — заливкой, алерты Trucks (.red) — красным */
  .tabbar .cnt { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--fill); color: var(--on-fill); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
  .tabbar a[aria-current="page"] .cnt:not(.red) { background: var(--on-fill); color: var(--fill); }   /* на залитой вкладке — наоборот */
  .tabbar .cnt.red { background: var(--red); color: var(--on-red); }
}

/* i18n: длинные подписи (ru/uk/tg/uz) */
.topbar .crumbs { white-space: nowrap; min-width: 0; flex-shrink: 1; }
.topbar .crumbs > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.search { min-width: 180px; flex-shrink: 1; }
@media (max-width: 1520px) { .topbar .crumbs > span { display: none; } }
.tabbar a > span:not(.cnt), .tabbar .tab-more > span { max-width: 100%; padding: 0 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
