/* =================================================================
   서류함 (app.html) — venture.css(색·글꼴) 위에 얹는다
   ================================================================= */
.page { padding-top: 24px; padding-bottom: 90px; }
.loading, .empty { color: var(--ink-3); padding: 20px 0; }
.lbl-s { font-size: 13px; font-weight: 800; color: var(--ink-3); }
.linkish { background: none; border: 0; padding: 0; color: var(--ink-3); text-decoration: underline; cursor: pointer; font-size: 13px; }
.danger { color: #B3261E !important; }
.input { width: 100%; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0; cursor: pointer; }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.note { margin: 10px 0; background: var(--sky); color: var(--sky-ink); }
.note.warn { background: var(--yellow); color: var(--yellow-ink); }
.note.shared { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--mint); color: var(--mint-ink); }
.tag.sens { background: var(--peach); color: var(--peach-ink); }
.tag.ai { background: var(--lav); color: var(--lav-ink); }

/* ---------- 들어가기 전 ---------- */
.gate { max-width: 480px; margin: 40px auto; padding: 36px 28px; text-align: center; }
.gate h1 { font-size: 26px; margin: 8px 0; }
.gate p { color: var(--ink-2); }
.gate-ico { font-size: 44px; }

/* ---------- 머리 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.page-head h1 { font-size: 28px; font-weight: 800; }
.biz-line { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.biz-name { font-weight: 700; color: var(--ink-2); }
.biz-sel { font-weight: 700; padding: 6px 30px 6px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; }

/* ---------- 드라이브·로그인 줄 ---------- */
.drive { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 12px 0; padding: 16px 18px; }
.drive p { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-2); }
.drive.ok { padding: 8px 2px; font-size: 13.5px; color: var(--mint-ink); justify-content: flex-start; }
.sites { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.site { font-size: 13.5px; font-weight: 700; text-decoration: none; padding: 7px 13px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
.site:hover { border-color: #CFC4FF; background: var(--lav); }
.more { position: relative; }
.more summary { list-style: none; cursor: pointer; font-size: 13px; color: var(--ink-3); padding: 7px 10px; }
.more summary::-webkit-details-marker { display: none; }
.more[open] > div { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0; }

/* ---------- 고른 서류 줄 (위에 붙음) ---------- */
.bar { position: sticky; top: 64px; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  background: rgba(246, 247, 251, .94); padding: 10px 0; margin-top: 8px; border-bottom: 1px solid var(--line); }
.bar .spacer { flex: 1; }
.bar .all { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); padding-right: 6px; cursor: pointer; }
.bar .pill[disabled] { opacity: .45; }
.bar .sm { display: none; }
.legend { font-size: 12.5px; color: var(--ink-3); margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.legend .dot { margin-right: -6px; }
.legend .sep { margin: 0 2px; }

/* ---------- 폴더·서류 버튼 ---------- */
.folders { display: grid; gap: 18px; margin-top: 16px; }
.folder h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; margin: 0 0 8px; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.dbtn { position: relative; display: flex; align-items: stretch; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; transition: border-color .15s, box-shadow .15s; }
.dbtn:hover { box-shadow: var(--shadow); }
.dbtn.on { border-color: var(--lav-ink); box-shadow: 0 0 0 3px var(--lav); }
.dbtn input { margin: 0 0 0 12px; width: 18px; height: 18px; accent-color: var(--lav-ink); align-self: center; cursor: pointer; }
.dbtn input:disabled { opacity: .3; cursor: default; }
.dname { flex: 1; display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: 0; padding: 12px 12px 12px 10px; cursor: pointer; min-width: 0; }
.dname span { display: grid; min-width: 0; }
.dname b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dname small { font-size: 12px; color: var(--ink-3); }
.dbtn.st-none .dname b { color: var(--ink-3); font-weight: 700; }
.dadd { border: 1.5px dashed var(--line); background: transparent; border-radius: 16px; padding: 12px; font-weight: 700; color: var(--ink-3); cursor: pointer; }
.dadd:hover { background: #fff; color: var(--ink); }

.dot { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; background: #DCD9E4; }
.dot.green { background: #3CC48A; } .dot.yellow { background: #F2C230; } .dot.orange { background: #F28A3C; } .dot.red { background: #E5484D; }
.dot.none { background: transparent; border: 2px solid #D5D2DE; }

/* ---------- 확인 창 (올리기) ---------- */
.review { display: grid; gap: 10px; }
.rv { border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.rv.bad { background: #FFF6F6; }
.rv-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.fname { font-weight: 700; font-size: 14px; word-break: break-all; margin-right: auto; }
.rv-form { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-top: 8px; }
.rv-form label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.rv-form select, .rv-form input { padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 14px; width: 100%; }
.rv-form .nc { grid-column: 1 / -1; }
.rv-note { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }
.rv-note .err { color: #B3261E; }

.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 14px; margin: 8px 0 0; }
.fields div { display: grid; }
.fields dt { font-size: 12px; color: var(--ink-3); }
.fields dd { margin: 0; font-size: 14px; font-weight: 600; word-break: keep-all; }

/* ---------- 서류 버튼 안 ---------- */
.detail .get { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); margin-bottom: 12px; }
.detail .get .pill { justify-self: start; }
.howto { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.cur { border-radius: 16px; padding: 14px; background: #FAFAFD; border: 1px solid var(--line); }
.cur-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cur-top .sub { font-size: 13px; color: var(--ink-3); margin: 0; }
.old { margin-top: 12px; }
.old summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.old-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.old-row .btns { display: flex; gap: 10px; }

/* ---------- 내려받기 고르기 ---------- */
.choice { display: grid; gap: 10px; }
.opt { display: grid; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; }
.opt:hover { border-color: var(--lav-ink); background: var(--lav); }
.opt span { font-size: 13px; color: var(--ink-2); }

/* ---------- 한눈에 ---------- */
.ov-t { width: 100%; border-collapse: collapse; }
.ov-t th, .ov-t td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.ov-t th { width: 34%; font-size: 13px; color: var(--ink-2); font-weight: 700; }
.ov-t tr.diff { background: #FFF8EC; }
.warn-t { display: block; font-size: 12px; color: #A65A1E; }
.ov-t .v { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; padding: 2px 0; }
.srcs { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.src { font-size: 11.5px; font-weight: 700; border: 0; border-radius: 999px; padding: 2px 9px; background: var(--lav); color: var(--lav-ink); cursor: pointer; }

/* ---------- 사업장 ---------- */
.biz-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.biz-list .lbl-s { width: 100%; margin: 0; }

/* ---------- 끌어다 놓기 ---------- */
.drop { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: rgba(231, 225, 255, .75); backdrop-filter: blur(2px); pointer-events: none; }
.drop div { background: #fff; border: 2.5px dashed var(--lav-ink); color: var(--lav-ink); font-weight: 800; font-size: 20px; padding: 40px 50px; border-radius: 26px; }

/* ---------- 창·알림·기다림 ---------- */
dialog.modal { border: 0; padding: 0; border-radius: 26px; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--paper); box-shadow: 0 30px 80px -20px rgba(43, 39, 48, .45); }
dialog.modal.wide { width: min(860px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(43, 39, 48, .38); backdrop-filter: blur(3px); }
.modal-in { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 6px; }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-head .x { border: 0; background: #F1F0F6; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; color: var(--ink-2); }
.modal-body { padding: 8px 22px 16px; overflow: auto; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 22px 20px; border-top: 1px solid var(--line); }
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(520px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 16px; font-size: 14px; box-shadow: var(--shadow); transition: opacity .35s, transform .35s; }
.toast span { flex: 1; }
.toast.err { background: #B3261E; } .toast.warn { background: #7A5300; }
.toast.out { opacity: 0; transform: translateY(8px); }
.toast-act { border: 0; background: #fff; color: var(--ink); font-weight: 800; border-radius: 999px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.busy { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; background: rgba(246, 247, 251, .7); backdrop-filter: blur(2px); }
.busy-in { background: #fff; padding: 22px 28px; border-radius: 22px; box-shadow: var(--shadow); text-align: center; max-width: 320px; }
.busy-in p { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; }
.spin { display: inline-block; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--lav); border-top-color: var(--lav-ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 휴대폰 ---------- */
@media (max-width: 720px) {
  .page { padding-top: 16px; padding-bottom: 110px; }
  .page-head h1 { font-size: 24px; }
  .drive { flex-direction: column; align-items: stretch; }
  .bar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); border-bottom: 0; background: rgba(255, 255, 255, .97); box-shadow: 0 -8px 24px -12px rgba(43, 39, 48, .2); }
  .bar { gap: 4px; flex-wrap: nowrap; }
  .bar .lg { display: none; } .bar .sm { display: inline; }
  .bar .pill { white-space: nowrap; }
  .bar .pill { padding: 8px 10px; font-size: 12.5px; }
  .bar .all { padding-right: 2px; font-size: 12.5px; }
  .legend .tip { display: none; }
  .bar [data-pick] { display: none; }
  .bar .spacer { display: none; }
  .bar [data-upload] { margin-left: auto; }
  .dgrid { grid-template-columns: 1fr 1fr; }
  .dname { padding: 11px 10px 11px 8px; gap: 8px; }
  .dname b { font-size: 13.5px; white-space: normal; }
  .rv-form, .row2 { grid-template-columns: 1fr; }
  .ov-t th { width: 40%; }
  #toasts { bottom: 86px; }
}
