body.doc-open { overflow: hidden; }
.doc-overlay { position: fixed; z-index: 300; inset: 0; background: #eef3f5; overflow: auto; }
.doc-workspace { min-height: 100vh; color: #10233a; background: #f4f7f8; }
.doc-top { position: sticky; z-index: 5; top: 0; min-height: 88px; padding: 16px 26px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 16px; border-bottom: 1px solid #dfe7eb; background: rgba(255,255,255,.96); backdrop-filter: blur(18px); }
.doc-top > button:first-child { width: 42px; height: 42px; border: 1px solid #dce5ea; border-radius: 12px; color: #516679; background: #fff; font-size: 20px; }
.doc-top small { color: #0f827e; font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.doc-top h1 { margin: 3px 0 0; overflow: hidden; font-size: 21px; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.doc-top p { margin: 4px 0 0; overflow: hidden; color: #6c7e8f; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.doc-top > div:last-child { display: flex; gap: 9px; }
.doc-btn { min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 12px; font-weight: 750; }
.doc-btn.primary { color: #fff; background: #0f827e; box-shadow: 0 8px 18px rgba(15,130,126,.18); }
.doc-btn.secondary { color: #173248; border-color: #d6e0e5; background: #fff; }
.doc-btn.small { min-height: 36px; padding-inline: 12px; font-size: 12px; }
.doc-btn:disabled { cursor: wait; opacity: .55; }
.doc-progress { padding: 15px max(24px,calc((100vw - 1450px)/2)); display: grid; grid-template-columns: minmax(230px,auto) minmax(180px,420px); align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #e1e8ec; background: #fff; }
.doc-progress strong,.doc-progress span { display: block; }
.doc-progress strong { font-size: 13px; }
.doc-progress span { margin-top: 3px; color: #718394; font-size: 11px; }
.doc-progress > i { height: 8px; overflow: hidden; border-radius: 999px; background: #e7edef; }
.doc-progress > i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#20a6a0,#0f827e); }
.doc-layout { width: min(1450px,calc(100% - 48px)); margin: 28px auto 80px; display: grid; grid-template-columns: minmax(0,1fr) 280px; align-items: start; gap: 22px; }
.doc-layout main { display: grid; gap: 20px; }
.doc-layout aside { position: sticky; top: 118px; display: grid; gap: 12px; }
.doc-layout aside > div,.doc-layout aside > p { margin: 0; padding: 18px; border: 1px solid #dde6ea; border-radius: 16px; background: #fff; box-shadow: 0 5px 18px rgba(16,35,58,.04); }
.doc-layout aside span,.doc-layout aside strong { display: block; }
.doc-layout aside span { margin-bottom: 8px; color: #7a8b9b; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.doc-layout aside strong + strong { margin-top: 7px; }
.doc-layout aside p { color: #607487; font-size: 12px; line-height: 1.55; background: #edf8f7; }
.doc-section { padding: 24px; border: 1px solid #dfe7eb; border-radius: 20px; background: #fff; box-shadow: 0 7px 25px rgba(16,35,58,.045); }
.doc-section > header { margin-bottom: 20px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: start; gap: 14px; }
.doc-section > header > b { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #0b6d69; background: #eaf7f5; font-size: 12px; }
.doc-section h2 { margin: 0; font-size: 19px; letter-spacing: -.03em; }
.doc-section header p { margin: 5px 0 0; color: #718394; font-size: 12px; line-height: 1.45; }
.doc-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.doc-field { display: grid; gap: 7px; }
.doc-field span { color: #344b60; font-size: 12px; font-weight: 750; }
.doc-field input,.doc-field textarea,.doc-options select,.doc-row input,.doc-upload input { width: 100%; border: 1px solid #d9e2e7; border-radius: 11px; color: #10233a; background: #fff; outline: none; }
.doc-field input,.doc-row input,.doc-upload input { min-height: 43px; padding: 0 12px; }
.doc-field textarea { padding: 12px; resize: vertical; line-height: 1.55; }
.doc-field input:focus,.doc-field textarea:focus,.doc-options select:focus,.doc-row input:focus,.doc-upload input:focus { border-color: #20a6a0; box-shadow: 0 0 0 4px rgba(32,166,160,.12); }
.doc-options { margin-top: 18px; padding: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; border-radius: 14px; background: #f6f9fa; }
.doc-options label { display: flex; align-items: center; gap: 8px; color: #445b70; font-size: 12px; font-weight: 650; }
.doc-options select { min-height: 38px; padding: 0 10px; }
.doc-list { display: grid; gap: 9px; }
.doc-row { display: grid; grid-template-columns: 1.35fr .65fr .55fr 1fr 38px; gap: 8px; }
.doc-row.material { grid-template-columns: 1.25fr .5fr .55fr .8fr 1fr 38px; }
.doc-row > button { border: 0; border-radius: 10px; color: #b42318; background: #fff2f1; font-size: 18px; }
.doc-upload { padding: 15px; display: grid; grid-template-columns: minmax(190px,1fr) minmax(210px,1fr) auto; align-items: center; gap: 10px; border: 1px dashed #bfcfd6; border-radius: 14px; background: #f8fafb; }
.doc-upload small { grid-column: 1/-1; color: #7a8c9d; font-size: 10px; }
.doc-photos { margin-top: 16px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.doc-photo { overflow: hidden; border: 1px solid #dfe7eb; border-radius: 14px; background: #fff; }
.doc-photo img { width: 100%; aspect-ratio: 4/3; display: block; object-fit: cover; background: #edf1f3; }
.doc-photo div { padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.doc-photo strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.doc-photo button { border: 0; color: #b42318; background: none; font-size: 10px; font-weight: 750; }
.doc-empty { margin: 0; padding: 25px; grid-column: 1/-1; border-radius: 12px; color: #718394; background: #f7f9fa; text-align: center; font-size: 12px; }
.doc-present { margin-bottom: 18px; padding: 14px; display: flex; align-items: center; gap: 10px; border-radius: 13px; background: #edf8f7; color: #234458; font-size: 13px; font-weight: 700; }
.doc-signature { margin-top: 16px; padding: 16px; border: 1px solid #dfe7eb; border-radius: 15px; }
.doc-signature > strong { display: block; margin-bottom: 10px; font-size: 13px; }
#doc-signature { width: 100%; height: 190px; display: block; border: 1px dashed #b8c9d1; border-radius: 12px; background: #fff; touch-action: none; }
.doc-signature .doc-btn { margin-top: 10px; }
.doc-loading { position: fixed; z-index: 310; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: #f4f7f8; color: #617487; }
.doc-loading span { width: 40px; height: 40px; border: 4px solid #d9e5e7; border-top-color: #0f827e; border-radius: 50%; animation: doc-spin .8s linear infinite; }
@keyframes doc-spin { to { transform: rotate(360deg); } }
#doc-toast-root { position: fixed; z-index: 400; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.doc-toast { max-width: 360px; padding: 13px 16px; border-radius: 12px; color: #fff; background: #0b6d69; box-shadow: 0 15px 40px rgba(16,35,58,.2); font-size: 12px; font-weight: 700; }
.doc-toast.error { background: #9f2d25; }
.doc-open-button { margin-right: 7px; }
@media (max-width: 980px) { .doc-layout { grid-template-columns: 1fr; } .doc-layout aside { position: static; grid-template-columns: repeat(3,1fr); } .doc-photos { grid-template-columns: repeat(2,1fr); } .doc-row,.doc-row.material { grid-template-columns: repeat(2,1fr) 38px; } }
@media (max-width: 680px) { .doc-top { position: static; padding: 13px; grid-template-columns: auto minmax(0,1fr); } .doc-top > div:last-child { grid-column: 1/-1; } .doc-top .doc-btn { flex: 1; } .doc-progress { padding: 13px; grid-template-columns: 1fr; gap: 10px; } .doc-layout { width: calc(100% - 20px); margin-top: 10px; } .doc-section { padding: 16px; border-radius: 16px; } .doc-section > header { grid-template-columns: 36px minmax(0,1fr); } .doc-section > header > b { width: 36px; height: 36px; } .doc-section > header .doc-btn { grid-column: 2; justify-self: start; } .doc-grid,.doc-layout aside { grid-template-columns: 1fr; } .doc-row,.doc-row.material { grid-template-columns: 1fr 1fr; } .doc-row > button { min-height: 38px; } .doc-upload { grid-template-columns: 1fr; } .doc-upload small { grid-column: auto; } .doc-photos { grid-template-columns: 1fr; } #doc-signature { height: 150px; } }
