/* seonNas 스타일 v1.5.0 - cs.cctv365.kr 와 같은 틸 계열 라이트 테마 */
:root {
  --pri: #157b92; --pri-h: #11667a; --pri-d: #0f5f72; --pri-soft: #e7f4f7; --pri-ring: rgba(21, 123, 146, .18);
  --mint: #2dd4bf;
  --bg: #f1f5f9; --card: #ffffff; --bg2: #f8fafc; --hover: #f1f5f9;
  --bd: #dde3ea; --bd2: #e9eef3;
  --tx: #1e293b; --tx2: #64748b; --tx3: #94a3b8;
  --red: #dc2626; --red-soft: #fee2e2; --green: #16a34a; --green-soft: #dcfce7;
  --amber: #d97706; --amber-soft: #fef3c7; --blue: #2563eb; --blue-soft: #dbeafe;
  --r: 10px; --r-sm: 7px;
  --sh: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --sh-lg: 0 12px 32px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "맑은 고딕", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --top-h: 54px; --sb-h: 30px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); color: var(--tx); background: var(--bg); -webkit-text-size-adjust: 100%; }
a { color: var(--pri); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
.hidden { display: none !important; }
.spacer { flex: 1; }
svg.ic { width: 16px; height: 16px; flex-shrink: 0; vertical-align: -3px; }
i[data-ic] { display: contents; }

/* ── 버튼 ─────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--bd); border-radius: var(--r-sm); background: var(--card); color: var(--tx); font: 600 13px/1 var(--font); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s, box-shadow .12s; text-decoration: none; }
.btn:hover { background: var(--hover); border-color: #cbd5e1; text-decoration: none; }
.btn:focus-visible, .ib:focus-visible, .tb:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--pri-ring); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:disabled:hover { background: var(--card); border-color: var(--bd); }
.btn.primary { background: var(--pri); border-color: var(--pri); color: #fff; }
.btn.primary:hover { background: var(--pri-h); border-color: var(--pri-h); }
.btn.danger { color: var(--red); }
.btn.danger:hover:not(:disabled) { background: var(--red); border-color: var(--red); color: #fff; }
.btn.sm { min-height: 28px; padding: 0 10px; font-size: 12px; gap: 4px; }
.btn.sm svg.ic { width: 14px; height: 14px; }
.btn.big, .btn.lg { min-height: 46px; padding: 0 26px; font-size: 15px; }
.btn.big { margin: 18px 0 8px; }
.btn.block { width: 100%; }
/* 아이콘 버튼 */
.ib { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--tx2); cursor: pointer; flex-shrink: 0; text-decoration: none; }
.ib:hover { background: var(--hover); color: var(--tx); text-decoration: none; }
.ib.danger:hover { background: var(--red-soft); color: var(--red); }
.ib svg.ic { width: 17px; height: 17px; }
.btn.copied, .ib.copied { color: var(--green); border-color: #86efac; }

/* ── 입력 ─────────────────────────────── */
.inp { width: 100%; min-height: 38px; padding: 7px 11px; border: 1px solid var(--bd); border-radius: var(--r-sm); font: 14px var(--font); background: #fff; color: var(--tx); transition: border-color .12s, box-shadow .12s; }
.inp:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px var(--pri-ring); }
.inp[readonly] { background: var(--bg2); }
.inp.sm { width: auto; min-height: 30px; padding: 3px 8px; font-size: 12px; }
select.inp { padding-right: 28px; }
.inp-wrap { position: relative; display: block; }
.inp-wrap svg.ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--tx3); pointer-events: none; }
.inp-wrap > .inp { padding-left: 38px; }
.inp-wrap:focus-within svg.ic { color: var(--pri); }
.card { background: var(--card); border: 1px solid var(--bd); border-radius: var(--r); padding: 20px; box-shadow: var(--sh); }
.card.narrow { max-width: 400px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.msg { color: var(--red); min-height: 1.5em; font-size: 13px; }

/* ── 로그인 ───────────────────────────── */
.login { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(1200px 500px at 50% -10%, #d5eef3 0%, rgba(213, 238, 243, 0) 60%), var(--bg); }
.login-box { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--bd); border-radius: 16px; box-shadow: 0 10px 40px rgba(15, 23, 42, .08); padding: 34px 28px 22px; }
.login-logo { display: block; height: 46px; margin: 0 auto; }
.login-sub { text-align: center; color: var(--tx2); font-size: 13px; margin: 10px 0 24px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld-label { font-size: 12px; font-weight: 700; color: var(--tx2); }
.fld-label em { font-style: normal; font-weight: 400; color: var(--tx3); margin-left: 4px; }
.login .inp { min-height: 46px; font-size: 16px; border-radius: 9px; }
.login .inp.pin { letter-spacing: .5em; font-family: ui-monospace, Consolas, monospace; }
.login .inp.pin::placeholder { letter-spacing: 0; font-family: var(--font); font-size: 14px; }
.login .btn.lg { margin-top: 6px; border-radius: 9px; }
.login .msg { text-align: center; margin-top: -4px; }
.net { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--bd2); font-size: 12px; color: var(--tx2); }
.net svg.ic { width: 14px; height: 14px; }
.net.office { color: var(--green); }
.net.ext { color: var(--amber); }
.login-copy { margin-top: 18px; font-size: 12px; color: var(--tx3); }

/* ── 상단 ─────────────────────────────── */
#app { height: 100%; display: flex; flex-direction: column; }
.top { flex-shrink: 0; display: flex; align-items: center; gap: 4px; height: var(--top-h); padding: 0 12px 0 16px; background: var(--pri); color: #fff; box-shadow: 0 1px 0 var(--pri-d); }
.brand { display: flex; align-items: center; margin-right: 8px; }
.brand img { height: 30px; display: block; }
.tb { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 11px; border: 0; border-radius: var(--r-sm); background: transparent; color: rgba(255, 255, 255, .88); font: 600 13px var(--font); cursor: pointer; white-space: nowrap; }
.tb:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.tb svg.ic { width: 18px; height: 18px; }
.me-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 4px; margin: 0 2px 0 6px; border: 0; border-radius: 20px; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; text-align: left; }
.me-btn:hover { background: rgba(255, 255, 255, .22); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--pri); font-weight: 800; font-size: 14px; text-transform: uppercase; flex-shrink: 0; }
.me-txt { display: flex; flex-direction: column; line-height: 1.15; }
.me-txt b { font-size: 13px; }
.me-txt small { font-size: 11px; opacity: .8; }
.only-m { display: none; }

/* PIN 안내 띠 */
.notice { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--amber-soft); border-bottom: 1px solid #fcd34d; color: #92400e; font-size: 13px; }
.notice > i svg.ic { width: 18px; height: 18px; }
.notice span { flex: 1; min-width: 0; }
.notice .ib { color: #92400e; }

/* ── 본문 ─────────────────────────────── */
.main { flex: 1; min-height: 0; display: flex; }
.side { width: 248px; flex-shrink: 0; padding: 16px 12px; background: var(--card); border-right: 1px solid var(--bd); display: flex; flex-direction: column; overflow-y: auto; }
/* 저장소 목록은 그대로, 즐겨찾기가 많으면 남은 높이 안에서 그 목록만 세로 스크롤 (v1.8.0) */
#volList { flex-shrink: 0; }
#favList { flex: 1 1 0; min-height: 96px; overflow-y: auto; margin: 0 -6px; padding: 0 6px 8px; scrollbar-width: thin; }
.side-title { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--tx3); margin: 0 6px 8px; text-transform: uppercase; }
.side-title.mt { margin-top: 22px; }
.side-row { display: flex; align-items: center; justify-content: space-between; margin-top: -6px; margin-bottom: 2px; }
.side-row .ib { width: 26px; height: 26px; }
.side-row .ib svg.ic { width: 15px; height: 15px; }
.cmd { margin: 6px 0 0; padding: 8px 10px; background: var(--bg2); border: 1px solid var(--bd); border-radius: var(--r-sm); font: 12px/1.6 ui-monospace, Consolas, monospace; white-space: pre; overflow-x: auto; color: var(--tx); }
.lim-inp { display: inline-flex; align-items: center; gap: 4px; }
.lim-inp .inp.sm { width: 76px; }
table.mini td.nw { white-space: nowrap; }
.side-back { display: none; }
.vol { display: flex; gap: 10px; padding: 10px; border: 1px solid transparent; border-radius: var(--r); cursor: pointer; margin-bottom: 4px; transition: background .12s; }
.vol:hover { background: var(--hover); }
.vol.active { background: var(--pri-soft); border-color: #bfe1e9; }
/* 선택 안 된 디스크: 이름·막대만 (세로 공간 확보) */
.vol:not(.active) { align-items: center; padding: 6px 10px; margin-bottom: 2px; }
.vol:not(.active) .vol-ic { width: 28px; height: 28px; border-radius: 8px; }
.vol:not(.active) .bar { margin-bottom: 2px; }
.vol-ic { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--bg); color: var(--tx2); flex-shrink: 0; }
.vol.active .vol-ic { background: var(--pri); color: #fff; }
.vol-body { flex: 1; min-width: 0; }
.vol-name { font-weight: 700; font-size: 13px; }
.vol.active .vol-name { color: var(--pri-d); }
.vol-info { font-size: 11px; color: var(--tx2); }
.vol-warn { font-size: 11px; color: var(--red); font-weight: 700; }
.bar { position: relative; height: 6px; background: #e2e8f0; border-radius: 3px; margin: 5px 0 4px; overflow: visible; }
.bar-fill { height: 100%; border-radius: 3px; transition: width .3s; }
.bar-fill.good { background: var(--pri); }
.bar-fill.warn { background: #f59e0b; }
.bar-fill.bad { background: var(--red); }
.bar-limit { position: absolute; top: -3px; width: 2px; height: 12px; border-radius: 1px; background: #475569; }

.fav { display: flex; align-items: center; gap: 2px; padding: 2px 2px 2px 8px; border-radius: var(--r-sm); }
.fav:hover { background: var(--hover); }
.fav > svg.ic { width: 15px; height: 15px; }
.fav.common > svg.ic { color: var(--pri); }
.fav.personal > svg.ic { color: #f59e0b; }
.fav.users > svg.ic { color: var(--green); }
.fav-name { flex: 1; min-width: 0; padding: 6px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tx); font-size: 13px; }
.fav-name:hover { text-decoration: none; color: var(--pri); }
.fav .ib { width: 28px; height: 28px; }
.fav .ib svg.ic { width: 15px; height: 15px; }
.fav-empty { font-size: 12px; color: var(--tx3); padding: 4px 8px; }

.content { position: relative; flex: 1; min-width: 0; overflow: auto; padding: 16px 20px 24px; }
.crumb-row { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.crumb { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 16px; font-weight: 700; }
.crumb a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 6px; color: var(--tx2); }
.crumb a:hover { background: #e2e8f0; color: var(--tx); text-decoration: none; }
.crumb a:last-child { color: var(--tx); }
.crumb .sep { display: inline-flex; color: var(--tx3); }
.crumb .sep svg.ic { width: 15px; height: 15px; }
.crumb a { white-space: nowrap; }
#btnRefresh { margin-left: auto; }
.vol-memo { flex: 0 100 auto; min-width: 0; display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.memo-pill { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; height: 30px; padding: 0 10px; border: 1px solid #fcd34d; border-radius: 8px; background: #fef3c7; color: #92400e; font: 600 13px var(--font); cursor: pointer; box-shadow: 0 1px 2px rgba(146, 64, 14, .08); }
.memo-pill:hover { background: #fde68a; border-color: #f59e0b; }
.memo-pill svg.ic { width: 15px; height: 15px; flex-shrink: 0; color: #d97706; }
.memo-pill .memo-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memo-pill svg.memo-edit { width: 13px; height: 13px; opacity: .45; }
.memo-pill:hover svg.memo-edit { opacity: 1; }
.vol-memo .memo-add { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border: 0; border-radius: 6px; background: none; color: var(--tx3); font: 12px var(--font); cursor: pointer; }
.vol-memo .memo-add:hover { background: var(--hover); color: var(--pri); }
.vol-memo .memo-add svg.ic { width: 13px; height: 13px; }
.vol-memo .ib { width: 28px; height: 28px; }
.vol-memo .ib svg.ic { width: 14px; height: 14px; }
.toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.sel-info { font-size: 12px; font-weight: 700; color: var(--pri); background: var(--pri-soft); padding: 5px 10px; border-radius: 20px; margin-right: 2px; }

/* 파일 목록 */
.file-card { background: var(--card); border: 1px solid var(--bd); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.files { width: 100%; border-collapse: collapse; }
.files th, .files td { padding: 8px 12px; border-bottom: 1px solid var(--bd2); text-align: left; vertical-align: middle; }
.files th { background: var(--bg2); font-size: 12px; font-weight: 700; color: var(--tx2); white-space: nowrap; }
.files tbody tr { transition: background .1s; }
.files tbody tr:hover { background: #f8fafc; }
.files tbody tr.sel { background: var(--pri-soft); }
.files tbody tr:last-child td { border-bottom: 0; }
.files .r { text-align: right; }
.files td.nw { white-space: nowrap; }
.files input[type=checkbox], #chkAll { width: 16px; height: 16px; accent-color: var(--pri); cursor: pointer; vertical-align: middle; }
.c-chk { width: 40px; }
.c-size { width: 100px; text-align: right !important; white-space: nowrap; color: var(--tx2); font-size: 13px; }
.c-time { width: 140px; white-space: nowrap; color: var(--tx2); font-size: 13px; }
.c-act { width: 1%; white-space: nowrap; }
.c-name { word-break: keep-all; overflow-wrap: anywhere; }
.name-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nm { color: var(--tx); font-weight: 500; word-break: keep-all; overflow-wrap: anywhere; }
.nm:hover { color: var(--pri); text-decoration: none; }
.name-txt { min-width: 140px; }   /* 좁은 창에서 이름이 한 글자씩 세로로 나열되지 않도록 */
.meta { display: none; font-size: 11px; color: var(--tx3); }
.up-row a { display: inline-flex; align-items: center; gap: 10px; color: var(--tx2); font-weight: 600; }
.up-row a:hover { color: var(--pri); text-decoration: none; }
/* 종류별 파일 아이콘 */
.fi { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; }
.fi svg.ic { width: 18px; height: 18px; }
.fi.dir { background: var(--pri-soft); color: var(--pri); }
.fi.dir svg.ic { fill: currentColor; stroke: none; }
.fi.dir.cup { background: #ffedd5; color: #ea580c; }
/* 공유 표시 (v1.8.0): 로컬 공유 폴더 = 초록 + 사람 표시(아래) / 외부 공유 링크 = 파란 링크 표시(위) */
.fi { position: relative; }
.fi.dir.lsh { background: var(--green-soft); color: var(--green); }
.fi .fb { position: absolute; right: -5px; display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--card); color: #fff; }
.fi .fb svg.ic { width: 10px; height: 10px; fill: none !important; stroke: currentColor !important; stroke-width: 2.6; }
.fi .fb.l { bottom: -5px; background: var(--green); }
.fi .fb.x { top: -5px; background: var(--blue); }
/* 즐겨찾기 켜짐 (별 채움) */
.ib.on, .files .acts .ib.on { color: #f59e0b !important; }
.ib.on svg.ic, .sheet-item.on svg.ic { fill: #f59e0b; stroke: #f59e0b; }
.crumb-row .ib.star { color: var(--tx3); }
.crumb-row .ib.star:hover { color: #f59e0b; background: var(--amber-soft); }
.fi.img { background: #f3e8ff; color: #9333ea; }
.fi.vid { background: #ffe4e6; color: #e11d48; }
.fi.aud { background: #fce7f3; color: #db2777; }
.fi.pdf { background: #fee2e2; color: #dc2626; }
.fi.zip { background: #fef3c7; color: #b45309; }
.fi.doc { background: #dbeafe; color: #2563eb; }
.fi.xls { background: #dcfce7; color: #16a34a; }
.fi.ppt { background: #ffedd5; color: #ea580c; }
.fi.code { background: #e0e7ff; color: #4f46e5; }
.fi.txt, .fi.etc { background: #f1f5f9; color: #64748b; }
.fi.up { background: var(--bg); color: var(--tx2); }
.acts { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.files .acts { flex-wrap: nowrap; }
.files .acts .ib { color: var(--tx3); }
.files tbody tr:hover .acts .ib { color: var(--tx2); }
.files .acts .ib:hover { color: var(--pri); background: var(--pri-soft); }
.kebab { display: none !important; }
.empty { padding: 48px 20px; text-align: center; color: var(--tx2); }
.empty svg.ic { width: 40px; height: 40px; color: var(--tx3); stroke-width: 1.5; margin-bottom: 8px; }
.empty small { display: block; color: var(--tx3); margin-top: 2px; }
.drop-overlay { position: absolute; inset: 10px; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; border: 2px dashed var(--pri); border-radius: 14px; background: rgba(231, 244, 247, .92); font-size: 18px; font-weight: 700; color: var(--pri); pointer-events: none; z-index: 5; }
.drop-overlay svg.ic { width: 48px; height: 48px; stroke-width: 1.6; }
.hint { font-size: 12px; color: var(--tx2); background: var(--bg2); border: 1px solid var(--bd); border-radius: var(--r-sm); padding: 10px 12px; line-height: 1.7; }

/* ── 업로드 / 전송 패널 ───────────────── */
.up-panel { position: fixed; right: 16px; bottom: calc(var(--sb-h) + 12px); z-index: 40; width: 440px; max-height: 52vh; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--bd); border-radius: 12px; box-shadow: var(--sh-lg); overflow: hidden; }
.up-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--bd2); font-weight: 700; background: var(--bg2); }
.up-head > i svg.ic { color: var(--pri); }
.up-list { overflow-y: auto; padding: 4px 14px 8px; }
#upTitle, #actTitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.job { padding: 9px 0; border-bottom: 1px solid var(--bd2); }
.job:last-child { border-bottom: 0; }
.job-top { display: flex; gap: 8px; align-items: center; }
.job-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.job-st { font-size: 11px; color: var(--tx2); margin-top: 2px; }
.job.done .job-st { color: var(--green); }
.job.fail .job-st { color: var(--red); }
.job .bar { margin: 6px 0 0; height: 5px; }
.job .bar-fill { background: var(--pri); }
.job.done .bar-fill { background: var(--green); }
.job.fail .bar-fill { background: var(--red); }

/* 하단 상태바 */
.status-bar { flex-shrink: 0; height: var(--sb-h); display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--card); border-top: 1px solid var(--bd); font-size: 12px; color: var(--tx2); z-index: 30; }
.sb-mine, .sb-all { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sb-mine svg.ic, .sb-all svg.ic { width: 13px; height: 13px; }
.sb-mine { color: var(--pri); font-weight: 700; }
.sb-all:hover, .sb-mine:hover { color: var(--pri); }
.sb-all b.up { color: var(--blue); }
.sb-all b.down { color: var(--green); }
.act-dir { display: inline-flex; font-weight: 700; }
.act-dir svg.ic { width: 15px; height: 15px; }
.act-dir.up { color: var(--blue); }
.act-dir.down { color: var(--green); }
.act-user { font-size: 11px; color: var(--tx2); white-space: nowrap; }

/* ── 대화상자 ─────────────────────────── */
dialog.dlg { border: 0; border-radius: 14px; padding: 22px; width: 480px; min-width: 0; max-width: 94vw; max-height: 90vh; color: var(--tx); box-shadow: var(--sh-lg); overflow: auto; }
dialog.dlg.wide { width: 860px; }
dialog.dlg.xwide { width: 1200px; }
dialog.dlg::backdrop { background: rgba(15, 23, 42, .42); backdrop-filter: blur(2px); }
dialog.dlg h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 17px; }
dialog.dlg h3 svg.ic { width: 20px; height: 20px; color: var(--pri); }
.dlg-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 5px; color: var(--tx2); font-size: 12px; font-weight: 700; }
.form p { margin: 0; }
.fname { display: flex; align-items: center; gap: 10px; font-weight: 700; word-break: break-all; padding: 10px; background: var(--bg2); border: 1px solid var(--bd2); border-radius: var(--r-sm); }
.share-out { display: flex; gap: 6px; align-items: center; }
.dlist { max-height: 200px; overflow-y: auto; margin: 8px 0; padding-left: 20px; word-break: break-all; color: var(--tx2); }
.tbl-wrap { max-height: 60vh; overflow: auto; }
table.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
table.mini th, table.mini td { padding: 8px 10px; border-bottom: 1px solid var(--bd2); text-align: left; vertical-align: middle; }
table.mini th { position: sticky; top: 0; background: var(--bg2); color: var(--tx2); font-size: 12px; white-space: nowrap; z-index: 1; }
table.mini tr.dim td { color: var(--tx3); text-decoration: line-through; }
table.mini tr.dim td.acts { text-decoration: none; }
table.mini td.acts { display: table-cell; white-space: nowrap; }
table.mini td.acts > * + * { margin-left: 4px; }
table.mini td.acts > .inp.sm { width: 150px; }
.add-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--bd2); }
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge svg.ic { width: 12px; height: 12px; }
.badge.ok { background: var(--green-soft); color: #166534; }
.badge.warn { background: var(--amber-soft); color: #92400e; }
.badge.bad { background: var(--red-soft); color: #991b1b; }
.badge.gray { background: #e2e8f0; color: #475569; }
.badge.lsh { background: var(--green-soft); color: #166534; }
.badge.xsh { background: var(--blue-soft); color: #1e40af; }
small.sub { color: var(--tx3); }
/* 공유 관리 분류 탭 */
.tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--bd2); }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--tx2); font: 600 13px var(--font); cursor: pointer; }
.tab:hover { color: var(--tx); }
.tab.on { color: var(--pri); border-bottom-color: var(--pri); }
.tab-n { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--bg); color: var(--tx2); font-size: 11px; text-align: center; }
.tab.on .tab-n { background: var(--pri-soft); color: var(--pri); }
/* 사용자 지정 공유 대상 */
.upick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; max-height: 200px; overflow-y: auto; padding: 8px; border: 1px solid var(--bd); border-radius: var(--r-sm); background: var(--bg2); font-weight: 400; color: var(--tx); }
.form .upick-item { flex-direction: row; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--tx); cursor: pointer; }
.upick-item:hover { background: var(--card); }
.upick-item input { width: 15px; height: 15px; accent-color: var(--pri); }
.upick-item small { color: var(--tx3); font-weight: 400; font-size: 11px; }
/* 내 정보 */
.sec { padding: 14px; border: 1px solid var(--bd2); border-radius: var(--r); }
.sec + .sec { margin-top: 12px; }
.sec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 700; }
.sec > .sec-head:only-child { margin-bottom: 0; }
.sec-head svg.ic { color: var(--pri); }
.sec-desc { font-size: 12px; color: var(--tx2); margin: -4px 0 10px; line-height: 1.6; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sec .btn { margin-top: 10px; }
/* 모바일 동작 메뉴 */
.sheet-name { display: flex; align-items: center; gap: 10px; font-weight: 700; word-break: break-all; padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid var(--bd2); }
.sheet-list { display: flex; flex-direction: column; }
.sheet-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 6px; border: 0; border-bottom: 1px solid var(--bd2); background: none; color: var(--tx); font: 15px var(--font); text-align: left; cursor: pointer; text-decoration: none; }
.sheet-item:last-child { border-bottom: 0; }
.sheet-item:hover { background: var(--hover); text-decoration: none; }
.sheet-item svg.ic { width: 19px; height: 19px; color: var(--pri); }

/* 작업 로그 */
.log-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.log-info { font-size: 12px; color: var(--tx2); }
table.mini.log { font-size: 12px; }
table.mini.log td.nw { white-space: nowrap; }
table.mini.log td.dt { color: var(--tx2); word-break: break-all; }
table.mini.log tr.lv-warn td { background: #fffbeb; }
table.mini.log tr.lv-error td { background: #fef2f2; color: var(--red); }

/* 브라우저 호환 안내 */
.compat-block { max-width: 520px; margin: 80px auto; padding: 24px; background: var(--card); border: 1px solid var(--bd); border-radius: var(--r); }
.compat-block h2 { margin-top: 0; color: var(--red); }
.compat-ua { font-size: 11px; color: var(--tx2); word-break: break-all; }
.compat-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; background: var(--amber-soft); border-bottom: 1px solid #fcd34d; font-size: 13px; }
.compat-bar span { flex: 1; min-width: 200px; }

/* 알림 */
.toast { position: fixed; left: 50%; bottom: calc(var(--sb-h) + 18px); transform: translateX(-50%); padding: 10px 18px; border-radius: 10px; background: #1e293b; color: #fff; z-index: 99; max-width: 88vw; box-shadow: var(--sh-lg); font-size: 13px; }
.toast.err { background: var(--red); }

/* ── 외부 공유 페이지 ─────────────────── */
body.pub { display: flex; flex-direction: column; min-height: 100%; }
.pub-top { background: var(--pri); }
.pub-top-in { max-width: 900px; margin: 0 auto; padding: 12px 16px; }
.pub-logo { height: 28px; display: block; }
.pub-wrap { flex: 1; width: 100%; max-width: 900px; margin: 0 auto; padding: 28px 16px; }
.pub-foot { text-align: center; font-size: 12px; color: var(--tx3); padding: 18px 16px 24px; }
.pub .card h2 { font-size: 17px; margin: 0; }
.pub .card.narrow h2 { display: flex; align-items: center; gap: 8px; }
.pub-brand { color: var(--tx2); font-weight: 700; margin-bottom: 8px; }
.pub-file { display: flex; align-items: center; gap: 12px; margin: 4px 0; word-break: break-all; }
.pub-file .fi { width: 48px; height: 48px; border-radius: 12px; }
.pub-file .fi svg.ic { width: 24px; height: 24px; }
.pub-meta, .pub-info { color: var(--tx2); font-size: 13px; }
.pub-info { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.pub-info svg.ic { width: 14px; height: 14px; }
.pub .crumb { margin-bottom: 0; font-size: 15px; }
.pub-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pub .files { border: 1px solid var(--bd); border-radius: var(--r); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.pub .card.narrow { text-align: left; }
.pub .card.narrow .btn.big { width: 100%; }

/* ── 고객 업로드 페이지 (up.php) ──────── */
.pub-wrap:has(.card.cup), body.pub:has(.card.cup) .pub-top-in { max-width: 1000px; }
.card.cup { max-width: 960px; margin: 0 auto; padding: 32px 36px; }
.cup-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.cup-head-t { flex: 1; min-width: 0; }
.cup-secure { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 20px; background: var(--green-soft); color: #166534; font-size: 12px; font-weight: 700; white-space: nowrap; }
.cup-secure svg.ic { width: 14px; height: 14px; }
.cup-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding: 20px 24px; border: 1px solid #b6d7df; border-radius: var(--r); background: linear-gradient(135deg, #e7f4f7 0%, #f0fdfa 100%); }
.cup-hero-ic { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--pri); color: #fff; flex-shrink: 0; box-shadow: 0 0 0 6px rgba(21, 123, 146, .12); }
.cup-hero-ic svg.ic { width: 28px; height: 28px; }
.cup-hero b { display: block; font-size: 16px; color: var(--pri-d); margin-bottom: 8px; }
.cup-chips { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.cup-chips span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; background: #fff; border: 1px solid #b6d7df; color: var(--pri-d); font-size: 12px; font-weight: 600; }
.cup-chips svg.ic { width: 13px; height: 13px; color: var(--green); stroke-width: 3; }
.cup-badge { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; background: var(--pri-soft); color: var(--pri); flex-shrink: 0; }
.cup-badge svg.ic { width: 24px; height: 24px; }
.cup-safe { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cup-safe li { display: flex; gap: 14px; padding: 18px 20px; border: 1px solid var(--bd2); border-radius: var(--r); background: var(--bg2); }
.cup-safe-ic { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--pri-soft); color: var(--pri); flex-shrink: 0; }
.cup-safe-ic svg.ic { width: 18px; height: 18px; }
.cup-safe b { display: block; font-size: 14px; margin-bottom: 4px; }
.cup-safe div > span { display: block; font-size: 13px; color: var(--tx2); line-height: 1.65; word-break: keep-all; }
.cup-drop { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 16px; border: 2px dashed #b6d7df; border-radius: var(--r); background: #f7fbfc; text-align: center; transition: background .12s, border-color .12s; }
.cup-drop.on { background: var(--pri-soft); border-color: var(--pri); }
.cup-drop > svg.ic { width: 38px; height: 38px; color: var(--pri); }
.cup-drop-t { font-weight: 600; color: var(--tx2); }
.cup-drop-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cup-sum { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg2); border: 1px solid var(--bd2); font-size: 13px; }
.cup-sum span { color: var(--tx2); font-size: 12px; }
.cup-sum.run { background: var(--blue-soft); border-color: #bfdbfe; }
.cup-sum.ok { background: var(--green-soft); border-color: #bbf7d0; }
.cup-sum.ok b { color: #166534; }
.cup-sum.bad { background: var(--red-soft); border-color: #fecaca; }
.cup-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; max-height: 50vh; overflow-y: auto; }
.cup-item { padding: 8px 10px; border: 1px solid var(--bd2); border-radius: var(--r-sm); }
.cup-item-top { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cup-name { flex: 1; min-width: 0; word-break: break-all; }
.cup-st { color: var(--tx2); font-size: 12px; white-space: nowrap; }
.cup-bar { height: 4px; margin-top: 6px; border-radius: 4px; background: var(--bd2); overflow: hidden; }
.cup-bar i { display: block; height: 100%; width: 0; background: var(--pri); transition: width .2s; }
.cup-item.done .cup-bar i { background: var(--green); }
.cup-item.done .cup-st { color: #166534; font-weight: 600; }
.cup-item.fail .cup-bar i { background: var(--red); }
.cup-item.fail .cup-st { color: var(--red); white-space: normal; }
.cup-item.cancel { opacity: .5; }

/* ── 반응형 ───────────────────────────── */
@media (max-width: 1100px) {
  .top .tb span { display: none; }
  .me-txt small { display: none; }
  /* 중간 폭: 크기·수정일 열 대신 이름 아래 한 줄 표시 → 이름 칸 확보 */
  .c-size, .c-time { display: none; }
  .meta { display: block; }
}
@media (max-width: 768px) {
  :root { --top-h: 52px; }
  .only-m { display: inline-flex; }
  .top { padding: 0 6px; gap: 0; }
  .brand { margin-right: 0; }
  .brand img { height: 26px; }
  .tb { padding: 0 9px; }
  .me-txt { display: none; }
  .me-btn { padding: 0 4px; margin: 0 2px; background: transparent; }
  .avatar { width: 30px; height: 30px; font-size: 13px; }
  .notice { padding: 8px 10px; font-size: 12px; gap: 8px; }

  /* 왼쪽 목록 → 서랍 */
  .side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: 286px; max-width: 86vw; padding-top: 18px; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--sh-lg); }
  body.side-open .side { transform: none; }
  body.side-open .side-back { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(15, 23, 42, .4); }

  .content { padding: 12px 10px 20px; }
  .crumb { font-size: 15px; }
  .toolbar { gap: 6px; }
  .toolbar .btn:not(.primary) span { display: none; }
  .toolbar .btn:not(.primary) { padding: 0 10px; }
  .toolbar .btn { min-height: 38px; }

  .c-size, .c-time { display: none; }
  .files th, .files td { padding: 8px; }
  .files td.c-chk, .files th.c-chk { width: 34px; padding-right: 0; }
  .files td.c-act { padding-left: 0; }
  .files .acts .ib:not(.kebab) { display: none; }
  .kebab { display: inline-flex !important; width: 36px; height: 36px; }
  .meta { display: block; }
  .nm { font-size: 14px; }

  .up-panel { left: 8px; right: 8px; width: auto; bottom: calc(var(--sb-h) + 8px); max-height: 60vh; }
  .status-bar { padding: 0 10px; gap: 8px; }

  dialog.dlg { min-width: 0; width: 100%; max-width: calc(100vw - 16px); padding: 18px 16px; border-radius: 14px; }
  dialog.dlg.wide, dialog.dlg.xwide { width: 100%; }
  dialog.dlg.sheet { margin: auto auto 8px; }
  .dlg-btns { flex-wrap: wrap; }
  .dlg-btns .btn { flex: 1; }
  .row2 { grid-template-columns: 1fr; }
  .add-row > * { flex: 1 1 40%; }
  .pub-wrap { padding: 16px 10px; }
  .pub .c-time { display: none; }
  .card.cup { padding: 20px 16px; }
  .cup-head { flex-wrap: wrap; }
  .cup-hero { flex-direction: column; align-items: flex-start; padding: 16px; }
  .cup-safe { grid-template-columns: 1fr; gap: 10px; }
  .cup-safe li { padding: 14px; }
  .cup-item-top { flex-wrap: wrap; }
}
