:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #343a40; background: #f1f3f5; font-synthesis: none;
  --accent: #079c70; --dark: #30353c; --muted: #747d88; --border: #dfe3e8;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, nav a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #16ae83; outline-offset: 3px; }
aside { background: var(--dark); color: #fff; padding: 22px max(24px, calc((100vw - 1220px) / 2)); display: flex; align-items: center; gap: 32px; box-shadow: 0 2px 8px #151b2220; }
.brand { font-size: 25px; font-weight: 700; white-space: nowrap; }
.mark { color: #fff; margin-right: 8px; font-size: 30px; vertical-align: middle; }
.brand-sub { display: block; color: #cbd0d7; font-size: 10px; letter-spacing: 2px; margin: 5px 0 0 41px; }
nav { display: flex; flex-wrap: wrap; gap: 5px; margin-left: auto; }
nav a { display: block; padding: 12px; border-radius: 6px; font-size: 13px; color: #e1e5e9; }
nav a:hover, nav a.active { color: #fff; background: #555f6d; }
.aside-bottom { flex-shrink: 0; }
.link { background: transparent; border: 1px solid #69717b; color: #fff; padding: 10px 12px; font-size: 12px; }
main { max-width: 1268px; margin: auto; padding: 0 24px; }
header { min-height: 75px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 30px; font-size: 10px; letter-spacing: 1px; color: var(--muted); }
header > span:first-child { overflow-wrap: anywhere; }
.status { color: #138665; white-space: nowrap; }
.eyebrow { font-size: 11px; letter-spacing: 1.6px; color: var(--muted); margin: 24px 0 12px; font-weight: 600; }
h1 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.2; letter-spacing: -1px; margin: 0 0 14px; font-weight: 650; overflow-wrap: anywhere; }
h2 { font-size: 21px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.dot { color: var(--accent); }
p { line-height: 1.65; color: var(--muted); overflow-wrap: anywhere; }
.subtitle { font-size: 14px; margin: 0 0 28px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 7px; padding: 25px; box-shadow: 0 3px 14px #242c3706; min-width: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 22px; }
.org-card { transition: border-color .15s; }
.org-card:hover { border-color: #87939f; }
.card-top, .card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.org-icon { display: grid; place-items: center; background: #def4eb; color: #078b63; width: 42px; height: 42px; border-radius: 6px; font-size: 26px; }
.tag { display: inline-block; font-size: 11px; border-radius: 5px; padding: 7px 9px; background: #def4eb; color: #087c5b; }
.guid { font-size: 12px; overflow-wrap: anywhere; }
.progress { margin: 24px 0 16px; }
progress { display: block; width: 100%; height: 6px; border: 0; background: #e9edf0; accent-color: var(--accent); border-radius: 6px; }
progress::-webkit-progress-bar { background: #e9edf0; border-radius: 6px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 6px; }
.card-footer { color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.card-footer strong { color: #4e5865; }
.scan-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
.scan-grid .panel > h2:first-child { margin-top: 0; }
label { display: block; font-size: 14px; font-weight: 600; margin: 20px 0 12px; }
input { display: block; width: 100%; font-size: 16px; line-height: 1.4; color: #343a40; padding: 13px 14px; min-height: 48px; border: 1px solid #ccd2d9; border-radius: 6px; background: #fff; margin-top: 9px; }
input:focus { outline: 2px solid #83cdb6; outline-offset: 1px; border-color: #239d78; }
button { border: 0; background: #555f6d; color: #fff; padding: 13px 18px; min-height: 46px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; line-height: 1.4; overflow-wrap: anywhere; }
button:hover { background: #444e5b; }
button:disabled { cursor: wait; opacity: .6; }
#scan-form > button { width: 100%; background: var(--accent); }
#scan-form > button:hover { background: #087f5d; }
.hint { font-size: 13px; }
.section-title { margin-top: 32px; }
.table-wrap { padding: 0; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 14px; }
th { background: #f7f8fa; color: #6e7884; padding: 16px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
td { padding: 16px; border-top: 1px solid #e9edf0; overflow-wrap: anywhere; }
small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.negative { color: #d34657; }
.secondary { color: #4f5967; background: #edf0f3; border: 1px solid #d5dce3; }
.secondary:hover { background: #e0e5ea; }
.muted { color: var(--muted); }
.notice { padding: 16px 20px; border-radius: 6px; margin-bottom: 24px; color: #087b59; background: #def4eb; overflow-wrap: anywhere; }
.error { color: #b43249; background: #fce4e8; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 25px; }
.metrics span { font-size: 13px; color: var(--muted); }
.metrics strong { display: block; font-size: 34px; font-weight: 600; margin-top: 8px; }
.toolbar { display: flex; gap: 24px; align-items: center; margin-bottom: 20px; }
.toolbar > input { max-width: 480px; margin: 0; }
.check { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 400; min-height: 44px; }
.check input { width: 22px; height: 22px; min-height: 0; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.danger { background: #cc485b; }
.danger:hover { background: #b43648; }
.danger-panel { border-top: 3px solid #e79ba7; }
.danger-panel button { width: 100%; }
.empty { text-align: center; padding: 40px; color: var(--muted); }
.login { max-width: 490px; margin: 45px auto; }
.login button { margin-top: 10px; width: 100%; }
footer { display: flex; justify-content: space-between; gap: 15px; padding-top: 20px; margin: 55px 0 25px; border-top: 1px solid var(--border); font-size: 10px; letter-spacing: 1px; color: var(--muted); }
.camera-controls { display: grid; gap: 10px; margin-top: 14px; }
.camera-button { width: 100%; background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.camera-button:hover { background: #087f5d; }
input[readonly] { background: #f5f7f8; color: #555f6d; }
.camera-button span { font-size: 20px; vertical-align: middle; margin-right: 5px; }
.camera-panel { margin-top: 14px; border: 1px solid var(--border); border-radius: 6px; padding: 10px; background: #f7f8fa; }
.camera-preview { position: relative; border-radius: 5px; overflow: hidden; background: #20252b; aspect-ratio: 4 / 3; }
.camera-preview video { display: block; width: 100%; height: 100%; object-fit: cover; }
.camera-target { position: absolute; pointer-events: none; left: 8%; right: 8%; top: 28%; bottom: 28%; border: 2px solid #73e5bc; border-radius: 5px; box-shadow: 0 0 0 100vmax #0003; }
.camera-panel button { width: 100%; margin-top: 10px; }
[hidden] { display: none !important; }
@media (max-width: 1050px) {
  aside { flex-wrap: wrap; gap: 18px; padding: 20px 24px; }
  nav { order: 3; width: 100%; margin: 0; }
  .aside-bottom { margin-left: auto; }
  .scan-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  main { padding: 0 16px; }
  aside { padding: 16px; gap: 14px; }
  .brand { font-size: 22px; }
  .brand-sub { font-size: 9px; letter-spacing: 1.2px; }
  .link { font-size: 0; min-width: 52px; padding: 10px; white-space: nowrap; }
  .link::after { content: 'Выйти'; font-size: 11px; }
  nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  nav a { font-size: 12px; padding: 12px 9px; border: 1px solid #555d67; text-align: center; }
  header { min-height: 58px; margin-bottom: 24px; font-size: 9px; }
  .status { display: none; }
  h1 { font-size: 29px; letter-spacing: -.6px; }
  .subtitle { margin-bottom: 23px; }
  .scan-grid { grid-template-columns: 1fr; gap: 18px; }
  .panel { padding: 20px; }
  .metrics { gap: 8px; }
  .metrics .panel { padding: 14px 10px; }
  .metrics span { font-size: 11px; }
  .metrics strong { font-size: 27px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .toolbar > input { max-width: none; }
  .empty { padding: 28px 18px; }
  .table-wrap { padding: 0; overflow: visible; border: 0; box-shadow: none; background: transparent; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px; margin-bottom: 12px; background: #fff; border: 1px solid var(--border); border-radius: 7px; }
  td { display: block; border: 0; padding: 0; min-width: 0; text-align: left !important; }
  td::before { content: attr(data-label); display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 400; }
  td:first-child { grid-column: 1 / -1; }
  td:first-child strong { font-size: 16px; }
  .empty-row { display: block; }
  .empty-row td::before { display: none; }
  footer { margin-top: 35px; font-size: 9px; }
  footer span { display: none; }
  .login { margin: 25px auto; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
