:root{
  --bg:#EEF2EC; --surface:#FFFFFF; --ink:#1C2A22; --muted:#68786D;
  --accent:#2F6B4F; --accentSoft:#E4EEE6; --line:#D9E1D8;
  --shadow:0 1px 2px rgba(28,42,34,.06),0 8px 24px rgba(28,42,34,.06);
  --danger:#a23b3b; --dangerSoft:#fbe8e6; --violet:#6a4a8a; --violetSoft:#eae2f2;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
body{margin:0 auto;background:var(--bg);color:var(--ink);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  font-size:17px;line-height:1.45;padding:20px 16px 56px;max-width:560px}
body.wide{max-width:860px}
a{color:var(--accent)}
h1{font-size:20px;margin:0 0 4px}
h2{font-size:16px;margin:26px 0 10px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.sub{color:var(--muted);font-size:14px;margin:0 0 20px}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* формы */
label{display:block;font-size:14px;font-weight:600;color:var(--muted);margin:0 0 7px}
.field{margin-bottom:16px}
input,textarea,select{width:100%;font:inherit;font-size:17px;color:var(--ink);background:var(--surface);
  border:1.5px solid var(--line);border-radius:12px;padding:13px 14px;outline:none;box-shadow:var(--shadow)}
input[type=text],input[type=password]{font-weight:600}
textarea{min-height:120px;resize:vertical;line-height:1.5;font-weight:400}
input:focus,textarea:focus,select:focus{border-color:var(--accent)}
.hint{font-size:13px;color:var(--muted);margin-top:6px;line-height:1.4}
.trap{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}

.streams{display:flex;flex-direction:column;gap:9px;margin-bottom:6px}
.stream,.check{display:flex;gap:11px;align-items:flex-start;background:var(--surface);
  border:1.5px solid var(--line);border-radius:12px;padding:13px 14px;box-shadow:var(--shadow);cursor:pointer}
.stream input,.check input{width:22px;height:22px;flex:0 0 auto;margin-top:1px}
.stream .t{font-size:15px;font-weight:700}
.stream .d{font-size:13px;color:var(--muted);font-weight:400}
.stream:has(input:checked){border-color:var(--accent);background:var(--accentSoft)}
.check{margin:18px 0}
.check .t{font-size:14px;font-weight:600;line-height:1.4}

.submit{width:100%;background:var(--accent);color:#fff;font:inherit;font-size:19px;font-weight:700;
  border:0;border-radius:14px;padding:16px;cursor:pointer;box-shadow:var(--shadow);margin-top:4px}
.btn{display:inline-block;background:var(--surface);border:1.5px solid var(--line);border-radius:10px;
  padding:9px 14px;font-size:14px;font-weight:600;color:var(--ink);text-decoration:none;cursor:pointer;font-family:inherit}
.btn.primary{background:var(--accent);color:#fff;border-color:var(--accent)}
.btn.danger{color:var(--danger);border-color:#e8cfcd}
.btnrow{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}

/* сообщения */
.err,.ok{border-radius:12px;padding:12px 14px;margin-bottom:16px;font-size:15px;font-weight:600}
.err{background:var(--dangerSoft);color:var(--danger)}
.ok{background:var(--accentSoft);color:var(--accent)}
.thanks{background:var(--accentSoft);border-radius:16px;padding:24px;text-align:center;margin-bottom:18px}
.thanks .big{font-size:26px;font-weight:800;margin:4px 0}
.code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:700;letter-spacing:.06em}

/* карточки */
.card{background:var(--surface);border-radius:16px;padding:18px;box-shadow:var(--shadow);margin-bottom:14px}
.card .top{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.card .name{font-weight:800;font-size:17px}
.card .when{font-size:12px;color:var(--muted);white-space:nowrap}
.card .meta{font-size:13px;color:var(--muted);margin-top:4px}
.card .want{margin-top:10px;font-size:15px;line-height:1.5;white-space:pre-wrap;word-break:break-word}
.card .want a{word-break:break-all}
.card a.plain{text-decoration:none;color:inherit;display:block}

.tag{display:inline-block;font-size:12px;font-weight:700;padding:2px 9px;border-radius:20px;margin-left:6px;white-space:nowrap}
.tag.p{background:var(--accentSoft);color:var(--accent)}
.tag.s{background:var(--violetSoft);color:var(--violet)}
.tag.g{background:#eceff0;color:#4a5a63}
.tag.new{background:var(--accent);color:#fff}

/* навигация и таблицы */
.nav{display:flex;gap:14px;flex-wrap:wrap;font-size:14px;font-weight:600;margin-bottom:18px}
.nav a{text-decoration:none}
.nav a.on{color:var(--ink)}
.navlink{font-size:13px;color:var(--muted);margin-top:24px;display:block;text-align:center}
.banner{background:var(--surface);border:1.5px solid var(--line);border-radius:12px;padding:12px 14px;
  font-size:14px;color:var(--muted);margin-bottom:16px;box-shadow:var(--shadow)}
.filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.filters select,.filters input{width:auto;flex:1 1 130px;font-size:15px;padding:9px 11px}

.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;margin-bottom:8px}
.kpi{background:var(--surface);border-radius:14px;padding:14px;box-shadow:var(--shadow)}
.kpi .v{font-size:24px;font-weight:800;line-height:1.1}
.kpi .l{font-size:12px;color:var(--muted);margin-top:3px}

table{width:100%;border-collapse:collapse;background:var(--surface);border-radius:14px;
  box-shadow:var(--shadow);overflow:hidden;font-size:14px}
th,td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line)}
th{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:700}
tr:last-child td{border-bottom:0}
td.num,th.num{text-align:right;white-space:nowrap}

.spark{display:flex;align-items:flex-end;gap:2px;height:64px;background:var(--surface);
  border-radius:14px;padding:10px;box-shadow:var(--shadow)}
.spark i{flex:1;background:var(--accentSoft);border-radius:2px;min-height:2px}
.spark i.has{background:var(--accent)}

.log{font-size:13px;color:var(--muted);line-height:1.6}
.log b{color:var(--ink);font-weight:600}

/* прикрепление фото */
.drop{position:relative;background:var(--surface);border:2px dashed var(--line);border-radius:14px;
  padding:26px 16px;box-shadow:var(--shadow);text-align:center;
  transition:border-color .15s,background .15s,transform .15s}
.drop.armed{border-color:#b7cbbc}
.drop.over{border-color:var(--accent);border-style:solid;background:var(--accentSoft);transform:scale(1.01)}
.drop.over .drop-cloud{transform:translateY(-3px)}
.drop.full{opacity:.75}
.drop.full .drop-btn{pointer-events:none;opacity:.5}

.drop-cloud{width:40px;height:40px;margin:0 auto 12px;border-radius:50%;background:var(--accentSoft);
  color:var(--accent);font-size:22px;line-height:40px;font-weight:400;transition:transform .15s}
.drop-btn{display:inline-block;background:var(--accent);color:#fff;border-radius:12px;
  padding:12px 22px;font-size:16px;font-weight:700;cursor:pointer;margin:0;
  box-shadow:var(--shadow);transition:filter .12s}
.drop-btn:hover{filter:brightness(1.07)}
/* поле выбора файла спрятано, поэтому фокус с клавиатуры показываем на кнопке */
.drop input:focus-visible + .drop-btn{outline:2px solid var(--ink);outline-offset:2px}
.drop-hint{font-size:13px;color:var(--muted);margin-top:10px;line-height:1.45}
.drop-hint kbd{font:inherit;font-weight:700;color:var(--ink);background:var(--bg);
  border:1px solid var(--line);border-radius:5px;padding:1px 5px}
.hint-err{color:var(--danger);font-weight:600}

/* пока тащат файл — зона перекрывается подсказкой целиком */
.drop-over-veil{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:12px;display:none;
  align-items:center;justify-content:center;font-size:16px;font-weight:700;
  color:var(--accent);background:var(--accentSoft);pointer-events:none}
.drop.over .drop-over-veil{display:flex}

/* список прикреплённого: миниатюра + имя файла */
.shots{display:flex;flex-direction:column;gap:6px;margin-top:14px;text-align:left}
.shots:empty{margin-top:0}
.shot{display:flex;align-items:center;gap:10px;background:var(--bg);border-radius:10px;padding:6px 8px}
.shot-pic{flex:0 0 auto;width:40px;height:40px;border-radius:7px;background-size:cover;
  background-position:center;border:1px solid var(--line);background-color:var(--surface)}
.shot-meta{flex:1 1 auto;min-width:0}
.shot-name{font-size:13px;font-weight:600;line-height:1.25;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shot-sub{font-size:12px;color:var(--muted);line-height:1.3}
.shot-x{flex:0 0 auto;width:28px;height:28px;border-radius:8px;border:0;background:transparent;
  color:var(--muted);font-size:19px;line-height:1;cursor:pointer;padding:0}
.shot-x:hover{background:var(--dangerSoft);color:var(--danger)}
.shot.loading .shot-pic{animation:pulse 1s ease-in-out infinite}
.shot.loading .shot-sub{color:var(--accent)}
.shot.failed .shot-pic{opacity:.4;border-color:var(--danger)}
.shot.failed .shot-sub{color:var(--danger)}
@keyframes pulse{0%,100%{opacity:.45}50%{opacity:1}}

.gallery{display:flex;flex-wrap:wrap;gap:10px}
.gshot{width:110px;height:110px;border-radius:12px;background-size:cover;background-position:center;
  box-shadow:var(--shadow);border:1.5px solid var(--line);display:block}

/* прикидка суммы — необязательный блок, поэтому отделён от основной формы */
.estimate{background:var(--surface);border:1.5px solid var(--line);border-radius:16px;
  padding:16px 16px 4px;box-shadow:var(--shadow);margin:26px 0 18px}
.est-head{display:flex;align-items:center;gap:9px;margin-bottom:6px}
.est-title{font-size:16px;font-weight:800}
.est-opt{font-size:12px;font-weight:700;color:var(--muted);background:var(--bg);
  border-radius:20px;padding:2px 9px}
.est-lead{font-size:13px;color:var(--muted);line-height:1.45;margin:0 0 16px}
.estimate select{font-weight:600;background-repeat:no-repeat;background-position:right 14px center;
  padding-right:44px;appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%232F6B4F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 8l5 5 5-5'/></svg>")}

.est-result{background:var(--accentSoft);border-radius:14px;padding:16px;margin:4px 0 16px;
  font-variant-numeric:tabular-nums}
.est-cap{font-size:13px;font-weight:700;color:var(--accent)}
.est-big{font-size:36px;font-weight:800;letter-spacing:-.02em;line-height:1.1;margin-top:2px}
.est-big small{font-size:20px;font-weight:700}
.est-rows{margin-top:12px;border-top:1px solid rgba(47,107,79,.18);padding-top:10px;
  font-size:14px;color:#3a4c41}
.est-rows div{display:flex;justify-content:space-between;gap:12px;padding:2px 0}
.est-rows b{font-weight:700;color:var(--ink)}
.est-note{font-size:12.5px;line-height:1.45;color:#3a4c41;margin:12px 0 0;
  border-top:1px solid rgba(47,107,79,.18);padding-top:10px}
