:root {
  --g: #2f9e5f;
  --g2: #166534;
  --g3: #14532d;
  --ink: #122017;
  --mute: #5c6b62;
  --line: #dce6df;
  --paper: #f7faf7;
  --card: #fff;
  --red: #b42318;
  --blue: #2563eb;
  --orange: #c2410c;
  --shadow: 0 18px 50px rgba(20, 83, 45, .12);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%; color: var(--ink);
  font-family: Manrope, system-ui, sans-serif;
  background:
    radial-gradient(900px 420px at 8% -10%, #c9ead4 0%, transparent 55%),
    radial-gradient(700px 380px at 110% 8%, #d7ecc4 0%, transparent 50%),
    #e7efe8;
}
#app {
  max-width: 440px; margin: 0 auto; min-height: 100vh;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(18,32,23,.06), var(--shadow);
  display: flex; flex-direction: column;
}
a { color: var(--g2); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.hero {
  background:
    linear-gradient(165deg, #166534 0%, #1d7a45 48%, #2f9e5f 100%);
  color: #fff; padding: 28px 22px 22px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -30px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.brand-row { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.mark {
  width: 36px; height: 36px; border-radius: 11px;
  background: rgba(255,255,255,.18); display: grid; place-items: center;
  font-size: 18px;
}
.brand-name { font-weight: 800; letter-spacing: .02em; }
.brand-sub { font-size: 12px; opacity: .8; }
.hero h1 { margin: 18px 0 8px; font-size: 26px; line-height: 1.15; letter-spacing: -.4px; position: relative; z-index: 1; }
.hero p { margin: 0; font-size: 14px; line-height: 1.45; opacity: .92; max-width: 34em; position: relative; z-index: 1; }

.art {
  margin-top: 18px; height: 92px; position: relative; z-index: 1;
}
.art svg { width: 100%; height: 92px; display: block; }

.pad { padding: 18px 20px 28px; }
.top {
  padding: 16px 18px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.top .who { font-size: 12px; color: var(--mute); font-weight: 600; }
.top h1 { margin: 2px 0 0; font-size: 18px; line-height: 1.25; }
.ghost {
  border: 0; background: #eef4f0; color: var(--ink);
  border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: 13px;
}
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.lab { font-size: 12px; font-weight: 800; color: var(--mute); margin: 0 0 6px; letter-spacing: .04em; text-transform: uppercase; }
.hint { color: var(--mute); font-size: 13px; line-height: 1.45; margin: 6px 0 0; }
.inp, select, textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px;
  font-size: 16px; background: #fff; color: var(--ink);
}
.inp:focus, select:focus, textarea:focus {
  outline: 2px solid #bbf7d0; border-color: var(--g);
}
textarea { min-height: 84px; resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px; border: 0; border-radius: 14px;
  background: var(--g); color: #fff; font-weight: 800; cursor: pointer;
  box-shadow: 0 8px 20px rgba(47,158,95,.28);
}
.btn:active { transform: translateY(1px); }
.btn.sec { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: #fff; color: var(--red); border: 1px solid #f1b4b0; box-shadow: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.err { color: var(--red); font-size: 13px; margin-top: 10px; font-weight: 600; }
.okbox { text-align: center; padding: 36px 22px 48px; }
.okbox .okmark {
  width: 72px; height: 72px; border-radius: 24px; margin: 0 auto 16px;
  background: #dcfce7; color: #166534; display: grid; place-items: center; font-size: 32px;
}
.okbox h2 { margin: 0 0 8px; font-size: 22px; }
.next { text-align: left; margin: 20px 0 24px; display: grid; gap: 10px; }

.steps { display: grid; gap: 10px; margin: 18px 0 22px; }
.step {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px;
}
.step .n {
  width: 36px; height: 36px; border-radius: 12px; background: #ecfdf3;
  color: var(--g2); font-weight: 800; display: grid; place-items: center;
}
.step b { display: block; font-size: 14px; }
.step span { font-size: 12px; color: var(--mute); line-height: 1.4; }

.block { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.block .lab { margin-top: 0; }

.card {
  border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 10px;
  background: #fff; cursor: pointer;
  box-shadow: 0 1px 0 rgba(18,32,23,.02);
}
.card:active { transform: scale(.995); }
.card.over { border-color: #f1b4b0; background: #fff8f8; }
.card .when { font-weight: 800; font-size: 16px; }
.card .addr { font-weight: 700; margin-top: 4px; }
.card .meta { font-size: 13px; color: var(--mute); margin-top: 4px; }
.card .why { font-size: 12px; color: var(--mute); margin-top: 8px; }

.pill { display: inline-block; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.pill.new { background: #eef1f0; color: #5b6560; }
.pill.accepted { background: #dbeafe; color: var(--blue); }
.pill.in_progress { background: #ffedd5; color: var(--orange); }
.pill.done, .pill.done_late { background: #dcfce7; color: #166534; }
.pill.cancelled { background: #f1f5f9; color: #64748b; }
.pill.rejected, .pill.wait { background: #fee2e2; color: var(--red); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 12px; font-weight: 700; cursor: pointer; font-size: 13px;
}
.chip.on { background: var(--g); color: #fff; border-color: var(--g); }
.chip:disabled, .chip.is-off { opacity: .45; cursor: not-allowed; background: #f4f4f2; color: #78716b; }
.badge { display: inline-block; background: #ecfdf3; color: var(--g2); font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 999px; }
.foot {
  position: sticky; bottom: 0;
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--paper) 18%);
}
.gal { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.gal img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; cursor: pointer; }
.banner { background: #fef2f2; color: var(--red); padding: 12px 14px; border-radius: 14px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
/* 21.11.2026: заявка не ушла — заметно, у самой кнопки, с причиной */
.sendfail { background: #fef2f2; border: 1px solid #f1b4b0; color: var(--red); padding: 12px 14px; border-radius: 14px; margin-bottom: 10px; box-shadow: 0 6px 18px rgba(180,35,24,.12); }
.sendfail b { display: block; font-size: 15px; margin-bottom: 4px; }
.sendfail span { display: block; font-size: 13px; font-weight: 600; line-height: 1.4; }
.okbox .okno { display: inline-block; font-size: 30px; font-weight: 800; letter-spacing: .02em; background: #ecfdf3; color: var(--g2); border-radius: 14px; padding: 6px 16px; margin: 6px 0 10px; }
.viewer { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: grid; place-items: center; z-index: 20; }
.viewer img { max-width: 96vw; max-height: 92vh; }

.empty {
  text-align: center; padding: 28px 8px 8px;
}
.empty svg { width: 140px; height: 88px; margin: 0 auto 12px; display: block; }
.empty h2 { margin: 0 0 8px; font-size: 20px; }
.empty p { margin: 0 0 18px; color: var(--mute); font-size: 14px; line-height: 1.5; }

.stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 12px 0 14px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px;
  text-align: center;
}
.stat b { display: block; font-size: 18px; }
.stat span { font-size: 11px; color: var(--mute); font-weight: 700; }

.tl { display: grid; gap: 0; margin: 8px 0 16px; }
.tl-item {
  display: grid; grid-template-columns: 18px 1fr; gap: 12px;
  position: relative; padding-bottom: 16px;
}
.tl-item::before {
  content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 2px; background: var(--line);
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item:last-child::before { display: none; }
.dot {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: #fff;
  margin-top: 1px;
}
.tl-item.on .dot { background: var(--g); border-color: var(--g); }
.tl-item.now .dot { box-shadow: 0 0 0 4px #dcfce7; }
.tl-item b { font-size: 14px; }
.tl-item span { display: block; font-size: 12px; color: var(--mute); }

.boot { padding: 80px 24px; text-align: center; color: var(--mute); }
.spin {
  width: 28px; height: 28px; border: 3px solid #dce6df; border-top-color: var(--g);
  border-radius: 50%; margin: 0 auto 12px; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .btn:active, .card:active { transform: none; }
  .spin { animation: none; }
}

.act-tile {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 56px; padding: 14px 16px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: 16px; background: #fff;
  text-align: left; box-shadow: 0 1px 0 rgba(18,32,23,.02);
}
.sil {
  width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0;
  background: #ecfdf3; color: var(--g2);
  display: grid; place-items: center;
}
.sil svg { width: 20px; height: 20px; display: block; fill: currentColor; }
.sil.sm { width: 28px; height: 28px; border-radius: 9px; }
.sil.sm svg { width: 15px; height: 15px; }
.type-list { display: grid; gap: 8px; }
.type-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 56px; padding: 10px 12px; text-align: left;
  border: 1px solid var(--line); border-radius: 14px; background: #fff;
}
.type-row b { font-size: 14px; font-weight: 800; line-height: 1.3; }
.type-row.on { border-color: var(--g); background: #ecfdf3; }
.type-row.on .sil { background: var(--g); color: #fff; }
.act-tile b { display: block; font-size: 16px; }
.act-tile small { display: block; color: var(--mute); font-size: 12px; margin-top: 2px; }
.hist-lab {
  margin: 18px 0 8px; font-size: 12px; font-weight: 800; color: var(--mute);
  letter-spacing: .04em; text-transform: uppercase; text-align: center;
}
.hist-link {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 10px 4px; font-weight: 700; color: var(--g2); min-height: 44px;
}
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1.5px dashed var(--line); border-radius: 14px; padding: 18px 12px;
  text-align: center; color: var(--mute); font-size: 13px; font-weight: 600;
}
.drop.over { border-color: var(--g); background: #ecfdf3; }
.previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.prev { position: relative; width: 72px; height: 72px; }
.prev img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.prev button {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px;
  border: 0; border-radius: 50%; background: #122017; color: #fff; font-size: 14px; line-height: 1;
}
.prev .st {
  position: absolute; left: 4px; bottom: 4px; background: rgba(18,32,23,.7); color: #fff;
  font-size: 11px; padding: 1px 5px; border-radius: 999px;
}
textarea.auto { overflow: hidden; }
