:root { --blue: #1a6db5; --blue-d: #14548c; --orange: #f07423; --green: #1f9d48; --red: #c62828; --bg: #f2f4f7; --text: #1c1f24; --muted: #667085; --line: #e3e6ea; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
button, input, textarea { font: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top)); background: #fff; border-bottom: 1px solid var(--line); }
.logo { height: 34px; }
.top-title { flex: 1; font-weight: 600; color: var(--blue-d); }
.menu-btn { border: none; background: none; font-size: 22px; padding: 4px 8px; }
.menu { position: fixed; right: 10px; top: 56px; z-index: 6; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15); min-width: 220px; overflow: hidden; }
.menu button { display: block; width: 100%; text-align: left; border: none; background: none; padding: 12px 16px; border-top: 1px solid var(--line); }
.menu-user { padding: 12px 16px; font-size: 14px; color: var(--muted); }
main { max-width: 760px; margin: 0 auto; padding: 12px 12px 90px; }
.card { background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card h1 { margin: 0 0 6px; font-size: 22px; }
label { display: block; margin: 14px 0 0; font-size: 14px; color: #344054; }
label input { display: block; width: 100%; margin-top: 6px; padding: 12px; border: 1px solid #cfd4dc; border-radius: 8px; font-size: 17px; background: #fff; }
button.primary { background: var(--blue); color: #fff; border: none; border-radius: 8px; padding: 12px 18px; font-weight: 600; }
button.primary:active { background: var(--blue-d); }
button.big { display: block; width: 100%; margin-top: 18px; padding: 14px; font-size: 17px; }
button.link { display: block; margin: 12px auto 0; border: none; background: none; color: var(--blue); }
.err { color: var(--red); margin-top: 10px; font-size: 14px; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; }
.tabs button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 10px; white-space: nowrap; font-size: 15px; }
.tabs button.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.item { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.item .t { font-weight: 600; }
.item .s { font-size: 14px; color: var(--muted); margin-top: 3px; }
.item .st { font-size: 14px; margin-top: 6px; color: var(--blue-d); }
.item .st.act { color: var(--orange); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.back { border: none; background: none; color: var(--blue); padding: 4px 0 10px; font-size: 16px; }
.d-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.d-meta { font-size: 14px; color: var(--muted); }
.d-status { margin: 12px 0; padding: 10px 12px; border-radius: 10px; background: #eef4fb; color: var(--blue-d); font-weight: 600; }
.d-status.done { background: #e8f6ec; color: var(--green); }
.d-status.bad { background: #fdecea; color: var(--red); }
.d-note { white-space: pre-wrap; background: #fff; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.sec { margin-top: 16px; font-weight: 600; font-size: 15px; }
.file { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 10px; padding: 12px; margin-top: 8px; }
.file .ic { width: 36px; height: 44px; border-radius: 4px; background: #fdecea; color: var(--red); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.file .nm { flex: 1; min-width: 0; word-break: break-word; }
.file .nm small { display: block; color: var(--muted); }
.file button { border: 1px solid var(--blue); color: var(--blue); background: #fff; border-radius: 8px; padding: 8px 12px; }
.steps { list-style: none; padding: 0; margin: 8px 0; }
.steps li { position: relative; padding: 8px 0 8px 30px; border-left: 2px solid var(--line); margin-left: 10px; font-size: 15px; }
.steps li::before { content: ""; position: absolute; left: -9px; top: 12px; width: 16px; height: 16px; border-radius: 50%; background: #cfd4dc; }
.steps li.done::before { background: var(--green); }
.steps li.pending::before, .steps li.agreed::before { background: var(--orange); }
.steps li.rejected::before { background: var(--red); }
.steps small { display: block; color: var(--muted); }
.actions { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); display: flex; gap: 10px; z-index: 4; }
.actions button { flex: 1; padding: 14px; border-radius: 10px; font-size: 16px; font-weight: 600; border: 1px solid var(--line); background: #fff; }
.actions .ok { background: var(--green); color: #fff; border-color: var(--green); }
.actions .no { color: var(--red); border-color: #f1b4b0; }
.info { background: #fff8e6; border: 1px solid #f5d38a; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-top: 10px; }
.viewer { position: fixed; inset: 0; z-index: 20; background: #525659; display: flex; flex-direction: column; }
.viewer-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); background: #323639; color: #fff; }
.viewer-bar button { background: none; border: 1px solid #777; color: #fff; border-radius: 6px; padding: 6px 12px; }
.viewer-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.spacer { flex: 1; }
.viewer-pages { flex: 1; overflow: auto; padding: 10px 0; -webkit-overflow-scrolling: touch; }
.viewer-pages canvas { display: block; margin: 0 auto 10px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.sheet { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; }
.sheet-box { background: #fff; width: 100%; max-width: 560px; border-radius: 16px 16px 0 0; padding: 18px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
.sheet-title { font-weight: 700; font-size: 18px; }
.sheet-text { margin: 8px 0 12px; color: #344054; }
.sheet textarea { width: 100%; border: 1px solid #cfd4dc; border-radius: 8px; padding: 10px; font-size: 16px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 12px; }
.sheet-actions button { flex: 1; padding: 13px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 16px; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 40; max-width: 90vw; text-align: center; }
