/* Общие стили обеих поверхностей: ЛК подрядчика и панель ПТО.
   Сборки в проекте нет — файл подключается обычным <link> из lk.html и pto.html.
   Фирменные цвета ATAMŪRA: бирюза, золото, навы (как в MuraBoard). */

:root{
  --brand:#007484; --brand-dark:#005c69; --gold:#CFB372; --navy:#284157;
  --bg:#f4f6f8; --card:#fff; --ink:#1a2733; --muted:#64748b; --line:#e2e8f0;
  --ok:#0f7a4d; --ok-bg:#dcf5e8; --warn:#b45309; --warn-bg:#fef3c7;
  --bad:#c02626; --bad-bg:#fee2e2; --info:#1d5f95; --info-bg:#dbeafe;
  --neutral:#475569; --neutral-bg:#e6ebf0;
}
@media (prefers-color-scheme: dark){
  :root{ --bg:#101a22; --card:#1a2733; --ink:#e6edf3; --muted:#8fa3b5; --line:#2c3d4d;
         --ok:#6ee7a8; --ok-bg:#0d3d29; --warn:#fcd34d; --warn-bg:#4a2f08;
         --bad:#fca5a5; --bad-bg:#4c1616; --info:#93c5fd; --info-bg:#152f4d;
         --neutral:#cbd5e1; --neutral-bg:#2c3d4d; }
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
body{margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
     background:var(--bg); color:var(--ink); font-size:15px; line-height:1.45;}
.wrap{max-width:480px; margin:0 auto; min-height:100vh; padding-bottom:82px;}
header{position:sticky; top:0; z-index:30; background:var(--card);
       border-bottom:1px solid var(--line); padding:10px 16px; display:flex; align-items:center; gap:12px;}
.logo{width:38px;height:38px;border-radius:11px;background:linear-gradient(135deg,var(--brand),var(--brand-dark));
      display:flex;align-items:center;justify-content:center;color:var(--gold);font-weight:700;flex:none;}
.h-title{font-weight:650; font-size:14.5px; line-height:1.2;}
.h-sub{font-size:11.5px; color:var(--muted);}
.screen{display:none; padding:16px;} .screen.active{display:block;}
.card{background:var(--card); border:1px solid var(--line); border-radius:14px; padding:14px; margin-bottom:12px;}
.card.tight{padding:12px;}
h2{font-size:17px; margin:0 0 4px;} h3{font-size:14px; margin:0 0 8px;}
.muted{color:var(--muted); font-size:12.5px;}
.pill{display:inline-block; padding:3px 9px; border-radius:999px; font-size:11px; font-weight:600; white-space:nowrap;}
.tone-ok{background:var(--ok-bg); color:var(--ok);} .tone-warn{background:var(--warn-bg); color:var(--warn);}
.tone-bad{background:var(--bad-bg); color:var(--bad);} .tone-info{background:var(--info-bg); color:var(--info);}
.tone-neutral{background:var(--neutral-bg); color:var(--neutral);}
button{font:inherit; cursor:pointer; border:none;}
.btn{width:100%; padding:13px; border-radius:12px; background:var(--brand); color:#fff;
     font-weight:600; font-size:15px; transition:.15s;}
.btn:active{transform:scale(.98);} .btn:disabled{opacity:.45;}
.btn-ghost{background:transparent; color:var(--brand); border:1px solid var(--line);}
.btn-soft{background:var(--neutral-bg); color:var(--ink);}
.btn-ok{background:var(--ok);} .btn-bad{background:var(--bad);} .btn-warn{background:var(--warn);}
.btn-gold{background:var(--gold); color:var(--navy);}
.btn-sm{padding:9px 13px; font-size:13px; width:auto; border-radius:10px;}
label{display:block; font-size:12.5px; font-weight:600; color:var(--muted); margin:12px 0 5px;}
label .req{color:var(--bad);}
input,select,textarea{width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:10px;
  background:var(--bg); color:var(--ink); font:inherit; font-size:15px;}
input:focus,select:focus,textarea:focus{outline:2px solid var(--brand); outline-offset:-1px;}
textarea{min-height:80px; resize:vertical;}
.row2{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
.tiles{display:grid; grid-template-columns:1fr 1fr; gap:11px;}
.tile{background:var(--card); border:1px solid var(--line); border-radius:14px; padding:14px 13px;
      text-align:left; color:var(--ink); transition:.15s;}
.tile:active{transform:scale(.97);} .tile:disabled{opacity:.4;}
.tile .ic{font-size:23px; display:block; margin-bottom:7px;}
.tile .tt{font-weight:650; font-size:13.5px; line-height:1.25;}
.tile .ts{font-size:11px; color:var(--muted); margin-top:3px;}
.item{background:var(--card); border:1px solid var(--line); border-radius:13px; padding:12px;
      margin-bottom:9px; text-align:left; width:100%; color:var(--ink); display:block;}
.item:active{background:var(--bg);}
.item-top{display:flex; justify-content:space-between; align-items:flex-start; gap:8px; margin-bottom:5px;}
.item-no{font-size:11.5px; color:var(--muted); font-variant-numeric:tabular-nums;}
.item-title{font-weight:600; font-size:14px; line-height:1.3;}
.item-meta{font-size:11.5px; color:var(--muted); margin-top:5px; display:flex; gap:10px; flex-wrap:wrap;}
.chips{display:flex; gap:7px; overflow-x:auto; padding-bottom:4px; margin-bottom:12px;}
.chips::-webkit-scrollbar{display:none;}
.chip{padding:7px 13px; border-radius:999px; border:1px solid var(--line); background:var(--card);
      font-size:12.5px; white-space:nowrap; color:var(--ink);}
.chip.on{background:var(--brand); color:#fff; border-color:var(--brand);}
nav{position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:480px;
    background:var(--card); border-top:1px solid var(--line); display:flex; z-index:40;
    padding-bottom:env(safe-area-inset-bottom);}
nav button{flex:1; background:none; padding:9px 2px 11px; color:var(--muted); font-size:10.5px;
           display:flex; flex-direction:column; align-items:center; gap:3px; position:relative;}
nav button.on{color:var(--brand);} nav button .ic{font-size:18px;}
nav .badge{position:absolute; top:5px; right:50%; margin-right:-22px; background:var(--bad); color:#fff;
           border-radius:999px; font-size:9.5px; padding:1px 5px; font-weight:700;}
.kv{display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--line); font-size:13.5px;}
.kv:last-child{border-bottom:none;} .kv .k{color:var(--muted); flex:none;}
.kv .v{text-align:right; font-weight:500; word-break:break-word;}
.file{display:flex; align-items:center; gap:9px; padding:9px 0; border-bottom:1px solid var(--line); font-size:13px;}
.file:last-child{border-bottom:none;}
.file a{color:var(--brand); text-decoration:none; flex:1; word-break:break-all;}
.ev{padding:9px 0 9px 14px; border-left:2px solid var(--line); margin-left:3px; font-size:12.5px;}
.ev .who{font-weight:600; font-size:12px;} .ev .when{color:var(--muted); font-size:11px;}
.drop{border:1.5px dashed var(--line); border-radius:12px; padding:18px; text-align:center; color:var(--muted);
      font-size:13px; background:var(--bg);}
.drop.has{border-color:var(--brand); color:var(--brand);}
.empty{text-align:center; padding:44px 20px; color:var(--muted); font-size:13.5px;}
.empty .ic{font-size:36px; display:block; margin-bottom:10px; opacity:.5;}
.toast{position:fixed; left:50%; bottom:92px; transform:translateX(-50%); background:var(--navy); color:#fff;
  padding:11px 17px; border-radius:11px; font-size:13.5px; z-index:100; max-width:90%; text-align:center;
  opacity:0; transition:opacity .2s; pointer-events:none;}
.toast.show{opacity:.96;}
.back{background:none; color:var(--brand); font-size:14px; padding:0 0 10px;}
.spin{width:26px;height:26px;border:2.5px solid var(--line);border-top-color:var(--brand);border-radius:50%;
      animation:sp .7s linear infinite; margin:36px auto;}
@keyframes sp{to{transform:rotate(360deg)}}
.alert{border-radius:11px; padding:11px 13px; font-size:13px; margin-bottom:12px;}
.alert-warn{background:var(--warn-bg); color:var(--warn);}
.alert-info{background:var(--info-bg); color:var(--info);}
.alert-bad{background:var(--bad-bg); color:var(--bad);}
.alert-ok{background:var(--ok-bg); color:var(--ok);}

/* Чек-лист документов профиля */
.chk{display:flex; align-items:center; gap:10px; padding:11px 0; border-bottom:1px solid var(--line);}
.chk:last-child{border-bottom:none;}
.chk .mark{width:22px;height:22px;border-radius:50%;flex:none;display:flex;align-items:center;
           justify-content:center;font-size:12px;font-weight:700;}
.chk .mark.yes{background:var(--ok-bg); color:var(--ok);}
.chk .mark.no{background:var(--neutral-bg); color:var(--muted);}
.chk .body{flex:1; min-width:0;}
.chk .t{font-size:13.5px; font-weight:600;}
.chk .h{font-size:11.5px; color:var(--muted);}

/* Лестница трекинга сделки */
.track{display:flex; gap:4px; margin:12px 0 6px;}
.track i{flex:1; height:5px; border-radius:3px; background:var(--line);}
.track i.done{background:var(--brand);} .track i.now{background:var(--gold);}
.track-label{font-size:12px; color:var(--muted);}

/* Таблица сравнения КП (bid leveling). Скроллится внутри себя —
   страница по горизонтали ездить не должна. */
.cmp-scroll{overflow-x:auto; -webkit-overflow-scrolling:touch; margin:0 -14px; padding:0 14px;}
table.cmp{border-collapse:collapse; width:100%; min-width:520px; font-size:12.5px;}
table.cmp th{text-align:left; font-weight:600; color:var(--muted); font-size:11px;
             text-transform:uppercase; letter-spacing:.03em; padding:8px 9px 8px 0; white-space:nowrap;}
table.cmp td{padding:10px 9px 10px 0; border-top:1px solid var(--line); vertical-align:top;}
table.cmp tr.winner td{background:var(--ok-bg);}
table.cmp .num{font-variant-numeric:tabular-nums; white-space:nowrap;}
table.cmp .co{font-weight:600; min-width:150px;}
.delta-good{color:var(--ok); font-weight:600;}
.delta-bad{color:var(--bad); font-weight:600;}
.cmp-flag{font-size:11px; color:var(--warn);}
