/* 공용 모양 — 2026-11-15 새로 손봄 (대표님 「UI/UX 전부 바꿔도 돼 · 아직 보기 불편」 · 00_총괄)
   글자 키움(14→15) · 여백 넓힘 · 테두리·그림자 줄임 · 글꼴 Pretendard (app.js/dg_nav.js 의 SW_SHELL 이 불러옴).
   왼쪽 메뉴 모양은 여기가 아니라 app.js · dg_nav.js 안의 SW-SHELL 덩어리에 있습니다.
   예전 모양으로 되돌리려면: python 작업방/00_총괄/화면개편2_1115_원상복구/원상복구.py --실행
   11-15 3차: 토스 결(회색 바탕 #f2f4f6 · 테두리 없는 흰 카드 · 둥글기 20). 3차만 되돌리기: 화면개편3_1115_원상복구/원상복구.py --실행 */
:root{
  --bg:#f2f4f6; --card:#fff; --line:#e5e8eb; --txt:#191f28; --dim:#6b7684;
  --pri:#2563eb; --pri-l:#eaf2ff; --ok:#16a34a; --warn:#f59e0b; --bad:#dc2626;
  --r:20px; --sh:none;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--txt); font-size:15px; line-height:1.6;
  font-family:"Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,"Segoe UI","Malgun Gothic","맑은 고딕",
    "Apple SD Gothic Neo",Roboto,sans-serif;
  letter-spacing:-.01em; -webkit-text-size-adjust:100%; -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font-family:inherit;font-size:14px}

/* ---------- 레이아웃 ---------- */
/* header.top · nav.menu 는 이제 공유 링크(읽기 전용) 화면에서만 씁니다 — 평소엔 왼쪽 메뉴(SW_SHELL) */
header.top{
  position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid var(--line);
  display:flex;align-items:center;gap:14px;padding:10px 18px;flex-wrap:wrap;
}
.brand{font-weight:800;font-size:15px;letter-spacing:-.3px;white-space:nowrap}
.brand small{display:block;font-weight:500;font-size:11px;color:var(--dim)}
nav.menu{display:flex;gap:4px;flex-wrap:wrap;flex:1}
nav.menu a{
  padding:7px 13px;border-radius:99px;color:var(--dim);font-weight:600;font-size:13px;
}
nav.menu a:hover{background:#f1f4f8;color:var(--txt)}
nav.menu a.on{background:var(--pri);color:#fff}
.who{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--dim);white-space:nowrap}
.avatar{width:26px;height:26px;border-radius:99px;background:var(--pri);color:#fff;
  display:grid;place-items:center;font-size:12px;font-weight:700}
main{padding:26px 30px 64px;max-width:1500px;margin:0 auto}

/* ---------- 공통 ---------- */
.card{background:var(--card);border:0;border-radius:var(--r);
  box-shadow:var(--sh);padding:24px;margin-bottom:16px}
.card>h2{margin:0 0 14px;font-size:18px;font-weight:700;letter-spacing:-.02em;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.card>h2 .sp{flex:1}
.grid{display:grid;gap:16px}
.g2{grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}
.g3{grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}
.g4{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.sp{flex:1}
.dim{color:var(--dim)}
.small{font-size:12.5px}
.hide{display:none !important}

/* ---------- 버튼/입력 ---------- */
.btn{
  background:var(--pri);color:#fff;border:0;border-radius:12px;padding:10px 16px;font-size:14.5px;
  font-weight:600;cursor:pointer;white-space:nowrap;line-height:1.3;
}
.btn:hover{filter:brightness(1.06)}
.btn.gray{background:rgba(0,27,55,.07);color:#333d4b}
.btn.gray:hover{background:rgba(0,27,55,.12);filter:none}
.btn.red{background:var(--bad)}
.btn.line{background:#e8f1ff;color:#1b5fd9;border:0}
.btn.sm{padding:7px 12px;font-size:13px;border-radius:9px}
input,select,textarea{
  width:100%;padding:10px 13px;border:1px solid #d1d6db;border-radius:12px;background:#fff;color:var(--txt);
}
input::placeholder,textarea::placeholder{color:#a3acb7}
input:focus,select:focus,textarea:focus{outline:3px solid var(--pri-l);border-color:var(--pri)}
label.f{display:block;margin-bottom:12px}
label.f>span{display:block;font-size:12.5px;font-weight:600;color:var(--dim);margin-bottom:5px}

/* ---------- 표 ---------- */
.tbl-wrap{overflow:auto;border:0;border-radius:var(--r);background:#fff}
table{border-collapse:collapse;width:100%;font-size:13.5px;white-space:nowrap}
th,td{padding:12px 14px;border-bottom:1px solid #f2f4f6;text-align:left}
th{background:#f9fafb;font-size:12.5px;font-weight:600;color:var(--dim);position:sticky;top:0;z-index:2}
tbody tr:hover{background:#f8fafd}
td.wrap{white-space:normal;min-width:180px}

/* ---------- 뱃지 ---------- */
.tag{display:inline-block;padding:3px 9px;border-radius:99px;font-size:11.5px;font-weight:600;
  background:#eceef1;color:#4e5968}
.tag.b{background:#e8f1ff;color:#1b5fd9}
.tag.g{background:#e3f7ec;color:#0a7d43}
.tag.y{background:#fff1d6;color:#a65f00}
.tag.r{background:#ffebee;color:#c9252d}

/* ---------- 통계 ---------- */
.stat{background:#fff;border:0;border-radius:var(--r);padding:16px 18px;box-shadow:var(--sh)}
.stat b{display:block;font-size:28px;font-weight:800;line-height:1.2;letter-spacing:-.03em}
.stat span{font-size:12.5px;color:var(--dim);font-weight:600}
.bar{height:7px;border-radius:99px;background:#eceef1;overflow:hidden;margin-top:8px}
.bar>i{display:block;height:100%;background:var(--pri)}

/* ---------- 체크리스트 ---------- */
.chk{display:flex;align-items:flex-start;gap:10px;padding:10px 4px;border-bottom:1px solid #eef0f3}
.chk:last-child{border-bottom:0}
.chk input[type=checkbox]{width:19px;height:19px;margin-top:3px;flex:0 0 auto;cursor:pointer;accent-color:var(--pri)}
.chk .t{flex:1;min-width:0}
.chk.done .t{text-decoration:line-through;color:var(--dim)}

/* ---------- 모달 ---------- */
.mask{position:fixed;inset:0;background:rgba(15,23,42,.5);display:grid;place-items:center;
  z-index:100;padding:16px}
.modal{background:#fff;border-radius:24px;max-width:640px;width:100%;max-height:88vh;
  overflow:auto;padding:28px}
.modal h3{margin:0 0 16px;font-size:18px;font-weight:700;letter-spacing:-.02em}

/* ---------- 로그인 ---------- */
.login-wrap{min-height:100vh;display:grid;place-items:center;padding:20px}
.login{background:#fff;border-radius:20px;box-shadow:0 10px 40px rgba(16,24,40,.10);
  padding:32px;width:100%;max-width:380px}
.login h1{font-size:20px;margin:0 0 4px;letter-spacing:-.02em}
.login p{margin:0 0 20px;color:var(--dim);font-size:13.5px}

/* ---------- 토스트 ---------- */
#toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);z-index:200;
  background:#191f28;color:#fff;padding:11px 20px;border-radius:99px;font-size:13.5px;font-weight:500;
  opacity:0;pointer-events:none;transition:opacity .25s}
#toast.on{opacity:1}

#loading{position:fixed;inset:0;z-index:300;display:flex;flex-direction:column;gap:12px;
  align-items:center;justify-content:center;background:rgba(244,245,247,.92);
  color:var(--dim);font-size:13.5px;font-weight:600}
.spin{width:32px;height:32px;border:3px solid var(--line);border-top-color:var(--pri);
  border-radius:99px;animation:sp .8s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}

.ro-banner{background:#fff8e6;border:1px solid #f3d99b;color:#8a5a00;padding:10px 14px;
  border-radius:12px;margin-bottom:14px;font-size:13.5px;font-weight:600}

/* 왼쪽 메뉴가 있는 넓은 화면 — 「불러오는 중」 가림막이 메뉴를 덮지 않게 */
@media(min-width:1100px){ html.sw-shell #loading{left:232px} }
/* 태블릿·좁은 창 */
@media(max-width:900px){ main{padding:18px 16px 48px} .card{padding:18px} }

@media(max-width:640px){
  main{padding:12px}
  header.top{padding:9px 12px;gap:9px}
  nav.menu{order:3;width:100%}
  .card{padding:13px}

  /* ── 폰에서 표 보기 (2026-09-20) ──────────────────────────
     좁은 화면에서 한 번에 보이는 정보가 너무 적었습니다.
     ① 글자·여백을 줄여 한 화면에 더 담습니다
     ② 업체명 칸은 왼쪽에 붙여둬서 옆으로 밀어도 어느 가게인지 보입니다
     ③ 리뷰 내용은 3줄까지만 — 눌러서 펼칩니다                        */
  main{padding:8px}
  table{font-size:11.5px}
  th,td{padding:5px 6px}
  th{font-size:10.5px}
  .tbl-wrap{border-radius:8px}
  .btn.sm{padding:3px 6px;font-size:11px}
  table input,table select{font-size:11.5px;padding:2px 4px}
  table input{max-width:110px}

  /* 업체명 칸을 왼쪽에 붙여둡니다 — 옆으로 밀어도 어느 가게인지 보입니다
     (악플 목록 table.badtbl 은 3번째 칸, 업체관리 table#clTbl 은 2번째 칸) */
  table.badtbl td:nth-child(3),table.badtbl th:nth-child(3){position:sticky;left:0;z-index:1;
    background:#fff;box-shadow:1px 0 0 var(--line)}
  table.badtbl th:nth-child(3){z-index:3;background:#f7f9fc}
  table#clTbl td:nth-child(2),table#clTbl th:nth-child(2){position:sticky;left:0;z-index:1;
    background:#fff;box-shadow:1px 0 0 var(--line)}
  table#clTbl th:nth-child(2){z-index:3;background:#f7f9fc}

  /* 리뷰 내용 — 3줄만 보이고 누르면 다 펼칩니다 */
  td.badtxt{white-space:normal;max-width:60vw;min-width:190px;line-height:1.35;
    display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
    cursor:pointer}
  td.badtxt.open{display:table-cell;-webkit-line-clamp:unset;overflow:visible}

  /* 폰에서는 접어둡니다 — 메뉴가 9줄이나 차지해 표가 안 보였습니다 */
  nav.menu.mob-hide,.mob-hide{display:none!important}
  #toolcard h2{flex-wrap:wrap;gap:4px;font-size:15px}
  .mobmenu{margin-left:auto}
  header.top nav.menu{flex-direction:column;align-items:flex-start;gap:2px;
    max-height:52vh;overflow:auto}

  /* 안내문은 2줄만 — 누르면 다 펼칩니다 (화면 절반을 먹고 있었습니다) */
  .hint{line-height:1.4;cursor:pointer;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .hint.open{display:block;-webkit-line-clamp:unset;overflow:visible}
  .hint::after{content:' … 눌러서 더보기';color:#94a3b8;font-size:11px}
  .hint.open::after{content:''}

  /* 악플 목록 — 수집일·별점은 숨겨서 리뷰 내용을 넓게 봅니다 */
  table.badtbl td:nth-child(2),table.badtbl th:nth-child(2),
  table.badtbl td:nth-child(4),table.badtbl th:nth-child(4){display:none}
  .badwrap{max-height:74vh}

  /* 업체관리 한 줄이 너무 높았습니다 — 업체명 칸의 보조 정보를 접습니다.
     업체명·아이디만 먼저 보이고, 자세한 건 그 업체를 눌러 열면 다 나옵니다.  */
  table#clTbl td:nth-child(2){max-width:44vw}
  table#clTbl td:nth-child(2) .memtag,
  table#clTbl td:nth-child(2) .tag{font-size:10px;padding:1px 4px}
  /* 업체명 칸의 작은 표시(메모·태그·답글수)는 기본으로 접습니다 — 업체명을 누르면 다 나옵니다 */
  table#clTbl td:nth-child(2) .memtag,
  table#clTbl td:nth-child(2) .tag,
  table#clTbl td:nth-child(2) > div{display:none}
  table#clTbl td:nth-child(2).open .memtag,
  table#clTbl td:nth-child(2).open .tag{display:inline-block}
  table#clTbl td:nth-child(2).open > div{display:block}
  table#clTbl td:nth-child(2) b,table#clTbl td:nth-child(2) .nm{font-size:12.5px}
  /* 리뷰노트 등 보조 입력칸도 접습니다 */
  table#clTbl td:nth-child(3) input:nth-of-type(n+3){display:none}
  table#clTbl td:nth-child(3).open input{display:block}
  table#clTbl td:nth-child(2){cursor:pointer}
  table#clTbl td{vertical-align:top}
  /* 순서 바꾸는 ▲▼⠿ 는 폰에서 숨깁니다 (자리만 차지합니다 — PC 에서 바꾸시면 됩니다) */
  table#clTbl .ord,table#clTbl .grip,table#clTbl .drag,table#clTbl .handle{display:none}
  table#clTbl .nmwrap{display:block}
  /* 칸을 좁혀 한 화면에 더 담습니다 */
  table#clTbl th,table#clTbl td{padding:4px 5px;font-size:11px}
  table#clTbl{table-layout:fixed;width:100%}
  table#clTbl td{overflow:hidden;text-overflow:ellipsis}
  table#clTbl td:nth-child(2){min-width:0}
  table#clTbl td:nth-child(2) b{font-size:12px}
  table#clTbl .acct code,table#clTbl .acct input{font-size:10.5px}

  /* 한 줄 높이 줄이기 — 칸마다 첫 줄만 보이고, 그 칸을 누르면 다 펼칩니다.
     이렇게 안 하면 업체 한 곳이 화면 절반(360px)을 먹어서 두 곳밖에 안 보입니다. */
  table#clTbl tbody td > div + div,
  table#clTbl tbody td > br{display:none}
  table#clTbl tbody td.open > div + div{display:block}
  table#clTbl tbody td input,table#clTbl tbody td textarea,
  table#clTbl tbody td select{height:24px;min-height:0;line-height:1.2}
  table#clTbl tbody td textarea{overflow:hidden}
  table#clTbl tbody td input + input,
  table#clTbl tbody td textarea + textarea{display:none}
  table#clTbl tbody td.open input + input,
  table#clTbl tbody td.open textarea + textarea{display:block}
  table#clTbl tbody td{cursor:pointer}

  /* 아이디·비번 칸(.acct) 이 144px 이나 됩니다 — 아이디·비번 두 줄만 보이게 하고
     리뷰노트·사장님 요구사항은 그 칸을 누를 때 나옵니다  */
  /* 칸 내용 전체를 46px 까지만 — 그 칸을 누르면 다 펼칩니다 */
  table#clTbl tbody td .cw{max-height:46px;overflow:hidden;display:block}
  table#clTbl tbody td.open .cw{max-height:none;overflow:visible}

  /* 칸 안의 묶음 상자들(아이디·리뷰노트·소식 등)은 46px 까지만 — 누르면 다 펼칩니다 */
  table#clTbl tbody td > div,table#clTbl tbody td > label,
  td .acct,td .rnbox,td .ntc{max-height:46px;overflow:hidden}
  table#clTbl tbody td.open > div,table#clTbl tbody td.open > label,
  td.open .acct,td.open .rnbox,td.open .ntc{max-height:none;overflow:visible}
}
@media print{ header.top,.btn,nav.menu{display:none !important} }

/* 밖에 있는 도구 링크 (새 창) */
.ext{color:#7c3aed!important}
.ext:hover{background:#f5f0ff}
/* 배포 확인용 표시 0920-2212 */
