/* 엘피컴솔루션 메일 - 네이버 메일 스타일 화면 */
:root {
  /* 대표색 : 로그인 화면 · 환경설정에서 바꾼다 (mail.js applyBrand 가 아래 값을 다시 계산해 덮어쓴다) */
  --brand: #f6b79c;          /* RGB(246,183,156) */
  --brand-hover: #f2a27f;    /* 버튼에 마우스를 올렸을 때 */
  --brand-dark: #a4502b;     /* 흰 바탕 위 글자 · 아이콘 (읽기 쉬운 진한 색) */
  --brand-soft: #fdf1ec;     /* 옅은 바탕 */
  --brand-line: #f8d3c3;     /* 옅은 테두리 */
  --on-brand: #3a1f12;       /* 대표색 위의 글자 (밝은 색이면 진하게, 어두운 색이면 흰색) */
  --ink: #1e1e23;
  --ink-2: #505058;
  --ink-3: #8b8b93;
  --line: #e5e7eb;
  --line-2: #f0f1f3;
  --bg: #ffffff;
  --bg-2: #f7f8fa;
  --hover: #f7f7f8;
  --sel: var(--brand-soft);
  --star: #ffb400;
  --danger: #e03131;
  --side-w: 232px;
  --top-h: 60px;
  --radius: 8px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.5 "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.grow { flex: 1; }

.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
     stroke-linejoin: round; flex: none; vertical-align: middle; }
.i.sm { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- 버튼 */
.btn-brand, .btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 6px; font-weight: 600; white-space: nowrap;
}
.btn-brand { background: var(--brand); color: var(--on-brand); }
.btn-brand:hover { background: var(--brand-hover); }
.btn-brand:disabled { opacity: .6; cursor: default; }
.btn-brand.big { height: 50px; font-size: 17px; width: 100%; border-radius: 8px; }
.btn-line { border: 1px solid #d5d7dc; background: #fff; color: var(--ink-2); font-weight: 500; }
.btn-line:hover { border-color: #b8bbc2; color: var(--ink); }
.btn-line.sm { height: 28px; padding: 0 10px; font-size: 13px; cursor: pointer; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink-2); }
.icon-btn:hover { background: var(--line-2); }
.icon-btn.sm { width: 26px; height: 26px; }
.link-btn { color: var(--ink-3); font-size: 13px; padding: 4px 6px; white-space: nowrap; }
.link-btn:hover { color: var(--brand-dark); text-decoration: underline; }

/* ---------------------------------------------------------------- 로그인 */
.login { min-height: 100%; display: grid; place-items: center; align-content: center; gap: 18px;
         background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 60%); padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
              padding: 36px 32px 28px; box-shadow: 0 8px 30px rgba(0, 0, 0, .06); }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login-logo div { display: flex; flex-direction: column; line-height: 1.25; }
.login-logo strong { font-size: 20px; }
.login-logo span { color: var(--brand-dark); font-weight: 700; font-size: 15px; }
.field { display: block; margin-bottom: 10px; }
.field input, .id-box { width: 100%; height: 50px; border: 1px solid #d5d7dc; border-radius: 8px; padding: 0 14px; font-size: 15px; }
.id-box { display: flex; align-items: center; padding: 0; overflow: hidden; }
.id-box input { border: 0; height: 100%; flex: 1; min-width: 0; padding: 0 14px; outline: 0; }
.id-domain { padding: 0 12px; white-space: nowrap; font-size: 14px; color: var(--ink-3); background: var(--bg-2); height: 100%; display: flex; align-items: center; border-left: 1px solid var(--line); }
.id-domain b { font-weight: 400; }
.field input:focus, .id-box:focus-within { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.caps { color: #c77700; font-size: 13px; margin: 0 0 6px; }
.login-error { color: var(--danger); font-size: 13px; min-height: 20px; margin: 4px 0 10px; }
.login-note { color: var(--ink-3); font-size: 13px; text-align: center; margin: 16px 0 0; }
.login-foot { color: var(--ink-3); font-size: 12px; margin: 0; }
.pw-row { display: flex; align-items: flex-start; gap: 10px; }
.pw-row .field { flex: 1; min-width: 0; }
.pw-remember { flex: none; width: 22px; height: 22px; margin: 14px 2px 0; accent-color: var(--brand-dark); cursor: pointer; }
.exit-btn { margin-top: 10px; height: 46px; font-size: 15px; width: 100%; border-radius: 8px; }
.co-mark { display: block; height: auto; object-fit: contain; flex: none; }
.login-logo .co-mark { width: 50px; }
.logo .co-mark { width: 34px; }

/* ---------------------------------------------------------------- 전체 틀 */
/* 하단 회사 로고 : 화면 맨 아래에 고정 (본문을 끝까지 올려도 움직이지 않는다) → 화면 틀은 그 높이만큼 비워 둔다 */
:root { --foot-h: 44px; }
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: var(--top-h) minmax(0, 1fr);
  height: 100vh; height: 100dvh; padding-bottom: calc(var(--foot-h) + env(safe-area-inset-bottom, 0px)); }
.app-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; justify-content: center; align-items: center;
  height: calc(var(--foot-h) + env(safe-area-inset-bottom, 0px)); padding: 0 12px env(safe-area-inset-bottom, 0px);
  border-top: 1px solid var(--line); background: #fff; }
.app-foot img { display: block; height: 30px; width: auto; max-width: 100%; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 20px 0 16px;
          border-bottom: 1px solid var(--line); background: #fff; position: relative; z-index: 20; }
.menu-btn { display: none; }
.logo { display: flex; align-items: center; gap: 9px; font-size: 18px; white-space: nowrap; width: calc(var(--side-w) - 32px); }
.logo b { font-weight: 800; }
.logo > span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.logo > span b { font-size: 16px; }
.logo #logoWord { font-size: 12.5px; font-weight: 700; color: var(--brand-dark); }
.search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
          border: 2px solid var(--brand); border-radius: 22px; color: var(--brand-dark); }
.search input { flex: 1; border: 0; outline: 0; min-width: 0; font-size: 14px; background: transparent; color: var(--ink); }
.user { margin-left: auto; position: relative; display: flex; align-items: center; gap: 10px; }
.demo-badge { background: #fff4e0; color: #b86b00; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 10px; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 20px; }
.user-btn:hover { background: var(--line-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.user-mail { font-size: 13px; color: var(--ink-2); }

.menu { position: absolute; top: calc(100% + 4px); right: 0; min-width: 170px; background: #fff; border: 1px solid var(--line);
        border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .1); padding: 6px; z-index: 50; }
.menu a, .menu button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; white-space: nowrap; }
.menu a:hover, .menu button:hover { background: var(--hover); }
.menu .menu-head { font-size: 12px; color: var(--ink-3); padding: 6px 10px 2px; }

/* ---------------------------------------------------------------- 왼쪽 메뉴 */
.side { border-right: 1px solid var(--line); padding: 16px 12px; overflow-y: auto; overflow-x: hidden; background: #fff; display: flex; flex-direction: column; }
.compose-row { display: flex; gap: 6px; margin-bottom: 14px; }
.compose-btn { flex: 1; height: 44px; font-size: 15px; }
.compose-btn { min-width: 0; }
.tome-btn { height: 44px; padding: 0 9px; font-size: 12.5px; gap: 4px; flex: none; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px; }
.quick a { text-align: center; padding: 8px 0 6px; display: flex; flex-direction: column; font-size: 12px; color: var(--ink-3); }
.quick a + a { border-left: 1px solid var(--line); }
.quick em { font-style: normal; font-size: 16px; font-weight: 700; color: var(--ink); }
.quick a:hover em, .quick a.on em { color: var(--brand-dark); }
.folders a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 6px; color: var(--ink-2); position: relative; }
.folders a:hover { background: var(--hover); }
.folders a.on { background: var(--sel); color: var(--brand-dark); font-weight: 700; }
.folders a.on::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--brand); }
.folders .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folders .fcount { font-size: 12.5px; color: var(--brand-dark); font-weight: 700; }
.folders .fcount.muted { color: var(--ink-3); font-weight: 400; }
.folders .fempty { font-size: 12px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; line-height: 18px; background: #fff; }
.folders .fempty:hover { color: var(--danger); border-color: var(--danger); }
/* 내 메일함 [⋯] : 자리를 차지하지 않고 줄 끝에 겹쳐 둔다 → 「자동」 표시가 줄 끝에 맞춰진다 (마우스를 올리면 ⋯ 이 대신 보임) */
.folders .fmore { opacity: 0; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: var(--hover); }
.folders a:hover .fmore, .folders a.on .fmore { opacity: 1; }
.folders a.on .fmore { background: var(--sel); }
.folders a:hover .frule, .folders a.on .frule { visibility: hidden; }
.side-sec { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.side-title { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 4px 10px; font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 6px; color: var(--ink-2); font-size: 13.5px; }
.side-link:hover { background: var(--hover); }
.side-link.on { background: var(--sel); color: var(--brand-dark); font-weight: 600; }
.usage, .sync { font-size: 12px; color: var(--ink-3); padding: 4px 10px 0; }
.sync.err { color: var(--danger); }
.side-dim { display: none; }

/* ---------------------------------------------------------------- 본문 영역 */
.main { overflow-y: auto; min-width: 0; background: #fff; }
.view { min-height: 100%; display: flex; flex-direction: column; }
.view-head { display: flex; align-items: baseline; gap: 10px; padding: 18px 24px 10px; }
.view-head h1 { font-size: 20px; margin: 0; }
.count { color: var(--ink-3); font-size: 13px; }
.count b { color: var(--brand-dark); }

.toolbar { display: flex; align-items: center; gap: 2px; padding: 6px 16px 6px 20px; border-bottom: 1px solid var(--line); background: #fff; flex-wrap: wrap; min-height: 48px; }
.toolbar.sticky { position: sticky; top: 0; z-index: 10; }
.tb { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 9px; border-radius: 6px; color: var(--ink-2); font-size: 13.5px; white-space: nowrap; }
.tb:hover { background: var(--line-2); color: var(--ink); }
.tb.danger:hover { color: var(--danger); }
.tb:disabled { opacity: .35; cursor: default; background: none; }
.sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }
.dd { position: relative; }
.dd .menu { left: 0; right: auto; }
.move-menu { max-height: 320px; overflow-y: auto; }

.chk { display: inline-grid; place-items: center; width: 32px; height: 32px; cursor: pointer; flex: none; }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.chk span { width: 17px; height: 17px; border: 1.5px solid #c3c6cc; border-radius: 4px; background: #fff; display: grid; place-items: center; }
.chk input:checked + span { background: var(--brand); border-color: var(--brand); }
.chk input:checked + span::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--on-brand); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.chk input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-soft); }

.search-info { padding: 10px 24px; background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); display: flex; gap: 10px; align-items: center; }
.search-info b { color: var(--brand-dark); }

/* 목록 */
.mail-list { list-style: none; margin: 0; padding: 0; }
/* 목록 열 : 보낸사람 · 제목(고정 폭) · 첨부 · 받은 시각 · 크기 — 폭은 [열 조정] 으로 바꾸고 [열저장] (mail.js applyCols) */
.mail-row, .mail-head { display: grid; grid-template-columns: 32px 28px 24px var(--c-from, 170px) var(--c-subj, 560px) var(--c-att, 96px) var(--c-date, 128px) var(--c-size, 64px);
  align-items: center; gap: 4px; }
.mail-head { height: 32px; padding: 0 16px 0 20px; background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); user-select: none; }
.mail-head > span { position: relative; height: 100%; display: flex; align-items: center; min-width: 0; }
.mail-head b { font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mail-head [data-col="date"], .mail-head [data-col="size"] { justify-content: flex-end; padding-right: 8px; }
.col-grip { position: absolute; top: 4px; bottom: 4px; right: -4px; width: 7px; cursor: col-resize; border-right: 2px solid var(--brand-line); z-index: 1; }
.col-grip:hover { border-right-color: var(--brand-dark); }
.col-adjusting .mail-row > * { outline: 1px dashed var(--line); outline-offset: -1px; }
.col-adj { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); cursor: pointer; white-space: nowrap; align-self: center; }
.col-adj input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand-dark); cursor: pointer; }
.view-head #colSave { align-self: center; }
.att-cell { display: flex; align-items: center; justify-content: flex-end; min-width: 0; padding-right: 4px; }
.att-cell .clip { display: inline-block; color: var(--brand-dark); white-space: nowrap; font-size: 12px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.att-cell .clip em { font-style: normal; font-weight: 700; }
.att-cell .none { color: var(--ink-3); font-size: 12px; }
.mail-row, .mail-head { min-width: max-content; }      /* 열 합이 넓으면 목록이 옆으로 넘어간다 (줄 바탕은 끝까지) */
.mail-row {
            height: 46px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--line-2); cursor: pointer; color: var(--ink-2); }
.mail-row:hover { background: var(--hover); }
.mail-row.sel { background: var(--sel); }
.mail-row.unread { color: var(--ink); }
.mail-row.unread .from, .mail-row.unread .subj { font-weight: 700; }
.star { display: grid; place-items: center; width: 28px; height: 28px; color: #c9ccd1; border-radius: 50%; }
.star:hover { background: rgba(0, 0, 0, .04); }
.star.on { color: var(--star); }
.star.on .i { fill: var(--star); }
.state { color: #b7bac0; display: grid; place-items: center; }
.mail-row.unread .state { color: var(--brand); }
.from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 10px; }
.subj-cell { display: flex; align-items: center; gap: 6px; min-width: 0; }
.subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.snip { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 0; min-width: 0; font-size: 13px; font-weight: 400 !important; }
.tag { font-size: 11.5px; padding: 1px 6px; border-radius: 4px; background: var(--line-2); color: var(--ink-3); flex: none; }
.tag.re { background: #eef3ff; color: #3b5bdb; }
.clip { color: var(--ink-3); flex: none; }
.date { text-align: right; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.size { text-align: right; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.empty { padding: 90px 20px; text-align: center; color: var(--ink-3); }
.empty .i { width: 44px; height: 44px; stroke-width: 1.2; color: #cfd2d7; display: block; margin: 0 auto 12px; }

.pager { display: flex; justify-content: center; gap: 4px; padding: 18px 0 30px; }
.pager button { min-width: 32px; height: 32px; border-radius: 6px; color: var(--ink-2); font-size: 13.5px; padding: 0 8px; }
.pager button:hover { background: var(--line-2); }
.pager button.on { background: var(--brand); color: var(--on-brand); font-weight: 700; }
.pager button:disabled { opacity: .3; background: none; cursor: default; }

/* 읽기 */
.reader { padding: 22px 28px 40px; max-width: 1100px; }
.r-subject { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 14px; }
.r-subject h1 { font-size: 21px; margin: 0; line-height: 1.4; word-break: break-word; }
.r-subject .star { margin-top: 1px; }
.r-meta { display: grid; grid-template-columns: 72px 1fr; gap: 6px 10px; font-size: 13.5px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.r-meta dt { color: var(--ink-3); }
.r-meta dd { margin: 0; color: var(--ink-2); word-break: break-all; }
.r-meta .who b { color: var(--ink); }
.addr { color: var(--ink-3); }
.add-contact { color: var(--brand-dark); font-size: 12px; margin-left: 6px; border: 1px solid var(--brand-line); border-radius: 4px; padding: 0 5px; }
.add-contact:hover { background: var(--brand-soft); }
.folder-tag { display: inline-block; font-size: 12px; color: var(--ink-3); background: var(--line-2); border-radius: 4px; padding: 0 6px; margin-left: 8px; }
.r-atts { margin: 16px 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.r-atts-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.r-atts-head b { color: var(--brand-dark); }
.r-atts ul { list-style: none; margin: 0; padding: 6px 8px; }
.r-atts li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; font-size: 13.5px; }
.r-atts li:hover { background: #fff; }
.r-atts .aname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-atts .att-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; }
/* 계정별 용량 : 「비밀번호 재설정 · 삭제」 와 한 줄에 (좁은 입력칸) */
.att-limit { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.acc-list .acc-row { padding-left: 10px; padding-right: 10px; }
.att-limit input.text-in.sm { flex: 0 0 46px; width: 46px; padding: 0 5px; text-align: right; }
.acc-list .acc-btns { flex-wrap: wrap; align-items: center; gap: 4px; }
.acc-list .acc-btns .btn-line.sm { padding: 0 8px; }
.acc-add-row .text-in.sm.att-new { flex: 0 0 56px; width: 56px; padding: 0 6px; text-align: right; }
.r-atts .att-open:hover .aname { color: var(--brand-dark); text-decoration: underline; }
.folders .frule { font-size: 10.5px; padding: 0 5px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-dark);
  border: 1px solid var(--brand-line); line-height: 16px; }
.fdlg { display: grid; gap: 10px; min-width: min(380px, 80vw); }
.fdlg label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.fdlg .text-in { color: var(--ink); font-size: 14px; }
.fdlg .card-note { margin: 0; font-size: 12px; color: var(--ink-3); }
.r-atts .asize { color: var(--ink-3); font-size: 12px; }
.thumb { width: 42px; height: 42px; border-radius: 4px; object-fit: cover; border: 1px solid var(--line); background: #fff; flex: none; }
.ficon { width: 42px; height: 42px; border-radius: 4px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--ink-3); font-size: 10.5px; font-weight: 800; flex: none; }
.r-body { margin-top: 18px; }
.r-body iframe { width: 100%; border: 0; min-height: 200px; display: block; }
.r-body { position: relative; }
.zoom-bar { position: absolute; top: -30px; right: 0; display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: 14px; background: var(--bg); overflow: hidden; opacity: .55; transition: opacity .15s; z-index: 1; }
.zoom-bar:hover, .zoom-bar.changed { opacity: 1; }
.zoom-bar button { height: 26px; min-width: 28px; padding: 0 6px; font-size: 14px; color: var(--ink-2); }
.zoom-bar button:hover { background: var(--hover); color: var(--ink); }
.zoom-bar #zoomVal { font-size: 12px; min-width: 46px; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  font-variant-numeric: tabular-nums; }
.zoom-bar.changed #zoomVal { color: var(--brand-dark); font-weight: 700; }

/* 쓰기 */
/* 메일 쓰기 : 창 너비 · 높이에 맞춰 늘어난다 (편집기가 남은 높이를 모두 차지) */
.compose { padding: 8px 24px 20px; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.compose-title { font-size: 20px; margin: 12px 0 10px; }
.cf { display: grid; grid-template-columns: 90px 1fr; align-items: start; border-bottom: 1px solid var(--line-2); padding: 6px 0; }
.cf-label { color: var(--ink-2); font-weight: 600; font-size: 13.5px; padding-top: 9px; }
.cf-body { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cf-body.col { flex-direction: column; align-items: stretch; gap: 6px; }
.chips { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 38px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; cursor: text; min-width: 0; }
.chips:focus-within { border-color: var(--brand); }
.chips input { border: 0; outline: 0; flex: 1; min-width: 160px; height: 28px; }
.chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; background: var(--brand-soft); color: var(--brand-dark); border-radius: 14px; padding: 2px 4px 2px 10px; font-size: 13px; }
.chip.bad { background: #ffe3e3; color: var(--danger); }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; }
.chip button:hover { background: rgba(0, 0, 0, .08); }
.chip .i { width: 12px; height: 12px; }
.text-in { flex: 1; height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; outline: 0; min-width: 0; background: #fff; }
.text-in:focus { border-color: var(--brand); }
.text-in.sm { height: 32px; flex: 0 1 240px; }
.inline-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.imp { color: var(--danger); }
.drop { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 12px; border: 1px dashed #cdd0d5; border-radius: 6px; color: var(--ink-3); font-size: 13px; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.att-total { font-size: 12.5px; }
.att-total.over { color: var(--danger); font-weight: 700; }
.att-list { list-style: none; margin: 0; padding: 0; }
.att-list li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-size: 13px; border-radius: 4px; }
.att-list li:hover { background: var(--bg-2); }
.att-list .aname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-list .asize { color: var(--ink-3); font-size: 12px; }
.editor-wrap { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
               flex: 1; display: flex; flex-direction: column; min-height: 380px; }
.ed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.ed-bar button, .ed-bar .color { min-width: 30px; height: 30px; border-radius: 4px; display: inline-grid; place-items: center; font-size: 14px; color: var(--ink-2); position: relative; cursor: pointer; }
.ed-bar button:hover, .ed-bar .color:hover { background: #e9ebee; }
.ed-bar select { height: 30px; border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 0 4px; margin-right: 4px; }
.ed-bar .color { font-weight: 700; color: #e03131; border-bottom: 3px solid currentColor; height: 26px; }
.ed-bar .color.bg { color: var(--ink); background: #fff3bf; border-bottom-color: #fab005; }
.ed-bar .color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ed-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.editor { min-height: 380px; padding: 16px 18px; outline: 0; line-height: 1.6; overflow-wrap: anywhere; }
.editor-wrap .editor { flex: 1; min-height: 300px; }
.editor blockquote { margin: 0 0 0 .8ex; border-left: 2px solid #ccc; padding-left: 1ex; }
.editor img { max-width: 100%; height: auto; cursor: pointer; }
.editor img.img-on { outline: none; }
.editor:empty::before { content: attr(data-placeholder); color: var(--ink-3); pointer-events: none; }
.ed-bar .ed-img { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; border-radius: 4px;
                  font-size: 13px; color: var(--ink-2); cursor: pointer; }
.ed-bar .ed-img:hover { background: #e9ebee; }
.ed-bar .ed-img .i { width: 16px; height: 16px; }
.img-bar { position: fixed; z-index: 70; display: flex; align-items: center; gap: 2px; padding: 4px 6px; background: #fff;
           border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .14); font-size: 12.5px; }
.img-bar button { padding: 4px 8px; border-radius: 5px; color: var(--ink-2); }
.img-bar button:hover { background: var(--hover); color: var(--ink); }
.img-bar button.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.img-bar button.danger:hover { color: var(--danger); }
.img-bar-label { color: var(--ink-3); padding: 0 4px; }
.editor-wrap.drop-img { outline: 2px dashed var(--brand); outline-offset: -4px; }
.editor.sig { min-height: 110px; border: 1px solid var(--line); border-radius: 6px; flex: 1; }
.draft-state { font-size: 12.5px; color: var(--ink-3); margin-right: 8px; }

/* 주소 자동완성 */
.suggest { position: fixed; z-index: 60; list-style: none; margin: 0; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .1); min-width: 280px; max-width: 420px; max-height: 280px; overflow-y: auto; }
.suggest li { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13.5px; display: flex; gap: 6px; overflow: hidden; }
.suggest li.on, .suggest li:hover { background: var(--sel); }
.suggest .addr { overflow: hidden; text-overflow: ellipsis; }

/* 주소록 */
.table-wrap { overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.grid th { text-align: left; font-weight: 600; color: var(--ink-3); background: var(--bg-2); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.grid tr:hover td { background: var(--hover); }
.grid td.nm { color: var(--ink); font-weight: 600; }
.grid .num { text-align: right; }
.grid .chk { width: 32px; height: 26px; }
.grid a.mailto { color: var(--brand-dark); }
.grid a.mailto:hover { text-decoration: underline; }
.row-btn { color: var(--ink-3); font-size: 12.5px; padding: 2px 6px; border-radius: 4px; }
.row-btn:hover { background: var(--line-2); color: var(--ink); }

/* 환경설정 */
.settings { padding: 16px 24px 40px; max-width: 760px; }
.set-row { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.set-row.top { align-items: start; }
.set-label { color: var(--ink-2); font-weight: 600; font-size: 13.5px; }
.set-val { color: var(--ink-2); font-size: 13.5px; word-break: break-all; }
.set-actions { padding-top: 18px; }

/* 대화상자 · 알림 */
.modal { position: fixed; inset: 0; background: rgba(20, 22, 26, .35); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal-card { background: #fff; border-radius: 12px; width: 100%; max-width: 420px; padding: 22px 22px 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .2); }
.modal-card h2 { margin: 0 0 12px; font-size: 17px; }
.modal-card p { margin: 0 0 8px; color: var(--ink-2); }
.modal-card .text-in { width: 100%; margin-bottom: 8px; }
.modal-card label { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 3px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--foot-h) + 20px); transform: translate(-50%, 20px); background: #26282c; color: #fff; padding: 11px 18px; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 200; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }
.loading { padding: 60px; text-align: center; color: var(--ink-3); }

/* ---------------------------------------------------------------- 좁은 화면 */
@media (max-width: 1100px) {
  .mail-row, .mail-head { grid-template-columns: 32px 28px 24px var(--c-from, 170px) var(--c-subj, 560px) var(--c-att, 96px) var(--c-date, 128px); }
  .mail-row .size, .mail-head [data-col="size"] { display: none; }
  .tb span { display: none; }
  .tb { padding: 0 8px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  html, body { overflow-x: hidden; }
  .main { overflow-x: hidden; }
  .view { min-width: 0; max-width: 100vw; }
  .menu-btn { display: inline-grid; }
  .logo { width: auto; }
  .logo span { display: none; }
  .user-mail { display: none; }
  .side { position: fixed; top: var(--top-h); bottom: var(--foot-h); left: 0; width: 270px; z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 20px rgba(0, 0, 0, .08); }
  .app.side-open .side { transform: none; }
  .app.side-open .side-dim { display: block; position: fixed; inset: var(--top-h) 0 0 0; background: rgba(0, 0, 0, .25); z-index: 25; }
  .topbar { gap: 8px; padding: 0 12px 0 8px; }
  .search { height: 38px; }
  .view-head { padding: 14px 16px 8px; }
  .toolbar { padding: 4px 8px 4px 12px; }
  .mail-row { grid-template-columns: 30px 26px minmax(0, 1fr) auto; column-gap: 6px; grid-template-rows: auto auto; height: auto; padding: 8px 12px; row-gap: 0; }
  .mail-row .chk { grid-row: 1 / 3; }
  .mail-row .star { grid-row: 1 / 3; }
  .mail-row .state { display: none; }
  .mail-row .from { grid-column: 3; grid-row: 1; }
  .mail-row .date { grid-column: 4; grid-row: 1; }
  .mail-row .subj-cell { grid-column: 3; grid-row: 2; }
  .mail-row .att-cell { grid-column: 4; grid-row: 2; }
  .mail-row { min-width: 0; }
  .mail-head, .col-adj, .view-head #colSave { display: none !important; }   /* 휴대폰 : 열 조정 없음 */
  .mail-row .snip { display: none; }
  .reader { padding: 16px 16px 32px; }
  .compose { padding: 4px 16px 32px; }
  .cf { grid-template-columns: 1fr; }
  .cf-label { padding-top: 2px; }
  .set-row { grid-template-columns: 1fr; gap: 6px; }
  .settings { padding: 12px 16px 32px; }
}
@media print {
  .topbar, .side, .toolbar, .r-atts button, .zoom-bar, .app-foot { display: none !important; }
  .app { display: block; height: auto; }
  .main { overflow: visible; }
}

/* 로고 (대표색을 따라간다) */
.logo-mark { flex: none; }
.logo-mark rect { fill: var(--brand); }
.logo-mark path { fill: none; stroke: var(--on-brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* 대표색 고르기 (로그인 화면 · 환경설정) */
.theme { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.login .theme { justify-content: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.theme-label { font-size: 12.5px; color: var(--ink-3); margin-right: 2px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d5d7dc; cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.swatch-pick { position: relative; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; cursor: pointer;
               background: conic-gradient(#f66, #fd6, #6d6, #6df, #66f, #f6f, #f66); box-shadow: 0 0 0 1px #d5d7dc; }
.swatch-pick input { position: absolute; inset: -8px; opacity: 0; cursor: pointer; }
.theme .link-btn { font-size: 12px; }

/* 본문 이미지 조절점 8개 */
.img-frame { position: fixed; z-index: 65; pointer-events: none; outline: 1px solid var(--brand-dark); }
.img-frame .h { position: absolute; width: 11px; height: 11px; background: #fff; border: 2px solid var(--brand-dark);
                border-radius: 2px; pointer-events: auto; touch-action: none; }
.img-frame .h-nw { left: -6px; top: -6px; cursor: nwse-resize; }
.img-frame .h-n  { left: calc(50% - 6px); top: -6px; cursor: ns-resize; }
.img-frame .h-ne { right: -6px; top: -6px; cursor: nesw-resize; }
.img-frame .h-e  { right: -6px; top: calc(50% - 6px); cursor: ew-resize; }
.img-frame .h-se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.img-frame .h-s  { left: calc(50% - 6px); bottom: -6px; cursor: ns-resize; }
.img-frame .h-sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.img-frame .h-w  { left: -6px; top: calc(50% - 6px); cursor: ew-resize; }
.img-frame .img-size { position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, .6); color: #fff;
                       font-size: 11px; padding: 1px 6px; border-radius: 3px; opacity: 0; transition: opacity .15s; }
.img-frame.dragging .img-size { opacity: 1; }
@media (pointer: coarse) { .img-frame .h { width: 18px; height: 18px; } }

/* 보내기 완료 화면 */
.sent-done { text-align: center; padding: 56px 20px 40px; border-bottom: 1px solid var(--line-2); margin: 0 24px; }
.sent-icon { width: 84px; height: 84px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark);
             display: grid; place-items: center; margin: 0 auto 20px; }
.sent-icon .i { width: 38px; height: 38px; stroke-width: 2; }
.sent-done h1 { font-size: 19px; font-weight: 500; margin: 0 0 18px; }
.sent-warn { color: var(--danger); font-size: 13px; margin: -8px 0 14px; }
.sent-btns { display: flex; gap: 8px; justify-content: center; }
.sent-contacts { max-width: 580px; margin: 28px auto 40px; padding: 0 16px; width: 100%; }
.sc-head { text-align: center; color: var(--ink-2); font-size: 14px; margin: 0 0 12px; }
.sc-head b { color: var(--brand-dark); }
.sc-box { background: var(--bg-2); border-radius: 8px; padding: 22px 20px; text-align: center; }
.sc-row { display: flex; align-items: center; gap: 6px; max-width: 490px; margin: 0 auto 8px; }
.sc-row .sc-name { flex: 0 0 150px; height: 38px; }
.sc-mail { flex: 1; min-width: 0; height: 38px; line-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px;
           background: #fff; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.sc-help { color: var(--ink-3); font-size: 13px; line-height: 1.7; margin: 12px 0 14px; }
.sc-msg { color: var(--brand-dark); font-size: 13px; margin: 10px 0 0; min-height: 18px; }
.sug-tag { margin-left: auto; flex: none; font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
@media (max-width: 860px) {
  .sc-row .sc-name { flex-basis: 110px; }
  .sent-done { margin: 0 12px; padding-top: 40px; }
}

/* 모바일 목록 : 한 줄 안에서 말줄임 */
.subj-cell, .from { min-width: 0; }
@media (max-width: 860px) {
  .mail-row .date { font-size: 12px; }
  .toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .toolbar .tb { padding: 0 5px; }
  .demo-badge { display: none; }
  .toolbar .chk { width: 28px; }
  .toolbar::-webkit-scrollbar { display: none; }
  .search-info { flex-wrap: wrap; row-gap: 2px; }
}

/* 왼쪽 메뉴 : 휴지통 아래 구분선 */
.side-split { height: 1px; background: var(--line); margin: 10px 4px; flex: none; }

/* 카렌다 */
.cal-head { display: flex; align-items: center; gap: 6px; padding: 16px 20px 6px; }
.cal-head h1 { font-size: 22px; margin: 0 6px; min-width: 130px; text-align: center; }
.cal-sum { font-size: 13px; color: var(--ink-3); }
.cal-sum b { color: var(--brand-dark); }
.cal-legend { display: flex; gap: 14px; align-items: center; padding: 0 20px 10px; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.cal-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.dot.in, .cal-cnt .in { background: var(--brand-soft); color: var(--brand-dark); }
.dot.in { background: var(--brand); }
.dot.out { background: #3b82f6; }
.cal-hint { margin-left: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto repeat(6, minmax(92px, 1fr));
            border-top: 1px solid var(--line); margin: 0 20px 24px; flex: 1; }
.cal-w { text-align: center; font-size: 13px; font-weight: 700; color: var(--ink-2); padding: 8px 0; border-bottom: 1px solid var(--line); }
.cal-w.sun { color: #e03131; }
.cal-w.sat { color: #1c7ed6; }
.cal-d { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 6px 7px;
         border-bottom: 1px solid var(--line-2); border-radius: 0; min-width: 0; overflow: hidden; }
.cal-d:hover { background: var(--hover); }
.cal-n { font-size: 17px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.cal-d.sun .cal-n { color: #e03131; }
.cal-d.sat .cal-n { color: #1c7ed6; }
.cal-d.other { opacity: .38; }
.cal-d.today .cal-n { background: var(--brand); color: var(--on-brand); border-radius: 50%; width: 28px; height: 28px;
                      display: grid; place-items: center; font-size: 15px; }
.cal-hol { font-size: 11.5px; line-height: 1.25; padding: 1px 4px; border-radius: 3px; background: #ffe3e3; color: #c92a2a;
           max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-cnt { display: flex; flex-direction: column; gap: 2px; margin-top: auto; width: 100%; }
.cal-cnt em { font-style: normal; font-size: 12px; font-weight: 700; padding: 1px 5px; border-radius: 3px; white-space: nowrap;
              overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; }
.cal-cnt .in { border-color: var(--brand); }
.cal-cnt .out { background: #e7f0ff; color: #1c5fc9; border-color: #3b82f6; }
@media (max-width: 860px) {
  .cal-head { padding: 12px 10px 4px; }
  .cal-head h1 { font-size: 19px; min-width: 110px; }
  .cal-sum { display: none; }
  .cal-legend { padding: 0 12px 8px; }
  .cal-hint { display: none; }
  .cal-grid { margin: 0 6px 16px; grid-template-rows: auto repeat(6, minmax(76px, 1fr)); }
  .cal-d { padding: 4px 3px; align-items: center; text-align: center; }
  .cal-n { font-size: 15px; }
  .cal-hol { font-size: 10px; padding: 0 2px; white-space: normal; word-break: keep-all; text-align: center; }
  .cal-cnt em { font-size: 11px; padding: 0 3px; text-align: center; }
}

/* 상단 막대 : 좁은 화면(폴드 · 작은 폰)에서도 계정 아이콘이 항상 보이게 */
.search { min-width: 0; }
.user { flex: none; }
@media (max-width: 860px) {
  .topbar { gap: 6px; padding: 0 8px 0 4px; }
  .search { flex: 1 1 auto; padding: 0 10px; gap: 6px; }
  .search input::placeholder { font-size: 13px; }
  .user { gap: 4px; margin-left: 0; }
  .user-btn { padding: 2px; }
  .user-btn > .i { display: none; }            /* ▾ 표시 숨김 (아이콘을 누르면 메뉴) */
  .logo img, .logo .logo-mark { width: 28px; height: 28px; }
}
@media (max-width: 380px) {
  .menu-btn { width: 32px; height: 32px; }
  .logo { display: none; }                    /* 아주 좁으면 로고 대신 검색창을 넓게 */
  .search { height: 36px; }
}

/* 달력 : 받/보 표시를 직접 누를 수 있게 */
.cal-cnt em { cursor: pointer; }
.cal-cnt em:hover { filter: brightness(.95); text-decoration: underline; }
@media (max-width: 860px) {
  .cal-cnt { gap: 3px; }
  .cal-cnt em { padding: 2px 3px; }            /* 손가락으로 누르기 쉽게 */
}

/* 개인일정 */
.cal-evs { display: flex; flex-direction: column; gap: 2px; width: 100%; min-width: 0; }
.cal-ev { display: block; width: 100%; font-size: 12px; line-height: 1.35; padding: 1px 5px; border-radius: 3px; text-align: left;
          border-left: 3px solid var(--ev); background: var(--ev-bg); color: var(--ink); overflow: hidden;
          text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.cal-ev:hover { filter: brightness(.96); }
.cal-ev b { font-weight: 700; color: var(--ink-2); }
.cal-more { font-size: 11px; color: var(--ink-3); padding-left: 4px; cursor: pointer; }
.cal-more:hover { color: var(--brand-dark); text-decoration: underline; }
.c-brand  { --ev: var(--brand); --ev-bg: var(--brand-soft); }
.c-blue   { --ev: #3b82f6; --ev-bg: #e7f0ff; }
.c-green  { --ev: #2f9e44; --ev-bg: #e6f6e9; }
.c-orange { --ev: #f08c00; --ev-bg: #fff1dd; }
.c-purple { --ev: #7c5cff; --ev-bg: #efeaff; }
.c-gray   { --ev: #868e96; --ev-bg: #f1f3f5; }
.cal-add { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 20px 14px;
           background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 30%); }
.cal-add-bar { flex: 1; height: 46px; border-radius: 23px; background: var(--bg-2); border: 1px solid var(--line);
               text-align: left; padding: 0 18px; color: var(--ink-3); font-size: 14px; }
.cal-add-bar:hover { border-color: var(--brand); color: var(--ink-2); }
.cal-fab { width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid;
           place-items: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); flex: none; }
.cal-fab .i { width: 24px; height: 24px; stroke-width: 2.4; }
.ev-card { max-width: 460px !important; }
.ev-form label { margin-top: 8px; }
.ev-form textarea.text-in { height: auto; padding: 8px 10px; resize: vertical; font: inherit; }
.ev-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ev-colors { display: flex; gap: 8px; margin: 2px 0 6px; }
.ev-color { width: 26px; height: 26px; border-radius: 50%; background: var(--ev); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.ev-color.on { box-shadow: 0 0 0 2px var(--ink); }
.ev-del { color: var(--danger); padding-left: 0; margin-top: 6px; }
.ev-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ev-list .cal-ev { font-size: 14px; padding: 7px 10px; }
@media (max-width: 860px) {
  .cal-ev { font-size: 10.5px; padding: 1px 3px; border-left-width: 2px; }
  .cal-ev b { display: none; }                       /* 좁은 칸 : 시각은 숨기고 제목만 */
  .cal-add { padding: 8px 10px 12px; }
  .cal-add-bar { height: 42px; font-size: 13px; }
  .cal-fab { width: 48px; height: 48px; }
}

/* 카렌다 : 선택한 날짜 · 아래 '메일 보기' */
.cal-d.sel { box-shadow: inset 0 0 0 2px var(--brand); background: var(--brand-soft); }
.cal-d { user-select: none; -webkit-user-select: none; }
.cal-mail { flex: none; height: 46px; border-radius: 23px; border: 1px solid var(--line); background: #fff; padding: 0 14px;
            display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.cal-mail:hover { border-color: var(--brand); color: var(--ink); }
.cal-mail em { font-style: normal; font-size: 12px; font-weight: 700; padding: 1px 5px; border-radius: 3px; border-left: 3px solid; }
.cal-mail em.in { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand); }
.cal-mail em.out { background: #e7f0ff; color: #1c5fc9; border-color: #3b82f6; }
@media (max-width: 860px) {
  .cal-add { gap: 6px; }
  .cal-mail { height: 42px; padding: 0 10px; font-size: 12.5px; gap: 4px; }
  .cal-mail em { font-size: 11px; padding: 0 3px; }
}
@media (max-width: 380px) {
  .cal-add-bar { padding: 0 12px; }
}

/* 명함보관함 */
.card-note { margin: 8px 20px; padding: 9px 12px; background: var(--bg-2); border-radius: 6px; font-size: 13px; color: var(--ink-2); }
.card-edit .card-note { margin: 0 0 12px; }
.card-list { list-style: none; margin: 0; padding: 0; }
.card-row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line-2); }
.card-row:hover { background: var(--hover); }
.card-thumb { width: 64px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); flex: none; background: #fff; }
.card-ava { width: 64px; height: 40px; border-radius: 4px; background: var(--brand-soft); color: var(--brand-dark); display: grid;
            place-items: center; font-weight: 700; font-size: 17px; flex: none; }
.card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card-info b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-info span { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-end { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.card-edit { padding: 16px 24px 40px; max-width: 760px; }
.card-slots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; align-items: start; }
.card-slot { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg-2);
             display: flex; flex-direction: column; min-width: 0; }
.card-slot a { display: block; aspect-ratio: 1.75; }
.card-slot img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
.card-slot.empty { width: 100%; min-height: 0; padding: 0; aspect-ratio: 1.75; align-items: center; justify-content: center; gap: 6px; color: var(--ink-3); border-style: dashed; font-size: 13.5px; }
.card-slot.empty .i { width: 28px; height: 28px; }
.card-slot.none { cursor: default; }
.card-side { position: absolute; left: 6px; top: 6px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11.5px; padding: 1px 7px; border-radius: 10px; }
.card-slot-btns { display: flex; border-top: 1px solid var(--line); background: #fff; }
.card-slot-btns button { flex: 1; min-width: 0; padding: 7px 2px; font-size: 12.5px; white-space: nowrap; color: var(--ink-2); display: inline-flex; gap: 3px; justify-content: center; align-items: center; }
.card-slot-btns button + button { border-left: 1px solid var(--line); }
.card-slot-btns button:hover { background: var(--hover); }
.card-ocr { width: 100%; margin-bottom: 6px; }
.card-label { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 16px 0 6px; }
.ocr-box { font-size: 13px; line-height: 1.6; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; max-height: 180px; overflow: auto; }
.card-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.card-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-3); }
.card-field .text-in { flex: none; }
.card-field.wide { grid-column: 1 / -1; }
.card-field em { font-style: normal; color: #c77700; }
.card-field.auto .text-in { border-left: 3px solid #f59f00; }
.card-field .text-in[readonly] { background: var(--bg-2); color: var(--ink); }
.card-field textarea.text-in { height: auto; padding: 8px 10px; font: inherit; resize: vertical; }
.share-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.crop-title { font-weight: 700; margin-left: 6px; }
.crop-body { padding: 12px 20px 30px; max-width: 900px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { padding: 8px 16px; font-size: 13.5px; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--brand); color: var(--on-brand); font-weight: 700; }
.crop-guide { font-size: 13px; color: var(--ink-2); margin: 10px 0; }
.crop-wrap { position: relative; display: inline-block; max-width: 100%; touch-action: none; user-select: none; }
.crop-wrap img { display: block; max-width: 100%; max-height: 70vh; }
.crop-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.crop-wrap polygon { fill: rgba(59, 130, 246, .12); stroke: #3b82f6; stroke-width: .6; vector-effect: non-scaling-stroke; }
.crop-h { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: rgba(255, 255, 255, .9);
          border: 3px solid #3b82f6; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); touch-action: none; cursor: grab; }
.crop-h.mark { border-color: var(--brand-dark); }
@media (max-width: 860px) {
  .card-row { padding: 10px 12px; }
  .card-end { display: none; }
  .card-edit { padding: 12px 12px 30px; }
  .card-slots { gap: 8px; }
  .card-slot-btns button { font-size: 11.5px; }
  .card-slot-btns .i { display: none; }
  .card-fields { grid-template-columns: 1fr; }
  .crop-body { padding: 10px 10px 24px; }
  .crop-h { width: 34px; height: 34px; margin: -17px 0 0 -17px; }
  #cardBar .tb span { display: none; }
}

/* 명함 사진 보기 — 아트센트랩-미술 앱과 같은 모양 (PC 는 보기 · 확대 · 앞뒤 넘기기) */
body.pv-on { overflow: hidden; }
.pv { position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; background: #0b100f; }
.pv-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #fff; }
.pv-head div { display: flex; flex-direction: column; line-height: 1.3; }
.pv-head b { font-size: 19px; }
.pv-head span { font-size: 13px; color: var(--ink-3); }
.pv-head button { color: var(--brand-dark); font-size: 15px; font-weight: 600; padding: 6px 4px; }
.pv-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #0b100f; touch-action: none; user-select: none;
            display: flex; align-items: center; justify-content: center; }
.pv-stage img { max-width: none; max-height: none; flex: none; display: block; transform-origin: center center; will-change: transform; }
.pv-nav { position: absolute; top: 50%; z-index: 2; width: 44px; height: 64px; margin-top: -32px; border-radius: 3px;
          background: rgba(12, 20, 19, .45); color: #fff; font-size: 40px; line-height: 1; padding: 0 0 6px; }
.pv-nav.prev { left: 6px; }
.pv-nav.next { right: 6px; }
.pv-nav[disabled] { opacity: .2; }
.pv-count { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 2; background: rgba(12, 20, 19, .55);
            color: #fff; font-size: 13px; padding: 3px 10px; border-radius: 12px; font-variant-numeric: tabular-nums; }
.pv-bar { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 6px; align-items: stretch;
          padding: 10px 8px calc(env(safe-area-inset-bottom) + 10px); background: #0b100f; border-top: 1px solid #1e2a28; }
.pv-bar .col { display: flex; flex-direction: column; gap: 6px; justify-content: center; min-width: 0; }
.pv-bar button { font-size: 13px; font-weight: 600; padding: 8px 6px; border: 1px solid #2e3c3a; background: #18211f;
                 color: #dce6e3; border-radius: 3px; white-space: nowrap; }
.pv-bar button[disabled] { opacity: .3; }
.pv-bar button.on { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.pv-bar .pct { font-size: 15px; color: #dce6e3; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.pv-bar .pair { display: flex; gap: 6px; }
.pv-bar .pair button { flex: 1; font-size: 28px; line-height: .8; padding: 5px 9px 8px; }
.pv-bar .etop { display: grid; grid-template-columns: auto 1fr; gap: 5px; }
.pv-bar .etop button:first-child { font-size: 15px; padding: 8px 7px; }
.pv-bar .modes { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pv-bar .modes button { padding: 8px 2px; min-width: 0; overflow: hidden; }
.pv-bar .save { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; font-size: 16px; padding: 0 9px; }
.pv-bar .save[disabled] { background: #18211f; border-color: #2e3c3a; color: #dce6e3; }
.pv-layer { position: absolute; touch-action: none; z-index: 3; }
.pv-layer svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.pv-layer polygon { fill: rgba(99, 192, 181, .18); stroke: #63c0b5; stroke-width: 2; vector-effect: non-scaling-stroke; }
.pv-h { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(99, 192, 181, .28);
        border: 2px solid #63c0b5; touch-action: none; }
.pv-h::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #63c0b5; }
.pv-h.mark { width: 26px; height: 26px; margin: -13px 0 0 -13px; background: rgba(242, 193, 78, .3); border-color: #f2c14e; }
.pv-h.mark::after { background: #f2c14e; }
@media (min-width: 861px) {
  .pv-stage { cursor: zoom-in; }
  .pv-bar { justify-content: center; grid-template-columns: auto auto auto auto; }
}

/* 주소록함 */
.ct-row { display: flex; align-items: center; border-bottom: 1px solid var(--line-2); padding-left: 12px; }
.ct-row .card-row { flex: 1; min-width: 0; border-bottom: 0; padding-left: 6px; }
.ct-ava { width: 40px; height: 40px; border-radius: 50%; }
.ct-card { background: var(--brand-soft); color: var(--brand-dark); display: inline-flex; align-items: center; gap: 3px; font-style: normal; }
.card-end em.tag { font-style: normal; }
.ct-title { font-size: 20px; margin: 4px 0 12px; }
.ct-cards { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ct-cards li:last-child .card-row { border-bottom: 0; }
@media (max-width: 860px) {
  .ct-row { padding-left: 4px; }
  .ct-row .card-end { display: flex; }
  .ct-row .card-end > :not(.tag) { display: none; }
  #ctBar .tb span { display: none; }
}

/* 주소록함 : 본인상세 · 소유 표시 · 메일서명 */
.ct-me { background: var(--brand-soft); }
.ct-me .chk { width: 32px; }
.ct-ava.me { background: var(--brand); color: var(--on-brand); }
.ct-owner-tag { background: #eef3ff; color: #3b5bdb; }
.ct-warn { background: #fff4e6; color: #a15c00; }
.ct-owner { flex: 0 1 180px; margin-left: 6px; }
.sig-modes { margin-bottom: 10px; }
.sig-panel { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 6px; }
.sig-text { width: 100%; height: auto; min-height: 196px; padding: 10px 12px; font: 13px/1.7 "Malgun Gothic", sans-serif;
            white-space: pre; overflow-x: auto; resize: vertical; }
.sig-hint { font-size: 12px; color: var(--ink-3); margin: 6px 0 0; font-weight: 400; }
.sig-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.sig-row > span:first-child { width: 72px; font-weight: 600; }
.sig-row input[type=range] { flex: 1; min-width: 140px; accent-color: var(--brand-dark); }
.sig-slots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.sig-slot { border: 1px dashed var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sig-slot-t { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.sig-slot img { width: 100%; aspect-ratio: 1.75; object-fit: contain; background: var(--bg-2); border-radius: 4px; }
.sig-slot-b { display: flex; gap: 6px; flex-wrap: wrap; }
.sig-none { color: var(--ink-3); font-size: 13px; padding: 14px 0; text-align: center; display: block; }
.sig-preview { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; min-height: 60px; overflow-x: auto; background: #fff; }

/* ================================================================ 전자결재 (appr.js) */
/* 메일 / 결재 바꾸기 (왼쪽 메뉴 맨 위) */
.mode-sw { display: flex; gap: 18px; padding: 0 4px 12px 6px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.mode-sw label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 17px; font-weight: 700; color: var(--ink-3); position: relative; }
.mode-sw input { position: absolute; opacity: 0; pointer-events: none; }
.mode-sw i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c9ccd2; display: grid; place-items: center; flex: none; }
.mode-sw input:checked + i { border-color: var(--brand-dark); }
.mode-sw input:checked + i::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.mode-sw input:checked ~ span { color: var(--danger); }
.mode-sw input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }
.mode-badge { font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px;
              border-radius: 9px; background: var(--danger); color: #fff; text-align: center; }
.side-appr { display: flex; flex-direction: column; }
.side-sub { font-weight: 400; font-size: 11.5px; }
.quick.quick-6 a:nth-child(4) { border-left: 0; }
.quick.quick-6 a:nth-child(n+4) { border-top: 1px solid var(--line); }
.quick.quick-6 em { font-size: 15px; }

/* 상태 · 종류 표시 */
.as-tag { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 10px; white-space: nowrap; }
.as-tag.temp { background: #f1f3f5; color: #6b7280; }
.as-tag.progress { background: #e7f0ff; color: #2b59c3; }
.as-tag.done { background: #e6f6ec; color: #1f7a45; }
.as-tag.reject { background: #ffe8e8; color: #c92a2a; }
.at-type { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 4px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.at-type.t-GEN { background: #eef2ff; color: #4053b8; }
.at-type.t-PUR { background: #fff4e5; color: #b35c00; }
.at-type.t-EXP { background: #fdecef; color: #b3264a; }
.at-type.t-TRIP { background: #e8f7f4; color: #11776a; }
.at-type.t-LEAVE { background: #f3edff; color: #6741d9; }
.at-type.t-ETC { background: #f1f3f5; color: #495057; }
.at-cat { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 4px; background: var(--brand-soft); color: var(--brand-dark); }
.urgent { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--danger); border-radius: 3px; padding: 0 5px; margin-right: 6px; vertical-align: 1px; }
.tag.final { background: #ffe8e8; color: #c92a2a; }
.danger-line { color: var(--danger) !important; border-color: #f3b4b4 !important; }
.muted { color: var(--ink-3); }

/* 목록 조회 막대 */
.appr-filter { gap: 6px; row-gap: 6px; padding-top: 8px; padding-bottom: 8px; }
.appr-filter .text-in.sm { flex: 0 0 auto; width: auto; }
.appr-filter .af-q { width: 220px; }
.af-range { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); }
.af-range .text-in.sm { width: 140px; }
.col-menu { min-width: 180px; padding: 6px; }
.col-opt { display: flex; align-items: center; gap: 8px; padding: 5px 8px; font-size: 13.5px; cursor: pointer; border-radius: 4px; }
.col-opt:hover { background: var(--hover); }

/* 집계 */
.appr-sum { margin: 10px 20px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); display: grid; gap: 8px; }
.sum-total { font-size: 14px; }
.sum-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sum-h { font-size: 12.5px; font-weight: 700; color: var(--ink-3); width: 50px; flex: none; }
.sum-chip { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 3px 10px; font-size: 12.5px; color: var(--ink-2); }
.sum-chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.sum-tables { display: flex; gap: 14px; flex-wrap: wrap; }
.sum-table { border-collapse: collapse; font-size: 12.5px; background: #fff; min-width: 220px; }
.sum-table th, .sum-table td { border: 1px solid var(--line); padding: 3px 10px; text-align: left; }
.sum-table th { background: var(--line-2); color: var(--ink-2); }
.sum-table .num { text-align: right; }

/* 그리드 */
.ag-wrap { overflow-x: auto; }
.appr-grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.appr-grid th { position: sticky; top: 0; background: var(--bg-2); color: var(--ink-2); font-weight: 600; font-size: 12.5px; text-align: left;
                padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
.appr-grid th.sortable { cursor: pointer; user-select: none; }
.appr-grid th.sortable:hover { color: var(--brand-dark); }
.sort-arrow { font-size: 10px; margin-left: 3px; color: var(--brand-dark); }
.appr-grid td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.appr-grid tbody tr[data-id] { cursor: pointer; }
.appr-grid tbody tr:hover td { background: var(--hover); }
.appr-grid tr.unread .ag-title { font-weight: 700; }
.appr-grid tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.appr-grid .nowrap { white-space: nowrap; }
.appr-grid .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.appr-grid .c { text-align: center; }
.appr-grid td.main { min-width: 220px; }
.appr-grid small { color: var(--ink-3); }
.appr-grid .chk-col { width: 36px; }
.appr-grid td.empty { padding: 70px 20px; cursor: default; }
.appr-grid td.loading { cursor: default; }
.ag-title:hover { text-decoration: underline; }
.ag-sub { display: none; }
.rule-grid td, .user-grid td { padding: 6px 8px; }
.rule-grid .text-in.sm, .user-grid .text-in.sm { width: 100%; flex: none; }
.rule-grid .num { width: 120px; }

/* 결재문서 보기 */
.appr-doc { max-width: 980px; margin: 0 auto; padding: 20px 28px 48px; }
.ad-top { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.ad-titles { flex: 1; min-width: 240px; }
.ad-kind { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.ad-title { font-size: 22px; margin: 4px 0 8px; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.ad-signs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sign-box { border-collapse: collapse; font-size: 12px; }
.sign-box th, .sign-box td { border: 1px solid #9aa0a8; text-align: center; }
.sg-h { width: 24px; background: var(--bg-2); color: var(--ink-2); line-height: 1.5; padding: 4px; }
.sg-pos { height: 24px; min-width: 76px; padding: 2px 6px; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.sg-cell { height: 78px; min-width: 76px; padding: 4px 6px; vertical-align: top; position: relative; }
.sg-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.sg-date { font-size: 11px; color: var(--ink-3); position: absolute; left: 0; right: 0; bottom: 3px; }
.stamp { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-top: 3px; border-radius: 50%; font-size: 11.5px; font-weight: 700; }
.stamp.ok { border: 2px solid #d9480f; color: #d9480f; transform: rotate(-12deg); }
.stamp.no { border: 2px solid #c92a2a; color: #fff; background: #c92a2a; transform: rotate(-12deg); }
.stamp.wait { color: #2b59c3; background: #e7f0ff; width: auto; height: auto; border-radius: 4px; padding: 1px 6px; margin-top: 12px; }
.stamp.skip { color: var(--ink-3); width: auto; height: auto; margin-top: 12px; }
.sg-cell.skip { background: repeating-linear-gradient(135deg, transparent 0 8px, #f1f3f5 8px 9px); }
.ad-info { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 12px; }
.ad-info th, .ad-info td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.ad-info th { width: 110px; background: var(--bg-2); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.ad-refs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; margin-bottom: 12px; }
.ad-refs > b { color: var(--ink-2); margin-right: 4px; }
.ref-chip { display: inline-flex; gap: 5px; align-items: center; padding: 2px 10px; border-radius: 12px; background: var(--line-2); }
.ref-chip small { color: var(--ink-3); }
.ref-chip.read small { color: #1f7a45; }
.ad-body { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); padding: 18px 4px; min-height: 160px; line-height: 1.7; overflow-wrap: anywhere; overflow-x: auto; }
.ad-body table { max-width: 100%; }
.ad-body img { max-width: 100%; height: auto; }
.ad-files, .ad-cmts { margin-top: 14px; display: grid; gap: 6px; font-size: 13.5px; }
.ad-files > b, .ad-cmts > b { color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.adf { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; }
.adf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adf .btn-line.sm { display: inline-flex; align-items: center; }
.adc { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding: 8px 12px; background: var(--bg-2); border-radius: 6px; border-left: 3px solid #adb5bd; }
.adc.ok { border-left-color: #2f9e44; }
.adc.no { border-left-color: var(--danger); background: #fff5f5; }
.adc-who { font-weight: 600; white-space: nowrap; }
.adc-who small { font-weight: 400; color: var(--ink-3); }
.adc-txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.ad-log { margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.ad-log summary { cursor: pointer; color: var(--ink-3); }
.ad-log ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 3px; }
.appr-empty { padding: 90px 20px; text-align: center; color: var(--ink-3); }
.appr-empty .i { width: 44px; height: 44px; stroke-width: 1.2; color: #cfd2d7; display: block; margin: 0 auto 12px; }

/* 결재작성 */
.form-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 6px 24px 30px; }
.fp-card { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.fp-card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(0, 0, 0, .06); }
.fp-card b { font-size: 16px; }
.fp-card small { color: var(--ink-3); font-size: 12.5px; min-height: 18px; }
.fp-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--line-2); margin-bottom: 4px; }
.fp-ic.t-GEN { background: #eef2ff; color: #4053b8; } .fp-ic.t-PUR { background: #fff4e5; color: #b35c00; }
.fp-ic.t-EXP { background: #fdecef; color: #b3264a; } .fp-ic.t-TRIP { background: #e8f7f4; color: #11776a; }
.fp-ic.t-LEAVE { background: #f3edff; color: #6741d9; }
.fp-fields { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.fp-fields em { font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 3px; background: var(--bg-2); color: var(--ink-3); }
.appr-edit .card-note { margin: 0 0 8px; }
.appr-edit .cf-body { flex-wrap: wrap; }
.text-in.num { text-align: right; }
.text-in.xs { height: 32px; width: 64px; flex: none; }
.appr-edit #aeAmount { flex: 0 0 180px; }
.appr-edit input[type="date"].text-in.sm { flex: 0 0 150px; }
.appr-edit .editor-wrap { min-height: 420px; }
.submit-line { margin: 8px 0; padding-left: 22px; display: grid; gap: 3px; }
.submit-line small { color: var(--ink-3); }

/* 결재선 편집 */
.al { display: grid; gap: 8px; width: 100%; }
.al-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.al-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.al-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-top: 1px solid var(--line-2); min-height: 44px; }
.al-row:first-child { border-top: 0; }
.al-row.draft { background: var(--bg-2); }
.al-row.empty { color: var(--ink-3); font-size: 13px; }
.al-row.skipped .al-who { opacity: .5; text-decoration: line-through; }
.al-no { width: 34px; flex: none; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.al-kind { flex: 0 0 76px !important; }
.al-who { flex: 1; min-width: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.al-who small { color: var(--ink-3); }
.al-btns { display: flex; gap: 2px; flex: none; }
.al-add { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.al-add .text-in.sm:first-child { flex: 1 1 220px; }
.al-add .text-in.sm { flex: 0 0 auto; }
.al-refs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.al-lbl { font-weight: 600; color: var(--ink-2); margin-right: 4px; }
.al-rule { margin: 0; font-size: 12.5px; color: #c92a2a; display: flex; gap: 5px; align-items: center; }
.al-rule.muted { color: var(--ink-3); }

/* 관리자 */
.adm-tabs a { padding: 7px 14px; font-size: 13.5px; color: var(--ink-2); }
.adm-tabs a + a { border-left: 1px solid var(--line); }
.adm-tabs a.on { background: var(--brand); color: var(--on-brand); font-weight: 700; }
.view-head .seg { margin-left: auto; }
.adm-body { padding: 0 20px 40px; }
.adm-body > .card-note { margin: 8px 0 12px; }
.adm-split { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.adm-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.adm-list li + li { border-top: 1px solid var(--line-2); }
.adm-list button { display: grid; gap: 3px; width: 100%; text-align: left; padding: 10px 12px; justify-items: start; }
.adm-list button:hover { background: var(--hover); }
.adm-list button.on { background: var(--sel); box-shadow: inset 3px 0 0 var(--brand); }
.adm-list small { font-size: 12px; color: var(--ink-3); }
.adm-panel { border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: grid; gap: 12px; }
.adm-panel .editor-wrap { min-height: 300px; margin-top: 0; }
.adm-editor { min-height: 260px; }
.adm-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.chk-row { display: flex; gap: 14px; flex-wrap: wrap; padding: 6px 0; }
.adm-sec { margin-top: 16px; }
.adm-sec h2 { font-size: 16px; margin: 0 0 8px; }
.adm-sec .card-note { margin: 0 0 10px; }
.dept-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-width: 520px; }
.dept-list li { display: flex; align-items: center; gap: 6px; }
.dept-list .text-in.sm { flex: 1 1 auto; }

@media (max-width: 1100px) {
  .ad-top { flex-direction: column; align-items: stretch; }
  .ad-signs { justify-content: flex-start; overflow-x: auto; }
}
@media (max-width: 860px) {
  .mode-sw { padding-top: 2px; }
  .appr-filter .af-q { width: 100%; flex: 1 1 100%; }
  .af-range .text-in.sm { width: 128px; }
  .appr-sum { margin: 8px 12px 0; }
  .sum-h { width: 100%; }
  /* 그리드 → 카드 줄 (제목 + 요약 한 줄) */
  .appr-grid:not(.rule-grid):not(.user-grid) thead { display: none; }
  .appr-grid:not(.rule-grid):not(.user-grid) td:not(.main):not(.chk-col):not(.empty):not(.loading) { display: none; }
  .appr-grid:not(.rule-grid):not(.user-grid) td.main { min-width: 0; padding: 10px 14px; }
  .appr-grid .ag-sub { display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px; line-height: 1.6; }
  .appr-grid .ag-sub .as-tag { font-size: 11px; }
  .appr-doc { padding: 14px 14px 40px; }
  .ad-title { font-size: 19px; }
  .ad-info th { width: 80px; }
  .ad-info, .ad-info tbody, .ad-info tr { display: block; }
  .ad-info tr { display: grid; grid-template-columns: 80px minmax(0, 1fr); }
  .ad-info th, .ad-info td { border-width: 0 0 1px; }
  .ad-info th:empty, .ad-info th:empty + td { display: none; }
  .adc { grid-template-columns: 1fr; gap: 2px; }
  .form-pick { padding: 4px 14px 24px; grid-template-columns: 1fr 1fr; }
  .appr-edit .cf-body { gap: 6px; }
  .appr-edit #aeAmount { flex: 1 1 140px; }
  .appr-edit input[type="date"].text-in.sm { flex: 1 1 130px; }
  .al-row { flex-wrap: wrap; }
  .al-who { flex: 1 1 60%; }
  .adm-split { grid-template-columns: 1fr; }
  .adm-body { padding: 0 12px 30px; }
  .view-head { flex-wrap: wrap; }
  .view-head .seg { margin-left: 0; }
  .rule-grid, .user-grid { min-width: 720px; }
}
@media (max-width: 380px) {
  .form-pick { grid-template-columns: 1fr; }
  .mode-sw label { font-size: 16px; }
}
@media print {
  body.print-appr .main > .view:not(#viewApprDoc) { display: none !important; }
  body.print-appr .side-dim, body.print-appr .ad-log { display: none !important; }
  body.print-appr .appr-doc { max-width: none; padding: 0; }
  body.print-appr .ad-top { flex-direction: row; }
  .stamp.ok, .stamp.no, .urgent, .as-tag, .at-type { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.modal-card textarea.text-in { height: auto; padding: 8px 10px; resize: vertical; font: inherit; line-height: 1.5; }

/* ================================================================ 편집기 도구 (editor.js) : 표 · 되돌리기 · 이미지 */
.ed-bar .ed-tbl { min-width: 34px; }
.ed-bar .ed-img svg { flex: none; }
.editor.drop-img { outline: 2px dashed var(--brand); outline-offset: -4px; }
.editor table { border-collapse: collapse; max-width: 100%; }
.editor td, .editor th { min-width: 24px; min-height: 22px; vertical-align: top; }
.editor img.img-on { outline: none; }
body.lped-colresize, body.lped-colresize * { cursor: col-resize !important; user-select: none; }
body.lped-rowresize, body.lped-rowresize * { cursor: row-resize !important; user-select: none; }
.tbl-pick { position: fixed; z-index: 75; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px;
            box-shadow: 0 8px 28px rgba(0, 0, 0, .14); }
.tp-grid { display: grid; grid-template-columns: repeat(10, 18px); gap: 3px; }
.tp-grid span { width: 18px; height: 18px; border: 1px solid #d5d7dc; border-radius: 2px; background: #fff; cursor: pointer; }
.tp-grid span.on { background: var(--brand-soft); border-color: var(--brand-dark); }
.tp-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; }
.tp-lbl { color: var(--ink-2); }
.tp-head { display: inline-flex; gap: 4px; align-items: center; color: var(--ink-3); cursor: pointer; }
.tp-num { display: flex; align-items: center; gap: 5px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-3); }
.tp-num input { width: 52px; height: 28px; border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; }
.tp-ok { margin-left: auto; height: 28px; padding: 0 12px; border-radius: 5px; background: var(--brand); color: var(--on-brand); font-weight: 700; }
.tbl-bar { position: fixed; z-index: 72; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px 6px; max-width: calc(100vw - 12px);
           background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 16px rgba(0, 0, 0, .12); font-size: 12.5px; }
.tbl-bar button { padding: 4px 8px; border-radius: 5px; color: var(--ink-2); white-space: nowrap; }
.tbl-bar button:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.tbl-bar button:disabled { opacity: .35; cursor: default; }
.tbl-bar button.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.tbl-bar button.danger:hover { color: var(--danger); }
.tbl-bar .tb-sep { width: 1px; height: 16px; background: var(--line); margin: 0 3px; }
.tbl-sel { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.tbl-sel i { position: fixed; background: rgba(59, 130, 246, .16); outline: 1px solid rgba(59, 130, 246, .55); outline-offset: -1px; }
.mode-sw { gap: 14px; }
.mode-sw label { font-size: 15.5px; white-space: nowrap; gap: 6px; }

/* ================================================================ 메일 계정 관리 (환경설정) */
.acc-box { padding-top: 0; }
.acc-title { font-size: 16px; margin: 18px 0 8px; display: flex; gap: 8px; align-items: baseline; }
.acc-title small { font-size: 12.5px; font-weight: 400; }
.acc-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.acc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 14px; }
.acc-row + .acc-row { border-top: 1px solid var(--line-2); }
.acc-who { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.acc-who small { color: var(--ink-3); }
.acc-last { font-size: 12.5px; white-space: nowrap; }
.acc-btns { display: flex; gap: 6px; }
.acc-add { margin-top: 14px; padding: 14px; border: 1px dashed #cdd0d5; border-radius: 8px; display: grid; gap: 8px; }
.acc-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.acc-add-row .text-in.sm { flex: 1 1 180px; }
.acc-gen { margin: 0; font-size: 13px; background: #fff9db; border-radius: 6px; padding: 8px 10px; }
.acc-gen code { font-size: 14px; font-weight: 700; letter-spacing: .5px; }
@media (max-width: 860px) {
  .acc-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------------------------------------------------------------- 메일서버 현황 (관리자 대시보드) */
.dash { padding: 4px 24px 32px; display: grid; gap: 16px; }
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.dash-tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 4px; background: var(--bg); }
.dt-label { font-size: 13px; color: var(--ink-2); }
.dt-value { font-size: 24px; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; }
.dt-sub { font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.dash-meter { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin: 4px 0 2px; }
.dash-meter i { display: block; height: 100%; border-radius: 3px; background: #2a78d6; }
.dash-meter.warn i { background: #fab219; }
.dash-meter.crit i { background: #d03b3b; }
.dash-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.dash-card-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.dash-card-head h2 { font-size: 15px; margin: 0; flex: 1; }
.dash-legend { font-size: 12px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.dash-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 6px; }
.dc-recv { background: #2a78d6; }
.dc-sent { background: #eb6834; }
.dash-chart { display: flex; gap: 6px; height: 180px; }
.dc-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--ink-3);
  padding-bottom: 18px; text-align: right; min-width: 20px; font-variant-numeric: tabular-nums; }
.dc-plot { flex: 1; display: flex; align-items: stretch; gap: 2px; border-left: 1px solid var(--line); min-width: 0; }
.dc-day { flex: 1; display: flex; flex-direction: column; min-width: 0; border-radius: 3px; }
.dc-day:hover { background: var(--line-2); }
.dc-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-bottom: 1px solid var(--line); }
.dc-bars i { width: 38%; max-width: 9px; border-radius: 4px 4px 0 0; }
.dc-x { font-size: 10px; color: var(--ink-3); text-align: center; height: 18px; line-height: 18px; }
.dash-table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table th { text-align: left; font-weight: 600; color: var(--ink-2); background: var(--bg-2); padding: 8px 10px; white-space: nowrap; }
.dash-table td { padding: 8px 10px; border-top: 1px solid var(--line-2); vertical-align: top; }
.dash-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.dash-table .nowrap, .dash-errs .nowrap { white-space: nowrap; }
.dash-table .ellip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-table .dash-meter { width: 140px; }
.dash-on, .dash-off, .dash-ok, .dash-fail { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 10px; margin-left: 4px; white-space: nowrap; }
.dash-on { background: #e6f4ea; color: #0a6b0a; }
.dash-off { background: var(--line-2); color: var(--ink-3); }
.dash-ok { background: #e6f4ea; color: #0a6b0a; margin: 0; }
.dash-fail { background: #fde8e8; color: #b42318; margin: 0; cursor: help; }
.dash-bad { color: #b42318; }
.dash-errs { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; gap: 6px; }
.dash-errs li { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .dash { padding: 4px 16px 24px; }
  .dash-chart { height: 140px; }
  .dc-x { font-size: 9px; }
}

/* ---------------------------------------------------------------- 서버작동현황 (PC 가운데 창 · 휴대폰 화면 가득) */
.hp { position: fixed; inset: 0; z-index: 120; background: rgba(20, 22, 26, .4); display: grid; place-items: center; padding: 24px; }
.hp-card { background: #fff; border-radius: 12px; width: min(880px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  display: flex; flex-direction: column; box-shadow: 0 16px 50px rgba(0, 0, 0, .2); overflow: hidden; }
.hp-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.hp-head h2 { margin: 0; font-size: 18px; }
.hp-time { font-size: 12px; color: var(--ink-3); }
.hp-body { overflow-y: auto; padding: 16px 20px 24px; -webkit-overflow-scrolling: touch; }
body.hp-open { overflow: hidden; }
.hp-sum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.hp-sum.hp-ok { background: #e6f4ea; color: #0a5d0a; }
.hp-sum.hp-warn { background: #fff6e0; color: #7a5200; }
.hp-sum.hp-err { background: #fde8e8; color: #9b1c1c; }
.hp-counts { margin-left: auto; display: flex; gap: 6px; }
.hp-tag { font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.hp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hp-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px;
  border: 1px solid var(--line); border-left-width: 4px; border-radius: 8px; }
.hp-item.hp-ok { border-left-color: #0ca30c; }
.hp-item.hp-warn { border-left-color: #fab219; background: #fffbf0; }
.hp-item.hp-err { border-left-color: #d03b3b; background: #fff5f5; }
.hp-item.hp-info { border-left-color: #adb5bd; }
.hp-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; white-space: nowrap; padding-top: 1px; }
.hp-ok .hp-badge { color: #0a7d0a; }
.hp-warn .hp-badge { color: #8a5d00; }
.hp-err .hp-badge { color: #b42318; }
.hp-info .hp-badge { color: var(--ink-3); }
.hp-main { display: grid; gap: 3px; min-width: 0; font-size: 13.5px; }
.hp-main > b { font-size: 14px; }
.hp-val { color: var(--ink-2); overflow-wrap: anywhere; }
.hp-fix { margin-top: 4px; padding: 8px 10px; border-radius: 6px; background: #fff; border: 1px dashed #e0b4b4; color: var(--ink); line-height: 1.6; overflow-wrap: anywhere; }
.hp-warn .hp-fix { border-color: #f0d28a; }
.hp-fix b { color: #b42318; margin-right: 4px; }
.hp-warn .hp-fix b { color: #8a5d00; }
.hp-detail { font-size: 12px; color: var(--ink-3); line-height: 1.6; overflow-wrap: anywhere; }
.hp-sub { font-size: 15px; margin: 22px 0 8px; }
.hp-tips { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 13px; line-height: 1.6; }
.hp-tips dt { font-weight: 700; color: var(--ink-2); }
.hp-tips dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.hp-tips code { background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .hp { padding: 0; place-items: stretch; }
  .hp-card { width: 100%; max-height: none; height: 100vh; height: 100dvh; border-radius: 0; }
  .hp-head { padding: 10px 8px 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
  .hp-body { padding: 12px 14px calc(24px + env(safe-area-inset-bottom)); }
  .hp-counts { margin-left: 0; }
  .hp-item { grid-template-columns: 1fr; gap: 4px; }
  .hp-tips { grid-template-columns: 1fr; gap: 2px; }
  .hp-tips dd { margin-bottom: 10px; }
}
/* ---------------------------------------------------------------- 자동 로그아웃 1분 전 안내 */
.idle-warn { position: fixed; inset: 0; z-index: 150; background: rgba(20, 22, 26, .35); display: grid; place-items: center; padding: 16px; }
.idle-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; background: #fff; border-radius: 12px;
  padding: 18px 20px; max-width: 440px; width: 100%; box-shadow: 0 12px 40px rgba(0, 0, 0, .2); }
.idle-card > .i { width: 30px; height: 30px; color: var(--brand-dark); }
.idle-card > div { display: grid; gap: 2px; flex: 1; min-width: 180px; }
.idle-card b { font-size: 16px; }
.idle-card span { font-size: 13px; color: var(--ink-2); }
/* ---------------------------------------------------------------- 번역 안내 줄 */
.tr-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding: 8px 12px; border-radius: 8px;
  background: #eef4fd; border: 1px solid #cfe0f7; color: #1c4f8a; font-size: 13px; }
.tr-note .i { color: #2a78d6; }
.tr-note .link-btn { margin-left: auto; color: #1c4f8a; font-weight: 600; }
.tr-note:not([hidden]) + .r-body { margin-top: 44px; }
.toolbar .tb.tr-save { color: #1c4f8a; background: #eef4fd; border-radius: 6px; font-weight: 600; }   /* 확대 · 축소 표시(− 100% +)가 안내 줄과 겹치지 않게 */
/* ---------------------------------------------------------------- 개인업무일정 */
.tk-wrap { padding: 0 24px 28px; display: grid; gap: 14px; }
.tk-cal { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 12px; }
.tk-cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.tk-cal-head b { font-size: 16px; min-width: 110px; text-align: center; }
.tk-hint { font-size: 12px; color: var(--ink-3); }
.tk-grid { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tk-wd { font-size: 12px; font-weight: 600; text-align: center; padding: 5px 0; background: var(--bg-2); color: var(--ink-2);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tk-wd.sun, .tk-day.sun .tk-dn { color: #d03b3b; }
.tk-wd.sat, .tk-day.sat .tk-dn { color: #2a78d6; }
.tk-day { min-height: 92px; padding: 3px 4px 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  cursor: pointer; min-width: 0; display: flex; flex-direction: column; gap: 2px; user-select: none; }
.tk-day:hover { background: var(--hover); }
.tk-day.other { background: #fafafa; }
.tk-day.other .tk-dn { opacity: .45; }
.tk-day.sel { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.tk-dn { font-size: 12.5px; font-weight: 600; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.tk-day.today .tk-dn { background: var(--brand); color: var(--on-brand) !important; }
.tk-chips { display: grid; gap: 2px; min-width: 0; }
.tk-chip { display: block; font-size: 11.5px; line-height: 17px; padding: 0 5px; border-radius: 4px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; background: color-mix(in srgb, var(--c) 14%, #fff); border-left: 3px solid var(--c); color: var(--ink); }
.tk-chip em { font-style: normal; color: var(--ink-2); font-size: 10.5px; }
.tk-chip.done { text-decoration: line-through; opacity: .55; }
.tk-more { font-size: 11px; color: var(--ink-3); padding-left: 4px; }
.tk-dots { display: none; gap: 3px; justify-content: center; }
.tk-dots i { width: 6px; height: 6px; border-radius: 50%; }
.tk-bottom { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: start; }
.tk-cats { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 6px; }
.tk-cats-title { font-size: 13.5px; margin-bottom: 2px; }
.tk-cat { display: flex; align-items: center; gap: 7px; font-size: 13.5px; cursor: pointer; }
.tk-cat i { width: 10px; height: 10px; border-radius: 3px; }
.tk-cat.all { padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.tk-list { border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.tk-list-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tk-modes { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.tk-modes label { padding: 4px 12px; font-size: 13px; cursor: pointer; }
.tk-modes input { position: absolute; opacity: 0; pointer-events: none; }
.tk-modes label:has(input:checked) { background: var(--brand); color: var(--on-brand); font-weight: 700; }
.tk-range { font-size: 14px; }
.btn-brand.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.tk-table-wrap { overflow-x: auto; }
.tk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tk-table th { text-align: left; font-weight: 600; color: var(--ink-2); background: var(--bg-2); padding: 7px 10px; white-space: nowrap; }
.tk-table td { padding: 7px 10px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.tk-table .c { text-align: center; }
.tk-table .nowrap { white-space: nowrap; }
.tk-table tbody tr { cursor: pointer; }
.tk-table tbody tr:hover { background: var(--hover); }
.tk-table tbody tr.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.tk-table tr.done .tk-title { text-decoration: line-through; color: var(--ink-3); }
.tk-tag { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 10px; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 15%, #fff); color: var(--ink); border: 1px solid color-mix(in srgb, var(--c) 45%, #fff); }
.tk-empty { text-align: center; color: var(--ink-3); padding: 26px 10px !important; cursor: default; }

/* 일정편집 창 (그림 2 모양 : 왼쪽 항목 이름 · 오른쪽 입력) */
.tk-dlg { position: fixed; inset: 0; z-index: 125; background: rgba(20, 22, 26, .4); display: grid; place-items: center; padding: 20px; }
.tk-dlg-card { background: #fff; border-radius: 10px; width: min(700px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
  display: flex; flex-direction: column; box-shadow: 0 16px 50px rgba(0, 0, 0, .22); overflow: hidden; }
.tk-dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 8px 18px; border-bottom: 1px solid var(--line); }
.tk-dlg-head h2 { margin: 0; font-size: 16px; }
.tk-dlg-body { overflow-y: auto; padding: 14px 18px 6px; display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 9px 10px; align-items: center; }
.td-l { font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-align: right; white-space: nowrap; }
.td-red { color: #d03b3b !important; }
.td-v .text-in { width: 100%; height: 34px; }
.td-row { display: flex; align-items: center; gap: 8px; }
.td-wrap { flex-wrap: wrap; }
.td-row .text-in[type="date"] { width: 160px; flex: none; }
.td-row .td-time { width: 132px; flex: none; }
.td-num { width: 84px !important; flex: none; text-align: right; }
.td-cat { width: 140px !important; flex: none; }
.td-rep { width: 130px !important; flex: none; }
.td-unit { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.td-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; white-space: nowrap; cursor: pointer; }
.td-colorbtn { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 6px;
  background: #2a78d6; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.td-colorbtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
#tdColorDot { width: 12px; height: 12px; border-radius: 3px; border: 2px solid #fff; }
.td-bar { color: #d03b3b; }
.td-share { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.td-share label { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.td-share .td-sub:has(input:disabled) { color: var(--ink-3); cursor: default; }
.td-note { font-size: 12px; color: #8a5d00; background: #fff6e0; border-radius: 6px; padding: 6px 10px; }
.td-content { height: 180px !important; resize: vertical; padding: 8px 10px; font: inherit; }
.td-repeat-note { margin: 0 18px; font-size: 12px; color: var(--ink-3); }
.tk-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 14px; border-top: 1px solid var(--line); margin-top: 8px; }
.tk-dlg-foot button { min-width: 88px; }

@media (max-width: 860px) {
  .tk-wrap { padding: 0 10px 20px; }
  .tk-hint { display: none; }
  .tk-day { min-height: 54px; padding: 2px; align-items: center; }
  .tk-chips { display: none; }
  .tk-dots { display: flex; }
  .tk-bottom { grid-template-columns: 1fr; }
  .tk-cats { grid-template-columns: repeat(4, auto); justify-content: start; gap: 6px 14px; }
  .tk-cats-title { grid-column: 1 / -1; }
  .tk-cat.all { border: 0; padding: 0; }
  .tk-list-head .grow { display: none; }
  .tk-table thead { display: none; }
  .tk-table, .tk-table tbody, .tk-table tr, .tk-table td { display: block; }
  .tk-table tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; padding: 8px 10px; border-top: 1px solid var(--line-2); }
  .tk-table td { border: 0; padding: 0; }
  .tk-table td:nth-child(1) { font-weight: 600; }
  .tk-table td:nth-child(2) { color: var(--ink-2); }
  .tk-table td:nth-child(3) { grid-row: 1; grid-column: 3; }
  .tk-table td:nth-child(4) { grid-column: 1 / -1; font-size: 14px; }
  .tk-table td:nth-child(5), .tk-table td:nth-child(6) { grid-column: 1 / 3; color: var(--ink-3); font-size: 12px; }
  .tk-table td:nth-child(5):empty, .tk-table td:nth-child(6):empty { display: none; }
  .tk-table td:nth-child(7) { grid-row: 2; grid-column: 3; }
  .tk-dlg { padding: 0; place-items: stretch; }
  .tk-dlg-card { width: 100%; max-height: none; height: 100vh; height: 100dvh; border-radius: 0; }
  .tk-dlg-body { grid-template-columns: 1fr; gap: 4px; }
  .td-l { text-align: left; margin-top: 6px; }
  .td-l:empty { display: none; }
  .td-row .text-in[type="date"] { width: 150px; }
}
/* 개인업무일정 보완 : 주차 칸 · 버튼 끄기 · 카렌다 스위치 */
.tk-wk { display: flex; align-items: baseline; justify-content: center; padding-top: 34px; font-size: 11px; color: var(--ink-3); white-space: nowrap;
  background: var(--bg-2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tk-wk b { font-size: 15px; color: #d03b3b; line-height: 1.1; }
.tk-wkh { font-size: 11px; }
.tk-list-head button:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.6); }
.tk-step { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-right: 4px; }
.tk-step button { width: 32px; height: 30px; border: 0; background: var(--panel, #fff); color: #e0262b; font-size: 13px; line-height: 1; cursor: pointer; }
.tk-step button + button { border-left: 1px solid var(--line); }
.tk-step button:hover { background: var(--hover, #f3f4f6); }
.tk-step #tkDayToday { font-size: 16px; }
.tk-seldate { color: #e0262b; font-size: 19px; font-weight: 800; margin-right: 6px; white-space: nowrap; }
.tk-seldate[hidden] { display: none; }
.tk-seldate small { font-size: 12px; font-weight: 700; margin-left: 1px; }
.tk-switch { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; }
.tk-switch input { position: absolute; opacity: 0; pointer-events: none; }
.tk-switch i { position: relative; width: 36px; height: 20px; border-radius: 10px; background: #c9ccd3; transition: background .15s; }
.tk-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.tk-switch input:checked + i { background: var(--brand); }
.tk-switch input:checked + i::after { transform: translateX(16px); }
.tk-switch input:focus-visible + i { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
@media (max-width: 860px) {
  .tk-grid { grid-template-columns: 30px repeat(7, minmax(0, 1fr)); }
  .tk-wk { font-size: 9px; }
  .tk-wk b { font-size: 12px; }
}

/* 본문 편집기 LPEditor (iframe, js/lpembed.js) - 메일 쓰기 · 결재 작성 · 결재양식 */
.editor-wrap.lp-host { flex: none; display: flex; flex-direction: column; height: clamp(540px, 74vh, 960px); }
.appr-edit .editor-wrap.lp-host { min-height: 0; }
.adm-panel .editor-wrap.lp-host { height: 560px; }
.lp-embed { display: block; flex: 1; min-height: 0; width: 100%; border: 0; background: #fff; }
