@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root { color-scheme: light; --ink: #111827; --muted: #64748b; --line: #dfe3e8; --accent: #2563eb; }
html { background: #f5f6f8; }
body { font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: var(--ink); letter-spacing: -.01em; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: #bfdbfe; color: #172554; }

.hero-grid { background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(to bottom, #000 15%, transparent 95%); opacity: .7; }
.app-header { border-bottom: 1px solid rgba(255,255,255,.1); background: rgba(2,6,23,.82); backdrop-filter: blur(16px); }
.brand-mark { display: grid; width: 2.1rem; height: 2.1rem; place-items: center; border: 1px solid rgba(147,197,253,.25); border-radius: .5rem; background: #1d4ed8; font-size: .68rem; font-weight: 800; letter-spacing: .04em; box-shadow: 0 8px 24px -12px rgba(37,99,235,.8); }
.top-nav { align-items: center; gap: .2rem; border: 1px solid rgba(255,255,255,.08); border-radius: .55rem; padding: .2rem; background: rgba(255,255,255,.035); }
.top-nav a { border-radius: .38rem; padding: .45rem .72rem; font-size: .72rem; font-weight: 600; color: #cbd5e1; transition: .15s ease; }
.top-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.top-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.status-dot { width: .42rem; height: .42rem; border-radius: 999px; background: #34d399; }
.page-eyebrow { font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #93c5fd; }
.surface { border: 1px solid var(--line); border-radius: 1rem; background: #fff; box-shadow: 0 16px 44px -34px rgba(15,23,42,.45); }
.btn-primary { border-radius: .55rem; background: #2563eb; color: #fff; box-shadow: 0 7px 18px -12px rgba(37,99,235,.9); transition: .15s ease; }
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { cursor: not-allowed; opacity: .55; }
.step { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid #bfdbfe; border-radius: .5rem; background: #eff6ff; color: #1d4ed8; font-size: .65rem; font-weight: 800; letter-spacing: .04em; }
.field > span, .field-label { display: block; margin-bottom: .45rem; font-size: .7rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; color: #475569; }
.field-label { margin-bottom: 0; }
.field input, .field textarea { width: 100%; border: 1px solid #d7dde5; border-radius: .5rem; background: #fff; padding: .72rem .85rem; font-size: .84rem; line-height: 1.5; outline: none; transition: .15s; }
.field input:hover, .field textarea:hover { border-color: #b8c1cd; }
.field input:focus, .field textarea:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px #dbeafe; }
.field input:disabled, .field textarea:disabled { cursor: not-allowed; background: #f8fafc; color: #64748b; }
.field small { display: block; margin-top: .4rem; color: #94a3b8; font-size: .68rem; }
.tag-editor { display: flex; min-height: 3.3rem; max-height: 12rem; width: 100%; flex-wrap: wrap; align-content: flex-start; align-items: center; gap: .45rem; overflow-y: auto; border: 1px solid #d7dde5; border-radius: .5rem; background: #fff; padding: .55rem .65rem; cursor: text; transition: .15s; }
.tag-editor:hover { border-color: #b8c1cd; }
.tag-editor:focus-within { border-color: #3b82f6; box-shadow: 0 0 0 3px #dbeafe; }
.tag-editor input { min-width: 13rem; flex: 1 1 13rem; border: 0; background: transparent; padding: .25rem .15rem; font-size: .84rem; line-height: 1.5; outline: 0; }
.tag-chip { display: inline-flex; max-width: 100%; align-items: center; gap: .35rem; border: 1px solid #bfdbfe; border-radius: .4rem; background: #eff6ff; padding: .3rem .38rem .3rem .55rem; color: #1e40af; font-size: .76rem; font-weight: 600; line-height: 1.25; }
.tag-chip span { overflow: hidden; text-overflow: ellipsis; }
.tag-chip button { display: grid; width: 1.15rem; height: 1.15rem; flex: 0 0 auto; place-items: center; border-radius: .25rem; color: #64748b; font-size: .95rem; line-height: 1; }
.tag-chip button:hover { background: #dbeafe; color: #1e3a8a; }
.tag-clear { font-size: .68rem; font-weight: 600; color: #94a3b8; transition: .15s; }
.tag-clear:hover { color: #dc2626; }
.check { display: flex; align-items: flex-start; gap: .7rem; border: 1px solid #dfe3e8; border-radius: .55rem; padding: .8rem .9rem; cursor: pointer; transition: .15s; }
.check:hover { border-color: #bfdbfe; background: #f8fbff; }
.check input { margin-top: .2rem; width: 1rem; height: 1rem; accent-color: #2563eb; }
.check b, .check small { display: block; font-size: .8rem; }
.check small { color: #94a3b8; margin-top: .15rem; }
.tab { border-radius: .4rem; padding: .5rem .75rem; font-size: .72rem; font-weight: 600; color: #64748b; transition: .15s; }
.tab.active { background: #fff; color: #172033; box-shadow: 0 1px 4px rgba(15,23,42,.1); }
.results-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; border: 1px solid #e2e8f0; border-radius: .7rem; background: #f8fafc; padding: .55rem; }
.table-filter { display: flex; min-width: 14rem; flex: 0 1 19rem; align-items: center; gap: .5rem; border: 1px solid #d7dde5; border-radius: .5rem; background: #fff; padding: .46rem .65rem; color: #94a3b8; transition: .15s; }
.table-filter:focus-within { border-color: #3b82f6; box-shadow: 0 0 0 3px #dbeafe; color: #2563eb; }
.table-filter svg { width: 1rem; height: 1rem; flex: 0 0 auto; }
.table-filter input { min-width: 0; width: 100%; border: 0; background: transparent; color: #334155; font-size: .72rem; outline: 0; }
.loader { width: 2.4rem; height: 2.4rem; border: 3px solid #dbeafe; border-top-color: #2563eb; border-radius: 50%; animation: spin .8s linear infinite; }
.progress-line { width: 45%; animation: progress 1.8s ease-in-out infinite; }
.prompt-block { overflow: hidden; border: 1px solid #dfe3e8; border-radius: .65rem; background: #fff; }
.prompt-block summary { cursor: pointer; padding: 1rem 1.2rem; font-size: .8rem; font-weight: 700; color: #334155; user-select: none; }
.prompt-block pre { max-height: 28rem; overflow: auto; border-top: 1px solid #1e293b; background: #111827; padding: 1.2rem; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .72rem; line-height: 1.65; color: #cbd5e1; }
.tabulator { overflow: hidden; border: 1px solid #dfe3e8; border-radius: .7rem; background: #fff; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .76rem; color: #334155; }
.tabulator .tabulator-header { border-bottom: 1px solid #dfe3e8; background: #f8fafc; color: #64748b; font-size: .64rem; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.tabulator .tabulator-header .tabulator-col { border-right-color: #e8ecf1; background: #f8fafc; }
.tabulator .tabulator-header .tabulator-col:hover { background: #f1f5f9; }
.tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: .75rem .7rem; }
.tabulator .tabulator-row { min-height: 5.25rem; border-bottom-color: #edf0f3; background: #fff; }
.tabulator .tabulator-row:nth-child(even) { background: #fcfdff; }
.tabulator .tabulator-row:hover { background: #f6f9fd; box-shadow: inset 3px 0 #60a5fa; }
.tabulator .tabulator-row .tabulator-cell { display: inline-flex; align-items: center; border-right-color: #f0f2f5; padding: .72rem .75rem; line-height: 1.4; white-space: normal; }
.tabulator .tabulator-footer { border-top: 1px solid #dfe3e8; background: #f8fafc; padding: .55rem .7rem; color: #64748b; }
.tabulator .tabulator-footer .tabulator-page-size { border: 1px solid #cbd5e1; border-radius: .4rem; background: #fff; padding: .35rem 1.8rem .35rem .55rem; }
.tabulator .tabulator-footer .tabulator-page { min-width: 2rem; border: 1px solid #d7dde5; border-radius: .38rem; background: #fff; padding: .35rem .55rem; color: #475569; }
.tabulator .tabulator-footer .tabulator-page:hover { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.tabulator .tabulator-footer .tabulator-page.active { border-color: #2563eb; background: #2563eb; color: #fff; }
.tabulator .tabulator-placeholder { min-height: 9rem; color: #64748b; }
.table-decision { display: inline-flex; align-items: center; border-radius: 999px; padding: .3rem .55rem; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.table-decision--show { background: #ecfdf5; color: #047857; }
.table-decision--review { background: #fffbeb; color: #b45309; }
.table-decision--hide { background: #f1f5f9; color: #64748b; }
.table-tender { min-width: 0; width: 100%; }
.table-tender__title { display: -webkit-box; overflow: hidden; width: 100%; cursor: pointer; color: #172033; font-size: .79rem; font-weight: 650; line-height: 1.4; text-align: left; text-decoration: none; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.table-tender__title:hover { color: #1d4ed8; text-decoration: underline; text-decoration-color: #bfdbfe; text-underline-offset: 3px; }
.table-tender__meta { overflow: hidden; margin-top: .22rem; color: #94a3b8; font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.table-tender__reason { overflow: hidden; margin-top: .34rem; padding-left: .48rem; border-left: 2px solid #bfdbfe; color: #52637b; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.table-tender__reason::before { content: 'ИИ: '; color: #2563eb; font-weight: 700; }
.table-assessment { min-width: 0; width: 100%; }
.table-assessment__category { display: -webkit-box; overflow: hidden; color: #334155; font-size: .72rem; font-weight: 600; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.table-assessment__score { display: flex; align-items: center; gap: .5rem; margin-top: .45rem; color: #64748b; font-size: .66rem; font-weight: 700; }
.table-assessment__track { display: block; width: 4rem; height: .25rem; overflow: hidden; border-radius: 99px; background: #e2e8f0; }
.table-assessment__track > span { display: block; height: 100%; border-radius: inherit; background: #3b82f6; }
.table-eye { display: grid; width: 2rem; height: 2rem; place-items: center; border: 1px solid #d7dde5; border-radius: .5rem; background: #fff; color: #64748b; transition: .15s; }
.table-eye:hover { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.table-eye svg { width: 1rem; height: 1rem; }
.purchase-drawer-panel { animation: drawer-in .2s ease-out; }
.detail-hero { overflow: hidden; border: 1px solid #dbeafe; border-radius: .9rem; background: linear-gradient(135deg, #eff6ff 0%, #fff 58%, #f8fafc 100%); padding: 1.35rem; }
.detail-badge { display: inline-flex; align-items: center; border: 1px solid #dbeafe; border-radius: 999px; background: #fff; padding: .3rem .6rem; color: #1d4ed8; font-size: .68rem; font-weight: 700; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.detail-action { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid #cbd5e1; border-radius: .5rem; background: #fff; padding: .55rem .75rem; color: #334155; font-size: .72rem; font-weight: 700; transition: .15s; }
.detail-action:hover { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.detail-metric { min-width: 0; border: 1px solid #e2e8f0; border-radius: .7rem; background: #fff; padding: .9rem 1rem; }
.detail-metric__label { color: #94a3b8; font-size: .62rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.detail-metric__value { margin-top: .3rem; overflow-wrap: anywhere; color: #1e293b; font-size: .79rem; font-weight: 650; line-height: 1.45; }
.detail-section { margin-top: 1rem; overflow: hidden; border: 1px solid #e2e8f0; border-radius: .8rem; background: #fff; }
.detail-section__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #eef2f7; padding: .9rem 1rem; }
.detail-section__title { color: #1e293b; font-size: .78rem; font-weight: 750; }
.detail-section__count { border-radius: 999px; background: #f1f5f9; padding: .2rem .5rem; color: #64748b; font-size: .62rem; font-weight: 700; }
.detail-section__body { padding: 1rem; }
.detail-document { display: flex; min-width: 0; align-items: center; gap: .8rem; border: 1px solid #e2e8f0; border-radius: .65rem; padding: .75rem; transition: .15s; }
.detail-document:hover { border-color: #93c5fd; background: #f8fbff; }
.detail-document__icon { display: grid; width: 2.35rem; height: 2.35rem; flex: 0 0 auto; place-items: center; border-radius: .5rem; background: #eff6ff; color: #1d4ed8; font-size: .62rem; font-weight: 800; }
.detail-document__name { overflow: hidden; color: #334155; font-size: .73rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.detail-document__note { margin-top: .18rem; color: #94a3b8; font-size: .62rem; }
.detail-lot { border: 1px solid #e2e8f0; border-radius: .7rem; background: #fff; }
.detail-lot > summary { display: flex; cursor: pointer; list-style: none; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem; }
.detail-lot > summary::-webkit-details-marker { display: none; }
.detail-lot[open] > summary { border-bottom: 1px solid #eef2f7; background: #f8fafc; }
.detail-lot__body { padding: 1rem; }
.detail-object { border-left: 2px solid #bfdbfe; padding: .45rem 0 .45rem .75rem; }
.detail-object + .detail-object { margin-top: .7rem; }
.detail-code { display: inline-flex; margin: .25rem .3rem 0 0; border-radius: .35rem; background: #f1f5f9; padding: .22rem .4rem; color: #52637b; font-size: .62rem; }
.detail-copy { color: #475569; font-size: .73rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-empty { border: 1px dashed #cbd5e1; border-radius: .65rem; padding: 1.2rem; text-align: center; color: #94a3b8; font-size: .72rem; }
.detail-raw { max-height: 26rem; overflow: auto; border-radius: .6rem; background: #0f172a; padding: 1rem; color: #cbd5e1; font-size: .66rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .results-toolbar { align-items: stretch; }
  .results-toolbar > * { width: 100%; }
  .table-filter { flex-basis: 100%; }
  #tabs { overflow-x: auto; }
  .tab { flex: 1 0 auto; }
  .detail-grid { grid-template-columns: 1fr; }
}
* { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes progress { 0% { transform: translateX(-110%); } 100% { transform: translateX(330%); } }
@keyframes drawer-in { from { opacity: .7; transform: translateX(2rem); } to { opacity: 1; transform: translateX(0); } }
