/* =============================================================
   layout-test 공통 CSS 프레임워크
   — https://mail.freeitm.com/ 의 레이아웃/컬러/컴포넌트 스타일을 참고해
     top_bar / sidebar / sub-sidebar / main / sub-main / list-panel /
     editor-panel / preview-panel / cal-* 등 범용 레이아웃 클래스를 구성.
   ============================================================= */

:root {
  --clr-bg:            #f5f6f8;
  --clr-text:          #222222;
  --clr-text-sub:      #64748b;
  --clr-primary:       #26205a;
  --clr-primary-hover: #0042aa;
  --clr-border:        #e2e5ea;
  --clr-border-light:  #f1f5f9;
  --clr-surface:       #ffffff;
  --basic-svg-color:   #111827;

  --nav-active-bg:  #ebebeb;
  --nav-hover-bg:   #f1f5f9;

  --btn-primary-bg:     #263e0f;
  --btn-primary-text:   #ffffff;
  --btn-primary-hover:  #669c35;
  --btn-secondary-bg:   #e5e7eb;
  --btn-secondary-text: #374151;
  --btn-second-border:  #9ca3af;
  --btn-second-hover:   #d1d5db;
  --btn-cancel-bg:      #ffffff;
  --btn-cancel-text:    #555555;
  --btn-cancel-border:  #dddddd;
  --btn-cancel-hover:   #f5f5f5;
  --btn-danger-bg:      #ef4444;
  --btn-danger-text:    #ffffff;
  --btn-danger-hover:   #dc2626;

  --header-height: 52px;
  --header-bg:     #1e293b;
  --header-text:   #f1f5f9;
  --header-hover:  rgba(255,255,255,.08);

  --sidebar-width:     200px;
  --sub-sidebar-width: 200px;
  --preview-panel-width: 300px;

  --theme-font: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--theme-font);
  font-size: 13px; /* 2026-09-17 사용자 지정: 전 화면 기본 글자 13px(예전 15px) */
  color: var(--clr-text);
  background: var(--clr-bg);
}
a { color: inherit; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: .8125rem; }

/* ── 공통: body.layout-* 는 전부 세로 flex(topbar 위, 콘텐츠 아래, footer 맨 아래) ── */
body[class^="layout-"] {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── top_bar ── */
.top_bar {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: var(--header-height);
  padding: 0 20px;
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid #0f172a;
  z-index: 200;
}
.top_bar-lang {
  display: flex; align-items: center; gap: 5px;
  color: #cbd5e1; text-decoration: none; font-size: .75rem; font-weight: 600;
  padding: 5px 8px; border-radius: 6px; margin-right: 10px; transition: background .12s, color .12s;
  flex-shrink: 0; background: none; border: none; cursor: pointer;
}
.top_bar-lang:hover { background: var(--header-hover); color: #fff; }
.top_bar-lang-wrap { position: relative; flex-shrink: 0; }
.top_bar-lang-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 220;
  width: 120px; background: #fff; border: 1px solid var(--clr-border); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12); padding: 4px 0;
}
.top_bar-lang-menu.open { display: block; }
.top_bar-lang-item { padding: 7px 12px; font-size: .8125rem; color: #374151; cursor: pointer; }
.top_bar-lang-item:hover { background: var(--nav-hover-bg); }
.top_bar-lang-item.active { color: var(--clr-primary); font-weight: 600; }
.top_bar-brand { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.top_bar-logo { font-size: .95rem; font-weight: 700; color: var(--header-text); }
.top_bar-nav { display: flex; align-items: center; gap: 2px; margin-left: 16px; }
.top_bar-nav-item {
  color: #cbd5e1; text-decoration: none; font-size: .8125rem; font-weight: 500;
  padding: 6px 12px; border-radius: 6px; transition: background .12s, color .12s;
}
.top_bar-nav-item:hover { background: var(--header-hover); color: #fff; }
.top_bar-spacer { flex: 1; }
.top_bar-user { display: flex; align-items: center; gap: 12px; font-size: .8125rem; color: #cbd5e1; }
.top_bar-logout {
  display: flex; align-items: center; color: #cbd5e1; text-decoration: none;
  padding: 5px 8px; border-radius: 6px; transition: background .12s, color .12s;
  /* <button> 이라 안 지우면 브라우저 기본 흰 배경·테두리가 그대로 보인다
     - 옆의 .top_bar-lang / .top_bar-help 와 같은 꼴로 맞춘다. */
  background: none; border: none; cursor: pointer; font: inherit;
}
.top_bar-logout:hover { background: var(--header-hover); color: #fff; }
.top_bar-logout-form button.top_bar-logout {
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
}
.top_bar-admin { display: flex; align-items: center; color: #cbd5e1; padding: 5px 8px; border-radius: 6px; transition: background .12s, color .12s; }
.top_bar-admin:hover { background: var(--header-hover); color: #fff; }
.top_bar-help {
  display: flex; align-items: center; color: #cbd5e1; background: none; border: none;
  padding: 5px 8px; border-radius: 6px; margin-right: 8px; cursor: pointer; transition: background .12s, color .12s;
}
.top_bar-help:hover { background: var(--header-hover); color: #fff; }

/* ── 모든 footer 영역(전역 footer + 각 패널 footer) 공용 스타일 —
   list-panel-footer 기준으로 통일. 안의 텍스트는 .footer-text 클래스로 통일한다 ── */
.footer,
.page-footer,
.main-footer,
.sub-main-footer,
.sidebar-footer,
.sub-sidebar-footer,
.list-panel-footer,
.editor-panel-footer,
.cal-footer {
  flex-shrink: 0;
  padding: 8px 16px;
  border-top: 1px solid var(--clr-border);
  font-size: .75rem;
  color: #9ca3af;
}
.footer { text-align: center; }
.footer-text { color: inherit; }

/* editor-panel-footer/sub-main-footer/sub-sidebar-footer/sidebar-footer/page-footer는
   감춤 처리 — 전역 footer/list-panel-footer/cal-footer는 그대로 유지 */
.editor-panel-footer,
.sub-main-footer,
.sub-sidebar-footer,
.sidebar-footer,
.page-footer {
  display: none;
}

/* =============================================================
   layout-page — top_bar + page(header/body/footer) + footer
   ============================================================= */
.layout-page .page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.page-header {
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 28px; background: #fff;
  border-bottom: 1px solid #eee; flex-shrink: 0;
}
.page-title { font-size: 1.2rem; font-weight: 700; color: #1e293b; margin: 0; }
.page-body {
  flex: 1; min-height: 0; overflow-y: auto; padding: 24px 28px;
}

/* =============================================================
   preview / preview-panel — 콘텐츠 옆에 나란히 표시되는 사이드 패널
   (freeitm_webmail의 .pp 컴포넌트 패턴을 범용 클래스명으로 재구성)
   ============================================================= */
.preview { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.preview > .page-body,
.preview > .main-body,
.preview > .sub-main-body,
.preview > .cal-body { flex: 1; min-width: 0; overflow-y: auto; }

.preview-panel {
  width: var(--preview-panel-width);
  min-width: 220px;
  max-width: 50vw;
  flex-shrink: 0;
  background: #fff;
  border-left: 1px solid var(--clr-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.preview-panel-resize {
  position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  cursor: ew-resize; z-index: 5; transition: background .15s;
}
.preview-panel-resize:hover, .preview-panel-resize.dragging { background: rgba(37,99,235,.2); }
.preview-panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; border-bottom: 1px solid var(--clr-border);
  flex-shrink: 0;
}
.preview-panel-title { font-size: 13px; font-weight: 700; color: #111827; flex: 1; word-break: break-all; }
.basic-close {
  background: none; border: none; cursor: pointer; color: #9ca3af;
  font-size: 16px; line-height: 1; border-radius: 4px; padding: 2px 5px;
  transition: color .1s, background .1s;
}
.basic-close:hover { color: #374151; background: #f3f4f6; }
.preview-panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 0; }
/* preview-panel 안의 버튼(수정/삭제/공유/다운로드 등)은 body가 아니라 이 하단 고정 영역에
   모아 표시한다(2026-08-29) - list-panel-footer/editor-panel-footer와 같은 취지지만
   실제로 버튼을 담으므로 전역 footer 텍스트 스타일 대신 별도 규칙을 쓴다. */
.preview-panel-footer {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px;
  border-top: 1px solid var(--clr-border); flex-shrink: 0;
}
.preview-panel-footer:empty { display: none; }

/* 색상 팔레트 스와치 - 원래 note-new.ejs 전용 인라인 스타일이었던 것을 공용으로 옮김(2026-08-30) -
   캘린더 폴더 생성 등 "미리 정한 색 중 하나를 원형 스와치로 고르는" 다른 화면에서도 재사용. */
.note-color-picker { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.note-color-swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .15s; flex-shrink: 0; padding: 0; }
.note-color-swatch:hover { transform: scale(1.2); }
.note-color-swatch.active { transform: scale(1.15); }
.note-color-swatch svg { display: none; }
.note-color-swatch.active svg { display: block; }
.preview-panel-sec { padding: 8px 0; border-bottom: 1px solid var(--clr-border-light); }
.preview-panel-sec:last-child { border-bottom: none; }
.preview-panel-sec-title {
  font-size: 10px; font-weight: 700; color: #9ca3af; text-transform: uppercase;
  letter-spacing: .7px; padding: 0 16px 6px; display: flex; align-items: center; gap: 6px;
}
.preview-panel-sec-title::before { content: ''; width: 3px; height: 10px; background: var(--clr-primary); border-radius: 9999px; }
.preview-panel-row { display: flex; gap: 10px; padding: 4px 16px; font-size: 12.5px; }
.preview-panel-row .k { color: #9ca3af; width: 46px; flex-shrink: 0; }
.preview-panel-row .v { color: var(--clr-text); word-break: break-all; }
/* 폴더 모드 패널의 공유 목록 - 대상 이름 / 권한 배지 / 공유일 */
.preview-panel-share { display: flex; align-items: center; gap: 8px; padding: 5px 16px; font-size: 12.5px; }
.preview-panel-share .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--clr-text); }
.preview-panel-share .who small { display: block; color: #9ca3af; font-size: 11px; }
.preview-panel-share .perm { flex-shrink: 0; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 9999px; background: #eef2ff; color: #4338ca; }
.preview-panel-share .perm.write { background: #ecfdf5; color: #047857; }
.preview-panel-share .when { flex-shrink: 0; color: #9ca3af; font-size: 11px; }
.preview-panel-empty { padding: 6px 16px; font-size: 12.5px; color: #9ca3af; }

/* file-preview-thumb — 파일 미리보기 이미지/페이지 영역 (portal의 .pp-sec.pp-slides를 이름만 바꿔 재구성) */
@keyframes filePreviewThumbSpin { to { transform: rotate(360deg); } }
.file-preview-thumb { border-bottom: 1px solid var(--clr-border-light); }
.file-preview-thumb-canvas {
  padding: 10px 12px; min-height: 60px; display: flex;
  align-items: center; justify-content: center; background: #f9fafb;
}
.file-preview-thumb-canvas img { display: block; width: 100%; max-width: 100%; height: auto; object-fit: contain; border-radius: 4px; }
.file-preview-thumb-loading {
  color: #9ca3af; font-size: 12px; padding: 14px 16px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.file-preview-thumb-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 7px 12px 10px;
  border-top: 1px solid var(--clr-border);
}
.file-preview-thumb-nav-btn {
  background: none; border: 1.5px solid #e5e7eb; border-radius: 6px;
  width: 28px; height: 28px; cursor: pointer; font-size: 11px;
  color: #6b7280; display: flex; align-items: center; justify-content: center;
  transition: background .12s; font-family: inherit;
}
.file-preview-thumb-nav-btn:hover:not(:disabled) { background: #f3f4f6; color: var(--clr-primary); }
.file-preview-thumb-nav-btn:disabled { opacity: .35; cursor: default; }
.file-preview-thumb-nav-info { font-size: 12px; color: #6b7280; font-weight: 600; min-width: 54px; text-align: center; }

/* =============================================================
   layout-basic — sidebar + main(header/body/footer)
   ============================================================= */
.layout-body { flex: 1; min-height: 0; display: flex; overflow: hidden; }

.sidebar {
  width: var(--sidebar-width); flex-shrink: 0;
  background: #fff; border-right: 1px solid var(--clr-border);
  display: flex; flex-direction: column; overflow-y: auto;
}
.sidebar-header { height: 52px; padding: 0 16px; display: flex; align-items: center; border-bottom: 1px solid #eee; flex-shrink: 0; }
.sidebar-title { font-size: .95rem; font-weight: 700; color: #1e293b; }
.sidebar-nav { list-style: none; margin: 0; padding: 0; flex: 1; }
.sidebar-nav li a {
  display: flex; align-items: center; height: 38px; padding: 0 16px;
  color: #374151; text-decoration: none; font-size: .875rem;
  border-left: 3px solid transparent; transition: background .12s, color .12s, border-color .12s;
}
.sidebar-nav li a:hover { background: var(--nav-hover-bg); }
.sidebar-nav li a.active { background: var(--nav-active-bg); color: var(--clr-primary); border-left-color: var(--clr-primary-hover); font-weight: 600; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; }
.main-header {
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 28px; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.main-title { font-size: 1.2rem; font-weight: 700; color: #1e293b; margin: 0; }
.main-body { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 28px; }

/* =============================================================
   layout-basic-sub — sidebar + sub-sidebar + sub-main(header/body/footer)
   ============================================================= */
.sub-sidebar {
  width: var(--sub-sidebar-width); flex-shrink: 0;
  background: #fff; border-right: 1px solid var(--clr-border);
  display: flex; flex-direction: column; overflow-y: auto;
}
.sub-sidebar-resize { width: 5px; flex-shrink: 0; cursor: ew-resize; transition: background .15s; }
.sub-sidebar-resize:hover, .sub-sidebar-resize.dragging { background: rgba(37,99,235,.2); }
.sub-sidebar-header { height: 52px; padding: 7px; display: flex; align-items: center; border-bottom: 1px solid #eee; flex-shrink: 0; }
.sub-sidebar-title { font-size: .95rem; font-weight: 700; color: #1e293b; }
.sm-new-btn {
    display: block;
    width: 100%;
    margin: 0;
    padding: 9px 20px;
    background: var(--clr-primary, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.sub-sidebar-nav { list-style: none; margin: 0; padding: 0px 0; flex: 1; }
.sub-sidebar-nav li a {
  display: flex; align-items: center; height: 34px; padding: 0 16px;
  color: #374151; text-decoration: none; font-size: .8125rem;
  border-left: 3px solid transparent; transition: background .12s, color .12s, border-color .12s;
}
.sub-sidebar-nav li a:hover { background: var(--nav-hover-bg); }
.sub-sidebar-nav li a.active { background: var(--nav-active-bg); color: var(--clr-primary); border-left-color: var(--clr-primary-hover); font-weight: 600; }
/* sub-sidebar-nav 안에 항목 그룹을 나누는 구획 라벨 (예: 주소록의 "나에게 공유된 주소록") */
.sub-sidebar-nav-label { padding: 10px 16px 4px; font-size: .75rem; color: var(--clr-text-sub); }
.sub-sidebar-nav li a .sub-nav-owner { color: var(--clr-text-sub); font-size: .75rem; }

.sub-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; }
.sub-main-header {
  display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 28px; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.sub-main-title { font-size: 1.2rem; font-weight: 700; color: #1e293b; margin: 0; }
.sub-main-body { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 28px; display: flex; }

/* sub-main-body가 리스트/에디터처럼 자식을 나란히 배치해야 하는 페이지에서는
   padding을 없애고 자식 패널이 꽉 채우도록 한다 */
.sub-main-body:has(.list-panel),
.sub-main-body:has(.cal-month),
.sub-main-body:has(.cal-week),
.sub-main-body:has(.cal-day),
.sub-main-body:has(.cal-list) { padding: 0; }
/* :has(.basic-tab)를 자손 전체가 아니라 "직계 자식"으로 좁힌다 - list-panel처럼 좁은
   영역 안에 basic-tab(필터탭)을 중첩해서 쓰는 페이지(mail 등)까지 이 규칙에 걸려
   list-panel/editor-panel 2단 레이아웃 전체가 세로로 무너지는 회귀가 실제로 있었음
   (mail 페이지에 필터탭 추가 후 발견) - 이 규칙은 .basic-tab이 sub-main-body 바로
   아래에 와서 그 영역 전체가 탭 하나짜리 단일 컬럼 페이지가 되는 경우만을 위한 것. */
.sub-main-body:has(> .basic-tab) { flex-direction: column; padding: 0; overflow-y: auto; }

/* =============================================================
   layout-basic-list — list-panel + editor-panel(+ preview-panel)
   ============================================================= */
.list-panel {
  width: 280px; flex-shrink: 0;
  border-right: 1px solid var(--clr-border);
  display: flex; flex-direction: column; overflow: hidden; background: #fff;
}
.list-panel-resize { width: 5px; flex-shrink: 0; cursor: ew-resize; transition: background .15s; }
.list-panel-resize:hover, .list-panel-resize.dragging { background: rgba(37,99,235,.2); }
.list-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  height: 48px; padding: 0 16px; border-bottom: 1px solid var(--clr-border); flex-shrink: 0;
}
.list-panel-title { font-size: .875rem; font-weight: 700; color: #1e293b; }
.list-panel-body { flex: 1; min-height: 0; overflow-y: auto; }
/* list-panel-body/editor-panel-body에 표시할 내용이 없을 때(목록 없음, 선택 없음, 오류 등)와
   불러오는 중일 때 공통으로 쓰는 표시 - portal(이 리포)의 mail.ejs .mail-empty 패턴과 동일하게
   통일(같은 정의를 두 클래스명으로 등록 - empty=내용 없음, loading=불러오는 중) */
.empty, .loading { display: flex; align-items: center; justify-content: center; min-height: 140px; padding: 24px; text-align: center; font-size: .8125rem; color: var(--clr-text-sub); }
.list-item {
  display: block; padding: 10px 16px; cursor: pointer; border-bottom: 1px solid var(--clr-border-light);
  transition: background .1s; text-decoration: none; color: inherit;
}
.list-item:hover { background: var(--nav-hover-bg); }
.list-item.active { background: var(--nav-active-bg); border-left: 3px solid var(--clr-primary); padding-left: 13px; }
.list-item-title { font-size: .8125rem; font-weight: 600; color: #1e293b; }
.list-item-sub { font-size: .75rem; color: #9ca3af; margin-top: 2px; }

/* ── 내 저장소(mystorage) 파일/폴더 카드 그리드 - portal(www.freeitm.com 아님, 이 리포의
   /storage/mystorage) storage.ejs의 .st-item 패턴을 file-item으로 재명명해 이식 ── */
.file-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--clr-text-sub); letter-spacing: .06em; margin: 0 0 10px; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 20px; }
.file-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 10px 10px; border: 1px solid var(--clr-border); border-radius: 10px;
  cursor: pointer; text-align: center; position: relative;
  transition: box-shadow .15s, border-color .15s;
}
.file-item:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); border-color: var(--clr-primary); }
.file-item-icon { display: flex; align-items: center; justify-content: center; }
.file-item-name { font-size: 12px; font-weight: 600; color: var(--clr-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.file-item-size { font-size: 10px; color: var(--clr-text-sub); }
.file-item-check { position: absolute; top: 6px; left: 6px; z-index: 2; cursor: pointer; width: 15px; height: 15px; }
.file-item.file-item-selected { outline: 2px solid var(--clr-primary); background: rgba(37,99,235,.07); border-color: var(--clr-primary); }
/* 마우스로 영역을 그어 고를 때의 사각형(mystorage.js marqueeSelect) - 화면 좌표로 그리고
   끄는 동안에는 글자가 잡히지 않도록 body 에 표시를 둔다. */
.st-marquee { position: fixed; z-index: 50; pointer-events: none; border-radius: 2px;
  border: 1px solid var(--clr-primary); background: rgba(37,99,235,.12); }
body.st-marquee-on { cursor: crosshair; user-select: none; -webkit-user-select: none; }
.file-item-fav-btn {
  position: absolute; top: 6px; right: 6px; background: none; border: none; cursor: pointer;
  padding: 3px; border-radius: 4px; line-height: 1; opacity: 0; transition: opacity .15s; z-index: 2;
}
.file-item:hover .file-item-fav-btn, .file-item-fav-btn.active { opacity: 1; }
.file-item-fav-btn:hover polygon { fill: #f59e0b !important; stroke: #f59e0b !important; }
.file-item-fav-btn.active polygon { fill: #f59e0b; stroke: #f59e0b; }
.file-item-del-btn {
  position: absolute; bottom: 4px; right: 4px; background: none; border: none; cursor: pointer;
  padding: 3px; border-radius: 4px; color: var(--clr-text-sub); opacity: 0; transition: opacity .15s; z-index: 2;
}
.file-item:hover .file-item-del-btn { opacity: 1; }
.file-item-del-btn:hover { background: var(--nav-hover-bg); color: #ef4444; }
/* 나에게 공유/내 공유/휴지통 카드 - 내 저장소 카드와 같은 모양에 hover 액션 아이콘(복원/완전삭제/공유 해제/다운로드)과 메타 줄 */
.file-item-meta { font-size: 10px; color: var(--clr-text-sub); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-actions { position: absolute; bottom: 4px; right: 4px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; z-index: 2; }
.file-item:hover .file-item-actions { opacity: 1; }
.file-item-act { background: none; border: none; cursor: pointer; padding: 3px; border-radius: 4px; color: var(--clr-text-sub); line-height: 1; display: flex; }
.file-item-act:hover { background: var(--nav-hover-bg); color: var(--clr-primary); }
.file-item-act.danger:hover { color: #ef4444; }
.file-item.file-item-static { cursor: default; }
/* 다중 선택 - 카드 왼쪽 위 체크박스(hover/선택 중에만 보임)와 목록 상단 선택 바 */
.file-item-check { opacity: 0; transition: opacity .15s; accent-color: var(--clr-primary); margin: 0; }
.file-item:hover .file-item-check, .file-item-check:checked, #stList.sel-mode .file-item-check { opacity: 1; }
.sel-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 8px 12px; border: 1px solid var(--clr-border); border-radius: 8px; background: #f8fafc; flex-wrap: wrap; }
.sel-bar-count { font-size: .8125rem; font-weight: 600; color: var(--clr-text); margin-left: auto; } /* 2026-09-18: 버튼이 앞, 선택됨은 맨 뒤 */
.sel-bar-btn { height: 30px; padding: 0 12px; gap: 6px; }
.file-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; gap: 12px; color: var(--clr-text-sub); font-size: 13px;
}
.file-empty svg { opacity: .35; }

/* 내 저장소 sub-main-header - 타이틀은 "내 저장소 / 상위 / 현재 폴더" 경로, 왼쪽 별 버튼으로
   지금 보고 있는 폴더를 즐겨찾기에 추가/해제한다(카드의 .file-item-fav-btn 과 같은 색 규칙). */
.sub-main-fav-btn {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 30px; height: 30px; padding: 0; margin-left: -6px; border: none; border-radius: 6px;
  background: none; color: #cbd5e1; cursor: pointer; transition: background .15s, color .15s;
}
.sub-main-fav-btn:hover { background: var(--nav-hover-bg); color: #f59e0b; }
.sub-main-fav-btn:hover polygon, .sub-main-fav-btn.active polygon { fill: #f59e0b; stroke: #f59e0b; }
.sub-main-fav-btn.active { color: #f59e0b; }
.sub-main-fav-btn[disabled] { opacity: .35; cursor: default; background: none; color: #cbd5e1; }
.sub-main-fav-btn[disabled]:hover polygon { fill: none; stroke: currentColor; }
#stTitle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-main-title-path { color: var(--clr-text-sub); font-weight: 500; }
.sub-main-title-path a { color: inherit; text-decoration: none; }
.sub-main-title-path a:hover { text-decoration: underline; color: var(--clr-text); }
.sub-main-title-sep { margin: 0 6px; color: #cbd5e1; font-weight: 400; }
/* 타이틀 오른쪽 "+" - 누르면 버튼 자리에 인라인 입력 폼이 나와 현재 폴더 아래 하위 폴더를 바로 만든다 */
.sub-main-add-btn {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 30px; height: 30px; padding: 0; border: none; border-radius: 6px;
  background: none; color: var(--clr-text-sub); cursor: pointer; transition: background .15s, color .15s;
}
.sub-main-add-btn:hover { background: var(--nav-hover-bg); color: #1a73e8; }
.sub-main-inline-form { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sub-main-inline-input {
  width: 220px; max-width: 40vw; height: 30px; padding: 0 10px; border: 1px solid #ddd; border-radius: 6px;
  font-size: .8125rem; outline: none; box-sizing: border-box; background: #fff;
}
.sub-main-inline-input:focus { border-color: #1a73e8; }
.sub-main-inline-btn { height: 30px; padding: 0 12px; }

/* 파일 업로드 모달 - 위치 드롭다운 + 드래그앤드롭 영역 + 선택 파일 목록 */
.upload-modal-title { display: flex; align-items: center; gap: 8px; }
.upload-modal-title svg { color: var(--clr-primary); flex-shrink: 0; }
.upload-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 170px; padding: 28px 16px; border: 2px dashed #cbd5e1; border-radius: 12px;
  background: #f8fafc; color: #cbd5e1; cursor: pointer; text-align: center; user-select: none;
  transition: border-color .15s, background .15s, color .15s;
}
.upload-dropzone:hover, .upload-dropzone:focus-visible, .upload-dropzone.dragover {
  border-color: var(--clr-primary); background: rgba(37,99,235,.05); color: var(--clr-primary); outline: none;
}
.upload-dropzone svg { pointer-events: none; }
.upload-dropzone-text { font-size: .875rem; font-weight: 600; color: #334155; }
.upload-dropzone-sub { font-size: .75rem; color: #94a3b8; }
.upload-dropzone-sub b { color: #64748b; font-weight: 600; }
.upload-file-list { margin-top: 10px; max-height: 150px; overflow-y: auto; }
.upload-file-list:empty { display: none; }
.upload-file-row {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #374151;
  padding: 6px 10px; border-radius: 6px; background: #f8fafc; margin-bottom: 4px;
}
.upload-file-row .upload-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-file-row .upload-file-size { color: #9ca3af; flex-shrink: 0; }
.upload-file-row .upload-file-rm { background: none; border: none; cursor: pointer; color: #94a3b8; font-size: 16px; line-height: 1; padding: 0 2px; }
.upload-file-row .upload-file-rm:hover { color: #ef4444; }
.modal-footer .basic-btn > svg { margin-right: 6px; }

.editor-panel {
  flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff;
}
.editor-panel-header {
  display: flex; align-items: center; gap: 12px;
  height: 48px; padding: 0 20px; border-bottom: 1px solid var(--clr-border); flex-shrink: 0;
}
.editor-panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; }
.editor-panel-body:has(.basic-tab) { padding: 0; display: flex; flex-direction: column; }

.field-row { margin-bottom: 16px; }
.field-row label { display: block; font-size: .75rem; font-weight: 600; color: #64748b; margin-bottom: 6px; }
.field-input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--clr-border); border-radius: 6px;
  font-size: .8125rem; color: #1e293b; background: #fff; outline: none; transition: border-color .12s;
}
.field-input:focus { border-color: var(--clr-primary-hover); }
textarea.field-input { resize: vertical; }
select.field-input {
  padding-right: 32px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: none;
  cursor: pointer;
}

.settings-form { max-width: 360px; padding: 24px 28px; }
.settings-form-msg { font-size: .75rem; color: #16a34a; margin-top: 8px; display: none; }
.field-color-input {
  width: 56px; height: 34px; padding: 2px; border: 1px solid var(--clr-border); border-radius: 6px;
  cursor: pointer; background: #fff;
}

/* =============================================================
   basic-btn / basic-svg-btn — 공용 버튼 (freeitm_webmail과 동일한 규칙)
   ============================================================= */
.basic-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 16px; border-radius: 6px; border: 1px solid transparent;
  font-size: .8125rem; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .12s, border-color .12s;
  background: var(--btn-secondary-bg); color: var(--btn-secondary-text);
  box-sizing: border-box;
}
.basic-btn.primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); border-color: var(--btn-primary-bg); }
.basic-btn.primary:hover { background: var(--btn-primary-hover); border-color: var(--btn-primary-hover); }
.basic-btn.second { background: var(--btn-secondary-bg); color: var(--btn-secondary-text); border-color: var(--btn-second-border); }
.basic-btn.second:hover { background: var(--btn-second-hover); border-color: var(--btn-second-hover); }
.basic-btn.cancel { background: none; color: var(--btn-cancel-text); border-color: var(--btn-primary-bg); }
.basic-btn.cancel:hover { background: var(--btn-cancel-hover); border-color: var(--btn-primary-hover); }
.basic-btn.danger { background: var(--btn-danger-bg); color: var(--btn-danger-text); border-color: var(--btn-danger-bg); }
.basic-btn.danger:hover { background: var(--btn-danger-hover); border-color: var(--btn-danger-hover); }

.basic-svg-btn {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 0;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  background: none;
  margin: 0 5px;
  color: var(--basic-svg-color, #111827);
  justify-content: center;
  border: none;
}
.basic-svg-btn:hover { background: none; opacity: .7; }

/* basic-btn/basic-svg-btn 그룹을 감싸 헤더 오른쪽으로 밀어주는 공용 래퍼 —
   page-header-actions/editor-panel-actions 등 basic-btn을 감싸던 곳은 모두 basic-btn-action으로 통일 */
.basic-btn-action, .basic-svg-btn-action { margin-left: auto; display: flex; gap: 8px; }

/* =============================================================
   layout-basic-cal — cal-header/cal-body/cal-footer
   (https://mail.freeitm.com/calendars 캘린더 스타일 그대로 반영)
   ============================================================= */
.cal-header {
  display: flex; align-items: center; gap: 14px;
  height: 52px; padding: 0 24px; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.cal-nav-group { display: flex; align-items: center; gap: 6px; }
.cal-title { font-size: 1.05rem; font-weight: 700; color: #1e293b; min-width: 130px; }
.cal-view-tabs { display: flex; gap: 2px; margin-left: 0; margin-right: 4px; background: #f1f5f9; border-radius: 8px; padding: 3px; }   /* 머리줄 맨 앞(2026-09-17) */
.cal-view-btn {
  display: flex; align-items: center; justify-content: center;
  border: none; background: none; padding: 7px 10px; border-radius: 6px;
  color: #64748b; cursor: pointer; transition: background .12s, color .12s; font-family: inherit;
}
.cal-view-btn:hover { color: #1e293b; }
.cal-view-btn.active { background: #fff; color: var(--clr-primary); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

.cal-body { flex: 1; min-height: 0; overflow-y: auto; background: #fff; }

/* ── 월간 뷰 ── */
.cal-month { display: flex; flex-direction: column; min-height: 100%; }
.cal-month-head { display: flex; border-bottom: 1px solid var(--clr-border); flex-shrink: 0; }
.cal-dow { flex: 1; text-align: center; padding: 8px 0; font-size: .75rem; font-weight: 600; color: #64748b; }
.cal-dow.cal-sun { color: #ef4444; }
.cal-dow.cal-sat { color: #2563eb; }
.cal-month-body { display: flex; flex-direction: column; flex: 1; }
.cal-week-row { display: flex; flex: 1; min-height: 100px; }
.cal-day-cell {
  flex: 1; min-width: 0; border-right: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9;
  padding: 6px 6px 4px; cursor: pointer; transition: background .1s; overflow: hidden;
  display: flex; flex-direction: column; gap: 2px;
}
.cal-day-cell:hover { background: #f9fafb; }
.cal-day-cell:last-child { border-right: none; }
.cal-other-month { background: #fafbfc; }
.cal-other-month .cal-day-num { color: #cbd5e1; }
/* 오늘 셀 표시 - 배경색+동그란 날짜 배지 대신 셀 전체를 두꺼운 테두리로 강조(2026-08-30).
   outline은 box-sizing에 안 잡혀서 다른 셀과 그리드 정렬이 안 틀어지고, 음수 offset으로
   셀 안쪽에 그려 overflow:hidden에 잘려나가지 않는다. */
.cal-today { outline: 2px solid var(--clr-primary); outline-offset: -2px; }
.cal-day-num { font-size: .8125rem; color: #374151; font-weight: 500; margin-bottom: 2px; }
.cal-evt-bar {
  font-size: .6875rem; color: #fff; background: var(--clr-primary); padding: 2px 6px; border-radius: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; line-height: 1.5;
}
.cal-evt-bar:hover { opacity: .85; }
.cal-evt-time { font-weight: 600; margin-right: 3px; opacity: .9; }
.cal-more { font-size: .6875rem; color: #64748b; padding: 1px 6px; cursor: pointer; }
.cal-more:hover { color: #1e293b; }

/* 일정 막대/칩에 마우스를 올렸을 때 보여주는 내용 미리보기 툴팁 (2026-08-29) */
.cal-evt-tooltip {
  position: fixed; z-index: 4000; display: none; max-width: 260px;
  background: #1e293b; color: #f1f5f9; border-radius: 8px; padding: 10px 12px;
  font-size: 12px; line-height: 1.5; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  pointer-events: none;
}
.cal-evt-tooltip-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.cal-evt-tooltip-row { color: #cbd5e1; }
.cal-evt-tooltip-desc { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.15); color: #e2e8f0; }
.cal-evt-tooltip-hint { margin-top: 6px; font-size: 10.5px; color: #94a3b8; font-style: italic; }

/* 메일 수신자 말풍선 (2026-09-12) - 위 일정 말풍선과 **같은 모양**(자리·여백·글자·그림자)이고
   색만 연한 회색 바탕이다. 흰 본문 위에 뜨므로 테두리를 한 겹 둘러 경계를 살린다. */
.mail-addr-tooltip {
  position: fixed; z-index: 4000; display: none; max-width: 260px;
  background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px;
  font-size: 12px; line-height: 1.5; box-shadow: 0 6px 20px rgba(0,0,0,.12);
  pointer-events: none;
}
.mail-addr-tooltip-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.mail-addr-tooltip-row { color: #6b7280; word-break: break-all; }
.mail-addr-tooltip-sec { margin-top: 6px; padding-top: 6px; border-top: 1px solid #e5e7eb; }
.mail-addr-tooltip-ok { color: #15803d; font-weight: 600; }
.mail-addr-tooltip-wait { color: #b45309; font-weight: 600; }

/* ── 주간/일간 뷰(시간대) ── */
.cal-week, .cal-day { display: flex; flex-direction: column; min-height: 100%; }
.cal-week-head { display: flex; border-bottom: 1px solid var(--clr-border); flex-shrink: 0; }
.cal-week-head > div:first-child { width: 56px; flex-shrink: 0; }
.cal-week-col-head { flex: 1; text-align: center; padding: 8px 0; font-size: .75rem; font-weight: 600; color: #64748b; }
.cal-week-date { font-size: .9rem; font-weight: 700; color: #1e293b; }
.cal-week-date.cal-today-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--clr-primary); color: #fff; margin-top: 2px; font-size: .8125rem;
}
.cal-allday-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--clr-border); flex-shrink: 0; }
.cal-evt-pill {
  font-size: .75rem; color: #1e293b; background: #eef2ff; border: 1px solid var(--clr-border);
  border-radius: 6px; padding: 6px 8px; margin-bottom: 4px; cursor: pointer; position: relative;
}
/* 주/일보기 시간칸 일정의 아래쪽 가장자리를 드래그해 시간을 늘리거나 줄이는 핸들(2026-08-30) */
/* 2026-08-30: 6px는 실측해보니 잡기 너무 얇아서(핀 자체 높이가 ~36px) 놓치기 쉬웠음 - 9px로 확대. */
.cal-evt-resize-handle { position: absolute; left: 0; right: 0; bottom: -3px; height: 9px; cursor: ns-resize; }
.cal-evt-resize-handle:hover { background: rgba(0, 0, 0, .08); border-radius: 0 0 6px 6px; }
.cal-evt-resize-tip { position: fixed; z-index: 50; background: #1e293b; color: #fff; font-size: .6875rem; padding: 2px 6px; border-radius: 4px; pointer-events: none; }
.cal-evt-pill-title { font-weight: 700; margin-bottom: 2px; }
.cal-inline-checklist { list-style: none; margin: 0; padding: 0; }
.cal-inline-checklist li { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.cal-inline-checklist label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: .75rem; }
.cal-inline-checklist input[type="checkbox"] { cursor: pointer; flex-shrink: 0; }
.cal-inline-checklist span.done { color: #9ca3af; text-decoration: line-through; }
.cal-hour-row { display: flex; min-height: 48px; border-bottom: 1px solid #f1f5f9; }
.cal-time-gutter { width: 56px; flex-shrink: 0; text-align: right; padding: 0 8px; font-size: .6875rem; color: #94a3b8; transform: translateY(-7px); }
.cal-week-cell { flex: 1; min-width: 0; border-left: 1px solid #f1f5f9; padding: 2px 4px; display: flex; flex-direction: column; gap: 2px; }
.cal-day-cell-full { flex: 1; border-left: 1px solid #f1f5f9; padding: 2px 8px; display: flex; flex-direction: column; gap: 2px; }

/* ── 목록 뷰 ── */
.cal-list { padding: 6px 0; }
.cal-list-date { font-size: .75rem; font-weight: 700; color: #64748b; text-transform: uppercase; padding: 14px 22px 6px; letter-spacing: .3px; }
.cal-list-item { padding: 9px 22px; cursor: pointer; transition: background .1s; border-bottom: 1px solid #f8f9fb; }
.cal-list-item:hover { background: #f9fafb; }
.cal-list-title { font-size: .8125rem; font-weight: 600; color: #1e293b; margin-bottom: 4px; }
.cal-empty { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 200px; color: #94a3b8; font-size: .875rem; }

/* =============================================================
   /example 데모 전용 (실제 앱에서는 쓰이지 않는 시각화 보조 스타일)
   ============================================================= */
.basic-widget {
  border: 1.5px dashed #cbd5e1; border-radius: 10px; padding: 20px;
  color: #64748b; font-size: .875rem; line-height: 1.6;
}
.basic-widget-header { margin-bottom: 10px; }
.basic-widget-label {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--clr-primary);
  background: #ede9fe; padding: 3px 9px; border-radius: 5px;
}
.example-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }

/* 여러 basic-widget/example-grid를 세로로 쌓을 때 쓰는 공용 레이아웃 유틸 */
.stack { display: flex; flex-direction: column; gap: 20px; }

.today-date { font-size: 1.05rem; font-weight: 600; color: #1e293b; margin: 0; }

.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--clr-border-light); }
.todo-list li:last-child { border-bottom: none; }
.todo-list li span { flex: 1; }
.todo-list li.done span { color: #9ca3af; text-decoration: line-through; }
.todo-list-empty { font-size: .8125rem; color: #94a3b8; margin: 0; }
.todo-attach-icon { display: flex; align-items: center; color: #94a3b8; flex-shrink: 0; }
.todo-attach-icon:hover { color: var(--clr-primary, #2563eb); }

/* Todo 목록 아래 "음성녹음"/"사진" 빠른 등록 버튼 — 사진은 basic-btn-file과 동일하게
   실제 input[type=file]을 숨기고 label 클릭으로 파일 선택창을 연다 */
.todo-capture-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--clr-border-light); }
.todo-capture-btn { position: relative; }
.todo-capture-btn input[type="file"] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.todo-capture-btn.recording { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.todo-capture-status { font-size: .75rem; color: #64748b; }
/* card-item(카드형 목록 항목)/shepherd 툴팁 공통 껍데기 — microsoft.com/microsoft-teams/download-app의
   card__content(실측: 24px padding, flex column, 카드 자체는 border 없이 24px 라운드+
   2단 soft shadow)를 그대로 옮긴 것. shepherd-element는 새 class 없이 이 selector에
   같이 묶어서 동일한 룩앤필을 공유한다 */
.card-item, .shepherd-element {
  border: none;
  border-radius: 8px;
  background: var(--clr-surface);
  box-shadow: 0 0 2px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.14);
}
.card-item {
  display: flex; flex-direction: column; padding: 24px;
  text-decoration: none; transition: box-shadow .12s, transform .12s;
}
.card-item:hover { box-shadow: 0 0 2px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.18); transform: translateY(-2px); }
.card-item-name { font-size: 1rem; font-weight: 700; color: var(--clr-text); font-family: var(--theme-font); line-height: 1.5; }
.card-item-desc, .shepherd-text {
  font-family: var(--theme-font); font-size: .8125rem; color: var(--clr-text-sub); line-height: 1.5;
}
.card-item-desc { margin-top: 6px; }
.card-item-disabled { cursor: default; background: #fafbfc; box-shadow: none; }
.card-item-disabled:hover { box-shadow: none; transform: none; }
.card-item-badge {
  display: inline-block; font-size: .6875rem; font-weight: 700; font-family: var(--theme-font);
  color: #15803d; background: #f0fdf4; border-radius: 9999px; padding: 2px 8px; margin-left: 8px;
  vertical-align: middle;
}

/* =============================================================
   반응형 — 작은 화면(태블릿/모바일)
   ============================================================= */
@media (max-width: 640px) {
  .top_bar { padding: 0 12px; }
  .top_bar-email { display: none; }
  .top_bar-logo { font-size: .85rem; }

  .page-header, .main-header, .sub-main-header {
    padding: 0 16px; height: auto; min-height: 52px; flex-wrap: wrap; row-gap: 8px;
  }
  .page-body, .main-body, .sub-main-body { padding: 16px; }
  .page-footer, .main-footer, .sub-main-footer, .footer, .sidebar-footer, .sub-sidebar-footer { padding: 8px 12px; }

  .stack { gap: 14px; }
  .basic-widget { padding: 14px; }
  .example-grid { grid-template-columns: 1fr; }

  .cal-header { padding: 0 12px; flex-wrap: wrap; row-gap: 8px; }
  .cal-title { min-width: 0; }
  .cal-view-tabs { margin-left: 0; }

  .editor-panel-body { padding: 14px; }
}

/* =============================================================
   modal-overlay / modal-box — portal.smartertools.co.kr/mail의
   모달 패턴과 동일한 클래스/값 (public/js/modal.js의 _Modal과 함께 사용)
   ============================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s, visibility .18s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-overlay.open .modal-box { transform: translateY(0); }

.modal-box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  padding: 24px 24px 20px;
  width: 340px;
  max-width: 95vw;
  transform: translateY(8px);
  transition: transform .18s;
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin-bottom: 18px;
  padding-right: 32px;
}

.modal-field { margin-bottom: 14px; }

.modal-label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
  display: block;
}

.modal-select {
  width: 100%;
  padding: 8px 32px 8px 11px;
  border: 1px solid #ddd;
  border-radius: 7px;
  font-size: 13px;
  color: #333;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
  outline: none;
  box-sizing: border-box;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  line-height: 1.5;
  transition: border-color .15s;
}
.modal-select:focus { border-color: #1a73e8; outline: none; }

.modal-input {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid #ddd;
  border-radius: 7px;
  font-size: 13px;
  color: #333;
  outline: none;
  box-sizing: border-box;
}
.modal-input:focus { border-color: #1a73e8; }

.modal-footer { display: flex; align-items: center; gap: 8px; }
.modal-box .modal-footer { justify-content: flex-end; margin-top: 20px; }

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  padding: 0;
  line-height: 1;
  transition: background .1s;
  flex-shrink: 0;
}
.modal-close-btn:hover { background: #f1f5f9; color: #1e293b; }
.modal-close-btn svg { display: block; pointer-events: none; }

/* =============================================================
   /admin/tours — 온보딩 가이드 빌더(iframe 요소 선택 + 스텝 목록)
   ============================================================= */
.tour-iframe-wrap { position: relative; width: 100%; height: 100%; }
.tour-iframe { width: 100%; height: 100%; border: none; display: block; background: #fff; }
.tour-pick-msg {
  display: none; position: absolute; top: 10px; left: 10px; z-index: 20;
  background: #111827; color: #fff; padding: 6px 12px; border-radius: 6px; font-size: 12px;
}
.tour-step-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid var(--clr-border-light); cursor: pointer;
}
.tour-step-item:hover { background: var(--nav-hover-bg); }
.tour-step-num {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--clr-primary);
  color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.tour-step-main { flex: 1; min-width: 0; }
.tour-step-title { font-size: .8125rem; font-weight: 600; color: #1e293b; }
.tour-step-selector { font-size: .75rem; color: #94a3b8; font-family: monospace; word-break: break-all; }
.tour-step-page {
  display: inline-block; margin-top: 3px; font-size: .6875rem; font-weight: 600;
  color: var(--clr-primary, #2563eb); background: #eff6ff; border-radius: 4px; padding: 1px 6px;
}
.tour-step-actions { display: flex; gap: 4px; flex-shrink: 0; }
.tour-step-actions button {
  width: 22px; height: 22px; border: none; background: none; cursor: pointer;
  color: #9ca3af; border-radius: 4px; font-size: 12px; line-height: 1;
}
.tour-step-actions button:hover { background: #f1f5f9; color: #1e293b; }
.tour-path-item {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  height: 34px; padding: 0 16px; color: #374151; font-size: .8125rem; cursor: pointer;
  border-left: 3px solid transparent; transition: background .12s, color .12s, border-color .12s;
}
.tour-path-item:hover { background: var(--nav-hover-bg); }
.tour-path-item.active { background: var(--nav-active-bg); color: var(--clr-primary); border-left-color: var(--clr-primary-hover); font-weight: 600; }
.tour-path-badge {
  font-size: 10px; font-weight: 700; color: #64748b; background: #f1f5f9; border-radius: 9999px;
  padding: 1px 7px; flex-shrink: 0;
}

/* shepherd.js 기본 테마 위에 이 프로젝트의 강조색만 살짝 맞춘다. 카드 껍데기(둥근 모서리/
   그림자/배경)는 위쪽 .card-item, .shepherd-element 규칙이 이미 담당하므로, 안쪽 래퍼는
   그 모양을 그대로 물려받게 하고(border-radius: inherit) 텍스트 영역에만 카드와 같은
   24px 여백을 준다 */
.shepherd-content { padding: 0; border-radius: inherit; }
/* 헤더와 본문 사이 간격을 없애 붙여 보이게 한다(위쪽 padding 0) */
.shepherd-text { padding: 0 24px 24px; }
.shepherd-has-title .shepherd-content .shepherd-header {
  background: var(--clr-surface, #fff);
  border-top-left-radius: inherit; border-top-right-radius: inherit;
  padding: 24px 24px 0;
}
.shepherd-arrow, .shepherd-element .shepherd-arrow { display: none; }
.shepherd-footer { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; padding: 0 24px 24px; }
.shepherd-button:not(.shepherd-button-secondary) { background: var(--btn-primary-bg); }
.shepherd-button:not(.shepherd-button-secondary):hover { background: var(--btn-primary-hover); }

/* 스텝 제목 위 "N/총단계" — shepherd-title을 세로로 쌓아 카운터를 제목 위 왼쪽에 배치 */
.shepherd-title { flex-direction: column; align-items: flex-start; gap: 2px; }
.tour-step-progress { font-size: .6875rem; font-weight: 700; color: var(--clr-text-sub); font-family: var(--theme-font); }
.tour-step-title-text { font-size: 1rem; font-weight: 700; color: var(--clr-text); font-family: var(--theme-font); }

/* 이전/다음 아이콘 버튼(< >) — shepherd-button의 배경/색상은 그대로 물려받고 모양만 원형으로 */
.shepherd-button.tour-nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; border-radius: 50%;
}

/* 스텝 본문 안 첨부파일 다운로드 링크 */
.tour-attachment-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  padding: 6px 12px; border-radius: 6px; background: var(--clr-border-light);
  color: var(--clr-text); font-size: .75rem; font-weight: 600; text-decoration: none;
}
.tour-attachment-link:hover { background: var(--clr-border); }

/* 종일 일정만 다루는 주/일 보기 — 시간대 그리드 없이 날짜별 칸만 채운다 */
.cal-allday-only-body { display: flex; flex: 1; min-height: 0; }
.cal-allday-only-body .cal-week-cell,
.cal-allday-only-body .cal-day-cell-full { border-top: 1px solid #f1f5f9; align-items: stretch; }
.cal-allday-only-body .cal-week-cell { overflow-y: auto; }

/* =============================================================
   /admin/calendar — 일정 추가/편집 모달의 체크리스트 줄 편집기
   ============================================================= */
.cal-checklist-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.cal-checklist-row-check { flex-shrink: 0; cursor: pointer; }
.cal-checklist-row-text { flex: 1; }
.cal-checklist-row-del {
  flex-shrink: 0; width: 22px; height: 22px; border: none; background: none; cursor: pointer;
  color: #9ca3af; border-radius: 4px; font-size: 12px; line-height: 1;
}
.cal-checklist-row-del:hover { background: #f1f5f9; color: #1e293b; }

/* =============================================================
   basic-tab — portal.smartertools.co.kr/admin/system/office 참고
   (원본: /var/www/basic/styles.css에 이미 이식된 것과 동일한 규칙)
   ============================================================= */
.basic-tab {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  flex-shrink: 0;
  padding: 0 4px;
}
.basic-tab .tab-item {
  padding: .55rem .5rem; font-size: .8125rem; font-weight: 500; color: #6b7280;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .12s, border-color .12s; white-space: nowrap; user-select: none;
  display: flex; align-items: center; gap: 2px;
}
.basic-tab .tab-item:hover { color: #374151; }
.basic-tab .tab-item.active { color: var(--clr-primary, #2563eb); border-bottom-color: var(--clr-primary, #2563eb); font-weight: 600; }
.basic-tab-content { display: none; padding: 16px; }
.basic-tab-content.active { display: block; }

/* Music Setting 탭 안의 업로드 컨트롤/파일 목록 */
/* basic-btn-file — 네이티브 input[type=file]을 basic-btn과 동일한 톤으로 감싼 버튼.
   실제 input은 숨기고 label 클릭으로 파일 선택창을 연다(흔한 커스텀 파일버튼 패턴) */
.basic-btn-file {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 16px; border-radius: 6px; border: 1px solid transparent;
  font-size: .8125rem; font-weight: 600; cursor: pointer;
  transition: background .12s, border-color .12s;
  background: var(--btn-secondary-bg); color: var(--btn-secondary-text);
  box-sizing: border-box; flex-shrink: 0;
}
.basic-btn-file:hover { background: var(--btn-second-hover); }
.basic-btn-file input[type="file"] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.basic-btn-file-name { font-size: .8125rem; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }

.music-upload-row { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.music-file-list { display: flex; flex-direction: column; gap: 1px; }
.music-file-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--clr-border-light); border-radius: 6px; margin-bottom: 4px;
}
.music-file-item a { font-size: .8125rem; color: #1e293b; font-weight: 500; text-decoration: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-file-item a:hover { color: var(--clr-primary-hover); text-decoration: underline; }
.music-file-size { font-size: .75rem; color: #94a3b8; flex-shrink: 0; }
.music-file-grade {
  font-size: .6875rem; font-weight: 600; color: var(--clr-primary, #2563eb);
  background: #eff6ff; border-radius: 4px; padding: 2px 6px; flex-shrink: 0;
}
.music-file-del {
  flex-shrink: 0; width: 22px; height: 22px; border: none; background: none; cursor: pointer;
  color: #9ca3af; border-radius: 4px; font-size: 12px; line-height: 1;
}
.music-file-del:hover { background: #f1f5f9; color: #dc2626; }
.music-file-empty { font-size: .8125rem; color: #94a3b8; padding: 8px 2px; }

/* Music 참고자료 업로드 — 탭에 속하지 않는 공통 영역, .basic-tab 위에 위치 */
.music-common-upload { padding: 16px; border-bottom: 1px solid var(--clr-border-light); flex-shrink: 0; }
.music-common-upload .music-upload-row { margin-bottom: 12px; }
.music-common-upload .music-file-list { max-height: 160px; overflow-y: auto; }
.music-grade-select { width: auto; min-width: 130px; flex-shrink: 0; }

/* Music 탭 서브항목(N.1~N.5) — 문서 유형 설명 입력 + 개별 AI 문제 생성 버튼 */
.music-subitem-list { display: flex; flex-direction: column; gap: 16px; }
.music-subitem-row {
  display: flex; flex-direction: column; gap: 6px;
  padding-bottom: 16px; border-bottom: 1px solid var(--clr-border-light);
}
.music-subitem-row:last-child { border-bottom: none; padding-bottom: 0; }
.music-subitem-key { font-size: .8125rem; font-weight: 700; color: #6b7280; }
.music-subitem-desc { width: 100%; min-height: 72px; resize: vertical; font-family: inherit; box-sizing: border-box; }
.music-subitem-actions { display: flex; align-items: center; gap: 8px; }
.music-subitem-count { width: 56px; flex-shrink: 0; text-align: center; }
.music-subitem-status { font-size: .75rem; color: #64748b; }
.music-subitem-status.error { color: #dc2626; }
.music-subitem-status.done { color: #16a34a; }

/* 서브항목별 참고 악보 이미지 — 붙여넣기(Ctrl+V)/파일선택 즉시 자동 업로드 zone
   (별도 Upload 버튼 없음, 클릭하면 파일선택창이 뜨고 포커스된 채로 붙여넣기 가능) */
.music-subitem-image-zone {
  border: 1px dashed var(--clr-border-light); border-radius: 6px; padding: 10px 12px;
  cursor: pointer; transition: border-color .12s, background .12s; outline: none;
}
.music-subitem-image-zone:hover, .music-subitem-image-zone:focus { border-color: #94a3b8; background: #f8fafc; }
.music-subitem-image-preview { display: flex; align-items: center; gap: 10px; }
.music-subitem-image-placeholder { font-size: .75rem; color: #94a3b8; }
.music-subitem-image-thumb { max-width: 160px; max-height: 90px; border-radius: 4px; border: 1px solid var(--clr-border-light); display: block; }
.music-subitem-image-remove {
  border: none; background: #f1f5f9; color: #64748b; width: 20px; height: 20px; border-radius: 50%;
  cursor: pointer; font-size: .6875rem; line-height: 1; flex-shrink: 0;
}
.music-subitem-image-remove:hover { background: #fee2e2; color: #dc2626; }

/* Music in Context(7번) 탭 — 서브항목 설명 대신 공통 악보 이미지 1장 업로드 */
.music-context-image-preview {
  display: block; max-width: 100%; max-height: 320px; margin-bottom: 12px;
  border: 1px solid var(--clr-border-light); border-radius: 6px;
}

/* 문항 세트 상세 상단 — 서브항목 참고 이미지를 생성된 문항과 나란히 놓고 비교 확인 */
.music-ref-compare {
  padding: 12px 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--clr-border-light);
}
.music-ref-compare-label { font-size: .75rem; font-weight: 700; color: #6b7280; margin-bottom: 8px; }

/* AI가 생성한 문항의 악보 이미지(VexFlow SVG, render-notation.js 출력을 그대로 삽입) —
   svg 태그 전체에 거는 전역 규칙 대신 이 래퍼 안에서만 적용해 다른 아이콘 svg에 영향 없게 함 */
.notation-svg-wrap svg { max-width: 100%; height: auto; display: block; }

/* 보기 자체가 악보 이미지인 문항 — 카드를 클릭해서 정답을 고르는 방식(ABRSM 기출 형식의
   "이미지 중 하나에 체크" 문제 유형) */
.music-image-choice-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.music-image-choice-option {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border: 2px solid var(--clr-border-light); border-radius: 8px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.music-image-choice-option:hover { border-color: #94a3b8; }
.music-image-choice-option.selected { border-color: var(--clr-primary, #2563eb); background: #eff6ff; }
.music-image-choice-option.correct-answer { border-color: #16a34a; background: #f0fdf4; }
.music-image-choice-option.wrong-selected { border-color: #dc2626; background: #fef2f2; }
.music-image-choice-num {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: #f1f5f9;
  color: #64748b; font-size: .75rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.music-image-choice-option.selected .music-image-choice-num { background: var(--clr-primary, #2563eb); color: #fff; }
.music-image-choice-option.correct-answer .music-image-choice-num { background: #16a34a; color: #fff; }
.music-image-choice-option.wrong-selected .music-image-choice-num { background: #dc2626; color: #fff; }
.music-image-choice-option .notation-svg-wrap { flex: 1; min-width: 0; }

/* =============================================================
   org-tree — 142.44.163.80:3031/manage/organization의 조직도 트리와
   동일한 스타일을 그대로 가져옴(/admin/organ 전용)
   ============================================================= */
.badge { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #15803d; }

.org-tree { padding: 6px 0; }
.org-tree-node { position: relative; }
.org-tree-row {
  display: flex; align-items: center; gap: 0;
  padding: 0; cursor: pointer; user-select: none;
  transition: background .1s;
}
.org-tree-row:hover { background: #f8faff; }
.org-tree-row.active { background: var(--nav-active-bg); }
.org-tree-row.active .org-tree-label { color: var(--clr-primary); font-weight: 600; }

.org-tree-connectors { display: flex; flex-shrink: 0; }

.org-tree-toggle-btn {
  width: 18px; height: 18px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px; color: #94a3b8;
  transition: background .1s, color .1s;
  margin: 0 3px;
}
.org-tree-toggle-btn:hover { background: #e0e7ff; color: #2563eb; }
.org-tree-toggle-btn svg { transition: transform .15s; }
.org-tree-toggle-btn.open svg { transform: rotate(90deg); }
/* 토글 화살표가 없는(자식이 없는) 행도 있는 행과 동일한 깊이에서 아이콘/텍스트가
   왼쪽 정렬되어야 하므로, .org-tree-toggle-btn과 정확히 같은 박스 크기(18px+margin
   3px)를 유지해야 함 — 폭을 0으로 줄이면 같은 레벨 형제 노드끼리 정렬이 어긋남. */
.org-tree-toggle-spacer { width: 18px; height: 18px; flex-shrink: 0; margin: 0 3px; }

.org-tree-icon {
  width: 18px; height: 18px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #64748b; margin-right: 5px;
}
.org-tree-row.active .org-tree-icon { color: var(--clr-primary); }

/* 목록 컨텍스트 메뉴(.ctx-menu) - cloud.freeitm.com style.css 의 규칙을 옮김 */
.ctx-menu {
  position: fixed; display: none; background: #fff; border: 1px solid #e2e5ea; border-radius: 9px;
  box-shadow: 0 8px 28px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.06);
  padding: 4px 0; min-width: 172px; z-index: 1200; transform-origin: top left; animation: ctxIn .1s ease;
}
.ctx-menu.visible { display: block; }
@keyframes ctxIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
.ctx-menu-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: 13px; color: #333;
  cursor: pointer; user-select: none; transition: background .1s; white-space: nowrap;
}
.ctx-menu-item:hover { background: #f5f7fa; }
.ctx-menu-item svg { flex-shrink: 0; color: #888; }
.ctx-menu-item.danger { color: #dc2626; }
.ctx-menu-item.danger svg { color: #dc2626; }
.ctx-menu-item.danger:hover { background: #fee2e2; }
.ctx-menu-item.disabled { opacity: .35; cursor: default; pointer-events: none; }
.ctx-menu-divider { height: 1px; background: #f0f0f0; margin: 4px 0; }

.org-tree-label {
  flex: 1; min-width: 0;
  font-size: .8125rem; color: #1e293b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 7px 4px 7px 0;
}
.org-tree-badge { flex-shrink: 0; margin-right: 10px; }
.org-tree-children { display: none; }
.org-tree-children.open { display: block; }

/* =============================================================
   mail — 검색/정렬/필터탭 + 메일 아이템(체크박스+아바타+발신/제목+시간/깃발/첨부) +
   editor-panel 액션 아이콘 + 빠른 회신 (참조: freeitm_webmail의 동일 기능, 클래스명은
   그 앱과 통일해서 신규 도입 - smplus-web에는 이 구조가 아직 없었음)
   ============================================================= */
.list-search-row { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--clr-border); flex-shrink: 0; }
.list-search-wrap { flex: 1; position: relative; display: flex; align-items: center; color: #9ca3af; }
.list-search-wrap svg { position: absolute; left: 8px; pointer-events: none; }
.list-search-input {
  width: 100%; padding: 6px 10px 6px 28px; border: 1px solid var(--clr-border); border-radius: 6px;
  font-size: .75rem; color: #1e293b; background: #fff; outline: none; transition: border-color .12s;
}
.list-search-input:focus { border-color: var(--clr-primary-hover); }
.list-sort-wrap { position: relative; flex-shrink: 0; }
.list-sort-btn {
  display: flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border: 1px solid var(--clr-border); border-radius: 6px; background: #fff; color: #6b7280; cursor: pointer;
}
.list-sort-btn:hover { background: var(--nav-hover-bg); color: #1e293b; }
.list-sort-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 30;
  width: 160px; background: #fff; border: 1px solid var(--clr-border); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12); padding: 4px 0;
}
.list-sort-menu.open { display: block; }
.list-sort-item { padding: 7px 12px; font-size: .8125rem; color: #374151; cursor: pointer; }
.list-sort-item:hover { background: var(--nav-hover-bg); }
.list-sort-item.active { color: var(--clr-primary); font-weight: 600; }

.mail-sel-all-label { display: flex; align-items: center; padding: 0 6px 0 8px; cursor: pointer; flex-shrink: 0; }
.mail-sel-all-label input { margin: 0; cursor: pointer; }

.mail-item {
  display: flex; gap: 10px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--clr-border-light);
  transition: background .1s; position: relative;
}
.mail-item:hover { background: var(--nav-hover-bg); }
.mail-item.selected { background: var(--nav-active-bg); border-left: 3px solid var(--clr-primary); padding-left: 11px; }
.mail-item.mail-item-checked { background: #eff6ff; }
/* 메일을 폴더로 드래그할 때 - mail.js의 wireFolderDropTargets()가 사이드바 폴더 링크(a[data-path])에
   이 클래스를 토글하는데, 여기 셀렉터가 .mail-item으로 한정되어 있어(폴더 링크는 그 클래스가 없음)
   실제로는 아무 표시도 안 되던 버그(2026-08-30) - 폴더 링크에도 걸리도록 셀렉터를 넓혀 수정. */
.mail-item-drop-target { background: #dbeafe; outline: 2px dashed var(--clr-primary); outline-offset: -2px; }
.mail-item-cb-wrap { display: flex; align-items: flex-start; padding-top: 2px; flex-shrink: 0; }
.mail-item-cb { margin: 0; cursor: pointer; }
.mail-item-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; color: #fff; font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.mail-item-content { flex: 1; min-width: 0; }
.mail-item-row1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mail-item-sender { font-size: .8125rem; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item.unread .mail-item-sender { font-weight: 700; color: #1e293b; }
.mail-item-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.mail-item-time { font-size: .6875rem; color: #9ca3af; white-space: nowrap; }
.mail-flag-btn { background: none; border: none; padding: 1px; cursor: pointer; color: #d1d5db; display: flex; }
.mail-flag-btn:hover { color: #f59e0b; }
.mail-flag-btn.active { color: #f59e0b; }
.mail-item-row2 { display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.mail-item-subject { flex: 1; min-width: 0; font-size: .75rem; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item.unread .mail-item-subject { color: #374151; }
.mail-attach-icon { flex-shrink: 0; color: #9ca3af; }

/* editor-panel-header 안에 자연스럽게 들어가는 액션 아이콘 - 그 헤더 자체가 이미
   flex+테두리를 갖고 있으므로(별도 박스로 안 만들고) 왼쪽 정렬로 아이콘만 나열 */
.action-icon-header { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.basic-svg-btn {
  display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border: none; border-radius: 6px; background: none; color: #6b7280; cursor: pointer;
}
.basic-svg-btn:hover { background: var(--nav-hover-bg); color: #1e293b; }
.basic-svg-btn.active { color: var(--clr-primary, #2563eb); background: var(--nav-active-bg); }
.action-icon-sep { border-left: 1px solid var(--clr-border); height: 16px; margin: 0 4px; flex-shrink: 0; }

/* 제목/발신/수신/첨부 요약 - editor-panel-body(스크롤 영역) 밖의 형제 요소로 렌더한다
   (mail.ejs #editorMsgHdr, mail-view.ejs #mvHdr 참고). editor-panel-header/footer와
   동일하게 flex-shrink:0으로 둬야 본문이 길어져도 눌려서 찌그러지지 않는다. */
.mail-msg-hdr { padding: 16px 20px; border-bottom: 1px solid var(--clr-border); flex-shrink: 0; }
.mail-msg-subject { font-size: 1.05rem; font-weight: 700; color: #1e293b; margin-bottom: 10px; }
.mail-meta-row { display: flex; gap: 8px; font-size: .75rem; color: #6b7280; padding: 2px 0; }
.mail-meta-label { width: 36px; flex-shrink: 0; color: #9ca3af; }
.mail-meta-val { color: #374151; word-break: break-all; }
.mail-addr-chip { cursor: pointer; border-bottom: 1px dashed #9ca3af; }
.mail-addr-chip:hover { color: var(--clr-primary); border-bottom-color: var(--clr-primary); }
.mail-msg-att { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.mail-att-item { font-size: .6875rem; background: var(--nav-hover-bg); border: 1px solid var(--clr-border); border-radius: 12px; padding: 3px 10px; cursor: pointer; color: #374151; }
.mail-body-plain { padding: 16px 20px; white-space: pre-wrap; word-break: break-word; font-size: .8125rem; }
.mail-body-iframe { width: 100%; border: none; }

.mail-quick-reply { padding: 10px 16px; border-top: 1px solid var(--clr-border); flex-shrink: 0; background: #fff; display: flex; gap: 8px; align-items: flex-end; }
.mail-quick-reply-input {
  flex: 1; resize: none; border: 1px solid var(--clr-border); border-radius: 8px; padding: 8px 10px;
  font-size: .8125rem; font-family: inherit; outline: none; max-height: 120px;
}
.mail-quick-reply-input:focus { border-color: var(--clr-primary-hover); }
.mail-quick-reply-wrap { display: flex; flex-direction: column; flex: 1; gap: 6px; }
.mail-quick-reply-row { display: flex; gap: 8px; align-items: flex-end; }

/* 첨부파일 칩 목록 - mail-compose.ejs의 .cmp-attach-list/.cmp-attach-chip과 동일(그 파일은
   자체 <style>에 인라인으로 갖고 있어 공유되지 않았으므로 여기 한 번 더 정의) - 빠른 회신
   첨부와 mail-compose 새 창 첨부가 시각적으로 항상 같은 모양이 되도록 함 */
.cmp-attach-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cmp-attach-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 10px;
  background: #f1f5f9; border-radius: 6px; font-size: .75rem; color: #334155;
}
.cmp-attach-chip button { border: none; background: none; cursor: pointer; color: #94a3b8; display: flex; padding: 0; }
.cmp-attach-chip button:hover { color: #ef4444; }

/* editor-panel-header의 "인쇄" 아이콘 - 메일 본문(editor-panel-body/mail-view 페이지의
   본문 영역)만 남기고 나머지(사이드바/목록/헤더 아이콘 등)는 인쇄 결과에서 숨긴다. */
@media print {
  body * { visibility: hidden; }
  .editor-panel-body, .editor-panel-body * { visibility: visible; }
  .editor-panel-body { position: absolute; left: 0; top: 0; width: 100%; padding: 0; }
}

/* =============================================================
   메일 타임라인 - portal.smartertools.co.kr/mail 실제 디자인을 그대로 포팅(참고: 이미
   그 디자인을 이식 완료한 자매앱 freeitm_webmail의 .tl-*/.pp2-* 실제 CSS/마크업,
   mail-body.ejs 221번째 줄 주석 "참조: portal.smartertools.co.kr mail.ejs"로 확인됨).
   헤더 부분(.pp2-head 상당)만 다른 페이지들과의 명명 통일을 위해 .preview-header(-row)로
   개명함 - 그 아래 아바타/이름/이메일 등 나머지는 여전히 mail-tl-* 접두 그대로 사용. ============================================================= */
.preview-header { padding: 10px; border-bottom: 1px solid var(--clr-border); } /* 내용이 가장자리에 붙지 않도록 사방 10px 여백 */
.preview-header-row { display: flex; align-items: center; gap: 10px; }
.mail-tl-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.mail-tl-name { font-size: 13px; font-weight: 700; color: #111827; word-break: break-all; line-height: 1.4; }
.mail-tl-email { font-size: 11px; color: #9ca3af; word-break: break-all; margin-top: 2px; }
.mail-tl-summary { font-size: 11.5px; color: #6b7280; margin-top: 10px; }

.mail-tl-body { padding: 8px 0; }
.mail-tl-month-group { margin: 0 16px 6px; }
.mail-tl-month-label {
  font-size: 11px; font-weight: 600; color: #bbb; letter-spacing: .04em;
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.mail-tl-month-label::after { content: ''; flex: 1; height: 1px; background: #eee; }

.mail-tl-items { position: relative; padding-left: 22px; padding-bottom: 6px; }
.mail-tl-items::before {
  content: ''; position: absolute; left: 6px; top: 8px; bottom: 0; width: 2px;
  background: #e8ecf0; border-radius: 1px;
}
.mail-tl-item {
  position: relative; padding: 9px 10px; border-radius: 8px; cursor: pointer;
  transition: background .12s; margin-bottom: 2px;
}
.mail-tl-item:last-child { margin-bottom: 0; }
.mail-tl-item:hover { background: #f5f7fa; }
.mail-tl-item--active { background: #e8f0fe !important; }
.mail-tl-item::before {
  content: ''; position: absolute; left: -19px; top: 13px; width: 9px; height: 9px;
  border-radius: 50%; border: 2px solid #fff;
}
.mail-tl-item.mail-tl-received::before { background: #1a73e8; box-shadow: 0 0 0 1.5px #1a73e8; }
.mail-tl-item.mail-tl-sent::before { background: #10b981; box-shadow: 0 0 0 1.5px #10b981; }
.mail-tl-item-top { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.mail-tl-dir-badge { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px; flex-shrink: 0; }
.mail-tl-received .mail-tl-dir-badge { background: #e8f0fe; color: #1a73e8; }
.mail-tl-sent .mail-tl-dir-badge { background: #d1fae5; color: #059669; }
.mail-tl-item-date { font-size: 11px; color: #bbb; margin-left: auto; flex-shrink: 0; }
.mail-tl-item-subject { font-size: 12px; font-weight: 600; color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 대시보드 (/dashboard) ────────────────────────────────────────────
   기존 변수(--clr-*)와 컴포넌트(.card-item, .list-item, .list-panel,
   .badge, .empty)를 재사용하고, 배치용 클래스만 dash- 접두어로 추가한다. */
.dash-body { display: flex; flex-direction: column; gap: 28px; }
.dash-section { display: flex; flex-direction: column; gap: 10px; }
.dash-section-head { display: flex; align-items: baseline; justify-content: space-between; }
.dash-section-title { font-size: .9375rem; font-weight: 700; color: var(--clr-text); margin: 0; }
.dash-more { font-size: .8125rem; color: var(--clr-text-sub); text-decoration: none; }
.dash-more:hover { text-decoration: underline; }

/* 수치 요약 */
.dash-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.dash-stat {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px;
  background: #fff; border: 1px solid var(--clr-border, #e2e8f0); border-radius: 10px;
}
.dash-stat-num { font-size: 1.5rem; font-weight: 700; color: var(--clr-text); line-height: 1.2; }
.dash-stat-label { font-size: .8125rem; color: var(--clr-text-sub); }

/* 빠른 만들기 카드 */
.dash-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.dash-card {
  gap: 6px; padding: 18px 20px; background: #fff;
  border: 1px solid var(--clr-border, #e2e8f0); border-radius: 10px;
}
.dash-card-ico {
  width: 36px; height: 36px; border-radius: 8px; margin-bottom: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .9375rem;
}

/* 3단 배치 - 받은 편지함 · 일정 · 최근 활동을 한 줄에. 좁아지면 2단 → 1단 */
/* minmax(0,1fr) 이라야 칸이 내용 폭에 밀리지 않는다 — 그냥 1fr 이면 제목이 긴 목록이
   자기 칸을 넓혀 옆 칸을 찌그러뜨린다(실측: 649/213/705). */
.dash-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; align-items: stretch; }
@media (max-width: 1400px) { .dash-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .dash-columns { grid-template-columns: minmax(0, 1fr); } }

/* 대시보드 목록 패널은 카드다 — 원래 .list-panel 은 목록+편집기 2단 레이아웃용이라
   width:280px; flex-shrink:0 으로 고정돼 있어 칸을 채우지 못했다. 여기서만 폭을 푼다. */
.dash-section .list-panel {
  width: 100%; flex-shrink: 1; min-width: 0;
  border: 1px solid var(--clr-border, #e2e8f0); border-radius: 10px;
}
.dash-section .list-panel-body { width: 100%; }

/* 목록 행 */
.dash-row { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.dash-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dash-row-main .list-item-title,
.dash-row-main .list-item-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-row-main .list-item-title.is-strong { font-weight: 700; }
.dash-when { font-size: .75rem; color: var(--clr-text-sub); white-space: nowrap; }
.dash-time { font-size: .75rem; color: var(--clr-text-sub); white-space: nowrap; min-width: 74px; }
.dash-dot { width: 7px; height: 7px; border-radius: 50%; background: transparent; flex: 0 0 auto; }
.dash-dot.is-unread { background: var(--clr-primary, #2563eb); }
.dash-group {
  font-size: .75rem; font-weight: 700; color: var(--clr-text-sub);
  padding: 10px 12px 4px; letter-spacing: .02em;
}
.dash-tag {
  font-size: 11px; font-weight: 700; color: #fff; border-radius: 5px;
  padding: 2px 8px; white-space: nowrap; flex: 0 0 auto;
}


/* ── 주/일 보기 시간대 그리드 (calendar.js renderTimeGrid) - 업무 시간(/mysetting/calendar)은 흰색, 그 외 시간은 회색 ── */
.cal-week .cal-week-head, .cal-day .cal-week-head { position: sticky; top: 0; background: #fff; z-index: 2; }
.cal-time-body { display: flex; flex-direction: column; }
.cal-hour-row .cal-time-gutter { transform: none; padding-top: 3px; }
.cal-hour-row.cal-off-hours { background: #f3f4f6; }
.cal-hour-row.cal-off-hours .cal-time-gutter { color: #a1a1aa; }
.cal-hour-row.cal-off-hours .cal-week-cell, .cal-hour-row.cal-off-hours .cal-day-cell-full { border-left-color: #e5e7eb; }
.cal-hour-row .cal-week-cell, .cal-hour-row .cal-day-cell-full { cursor: pointer; }
.cal-hour-row .cal-week-cell:hover, .cal-hour-row .cal-day-cell-full:hover { background: rgba(37, 99, 235, .05); }
.cal-hour-row .cal-evt-pill { margin-bottom: 2px; padding: 3px 6px; font-size: .6875rem; }
.cal-allday-row { min-height: 36px; border-bottom: 1px solid var(--clr-border); background: #fff; }
.cal-allday-row .cal-time-gutter { padding-top: 8px; font-weight: 600; color: #64748b; }


/* ── 캘린더: 여러 날에 걸친 일정의 이어진 막대(레인 배치) + 미리보기 패널 (calendar.js) ── */
.cal-evt-bar, .cal-evt-pill { cursor: pointer; }
.cal-evt-slot { visibility: hidden; }
.cal-month .cal-day-cell { overflow: visible; }
.cal-evt-bar.cal-span { border-radius: 0; margin-left: -7px; margin-right: -7px; position: relative; z-index: 1; }
.cal-evt-bar.cal-span.cal-span-start { border-top-left-radius: 4px; border-bottom-left-radius: 4px; margin-left: 0; }
.cal-evt-bar.cal-span.cal-span-end { border-top-right-radius: 4px; border-bottom-right-radius: 4px; margin-right: 0; }
.cal-allday-row .cal-week-cell, .cal-allday-row .cal-day-cell-full { overflow: visible; }
.cal-evt-pill.cal-span { border-radius: 0; margin-left: -5px; margin-right: -5px; position: relative; z-index: 1; }
.cal-evt-pill.cal-span.cal-span-start { border-top-left-radius: 6px; border-bottom-left-radius: 6px; margin-left: 0; }
.cal-evt-pill.cal-span.cal-span-end { border-top-right-radius: 6px; border-bottom-right-radius: 6px; margin-right: 0; }
.cal-preview-desc { padding: 4px 16px; font-size: 12.5px; line-height: 1.6; word-break: break-word; }
.cal-preview-desc img { max-width: 100%; }
.cal-preview-actions { display: flex; gap: 8px; padding: 10px 16px; }

/* 메일 목록: 보관 메일함으로 복사된(보관됨) 메일 표시 아이콘 (mail.js) */
.mail-archived-icon { flex-shrink: 0; color: #0d9488; margin-left: 4px; }

/* 주소록 보기 전환(목록/격자) 아이콘 - 현재 보기 강조 (contact.js) */
.contact-view-btn.active { color: var(--clr-primary); background: var(--nav-active-bg); }
#contactGridBody .example-grid { width: 100%; align-content: start; }
#contactGridBody .card-item { cursor: pointer; }

/* 주소록 상세(editor-panel-body / preview-panel) - preview-panel-row 라벨 폭을 연락처 항목명에 맞게 */
.contact-detail .preview-panel-row .k { width: 84px; }
/* 주소록 상세 머리글(.preview-header: 아바타·이름·회사·직책)은 preview-panel-header(#contactPreviewTitle) /
   editor-panel-header(#editorTitle) 안에 들어간다 - 헤더 높이는 내용에 맞게, 제목의 굵은 글씨는 상속하지 않음 */
.preview-header .mail-item-avatar { width: 40px; height: 40px; font-size: .85rem; margin-top: 0; }
.preview-header .mail-msg-subject { font-size: .95rem; margin-bottom: 2px; }
.preview-header .mail-meta-row { padding: 0; }
.editor-panel-title { flex: 1; min-width: 0; }
.editor-panel-header:has(.preview-header) { height: auto; min-height: 48px; padding: 10px 20px; }
.editor-panel-header .preview-header { padding: 0; border-bottom: none; font-weight: 400; }

/* 주소록 간단 메모 - editor-panel-footer 는 전역 감춤이지만 주소록 상세 하단의 메모 입력줄만 예외로 표시 */
.editor-panel-footer.contact-memo-footer:not([hidden]) { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #fff; }
.contact-memo-footer .list-search-input { flex: 1; min-width: 0; }
.contact-memo-row { align-items: flex-start; }
.contact-memo-date { color: #9ca3af; width: 108px; flex-shrink: 0; font-size: 11.5px; padding-top: 1px; }
.contact-memo-body { flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; }
.contact-memo-empty { color: #9ca3af; padding: 4px 16px; font-size: 12.5px; }
.cn-del-btn { flex-shrink: 0; width: 26px; height: 26px; border: none; background: none; color: #9ca3af; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 5px; }
.cn-del-btn:hover { background: #fef2f2; color: #dc2626; }
.contact-memo-row .cn-del-btn { margin-left: auto; width: 22px; height: 22px; margin-top: -3px; }
/* 메일 타임라인 머리글(.preview-header)이 preview-panel-header(#mailTimelineTitle) 안에 들어갈 때 -
   자체 패딩/구분선은 헤더가 대신하고, 제목의 굵은 글씨는 상속하지 않으며 닫기 버튼은 오른쪽 위에 둔다 */
.preview-panel-title { min-width: 0; }
.preview-panel-header .preview-header { padding: 0; border-bottom: none; font-weight: 400; }
.preview-panel-header:has(.preview-header) { align-items: flex-start; }
.preview-panel-header .mail-tl-summary { margin-top: 8px; }


/* ── 활동 내역(/activity) ────────────────────────────────────────────
   그래프는 라이브러리 없이 인라인 SVG 로 그린다. 카드/여백은 대시보드(dash-)와 같은 결. */
.top_bar-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px; color: inherit; text-decoration: none;
  opacity: .85; transition: background .12s, opacity .12s;
}
.top_bar-icon-btn:hover { background: rgba(255,255,255,.12); opacity: 1; }
.act-select {
  height: 30px; padding: 0 10px; border: 1px solid var(--clr-border, #e2e8f0);
  border-radius: 6px; background: #fff; font-size: .8125rem; color: var(--clr-text, #1e293b);
}
.act-chart-card {
  background: #fff; border: 1px solid var(--clr-border, #e2e8f0); border-radius: 10px; padding: 16px 18px;
}
.act-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.act-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--clr-text-sub, #64748b); }
.act-legend-item i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.act-legend-item b { color: var(--clr-text, #1e293b); font-weight: 700; }
.act-legend-total { margin-left: auto; }
.act-chart { width: 100%; min-height: 172px; }
.act-svg { width: 100%; height: 172px; display: block; }


/* ── 새 문서 만들기 모달 ─────────────────────────────────────────────
   확장자는 고칠 수 없다는 걸 입력칸 옆에 붙여 보여 준다(입력값에는 안 들어간다). */
.nd-name-row { display: flex; align-items: center; gap: 8px; }
.nd-name-row .modal-input { flex: 1; min-width: 0; }
.nd-ext {
  flex: 0 0 auto; font-size: .8125rem; font-weight: 600; color: var(--clr-text-sub, #64748b);
  background: #f1f5f9; border: 1px solid var(--clr-border, #e2e8f0);
  border-radius: 6px; padding: 7px 10px;
}

/* 대시보드 목록 3종은 화면 높이를 채우고 안에서만 스크롤한다 */
.dash-columns { min-height: 0; }
.dash-section .list-panel { height: 100%; }
.dash-section .list-panel-body { max-height: none; }


/* ── 대시보드 목록 3종을 화면 높이에 맞춘다 ─────────────────────────────
   dash-body 는 원래 내용만큼 늘어나는 세로 스택이라 목록이 짧으면 아래가 비고 길면
   페이지가 늘어났다. 본문을 화면 높이에 묶고, 마지막 줄(목록 3종)만 남은 높이를
   가져가게 한 뒤 패널 안에서 스크롤한다. */
.dash-body { height: 100%; min-height: 0; box-sizing: border-box; }
.dash-body > .dash-columns { flex: 1; min-height: 0; }
.dash-columns > .dash-section { min-height: 0; }
.dash-section .list-panel { height: 100%; min-height: 0; }


/* ── 작업 상세(editor-panel-body) ────────────────────────────────────
   예전엔 `<p><strong>상태:</strong> 완료</p>` 를 그냥 쌓아 놔서 읽기 힘들었고,
   설명 HTML 은 이스케이프돼 태그가 글자로 보였다. 요약 배지 + 항목 그리드로 바꾼다. */
.tk-detail { display: flex; flex-direction: column; gap: 18px; padding: 4px 2px 8px; }
.tk-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tk-badge {
  font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px;
  background: #eef2f7; color: #475569;
}
.tk-badge.is-done { background: #dcfce7; color: #15803d; }
.tk-badge.is-progress { background: #dbeafe; color: #1d4ed8; }
.tk-badge.is-hold { background: #fef3c7; color: #b45309; }
.tk-badge.is-urgent { background: #fee2e2; color: #b91c1c; }
.tk-grid { display: grid; grid-template-columns: 88px 1fr; gap: 8px 14px; align-items: baseline; }
.tk-grid dt { font-size: 12px; color: #94a3b8; }
.tk-grid dd { margin: 0; font-size: 13px; color: #1e293b; word-break: break-word; }
.tk-progress { display: flex; align-items: center; gap: 10px; }
.tk-progress-bar { flex: 1; min-width: 0; height: 6px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.tk-progress-bar > span { display: block; height: 100%; background: var(--clr-primary, #2563eb); }
.tk-progress-num { font-size: 12px; color: #64748b; min-width: 34px; text-align: right; }
.tk-sec-title { font-size: 12px; font-weight: 700; color: #64748b; margin-bottom: 8px; }
.tk-desc { font-size: 13px; color: #1e293b; line-height: 1.65; word-break: break-word; }
.tk-desc img { max-width: 100%; }
.tk-desc:empty::after { content: attr(data-empty); color: #9ca3af; }

/* 체크리스트 */
.tk-check-list { display: flex; flex-direction: column; gap: 2px; }
.tk-check-row { display: flex; align-items: flex-start; gap: 9px; padding: 5px 4px; border-radius: 6px; }
.tk-check-row:hover { background: #f8fafc; }
.tk-check-row input[type="checkbox"] { margin-top: 2px; flex: 0 0 auto; }
.tk-check-body { flex: 1; min-width: 0; font-size: 13px; color: #1e293b; white-space: pre-wrap; word-break: break-word; }
.tk-check-row.is-done .tk-check-body { color: #9ca3af; text-decoration: line-through; }
.tk-check-empty { color: #9ca3af; font-size: 12.5px; padding: 4px 4px; }

/* 본문 글 안의 체크박스 줄 (task.js) - 네모는 글자(☐/☑)라 평문으로 바뀌어도 뜻이 남는다. */
/* inline-block 이어야 완료 줄의 취소선이 네모까지 긋고 지나가지 않는다
   (text-decoration 은 자손이 끄지 못하고, 다른 서식 맥락이라야 끊긴다). */
.tk-cb { display: inline-block; width: 1.15em; text-align: center; cursor: pointer; user-select: none;
  font-size: 15px; line-height: 1.3; color: #94a3b8; vertical-align: baseline; }
.tk-cb:hover { color: #64748b; }
.tk-cb[data-done="1"] { color: #15803d; }
.tk-cb-line.is-done { color: #9ca3af; text-decoration: line-through; }
.tk-cb-line.is-done .tk-cb { text-decoration: none; }
.tk-check-row .cn-del-btn { flex: 0 0 auto; width: 22px; height: 22px; }

/* 저장소 업로드 진행 현황 모달 - 파일명 + 전체 바이트 기준 게이지 + N/M · % */
.up-prog-file { font-size: .8125rem; color: #374151; margin: 6px 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1.2em; }
.up-prog-track { height: 8px; border-radius: 9999px; background: #eef0f4; overflow: hidden; }
.up-prog-bar { height: 100%; width: 0; border-radius: 9999px; background: var(--clr-primary); transition: width .15s; }
.up-prog-info { display: flex; justify-content: space-between; font-size: .75rem; color: #6b7280; margin-top: 8px; }

/* 저장소 파일 카드 썸네일 - 이미지/SVG 는 아이콘(32px) 자리에 실제 내용 표시 */
.file-item-icon .file-thumb-img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--clr-border); background: #fff; display: block; }

/* 목록 칸의 «없음» 안내 - 글씨와 여백을 본문에 맞춘다 */
.list-panel-body .data-empty { font-size: 13px; padding: 10px; }

/* 미리보기 칸 하단 버튼 - 메일 작성창 상단 버튼(.cmp-btn)과 같은 모양으로 맞춘다.
   그 스타일은 mail-compose.ejs 안에만 있어서, 여기서 같은 값으로 다시 적는다.
   화면마다 버튼 클래스가 제각각(primary/second/cancel/danger)이라 마크업은 건드리지 않고
   이 자리에서만 모양을 덮어쓴다 - 저장소·일정·주소록·메일·커뮤니티가 한꺼번에 같아진다. */
.preview-panel-footer .basic-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 500; line-height: 1.45;
  border: 1px solid transparent; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.preview-panel-footer .basic-btn svg { flex: none }
.preview-panel-footer .basic-btn.primary {
  background: var(--clr-primary); color: #fff; border-color: var(--clr-primary);
}
.preview-panel-footer .basic-btn.primary:hover:not(:disabled) { background: #036b3a; border-color: #036b3a; }
.preview-panel-footer .basic-btn.primary:disabled { opacity: .5; cursor: not-allowed; }
.preview-panel-footer .basic-btn.second,
.preview-panel-footer .basic-btn.cancel,
.preview-panel-footer .basic-btn:not(.primary):not(.danger) {
  background: #fff; color: var(--clr-text); border-color: var(--clr-border);
}
.preview-panel-footer .basic-btn.second:hover,
.preview-panel-footer .basic-btn.cancel:hover,
.preview-panel-footer .basic-btn:not(.primary):not(.danger):hover {
  background: #f8fafc; border-color: #cbd5e1;
}
/* 삭제처럼 되돌리기 어려운 것은 테두리만 붉게 - 작성창의 «도구» 결을 지키면서 위험을 알린다 */
.preview-panel-footer .basic-btn.danger {
  background: #fff; color: var(--btn-danger-bg); border-color: #fecaca;
}
.preview-panel-footer .basic-btn.danger:hover { background: #fef2f2; border-color: var(--btn-danger-bg); }

/* 연락처 목록 여러 개 고르기 - 메일 목록과 같은 결(체크박스는 평소 숨고, 올리거나 골랐을 때 보인다) */
.list-item-cb-wrap { flex: none; display: flex; align-items: center; padding-right: 8px; }
.list-item-cb-wrap input { width: 14px; height: 14px; cursor: pointer; }
#contactList .list-item { display: flex; align-items: flex-start; }
#contactList .list-item-text { min-width: 0; flex: 1; }
#contactList .list-item .list-item-cb-wrap { opacity: 0; transition: opacity .12s; padding-top: 2px; }
#contactList .list-item:hover .list-item-cb-wrap,
#contactList .list-item.list-item-checked .list-item-cb-wrap { opacity: 1; }
#contactList .list-item.list-item-checked { background: rgba(37,99,235,.07); }
/* 주소록(폴더) 위로 끌어왔을 때 */
.list-item-drop-target {
  background: rgba(37,99,235,.12) !important;
  outline: 2px dashed var(--clr-primary); outline-offset: -2px; border-radius: 6px;
}

/* 일정 목록 여러 개 고르기 - 연락처/메일과 같은 결 */
.cal-list-item { display: flex; align-items: flex-start; }
.cal-list-cb-wrap { flex: none; display: flex; align-items: center; padding: 2px 8px 0 0; opacity: 0; transition: opacity .12s; }
.cal-list-cb-wrap input { width: 14px; height: 14px; cursor: pointer; }
.cal-list-item:hover .cal-list-cb-wrap,
.cal-list-item.list-item-checked .cal-list-cb-wrap { opacity: 1; }
.cal-list-item.list-item-checked { background: rgba(37,99,235,.07); }
.cal-list-text { min-width: 0; flex: 1; }
.cal-repeat-dot { color: #94a3b8; font-size: 11px; }

/* 메모·작업 목록 여러 개 고르기(연락처와 같은 결) */
#noteList .list-item, #taskList .list-item { display: flex; align-items: flex-start; flex-wrap: wrap; }
#noteList .list-item-text { min-width: 0; flex: 1; }
#noteList .list-item .list-item-cb-wrap, #taskList .list-item .list-item-cb-wrap {
  opacity: 0; transition: opacity .12s; padding-top: 2px;
}
#noteList .list-item:hover .list-item-cb-wrap, #taskList .list-item:hover .list-item-cb-wrap,
#noteList .list-item.list-item-checked .list-item-cb-wrap, #taskList .list-item.list-item-checked .list-item-cb-wrap { opacity: 1; }
#noteList .list-item.list-item-checked, #taskList .list-item.list-item-checked { background: rgba(37,99,235,.07); }

/* 작은 서식 편집기(메모·공지) */
.rte-toolbar {
  display: flex; align-items: center; gap: 1px; flex-wrap: wrap;
  padding: 4px 6px; border: 1px solid var(--clr-border); border-bottom: none;
  border-radius: 6px 6px 0 0; background: #fafbfc;
}
.rte-btn {
  border: none; background: none; cursor: pointer; color: #64748b;
  width: 26px; height: 26px; border-radius: 5px; display: flex; align-items: center; justify-content: center;
}
.rte-btn:hover { background: #eef2f7; color: #1e293b }
.rte-btn.on { background: var(--clr-primary); color: #fff }
.rte-sep { width: 1px; height: 15px; background: var(--clr-border); margin: 0 4px }
.rte-toolbar + [contenteditable] { border-radius: 0 0 6px 6px !important; }

/* 메모 목록 — 메모마다 고른 색을 왼쪽 막대로(note.js 가 .has-color 와 --note-color 를 붙인다).
   올려도·열어도·골라도 그 색을 유지한다(.list-item.active 의 기본 막대 색보다 우선). */
#noteList .list-item.has-color,
#noteList .list-item.has-color:hover,
#noteList .list-item.has-color.active,
#noteList .list-item.has-color.list-item-checked { border-left: 3px solid var(--note-color); padding-left: 13px; }

/* 일정 목록 보기 — 날짜 밑에 표(시간·제목·참석자·장소·내용). 행이 .cal-list-item 이라 고르기·우클릭·미리보기가 그대로 붙는다 */
.cal-list-tablewrap { padding: 0 22px 8px; overflow-x: auto; }
.cal-list-table { width: 100%; min-width: 640px; border-collapse: collapse; table-layout: fixed; font-size: .8125rem; }
.cal-list-table th { text-align: left; font-size: .6875rem; font-weight: 600; color: #94a3b8; padding: 4px 8px; border-bottom: 1px solid var(--clr-border); white-space: nowrap; }
.cal-list-table td { padding: 8px; border-bottom: 1px solid #f1f5f9; vertical-align: top; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-list-table tr.cal-list-item { display: table-row; padding: 0; }
.cal-list-table .c-cb { width: 28px; padding-left: 4px; padding-right: 0; }
.cal-list-table .c-time { width: 112px; }
.cal-list-table .c-title { width: 26%; }
.cal-list-table .c-att { width: 16%; }
.cal-list-table .c-loc { width: 14%; }
.cal-list-table td.c-title { font-weight: 600; color: #1e293b; }
.cal-list-table td.c-desc { color: #64748b; }
.cal-list-table .cal-list-cb-wrap { padding: 1px 0 0; }
.cal-list-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.cal-att-declined { color: #cbd5e1; text-decoration: line-through; }
.cal-list-none { color: #cbd5e1; }

/* 윗줄 «새 메모»·«알림» 단추 (topbar-extras.js) */
button.top_bar-icon-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.top_bar-icon-btn { position: relative; margin-right: 2px; }
.top_bar-alarm-wrap { position: relative; flex-shrink: 0; margin-right: 2px; }
.top_bar-alarm-badge { position: absolute; top: 1px; right: 0; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; background: #ef4444; color: #fff; font-size: 9px; font-weight: 700; line-height: 14px; text-align: center; }
.top_bar-alarm-badge[hidden] { display: none; }
.top_bar-pop { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 220; width: 280px; background: #fff; border: 1px solid var(--clr-border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12); padding: 4px 0; color: #1e293b; }
.top_bar-pop.open { display: block; }
.top_bar-pop-head { padding: 8px 14px 6px; font-size: .75rem; font-weight: 700; color: #64748b; }
.top_bar-pop-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; text-decoration: none; color: inherit; }
.top_bar-pop-item:hover { background: var(--nav-hover-bg); }
.top_bar-pop-item.past .top_bar-pop-title { color: #94a3b8; }
.top_bar-pop-title { font-size: .8125rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top_bar-pop-sub { font-size: .75rem; color: #94a3b8; }
.top_bar-pop-empty { padding: 14px; font-size: .8125rem; color: #94a3b8; text-align: center; }
.top_bar-pop-foot { display: block; border-top: 1px solid #f1f5f9; margin-top: 4px; padding: 8px 14px; font-size: .75rem; color: var(--clr-primary); text-decoration: none; }
.top_bar-pop-foot:hover { background: var(--nav-hover-bg); }

/* 일정 목록 표 — 머리글 정렬 · 응답 대기 참석자(2026-09-11) */
.cal-list-table th.cal-sort { cursor: pointer; user-select: none; }
.cal-list-table th.cal-sort:hover { color: #475569; }
.cal-list-table th.cal-sort.on { color: #1e293b; }
.cal-sort-ind { margin-left: 4px; font-size: 9px; opacity: .5; }
.cal-list-table th.cal-sort.on .cal-sort-ind { opacity: 1; color: var(--clr-primary); }
.cal-att-pending { color: #94a3b8; }
/* 미정 = 아이폰 달력의 «아마도». 수락도 거부도 아닌 상태를 따로 그린다. */
.cal-att-tentative { color: #b45309; }

/* ── 화면뷰(목록/격자) 전환 - 2026-09-12 ──────────────────────────────────────
   주소록·메모·작업은 list-panel-header 오른쪽, 저장소는 경로 줄 앞의 아이콘 하나로 바꾼다.
   항목 하나하나(.list-item / .file-item)는 그대로 두고 «담는 그릇» 만 다시 입히는 방식이라
   클릭·체크박스·우클릭 메뉴·끌어놓기·썸네일이 전부 그대로 동작한다. */
/* 단추 두 개(격자·목록) - 눌린 것은 .basic-svg-btn.active 로 표시된다(기존 규칙 재사용) */
.list-view-switch { gap: 2px; }
/* .basic-svg-btn 의 공용 `margin: 0 5px` 는 여기서만 없앤다(전역으로 지우면 다른 단추가 흔들린다) */
.list-view-switch .list-view-btn { width: 28px; height: 28px; margin: 0; }

/* 메모·작업 목록 칸의 격자 보기 - 좁은 칸이라 2~3열 작은 카드 */
#noteList.list-grid-view, #taskList.list-grid-view {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px; padding: 10px; align-content: start;
}
/* 격자 보기에서는 목록 칸이 남는 폭을 가져가고 편집 칸은 460px 로 고정한다 - 280px 목록 칸에
   카드를 넣으면 한 열밖에 안 나와 «격자» 로 보이지 않는다(list-grid-on 은 note.js/task.js 가 붙인다). */
.sub-main-body.list-grid-on .list-panel { width: auto !important; flex: 1 1 auto; }
/* 격자 보기(2026-09-17): 편집 칸은 숨기고 목록(카드)이 sub-main 을 한 칸으로 채운다.
   카드를 누르면 상세는 오른쪽 미리보기 칸(#notePvPanel · #taskPvPanel)에 뜬다. */
.sub-main-body.list-grid-on .editor-panel { display: none !important; }
.sub-main-body.list-grid-on #noteList.list-grid-view,
.sub-main-body.list-grid-on #taskList.list-grid-view { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; padding: 12px; }
/* 넓어진 칸에서 화면뷰 아이콘이 오른쪽 끝까지 밀리면 **편집 칸 제목 바로 앞**에 붙어 그쪽 것처럼
   보인다 → 격자일 때는 자기 칸 제목 옆에 붙여 둔다. `.list-panel-header` 는
   `justify-content: space-between` 이라 **margin 만 풀어도 두 끝으로 벌어진다** — 정렬까지 바꿔야 한다. */
.sub-main-body.list-grid-on .list-panel-header { justify-content: flex-start; }
.sub-main-body.list-grid-on .list-panel-header .list-view-switch { margin-left: 8px; }

#noteList.list-grid-view:not(.cb-cards) .list-item, #taskList.list-grid-view:not(.cb-cards) .list-item {
  position: relative; flex-direction: column; align-items: stretch;
  /* flex-wrap: wrap 을 물려받으면 세로 방향에서 «여러 열» 을 만들며 카드 폭이 내용만큼 늘어나
     제목이 옆 카드로 넘친다(실측: 카드 131px 인데 속 글상자 213px) - 반드시 nowrap 으로 막는다. */
  flex-wrap: nowrap; overflow: hidden;
  border: 1px solid var(--clr-border); border-radius: 10px; padding: 10px; min-height: 74px;
}
#noteList.list-grid-view:not(.cb-cards) .list-item.active, #taskList.list-grid-view:not(.cb-cards) .list-item.active {
  border-color: var(--clr-primary); padding-left: 8px;
}
#noteList.list-grid-view .list-item-title, #taskList.list-grid-view .list-item-title {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#noteList.list-grid-view .list-item-sub, #taskList.list-grid-view .list-item-sub {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* 고르기 체크박스는 카드 오른쪽 위로(평소 숨는 성질은 그대로) */
#noteList.list-grid-view .list-item-cb-wrap, #taskList.list-grid-view .list-item-cb-wrap {
  position: absolute; top: 6px; right: 6px; padding-right: 0; z-index: 2;
}
#noteList.list-grid-view .empty, #taskList.list-grid-view .empty { grid-column: 1 / -1; }

/* 저장소 목록 보기 - 같은 .file-item 을 한 줄 행으로(기본은 카드) */
.file-grid.file-grid-rows { display: block; margin-bottom: 12px; }
.file-grid.file-grid-rows .file-item {
  flex-direction: row; align-items: center; gap: 10px; text-align: left;
  padding: 7px 56px 7px 10px; border: none; border-bottom: 1px solid var(--clr-border-light); border-radius: 0;
}
.file-grid.file-grid-rows .file-item:hover { box-shadow: none; background: var(--nav-hover-bg); }
.file-grid.file-grid-rows .file-item-name { flex: 1; width: auto; }
.file-grid.file-grid-rows .file-item-size, .file-grid.file-grid-rows .file-item-meta { flex: 0 0 auto; }
.file-grid.file-grid-rows .file-item-icon svg { width: 22px; height: 22px; }
/* 관리 콘솔 파일 아이콘은 <img> 로 그린다(SVG 안 스타일이 서로 섞이지 않게, 2026-09-17) */
.file-item-icon img.ft-icon { display: block; }
.file-grid.file-grid-rows .file-item-icon img.ft-icon { width: 22px; height: 22px; }
.file-grid.file-grid-rows .file-item-icon .file-thumb-img { width: 24px; height: 24px; }
.file-grid.file-grid-rows .file-item-check { position: static; width: 14px; height: 14px; }
.file-grid.file-grid-rows .file-item-fav-btn { top: 50%; right: 8px; transform: translateY(-50%); }
.file-grid.file-grid-rows .file-item-actions,
.file-grid.file-grid-rows .file-item-del-btn { bottom: auto; top: 50%; right: 30px; transform: translateY(-50%); }

/* ── «새 창» 편집기(note-new/task-new)의 띠 짜임을 목록 화면 편집 칸에서도 쓴다 (2026-09-12) ──
   이 조각들은 여태 note-new.ejs·task-new.ejs·calendar-new.ejs·contact-new.ejs 의 <style> 안에만
   있었다. 값은 그 파일들과 똑같이 옮긴 것이고(먼저 만든 쪽이 기준), 그 파일들의 사본은 그대로 둔다
   (뒤에 오는 인라인 <style> 이 같은 값으로 덮으므로 «새 창» 쪽 모습은 달라지지 않는다).
   중요: /note 편집 칸의 «공개» 토글은 원래 .task-toggle 마크업을 쓰면서 규칙이 없어 아무 것도
   안 보였다 - 이 블록으로 함께 살아난다.
   (주석에 «별별슬래시» 를 쓰면 주석이 일찍 닫혀 바로 다음 규칙이 통째로 사라진다 - 겪어 봤다.) */
.task-meta-row { display: flex; flex-wrap: wrap; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--clr-border); background: #f8fafc; flex-shrink: 0; align-items: flex-end; }
.task-meta-group { display: flex; flex-direction: column; gap: 3px; }
.task-meta-label { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--clr-text-sub); letter-spacing: .05em; }
.task-meta-select, .task-meta-date, .task-meta-text { border: 1px solid var(--clr-border); border-radius: 5px; padding: 3px 8px; font-size: 12px; background: #fff; color: var(--clr-text); cursor: pointer; }
.task-meta-text { cursor: text; min-width: 100px; }
.task-meta-select:focus, .task-meta-date:focus, .task-meta-text:focus { outline: none; border-color: var(--clr-primary); }
.task-toggle { position: relative; display: inline-block; width: 32px; height: 18px; cursor: pointer; }
.task-toggle input { opacity: 0; width: 0; height: 0; }
.task-toggle-slider { position: absolute; inset: 0; background: var(--clr-border); border-radius: 9px; transition: .2s; }
.task-toggle-slider::before { content: ''; position: absolute; width: 12px; height: 12px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.task-toggle input:checked + .task-toggle-slider { background: var(--clr-primary); }
.task-toggle input:checked + .task-toggle-slider::before { transform: translateX(14px); }
.notes-tags-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 14px; border-bottom: 1px solid var(--clr-border); background: #fff; flex-shrink: 0; min-height: 34px; }
.notes-tag-add-inp { border: none; background: none; font-size: 12px; outline: none; color: var(--clr-text); min-width: 120px; flex: 1; }
.notes-tag-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: rgba(4,133,73,.12); color: var(--clr-primary); border-radius: 10px; font-size: 11px; font-weight: 500; }
.notes-tag-pill-del { background: none; border: none; cursor: pointer; padding: 0; color: var(--clr-primary); font-size: 13px; line-height: 1; }
/* editor-panel-body 는 padding:20px 이라, 띠가 칸 폭을 꽉 채우도록 좌우 여백을 빼낸다 */
#editorBody .nt-strips { margin: 0 -20px 16px; border-top: 1px solid var(--clr-border); }

/* ── 작업 목록 아이템 - 제목 한 줄, 그 아래 «시작~마감 · 진행률», 오른쪽 끝에 중요도·상태·첨부
   아이콘(메일 목록의 중요 표시·첨부 클립과 같은 결). 2026-09-12 ── */
#taskList .list-item-text { min-width: 0; flex: 1; }
.tk-item-row1 { display: flex; align-items: center; gap: 6px; }
.tk-item-row1 .list-item-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-item-icons { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.tk-item-icons > span { display: flex; }
.tk-item-icons svg { display: block; }

/* ── «새 창» 작업/메모 편집기(task-new·note-new)의 진행률·본문·첨부 띠 - 목록 화면 편집 칸에서도
   같은 모습을 쓰기 위해 그 인라인 style 에서 옮겼다(값 동일, 그쪽 사본은 그대로 둔다). ── */
.task-meta-pct-group { flex: 1; }
.task-progress-wrap { display: flex; align-items: center; gap: 8px; }
.task-progress-range { flex: 1; max-width: 160px; accent-color: var(--clr-primary); cursor: pointer; }
.task-progress-val { font-size: 12px; font-weight: 600; color: var(--clr-text-sub); min-width: 36px; }
.nt-body-sec { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fff; }
.nt-body-toolbar { display: flex; align-items: center; gap: 2px; padding: 5px 12px; border-bottom: 1px solid var(--clr-border); background: #fafafa; flex-shrink: 0; }
.nt-body-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: none; background: none; border-radius: 4px; cursor: pointer; color: #4b5563; }
.nt-body-btn:hover { background: #f1f5f9; color: #111827; }
.nt-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; font-size: 14px; color: #374151; line-height: 1.75; outline: none; }
.nt-body:empty::before { content: attr(data-placeholder); color: #9ca3af; }
.notes-attach-bar { border-top: 1px solid var(--clr-border); background: #f8fafc; flex-shrink: 0; max-height: 200px; overflow-y: auto; }
.notes-attach-header { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--clr-border); }
.notes-attach-title { font-size: 12px; font-weight: 700; color: var(--clr-text-sub); }
.notes-attach-upload-btn { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid var(--clr-border); border-radius: 4px; background: #fff; font-size: 11px; cursor: pointer; color: var(--clr-text-sub); margin-left: auto; }
.notes-attach-upload-btn:hover { border-color: var(--clr-primary); color: var(--clr-primary); }
.notes-attach-list { padding: 4px 8px; }
.notes-attach-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 5px; }
.notes-attach-item:hover { background: #eef2f7; }
.notes-attach-name { flex: 1; font-size: 12px; color: var(--clr-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.notes-attach-size { font-size: 10px; color: var(--clr-text-sub); white-space: nowrap; }
.notes-attach-del { background: none; border: none; cursor: pointer; font-size: 15px; color: var(--clr-text-sub); line-height: 1; padding: 0 2px; }
.notes-attach-del:hover { color: #ef4444; }
/* «새 창» 편집기의 제목 줄 입력 - 작업 편집 칸에서는 본문에 제목 칸을 두지 않고(사용자 지시)
   머리글의 제목을 이 모양으로 바로 고칠 수 있게 쓴다. */
.nt-title-input { flex: 1; border: none; background: none; font-size: 15px; font-weight: 700; color: var(--clr-text); outline: none; padding: 2px 4px; }
.nt-title-input::placeholder { color: #9ca3af; }
.editor-panel-header .editor-panel-title:has(.nt-title-input) { flex: 1; min-width: 0; display: flex; }
.editor-panel-header .nt-title-input { width: 100%; }
/* 제목 앞 «+»(새 메모·새 작업) — 2026-09-17 */
.editor-panel-header .editor-panel-title:has(.nt-head-add) { align-items: center; gap: 4px; }
.nt-head-add { flex: none; width: 28px; height: 28px; border: 1px solid var(--clr-border); border-radius: 7px; background: #fff;
  color: #4b5563; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  transition: border-color .12s, color .12s, background .12s; }
.nt-head-add:hover { border-color: var(--clr-primary); color: var(--clr-primary); background: #f8fafc; }

/* 편집 칸을 «새 창» 처럼 띠 + 본문으로 꽉 채운다 - 폼을 그릴 때 task.js 가 이 클래스를 붙인다 */
#editorBody.nt-form-body { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
/* /contact/new 에만 있던 조각들 - 상세 칸에서도 같은 모양이 되게 여기에 둔다. */
.task-meta-group.task-meta-grow { flex: 1; min-width: 160px; }
.task-meta-label .req { color: #dc2626; margin-left: 2px; }
/* 주소록 머리글 - 얼굴 동그라미 + 고칠 수 있는 제목(작업·메모와 같은 자리) */
.editor-panel-header .ct-head-edit { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.editor-panel-header .ct-head-edit .mail-item-avatar { flex: 0 0 auto; }
/* 상세 칸 맨 위 «제목 줄» - /contact/new 의 같은 이름 띠와 같은 모양 */
#editorBody .nt-title-bar { min-height: 52px; box-sizing: border-box; display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-bottom: 1px solid var(--clr-border); background: #fff; flex-shrink: 0; }
/* 메모 본문의 서식 도구줄은 SmplusRte 가 만든다 - 작업의 .nt-body-toolbar 와 같게 보이도록 맞춘다. */
#editorBody.nt-form-body .nt-body-sec .rte-toolbar { border: none; border-bottom: 1px solid var(--clr-border);
  border-radius: 0; background: #fafafa; padding: 5px 12px; }
#editorBody.nt-form-body .nt-body-sec .rte-toolbar + [contenteditable] { border-radius: 0 !important; }

/* =============================================================
   주소록 카드 - 상태점·최근접속·아이콘 + 최근 메일 툴팁 (2026-09-14)
   ============================================================= */
.card-item-pres { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .75rem; color: var(--clr-text-sub); }
.pres-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: #cbd5e1; }
.pres-dot.pres-online { background: #22c55e; }
.pres-dot.pres-away { background: #f59e0b; }
.pres-dot.pres-dnd { background: #ef4444; }
.pres-dot.pres-offline { background: #cbd5e1; }
.card-item-actions { display: flex; gap: 6px; margin-top: 12px; }
.card-act { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--clr-border); border-radius: 8px; background: #fff; color: #475569; cursor: pointer; transition: background .12s, color .12s, border-color .12s; padding: 0; }
.card-act:hover { background: var(--clr-primary); color: #fff; border-color: var(--clr-primary); }
.card-act svg { display: block; }
/* 최근 메일 툴팁(카드 hover) - 보기 전용 */
.contact-recent-tip { position: fixed; z-index: 2000; min-width: 220px; max-width: 340px; background: #fff; border: 1px solid var(--clr-border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.16); padding: 10px 12px; font-size: 12.5px; pointer-events: auto; }
.contact-recent-tip .crt-title { font-weight: 700; font-size: 12px; color: #111827; margin-bottom: 6px; }
.crt-item { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.crt-dir { flex-shrink: 0; width: 14px; text-align: center; font-weight: 700; }
.crt-dir.in { color: #2563eb; }
.crt-dir.out { color: #16a34a; }
.crt-subj { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--clr-text); }
.crt-item[data-msgid] { cursor: pointer; border-radius: 6px; margin: 0 -4px; padding-left: 4px; padding-right: 4px; }
.crt-item[data-msgid]:hover { background: var(--clr-bg-hover, #f1f5f9); }
.crt-date { flex-shrink: 0; color: #9ca3af; font-size: 11px; }
.crt-empty { color: #9ca3af; padding: 2px 0; font-size: 13px; }
/* 주고받은 메일 요약 줄(총 N건 · 받음 · 보냄) — 2026-09-16 */
.crt-sum { color: #8c95a8; font-size: 11.5px; padding: 0 0 4px; }
/* 미리보기 패널 «사용자 정보» 구역 */
.contact-userinfo .cui-pres { display: flex; align-items: center; gap: 6px; padding: 4px 16px; font-size: 12.5px; color: var(--clr-text-sub); }
.contact-userinfo .cui-recent { padding: 2px 16px 6px; }
.contact-userinfo .cui-recent-title { font-size: 11px; color: #9ca3af; margin: 4px 0; }
.contact-userinfo .cui-recent-body .crt-item { font-size: 12.5px; }

/* ── 카드 판: 메모·작업 격자 보기(2026-09-17, Task Cards 디자인) ───────────────────
   card-board.js 가 목록 칸에 .cb-panel, 목록에 .cb-cards 를 붙인다. 목록 보기에는 아무 영향이 없다. */
.list-panel.cb-panel { background: transparent; font-family: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', sans-serif; }
.list-panel.cb-panel .list-panel-header { height: auto; padding: 16px 20px 12px; gap: 12px; border-bottom: 0; background: transparent;
  justify-content: flex-start; flex-wrap: wrap; }
.list-panel.cb-panel .list-panel-title { font-size: 18px; font-weight: 700; letter-spacing: -.3px; color: #1A1D27; }
.cb-count { padding: 2px 8px; border-radius: 999px; background: #fff; border: 1px solid #DDE1E9; color: #4D5566;
  font-size: 12px; font-weight: 600; white-space: nowrap; }
.cb-spacer { flex: 1; }
.list-panel.cb-panel .list-panel-header .list-search-wrap { flex: none; width: 190px; }
.list-panel.cb-panel .list-panel-header .list-search-input { height: 32px; border-color: #DDE1E9; font-size: 13px; color: #1A1D27; }
.list-panel.cb-panel .list-panel-header .list-search-input:focus { border-color: #3366FF; }
.list-panel.cb-panel .list-view-switch { margin-left: 0 !important; padding: 2px; gap: 2px; background: #fff; border: 1px solid #DDE1E9; border-radius: 6px; }
.list-panel.cb-panel .list-view-switch .list-view-btn { width: 28px; height: 26px; border-radius: 4px; color: #8C95A8; opacity: 1; }
.list-panel.cb-panel .list-view-switch .list-view-btn:hover { color: #1A1D27; }
.list-panel.cb-panel .list-view-switch .list-view-btn.active { background: #EBF0FF; color: #3366FF; }
.cb-new-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; background: #3366FF; border: 1px solid #3366FF;
  border-radius: 6px; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.cb-new-btn:hover { background: #1A4AD4; border-color: #1A4AD4; }
.cb-filter-row { display: flex; align-items: center; gap: 6px; padding: 0 20px 16px; flex-shrink: 0; }
.cb-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
/* 카드보드 칩(메모/작업 색·상태 필터)의 모양은 대시보드 칩(.dsh-chip, dashboard.css + 테마 덮어쓰기)과 공유한다(2026-09-18).
   여기서는 색 점(i)만 더한다. card-board.js 가 class="cb-chip dsh-chip" 으로 그린다. */
.cb-chip { white-space: nowrap; }
.cb-chip i { width: 6px; height: 6px; border-radius: 999px; background: var(--chip, #3366FF); flex: none; }
.cb-chip.is-on i { background: rgba(255,255,255,.85); }
.cb-filter-row .list-sort-wrap { flex: none; }
.cb-filter-row .list-sort-btn { width: auto; height: 28px; padding: 0 10px; gap: 6px; border-color: #DDE1E9; color: #4D5566; font-size: 12.5px; font-weight: 500; font-family: inherit; }
.cb-filter-row .list-sort-btn:hover { background: #fff; border-color: #3366FF; color: #3366FF; }
.cb-filter-row .list-sort-btn svg { width: 13px; height: 13px; }
.list-panel.cb-panel .list-panel-footer { background: transparent; border-top-color: #E4E8F0; }

/* 카드 격자 — 칸이 넓으면 4열, 오른쪽 상세 칸을 열면 3열 안팎 */
.sub-main-body.list-grid-on #taskList.list-grid-view.cb-cards,
.sub-main-body.list-grid-on #noteList.list-grid-view.cb-cards {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding: 0 20px 20px; align-items: start; background: transparent; }
/* 바깥 모양(배경·테두리·모서리·그림자·올림·고름)은 맨 아래 .tile-item-basic 이 맡는다 — 여기는 안쪽 짜임만 */
.sub-main-body.list-grid-on .cb-cards .list-item.cb-card,
#noteList.cb-cards .list-item.cb-card, #taskList.cb-cards .list-item.cb-card {
  display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; min-height: 0; padding: 0;
  overflow: hidden; font-size: 14px; line-height: 1.5; word-break: keep-all; }
.sub-main-body.list-grid-on .cb-cards .list-item.cb-card.active { padding-left: 0; }
.sub-main-body.list-grid-on .cb-cards .list-item.cb-card.is-done { opacity: .72; }
.cb-card .list-item-cb-wrap { display: none !important; }
.cb-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cb-accent, #8C95A8); }
.cb-top { display: flex; align-items: flex-start; gap: 10px; padding: 14px 14px 0; }
.cb-check { flex: none; width: 19px; height: 19px; margin-top: 2px; display: grid; place-items: center; border-radius: 5px; cursor: pointer;
  border: 1.5px solid #C3C9D5; background: #fff; color: transparent; padding: 0; }
.cb-check:hover { border-color: #12B76A; }
.cb-check.on { border-color: #12B76A; background: #12B76A; color: #fff; }
.cb-head { flex: 1; min-width: 0; }
.cb-title { font-size: 14px; font-weight: 600; line-height: 1.35; color: #1A1D27; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cb-card.is-done .cb-title { color: #4D5566; text-decoration: line-through; }
.cb-pills { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cb-pill { padding: 1px 7px; border-radius: 999px; background: #F2F4F8; color: #4D5566; font-size: 11px; font-weight: 600; white-space: nowrap; }
.cb-pill.t-blue { background: #EBF0FF; color: #1A4AD4; } .cb-pill.t-green { background: #E6F7F0; color: #0F7A48; }
.cb-pill.t-red { background: #FEE8E8; color: #C62828; } .cb-pill.t-amber { background: #FEF3CD; color: #8A5B00; }
.cb-pill.t-purple { background: #F0EBFD; color: #5B21B6; }
.cb-desc { margin: 8px 14px 12px 43px; padding: 0; font-size: 12.5px; color: #4D5566; line-height: 1.55;
  overflow-wrap: anywhere; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-height: calc(1.55em * 2); }
.cb-card.no-check .cb-desc { margin-left: 14px; -webkit-line-clamp: 4; max-height: calc(1.55em * 4); }
.cb-desc.is-empty { color: #9AA3B2; }
.cb-prog { padding: 0 14px; }
.cb-prog-top { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: #4D5566; margin-bottom: 5px; }
.cb-prog-top b { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 400; color: #8C95A8; }
.cb-bar { height: 5px; border-radius: 999px; background: #EDF0F5; overflow: hidden; }
.cb-bar i { display: block; height: 100%; border-radius: 999px; background: var(--cb-accent, #3366FF); }
.cb-note { display: flex; align-items: center; gap: 7px; margin: 12px 14px 0; padding: 8px 10px; border-radius: 6px; background: #F8F9FC;
  border: 1px solid #E4E8F0; font-size: 11.5px; color: #4D5566; min-width: 0; }
.cb-note span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-note svg { flex: none; color: #3366FF; }
.cb-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 14px; border-top: 1px solid #F2F4F8; }
.cb-av { flex: none; width: 24px; height: 24px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.cb-owner { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; font-size: 12px; color: #4D5566; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-owner svg { flex: none; color: #8C95A8; }
.cb-due { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: #F2F4F8; color: #4D5566; }
.cb-due.d-danger { background: #FEE8E8; color: #C62828; } .cb-due.d-warn { background: #FEF3CD; color: #8A5B00; }
.cb-due.d-done { background: #E6F7F0; color: #0F7A48; }
.cb-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 72px 20px; background: #fff;
  border: 1px solid #DDE1E9; border-radius: 8px; color: #8C95A8; font-size: 13px; }

/* ── tile-item-basic — 격자 카드 공통 바깥 모양 (2026-09-17) ─────────────────────────────
   작업·메모 카드(.cb-card) · 주소록 카드(.card-item) · 저장소 카드(.file-item)가 이 클래스 하나로 같은 모양을 쓴다.
   안쪽 짜임(여백·줄)은 원래 클래스가 그대로 맡고, 여기는 배경·테두리·모서리·그림자·올림·고름 상태와 오른쪽 위 ⋯(.tile-item-more)만.
   .list-item / .card-item / .file-item 의 옛 규칙과 명시도가 같아서 **이 묶음은 파일 맨 끝에 있어야 이긴다**. */
.tile-item-basic {
  position: relative; background: #fff; border: 1px solid #DDE1E9; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); color: #1A1D27;
  transition: box-shadow 120ms cubic-bezier(.2,0,0,1), border-color 120ms cubic-bezier(.2,0,0,1);
}
.tile-item-basic:hover { background: #fff; border-color: #C3C9D5; box-shadow: 0 4px 12px rgba(0,0,0,.10); transform: none; }
.tile-item-basic.active, .tile-item-basic.file-item-selected { background: #fff; border: 1px solid #3366FF; box-shadow: 0 0 0 1px #3366FF; outline: none; }
.tile-item-basic.file-item-selected { background: #F5F8FF; }
#noteList.cb-cards .tile-item-basic.list-item-checked, #taskList.cb-cards .tile-item-basic.list-item-checked { background: #F5F8FF; border-color: #9DB5FF; }
.tile-item-more { flex: none; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: #8C95A8; cursor: pointer; font-family: inherit; }
.tile-item-more:hover { background: #F2F4F8; color: #1A1D27; }
.tile-item-more:focus-visible { outline: 2px solid #3366FF; outline-offset: 1px; }
.tile-item-basic > .tile-item-more { position: absolute; top: 8px; right: 8px; z-index: 3; }
/* 안쪽 여백은 메모 카드 기준 14px 로 통일(2026-09-17 — 예전: 주소록 24px, 저장소 14/10/10px · ⋯ 4px).
   메모·작업 카드는 윗줄(.cb-top)이 위·양옆 14px 이고 ⋯ 도 위·오른쪽 14px 자리 — 주소록·저장소도 같은 자리에 둔다. */
.card-item.tile-item-basic, .file-item.tile-item-basic { padding: 14px; }
/* 주소록 카드 — ⋯ 는 이름 줄 높이에, 이름·회사 뱃지는 그 밑으로 들어가지 않게 */
.card-item.tile-item-basic > .tile-item-more { top: 14px; right: 14px; }
.card-item.tile-item-basic .card-item-name { padding-right: 30px; }
/* 저장소 카드 — 폭 160px 고정(격자 보기만). ⋯ 는 오른쪽 위, 즐겨찾기 별은 바로 왼쪽, 고르기 칸은 왼쪽 위(모두 ⋯ 와 같은 높이) */
#stList .file-grid:not(.file-grid-rows) { grid-template-columns: repeat(auto-fill, 160px); }
.file-item.tile-item-basic > .tile-item-more { top: 14px; right: 14px; }
.file-item.tile-item-basic .file-item-fav-btn { top: 17px; right: 40px; }
.file-item.tile-item-basic .file-item-check { top: 18px; left: 14px; }
/* 저장소 «목록 보기»는 같은 카드를 한 줄 행으로 — 카드 껍데기는 벗기고 ⋯·별·액션을 오른쪽에 나란히 */
.file-grid.file-grid-rows .file-item.tile-item-basic { padding-right: 90px; background: transparent; box-shadow: none; }
.file-grid.file-grid-rows .file-item.tile-item-basic:hover { background: var(--nav-hover-bg); border-bottom-color: var(--clr-border-light); box-shadow: none; }
.file-grid.file-grid-rows .file-item.tile-item-basic.file-item-selected { background: rgba(37,99,235,.07); box-shadow: none; outline: 2px solid var(--clr-primary); outline-offset: -2px; }
.file-grid.file-grid-rows .file-item.tile-item-basic > .tile-item-more { top: 50%; right: 6px; transform: translateY(-50%); }
.file-grid.file-grid-rows .file-item.tile-item-basic .file-item-fav-btn { top: 50%; right: 34px; }
.file-grid.file-grid-rows .file-item.tile-item-basic .file-item-actions,
.file-grid.file-grid-rows .file-item.tile-item-basic .file-item-del-btn { right: 58px; }

/* ── 주요 기능 안내 모달(user-guide-modal.js, 2026-09-17) — 표준 .modal-overlay/.modal-box 에 /guide/user?embed=1 을 담는다.
   바깥 모양(760px·모서리 12·그림자)은 여기, 안의 내용·여백은 guide-user.css. ── */
.modal-overlay.ug-modal { background: rgba(26,29,39,.55); z-index: 1250; }
.modal-box.ug-modal-box { width: 760px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); padding: 0; overflow: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,.18); }
.ug-modal-box .modal-close-btn { top: 20px; right: 24px; width: 30px; height: 30px; z-index: 2; color: #8C95A8; }
.ug-modal-box .modal-close-btn:hover { background: #F2F4F8; color: #1A1D27; }
.ug-modal-frame { display: block; width: 100%; height: 520px; border: 0; }

/* ── 윗줄 언어 단추 — 로그인 창(auth.freeit.co.kr #loginLangBtn)과 같은 꼴·같은 동작 (2026-09-17) ──
   테두리 있는 작은 단추(지구본 + KO/EN), 누를 때마다 KO ↔ EN 이 바로 바뀐다(펼침 메뉴 없음 — i18n.js). */
.top_bar-lang { gap: 5px; padding: 4px 10px; font-size: 12px; line-height: 1;
  border: 1px solid rgba(255,255,255,.24); border: 1px solid color-mix(in srgb, currentColor 32%, transparent); border-radius: 6px; }
.top_bar-lang:hover { border-color: rgba(255,255,255,.45); border-color: color-mix(in srgb, currentColor 55%, transparent); }
.top_bar-lang svg { width: 13px; height: 13px; flex: none; }
.top_bar-lang:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }

/* ── 윗줄 «새 메모» 빠른 메모 창 (2026-09-17) — 아이콘 아래로 떨어지는 작은 창(topbar-extras.js).
   저장하면 그때의 날짜·시간(YYYY-MM-DD HH:mm)을 제목으로 기본 메모 폴더에 남는다. ── */
.top_bar-memo-wrap { position: relative; flex-shrink: 0; margin-right: 2px; }
.top_bar-memo-pop { display: none; position: absolute; right: -10px; top: calc(100% + 9px); z-index: 230;
  width: 320px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid #DDE1E9; border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15,23,42,.18); color: #1A1D27; font-family: var(--theme-font); text-align: left; }
.top_bar-memo-pop.open { display: block; }
.top_bar-memo-pop::before { content: ''; position: absolute; top: -6px; right: 19px; width: 10px; height: 10px; background: #fff;
  border-left: 1px solid #DDE1E9; border-top: 1px solid #DDE1E9; transform: rotate(45deg); }
.qm-head { display: flex; align-items: baseline; gap: 8px; padding: 13px 14px 0; }
.qm-title { font-size: 13px; font-weight: 700; color: #1A1D27; }
.qm-when { margin-left: auto; font-size: 11.5px; color: #8C95A8; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qm-text { display: block; box-sizing: border-box; width: calc(100% - 28px); margin: 10px 14px 0; min-height: 132px; max-height: 360px;
  resize: vertical; padding: 9px 10px; border: 1px solid #DDE1E9; border-radius: 6px; background: #fff;
  font: inherit; font-size: 13px; line-height: 1.6; color: #1A1D27; outline: none; }
.qm-text::placeholder { color: #9AA3B2; }
.qm-text:focus { border-color: #3366FF; box-shadow: 0 0 0 3px rgba(51,102,255,.12); }
.qm-msg { margin: 8px 14px 0; font-size: 12px; color: #C62828; }
.qm-foot { display: flex; align-items: center; gap: 6px; padding: 10px 14px 13px; }
.qm-hint { margin-right: auto; font-size: 11px; color: #8C95A8; white-space: nowrap; }
.qm-toast { position: fixed; left: 50%; bottom: 28px; z-index: 1300; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
  padding: 10px 14px 10px 16px; border-radius: 8px; background: #1A1D27; color: #fff; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.qm-toast a { color: #9DB5FF; font-weight: 600; text-decoration: none; }
.qm-toast a:hover { text-decoration: underline; }

/* ── 저장소 미리보기 칸 «공유»·«버전 관리» 목록 — 첨부 «Share Panel» 디자인 (2026-09-17, mystorage.js sp*) ──
   흰 카드 하나에 줄을 쌓는다. 칸이 좁으면(카드 380px 이하) 공유 날짜를 주소 줄 뒤로 옮긴다. */
.sp-list { margin: 4px 16px 6px; background: #fff; border: 1px solid #DDE1E9; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.05);
  overflow: hidden; container-type: inline-size; color: #1A1D27; font-size: 14px; line-height: 1.5; word-break: keep-all; }
.sp-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.sp-row + .sp-row { border-top: 1px solid #EDF0F5; }
.sp-ver .sp-row { padding: 12px 16px; transition: background-color 120ms; }
.sp-ver .sp-row:hover { background: #F8F9FC; }
.sp-av { flex: none; width: 36px; height: 36px; border-radius: 9999px; color: #fff; font-size: 14px; font-weight: 700; display: grid; place-items: center; }
.sp-ico { flex: none; width: 32px; height: 32px; border-radius: 6px; background: #E3EEFA; color: #1565C0; display: grid; place-items: center; }
.sp-main { flex: 1; min-width: 0; }
.sp-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-sub { font-size: 12px; color: #8C95A8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.sp-sub .sp-date-inline { display: none; }
.sp-side { flex: none; display: flex; align-items: center; gap: 10px; }
.sp-mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.sp-date { font-size: 12px; color: #4D5566; white-space: nowrap; }
.sp-perm { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 9999px; border: 1px solid #12B76A;
  background: #E6F7F0; color: #1A1D27; font-size: 12px; font-weight: 600; font-family: inherit; white-space: nowrap; cursor: pointer; }
.sp-perm.is-read { border-color: #DDE1E9; background: #F2F4F8; color: #4D5566; }
.sp-perm:hover { filter: brightness(.97); }
.sp-perm:disabled { opacity: .6; cursor: progress; }
.sp-x { width: 26px; height: 26px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #8C95A8; cursor: pointer; }
.sp-x:hover { background: #FEE8E8; color: #C62828; }
.sp-when { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; }
.sp-when b { font-size: 13px; font-weight: 500; }
.sp-when span { font-size: 12px; color: #8C95A8; }
.sp-btns { flex: none; display: flex; gap: 6px; }
.sp-btn { height: 28px; padding: 0 11px; border: 1px solid #DDE1E9; border-radius: 6px; background: #fff; color: #4D5566; font-size: 12.5px; font-weight: 500;
  font-family: inherit; white-space: nowrap; cursor: pointer; }
.sp-btn:hover { border-color: #90ADEC; color: #1565C0; }
.sp-btn.pri { border-color: #1565C0; background: #1565C0; color: #fff; font-weight: 600; }
.sp-btn.pri:hover { border-color: #0E4894; background: #0E4894; color: #fff; }
.sp-btn.done { border-color: #12B76A; background: #E6F7F0; color: #1A1D27; font-weight: 600; cursor: default; }
.sp-btn:disabled:not(.done) { opacity: .6; cursor: progress; }
.sp-perm:focus-visible, .sp-x:focus-visible, .sp-btn:focus-visible { outline: 2px solid #1565C0; outline-offset: 2px; }
.sp-perm-menu { min-width: 140px; }
.sp-perm-menu .ctx-menu-item.on { color: #1565C0; font-weight: 600; }
.sp-perm-check { width: 14px; height: 14px; display: inline-flex; flex: none; color: #1565C0; }
/* 좁은 칸(카드 380px 이하 — 미리보기 칸 기본 폭 300px 이 여기다): 두 줄로 편다.
   공유  = [얼굴][이름 / 주소 · 날짜][×]  +  아랫줄 [권한 알약]
   버전  = [아이콘][날짜 크기 / 누구 수정 · 시각]  +  아랫줄 [미리보기][복원] */
@container (max-width: 380px) {
  .sp-row { display: grid; column-gap: 12px; row-gap: 8px; align-items: center; }
  .sp-share .sp-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .sp-share .sp-side { display: contents; }
  .sp-share .sp-av { grid-column: 1; grid-row: 1; }
  .sp-share .sp-main { grid-column: 2; grid-row: 1; }
  .sp-share .sp-x { grid-column: 3; grid-row: 1; }
  .sp-share .sp-perm { grid-column: 2; grid-row: 2; justify-self: start; }
  .sp-share .sp-side .sp-date { display: none; }
  .sp-share .sp-sub .sp-date-inline { display: inline; }
  .sp-ver .sp-row { grid-template-columns: 32px minmax(0, 1fr); }
  .sp-ver .sp-btns { grid-column: 2; }
}

/* ── 주소록 카드·편집 칸 (2026-09-17) ──
   · 상태 줄: .card-item-pres { display:flex } 가 hidden 속성을 이겨 조직 밖 연락처에도 회색 점이 보였다 → hidden 이면 감춘다
     (조직 밖 연락처는 contact.js 가 줄 자체를 뺀다).
   · 아이콘 묶음(card-item-actions)은 카드 맨 아래에 붙인다 — 같은 줄 카드 높이가 같아서 아이콘 줄도 나란히 선다. */
.card-item-pres[hidden] { display: none; }
.card-item.tile-item-basic .card-item-actions { margin-top: auto; padding-top: 12px; }
/* 편집 칸 이메일·전화번호 여러 개 — 줄마다 [입력][×], 아래 «+ 추가» */
.ct-multi-row .ct-multi { gap: 5px; }
.ct-multi-list { display: flex; flex-direction: column; gap: 5px; }
.ct-multi-item { display: flex; align-items: center; gap: 6px; }
.ct-multi-item .task-meta-text { flex: 1; min-width: 0; height: 26px; }
.ct-multi-item .ct-phone-type { flex: none; width: 84px; height: 26px; }
.ct-multi-del { flex: none; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px;
  background: transparent; color: #94a3b8; cursor: pointer; }
.ct-multi-del:hover { background: #fee2e2; color: #dc2626; }
.ct-multi-add { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px 0 6px; margin-top: 1px;
  border: 1px dashed #cbd5e1; border-radius: 5px; background: #fff; color: var(--clr-primary); font-size: 11.5px; font-weight: 600; font-family: inherit; cursor: pointer; }
.ct-multi-add:hover { border-style: solid; border-color: var(--clr-primary); background: #eff6ff; }
.ct-multi-del:focus-visible, .ct-multi-add:focus-visible { outline: 2px solid var(--clr-primary); outline-offset: 1px; }

/* ── 저장소 미리보기 칸 (2026-09-17) ──
   · 이름표 칸이 46px 이라 «하위 폴더»가 두 줄로 꺾이고 «동기화 제외»가 토글 밑으로 겹쳤다 → 이 칸만 72px·한 줄
   · «공유» 제목 옆 + (테두리 없음) */
#filePreviewPanel .preview-panel-row .k { width: 72px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#filePreviewPanel .fp-sync-row { align-items: center; }
#filePreviewPanel .fp-sync-row .v { display: flex; align-items: center; }
.preview-panel-sec-head { display: flex; align-items: center; gap: 4px; padding-right: 12px; }
.preview-panel-sec-head .preview-panel-sec-title { flex: 1; min-width: 0; }
.fp-share-add { flex: none; width: 24px; height: 24px; margin-top: -6px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 6px;
  background: transparent; color: #64748b; cursor: pointer; }
.fp-share-add:hover { background: #EBF0FF; color: #1565C0; }
.fp-share-add:focus-visible { outline: 2px solid #1565C0; outline-offset: 1px; }
.fp-share-add[hidden] { display: none; }

/* ── 개인 설정 «이메일 아바타 숨기기» (2026-09-17) ──
   html.hide-avatars 면 사람 얼굴 동그라미를 모든 화면에서 뺀다 — 메일 목록·타임라인, 대시보드 받은 편지함, 주소록 머리글,
   작업 카드, 저장소 공유 목록, 일정 참석자, 받는 사람 추천, 커뮤니티 글·멘션·담당자·멤버.
   커뮤니티/채널 아이콘(.comm-avatar)은 사람이 아니라 그대로 둔다(사람 쪽은 comm.js 가 .sm-person-av 를 붙인다). */
html.hide-avatars .mail-item-avatar,
html.hide-avatars .mail-tl-avatar,
html.hide-avatars .dsh-av,
html.hide-avatars .cb-av,
html.hide-avatars .sp-av,
html.hide-avatars .cd-avatar,
html.hide-avatars .recipient-dd-avatar,
html.hide-avatars .comm-post-ava,
html.hide-avatars .comm-post-avatar,
html.hide-avatars .comm-mention-ava,
html.hide-avatars .comm-task-ava,
html.hide-avatars .sm-person-av { display: none !important; }
/* 저장소 공유 목록 좁은 칸(두 줄 grid)은 얼굴 칸이 빈자리로 남지 않게 칸을 당긴다 */
@container (max-width: 380px) {
  html.hide-avatars .sp-share .sp-row { grid-template-columns: minmax(0, 1fr) auto; }
  html.hide-avatars .sp-share .sp-main, html.hide-avatars .sp-share .sp-perm { grid-column: 1; }
  html.hide-avatars .sp-share .sp-x { grid-column: 2; }
}

/* ── 떠 있는 빠른 메모(2026-09-17) — body 로 옮겨 position:fixed. 머리줄을 끌어 옮기고 × 로만 닫는다(topbar-extras.js) ── */
.top_bar-memo-pop.qm-float { position: fixed; right: auto; z-index: 1150; }
.top_bar-memo-pop.qm-float::before { display: none; }
.qm-float .qm-head { align-items: center; padding: 8px 8px 0 14px; cursor: move; user-select: none; -webkit-user-select: none; touch-action: none; }
.qm-float.dragging { box-shadow: 0 20px 44px rgba(15,23,42,.28); }
.qm-close { flex: none; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: #8C95A8; cursor: pointer; }
.qm-close:hover { background: #F2F4F8; color: #1A1D27; }
.qm-close:focus-visible { outline: 2px solid #3366FF; outline-offset: 1px; }
.qm-msg.ok { color: #0F7A48; }
.qm-float.ping { animation: qmPing .6s ease; }
@keyframes qmPing { 50% { box-shadow: 0 0 0 4px rgba(51,102,255,.35), 0 12px 32px rgba(15,23,42,.18); } }
@media (prefers-reduced-motion: reduce) { .qm-float.ping { animation: none; } }

/* ── 역할별 서비스 권한(2026-09-17) — 관리 콘솔 SMHUB › 권한에서 막힌 기능의 입구를 감춘다(auth.js · head.ejs 가 html.no-svc-* 를 붙인다).
   서버도 같은 판정으로 막으므로(403) 여기서는 눈에 보이는 입구만 치운다. ── */
html.no-svc-comm .sidebar a[href="/comm"], html.no-svc-comm a[href="/comm"] { display: none !important; }
html.no-svc-office .nd-open,
html.no-svc-office #fpEditBtn,
html.no-svc-office #ictxEdit,
html.no-svc-office #ictxEditDivider,
html.no-svc-office #apEditBtn,
html.no-svc-office .comm-file-edit,
html.no-svc-office #cfNewDoc { display: none !important; }
/* 2026-09-17 — 일정 · 주소록 / 저장소 / 메신저. 서버도 같은 기능의 API 를 403(service_denied)으로 막는다. */
html.no-svc-calendar .sidebar a[href="/calendar"],
html.no-svc-calendar .sidebar a[href="/contact"],
html.no-svc-calendar .dsh-widget:has(#dashSchedule),
html.no-svc-calendar a[href="/mysetting/calendar"],
html.no-svc-calendar .tab-item[data-src="personal"],
html.no-svc-storage .sidebar a[href="/mystorage/dashboard"],
html.no-svc-storage #cmpBigFileBtn,
html.no-svc-storage #apStoreBtn,
html.no-svc-im .ctx-menu-item[data-act="chat"],
html.no-svc-im [data-pf="chat"],
html.no-svc-im .card-act[data-cact="call"],
html.no-svc-im .card-item-pres { display: none !important; }

/* ── 격자 보기: 보기 전환 · 검색은 머리줄 밑 줄로(2026-09-17 — 저장소 화면과 같은 자리) ──
   메모 · 작업(card-board.js)은 거르기 칩 줄 맨 앞 .cb-tools, 주소록은 격자 본문 맨 위 .grid-tool-row */
.cb-filter-row .cb-tools { display: flex; align-items: center; gap: 8px; flex: none; margin-right: 6px; }
.cb-filter-row .cb-tools .list-search-wrap { flex: none; width: 210px; }
.cb-filter-row .cb-tools .list-search-input { height: 30px; border-color: #DDE1E9; font-size: 13px; color: #1A1D27; }
.cb-filter-row .cb-tools .list-search-input:focus { border-color: #3366FF; }
.cb-filter-row { flex-wrap: wrap; row-gap: 8px; }
#contactGridBody { flex-direction: column; }
#contactGridBody .grid-tool-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-shrink: 0; }
#contactGridBody .grid-tool-row .list-search-wrap { flex: 0 1 320px; }

/* ── 떠 있는 메모 · 그림 붙여넣기(2026-09-17) — 글 칸은 contenteditable, 창은 가로로 늘리고 줄일 수 있다 ── */
.top_bar-memo-pop.qm-float { resize: horizontal; overflow: hidden; min-width: 280px; max-width: min(760px, calc(100vw - 16px)); }
.qm-float .qm-text { overflow-y: auto; overflow-x: hidden; overflow-wrap: anywhere; cursor: text; white-space: normal; }
.qm-float .qm-text:empty::before { content: attr(data-placeholder); color: #9AA3B2; pointer-events: none; }
.qm-float .qm-text img { display: block; max-width: 100%; height: auto; margin: 4px 0; border-radius: 4px; cursor: pointer; }
/* 편집 칸 그림 크기 손잡이(img-resize.js) — 메모 본문 · 새 메모 창 · 떠 있는 메모 */
.img-rs-box { position: fixed; z-index: 1400; display: none; pointer-events: none; box-shadow: 0 0 0 2px #3366FF; border-radius: 2px; }
.img-rs-box.on { display: block; }
.img-rs-handle { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; box-sizing: border-box; background: #fff;
  border: 2px solid #3366FF; border-radius: 3px; cursor: nwse-resize; pointer-events: auto; touch-action: none; }
.img-rs-size { position: absolute; right: 0; top: -24px; padding: 2px 6px; border-radius: 4px; background: #1A1D27; color: #fff;
  font-size: 11px; line-height: 1.4; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 왼쪽 메뉴 맨 아래 «도움말»(2026-09-17) — 위 메뉴 목록이 남은 높이를 차지하고, 도움말은 바닥에 붙는다 */
.sidebar-nav.sidebar-nav-bottom { flex: 0 0 auto; border-top: 1px solid var(--clr-border); padding: 4px 0; }

/* 주소록 «쪽지 보내기» 글 칸(2026-09-17) — 캡처 그림을 붙여 넣을 수 있게 contenteditable. 그림은 칸 폭에 맞추고 손잡이로 줄인다 */
.cchat-note-editor { min-height: 110px; max-height: 320px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--clr-border, #DDE1E9);
  border-radius: 6px; background: #fff; font-size: 13px; line-height: 1.6; color: #1A1D27; white-space: pre-wrap; word-break: break-word; outline: none; }
.cchat-note-editor:focus { border-color: #1565C0; }
.cchat-note-editor:empty::before { content: attr(data-placeholder); color: #8C95A8; pointer-events: none; }
.cchat-note-editor img { max-width: 100%; height: auto; vertical-align: bottom; cursor: pointer; }

/* ── 상단 헤더 메뉴(2026-09-17): 관리자 콘솔 테마 «메뉴 위치=상단» 이면 /theme.css 가 .sidebar 를 감추고 이 줄을 켠다 ── */
.top_bar-nav { display: none; align-items: center; justify-content: center; gap: 6px; height: 100%; margin: 0; padding: 0; }
.top_bar-nav-item { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; margin: 0; border-radius: 0; color: inherit; text-decoration: none; opacity: 1; border-bottom: 2px solid transparent; transition: background .12s; }
.top_bar-nav-item svg { width: 24px; height: 24px; display: block; }   /* 크고 선명하게(2026-09-18): 24px · stroke 2 · 흐림 없음 · 모서리 없음 */
.top_bar-nav-item:hover { background: var(--header-hover, rgba(255,255,255,.12)); border-radius: 0; }
.top_bar-nav-item.active { border-bottom-color: currentColor; }
/* 메일 아이콘 배지(2026-09-18): 받은편지함 읽지 않은 메일 수 — topbar-extras.js 가 채우고 0이면 hidden */
.nav-mail-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; box-sizing: border-box; }
.nav-mail-badge[hidden] { display: none !important; }
.sidebar-nav li a { position: relative; }
.sidebar-nav li a .nav-mail-badge { margin-left: auto; }
body.sidebar-collapsed .sidebar-nav li a .nav-mail-badge { position: absolute; top: 4px; right: 6px; margin: 0; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.top_bar-nav-item { position: relative; }
.top_bar-nav-item .nav-mail-badge { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; border-radius: 8px; }
