/* Блоки продуктов: акт и Telegram у RDesk, ТСД и обмен с 1С у AInventory, тема AInventory. */

/* ── Общие добавки ─────────────────────────────────────────── */
[hidden] { display: none !important; }
.step-title, .step-text, .co-title { display: block; }
.co-name-text { min-width: 0; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--navy); color: #fff; }
.feat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.14); }
.feat.plain .feat-icon { background: var(--tint); color: var(--navy); }
.feat.accent { background: var(--amber); color: var(--ink); }
.feat.accent .feat-icon { background: rgba(0, 0, 0, 0.1); }
.feat.navy .feat-title, .feat.accent .feat-title { color: inherit; }
.col.center { align-items: center; }
.footer-inner { flex-wrap: wrap; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.footer-inner a { font-weight: 600; }
.footer-more { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); gap: 10px; }
.footer-more a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }

/* ── RDesk: акт и отчёт ────────────────────────────────────── */
.act { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 24px 60px rgba(30, 41, 59, 0.08); }
.act-head { display: flex; flex-direction: column; gap: 2px; }
.act-head b { font-size: 16px; }
.act-head span { font-size: 13px; color: var(--muted); }
.act-block { margin-top: 14px; }
.act-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.act-work { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 7px 0; border-top: 1px solid var(--bg); }
.eq-grid { display: grid; grid-template-columns: 92px minmax(0, 1fr) 118px; gap: 8px; align-items: center; padding: 8px 0; font-size: 13px; }
.eq-cols { font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; padding-top: 0; }
.eq-row { border-top: 1px solid var(--bg); animation: popin 0.4s; }
.eq-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-row code { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.eq-action { font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 3px 7px; justify-self: start; }
.eq-0 { background: #fbe7dc; color: var(--warning); }
.eq-1 { background: #dcfce7; color: #166534; }
.eq-2 { background: var(--line); color: var(--muted); }
.act-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--bg); font-size: 13px; }
.act-sent { color: #166534; font-weight: 700; }
.report { background: var(--navy); color: #fff; border-radius: 16px; padding: 18px; }
.report-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-head b { font-size: 15px; }
.report-file { font-size: 11px; font-weight: 700; background: #166534; color: #dcfce7; border-radius: 5px; padding: 3px 7px; }
.report-period { font-size: 12px; color: rgba(226, 234, 247, 0.7); margin-left: auto; }
.report-table { margin-top: 12px; font-size: 12.5px; }
.rp-grid { display: grid; grid-template-columns: 48px 56px 54px 84px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.rp-grid span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-cols { color: rgba(226, 234, 247, 0.6); font-size: 11px; font-weight: 700; border-top: 0; }

/* ── RDesk: Telegram ───────────────────────────────────────── */
.tg-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--tg); }
.tg { width: 100%; max-width: 420px; margin: 0 auto; border-radius: 18px; overflow: hidden; border: 1px solid #c9d4e2; box-shadow: 0 30px 70px rgba(30, 41, 59, 0.18); background: linear-gradient(160deg, #cfe0c3, #b9d1c4); }
.tg-head { background: #fff; padding: 10px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #e2e8f0; }
.tg-head b { display: block; font-size: 15px; font-weight: 600; }
.tg-head span { font-size: 12.5px; color: #64748b; }
.tg-avatar { width: 40px; height: 40px; border-radius: 50%; background: #3b82f6; color: #fff; font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tg-feed { height: 560px; padding: 12px 10px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; overflow: hidden; font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; font-size: 13.5px; line-height: 1.36; color: #000; }
.tg-date { align-self: center; background: rgba(0, 0, 0, 0.2); color: #fff; font-size: 12px; font-weight: 600; border-radius: 10px; padding: 2px 9px; margin-bottom: 4px; flex-shrink: 0; }
.tg-msg { align-self: flex-start; max-width: 90%; background: #fff; border-radius: 12px 12px 12px 4px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12); overflow: hidden; animation: popin 0.45s; flex-shrink: 0; }
.tg-body { padding: 6px 10px 4px; }
.tg-sender { color: #2b78c5; font-weight: 600; font-size: 13px; margin-bottom: 1px; }
.tg-msg b { font-weight: 600; }
.tg-msg code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.tg-div { color: #94a3b8; letter-spacing: -1.5px; overflow: hidden; white-space: nowrap; }
.tg-gap { margin-top: 6px; }
.tg-time { text-align: right; font-size: 11px; color: #94a3b8; margin-top: -2px; }
.tg-album { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; height: 92px; }
.tg-album span { display: block; background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.15)); }
.tg-note { font-size: 13px; color: var(--muted); text-align: center; max-width: 420px; margin: 0 auto; }

/* ── AInventory: тема ──────────────────────────────────────── */
.site-ainventory {
  --navy: #0f2a6b;
  --blue: #1e40af;
  --amber: #4ade80;
  --amber-dark: #16a34a;
  --tint: #dbeafe;
  --bg: #eef2f7;
  --card: #f8fafc;
  --line: #d6dee9;
}
.site-ainventory .hero { background: radial-gradient(1200px 600px at 80% 0%, #1e40af 0%, #0f2a6b 55%); }
.site-ainventory .badge { background: rgba(74, 222, 128, 0.14); }
.site-ainventory .badge .dot { animation-name: pulse-green; }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); } 100% { box-shadow: 0 0 0 12px rgba(74, 222, 128, 0); } }
.site-ainventory .btn-primary, .site-ainventory .login { color: #052e16; }
.site-ainventory .btn-primary:hover, .site-ainventory .login:hover { background: #86efac; color: #052e16; }
.site-ainventory .step.active .step-dot { color: #052e16; }
.site-ainventory .cta { background: var(--navy); }

.inv-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 72px; }
.inv-hero-text { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.inv-hero h1 { font-size: clamp(34px, 4.4vw, 54px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; text-wrap: balance; }
.inv-hero .hero-lead { max-width: 560px; }
.inv-hero .hero-cta { justify-content: flex-start; }
.inv-hero-devices { position: relative; height: 600px; }
.inv-tsd.back { position: absolute; left: 0; top: 50px; transform: rotate(-7deg) scale(0.86); transform-origin: 50% 100%; opacity: 0.9; }
.inv-tsd.front { position: absolute; right: 10px; top: 0; animation: floaty 6s ease-in-out infinite; }

/* Корпус ТСД */
.tsd { width: 300px; background: linear-gradient(180deg, #2b2f36, #1b1e23); border-radius: 30px 30px 40px 40px; padding: 14px 12px 18px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.tsd-top { height: 18px; display: flex; justify-content: center; align-items: center; margin-bottom: 8px; }
.tsd-window { width: 92px; height: 8px; border-radius: 4px; background: #c2410c; box-shadow: 0 0 10px rgba(234, 88, 12, 0.6); }
.tsd-screen { height: 520px; background: #f3f4f6; border-radius: 10px; overflow: hidden; color: #111827; font-family: Roboto, 'Segoe UI', Arial, sans-serif; font-size: 12px; text-align: left; }
.tsd-keys { display: flex; justify-content: center; gap: 14px; margin-top: 14px; }
.tsd-keys span { width: 46px; height: 12px; border-radius: 6px; background: #3b4048; }
.tsd-keys .tsd-trigger { width: 64px; background: #c2410c; }
.tsd-status { display: flex; justify-content: space-between; padding: 4px 10px; font-size: 10.5px; color: #374151; background: #e5e7eb; }
.tsd-status-r { display: flex; align-items: center; gap: 4px; }
.tsd-wifi { width: 10px; height: 7px; border-radius: 10px 10px 0 0; border: 2px solid #374151; border-bottom: 0; }
.tsd-batt { width: 16px; height: 8px; border: 1px solid #374151; border-radius: 2px; padding: 1px; display: flex; }
.tsd-batt b { display: block; background: #15803d; border-radius: 1px; }
.tsd-title { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #fff; border-bottom: 1px solid #d1d5db; }
.tsd-title-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tsd-title-text b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsd-title-text span { font-size: 11px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsd-back { font-size: 22px; color: #1d4ed8; line-height: 1; }
.tsd-gear { font-size: 18px; color: #6b7280; }
.tsd-body { padding: 8px; display: flex; flex-direction: column; gap: 7px; }
.tsd-card { background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 2px; animation: popin 0.35s; }
.tsd-card.tsd-danger { background: #fee2e2; border-color: #fca5a5; }
.tsd-row { display: flex; align-items: center; gap: 6px; }
.tsd-strong { display: block; font-size: 12.5px; }
.tsd-muted { display: block; color: #6b7280; font-size: 10.5px; }
.tsd-h { font-size: 14px; line-height: 1.25; }
.tsd-badge { font-size: 9.5px; font-weight: 700; background: #dbeafe; color: #1e40af; border-radius: 4px; padding: 2px 5px; flex-shrink: 0; }
.tsd-btn { display: inline-block; border-radius: 6px; padding: 6px 9px; font-weight: 600; font-size: 11.5px; text-align: center; white-space: nowrap; }
.tsd-btn-primary { background: #1d4ed8; color: #fff; }
.tsd-btn-secondary { background: #fff; color: #111827; border: 1px solid #d1d5db; }
.tsd-btn-ok { background: #15803d; color: #fff; }
.tsd-big { border-radius: 8px; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.tsd-big b { font-size: 16px; }
.tsd-big span { font-size: 11px; opacity: 0.85; }
.tsd-prices { display: flex; justify-content: space-between; border-top: 1px solid #e5e7eb; margin-top: 5px; padding-top: 5px; font-size: 11.5px; }
.tsd-qty { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 5px; }
.tsd-qty div { background: #f3f4f6; border-radius: 6px; padding: 4px; text-align: center; display: flex; flex-direction: column; }
.tsd-qty span { font-size: 9.5px; color: #6b7280; }
.tsd-qty b { font-size: 16px; }
.tsd-qty b.big { font-size: 20px; }
.tsd-added { color: #15803d; font-weight: 600; font-size: 10.5px; margin-top: 4px; }
.tsd-raw { font-family: ui-monospace, Consolas, monospace; font-size: 12px; margin-top: 2px; }
.tsd-input { flex: 1; text-align: center; border: 2px solid #1d4ed8; border-radius: 6px; padding: 3px; font-size: 16px; font-weight: 700; background: #fff; }
.tsd-recent-h { color: #6b7280; font-size: 10px; font-weight: 700; margin-top: 2px; }
.tsd-recent { display: flex; gap: 6px; font-size: 11px; padding: 4px 0; border-bottom: 1px solid #d1d5db; }
.tsd-recent span:first-child { color: #6b7280; width: 30px; flex-shrink: 0; }
.tsd-recent span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsd-cards { display: flex; flex-direction: column; }
.tsd-cards.animated { min-height: 196px; }

/* Сканирование */
.barcodes { display: flex; flex-direction: column; gap: 8px; }
.barcode { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; flex-wrap: wrap; }
.barcode b { font-size: 14px; min-width: 150px; }
.barcode code { font-size: 12.5px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.checks li { display: flex; gap: 10px; }
.checks li::before { content: "\2713"; color: #16a34a; font-weight: 700; flex-shrink: 0; }

/* Без сети */
.offline-card { min-height: 0; }
.queue-bars { display: flex; gap: 4px; height: 42px; align-items: flex-end; }
.queue-bars span { flex: 1; height: 30%; border-radius: 3px; background: var(--amber); transition: height 0.5s ease calc(var(--i) * 40ms), background 0.5s; }
.offline-card.is-offline .queue-bars span { height: calc(30% + var(--i) * 5%); background: #fb923c; }

/* Обмен с 1С */
.flow { margin-top: 40px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.flow-node { display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; min-width: 130px; }
.flow-node b { font-size: 16px; }
.flow-badge { width: 44px; height: 44px; border-radius: 10px; background: #fde047; color: #7f1d1d; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.flow-badge.tsd-ico { background: var(--tint); color: var(--navy); }
.flow-arrows { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 220px; max-width: 360px; }
.flow-arrows.short { min-width: 130px; max-width: 180px; }
.flow-arrow { position: relative; font-size: 12.5px; font-weight: 600; color: var(--navy); text-align: center; padding-bottom: 8px; }
.flow-arrow::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--blue); }
.flow-arrow::before { content: ""; position: absolute; bottom: -4px; width: 0; height: 0; border: 5px solid transparent; }
.flow-arrow.right::before, .flow-arrow.both::before { right: -2px; border-left-color: var(--blue); }
.flow-arrow.left::before { left: -2px; border-right-color: #16a34a; }
.flow-arrow.left::after { background: #16a34a; }

.login { white-space: nowrap; }
@media (max-width: 420px) {
  .topbar .brand > span { display: none; }
}

/* RDesk: службы */
.depts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dept { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 15px; }
.dept-own { grid-column: 1 / -1; justify-content: center; border-style: dashed; color: var(--muted); font-weight: 600; background: transparent; }
@media (max-width: 420px) { .depts { grid-template-columns: minmax(0, 1fr); } }

/* Наши проекты */
.projects { margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.site-ainventory .project, .site-rdesk .project { background: #fff; }
.project.is-here { border: 2px solid var(--blue); }
.project-head { display: flex; align-items: center; gap: 12px; width: 100%; }
.project-head b { font-size: 22px; letter-spacing: -0.01em; }
.project-here { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--blue); background: var(--tint); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.project p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--muted); }
.project .btn { height: 44px; font-size: 15px; padding: 0 18px; margin-top: auto; }
.project-ainventory .btn-blue { background: #1e40af; }
.project-rdesk .btn-blue { background: #1d4ed8; }
@media (max-width: 760px) { .projects { grid-template-columns: minmax(0, 1fr); } .project { padding: 20px; } }

/* Макет админки */
.adm-grid { display: grid; grid-template-columns: 1.6fr 1.3fr 1fr 0.7fr 0.7fr 0.7fr 0.7fr 1.1fr; gap: 10px; padding: 12px 18px; align-items: center; }
.cards3.compact .feat { min-height: 0; }

/* Марки ТСД */
.brands { margin-top: 32px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.brand-cell { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 10px; text-align: center; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand-cell.muted { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.catalog.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }

@media (max-width: 1080px) {
  .inv-hero { grid-template-columns: minmax(0, 1fr); }
  .inv-hero-devices { height: 580px; max-width: 520px; width: 100%; margin: 0 auto; }
  .brands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .inv-hero { padding-top: 36px; padding-bottom: 48px; gap: 28px; }
  .inv-hero-devices { height: auto; display: flex; justify-content: center; }
  .inv-tsd.back { display: none; }
  .inv-tsd.front { position: static; animation: none; }
  .tsd { width: 280px; }
  .brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eq-grid { grid-template-columns: 80px minmax(0, 1fr); }
  .eq-grid > :nth-child(3) { grid-column: 2; }
  .eq-cols > :nth-child(3) { display: none; }
  .rp-grid { grid-template-columns: 42px 50px minmax(0, 1fr); }
  .rp-grid > :nth-child(3), .rp-grid > :nth-child(4) { display: none; }
  .tg-feed { height: 520px; font-size: 13px; }
  .flow { flex-direction: column; }
  .flow-arrows, .flow-arrows.short { width: 100%; max-width: none; }
  .footer-more { flex-direction: column; align-items: flex-start; }
}
