/* ФинСкан Веб — glass-стиль, единый с карточками бота */
:root {
  --txt: #ffffff;
  --txt2: rgba(255, 255, 255, .72);
  --txt3: rgba(255, 255, 255, .55);
  --mint: #78ffbe;
  --coral: #ff9187;
  --radius: 22px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--txt);
  background:
    radial-gradient(600px 500px at -10% 10%, rgba(64,220,156,.35), transparent 60%),
    radial-gradient(700px 600px at 105% 35%, rgba(36,190,210,.30), transparent 60%),
    radial-gradient(700px 600px at 15% 95%, rgba(255,214,120,.18), transparent 60%),
    linear-gradient(180deg, #108254 0%, #0a605c 55%, #07262c 100%);
  background-attachment: fixed;
  font-size: 16px; line-height: 1.55;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* шапка */
header { padding: 22px 0; }
header .wrap { display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 22px; color: var(--txt); text-decoration: none; }
.logo::before { content: ''; width: 26px; height: 26px; border-radius: 50%; background: #fff; }
nav { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
nav a {
  color: var(--txt2); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 8px 16px; border-radius: 12px; transition: .15s;
}
nav a:hover, nav a.active { color: var(--txt); background: rgba(255,255,255,.12); }

/* стекло */
.glass {
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.28);
  border-top-color: rgba(255,255,255,.45);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  padding: 26px;
}
.grid { display: grid; gap: 18px; }
.grid.cols2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) { .grid.cols2 { grid-template-columns: 1fr; } }

h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; line-height: 1.2; }
h2 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.muted { color: var(--txt2); }
.small { font-size: 14px; color: var(--txt3); }
.big-num { font-size: clamp(40px, 7vw, 64px); font-weight: 800; color: var(--mint);
  text-shadow: 0 0 34px rgba(120,255,190,.45); font-variant-numeric: tabular-nums; }

.btn {
  display: inline-block; background: #fff; color: #0a4632; font-weight: 700;
  padding: 13px 26px; border-radius: 14px; border: 0; cursor: pointer;
  text-decoration: none; font-size: 16px; transition: .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(0,0,0,.25); }
.btn.ghost { background: rgba(255,255,255,.14); color: var(--txt); border: 1px solid rgba(255,255,255,.3); }

main { padding: 28px 0 64px; }

/* отчёт */
.score-row { display: flex; align-items: center; gap: 18px; }
.bar-row { margin: 12px 0; }
.bar-label { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 5px; }
.bar-track { height: 26px; border-radius: 13px; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 13px; min-width: 26px; }
.bar-fill.c0 { background: #78ffbe; } .bar-fill.c1 { background: #6ecdff; }
.bar-fill.c2 { background: #ffcd73; } .bar-fill.c3 { background: #ff9187; }
.bar-fill.c4 { background: #c3a5ff; } .bar-fill.c5 { background: #a0ebd7; }
.bar-fill.unrec { background: rgba(255,255,255,.30); }
.sub-row { display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.14); }
.sub-row:last-child { border-bottom: 0; }
.warn { color: var(--coral); font-size: 13px; font-weight: 700; }
.mint { color: var(--mint); font-weight: 700; }
.rec { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.rec:last-child { border-bottom: 0; }
.chip { display: inline-block; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  padding: 5px 14px; border-radius: 99px; font-size: 14px; font-weight: 700; }
.chip.mint { color: var(--mint); }

/* архив */
.arch-row { display: flex; align-items: center; gap: 16px; padding: 15px 0; color: var(--txt);
  text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.12); flex-wrap: wrap; }
.arch-row:last-child { border-bottom: 0; }
.arch-row:hover { background: rgba(255,255,255,.06); }
.arch-bank { font-weight: 800; min-width: 56px; }

/* загрузка */
.file-input { color: var(--txt2); margin-right: 12px; max-width: 60%; }
.progress-line { display: flex; align-items: center; gap: 12px; color: var(--txt2); }
.spin { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.3);
  border-top-color: var(--mint); border-radius: 50%; animation: sp 0.9s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.error-box { color: var(--coral); font-weight: 600; }

/* чат ассистента */
#chat { max-height: 55vh; overflow-y: auto; padding: 8px; }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 16px; margin: 8px 0;
  white-space: pre-wrap; line-height: 1.5; }
.msg.user { margin-left: auto; background: rgba(255,255,255,.92); color: #0a4632;
  border-bottom-right-radius: 4px; font-weight: 500; }
.msg.assistant { background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.24);
  border-bottom-left-radius: 4px; }
.chat-form { display: flex; gap: 10px; margin-top: 14px; }
.chat-form input { flex: 1; padding: 13px 16px; border-radius: 14px; font-size: 16px;
  border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); color: var(--txt); }
.chat-form input::placeholder { color: var(--txt3); }
.chat-form input:focus { outline: 2px solid rgba(120,255,190,.5); }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: flex; }
footer { padding: 26px 0; color: var(--txt3); font-size: 14px; }
.login-hero { max-width: 520px; margin: 8vh auto; text-align: center; }
.login-hero .glass { padding: 40px 32px; }
.spacer { height: 18px; }
