:root{
  --blue:#075db8;
  --blue-dark:#084987;
  --blue-soft:#e9f3ff;
  --orange:#f39a32;
  --green:#17834f;
  --red:#c2382b;
  --amber:#b97309;
  --ink:#17263a;
  --muted:#728095;
  --bg:#f2f5f9;
  --card:#fff;
  --line:#dce4ee;
  --shadow:0 9px 28px rgba(29,58,92,.10);
  --safe-top:env(safe-area-inset-top);
  --safe-bottom:env(safe-area-inset-bottom);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:disabled{cursor:default;opacity:.55}
.hidden{display:none!important}
.muted{color:var(--muted);font-size:.84rem}
.eyebrow{font-size:.68rem;letter-spacing:.12em;font-weight:950;color:var(--blue);margin-bottom:3px}
.topbar{
  position:sticky;top:0;z-index:30;color:#fff;
  background:linear-gradient(135deg,var(--blue),var(--blue-dark));
  padding:calc(11px + var(--safe-top)) 14px 11px;
  box-shadow:0 6px 20px rgba(7,93,184,.23)
}
.topbar-inner{max-width:1180px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:10px}
.brand{display:flex;align-items:center;gap:10px}
.brand-mark{width:43px;height:43px;border-radius:14px;background:#fff;color:var(--blue);display:grid;place-items:center;font-weight:950;font-size:.95rem}
.brand h1{margin:0;font-size:1.33rem;line-height:1}.brand small{opacity:.82}
.top-actions{display:flex;align-items:center;gap:7px}
.top-btn{border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.12);color:#fff;border-radius:12px;padding:8px 10px;font-weight:800}
main{max-width:1180px;margin:auto;padding:12px}
.hero-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:3px 0 12px}
.hero-title h2{margin:0;font-size:1.55rem}.hero-title p{margin:3px 0 0;color:var(--muted)}
.primary,.secondary,.danger,.round-btn{
  border:0;border-radius:13px;padding:10px 13px;font-weight:850
}
.primary{background:var(--blue);color:#fff}
.secondary{background:#edf3fa;color:var(--blue)}
.danger{background:#fff0ee;color:var(--red)}
.xl{min-height:52px;font-size:1rem}.full{width:100%}
.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-bottom:12px}
.metric{background:#fff;border:1px solid var(--line);border-radius:17px;padding:13px;box-shadow:var(--shadow)}
.metric .label{font-size:.73rem;color:var(--muted);font-weight:750}.metric .value{font-size:1.58rem;font-weight:950;margin-top:3px}
.prospectus-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.pro-card{display:grid;grid-template-columns:132px minmax(0,1fr);background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden;box-shadow:var(--shadow);min-height:188px}
.cover{position:relative;background:linear-gradient(155deg,#dfeeff,#c8dcf3);min-height:188px;overflow:hidden}
.cover img{width:100%;height:100%;object-fit:cover;display:block}
.cover-fallback{height:100%;display:grid;place-items:center;color:var(--blue);font-size:2rem;font-weight:950}
.cover-badge{position:absolute;left:8px;bottom:8px;background:rgba(18,31,48,.82);color:#fff;border-radius:999px;padding:5px 8px;font-size:.68rem;font-weight:800}
.pro-body{padding:13px;display:flex;flex-direction:column;min-width:0}
.pro-head{display:flex;justify-content:space-between;gap:8px}.pro-name{font-size:1.12rem;font-weight:950;line-height:1.12}.pro-dates{font-size:.78rem;color:var(--muted);margin-top:4px}
.status{height:max-content;white-space:nowrap;border-radius:999px;padding:6px 8px;font-size:.7rem;font-weight:850;background:#eef2f6}
.status.READY{background:#e9f7ef;color:var(--green)}
.status.ANALYZING,.status.QUEUED{background:#fff4df;color:var(--amber)}
.status.RETRYING{background:#fff1d8;color:#a75c00}
.status.ERROR{background:#fff0ee;color:var(--red)}
.progress-row{margin-top:auto}.progress-label{display:flex;justify-content:space-between;font-size:.72rem;color:var(--muted);margin-bottom:5px}
.progress{height:8px;border-radius:99px;background:#edf1f5;overflow:hidden}.progress span{display:block;height:100%;background:linear-gradient(90deg,var(--blue),#48a2ee)}
.pro-message{font-size:.76rem;color:var(--muted);margin-top:8px;min-height:18px}
.pro-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}
.empty{background:#fff;border:1px dashed #cbd6e3;border-radius:20px;padding:35px;text-align:center;color:var(--muted)}
.modal{border:0;background:transparent;padding:0;width:min(590px,calc(100% - 20px))}
.modal::backdrop,.point-sheet::backdrop{background:rgba(12,22,34,.5);backdrop-filter:blur(3px)}
.modal-card{background:#fff;border-radius:22px;padding:17px;box-shadow:0 22px 70px rgba(0,0,0,.25)}
.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.modal-head h2{margin:0;font-size:1.45rem}
.round-btn{background:#edf1f6;padding:8px 10px}
label{display:block;font-size:.83rem;font-weight:850;margin-top:12px}
input,select,textarea{width:100%;margin-top:6px;border:1px solid #cdd8e5;border-radius:13px;background:#fff;padding:11px;color:var(--ink);font-size:16px}
.date-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.info-box{margin:12px 0;background:#eef6ff;color:#3d6088;border-radius:12px;padding:10px;font-size:.79rem;line-height:1.35}
.diag-row{display:flex;justify-content:space-between;gap:10px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:11px;margin-top:8px}.diag-dot{width:11px;height:11px;border-radius:50%;background:var(--red)}.diag-dot.ok{background:var(--green)}
.reader{position:fixed;inset:0;background:#2a3037;z-index:60;display:flex;flex-direction:column}
.reader-head{padding:calc(7px + var(--safe-top)) 8px 7px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:8px}
.reader-info{min-width:0;flex:1}.reader-title{font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reader-sub{font-size:.75rem;color:var(--muted)}
.reader-progress{width:125px}.reader-progress .progress{height:7px}
.reader-body{display:grid;grid-template-columns:minmax(0,1fr) 340px;min-height:0;flex:1}
.pdf-zone{overflow:auto;padding:7px;background:#30363d}
.offer-side{overflow:auto;background:#f5f8fb;border-left:1px solid #d2dce8;padding:9px}
.page{position:relative;margin:0 auto 9px;background:#fff;box-shadow:0 5px 18px rgba(0,0,0,.3)}
.page canvas{display:block;width:100%;height:100%}
.hotspot{position:absolute;border:2px solid rgba(7,93,184,.9);background:rgba(7,93,184,.11);border-radius:7px;padding:0}
.hotspot.PRESENT{border-color:var(--green);background:rgba(23,131,79,.15)}
.hotspot.ABSENT{border-color:var(--red);background:rgba(194,56,43,.14)}
.offer-item{background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px;margin-bottom:7px}.offer-item.PRESENT{border-left:5px solid var(--green)}.offer-item.ABSENT{border-left:5px solid var(--red)}.offer-item strong{display:block;font-size:.9rem}.offer-item .small{font-size:.73rem;color:var(--muted);margin-top:3px}
.point-sheet{width:min(560px,100%);max-height:92dvh;border:0;border-radius:24px 24px 0 0;padding:0;margin:auto 0 0 auto}
.point-sheet form{background:#fff;padding:10px 14px calc(14px + var(--safe-bottom));max-height:92dvh;overflow:auto}
.grabber{width:42px;height:5px;background:#d6dde6;border-radius:99px;margin:0 auto 10px}
.point-title{font-size:1.3rem;font-weight:950;line-height:1.08}
.field-section{margin-top:13px}.field-label{font-size:.88rem;font-weight:900;margin-bottom:7px}
.presence-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.presence{min-height:55px;border:2px solid var(--line);background:#fff;border-radius:15px;font-weight:950;font-size:1rem}.presence.selected.present{border-color:var(--green);background:#edf9f2;color:var(--green)}.presence.selected.absent{border-color:var(--red);background:#fff1ef;color:var(--red)}
.chips{display:flex;flex-wrap:wrap;gap:7px}.chip{border:1px solid #ccd7e3;background:#fff;border-radius:999px;padding:9px 11px;font-size:.84rem;font-weight:800}.chip.selected{background:var(--blue-soft);border-color:var(--blue);color:var(--blue)}
.quantity-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.qty{border:1px solid #d3dce7;background:#fff;border-radius:13px;padding:10px 5px;text-align:center;font-size:.76rem;font-weight:850}.qty b{display:block;font-size:1.2rem;color:var(--orange);letter-spacing:-2px;margin-bottom:2px}.qty.selected{border-color:var(--orange);background:#fff5e7;color:#8b4a00}
.help{font-size:.75rem;color:var(--muted);margin-top:5px}.sticky-save{position:sticky;bottom:0;margin-top:14px}
.toast{position:fixed;z-index:120;left:50%;bottom:calc(16px + var(--safe-bottom));transform:translate(-50%,18px);opacity:0;pointer-events:none;background:#142236;color:#fff;border-radius:13px;padding:10px 14px;max-width:90vw;text-align:center;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}
.login{min-height:100vh;display:grid;place-items:center;padding:18px;background:radial-gradient(circle at top,#dfeeff,var(--bg) 48%)}
.login-card{width:min(410px,100%);background:#fff;border:1px solid var(--line);border-radius:24px;padding:22px;box-shadow:var(--shadow)}
.login-mark{width:68px;height:68px;border-radius:20px;background:linear-gradient(145deg,var(--blue),var(--blue-dark));color:#fff;display:grid;place-items:center;font-weight:950;margin-bottom:14px}.login h1{margin:0;font-size:1.9rem}.login p{color:var(--muted);line-height:1.4}
@media(max-width:850px){
  .prospectus-grid{grid-template-columns:1fr}
  .reader-body{grid-template-columns:1fr}.offer-side{display:none}
}
@media(max-width:430px){
  main{padding:8px}
  .topbar{padding-left:9px;padding-right:9px}.brand-mark{width:38px;height:38px}.brand h1{font-size:1.18rem}
  .top-btn span{display:none}.hero-actions{align-items:flex-end}.hero-title h2{font-size:1.28rem}.hero-title p{font-size:.78rem}
  .metrics{grid-template-columns:repeat(2,1fr);gap:7px}.metric{padding:10px;border-radius:14px}.metric .value{font-size:1.35rem}
  .pro-card{grid-template-columns:96px minmax(0,1fr);min-height:158px;border-radius:16px}.cover{min-height:158px}.pro-body{padding:10px}.pro-name{font-size:1rem}.pro-actions button{padding:9px 10px}
  .date-grid{grid-template-columns:1fr}
  .reader-head{padding-left:6px;padding-right:6px}.reader-progress{width:78px}.pdf-zone{padding:3px}
  .point-sheet{max-height:88dvh}.point-sheet form{max-height:88dvh}
  .quantity-grid{grid-template-columns:repeat(2,1fr)}
}


/* V1.2 - polish */
body::before{
  content:"";position:fixed;inset:0 0 auto 0;height:320px;z-index:-1;
  background:
    radial-gradient(circle at 12% 18%,rgba(255,255,255,.85),transparent 26%),
    linear-gradient(180deg,#e8f2ff 0,#f2f5f9 100%);
}
.topbar{background:linear-gradient(115deg,#075db8 0%,#084987 68%,#f39a32 150%)}
.hero-actions{
  background:rgba(255,255,255,.82);backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,.8);border-radius:20px;
  padding:15px 16px;box-shadow:0 8px 30px rgba(26,61,99,.08)
}
.hero-title h2{font-size:1.7rem;letter-spacing:-.025em}
.metrics{margin-top:2px}
.metric{border:0;box-shadow:0 10px 30px rgba(27,55,88,.08)}
.metric:nth-child(1){border-top:4px solid #075db8}
.metric:nth-child(2){border-top:4px solid #17834f}
.metric:nth-child(3){border-top:4px solid #f39a32}
.metric:nth-child(4){border-top:4px solid #7c5ce5}
.pro-card{
  border:0;box-shadow:0 12px 34px rgba(26,54,88,.10);
  transition:transform .16s ease,box-shadow .16s ease
}
.pro-card:hover{transform:translateY(-2px);box-shadow:0 16px 40px rgba(26,54,88,.14)}
.cover::after{
  content:"";position:absolute;inset:auto 0 0 0;height:42%;
  background:linear-gradient(transparent,rgba(10,28,48,.25));pointer-events:none
}
.pro-name{font-size:1.16rem}
.primary{box-shadow:0 5px 14px rgba(7,93,184,.20)}
.status{font-weight:900}
.status.RETRYING::before{content:"↻ ";font-weight:950}
.empty{background:rgba(255,255,255,.75);backdrop-filter:blur(8px)}
@media(max-width:430px){
  body::before{height:220px}
  .hero-actions{padding:11px 12px;border-radius:16px}
  .hero-title h2{font-size:1.22rem}
  .hero-title p{max-width:230px}
  .pro-card{grid-template-columns:88px minmax(0,1fr)}
}

.stage-pill{
  display:inline-block;border-radius:999px;padding:3px 7px;margin-right:4px;
  background:#e8f2ff;color:#075db8;font-size:.64rem;font-weight:950;
  letter-spacing:.035em;vertical-align:1px
}
.status.ANALYZING{animation:pulseStatus 1.6s ease-in-out infinite}
@keyframes pulseStatus{0%,100%{opacity:1}50%{opacity:.63}}
