/* DepositProof — clean document-app aesthetic, mobile-first */
*{box-sizing:border-box}
:root{
  --bg:#eef2f7; --card:#ffffff; --ink:#1e293b; --muted:#64748b;
  --brand:#1d4ed8; --brand-d:#173ea8; --brand-l:#e3ecfd;
  --green:#15803d; --green-bg:#e8f7ee; --amber:#b45309; --amber-bg:#fdf3e3;
  --red:#b91c1c; --red-bg:#fdecec; --line:#dde5ee;
  --radius:14px; --tap:54px;
}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);color:var(--ink);-webkit-tap-highlight-color:transparent}
.app-shell{max-width:680px;margin:0 auto;min-height:100dvh;display:flex;flex-direction:column;background:var(--bg)}

.topbar{background:linear-gradient(135deg,#1d4ed8,#173ea8);color:#fff;padding:20px 18px 16px}
.brand{display:flex;align-items:center;gap:12px}
.brand-ico{font-size:36px}
.brand h1{margin:0;font-size:23px}
.brand p{margin:2px 0 0;font-size:13px;opacity:.85}

main{flex:1;padding:16px 14px 28px}
.card{background:var(--card);border-radius:var(--radius);padding:18px;margin-bottom:14px;
  box-shadow:0 1px 4px rgba(25,45,80,.08)}
.card h2{margin:0 0 6px;font-size:19px}
.card h3{margin:16px 0 8px;font-size:16px}
.muted{color:var(--muted);font-size:14px;line-height:1.55}
.center{text-align:center}

.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:var(--tap);
  border:0;border-radius:12px;font-size:16.5px;font-weight:700;cursor:pointer;padding:12px 16px;
  text-decoration:none;margin:8px 0;font-family:inherit}
.btn-primary{background:var(--brand);color:#fff}
.btn-primary:active{background:var(--brand-d)}
.btn-danger{background:var(--red);color:#fff}
.btn-ghost{background:#fff;color:var(--brand);border:2px solid var(--brand)}
.btn-plain{background:#eef2f6;color:var(--ink)}
.btn-row{display:flex;gap:10px}
.btn-row .btn{margin:8px 0}
.btn-sm{min-height:46px;font-size:14.5px;padding:8px 12px;width:auto;display:inline-flex;margin:4px 6px 4px 0}
.linklike{background:none;border:0;color:var(--brand);font-size:14.5px;font-weight:600;cursor:pointer;
  padding:10px 6px;min-height:44px;font-family:inherit;text-decoration:underline}

.tabbar{position:sticky;bottom:0;display:flex;background:#fff;border-top:1px solid var(--line);
  padding:6px 2px calc(6px + env(safe-area-inset-bottom));z-index:20}
.tabbar button{flex:1;border:0;background:none;padding:8px 2px;font-size:11.5px;color:var(--muted);
  display:flex;flex-direction:column;align-items:center;gap:3px;min-height:58px;cursor:pointer;font-family:inherit}
.tabbar button .tico{font-size:22px}
.tabbar button.active{color:var(--brand);font-weight:700}
.legal-foot{background:#fff;border-top:1px solid var(--line);color:var(--muted);font-size:12px;
  text-align:center;padding:10px 14px calc(10px + env(safe-area-inset-bottom));line-height:1.5}
.legal-foot a{color:var(--brand)}

label.f{display:block;font-size:14px;font-weight:600;margin:12px 0 4px}
input[type=text],input[type=number],input[type=date],select,textarea{width:100%;border:2px solid var(--line);
  border-radius:10px;padding:12px;font-size:16px;font-family:inherit;background:#fff;color:var(--ink);min-height:50px}
textarea{min-height:100px;resize:vertical}
.frow{display:flex;gap:10px}.frow>*{flex:1}
.ferr{color:var(--red);font-size:13px;margin-top:6px;font-weight:600}
.jnote{background:var(--brand-l);border-radius:10px;padding:10px 12px;font-size:13.5px;line-height:1.5;margin-top:8px;color:#1e3a8a}

/* rooms */
.room{border:1px solid var(--line);border-radius:var(--radius);margin-bottom:10px;background:#fff;overflow:hidden}
.room-head{width:100%;display:flex;align-items:center;gap:10px;background:#fff;border:0;padding:14px 16px;
  cursor:pointer;font-size:16px;font-weight:700;min-height:60px;font-family:inherit;color:var(--ink);text-align:left}
.room-head .chev{margin-left:auto;color:var(--muted)}
.room-body{border-top:1px solid var(--line);padding:6px 14px 14px}
.prog{height:8px;background:#e5ebf3;border-radius:99px;overflow:hidden;margin:8px 0}
.prog i{display:block;height:100%;background:var(--green);border-radius:99px}
.item{border-top:1px dashed var(--line);padding:12px 0}
.item:first-child{border-top:0}
.item-top{display:flex;align-items:flex-start;gap:10px}
.item-check{width:26px;height:26px;flex:none;margin-top:2px;accent-color:var(--green)}
.item-label{flex:1;font-size:15px;font-weight:600;line-height:1.4}
.item-label.done{color:var(--green);text-decoration:line-through}
.thumbs{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.thumb{position:relative;width:86px}
.thumb img{width:86px;height:86px;object-fit:cover;border-radius:10px;border:1px solid var(--line);cursor:pointer;display:block}
.thumb .ts{font-size:10px;color:var(--muted);margin-top:2px;line-height:1.3}
.thumb .del{position:absolute;top:-8px;right:-8px;width:28px;height:28px;border-radius:50%;border:0;
  background:var(--red);color:#fff;font-size:15px;font-weight:700;cursor:pointer;line-height:1}

/* vault */
.doc-row{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:10px;
  padding:10px 12px;margin:8px 0;font-size:14px}
.doc-row .dinfo{flex:1;min-width:0}
.doc-row .dname{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.doc-row .dmeta{font-size:12px;color:var(--muted)}
.note-card{border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:8px 0}
.note-card .ndate{font-size:12px;color:var(--muted);font-weight:700}
.note-card p{margin:6px 0;font-size:14.5px;line-height:1.5;white-space:pre-wrap}

.storage{font-size:13px;color:var(--muted);margin:8px 0}

/* timeline */
.count-card{text-align:center;padding:22px 16px}
.count-big{font-size:44px;font-weight:800}
.count-big.ok{color:var(--green)}.count-big.warn{color:var(--amber)}.count-big.over{color:var(--red)}
.ms{border:1px solid var(--line);border-radius:10px;padding:12px;margin:8px 0;display:flex;gap:10px;align-items:flex-start}
.ms .mdot{flex:none;width:14px;height:14px;border-radius:50%;background:#cbd5e1;margin-top:4px}
.ms.done .mdot{background:var(--green)}
.ms .mlabel{flex:1;font-size:14.5px}
.ms .mdate{font-size:13px;color:var(--muted)}

/* export */
.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0}
.stat{background:#f6f9fc;border:1px solid var(--line);border-radius:10px;padding:12px;text-align:center}
.stat .n{font-size:26px;font-weight:800;color:var(--brand-d)}
.stat .l{font-size:12px;color:var(--muted)}
.letter-prev{background:#fffdf5;border:1px solid #e7d9a8;border-radius:10px;padding:16px;font-size:14px;
  line-height:1.65;white-space:pre-wrap;font-family:Georgia,serif;margin:10px 0;max-height:420px;overflow:auto}
.paper{background:#fff;border:1px solid var(--line);border-radius:6px;padding:20px;margin:10px 0;
  box-shadow:0 2px 10px rgba(25,45,80,.12);font-size:14px;line-height:1.6}
.paper h2{font-size:18px}.paper img{max-width:100%;border-radius:6px}
.paper table{width:100%;border-collapse:collapse;font-size:13.5px}
.paper td,.paper th{border:1px solid #dbe3ec;padding:6px 8px;text-align:left;vertical-align:top}

/* lightbox */
.lightbox{position:fixed;inset:0;background:rgba(10,18,32,.85);z-index:50;display:flex;align-items:center;justify-content:center;padding:20px}
.lightbox[hidden]{display:none}
.lb-inner{max-width:560px;width:100%;text-align:center}
.lb-inner img{max-width:100%;max-height:70vh;border-radius:10px;background:#000}
.lb-cap{color:#fff;font-size:13px;margin:10px 0}

/* print */
#printRoot{display:none}
@media print{
  .app-shell{display:none !important}
  #printRoot{display:block !important;color:#000}
  #printRoot .pr-doc{font-family:Georgia,serif;max-width:700px;margin:0 auto}
  #printRoot h1{font-size:24px;border-bottom:2px solid #000;padding-bottom:8px}
  #printRoot h2{font-size:17px;margin-top:26px;border-bottom:1px solid #999;padding-bottom:4px}
  #printRoot h3{font-size:14px;margin:14px 0 6px}
  #printRoot table{width:100%;border-collapse:collapse;font-size:12.5px;margin:8px 0}
  #printRoot td,#printRoot th{border:1px solid #999;padding:5px 7px;text-align:left;vertical-align:top}
  #printRoot img{max-width:320px;border:1px solid #999;margin:4px 8px 4px 0}
  #printRoot .pr-photo{display:inline-block;vertical-align:top;width:340px;margin:0 0 12px}
  #printRoot .pr-cap{font-size:11px;color:#333}
  #printRoot .pr-foot{margin-top:30px;font-size:11px;color:#444;border-top:1px solid #999;padding-top:8px}
  #printRoot .pr-check{font-size:13px;margin:3px 0}
}
.empty{text-align:center;padding:26px 14px;color:var(--muted)}
.empty .big-ico{font-size:42px}
