/* ─── 변수 ──────────────────────────────────────────────────── */
/* 2026-08-26 디자인 리프레시 — 크림 배경 + 코랄 액센트 + 웜다크 사이드바로 전면 리스킨.
   기존 값은 git 이력으로 확인 가능(블루 #2563eb 액센트 / 다크네이비 #0f172a 사이드바 / 순백-연회색 배경).
   2026-09-12 아트디렉션+모션 리프레시 — "장난감 같다"는 피드백으로 크림+필(pill)+캔디컬러
   조합을 걷어내고 중립 배경 + 절제된 코랄 액센트 + 8–12px 라운드 + Inter 기준으로 톤을
   다시 잡았다(시안: /superadmin 밖 별도 아티팩트). 변수 "이름"은 그대로 두고 값만
   교체해, var(--radius)/var(--blue-bg) 등을 쓰는 기존 규칙 전부가 자동으로 새 톤을
   따라가게 했다 — 새 셀렉터를 늘리지 않고 토큰 값만 바꿔 전역에 반영하는 방식.
   --lime/--yellow/--blue/--coral*는 이름(=의미: 우선순위·상태)은 그대로, 채도만 낮췄다. */
:root {
  --sidebar-w: 256px;
  --sidebar-bg: #16171C;
  --sidebar-hover: rgba(255,255,255,.06);
  --sidebar-active: #E1613C;
  --sidebar-text-rgb: 235,235,237; /* 사이드바 텍스트 — 예전엔 크림(246,241,233)에 물들어 있었음 */
  --accent: #E1613C;
  --accent-2: #EFA24E; /* 그라디언트/글로우 전용 보조색 — 배지 등 의미색에는 쓰지 않음 */
  --accent-rgb: 225,97,60; /* rgba(var(--accent-rgb),X)로 쓰는 자리용 — --accent(#E1613C)와 항상 동기화할 것 */
  --accent-hover: #C74F2E;
  --accent-light: #FCEEE8;
  --bg: #F7F7F8;
  --surface: #ffffff;
  --border: #E7E7EA;
  --border-light: #EFEFF1;
  --text: #17181A;
  --text-muted: #6B6D73;
  --text-light: #9A9CA3;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 100px;
  --shadow-xs: 0 1px 2px rgba(15,15,20,.05);
  --shadow: 0 2px 10px rgba(15,15,20,.07);
  --shadow-md: 0 6px 20px rgba(15,15,20,.09);
  --shadow-lg: 0 16px 40px rgba(15,15,20,.14);
  --glow-accent: 0 6px 20px rgba(225,97,60,.28);
  /* 우선순위/상태 배지용 서브 액센트 — 예전 원색(라임/옐로우/블루)을 저채도 톤온톤으로 조정 */
  --lime: #6FA24A;      --lime-bg: #EAF4EC;   --lime-text: #2F6B41;
  --yellow: #C79233;    --yellow-bg: #FBF2E2; --yellow-text: #8A6519;
  --blue: #4F6FBE;      --blue-bg: #EAF0FB;   --blue-text: #35538F;
  --coral-bg: #FBEAEA;  --coral-text: #A23A32;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  --font-accent: 'Newsreader', Georgia, serif; /* 인사말 등 한 곳에만 쓰는 이탤릭 포인트 서체 */
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, monospace;
  --ease-out: cubic-bezier(.16,1,.3,1);     /* 진입 애니메이션 */
  --ease-standard: cubic-bezier(.4,0,.2,1); /* 호버 등 상호작용 전환 */
  --col-todo: #F7F7F8;
  --col-progress: #EEF1FB;
  --col-done: #EAF4EC;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
i{line-height: 100% !important;}
/* ─── 사이드바 ───────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  /*background: var(--sidebar-bg);*/
  background-color: transparent;
  color: #fff;
  display: flex; flex-direction: column;
  z-index: 100;
  transition: width .22s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
/* .sidebar 자체의 overflow:hidden(위 72행, 접힘 애니메이션 중 잠깐 삐져나오는
   내용을 가리는 용도)을 미니 모드에서는 visible로 풀어준다 — 안 풀면 그룹
   플라이아웃(.nav-group-items, position:absolute; left:100%)이 사이드바
   박스 밖으로 나가는 순간 이 overflow:hidden에 잘려 아예 안 보인다.
   .sidebar-nav 자체의 overflow-y:auto(세로 스크롤)는 별개 자식 요소라
   영향 없음. */
.sidebar.collapsed { width: 64px; overflow: visible; }
.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-nav a span,
.sidebar.collapsed .user-info,
.sidebar.collapsed .btn-logout span,
.sidebar.collapsed .nav-notif-badge,
.sidebar.collapsed .sidebar-favorites { display: none; }
.sidebar.collapsed .sidebar-nav a { justify-content: center; padding: 10px; }
.sidebar.collapsed .sidebar-brand { justify-content: center; padding: 20px 0; }

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px; font-size: 1rem; font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.06);
  letter-spacing: -.01em;
  font-family: var(--font-display);
  min-width: 0;
}
.sidebar-brand i { font-size: 1.35rem; color: var(--accent); flex-shrink: 0; }
.sidebar-brand-logo { height: 28px; width: 28px; flex-shrink: 0; object-fit: contain; }

.sidebar-section-label {
  font-size: .65rem; text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,1); padding: 18px 18px 6px;
  font-weight: 600;
}

.sidebar-nav { list-style: none; margin: 0; padding: 0 10px; flex: 1;height: 100%;overflow-y: auto;}
.sidebar-nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,1); text-decoration: none;
  font-size: .875rem; white-space: nowrap; font-weight: 500;
  transition: background .15s, color .15s;
  position: relative;
}
.sidebar-nav li a i { font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar-nav li a:hover { background: var(--sidebar-hover); color: rgba(255,255,255,.95); }
.sidebar-nav li a.active {
  background: rgba(var(--accent-rgb),.25);
  color: #FF9270;
}
.sidebar-nav li a.active i { color: #FF9270; }

.sidebar-bottom {
  padding: 12px 10px 18px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 10px 6px; margin: 0 -6px 0 -6px;
  border-radius: 10px; transition: background .15s;
}
a.sidebar-user:hover { background: rgba(255,255,255,.06); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
}

.sidebar.collapsed .user-avatar{height: auto;width: 100%;aspect-ratio: 1/1;}

.user-name { font-size: .82rem; font-weight: 600; color: #f1f5f9; line-height: 1.2; }
.user-info { min-width: 0; }
[class^="badge-role-"] { font-size: .65rem; color: rgba(255,255,255,.45); }

.btn-logout {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,.5); text-decoration: none;
  font-size: .82rem; transition: background .15s, color .15s;
}
.btn-logout:hover { background: var(--sidebar-hover); color: rgba(255,255,255,.9); }
.sidebar.collapsed .btn-logout{gap: 0;justify-content: center;}
/* ─── 메인 레이아웃 ─────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left .22s cubic-bezier(.4,0,.2,1);
}
.sidebar.collapsed ~ .main-wrapper { margin-left: 64px; }

.topbar {
  height: 58px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 90;
  box-shadow: var(--shadow-xs);
}
.sidebar-toggle {
  display: flex;align-items: center;justify-content: center;
  background: none; border: none; font-size: 1.2rem; color: var(--text-muted);
  cursor: pointer; padding: 6px 8px; border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.sidebar-toggle i{line-height: 100%;}
.sidebar-toggle:hover { background: var(--bg); color: var(--text); }
.topbar-title {
  font-size: .9rem; font-weight: 600; flex: 1;
  display: flex; align-items: center; color: var(--text);
  letter-spacing: -.01em;
  font-family: var(--font-display);
  /* 좁은 화면에서 한글 텍스트가 줄바꿈되며 세로로 한 글자씩 쌓이는
     현상 방지 — flex item의 기본 min-width:auto(내용 기반 최소폭)를
     0으로 낮춤(실제 말줄임 처리는 .topbar-title-inner가 담당, 아래 참고). */
  min-width: 0;
}
/* ⚠️ text-overflow:ellipsis는 CSS 사양상 flex 컨테이너 자신에는 적용되지
   않는다(block 컨테이너 전용) — 위 .topbar-title이 display:flex라 그
   자리에 overflow:hidden+text-overflow:ellipsis를 직접 걸면 자르기는
   되어도 "..."는 안 나타나는 실제 사고로 이어졌다(2026-09-18 발견, 모바일
   실측 캡처). 실제 텍스트/브레드크럼(카드 상세의 "프로젝트 / 카드명"처럼
   링크+구분자가 섞인 페이지도 있음, §templates/base.html 참고)을 감싸는
   이 안쪽 span에서만 자르기+말줄임을 담당한다. */
.topbar-title-inner {
  display: block; min-width: 0; max-width: 100%;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.topbar-actions {
  display: flex; align-items: center; gap: 10px;
 /* display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; max-width: 60%;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;*/
}
.topbar-actions::-webkit-scrollbar { display: none; }
.topbar-actions .btn { white-space: nowrap; flex-shrink: 0; }

/* ─── 검색박스 ───────────────────────────────────────────────── */
.search-box {
  position: relative; display: flex; align-items: center;
}
.search-box .search-icon {
  position: absolute; left: 10px; color: var(--text-light);
  font-size: .85rem; pointer-events: none;
}
.search-box input {
  padding: 7px 30px 7px 32px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .82rem; outline: none; width: 200px;
  background: var(--bg); color: var(--text);
  transition: border-color .15s, box-shadow .15s, width .2s;
}
.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.1);
  background: #fff; width: 260px;
}
.search-box input::placeholder { color: #343434; }
.search-box .search-clear {
  position: absolute; right: 8px; background: none; border: none;
  color: var(--text-muted); cursor: pointer; font-size: .8rem;
  padding: 2px 4px; border-radius: 4px; display: none;
}
.search-box .search-clear:hover { color: var(--text); }

.search-empty {
  text-align: center; padding: 40px 20px;
  color: var(--text-muted); display: none;
}
.search-empty i { font-size: 2rem; opacity: .3; display: block; margin-bottom: 8px; }

.main-content { padding: 28px 24px; flex: 1; }

/* ─── 로그인 페이지 ─────────────────────────────────────────── */
/* 2026-08-26 디자인 리프레시 — 다크 글래스 카드(네이비+블루 글로우)에서
   크림 배경 + 화이트 카드 + 3색(코랄/라임/블루) 은은한 글로우로 전환. */
.login-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow-y: auto; overflow-x: hidden;
  padding: 32px 0; /* 뷰포트보다 긴 폼(회원가입류)이 카드 상/하단이 잘리지 않게
                      위아래 여백을 확보 — 아래 .login-container margin:auto와
                      함께 짧은 폼은 그대로 중앙정렬, 긴 폼은 위에서부터 자연스럽게
                      스크롤되도록 한다. */
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle 320px at 88% -6%, rgba(var(--accent-rgb),.20) 0%, transparent 70%),
    radial-gradient(circle 260px at 6% 104%, rgba(188,226,90,.22) 0%, transparent 70%),
    radial-gradient(circle 200px at 82% 88%, rgba(94,130,236,.14) 0%, transparent 70%);
  pointer-events: none;
}
.login-container { width: 100%; max-width: 400px; padding: 20px; position: relative; z-index: 1; margin: auto; }
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px; padding: 44px 40px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  font-size: 2.2rem; color: var(--accent); text-align: center; margin-bottom: 10px;
  display: flex; justify-content: center;
}
.login-logo img{display: block;width: auto;height: 40px;max-width: 100%;}  /* 가로형 워드마크(iruwork_wordmark.png, 약 5.6:1) — 카드 안쪽 폭 약 280px 안에 들어가게 */
.login-title {
  text-align: center; font-size: 1.4rem; font-weight: 700;
  margin-bottom: 4px; color: var(--text);
  font-family: var(--font-display); letter-spacing: -.02em;
}
.login-subtitle {
  text-align: center; color: var(--text-muted); font-size: .85rem; margin-bottom: 28px;
}
.login-card .form-floating input {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text); border-radius: var(--radius-sm);
}
.login-card .form-floating input:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.14);
  color: var(--text);
}
.login-card .form-floating label { color: var(--text-light); }
.login-card .form-floating input:focus ~ label,
.login-card .form-floating input:not(:placeholder-shown) ~ label { color: var(--text-muted); }
.login-card .form-floating input::placeholder { color: transparent; }
.btn-login {
  padding: 12px; font-size: .95rem; font-weight: 700;
  border-radius: var(--radius-pill);
  background: var(--accent); border-color: var(--accent);
  font-family: var(--font-display);
  box-shadow: var(--glow-accent);
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn-login:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(var(--accent-rgb),.4); }

/* ─── 데이터 테이블 카드 ─────────────────────────────────────── */
.data-table-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  border: 1px solid var(--border);
}
.data-table-card .table { margin: 0; }
.data-table-card .table thead th {
  background: var(--bg); font-size: .75rem;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
  border-bottom: 1px solid var(--border); padding: 12px 18px;
}
.data-table-card .table td {
  padding: 13px 18px; vertical-align: middle; border-color: var(--border-light);
}
.data-table-card .table tbody tr:hover { background: #fafbfc; }

.avatar-sm {
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  background: var(--accent-light); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; flex-shrink: 0;
}

/* ─── 빈 상태 ───────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 80px 20px; color: var(--text-muted);
}
.empty-state i { font-size: 2.8rem; margin-bottom: 16px; opacity: .3; display: block; }
.empty-state h4 { font-size: 1rem; margin-bottom: 6px; color: var(--text); font-weight: 600; }
.empty-state p { font-size: .85rem; color: var(--text-muted); }

/* ─── 칸반 보드 (공통) ──────────────────────────────────────── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 960px) {
  .kanban-board { grid-template-columns: 1fr; }
}

.kanban-col {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 340px;
}

.kanban-col-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.col-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-todo        { background: var(--text-light); }
.dot-in-progress { background: var(--blue); }
.dot-done        { background: var(--lime); }
.col-title { font-weight: 700; font-size: .9rem; flex: 1; letter-spacing: .01em; }
.col-count {
  background: var(--border); color: var(--text-muted);
  font-size: .75rem; font-weight: 700;
  padding: 2px 7px; border-radius: var(--radius-sm); line-height: 1.5;
}

.kanban-cards {
  display: flex; flex-direction: column; gap: 0; flex: 1;
  padding: 10px;
}

/* ─── 칸반 카드 (공통) ──────────────────────────────────────── */
.kanban-card {
  background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: box-shadow .18s, transform .18s, border-color .18s;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex; align-items: stretch;
}
.kanban-card:last-child { margin-bottom: 0; }
.kanban-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #cbd5e1;
}
.kanban-card-inner { padding: 13px 14px; flex: 1; min-width: 0; }

/* 카드 좌측 드래그 핸들 — 이 영역을 잡고 드래그할 때만 순서/상태 변경이 동작한다.
   (예전엔 카드 전체가 드래그 대상이라 모바일에서 스크롤하려다 카드가 자꾸 옮겨짐) */
.kc-drag-handle {
  flex-shrink: 0; width: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: grab;
  touch-action: none; /* 모바일 세로 스크롤 제스처와 드래그 시작 제스처가 충돌하지 않도록 */
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  transition: background .15s, color .15s;
}
.kc-drag-handle:hover  { background: var(--bg); color: var(--text); }
.kc-drag-handle:active { cursor: grabbing; }
.kc-drag-handle i { font-size: 1rem; }

.kc-top {
  display: flex; align-items: flex-start;align-items: center;
  justify-content: left; margin-bottom: 6px;gap: 5px;
}
.kc-title {
  display: block; font-size: .87rem; font-weight: 600;
  color: var(--text); text-decoration: none; line-height: 1.45;
  margin-bottom: 0;
  transition: 0.2s;
}
.kanban-card:hover .kc-title { color: var(--accent); }
.kc-footer {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .75rem; color: var(--text-muted); margin-top: 8px;
}

.kc-actions { opacity: 0; transition: opacity .15s; display: flex; gap: 2px; }
.kanban-card:hover .kc-actions { opacity: 1; }

.btn-icon {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 4px 6px; border-radius: 6px; font-size: .85rem;
  transition: background .15s, color .15s;
}
.btn-icon:hover { background: var(--bg); color: var(--text); }

.btn-icon-xs {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 0px 5px; border-radius: 5px; font-size: .82rem;
  transition: background .15s, color .15s;
  line-height: 1;
  display: flex;align-items: center;justify-content: center;
}
.btn-icon-xs:hover { background: var(--bg); color: var(--text); }
.btn-icon-xs.text-danger:hover { background: #fef2f2; color: #dc2626; }

/* main.js fileIcon()의 확장 매핑(음악/영상/코드/일반텍스트, 2026-09-04
   "자료실" 미리보기 확장과 함께 신설)이 쓰는 색상 — 새 색을 지어내지 않고
   기존 브랜드 서브 액센트(--blue/-text, --yellow/-text)와 violet(다른
   화면의 KPI 아이콘에도 이미 쓰는 색, §CLAUDE.md "디자인 시스템" 참고)만
   재사용한다. attachmentItemHtml() 등 fileIcon()을 쓰는 다른 화면에도
   자동으로 함께 적용됨(공유 헬퍼이므로 의도된 확산). */
.df-ic-audio { color: var(--blue-text); }
.df-ic-video { color: #7c3aed; }
.df-ic-code  { color: var(--blue); }
.df-ic-text  { color: var(--text-muted); }

.btn-add-card {
  background: none; border: none;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding: 10px 16px; font-size: .8rem;
  cursor: pointer; width: 100%; text-align: left;
  transition: background .15s, color .15s;
  display: flex; align-items: center; gap: 6px;
}
.btn-add-card:hover { background: var(--accent-light); color: var(--accent); }
.btn-add-card i { font-size: .9rem; }

/* ─── 칸반 컬럼 페이징 ("더 보기") ──────────────────────────── */
.kc-page-hidden { display: none !important; }
.kc-load-more {
  background: none; border: none;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  padding: 9px 16px; font-size: .78rem;
  cursor: pointer; width: 100%; text-align: center;
  transition: background .15s, color .15s;
  display: none; align-items: center; justify-content: center; gap: 5px;
}
.kc-load-more:hover { background: var(--bg); color: var(--accent); }
.kc-load-more i { font-size: .8rem; }

/* ─── 프로젝트 목록 보드 ────────────────────────────────────── */
.project-icon-sm {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.proj-desc {
  font-size: .8rem; color: var(--text-muted);
  margin: 5px 0 0; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.proj-col-empty {
  text-align: center; padding: 32px 12px;
  font-size: .82rem; color: var(--text-light);
}
.proj-col-empty i { display: block; font-size: 1.6rem; margin-bottom: 8px; opacity: .35; }
.badge-admin-only {
  display: flex;align-items: center;justify-content: center;
  background: #fffbeb; color: #b45309; border: 1px solid #fde68a;
  border-radius: 4px; padding: 4px; font-size: .68rem;
}
/* "개발 업무" 배지 — GitLab 브랜드 오렌지. 연동된 프로젝트면 <a>(새 탭
   링크), 아직 GitLab 프로젝트를 안 골랐으면 <span>(그냥 표시)로 렌더링돼
   태그가 다를 수 있어 text-decoration/color를 명시적으로 고정해둔다. */
.badge-gitlab {
  display: flex;align-items: center;justify-content: center;
  background: #fef1ec; color: #e2432a; border: 1px solid #fbcfc0;
  border-radius: 4px;font-size: 0.9rem;
  text-decoration: none;
  width: 26px;height: 26px;
}
.badge-gitlab:hover { color: #e2432a; background: #fce2d9; }

/* "AI 개발 진행 중" 배지(2026-09-05 신설) — dev_runner.list_running_ai_dev()
   기준(dev_project_versions.status='pending')으로 지금 이 프로젝트에서 AI
   개발이 돌아가는 중일 때만 보인다. "진행중" 상태(--blue 계열)와 같은
   팔레트를 재사용해 별도 색을 새로 만들지 않는다. */
.badge-dev-running {
  display: flex;align-items: center;justify-content: center;
  background: var(--blue-bg); color: var(--blue-text); border: 1px solid #C9D3F5;
  border-radius: 4px;font-size: 0.9rem;
  width: 26px;height: 26px;
}

/* ─── 배지 ──────────────────────────────────────────────────── */
/* 2026-09-13 — 칸반 카드 등 여러 화면에서 "필채움 배지" 여러 개가 나란히
   놓이면 시각적으로 무거워 보인다는 피드백(레퍼런스 디자인은 점(dot)+텍스트만
   쓰고 배경 채움이 없음)으로 채움/테두리를 걷어내고 점+색 텍스트만 남겼다.
   점 자체는 아래 .priority-badge::before(2026-09-01 추가분)가 이미 그려주므로
   마크업 변경 없이 색상 배정만 바뀐다. */
.priority-badge {
  display: inline-flex; align-items: center;
  padding: 0; border-radius: 0; background: none; border: none;
  font-size: .78rem; font-weight: 600; letter-spacing: 0;
}
.priority-low    { color: var(--lime-text); }
.priority-medium { color: var(--yellow-text); }
.priority-high   { color: var(--coral-text); }

.status-badge-inline {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--radius-sm);
  font-size: .78rem; font-weight: 600;
}
.status-todo        { background: var(--border-light); color: var(--text-muted); border: 1px solid var(--border); }
.status-in_progress { background: var(--blue-bg); color: var(--blue-text); border: 1px solid #C9D3F5; }
.status-done        { background: var(--lime-bg); color: var(--lime-text); border: 1px solid #D8E6B8; }

/* ─── 카테고리 ──────────────────────────────────────────────── */
.category-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 5px; flex-shrink: 0;
}
.category-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--radius-sm);
  font-size: .7rem; font-weight: 600;
}
.category-filter-row {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.category-chip {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  transition: all .12s;
}
.category-chip:hover { border-color: var(--accent); color: var(--text); }
.category-chip.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.category-chip.active .category-dot { box-shadow: 0 0 0 1px #fff; }

.category-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 4px; border-bottom: 1px solid var(--border-light);
}
.category-row:last-child { border-bottom: none; }
.category-drag-handle {
  cursor: grab; color: var(--text-muted); flex-shrink: 0;
  padding: 0 2px; font-size: .9rem; line-height: 1;
}
.category-drag-handle:active { cursor: grabbing; }
.category-swatch {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
}
.category-row-name { flex: 1; font-size: .87rem; }

.category-color-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.color-swatch-opt {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: transform .1s;
}
.color-swatch-opt:hover { transform: scale(1.1); }
.color-swatch-opt.selected { border-color: var(--text); box-shadow: 0 0 0 2px #fff inset; }

.access-picker-box {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  max-height: 220px; overflow-y: auto;
}
.access-picker-label { font-size: .75rem; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.access-picker-list { display: flex; flex-direction: column; gap: 2px; }
.access-picker-item { display: flex; align-items: center; gap: 6px; font-size: .85rem; cursor: pointer; padding: 2px 0; }
.access-picker-item input { margin: 0; }

.category-chip-pending { display: flex; flex-wrap: wrap; gap: 6px; }
.category-chip-editable {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px 3px 10px; border-radius: var(--radius-sm);
  font-size: .78rem; font-weight: 500;
  background: var(--surface-2, #f1f5f9); border: 1px solid var(--border);
  color: var(--text);
}
.category-chip-editable i { cursor: pointer; font-size: .85rem; color: var(--text-muted); }
.category-chip-editable i:hover { color: var(--text); }

/* ─── 업무: 프로젝트 카테고리 그룹 (필터 칩 / 관리 모달 공용, 기본 접힘) ──
   카테고리 레이블 자체를 category-chip과 동일한 가로 칩으로 만들어 "전체"
   옆에 나란히 줄바꿈 배치(세로로 한 줄씩 쌓이는 리스트보다 가독성이 낫고
   차지하는 세로 공간도 훨씬 작음). 클릭한 칩과 같은 data-group-idx를 가진
   프로젝트 칩/스위치 목록만 그 아래 별도 줄에 펼쳐진다. ── */
.task-filter-groups { display: flex; flex-direction: column; gap: 6px; }
.task-filter-group-toggle.active {
  background: var(--surface-2, #f1f5f9); border-color: var(--accent); color: var(--text);
}
.task-filter-chevron { transition: transform .15s; font-size: .65rem; flex-shrink: 0; }
.task-filter-chevron.rotated { transform: rotate(180deg); }
.task-filter-group-count {
  font-size: .7rem; opacity: .75;
}
.task-filter-group-items.collapsed,
.task-manage-group-items.collapsed {
  display: none;
}
.task-filter-group-items {
  padding: 8px 10px; background: var(--surface-2, #f1f5f9);
  border-radius: 10px;
}
.task-manage-group-items {
  padding: 2px 10px 8px; margin-bottom: 6px;
  background: var(--surface-2, #f1f5f9); border-radius: 10px;
}

/* ─── 카드 상세 ─────────────────────────────────────────────── */
.card-detail-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 16px;
  align-items: start;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .card-detail-layout { grid-template-columns: 1fr; }
}
/* grid/flex 아이템의 기본 min-width는 auto(=콘텐츠 크기) — CKEditor
   툴바처럼 내부 콘텐츠의 최소 폭이 넓은 요소가 들어있으면 이 기본값 때문에
   그리드 트랙 자체가 뷰포트보다 넓어져 모바일에서 페이지 전체가 가로로
   밀려나며 레이아웃이 깨진다(그리드가 1열로 바뀌는 768px 이하에서도 동일).
   grid/flex 아이템에 min-width:0을 명시해 뷰포트 폭 안으로 실제로
   줄어들 수 있게 한다. */
.card-detail-main, .card-detail-side { min-width: 0; }

.card-detail-box {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
  border: 1px solid var(--border);
}
.card-detail-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 16px; letter-spacing: -.01em; }
.card-detail-content { font-size: .9rem; line-height: 1.8; color: #374151; }

/* 저장된 콘텐츠 렌더링 (뷰 모드) — 클래스명은 Quill 시절 이름 그대로지만
   지금은 CKEditor 5가 만든 HTML을 그대로 보여주는 용도로도 같이 쓴다 */
.ql-content { font-size: .9rem; line-height: 1.8; color: #374151; }
.ql-content p { margin-bottom: .4rem; }
.ql-content h1 { font-size: 1.5rem; font-weight: 700; margin: 1rem 0 .5rem; }
.ql-content h2 { font-size: 1.25rem; font-weight: 700; margin: .9rem 0 .4rem; }
.ql-content h3 { font-size: 1.05rem; font-weight: 700; margin: .8rem 0 .3rem; }
.ql-content ul, .ql-content ol { padding-left: 1.5rem; margin-bottom: .5rem; }
.ql-content li { margin-bottom: .2rem; }
.ql-content blockquote { border-left: 4px solid #e2e8f0; padding: .3rem .8rem; color: #64748b; margin: .5rem 0; }
.ql-content pre { background: #1e293b; color: #e2e8f0; border-radius: 6px; padding: .8rem 1rem; font-size: .82rem; overflow-x: auto; margin: .5rem 0; }
.ql-content code { background: #f1f5f9; color: #d63384; padding: .1em .35em; border-radius: 3px; font-size: .85em; }
.ql-content a { color: var(--accent); text-decoration: underline; }
.ql-content strong { font-weight: 700; }
.ql-content em { font-style: italic; }
.ql-content s { text-decoration: line-through; }
.ql-content img { max-width: 100%; height: auto; border-radius: 4px; margin: .3rem 0; }
.quill-editor-wrap .ql-editor img { max-width: 100%; height: auto; }

/* 저장된 콘텐츠 표 렌더링 (뷰 모드) — 에디터가 Quill이든 CKEditor든
   저장은 항상 순수 HTML이라 뷰 쪽 CSS는 하나로 공유한다 */
.ql-content table {
  border-collapse: collapse; width: auto; max-width: 100%;
  margin: .5rem 0; table-layout: fixed;
}
.ql-content table td, .ql-content table th {
  border: 1px solid var(--border); padding: 6px 10px;
  vertical-align: top; word-break: break-word;
}
.ql-content table th { background: #f8fafc; font-weight: 700; }
.ql-content { overflow-x: auto; }

/* ─── CKEditor 5 (표 삽입 지원 에디터: 프로젝트 설명·카드 내용) ─── */
/* min-width:0 — 이 wrap 자체도 flex 아이템(.comment-input-area 등) 안에
   놓일 수 있어, 위 .card-detail-main과 같은 이유로 여기도 명시해야 한다.
   ck-toolbar에 overflow-x:auto는 안전장치 — CKEditor 5는 툴바가 넘치면
   기본적으로 ResizeObserver로 버튼을 "..." 안에 그룹핑해 자체적으로
   줄바꿈 없이 폭에 맞추지만, 그 계산이 완료되기 전(또는 실패 시)에도
   페이지 전체가 가로로 밀리지 않도록 wrap 쪽에서 한 번 더 막아준다. */
.ck-editor-wrap { --ck-border-radius: 6px; min-width: 0; max-width: 100%; }
.ck-editor-wrap .ck.ck-editor__main > .ck-editor__editable {
  min-height: 180px; line-height: 1.8; color: #374151; font-size: .9rem;
}
.ck-editor-wrap .ck.ck-toolbar { border-color: var(--border); background: #f8fafc; overflow-x: auto; }
.ck-editor-wrap .ck.ck-editor__editable_inline { border-color: var(--border); }
.ck-editor-wrap .ck-content img { max-width: 100%; height: auto; }
.ck-editor-wrap .ck-content table {
  border-collapse: collapse; width: auto; max-width: 100%; margin: .5rem 0;
}
.ck-editor-wrap .ck-content table td, .ck-editor-wrap .ck-content table th {
  border: 1px solid var(--border); padding: 6px 10px;
}
.ck-comment-wrap .ck.ck-editor__main > .ck-editor__editable { min-height: 80px; }

.card-detail-side { display: flex; flex-direction: column;gap: 16px;}
.side-section {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
  border: 1px solid var(--border);
}
.side-label {
  font-size: .9rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .00em; color: var(--text-muted); margin-bottom: 5px;
}
.side-value { font-size: .87rem; }

/* ─── 댓글 ──────────────────────────────────────────────────── */
.comment-section {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
  border: 1px solid var(--border);
}
.comment-title { font-size: .95rem; font-weight: 700; margin-bottom: 18px; }

.comment-item {
  display: flex; gap: 12px; margin-bottom: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border-light);
}
.comment-item:last-child { border-bottom: none; margin-bottom: 0; }
.comment-avatar {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; margin-bottom: 5px; flex-wrap: wrap; }
.comment-text { font-size: .87rem; line-height: 1.6; color: #374151; white-space: pre-wrap; }
.comment-actions { display: flex; gap: 2px; }
.btn-comment-action {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 2px 5px; border-radius: 4px; font-size: .8rem;
  transition: background .15s, color .15s;
}
.btn-comment-action:hover { background: var(--bg); color: var(--text); }
.btn-comment-action.text-danger:hover { background: #fef2f2; color: #dc2626; }
.comment-input-area { display: flex; align-items: flex-start; gap: 12px; }
/* 부트스트랩 .flex-grow-1은 flex-grow만 줄 뿐 min-width를 안 건드려서
   기본값(auto=콘텐츠 크기)이 그대로 남는다 — 안의 CKEditor 툴바 때문에
   이 아이템이 줄어들지 못하고 .comment-input-area 전체가 뷰포트보다
   넓어지는 게 모바일 댓글창 레이아웃이 깨지던 원인이었다. */
.comment-input-area > .flex-grow-1 { min-width: 0; }

/* ─── 담당자 아바타 ─────────────────────────────────────────── */
.kc-assignees { display: flex; gap: 2px; flex-wrap: wrap; }
.kc-assignee-av {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: .63rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
  cursor: default;
  transition: transform .1s;
}
.kc-assignee-av:hover { transform: scale(1.15); z-index: 1; }

/* ─── MentionInput ──────────────────────────────────────────── */
.mention-box {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; padding: 6px 10px; min-height: 44px;
  cursor: text; position: relative;
  transition: border-color .15s, box-shadow .15s;
}
.mention-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.1);
}
.mention-chips-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; }
.mention-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent-light); color: var(--accent);
  border-radius: var(--radius-sm); padding: 3px 8px 3px 4px;
  font-size: .78rem; font-weight: 600;
}
.chip-av {
  width: 18px; height: 18px; border-radius: 4px;
  background: var(--accent); color: #fff;
  font-size: .62rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.chip-rm {
  background: none; border: none; color: var(--accent);
  font-size: .88rem; line-height: 1; cursor: pointer; padding: 0 2px; opacity: .5;
}
.chip-rm:hover { opacity: 1; }
.mention-input-row { position: relative; }
.mention-field {
  border: none; outline: none; width: 100%;
  font-size: .87rem; background: transparent; padding: 2px 0;
}
.mention-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); z-index: 200; overflow: hidden;
  max-height: 220px; overflow-y: auto;
}
.mention-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; cursor: pointer; font-size: .87rem;
  transition: background .1s;
}
.mention-opt:hover { background: var(--bg); }
.mention-opt-av {
  width: 26px; height: 26px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; flex-shrink: 0;
  font-size: .73rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.mention-dept-row { margin-top: 6px; }
.mention-dept-select {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; padding: 5px 8px; font-size: .8rem; color: var(--text-muted);
  cursor: pointer;
}
.mention-dept-select:focus { outline: none; border-color: var(--accent); }

/* 카드 상세 — 담당자 패널 */
.assignee-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.assignee-item {
  display: inline-flex; align-items: center;
  background: var(--accent-light); color: var(--accent);
  border-radius: 6px; padding: 3px 10px 3px 3px;
  font-size: .8rem; font-weight: 600; gap: 5px;
}
.assignee-item-av {
  width: 20px; height: 20px; border-radius: 4px;
  background: var(--accent); color: #fff;
  font-size: .63rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ─── 첨부파일 ──────────────────────────────────────────────── */
.att-section { margin-top: 16px; }
.att-section-title {
  font-size: .9rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .00em; color: var(--text-muted); margin-bottom: 10px;
  display: flex; align-items: center; gap: 5px;
}
.att-list { display: flex; flex-direction: column; gap: 5px; }
.att-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px;
  font-size: .83rem; transition: background .1s, border-color .1s;
}
.att-item:hover { background: var(--accent-light); border-color: #F2C9B8; }
.att-icon { font-size: 1rem; flex-shrink: 0; }
/* 이미지 첨부파일 썸네일(attachmentItemHtml()) — 카드/댓글 공용 */
.att-thumb {
  width: 28px; height: 28px; border-radius: 5px; object-fit: cover;
  flex-shrink: 0; cursor: zoom-in; background: var(--border-light);
}
.att-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-size { color: var(--text-muted); font-size: .73rem; white-space: nowrap; }

/* 이미지 첨부파일 공용 라이트박스(main.js openImageLightbox()) */
.img-lightbox {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.85); align-items: center; justify-content: center;
  padding: 32px; cursor: zoom-out;
}
.img-lightbox.show { display: flex; }
.img-lightbox img {
  max-width: 100%; max-height: 100%; border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5); object-fit: contain; cursor: default;
}
.img-lightbox-close {
  position: fixed; top: 20px; right: 24px; width: 40px; height: 40px;
  border-radius: 50%; border: none; background: rgba(255,255,255,.15);
  color: #fff; font-size: 1.1rem; display: flex; align-items: center;
  justify-content: center; cursor: pointer;
}
.img-lightbox-close:hover { background: rgba(255,255,255,.28); }

/* 이미지가 아니면서 미리보기 가능한 첨부 아이콘/이름(main.js attachmentItemHtml(),
   cards/detail.html attachment_item 매크로) — 클릭 가능함을 시각적으로 암시 */
.att-icon-preview, .att-name-preview { cursor: pointer; }
.att-icon-preview:hover { color: var(--accent) !important; }
.att-name-preview:hover { color: var(--accent); text-decoration: underline; }

/* ── 공용 첨부파일 미리보기 모달(#modalAttPreview, static/js/main.js
   AttPreview, 2026-09-07 신설) — datafiles/index.html의 #modalDfPreview
   크기·스타일 규칙을 그대로 옮겨온 것(ap- 접두사로만 스코프 분리).
   ⚠️ 이 앱 전역 규칙 `.modal-dialog{width:100%;height:100%;display:flex;
   justify-content:center;align-items:center}`가 화면을 꽉 채운 뒤 그 안의
   `.modal-content{max-width:480px}`를 flex로 가운데 정렬하는 구조라, 크기는
   반드시 `.modal-content` 쪽에 ID로 좁혀 override할 것(datafiles/index.html
   동일 주석 참고 — `.modal-dialog`에 주면 정렬 기준을 잃어 왼쪽으로 붙는다). */
#modalAttPreview .modal-content { max-width: min(1400px, 96vw) !important; }
#modalAttPreview.ap-preview-md .modal-content { max-width: min(920px, 94vw) !important; }
#modalAttPreview.ap-preview-lg .modal-content { max-width: min(1140px, 95vw) !important; }
#modalAttPreview.ap-preview-sm .modal-content { max-width: min(560px, 92vw) !important; height: auto !important; }
#modalAttPreview.ap-preview-sm .modal-body { height: auto !important; overflow-y: visible; }
#modalAttPreview.ap-preview-fs .modal-content { max-width: 98vw !important; height: 94vh !important; }
#modalAttPreview.ap-preview-fs .modal-body { padding: 0; }
#modalAttPreview.ap-preview-fs .ap-preview-frame { height: 100%; border-radius: 0; }

.ap-preview-img { max-width:100%; max-height:78vh; display:block; margin:0 auto; border-radius:8px; }
.ap-preview-frame { width:100%; height:80vh; border:0; }
.ap-preview-media { max-width:100%; max-height:76vh; display:block; margin:0 auto; }

.ap-audio-player { display:flex; flex-direction:column; align-items:center; gap:16px; padding: 28px 10px 12px; }
.ap-audio-ic {
  width:84px; height:84px; border-radius:50%; background: var(--accent-light); color: var(--accent);
  display:flex; align-items:center; justify-content:center; font-size:2.1rem; flex-shrink:0;
}
.ap-audio-name { font-weight:700; color: var(--text); text-align:center; word-break:break-all; padding:0 10px; }
.ap-audio-player audio { width:100%; }

.ap-preview-text { white-space:pre-wrap; word-break:break-all; overflow-wrap:anywhere; max-height:78vh; overflow-y:auto;
                    background: var(--bg); border:1px solid var(--border); border-radius:8px; padding:14px; margin:0;
                    font-family: var(--font-mono); font-size:.85rem; }

/* CodeMirror 다크 테마(구문강조 없이 평문 표시용) — datafiles/index.html
   cm-s-iruwork-dark와 완전히 동일한 색상 규칙(전역에 이미 있는 팔레트
   재사용, 새 색을 지어내지 않음). 여기 텍스트 미리보기는 항상 평문(모드
   미지정)이라 키워드/문자열 등 토큰 색상 규칙은 옮기지 않고 배경·줄번호·
   선택영역처럼 모드와 무관한 부분만 가져온다. */
.cm-ap-preview.CodeMirror {
  width:100%; height:78vh !important; border-radius:8px; font-family: var(--font-mono); font-size:.85rem;
  background:var(--sidebar-bg); color:#E7E1D5;
}
.cm-ap-preview .CodeMirror-gutters { background:var(--sidebar-bg); border-right:1px solid rgba(231,225,213,.12); }
.cm-ap-preview .CodeMirror-linenumber { color:rgba(231,225,213,.35); }
.cm-ap-preview .CodeMirror-cursor { border-left:1px solid #E7E1D5; }
.cm-ap-preview div.CodeMirror-selected { background:rgba(var(--accent-rgb),.28); }

/* xlsx 그리드 뷰어(SheetJS) — datafiles/index.html df-xlsx-*와 동일 규칙 */
.ap-xlsx-tabs { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:8px; }
.ap-xlsx-tab { border:1px solid var(--border); background:var(--surface); border-radius:8px; padding:4px 12px;
               font-size:.82rem; cursor:pointer; color:var(--text-muted); }
.ap-xlsx-tab.active { background:var(--accent); border-color:var(--accent); color:#fff; }
.ap-xlsx-wrap { max-height:78vh; overflow:auto; border:1px solid var(--border); border-radius:8px; }
.ap-xlsx-wrap table { border-collapse:collapse; font-size:.82rem; white-space:nowrap; }
.ap-xlsx-wrap table td, .ap-xlsx-wrap table th { border:1px solid var(--border-light); padding:4px 10px; }
.ap-xlsx-wrap table tr:nth-child(odd) { background:var(--bg); }

.file-preview-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 3px 10px; font-size: .75rem; margin: 2px;
}
.file-upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; cursor: pointer; text-align: center;
  font-size: .83rem; color: var(--text-muted);
  transition: border-color .15s, background .15s, color .15s;
  position: relative;
}

.file-upload-area:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.file-upload-area input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}

/* ─── 파일 업로드 진행률 바 (uploadFiles()의 onProgress + showUploadProgress()) ── */
.upload-progress { margin: 6px 0 2px; }
.upload-progress-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .75rem; color: var(--text-muted); margin-bottom: 4px;
}
.upload-progress-pct { font-weight: 600; color: var(--accent); flex-shrink: 0; margin-left: 8px; }
.upload-progress-track {
  height: 6px; border-radius: 4px; background: var(--border-light);
  overflow: hidden;
}
.upload-progress-bar {
  height: 100%; border-radius: 4px; background: var(--accent);
  transition: width .15s ease;
}
/* 댓글 첨부파일 — .att-list(카드 첨부와 동일한 세로 목록, attachment_item
   매크로/attachmentItemHtml() 공용 마크업)에 이 클래스를 함께 붙여 위쪽
   여백만 추가로 준다. */
.comment-attachments { margin-top: 6px; }

/* 댓글에서 담당자로 지정(멘션)한 사용자 배지 */
.comment-mentions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
  margin-top: 4px; margin-bottom: 4px;
  font-size: .78rem; color: var(--text-muted);
}
.comment-mention-chip {
  display: inline-flex; align-items: center;
  background: var(--accent-light); color: var(--accent);
  border-radius: var(--radius-sm); padding: 2px 8px;
  font-size: .76rem; font-weight: 600;
}

/* ─── 마이페이지/가이드/로그아웃 아이콘(topbar 우측, 2026-09-16 좌측 사이드바에서 이동) ── */
.topbar-usermenu { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

/* ─── 알림 벨 / 드롭다운 ────────────────────────────────────── */
.notif-bell { position: relative; }
.btn-notif {
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; color: var(--text-muted); text-decoration: none;
  position: relative; transition: background .15s, color .15s;
}
.btn-notif:hover { background: var(--bg); color: var(--text); }
.btn-notif.active { background: var(--accent-light); color: var(--accent); }

.notif-badge {
  position: absolute; top: 3px; right: 3px;
  background: #ef4444; color: #fff;
  font-size: .58rem; font-weight: 700; line-height: 1;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
}

.notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 340px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 500; overflow: hidden;
}
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.btn-notif-readall {
  background: none; border: none; font-size: .78rem;
  color: var(--accent); cursor: pointer; padding: 3px 8px;
  border-radius: 5px; transition: background .1s;
}
.btn-notif-readall:hover { background: var(--accent-light); }
.notif-panel-body { max-height: 360px; overflow-y: auto; }
.notif-empty { text-align: center; padding: 28px; color: var(--text-muted); font-size: .83rem; }
.notif-panel-footer {
  border-top: 1px solid var(--border); padding: 10px 16px; text-align: center;
  background: var(--bg);
}
.notif-panel-footer a { font-size: .8rem; color: var(--accent); text-decoration: none; font-weight: 500; }
.notif-panel-footer a:hover { text-decoration: underline; }

/* 알림 아이템 */
.notif-item, .notif-page-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border-light);
  text-decoration: none; color: var(--text);
  transition: background .1s; cursor: pointer;
}
.notif-item:last-child, .notif-page-item:last-child { border-bottom: none; }
.notif-item:hover, .notif-page-item:hover { background: var(--bg); }
.notif-item.unread, .notif-page-item.unread { background: var(--accent-light); }

.notif-icon-wrap {
  width: 34px; height: 34px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
}
.notif-icon-blue   { background: var(--blue-bg); color: var(--blue-text); }
.notif-icon-green  { background: #d1fae5; color: #059669; }
.notif-icon-purple { background: #ede9fe; color: #7c3aed; }
.notif-icon-orange { background: #fef3c7; color: #d97706; }
.notif-icon-red    { background: #fee2e2; color: #dc2626; }

.notif-content { flex: 1; min-width: 0; }
.notif-title {
  font-size: .83rem; font-weight: 600; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notif-msg {
  font-size: .77rem; color: var(--text-muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notif-time  { font-size: .7rem; color: var(--text-light); margin-top: 3px; }
.notif-dot   { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 7px; }

.notif-nav-link { position: relative; }
.nav-notif-badge {
  margin-left: auto; background: #ef4444; color: #fff;
  font-size: .62rem; font-weight: 700;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
}

/* 알림 목록 페이지 */
.notif-page-list { max-width: 700px; }
.notif-date-group {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px;
  border: 1px solid var(--border);
}
.notif-date-label {
  padding: 8px 16px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); background: var(--bg);
  border-bottom: 1px solid var(--border);
}

/* ─── 토스트 ─────────────────────────────────────────────────── */
.toast { border-radius: var(--radius-sm); border: none !important; }

/* ─── 드래그 앤 드롭 ────────────────────────────────────────── */
/* 카드 전체가 아니라 .kc-drag-handle(좌측 핸들)에서만 드래그가 시작된다 — 위 "칸반 카드" 섹션 참고 */
.kanban-card-ghost {
  opacity: .3;
  background: var(--accent-light) !important;
  border: 2px dashed var(--accent) !important;
}
.kanban-card-chosen { cursor: grabbing; box-shadow: var(--shadow-lg) !important; }
.kanban-card-drag   { cursor: grabbing; transform: rotate(1.5deg) !important; box-shadow: var(--shadow-lg) !important; }
.kanban-cards.sortable-over {
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}

/* ─── 프로젝트 그리드 (구형 호환) ──────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.project-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  transition: box-shadow .18s, transform .18s;
}
.project-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.project-card-header { padding: 16px 16px 0; display: flex; align-items: flex-start; justify-content: space-between; }
.project-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; font-weight: 700;
}
.project-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.project-card:hover .project-actions { opacity: 1; }
.project-card-body { padding: 12px 16px; flex: 1; text-decoration: none; color: inherit; display: block; }
.project-name { font-size: .95rem; font-weight: 700; margin-bottom: 5px; color: var(--text); }
.project-desc { font-size: .82rem; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card-footer {
  padding: 10px 16px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: .77rem; color: var(--text-muted); background: var(--bg);
}

/* ─── 캘린더 커스텀 ─────────────────────────────────────────── */
#calendar-wrap {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  border: 1px solid var(--border);
  /* topbar(56px) + 상하 패딩(48px) + 여유(16px) 빼고 남은 높이 */
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}
#fullcalendar {
  flex: 1;
  min-height: 0;
}
.fc-toolbar-title { font-size: 1rem !important; font-weight: 700; letter-spacing: -.01em; }
.fc-button { font-size: .8rem !important; border-radius: 6px !important; }
.fc-button-primary { background-color: var(--accent) !important; border-color: var(--accent) !important; }
.fc-button-primary:not(:disabled).fc-button-active,
.fc-button-primary:not(:disabled):active {
  background-color: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
}
.fc-event { cursor: pointer; font-size: .72rem !important; border-radius: 5px !important; }
.fc-event-title { font-weight: 600; }
.fc-daygrid-event { border-radius: 5px !important; }
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; transition: transform .12s, border-color .12s;
}
.color-swatch:hover { transform: scale(1.18); }
.color-swatch.active { border-color: var(--text) !important; transform: scale(1.15); }
.badge-label {
  display: inline-block; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); min-width: 60px;
}
.assignee-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent-light); color: var(--accent);
  border-radius: var(--radius-sm); padding: 3px 10px 3px 5px;
  font-size: .78rem; font-weight: 600;
}
.assignee-av {
  width: 20px; height: 20px; border-radius: 5px;
  background: var(--accent); color: #fff; font-size: .63rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ─── 즐겨찾기 ──────────────────────────────────────────────── */
.fav-star-icon { color: #f59e0b; font-size: .85rem; flex-shrink: 0; width: 20px; text-align: center; }

.btn-fav-proj {
  background: none; border: none; cursor: pointer;
  padding: 3px 5px; border-radius: 5px; font-size: .85rem;
  color: var(--text-light);
  transition: background .15s, color .15s;
  line-height: 1; opacity: 0;
}
.kanban-card:hover .btn-fav-proj { opacity: 1; }
.btn-fav-proj:hover { background: var(--bg); color: #f59e0b; }
.btn-fav-proj.fav-active { color: #f59e0b; opacity: 1; }
.btn-fav-proj.fav-active:hover { background: #fef3c7; }

/* 사이드바 즐겨찾기 섹션 레이블 */
.fav-section-label {
  display: flex; align-items: center; justify-content: space-between;
  padding-right: 10px;
}
.btn-fav-add-group {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.35); font-size: .9rem;
  padding: 2px 4px; border-radius: 4px;
  transition: background .15s, color .15s; line-height: 1;
}
.btn-fav-add-group:hover { background: var(--sidebar-hover); color: rgba(255,255,255,.85); }

/* 즐겨찾기 그룹 컨테이너 */
.sidebar-fav-wrap { padding: 0 10px 6px; }

/* 그룹 헤더 */
.fav-group { margin-bottom: 2px; }
.fav-group-header {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 8px; border-radius: var(--radius-sm);
  user-select: none;
  transition: background .12s;
}
.fav-group-header:hover { background: var(--sidebar-hover); }
.fav-group-header:hover .fav-group-actions { opacity: 1; }

.fav-group-drag-handle {
  color: rgba(255,255,255,.25); font-size: .8rem; cursor: grab;
  flex-shrink: 0; padding: 1px 2px; line-height: 1;
  transition: color .12s;
}
.fav-group-drag-handle:hover { color: rgba(255,255,255,.6); }
.fav-group-drag-handle:active { cursor: grabbing; }

.fav-group-toggle {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.4); font-size: .7rem; padding: 1px 3px;
  border-radius: 3px; flex-shrink: 0; line-height: 1;
  transition: color .12s;
}
.fav-group-toggle:hover { color: rgba(255,255,255,.8); }
.fav-chevron { transition: transform .2s; display: block; }
.fav-chevron.rotated { transform: rotate(-90deg); }

.fav-folder-icon { color: #f59e0b; font-size: .9rem; flex-shrink: 0; }
.fav-group-name {
  flex: 1; font-size: .8rem; font-weight: 600;
  color: rgba(255,255,255,.75); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.fav-group-actions {
  display: flex; gap: 1px; opacity: 0; transition: opacity .15s; flex-shrink: 0;
}
.btn-fav-icon {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.35); font-size: .75rem;
  padding: 2px 4px; border-radius: 4px;
  transition: background .12s, color .12s; line-height: 1;
}
.btn-fav-icon:hover { background: var(--sidebar-hover); color: rgba(255,255,255,.85); }
.btn-fav-icon.text-danger:hover { background: rgba(220,38,38,.2); color: #f87171; }

/* 그룹 내 항목 리스트 */
.fav-group-items { padding: 0 0 0 16px !important; }
.fav-group-items.collapsed { display: none; }

/* ungrouped 즐겨찾기 */
.fav-ungrouped { padding: 0 !important; }

/* 메인 메뉴 그룹핑(2026-09-09 신설) — 위 .fav-group 계열과 완전히 동일한
   시각/동작 패턴을 그대로 복제(재활용 원칙, §CLAUDE.md "프로젝트 관리" 참고).
   클래스만 .nav-group*으로 분리해 즐겨찾기 그룹과 섞이지 않게 한다. */
.nav-group { margin-bottom: 2px; }
.nav-group-header {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 8px; border-radius: var(--radius-sm);
  user-select: none; cursor: pointer;
  transition: background .12s;
}
.nav-group-header:hover { background: var(--sidebar-hover); }
.nav-group-toggle {
  background: none; border: none; cursor: pointer;
  color: rgba(var(--sidebar-text-rgb),.8); font-size: .7rem; padding: 1px 3px;
  border-radius: 3px; flex-shrink: 0; line-height: 1; width: auto; height: 26px;
  display: flex; align-items: center; justify-content: center;
}
.nav-chevron { transition: transform .2s; display: block; transform-origin: center center; }
.nav-chevron.rotated { transform: rotate(-90deg); }
.nav-group-icon { color: rgba(var(--sidebar-text-rgb),.7); font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; }
.nav-group-name {
  flex: 1; font-size: .85rem; font-weight: 500;
  color: rgba(var(--sidebar-text-rgb),1); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
/* 하위 항목은 일반 메뉴(.sidebar-nav li a, 위 2014행 부근)와 완전히 동일한
   폰트 크기·굵기·색을 쓴다 — 그룹으로 묶였다고 글자가 작아 보이면 안 된다는
   피드백(2026-09-09)으로, 즐겨찾기의 축소된 하위 항목 크기(.8rem)를 그대로
   가져다 썼던 걸 수정. 들여쓰기(하위 항목이라는 시각적 구분)만 유지. */
.nav-group-items { padding: 0 0 0 16px !important; }
.nav-group-items.collapsed { display: none; }
.nav-group-items a {
  font-size: .85rem !important; gap: 15px !important;
  color: rgba(var(--sidebar-text-rgb),1) !important; font-weight: 400 !important;
}
.nav-group-items a i { font-size: 1rem !important; }
/* 그룹 안에 지금 활성(active) 메뉴가 있으면 항상 자동으로 펼쳐진 상태로
   렌더링(서버 사이드에서 has_active 클래스를 준다) — "지금 이 페이지인데
   메뉴가 접혀 안 보인다"는 혼란을 막는다. */
.nav-group-items.has-active { display: block; }

/* 사이드바 축소 모드(64px 아이콘 전용, .sidebar.collapsed)에서는 그룹을
   "2단계"로 보여준다 — 1단계는 그룹 아이콘 한 줄(폴더명 텍스트·화살표는
   숨김), 2단계는 그 아이콘을 클릭하면(.nav-group.flyout-open, base.html
   인라인 스크립트 참고) 하위 항목 전체를 라벨과 함께 보여주는 플라이아웃
   패널이 뜬다. 예전엔 헤더를 아예 숨기고 하위 항목을 강제로 펼쳐 아이콘만
   평평하게 나열했는데(그룹 구분이 전혀 안 보임), 이 방식으로 교체했다.
   ⚠️ position:fixed + top/left는 JS가 열 때마다 아이콘 위치 기준으로
   인라인 스타일로 계산해 넣는다(base.html의 positionNavGroupFlyout() 참고) —
   position:absolute(사이드바 기준 상대좌표)로 시도했다가 상위 `#sidebarMainNav`
   (.sidebar-nav)가 세로 스크롤용 overflow-y:auto를 갖고 있어서(스펙상 이럴
   때 overflow-x도 자동으로 clip 처리됨) 가로로 삐져나오는 플라이아웃이
   통째로 잘려 안 보이는 문제를 실제로 겪었다 — fixed는 뷰포트 기준이라
   조상의 overflow와 무관하게 항상 온전히 그려진다. 그래서 마우스 호버로
   여는 방식도 포기했다(호버마다 위치를 다시 계산하려면 JS 리스너가 필요해
   클릭 토글과 사실상 같은 복잡도이므로, 클릭 하나로 통일). */
.sidebar.collapsed .nav-group-header { justify-content: center; padding: 10px; }
.sidebar.collapsed .nav-group-name,
.sidebar.collapsed .nav-group-toggle { display: none; }
.sidebar.collapsed .nav-group-items {
  display: none !important; position: fixed;
  width: max-content; min-width: 190px; max-width: 240px;
  /* .nav-group-items는 .sidebar-nav 클래스도 함께 갖고 있어(height:100%;
     flex:1;overflow-y:auto, 세로 스크롤 메뉴 컬럼 전용 속성) 그대로 두면
     플라이아웃 높이가 한 줄로 찌그러진다 — 명시적으로 걷어냄. */
  height: auto !important; max-height: 70vh; flex: none !important; overflow-y: auto !important;
  padding: 6px !important; margin: 0;
  background: var(--sidebar-bg); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 210;
}
.sidebar.collapsed .nav-group.flyout-open .nav-group-items { display: block !important; }
/* 플라이아웃(2단계) 안의 항목은 1단계 아이콘 레일과 달리 라벨 텍스트를
   함께 보여준다 — 위 82행 부근 .sidebar.collapsed .sidebar-nav a span
   (전체 아이콘 전용 모드의 텍스트 숨김)이 .nav-group-items도 .sidebar-nav
   클래스를 갖고 있어 그대로 적용돼버려 라벨이 안 보이던 걸 여기서 되살린다.
   가운데 정렬(아이콘 전용 레이아웃)도 좌측 정렬로 되돌림. */
.sidebar.collapsed .nav-group-items a {
  justify-content: flex-start; padding: 9px 10px;
}
.sidebar.collapsed .nav-group-items a span { display: block !important; }

/* 인라인 이름 수정 input */
.fav-rename-input {
  flex: 1; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  border-radius: 4px; color: #fff; font-size: .8rem; font-weight: 600;
  padding: 1px 6px; outline: none; width: 0; min-width: 0;
}
.fav-rename-input:focus { border-color: var(--accent); background: rgba(255,255,255,.15); }

/* 드래그 ghost / chosen */
.fav-drag-ghost { opacity: .35; background: rgba(var(--accent-rgb),.15) !important; border-radius: var(--radius-sm); }
.fav-drag-chosen { background: rgba(var(--accent-rgb),.12) !important; border-radius: var(--radius-sm); }

/* 사이드바 접힘 시 즐겨찾기 영역 숨김 */
.sidebar.collapsed .sidebar-fav-wrap,
.sidebar.collapsed .fav-section-label { display: none; }

/* ─── 업무 칸반 ─────────────────────────────────────────────── */
.kc-project-tag {
  font-size: .75rem;
  color: var(--text-muted);
  margin: 4px 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-card { cursor: pointer; }
.task-empty-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 32px 0;
  color: var(--text-light);
  font-size: .82rem;
}
.task-empty-col i { font-size: 1.4rem; }

/* ─── 목록 상단 요약 KPI (공용 — 캘린더 cal-kpi/대시보드 dsh-kpi와 동일 톤)
   프로젝트 목록(projects/list.html)·업무 목록(tasks/index.html)에서 공유.
   새 화면에 같은 종류의 요약 바가 필요하면 이 클래스부터 재사용할 것. ── */
.proj-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.proj-kpi { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-xs); transition: box-shadow .15s, transform .15s; }
.proj-kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.proj-kpi-ic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; flex-shrink: 0; }
.proj-kpi-ic.blue   { background: var(--blue-bg); color: var(--blue-text); }
.proj-kpi-ic.green  { background: var(--lime-bg); color: var(--lime-text); }
.proj-kpi-ic.violet { background: #f5f3ff; color: #7c3aed; }
.proj-kpi-ic.slate  { background: var(--border-light); color: var(--text-muted); }
.proj-kpi-ic.amber  { background: var(--yellow-bg); color: var(--yellow-text); }
.proj-kpi-val { font-size: 1.4rem; font-weight: 700; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.proj-kpi-label { font-size: .76rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; }

/* ─── 필터 바 (공용 — 프로젝트 목록 카테고리 필터 / 업무 목록 프로젝트 필터).
   공용 .category-chip/.category-filter-row 자체는 카드 상세 등 다른 화면과도
   공유하는 컴포넌트라 안 건드리고, 이 보조 클래스로 감싸는 카드 + 꾸밈만
   얹는다(칩 마크업·필터링 JS는 기존 그대로). ── */
.proj-filter-bar {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
}
.proj-filter-label {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 700; color: var(--text-muted);
  flex-shrink: 0; white-space: nowrap;
}
.proj-filter-label i { font-size: .82rem; }
.proj-filter-chips { flex: 1; gap: 8px; }

.proj-filter-chip {
  gap: 2.5px; padding: 6px 14px 6px 12px;
  font-weight: 600; border-width: 1.5px;
  position: relative; overflow: hidden;
}
.proj-filter-chip i { font-size: .78rem; opacity: .85; }
.proj-filter-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}
/* 카테고리 칩(전체 제외)의 active 상태 — accent 단색 대신 그 카테고리 고유
   색상으로 채워 "어떤 카테고리를 보고 있는지" 색으로도 바로 구분되게 함 */
.proj-filter-chip[style*="--chip-color"].active {
  background: var(--chip-color); border-color: var(--chip-color); color: #fff;
}
.proj-filter-chip.active .proj-filter-count {
  background: rgba(255,255,255,.28); color: #fff;
}
.proj-filter-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--bg); color: var(--text-muted);
  border-radius: var(--radius-sm); font-size: .68rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* 업무 화면의 그룹 토글 칩(.task-filter-group-toggle)에도 .proj-filter-chip이
   같이 붙는데, 기존 .task-filter-group-count(font-size .7rem/opacity .75)가
   먼저 정의돼 있어도 이 규칙이 더 뒤에 오고 동일 특정도라 배지 스타일은
   .proj-filter-count 쪽으로 정상 적용된다. */
@media (max-width: 640px) {
  .proj-filter-bar { flex-direction: column; align-items: stretch; gap: 8px; }
}

/* ─── 전자결재(2026-09-24 전면 재디자인) — approvals/*.html + admin/approval_types.html 공용 ───
   부품은 templates/approvals/_ui.html 매크로(탭 줄·상태 표시·빈 상태)와 짝.
   상태는 색만으로 구분하지 않도록 항상 아이콘+글자를 함께 쓴다. */
.ap-page { max-width: 1180px; display: flex; flex-direction: column; gap: 14px; }

/* 탭 줄 */
.ap-nav { display: flex; gap: 2px; padding: 3px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; width: max-content; max-width: 100%; overflow-x: auto; }
.ap-nav-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 7px; font-size: .85rem; font-weight: 600; color: var(--text-muted); text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.ap-nav-tab:hover { color: var(--text); }
.ap-nav-tab.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.ap-nav-n { font-size: .7rem; font-weight: 700; min-width: 18px; text-align: center; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; }

/* 상태 표시 */
.ap-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; background: var(--bg); color: var(--text-muted); }
.ap-status.is-pending   { background: var(--yellow-bg); color: var(--yellow-text); }
.ap-status.is-approved  { background: var(--lime-bg);   color: var(--lime-text); }
.ap-status.is-rejected  { background: var(--coral-bg);  color: var(--coral-text); }
.ap-type { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 6px; font-size: .74rem; font-weight: 600; background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; }

/* 도움말 한 줄 · 요약 수치 · 도구 줄 */
.ap-lead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.ap-lead-title { font-size: .98rem; font-weight: 600; }
.ap-lead-title b { font-size: 1.15rem; color: var(--accent); }
.ap-lead-sub { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.ap-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.ap-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.ap-stat span { display: flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--text-muted); }
.ap-stat b { display: block; font-size: 1.45rem; font-weight: 700; margin-top: 2px; }
.ap-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ap-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.ap-seg > button, .ap-seg > a { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; font-size: .82rem; font-weight: 600; color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.ap-seg > button span { font-weight: 500; margin-left: 2px; opacity: .75; }
.ap-seg > *:hover { color: var(--text); }
.ap-seg > .is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.ap-search { position: relative; display: flex; align-items: center; flex: 1 1 220px; max-width: 340px; height: 38px; padding: 0 12px 0 34px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.ap-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12); }
.ap-search > i { position: absolute; left: 12px; color: var(--text-light); font-size: .85rem; }
.ap-search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: .86rem; color: var(--text); }

/* 문서 목록 */
.ap-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ap-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-top: 1px solid var(--border-light); transition: background .15s, opacity .25s; }
.ap-list > .ap-row:first-child, .ap-list > .ap-row.d-none + .ap-row { border-top: 0; }
.ap-row:hover { background: var(--bg); }
.ap-row.is-leaving { opacity: 0; }
.ap-row-ic { width: 34px; height: 34px; border-radius: 9px; flex: none; display: flex; align-items: center; justify-content: center; font-size: .95rem; background: var(--bg); color: var(--text-muted); }
.ap-row-ic.is-pending  { background: var(--yellow-bg); color: var(--yellow-text); }
.ap-row-ic.is-approved { background: var(--lime-bg); color: var(--lime-text); }
.ap-row-ic.is-rejected { background: var(--coral-bg); color: var(--coral-text); }
.ap-row-main { flex: 1; min-width: 0; }
/* 제목 링크가 줄 전체를 덮어 어디를 눌러도 상세로 — 버튼은 z-index로 위에 올린다 */
.ap-row-link { display: block; font-weight: 600; font-size: .92rem; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-row-link::after { content: ''; position: absolute; inset: 0; }
.ap-row-link:hover { color: var(--accent); }
.ap-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 3px; font-size: .77rem; color: var(--text-muted); }
.ap-row-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.ap-row-meta i { color: var(--text-light); font-size: .74rem; }
.ap-row-quote { display: flex; gap: 6px; margin-top: 6px; font-size: .8rem; color: var(--text); background: var(--bg); border-radius: 8px; padding: 6px 10px; overflow-wrap: anywhere; }
.ap-row-quote i { color: var(--text-light); }
.ap-row-side { display: flex; align-items: center; gap: 12px; flex: none; }
.ap-row-actions { position: relative; z-index: 1; display: flex; gap: 6px; }
.ap-row-actions .btn { display: inline-flex; align-items: center; gap: 4px; }
.ap-wait { font-size: .76rem; color: var(--text-muted); white-space: nowrap; }
.ap-wait.is-late { color: var(--coral-text); font-weight: 700; }
.ap-progress { display: inline-flex; align-items: center; gap: 3px; }
.ap-progress i { width: 14px; height: 4px; border-radius: 2px; background: var(--border); }
.ap-progress i.is-done { background: var(--lime); }
.ap-progress i.is-now { background: var(--yellow); }

.ap-empty { text-align: center; padding: 48px 20px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.ap-empty > i { display: block; font-size: 1.9rem; color: var(--text-light); margin-bottom: 8px; }
.ap-empty-title { font-weight: 700; }
.ap-empty-sub { font-size: .85rem; color: var(--text-muted); margin-top: 4px; }

/* 카드 공용 */
.ap-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.ap-card-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--border-light); }
.ap-card-hd h2 { display: flex; align-items: center; gap: 7px; font-size: .93rem; font-weight: 700; margin: 0; }
.ap-card-hd h2 i { color: var(--accent); }
.ap-card-bd { padding: 16px 18px; }
.ap-modal .modal-content, .modal-content.ap-modal { height: auto; }
.ap-modal-doc { font-size: .85rem; color: var(--text-muted); background: var(--bg); border-radius: 8px; padding: 8px 12px; }

/* 작성 */
.ap-form { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.ap-form-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ap-form-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; }
.ap-ai { background: linear-gradient(135deg, var(--accent-light), var(--surface)); border: 1px solid rgba(var(--accent-rgb), .25); border-radius: var(--radius); padding: 14px 18px; }
.ap-ai-hd { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--accent); margin-bottom: 8px; }
.ap-ai-row { display: flex; gap: 8px; }
.ap-ai-row .btn { height: 42px; padding: 0 18px; }
.ap-ai-help { font-size: .76rem; color: var(--text-muted); margin-top: 6px; }
.ap-field { margin-bottom: 18px; }
.ap-field .form-label { font-weight: 600; }
.ap-field-help { font-size: .76rem; color: var(--text-muted); margin-top: 5px; }
.ap-leave { background: var(--lime-bg); border-radius: 10px; padding: 12px 14px; }
.ap-leave-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ap-leave-row .form-control { width: auto; min-width: 150px; background: var(--surface); }
.ap-leave-days { font-size: .84rem; font-weight: 700; color: var(--lime-text); }
.ap-route { list-style: none; margin: 0; padding: 0; }
.ap-route li { position: relative; display: flex; gap: 10px; padding-bottom: 14px; }
.ap-route li:not(:last-child):not(.ap-route-empty)::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 2px; width: 2px; background: var(--border); }
.ap-route li:last-child { padding-bottom: 0; }
.ap-route-dot { width: 28px; height: 28px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: .78rem; background: var(--blue-bg); color: var(--blue-text); }
.ap-route li.is-me .ap-route-dot { background: var(--bg); color: var(--text-muted); }
.ap-route b { display: block; font-size: .87rem; }
.ap-route small { font-size: .74rem; color: var(--text-muted); }
.ap-route-empty { font-size: .8rem; color: var(--text-muted); }
.ap-tips { background: var(--bg); }
.ap-tips-hd { display: flex; gap: 6px; align-items: center; font-weight: 700; font-size: .84rem; margin-bottom: 6px; }
.ap-tips ul { margin: 0; padding-left: 18px; font-size: .8rem; color: var(--text-muted); line-height: 1.6; }
.ap-actionbar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 -4px 16px rgba(15,15,20,.05); }
.ap-actionbar-right { display: flex; gap: 8px; }
.ap-actionbar .btn { height: 40px; padding: 0 18px; }

/* 상세 — 종이 문서 */
.ap-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.ap-paper { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); min-width: 0; }
.ap-paper-hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 24px 26px 20px; border-bottom: 2px solid var(--text); margin: 0 0 0; }
.ap-paper-title { flex: 1; min-width: 0; }
.ap-paper-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ap-docno { font-size: .74rem; color: var(--text-light); font-variant-numeric: tabular-nums; }
.ap-paper-hd h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: -.01em; margin: 10px 0 12px; overflow-wrap: anywhere; }
.ap-paper-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; font-size: .85rem; }
.ap-paper-meta > div { display: flex; gap: 8px; }
.ap-paper-meta dt { font-weight: 500; color: var(--text-muted); }
.ap-paper-meta dd { margin: 0; }
.ap-leave-done { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: .74rem; font-weight: 700; color: var(--lime-text); background: var(--lime-bg); padding: 1px 8px; border-radius: 999px; }
.ap-stamps-wrap { flex: none; max-width: 100%; overflow-x: auto; }
.ap-stamps { border-collapse: collapse; font-size: .72rem; text-align: center; }
.ap-stamps th, .ap-stamps td { border: 1px solid var(--text-light); width: 68px; min-width: 68px; }
.ap-stamps th { background: var(--bg); font-weight: 600; color: var(--text-muted); padding: 3px 4px; }
.ap-stamps tbody td { height: 58px; }
.ap-stamps tfoot td { padding: 3px 4px; color: var(--text); line-height: 1.25; }
.ap-stamps tfoot small { display: block; color: var(--text-muted); font-size: .66rem; }
.ap-stamp { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: .7rem; font-weight: 700; }
.ap-stamp.is-draft { color: var(--text); }
.ap-stamp.is-approved { border: 2px solid #C8312A; border-radius: 50%; color: #C8312A; transform: rotate(-8deg); letter-spacing: -.02em; }
.ap-stamp.is-rejected { border: 2px solid var(--text); border-radius: 4px; color: var(--text); width: 40px; height: 26px; }
.ap-stamp.is-now { border: 1.5px dashed var(--yellow); border-radius: 50%; color: var(--yellow-text); font-weight: 600; }
.ap-stamp.is-skip { color: var(--text-light); }
.ap-paper-body { padding: 26px; min-height: 160px; font-size: .95rem; line-height: 1.75; }
.ap-files { padding: 16px 26px 22px; border-top: 1px solid var(--border-light); }
.ap-files-hd { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .87rem; margin-bottom: 10px; }
.ap-files-hd span { font-size: .72rem; font-weight: 600; padding: 0 7px; border-radius: 999px; background: var(--bg); color: var(--text-muted); }
.ap-file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ap-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border-light); border-radius: 10px; }
.ap-file:hover { border-color: var(--border); background: var(--bg); }
.ap-file-ic { width: 38px; height: 38px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; font-size: .6rem; font-weight: 800; letter-spacing: .02em; background: var(--blue-bg); color: var(--blue-text); }
.ap-file-main { flex: 1; min-width: 0; }
.ap-file-main a { display: block; font-size: .87rem; font-weight: 600; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-file-main a:hover { color: var(--accent); }
.ap-file-main small { font-size: .74rem; color: var(--text-muted); }
.ap-file-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.ap-files-none { font-size: .84rem; color: var(--text-muted); margin: 0; }
.ap-file-add { display: flex; gap: 8px; margin-top: 12px; }
.ap-file-add .btn { height: 42px; }
.ap-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; min-width: 0; }
.ap-decide { border-color: rgba(var(--accent-rgb), .45); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .08); }
.ap-decide-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ap-decide-btns .btn { height: 40px; }
.ap-owner { display: flex; flex-direction: column; gap: 10px; }
.ap-owner-text { font-size: .82rem; color: var(--text-muted); }
.ap-owner-btns { display: flex; gap: 6px; }
.ap-timeline { list-style: none; margin: 0; padding: 0; }
.ap-timeline li { position: relative; display: flex; gap: 10px; padding-bottom: 16px; }
.ap-timeline li:not(:last-child)::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 2px; width: 2px; background: var(--border); }
.ap-timeline li.is-approved:not(:last-child)::before { background: var(--lime); }
.ap-timeline li:last-child { padding-bottom: 0; }
.ap-tl-dot { width: 28px; height: 28px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; background: var(--bg); color: var(--text-muted); border: 2px solid var(--border); }
.ap-timeline .is-approved .ap-tl-dot { background: var(--lime); border-color: var(--lime); color: #fff; }
.ap-timeline .is-rejected .ap-tl-dot { background: var(--coral-text); border-color: var(--coral-text); color: #fff; }
.ap-timeline .is-now .ap-tl-dot { background: var(--yellow-bg); border-color: var(--yellow); color: var(--yellow-text); }
.ap-tl-main { min-width: 0; flex: 1; }
.ap-tl-name { font-weight: 600; font-size: .87rem; }
.ap-tl-name small { font-weight: 400; color: var(--text-muted); margin-left: 2px; }
.ap-tl-state { font-size: .76rem; color: var(--text-muted); }
.ap-timeline .is-now .ap-tl-state { color: var(--yellow-text); font-weight: 700; }
.ap-timeline .is-rejected .ap-tl-state { color: var(--coral-text); font-weight: 700; }
.ap-tl-time { font-size: .74rem; color: var(--text-light); }
.ap-tl-comment { margin-top: 6px; font-size: .82rem; background: var(--bg); border-radius: 0 10px 10px 10px; padding: 7px 10px; overflow-wrap: anywhere; white-space: pre-line; }

/* 관리자 — 결재 유형 설정 */
.ap-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.ap-type-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.ap-type-card.is-off { opacity: .6; }
.ap-type-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ap-type-name { display: flex; gap: 10px; min-width: 0; }
.ap-type-ic { width: 36px; height: 36px; border-radius: 9px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--accent-light); color: var(--accent); }
.ap-type-name h2 { font-size: .98rem; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.ap-type-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ap-tag { display: inline-flex; align-items: center; gap: 3px; font-size: .7rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--bg); color: var(--text-muted); }
.ap-tag.is-leave { background: var(--lime-bg); color: var(--lime-text); }
.ap-type-actions { display: flex; gap: 4px; flex: none; }
.ap-type-desc { font-size: .82rem; color: var(--text-muted); margin: 10px 0 0; }
.ap-flow { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--border-light); }
.ap-flow li { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: var(--blue-bg); color: var(--blue-text); }
.ap-flow li.is-me { background: var(--bg); color: var(--text-muted); }
.ap-flow li.is-empty { background: transparent; color: var(--text-muted); font-weight: 500; padding: 0; }
.ap-flow li + li:not(.is-empty)::before { content: '›'; margin-right: 5px; color: var(--text-light); font-weight: 400; margin-left: -12px; }
.ap-flow li + li { margin-left: 8px; }
.ap-flow li.is-empty { flex-basis: 100%; margin-left: 0; }
.ap-route-rows { display: flex; flex-direction: column; gap: 6px; }
.ap-route-row { padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.ap-route-row-in { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ap-route-no { font-size: .74rem; font-weight: 700; color: var(--accent); background: var(--accent-light); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.ap-route-kind { width: 150px !important; }
.ap-route-row [id^="route-extra-"] { flex: 1 1 160px; min-width: 0; }

@media (max-width: 991px) {
  .ap-form, .ap-detail { grid-template-columns: minmax(0, 1fr); }
  .ap-form-side, .ap-side { position: static; }
  .ap-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 767px) {
  .ap-nav { width: 100%; }
  .ap-nav-tab { flex: 1; justify-content: center; padding: 7px 8px; }
  .ap-nav-tab > i { display: none; }
  .ap-search { max-width: none; flex-basis: 100%; }
  .ap-row { flex-wrap: wrap; padding: 12px 14px; gap: 10px 12px; }
  .ap-row-side { width: 100%; justify-content: space-between; padding-left: 46px; }
  .ap-row-side:only-child, .ap-row-side:empty { display: none; }
  .ap-paper-hd { flex-direction: column; padding: 18px; }
  .ap-paper-body { padding: 18px; }
  .ap-files { padding: 14px 18px 18px; }
  .ap-types { grid-template-columns: minmax(0, 1fr); }
  .ap-ai-row { flex-direction: column; }
  .ap-actionbar { flex-wrap: wrap; }
  .ap-actionbar-right { flex: 1; }
  .ap-actionbar-right .btn { flex: 1; }
}

/* ─── 대시보드 ───────────────────────────────────────────────── */
.db-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.db-stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid transparent;
}
.db-stat-blue  { border-left-color: var(--blue); }
.db-stat-green { border-left-color: var(--lime); }
.db-stat-purple{ border-left-color: #a855f7; }
.db-stat-orange{ border-left-color: #f97316; }
.db-stat-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}
.db-stat-blue  .db-stat-icon { color: var(--blue); }
.db-stat-green .db-stat-icon { color: var(--lime); }
.db-stat-purple .db-stat-icon{ color: #a855f7; }
.db-stat-orange .db-stat-icon{ color: #f97316; }
.db-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.db-stat-label {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.db-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.db-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;flex-direction: column;
}
.db-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0px;
}
.db-card-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
}
.db-card-title i { color: var(--accent); }
.db-card-sub {
  font-size: .75rem;
  color: var(--text-muted);
}
.db-card-link {
  font-size: .75rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.db-card-link:hover { text-decoration: underline; }
.db-card-body { padding: 16px 20px; }

/* 도넛 */
.db-donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.db-donut-wrap canvas { flex-shrink: 0; }
.db-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.db-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--text-muted);
}
.db-legend-item strong { margin-left: auto; color: var(--text); font-size: .95rem; }
.db-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 우선순위 바 */
.db-prio-list { display: flex; flex-direction: column; gap: 10px; }
.db-prio-row  { display: flex; align-items: center; gap: 10px; }
.db-prio-label { width: 52px; flex-shrink: 0; }
.db-prio-bar-wrap {
  flex: 1;
  background: var(--border-light);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}
.db-prio-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
  min-width: 4px;
}
.db-prio-high   { background: #ef4444; }
.db-prio-medium { background: #f59e0b; }
.db-prio-low    { background: #64748b; }
.db-prio-cnt { width: 24px; text-align: right; font-size: .8rem; font-weight: 600; color: var(--text); }

/* 프로젝트 진행률 */
.db-proj-list { display: flex; flex-direction: column; gap: 14px; }
.db-proj-row  { display: flex; align-items: center; gap: 12px; }
.db-proj-name {
  width: 130px;
  flex-shrink: 0;
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  text-decoration: none;
}
.db-proj-name:hover { color: var(--accent); }
.db-proj-bar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.db-proj-bar-bg {
  flex: 1;
  background: var(--border-light);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}
.db-proj-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--lime));
  border-radius: 4px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
  min-width: 3px;
}
.db-proj-pct {
  width: 32px;
  text-align: right;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.db-proj-badges {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.db-badge-todo, .db-badge-prog, .db-badge-done {
  font-size: .68rem;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}
.db-badge-todo { background: var(--border-light); color: var(--text-muted); }
.db-badge-prog { background: var(--blue-bg); color: var(--blue-text); }
.db-badge-done { background: var(--lime-bg); color: var(--lime-text); }

/* 최근 활동 */
.db-activity-list { list-style: none; margin: 0; padding: 0; }
.db-activity-list li { border-bottom: 1px solid var(--border-light); }
.db-activity-list li:last-child { border-bottom: none; }
.db-activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}
.db-activity-item:hover { background: var(--accent-light); }
.db-act-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.db-act-todo        { background: #94a3b8; }
.db-act-in_progress { background: var(--blue); }
.db-act-done        { background: var(--lime); }
.db-act-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.db-act-title {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-act-project {
  font-size: .72rem;
  color: var(--text-muted);
}

/* 팀 현황 */
.db-team-summary {
  display: flex;
  gap: 20px;
  justify-content: center;
}
.db-team-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-muted);
}
.db-team-stat strong { color: var(--text); font-size: .95rem; }
.db-ts-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.db-member-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px;margin-top: 10px;}
.db-member-row  { display: flex; align-items: center; gap: 10px; }
.db-member-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.db-member-name { width: 72px; font-size: .8rem; font-weight: 500; flex-shrink: 0;display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
.db-member-bar-wrap {
  flex: 1;
  background: var(--border-light);
  border-radius: 4px;
  height: 7px;
  overflow: hidden;
}
.db-member-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
  min-width: 4px;
  opacity: .75;
}
.db-member-cnt { width: 20px; text-align: right; font-size: .8rem; font-weight: 600; color: var(--text-muted); }

/* 완료율 큰 숫자 */
.db-big-pct {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -.04em;
}
.db-big-pct span { font-size: 1.5rem; font-weight: 600; }
.db-pct-bar-wrap {
  width: 100%;
  background: var(--border-light);
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
}
.db-pct-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--lime));
  border-radius: 6px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

.db-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 0;
  color: var(--text-light);
  font-size: .82rem;
}
.db-empty i { font-size: 1.6rem; }

@media (max-width: 1100px) {
  .db-summary-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .db-summary-row { grid-template-columns: 1fr 1fr; }
  .db-grid-2 { grid-template-columns: 1fr; }
  .db-proj-badges { display: none; }
}
@media (max-width: 993px) {
  /* 2026-09-16 모바일 사이드바 재설계, 같은 날 후속으로 재조정 — "기본이
     미니 사이드바인 게 불편하다, 기본은 아예 없어야 하고 누르면 미니로
     떠야 한다"는 피드백. 처음엔 "기본 상태 자체가 64px 아이콘 전용 미니
     사이드바로 항상 화면에 떠 있는" 설계였는데(구 경위는 git log 참고),
     이번엔 그 이전 방식(완전히 화면 밖에 숨겨진 기본 상태, transform:
     translateX(-100%))으로 되돌리되, 토글을 누르면 **라벨 있는 전체
     드로어가 아니라 미니(64px 아이콘 전용) 사이드바만 오버레이로 뜨게**
     했다 — 그룹은 이미 아이콘을 탭하면 플라이아웃으로 라벨을 보여주므로
     (아래 .nav-group-items 참고) 전체(280px) 드로어 없이도 모든 메뉴에
     접근 가능해, 그 사이 단계 자체를 없앴다. `.mobile-open` 클래스는
     이제 "미니 오버레이가 보이는 상태" 하나만 의미(예전엔 "전체 드로어가
     펼쳐진 상태"였음) — 데스크톱 `.collapsed`와 여전히 별도 클래스로
     분리돼 있는 이유는 §CLAUDE.md ".collapsed 클래스가 데스크톱·모바일에서
     서로 다른 의미로 재사용되며 충돌" 항목 그대로. 토글 버튼/배경 오버레이
     클릭 핸들러(base.html의 toggleSidebar()/closeMobileSidebar())와 JS의
     sidebarIsMini() 판정(static/js/main.js)도 이 의미 변경에 맞춰 함께
     고쳤다 — 모바일에서 "미니 상태"는 이제 `.mobile-open`이 **있을 때**다
     (예전엔 없을 때였음, 정확히 반대). */
  .main-wrapper { margin-left: 0 !important; }
  .sidebar { transform: translateX(-100%); width: 64px; overflow: hidden; }
  .sidebar.mobile-open { transform: translateX(0); overflow: visible; box-shadow: 0 0 24px rgba(0,0,0,.3); }

  .sidebar-brand span, .sidebar-section-label,
  .nav-group-name, .nav-group-toggle,
  .sidebar-fav-wrap, .fav-section-label { display: none; }
  /* ⚠️ .sidebar-nav a span은 위 그룹 셀렉터와 같은 특이도(0,1,2)를 가진
     후순위 규칙(이 파일 하단의 .sidebar-nav li a span{display:block},
     0,1,3 — 소스 순서도 이 블록보다 뒤라 이중으로 이긴다)에 밀려 실제로는
     안 숨겨지고 있었다 — span 자체는 폭 0으로 찌그러져 안 보였지만 flex
     아이템으로는 계속 자리를 차지해(+아이콘과의 gap) 아이콘이 진짜 중앙에서
     벗어나 있었다("일반 아이콘이랑 그룹 아이콘 정렬이 안 맞는다" 신고의
     실제 원인 — 그룹 아이콘은 이 span이 없어 문제가 없었음). 별도 규칙 +
     !important로 확실히 이기게 분리. */
  .sidebar-nav a span { display: none !important; }
  /* 뒤에 나오는(소스 순서상 나중) 일반 .sidebar-nav{padding:16px 16px 0 16px}
     규칙(펼침 모드 기준 여백)이 같은 특이도로 덮어써버리지 않도록 !important로
     명시 — 데스크톱 .sidebar.collapsed .sidebar-nav와 동일한 좁은 여백. */
  .sidebar-nav { padding: 10px 10px 0 10px !important; }
  .sidebar-nav a { justify-content: center; padding: 10px; }
  .sidebar-brand { justify-content: center; padding: 20px 0; }

  /* 하단 사용자 영역(로그아웃 버튼 포함)도 데스크톱 아이콘 전용 접기
     (.sidebar.collapsed)와 동일하게 압축한다 — 이 블록 밖의 일반 규칙
     (.sidebar-bottom{padding:16px}/.sidebar-user{padding:10px;width:100%},
     아래 2150행대)이 미니 모드(폭 64px)에도 그대로 적용되면 좌우 패딩만
     32px+내부 10px를 먹어 아바타(32px)가 비좁게 짓눌리는 게 "비율이 안좋다"
     신고의 실제 원인이었다 — 데스크톱은 §"사이드바 접기/펼치기" 하단의
     .sidebar.collapsed 전용 오버라이드(2520행 부근)가 이미 잡아주지만
     모바일 미니 상태엔 그 클래스가 없어 빠져 있었다. */
  .sidebar-bottom { padding: 12px 0; }
  .sidebar-user { padding: 0; justify-content: center; background: none; }
  .sidebar-user:hover { background: none !important; }
  .btn-logout { justify-content: center; gap: 0; padding: 10px; }

  /* 그룹은 데스크톱 미니 모드와 동일하게 "2단계"(아이콘 한 줄 → 탭하면
     플라이아웃) — 위 1365행 부근 .sidebar.collapsed .nav-group* 규칙과
     완전히 같은 원리(position:fixed, JS가 위치 계산). base.html의
     .nav-group-header 클릭 핸들러가 breakpoint를 스스로 감지해
     .flyout-open을 토글한다. ⚠️ top은 여기서 고정값을 안 주고 JS
     (base.html의 positionNavGroupFlyout())가 클릭 시점 아이콘 좌표+실제
     콘텐츠 높이로 매번 계산해 인라인 style로 넣는다 — 화면 하단에 가까운
     그룹(마지막 "관리자 설정" 등)을 열면 뷰포트 밖으로 잘리던 문제(2026-09-16
     실사용 신고)를 그 함수의 클램프 로직이 방지한다. 이 규칙들은 미니
     오버레이(.mobile-open)뿐 아니라 기본(숨김) 상태에도 걸려있지만, 어차피
     화면 밖(transform)이라 보이지 않을 때는 영향이 없다 — 예전 "전체 드로어"
     전용으로 그룹을 인라인 아코디언으로 되돌리던 .sidebar.mobile-open
     .nav-group-items 오버라이드는 전체 드로어 자체가 없어져 함께 삭제. */
  .nav-group-header { justify-content: center; padding: 10px; }
  .nav-group-items {
    display: none !important; position: fixed;
    width: max-content; min-width: 190px; max-width: 240px;
    height: auto !important; max-height: 70vh; flex: none !important; overflow-y: auto !important;
    padding: 6px !important; margin: 0;
    background: var(--sidebar-bg); border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 210;
  }
  .nav-group.flyout-open .nav-group-items { display: block !important; }
  /* 플라이아웃(2단계) 안은 데스크톱과 동일하게 라벨 텍스트를 함께 보여준다
     — 위 .sidebar.collapsed .nav-group-items a 규칙과 동일 원리. */
  .nav-group-items a { justify-content: flex-start; padding: 9px 10px; }
  .nav-group-items a span { display: block !important; }

  /* 미니 오버레이(.mobile-open)가 떠 있을 때 바깥을 탭하면 닫히는 배경 */
  .sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(15,23,42,.45);
    z-index: 99;
  }
  .sidebar.mobile-open ~ .sidebar-backdrop { display: block; }

  .main-content { padding: 16px; }
  .topbar { padding: 0 16px; }

  /* 검색창 기본폭(200px)이 좁은 화면에서 topbar-actions의 다른 버튼들과
     겹치며 밀려나던 것을 축소 */
     .search-box input { width: 160px; }
  .search-box input:focus { width: 160px; }
}
/* ─── 반응형 ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
}

/* ─── 매신저 공통 ────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spin-icon { display: inline-block; animation: spin 1s linear infinite; }

/* 매신저 페이지에서 main-content 패딩 제거 */
.messenger-page .main-content { padding: 0 !important; }

@media (max-width: 768px) {
  .conv-panel { width: 100%; min-width: unset; }
  .chat-panel { display: none !important; }
  .conv-panel.hidden { display: none !important; }
  .chat-panel.mobile-open { display: flex !important; }
  .chat-back-btn { display: flex !important; }
}


.form-floating>.form-control-plaintext~label::after,
.form-floating>.form-control:focus~label::after,
.form-floating>.form-control:not(:placeholder-shown)~label::after,
.form-floating>.form-select~label::after{background-color: var(--surface) !important;}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px transparent inset !important;
    -webkit-text-fill-color: #000 !important;
    font-weight: normal !important;
    border-color: var(--accent) !important;
}

.login-card .form-floating input:focus{background-color: rgba(255,255,255,.0);}


.sidebar-nav::-webkit-scrollbar{width: 4px;border-radius: 100px;background-color: rgba(255, 255, 255, 0.0);}
.sidebar-nav::-webkit-scrollbar-thumb{background-color: rgba(var(--accent-rgb), 0.4);border-radius: 100px;transition: 0.2s;}
.sidebar-nav:hover::-webkit-scrollbar-thumb{background-color: rgba(var(--accent-rgb), 0.6)}


.topbar-title-wrap{display: flex;align-items: center;gap: 10px;}

.kanban-card{position: relative;display: flex;flex-direction: row;align-items: stretch;}
.kc-drag-handle{width: 24px;border-right: 1px solid var(--border);position: absolute;left: 0;top: 0;height: 100%;}
.kanban-card-inner{padding: 10px;margin-left: 24px;}
.project-icon-sm{display: none;}
.kc-actions button{}

.kanban-category{display: none;width: 100%;align-items: center;border-bottom: 1px solid var(--border);margin-bottom: 16px;}
.kanban-category button{height: 36px;width: 100%;display: flex;align-items: center;justify-content: center;border: 0;outline: none;font-size: 14px;color: var(--text-muted);background-color: transparent;border-bottom: 1px solid transparent;transition: 0.2s;}
.kanban-category button.on{color: var(--accent);border-color: var(--accent);font-weight: 600;}

.fc .fc-button-group{display: flex;gap: 5px;}
.fc-toolbar-chunk{display: flex;}
.fc .fc-button{height: 32px;padding: 0 10px;}
.fc-daygrid a{text-decoration: none;color: var(--text-muted);}
.fc-daygrid-day-frame{padding: 5px;}
.fc-event{margin-left: 0 !important;padding-left: 5px;}

.fc-header-toolbar{flex-wrap: wrap;position: relative;gap: 10px;}
.fc-today-button{flex-shrink: 0;}
.fc-toolbar-chunk{display: flex;align-items: center;height: 32px;width: 100%;}
.fc-toolbar-chunk:nth-of-type(1){width: 100%;justify-content: right;}
.fc-toolbar-chunk:nth-of-type(1) .fc-button-group{width: 100%;justify-content: right;}
.fc-toolbar-chunk:nth-of-type(1) .fc-button-group button{flex: none}
.fc-toolbar-chunk:nth-of-type(1) .fc-button-group button:first-of-type{position: absolute;left: 0;top: 50%;transform: translateY(-50%);}
.fc-toolbar-chunk:nth-of-type(2){position: absolute;left: 50%;top: 0;transform: translateX(-50%);pointer-events: none;justify-content: center;}
.fc-toolbar-chunk:nth-of-type(3){width: 100%;justify-content: center;}

.table-responsive{white-space: nowrap;}
td{white-space: nowrap;}

/* 범용 테이블 헤더 클릭 정렬(static/js/main.js initSortableTables 참고) */
th.gt-sortable-th{cursor:pointer;user-select:none;}
th.gt-sortable-th:hover{color:var(--accent);}
.gt-sort-ic{font-size:.7rem;opacity:.4;margin-left:3px;}
th.gt-sort-active .gt-sort-ic{opacity:1;color:var(--accent);}

.list-group-item .badge{display: flex;align-items: center;justify-content: center;}

.org-level:not(.org-level-root)::before{height: 28px !important ;}
.org-item::before{top: 16px !important;}
.chat-tab-header{align-items: flex-end !important;margin-bottom: 10px;}

@media (max-width: 993px) {
  .org-level{width: 100%;}
  .org-item{width: 100%;;}
  .org-node{max-width: 100% !important;width: 100% !important;}
  .org-item .org-level .org-item{padding: 0 !important;padding-left: 32px !important;}
  .org-item .org-level{flex-direction: column;gap: 16px !important;}
  .org-item:first-child::before{left: auto !important;}
  .org-item::before{top: auto !important;bottom: 16px !important;left: auto !important;right: 0 !important;transform: translateY(0%) !important;width: calc(100% - 16px) !important;}
  .org-level:not(.org-level-root)::before{height: calc(100% - 16px) !important;left: 16px !important;transform: translateX(0) !important;}


  .sidebar.collapsed .btn-logout{justify-content: left;gap: 5px;}
  .fc-header-toolbar{padding: 16px;margin: 0;}
  .fc-toolbar-chunk:nth-of-type(2){top: 16px;}
  #calendar-wrap{padding: 0 !important;overflow: hidden;}
  .kanban-category{display: flex;}
  .kc-top>div{justify-content: right;position: relative;width: 100%;}
  .category-badge{position: absolute;left: 0;top: 50%;transform: translateY(-50%);}
  .btn-fav-proj{opacity: 1;padding: 8px;}
  .kc-actions{opacity: 1;}
  .kc-actions button{padding: 0px;}
  .sidebar-nav::-webkit-scrollbar-thumb{background-color: rgba(255,255,255, 0.4);}
  .sidebar-nav:hover::-webkit-scrollbar-thumb{background-color: rgba(255,255,255, 0.4);}
}
@media (max-width: 993px) {
  .sidebar{transition: transform 0.2s;}
  /* ⚠️ 2026-09-18 발견·수정 — 아래 FAB 스택(개수는 `--topbar-fab-count`,
     아래 규칙 참고)이 최대 4개까지 쌓일 수 있는데(예: inventory/list.html —
     엑셀 내보내기·창고 관리·분류 관리·품목 등록), 고정 96px 여백으로는
     한참 부족해(4개 스택은 화면 하단에서 최대 270px가량을 차지) 표 맨 아래
     빈 상태 문구("등록된 품목이 없습니다")가 FAB 원에 그대로 가려지는 실제
     사고로 이어졌다(실측 확인 — 스크롤 없이 첫 화면부터 겹침). FAB 개수와
     무관하게 항상 안전하도록 96px 기본값 위에 `--topbar-fab-count`만큼
     동적으로 더한다. */
  .main-content{padding: 16px 16px calc(96px + var(--topbar-fab-count, 0) * 62px) 16px;}
  /* ⚠️ 2026-09-18 수정 — 예전엔 "button" 태그만 선택하고(a.btn은 FAB로 안 바뀌고
     topbar 줄에 그대로 남아 화면 밖으로 잘리는 사고, 예: contracts/list.html "새 계약
     만들기") 쌓는 간격도 nth-of-type(1~3)으로 3개까지만 정의돼 있어(4번째 버튼은
     정의된 규칙이 없어 기본값 bottom:32px로 되돌아가 1번째 버튼과 완전히 같은 자리에
     겹쳐버림, 예: projects/detail.html의 관리자용 4번째 액션 "카드 추가"가 "링크 복사"를
     그대로 덮어씀 — 실사용 "우측 하단 아이콘 위치가 어긋난다" 신고로 발견). 버튼 개수·
     태그 종류에 안전하게 대응하도록 `--fab-i`(0부터, base.html의 동기 스크립트가
     `.topbar-actions` 자식 button/a.btn 순서대로 매김)를 calc()에 써서 간격을
     동적으로 계산 — 새 액션이 몇 개가 붙어도, button이든 a든 겹치거나 잘리지 않는다. */
  /* ⚠️ 2026-09-18 재수정 — "우측 하단 아이콘이 중앙 정렬이 안 맞는다" 실사용 신고로
     Playwright 실측 발견: font-size:0으로 숨긴 버튼 라벨 텍스트("새 메모" 등)가
     Tabler .btn의 line-height(px 고정값)를 그대로 물려받아, 글자는 안 보여도
     그 줄 높이만큼 flex-direction:column 스택에서 계속 공간을 차지해 아이콘을
     위로 밀어냈다(52px 버튼 기준 실측 8px 위로 치우침 — 시각적으로 뚜렷한 수준).
     line-height:0을 추가해 그 숨겨진 텍스트의 예약 공간을 0으로 만들면 아이콘이
     정확히 중앙에 옴(실측 오프셋 0,0 확인). */
  .topbar-actions>button, .topbar-actions>a.btn{position: fixed;right: 16px;bottom: calc(32px + var(--fab-i, 0) * 62px);display: flex;flex-direction: column;font-size: 0px;line-height: 0;width: auto;height: auto;align-items: center;justify-content: center;width: 52px;height: 52px;border-radius: 100%;box-shadow: 0px 8px 16px rgba(0,0,0, 0.15);}
  .topbar-actions>button i, .topbar-actions>a.btn i{font-size: 24px;margin: 0 !important;}
  .btn-outline-secondary{background-color: #fff;}
  /* ⚠️ 2026-09-18 재발견 — 위 두 수정(태그 종류 확장, 중앙정렬)도 `<div
     class="dropdown">`로 감싼 토글 버튼(예: reports/index.html "CSV
     내보내기", inventory/list.html "엑셀")은 여전히 못 잡았다 — `.topbar-
     actions>button`이 직계 자식 결합자라 div 한 겹만 씌워도 매칭이
     안 되고, 그 버튼은 FAB로 안 빠지고 topbar 줄에 그대로 남는다. 실측
     확인: reports.html은 그 버튼 하나가 남은 폭을 다 잡아먹어 제목
     (.topbar-title-inner)이 폭 0으로 완전히 사라졌었다(§위 "말줄임표
     안 나타나는" 수정과는 별개의 문제 — 그쪽은 "잘린 채 보이기라도 함",
     이쪽은 "아예 안 보임"). `.dropdown` 래퍼 자체를 같은 원(52px)
     FAB 좌표로 옮기고, 배경·그림자는 안쪽 토글 버튼이 원 전체를 채워
     대신 담당하게 한다(래퍼가 이중으로 그림자를 얹지 않도록). Bootstrap
     드롭다운의 실제 위치 계산(Popper)은 토글의 실시간 화면 좌표만
     보고 동작해 position:fixed로 옮겨도 그대로 열림(실측 확인 완료). */
  .topbar-actions>.dropdown{position: fixed;right: 16px;bottom: calc(32px + var(--fab-i, 0) * 62px);width: 52px;height: 52px;}
  /* ⚠️ Bootstrap의 `.show>.btn.dropdown-toggle`(메뉴 열림 상태) 규칙이 클래스
     2개짜리라 위 전역 `.btn-outline-secondary{background-color:#fff}`(클래스
     1개)보다 명시도가 높아, 순서와 무관하게 그 쪽이 이겨 버튼이 흰색이 아닌
     Bootstrap 기본 진회색 "눌림" 배경으로 나온다(실측 확인 — 다른 FAB들과
     톤이 달라 눈에 띔). 여기 배경색을 명시적으로 다시 지정해 항상(열림·닫힘
     무관) 다른 흰색 원형 FAB와 같은 톤을 유지한다. */
  .topbar-actions>.dropdown>.dropdown-toggle{width: 100%;height: 100%;margin: 0;font-size: 0px;line-height: 0;display: flex;align-items: center;justify-content: center;border-radius: 100%;box-shadow: 0px 8px 16px rgba(0,0,0, 0.15);background-color: #fff;color: var(--text-muted, #6b7280);border-color: var(--border, #e5e7eb);}
  .topbar-actions>.dropdown>.dropdown-toggle i{font-size: 24px;margin: 0 !important;}
  .topbar-actions>.dropdown>.dropdown-toggle::after{display: none;}

  /* 알림 벨 드롭다운(2026-09-18 수정) — .main-wrapper가 overflow:hidden이라(위
     FAB 전환과 동일한 함정), 좁은 화면에서 340px 고정폭 절대위치 패널이
     화면 밖으로 밀려나며 잘려 보이던 문제(모바일 실사용 신고: "알림 창을
     누르면 크게 나와서 화면에 잘린다") — FAB와 동일하게 position:fixed로
     바꿔 main-wrapper의 클리핑 자체를 벗어나고, 폭/높이 모두 뷰포트 기준으로
     다시 계산한다. top:74px = body 패딩 16px + topbar 높이 58px(둘 다 이
     블록 밖 고정값). 헤더/본문/푸터를 flex column으로 묶어 본문(.notif-panel-body)
     만 남는 공간을 채우며 자체 스크롤하게 해, 뷰포트보다 큰 알림 목록도
     화면 안에서만 스크롤된다. */
  .notif-panel {
    position: fixed;
    top: 74px; left: 12px; right: 12px; width: auto;
    max-height: calc(100vh - 90px);
    display: flex; flex-direction: column;
  }
  .notif-panel-body { max-height: none; flex: 1 1 auto; }


  /* ⚠️ 이 자리에 있던 ".collapsed=모바일 드로어 열기" 규칙들은
     2026-09-16 모바일 사이드바 재설계(§위 993px 블록 상단 주석 참고)로
     .mobile-open으로 이전됐다 — 새 규칙은 위 첫 @media(max-width:993px)
     블록에 전부 모여 있다. .collapsed는 이제 모바일에서 의미 없음(데스크톱
     전용 아이콘 접기), 남겨두면 §CLAUDE.md가 경고하던 "같은 클래스 반대
     의미 재사용" 함정이 되살아나므로 여기서 완전히 제거했다. */
  .sidebar-brand{padding-left: 20px !important;padding-right: 20px !important;}
  .user-info{display: flex !important;flex-direction: column;}
}
@media (max-width: 768px) {

  .org-level> .org-item{padding: 0 !important;}
  .org-tree{padding: 0 !important;}
  .org-chart-container{padding: 0 !important;}
  .conv-item.active{background-color: #fff;}
  .conv-panel{width: 100% !important;}
}
@media (max-width: 480px) {
  .login-card{padding: 32px 16px 16px 16px;}
}
@media (max-width: 376px) {
  .topbar-actions{gap: 5px;}
  .topbar-usermenu{gap: 0;}
  .topbar-usermenu .btn-notif{width: 32px;height: 32px;font-size: .95rem;}
}


/* 0821 */

html{background-color: #fff;width: 100%;height: 100%;}
body{background-color: var(--bg);padding: 16px;width: 100%;height: 100%;}
.topbar{background-color: transparent;flex-shrink: 0;box-shadow: none;border: 0;}
.main-wrapper{border-radius: var(--radius);background-color: var(--surface);min-height: 0;height: 100%;overflow: hidden;}
.main-content::-webkit-scrollbar{width: 4px;border: 0 !important;border-radius: 100px;background-color: transparent !important;}
.main-content::-webkit-scrollbar-thumb{width: 4px;border-radius: 100px;background-color: rgba(var(--accent-rgb), 0.55);}
.main-content::-webkit-scrollbar-track{margin-top: 0px;margin-bottom: 0px;background-color: transparent !important;}


/* 사이드바 — 2026-08-26부터 다시 실제 배경색을 칠함(그동안 transparent로
   비활성화돼있어 옆 크림 배경과 거의 구분이 안 갔었음). 웜다크 배경이라
   내부 텍스트/아이콘도 전부 밝은 톤으로 뒤집는다. */
.sidebar{background-color: var(--sidebar-bg) !important;}
.top-sidebar-nav li{margin-bottom: 0px;}
.top-sidebar-nav li:last-of-type{margin-bottom: 0;}
.sidebar-nav li a{gap: 15px;font-size: 0.85rem;color: rgba(var(--sidebar-text-rgb),1);}
.top-sidebar-nav li a span{font-weight: 500;display: block;width: 100%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
.sidebar-nav li a span{display: block;width: 100%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
.top-sidebar-nav li a i{font-size: 1.2rem;position: relative;}
.sidebar-nav li a:hover{background-color: var(--sidebar-hover);color: rgba(var(--sidebar-text-rgb),.95);}
.top-sidebar-nav li a i::after{position: absolute;left: 50%;top: calc(50% + 0px);transform: translate(-50%, -50%);border-radius: 8px;width: calc(100% + 10px);aspect-ratio: 1/1;background-color: transparent;transition: 0.2s;display: block;content: '';}
.top-sidebar-nav .nav-notif-badge{margin-left: 0;position: absolute;right: 10px;top: 10px;width: auto;display: flex;align-items: center;justify-content: center;padding-top: 0px;}
.sidebar-nav li a.active{background-color: rgba(var(--accent-rgb), 0.18);color: #FF9270;}
.sidebar-nav li a.active i::after{background-color: rgba(var(--accent-rgb), 0.0);}
.sidebar-nav li a.active i{color: #FF9270;}
.sidebar-section-label{color: rgba(var(--sidebar-text-rgb),.8);font-size: 0.8rem;letter-spacing: 0px;padding: 16px 16px 5px 16px;}
.sidebar-nav{padding: 16px 16px 0 16px;}
.sidebar-fav-wrap{padding-left: 16px;padding-right: 16px;padding-bottom: 16px;}
.sidebar-brand{padding-left: 16px;padding-right: 0;color: var(--accent);}
.sidebar-brand i{margin-right: 0 !important;}
.user-name{color: rgb(var(--sidebar-text-rgb));font-size: 0.9rem;}
.sidebar-bottom{padding: 16px 16px 16px 16px}
.sidebar-user{background-color: rgba(255,255,255,.05);border-radius: 10px;padding: 10px;width: 100%;margin: 0;;}
.sidebar-user:hover{background-color: rgba(255,255,255,.07) !important;}
.search-box input{border-radius: var(--radius-sm);background-color: #fff;color: #121212;font-weight: 500;padding: 8px 10px 8px 42px;font-size: 1rem;}
.search-box .search-icon{font-size: 1rem;color: #343434;left: 16px;}
.sidebar-brand span{display: block;width: 100%;min-width: 0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
.btn-logout{background-color: rgba(255,255,255,.05);margin-top: 10px;color: rgba(var(--sidebar-text-rgb),.5);font-weight: 600;font-size: 0.8rem;padding: 10px;}
.btn-logout:hover{color: #dc2626;background-color: rgba(220, 38, 38, 0.1);}
.topbar-title{font-size: 1.4rem;}
.sidebar-toggle{width: 36px;height: 36px;display: flex;align-items: center;justify-content: center;padding: 0;font-size: 1.4rem;color: var(--text);}
.sidebar-toggle:hover{color: var(--accent);}
.user-avatar{max-width: 32px;max-height: 32px;}
.user-role{color: rgba(var(--sidebar-text-rgb), 0.6);font-size: 0.7rem;}
.sidebar.collapsed .sidebar-brand{padding-left: 0px;}
.topbar::before{position: absolute;left: 0;top: 0;width: 100%;height: 100%;z-index: -1;display: block;content: '';background-color: rgba(var(--accent-rgb), 0.05);backdrop-filter: blur(10px);}

.topbar-title a{padding: 1px 5px 1.5px 5px;border-radius: 10px;transition: 0.2s;font-weight: 500;color: #343434 !important;}
.topbar-title a:hover{background-color: rgba(var(--accent-rgb), 0.1);color: var(--accent) !important;}

.btn-notif{font-size: 1.2rem;color: #343434;}

.dsh-card-title{font-size: 1rem !important;}

/* display:flex(2026-08-21 리프레시, 아이콘+텍스트 수직 정렬 목적)는 버튼을
   블록 레벨 상자로 만들어버려, 같은 셀/컨테이너 안에 버튼 여러 개를 나란히
   두면(예: /superadmin/companies 목록의 "구독"/"기능"/"AI 사용량"/삭제 버튼)
   옆으로 흐르지 못하고 각자 새 줄로 떨어지는 사고로 이어졌다(2026-08-28,
   스크린샷으로 발견). inline-flex로 바꾸면 내부 정렬(아이콘 수직 중앙 등)은
   그대로 유지하면서 바깥 박스만 부트스트랩 원래 동작(inline-block)처럼
   인라인 흐름에 참여해, 형제 요소와 나란히 배치된다. */
.btn{display: inline-flex;align-items: center;justify-content: center;height: 32px;padding: 0 10px;border-radius: 10px;font-size: 0.9rem;font-weight: 600;}
.btn i{margin-right: 0;}
.topbar .btn-outline-secondary{background-color: #fff}
.topbar .btn-outline-secondary:hover{background-color: #6c757d;}
/* 2026-08-21 리프레시 당시 테이블 안 삭제 등 "아이콘만 있는" 버튼을 정사각형으로
   눌러주려던 규칙이었으나, .table .btn 전체(텍스트가 있는 버튼까지)에 걸려 있어
   그 뒤로 추가된 "구독"/"기능"/"AI 사용량"/"자세히"처럼 아이콘+텍스트 조합인
   버튼까지 32px로 짓눌려 텍스트가 줄바꿈되며 아이콘과 겹쳐 보이는 디자인 사고로
   이어졌다(2026-08-28, /superadmin/companies 스크린샷으로 발견). 아이콘 뒤에
   오는 라벨이 <i> 태그가 아니라 텍스트 노드라 CSS만으로는 "아이콘 전용"과
   "아이콘+텍스트"를 구분할 수 없어, 아이콘 전용 버튼에 이 클래스를 명시적으로
   붙이는 방식으로 전환 — 새로 테이블에 아이콘 전용 버튼(삭제 등)을 추가할 때는
   이 클래스를 함께 붙일 것. */
.table .btn.btn-icon-only { max-width: 32px; }
.messenger-wrap{height: 100% !important;}
.main-content{min-height: 0;overflow-y: auto;}
.chat-empty p{font-size: 16px !important;font-weight: 500;text-align: center;}
.top-sidebar-nav .nav-notif-badge{top: 50%;transform: translateY(-50%);}
.chat-empty{background-color: #fff;}

.dsh-section{display: flex;gap: 16px;padding-bottom: 24px;}
.dsh-section{}
.dsh-wrap{width: 100%;}
.dsh-section>.dsh-card{width: 100%;max-width: 360px;}
.dsh-bottom{display: flex !important;width: 100%;;}
.dsh-bottom .dsh-card{width: 100%;}
.dsh-wrap{gap: 16px !important;}
.dsh-card-link{padding: 4.5px 10px 3.5px 10px;border-radius: var(--radius-sm);transition: 0.2s;background-color: rgba(var(--accent-rgb), 0.1)}
.dsh-card-link:hover{background-color: rgba(var(--accent-rgb), 1);color: #fff;text-decoration: inherit !important;}
.dsh-date{color: #343434 !important;}
.dsh-card-title i{color: #343434 !important;}
.dsh-card-bd{display: flex;flex-direction: column;justify-content: center;}
.dsh-section>.dsh-card .dsh-card-bd{justify-content: flex-start;}
.modal-header{padding-bottom: 10px !important;}
.modal-title{font-size: 1.4rem;font-weight: 600;display: flex;align-items: center;gap: 10px !important;}
.modal-title i{margin: 0 !important;}
.kanban-col{min-height: 0;}

.dsh-kpi{background-color: var(--bg) !important;border: 0 !important;}
.dsh-kpi-ic{background-color: #fff !important;}
.proj-kpi{background-color: var(--bg);border: 0;}
.proj-kpi-ic{background-color: #fff !important;}
.cal-kpi{background-color: var(--bg) !important;border: 0 !important;}
.cal-kpi-ic{background-color: #fff !important;}

.category-chip{display: flex;align-items: center;height: 32px;padding: 0 12px;border-radius: var(--radius-sm);font-size: 0.9rem;background-color: #fff}
.proj-filter-count{padding-top: 2px;}
.proj-kpi-label{font-size: 0.8rem;margin-top: 0;}
.proj-filter-chip i{opacity: 1;margin-top: 1.5px;}
.proj-filter-chips{gap: 5px;}
.proj-filter-chip:hover{transform: translateY(0) !important;}
.project-card{border-radius: var(--radius-sm);}
.kanban-cards .project-card:last-of-type{margin-bottom: 0;}
.kanban-cards .kanban-card:last-of-type{margin-bottom: 0;}
.kanban-col{border-radius: var(--radius-sm);}
.dsh-kpi-label{margin-top: 0 !important;font-size: 0.8rem !important;}
.col-count{font-size: 0.75rem;}
.cal-kpi-ic{font-size: 1.3rem !important;}
.proj-kpi-ic{font-size: 1.3rem !important;}
.dsh-kpi-ic{font-size: 1.3rem !important;}
.dsh-card-sub{font-size: 0.9rem !important;font-weight: 500;}
.dsh-date{font-size: 0.9rem !important;font-weight: 500;}
.kc-title{font-size: 1rem;}
.category-badge{font-size: 0.8rem;}
.priority-badge{font-size: 0.78rem;border: none;flex-shrink: 0;}
.kc-project-tag{font-size: 0.8rem;}
.kc-creator{font-size: 0.8rem !important;font-weight: 500;}
.btn-icon-xs{font-size: 1rem;color: #343434;width: 26px;height: 26px;background-color: var(--bg);}
.btn-icon-xs:hover{background-color: rgba(var(--accent-rgb), 0.1);color: var(--accent);}
.kc-load-more{font-size: 0.9rem;font-weight: 600;}
.kanban-card .btn-icon-xs{opacity: 0;transition: 0.2s;}
.kanban-card:hover .btn-icon-xs{opacity: 1;}
.kc-footer{font-size: 0.8rem;font-weight: 500;}
.task-filter-group-items{border-radius: 16px;}
.fav-ungrouped{max-height: 200px;}
.fav-ungrouped a{font-size: 0.8rem !important;padding: 5px !important;gap: 5px !important;color: rgba(var(--sidebar-text-rgb),.8) !important;font-weight: 400 !important;}
.fav-ungrouped a i{font-size: 0.8rem !important;}
.sidebar-section-label{display: none;}
.fav-section-label{display: flex !important;}
.btn-fav-add-group{display: flex;align-items: center;justify-content: center;width: 26px;height: 26px;font-size: 0.9rem;padding: 0;border-radius: 6px;background-color: transparent;color: rgba(var(--sidebar-text-rgb),.8);transition: 0.2s;}
.btn-fav-add-group:hover{background-color: rgba(var(--accent-rgb), 0.1);color: var(--accent);}
.btn-fav-add-group i{margin-top: 2px;}
.form-control{height: 42px;border-radius: 12px !important;border: 1px solid var(--border);font-size: 0.9rem;padding: 0px 10px !important;}
textarea.form-control{border-radius: 16px !important;padding: 10px !important;height: 100px !important;}


.form-label{font-size: 0.9rem;margin-bottom: 2.5px;}
.notif-page-list{margin-left: auto;margin-right: auto;}
.notif-date-label{font-size: 1rem;letter-spacing: 0;}

.data-table-card .text-center.text-muted{font-size: 1rem !important;font-weight: 600;color: var(--text-muted) !important;}

.btn-icon-sm{padding: 0 10px;height: 32px;border-radius: 10px !important;font-size: 0.9rem !important;font-weight: 600 !important;}
.chat-tab-header span{font-size: 0.8rem !important;}
/* ── 전역 .form-check(2026-09-23 재설계) ──────────────────────────────
   예전엔 "알약 카드"(width 100px · height 42px · 회색 배경 · 가운데 정렬)였다.
   .form-check는 부트스트랩/Tabler 기본 클래스라 앱 전체 38개 화면의 모든
   체크박스·스위치가 이 회색 박스로 그려졌고, 그때마다 화면별 CSS로 되돌리는
   작업이 반복됐다(웹 IDE 새 프로젝트 폼 / 워크플로우 담당자 선택 /
   업체·플랜 기능 그리드 — 셋 다 이 규칙을 지우는 것 말고는 하는 일이 없었다).
   장식을 전부 걷어내고 "체크박스 + 라벨 한 줄"이라는 기본형으로 되돌린다.
   ⚠️ 알약·카드 형태가 필요한 곳은 전용 클래스를 따로 만들 것 —
   이 전역 선택자를 다시 꾸미면 앱 전체 체크박스가 또 같이 바뀐다. */
.form-check{
  display: flex; align-items: center; justify-content: flex-start; gap: .45em;
  width: auto; height: auto; min-height: 0; padding: 0;
  background: none; border: 0; border-radius: 0;
  font-size: 0.9rem; font-weight: 400; color: var(--text);
  flex-shrink: 0;
}
.form-check .form-check-input{margin: 0 !important;float: none;flex-shrink: 0;}
.form-check .form-check-label{margin: 0;cursor: pointer;}
.form-check .form-check-input:disabled ~ .form-check-label{cursor: default;opacity: .6;}

#datetimeRow{gap: 10px;}
#dateRow{gap: 10px;}
#dateRow .col:first-of-type{padding-right: 0;}
#dateRow .col:last-of-type{padding-left: 0;}
.form-select{height: 42px;border-radius: 12px;font-size: 0.9rem !important;padding: 0 10px;}
#evAssignees{border-radius: 16px;padding: 10px;height: auto;display: flex;}
#evAssignees option{margin-bottom: 5px;padding-bottom: 5px;border-bottom: 1px solid var(--border);}
#evAssignees option:last-of-type{margin-bottom: 0;padding-bottom: 0;border-bottom: 0;}
.modal-content{border-radius: 16px !important;}
.input-group-text{display: none;}
.mention-dept-select{height: 42px;appearance: none;border-radius: 12px;font-size: 0.9rem;padding: 0 10px;background-image: var(--bs-form-select-bg-img), var(--bs-form-select-bg-icon, none);
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 16px 12px;}

  .ck-toolbar{border-radius: 12px 12px 0 0 !important;}


@media (max-width: 1600px) {
  .dsh-section{flex-direction: column;}
  .dsh-section>.dsh-card{max-width: 100%;}
}
@media (max-width: 993px) {
  .btn-fav-add-group:hover{background-color: transparent;color: #343434;}
  .btn-fav-add-group:active{background-color: rgba(var(--accent-rgb), 0.1);color: var(--accent);}
  .btn-fav-proj{padding: 0 !important;}
  .kanban-card .btn-icon-xs{opacity: 1 !important}
  .topbar-title{font-size: 1.2rem;}
  .topbar-title a:hover{background-color: transparent;color: #343434 !important;}
  .topbar-title a:active{background-color: rgba(var(--accent-rgb), 0.1);color: var(--accent) !important;}
  .sidebar-nav{padding-right: 16px;}
  .sidebar-bottom{padding-right: 16px;}
  .sidebar-user{padding: 0;}
  .fav-section-label{display: none !important;}
  body{padding: 0;}
  .main-wrapper{border-radius: 0;}
  /* 모바일 브라우저의 주소창/시스템 내비게이션 바는 접혔다 펼쳐졌다 하며
     실제 보이는 영역을 수시로 바꾸는데, html/body의 height:100%는 주소창이
     "숨겨진" 상태 기준(가장 큰 값)으로 한 번 고정돼 그 차이만큼 .main-wrapper
     (overflow:hidden)의 아래쪽 — 매신저 채팅 입력창처럼 flex 맨 아래에 있는
     요소 — 가 실제 화면 밖으로 밀려나 가려진다(2026-09-18, "채팅 입력창이
     하단에 가려진다" 실사용 신고로 발견). 100dvh는 주소창 상태에 따라
     실시간으로 갱신되는 실제 가시영역이라 이 문제가 없음 — 미지원 브라우저는
     앞줄 vh 값이 폴백으로 남는다(calendar/index.html의 동일 패턴 참고). */
  html, body { height: 100vh; height: 100dvh; }
}
@media (max-width: 768px) {
  .kc-top{margin-bottom: 0;}
  .topbar-title{font-size: 1rem;}
}
/* 0821 신규 변수 */
:root {
  --sidebar-w: 240px;
}


/* 0825 */
.dsh-card{box-shadow: 0px 0px 8px rgba(0,0,0, 0.075) !important;}
.fav-group-drag-handle{color: rgba(var(--sidebar-text-rgb),.8) !important;height: 26px;display: flex;align-items: center;justify-content: center;padding: 0;padding-top: 1.5px;}
.fav-group-toggle{color: rgba(var(--sidebar-text-rgb),.8);font-size: 0.8rem;width: auto;height: 26px;display: flex;align-items: center;justify-content: center;}
.fav-group-name{color: rgba(var(--sidebar-text-rgb),1);}
.fav-group-header{padding: 5px !important;gap: 0px;}
.fav-folder-icon{margin-right: 5px;}
.fav-chevron{transform-origin: center center;}

.btn-fav-icon{width: 26px;height: 26px;color: rgba(var(--sidebar-text-rgb),.8);border-radius: 8px;display: flex;align-items: center;justify-content: center;padding: 0;opacity: 1 !important;padding-top: 2.5px;}
.btn-fav-icon:hover{color: #fff;}
.btn-fav-icon i{font-size: 0.8rem;}

.fav-ungrouped{max-width: 100% !important;height: auto !important;overflow-y: inherit !important;}
.sidebar-fav-wrap{max-height: 200px;overflow-y: auto;}

.sidebar-fav-wrap::-webkit-scrollbar{width: 4px;border-radius: 100px;background-color: rgba(255, 255, 255, 0.0);}
.sidebar-fav-wrap::-webkit-scrollbar-thumb{background-color: rgba(var(--accent-rgb), 0.4);border-radius: 100px;transition: 0.2s;}
.sidebar-fav-wrap:hover::-webkit-scrollbar-thumb{background-color: rgba(var(--accent-rgb), 0.6)}
.sidebar-section-label{padding-top: 10px;}

.fav-group-items{padding-left: 10px !important;}
.fav-group-items a{
    font-size: 0.8rem !important;
    padding: 5px !important;
    gap: 5px !important;
    color: rgba(var(--sidebar-text-rgb),.8) !important;
    font-weight: 400 !important;
}
.fav-group-items a i{font-size: 0.8rem !important;}
.sidebar.collapsed .fav-section-label{display: none !important;}

.fav-group{margin-bottom: 0;}
.badge-gitlab{height: 32px;border-radius: 10px;display: flex;align-items: center;transition: 0.2s;}
.badge-gitlab i{margin-top: 2.5px;}

.checklist-section{padding: 10px;border-radius: 12px;background-color: var(--bg);}
.att-section-title i{padding-top: 1px;}
.checklist-item{gap: 5px !important;}
.checklist-item input{margin-top: 0;}
.checklist-item button{border-radius: 100%;}
.side-section .assignee-list{margin-bottom: 0;}
.side-value{font-size: 1rem !important;}
.att-item{height: 42px;border-radius: 12px;padding: 0 10px;}
.att-name{font-size: 0.9rem;}
.file-upload-area{display: flex;align-items: center;justify-content: center;font-size: 0.9rem;font-weight: 600;gap: 5px;}
.side-label button{width: 26px;height: 26px;display: flex;align-items: center;justify-content: center;border-radius: 4px;}
.comment-avatar{border-radius: 8px;}
.btn-comment-action{width: 26px;height: 26px;border-radius: 4px;display: flex;align-items: center;justify-content: center;font-size: 1rem;}
.comment-section{padding: 16px;}
.comment-section .file-upload-area{height: 32px;display: flex;align-items: center;padding: 0 10px !important;border-radius: 10px;font-size: 0.9rem !important;}
#cardMoreFilePreview{margin-top: 0 !important;}
.kanban-card-inner .badge-gitlab{height: 26px;border-radius: 6px;}
.badge{display: inline-flex;align-items: center;border-radius: 100px;font-size: 0.8rem;padding: 2px 8px;gap: 2.5px;border: 1px solid transparent;line-height: inherit;}
.modal{overflow: hidden;min-height: 0;}
.modal-content{height: 100%;min-height: 0;width: 100%;max-width: 480px;}
.modal-dialog{min-height: 0;margin: 0 !important;transition: 0.2s;width: 100%;height: 100%;max-width: 100%;display: flex;justify-content: center;align-items: center;padding: 32px 0;}
.modal-body{
  height: 100%;
    min-height: 0;
    overflow-y: auto;
}
.modal-body::-webkit-scrollbar{width: 4px;border-radius: 100px;background-color: rgba(255, 255, 255, 0.0);}
.modal-body::-webkit-scrollbar-thumb{background-color: rgba(var(--accent-rgb), 0.4);border-radius: 100px;transition: 0.2s;}
.modal-body:hover::-webkit-scrollbar-thumb{background-color: rgba(var(--accent-rgb), 0.6)}

#evAssignees::-webkit-scrollbar{width: 4px;border-radius: 100px;background-color: rgba(255, 255, 255, 0.0);}
#evAssignees::-webkit-scrollbar-thumb{background-color: rgba(var(--accent-rgb), 0.4);border-radius: 100px;transition: 0.2s;}
#evAssignees:hover::-webkit-scrollbar-thumb{background-color: rgba(var(--accent-rgb), 0.6)}
#evAssignees::-webkit-scrollbar-track{margin-top: 12px;margin-bottom: 12px;}



.alert{padding: 10px 16px;border-radius: 16px;border-color: transparent !important;font-size: 0.9rem;}
.alert .btn-close{padding: 0;width: 32px;height: 32px;display: flex;align-items: center;justify-content: center;right: 10px;top: 50%;transform: translateY(-50%);}

.date-check-wrap{display: flex;gap: 10px;}
.input-wrap{display: flex;gap: 10px;}
#dateRow{display: flex;}
#datetimeRow{display: flex;}


@media (max-width: 993px) {
  .messenger-wrap{border-radius: 0 !important;}
  .topbar-actions .btn-outline-primary{background-color: #fff;}
  .main-wrapper{background-color: var(--bg);}
  .card-detail-layout{margin-bottom: 16px;}
  .dsh-kpi{background-color: #fff !important;}
  .proj-kpi{background-color: #fff;}
  .cal-kpi{background-color: #fff !important;}
}
@media (max-width: 840px) {
  
}
@media (max-width: 768px) {
  
}
@media (max-width: 640px) {
  .category-filter-row{justify-content: center;}
  .proj-filter-label{font-size: 1rem;margin-bottom: 4px;}
  .proj-filter-label i{font-size: 1rem;}
  .proj-filter-bar{justify-content: center;align-items: center;}
  .comment-input-area .comment-avatar{display: none;}
}
@media (max-width: 540px) {
  .chat-input-row textarea::placeholder{font-size: 0;}
}

@media (max-width: 480px) {
  .dsh-greeting{justify-content: center;flex-direction: column;align-items: center !important;text-align: center;}
}

/* ─── 2026-08-26 디자인 리프레시 — Bootstrap 기본 컴포넌트 액센트 오버라이드 ───
   지금까지 --accent 변수는 이 앱 자체 컴포넌트(사이드바/칸반/배지 등)에만 쓰였고,
   .btn-primary/.btn-outline-primary/링크/포커스링/체크박스 등 부트스트랩 기본
   컴포넌트는 --accent와 무관하게 부트스트랩 자체 기본 블루(#0d6efd)를 그대로
   쓰고 있었다(28개 이상 템플릿에서 btn-primary 사용) — 새 코랄 액센트와 뒤섞여
   보이지 않도록 여기서 한 번에 재정의한다. 부트스트랩 5.3의 .btn-primary 등은
   --bs-btn-* 값을 컴파일 시점에 리터럴로 굳혀둬서 :root의 --bs-primary만
   바꿔서는 반영되지 않아, background-color/border-color/color를 직접 덮어씀
   (style.css가 bootstrap.min.css보다 나중에 로드되므로 동일 특이도에서 승리). */
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

.btn-primary {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-check:checked + .btn-primary, .btn-primary.active {
  background-color: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
  color: #fff !important;
}
.btn-primary:focus, .btn-primary.focus {
  box-shadow: 0 0 0 .2rem rgba(var(--accent-rgb),.35);
}
.btn-outline-primary {
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}
.btn-outline-primary:hover, .btn-outline-primary:focus,
.btn-outline-primary:active, .btn-outline-primary.active {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 .2rem rgba(var(--accent-rgb),.15) !important;
}
.form-check-input:checked {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
}
.form-check-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 .2rem rgba(var(--accent-rgb),.15) !important;
}
.form-range::-webkit-slider-thumb { background-color: var(--accent); }
.form-range::-moz-range-thumb { background-color: var(--accent); }
.nav-pills .nav-link.active, .nav-pills .show>.nav-link { background-color: var(--accent) !important; }
.page-link { color: var(--accent); }
.page-item.active .page-link { background-color: var(--accent) !important; border-color: var(--accent) !important; }
.dropdown-item.active, .dropdown-item:active { background-color: var(--accent) !important; color: #fff !important; }
.text-primary { color: var(--accent) !important; }
.bg-primary { background-color: var(--accent) !important; }
.border-primary { border-color: var(--accent) !important; }
.spinner-border.text-primary, .spinner-grow.text-primary { color: var(--accent) !important; }

/* 칸반 카드 hover 보더도 톤온톤 웜보더로 */
.kanban-card:hover { border-color: #D8C9AC; }

.sidebar.collapsed .sidebar-nav{padding: 10px 10px 0 10px;}
.sidebar.collapsed .sidebar-user{padding: 0;}
.btn-logout{border-radius: 10px !important;}
.fc-col-header{width: 100% !important;}

.fc .fc-daygrid-body{width: 100% !important;}
.fc-scrollgrid-sync-table{width: 100% !important;}
#btnCardAiChatClose{background-color: rgba(255,255,255,.15);}
#btnCardAiChatClose:active{background-color: #fff;color: #d97706;}
.card-ai-chat-input-row{position: relative;}
.card-ai-chat-body textarea{height: 42px !important;border-radius: 8px !important;padding: 10px 10px 5px 10px !important;}
.card-ai-chat-body{padding: 16px !important;}
/* ⚠️ 예전엔 .card-ai-chat-body .btn(전체)에 42x42 정사각형을 강제했는데,
   원래 의도는 입력창 옆 전송 버튼(#btnCardAiChatSend, 아이콘만) 하나뿐이었다.
   그런데 "개발 모드" 로그(.cac-dev-log) 안 "중단" 버튼(아이콘+텍스트)까지
   같은 선택자에 걸려 42px 정사각형에 짓눌려 텍스트가 세로로 줄바꿈되는
   사고가 남(§CLAUDE.md ".table .btn{max-width:32px}" 사고와 동일 유형).
   전송 버튼 하나만 정확히 겨냥하도록 id 선택자로 좁힘. */
#btnCardAiChatSend{width: 42px;height: 42px;flex-shrink: 0;}
#cardAiChatEmpty{font-size: 0.9rem;}
.ask-ai-hint{font-size: 0.9rem !important;}

.card-ai-chat-body textarea::placeholder{color: transparent !important;}

.card-ai-chat-input-row {
  position: relative;
}
.card-ai-chat-input-row::after {
  content: "궁금한 점을 물어보세요 (Enter 전송 · Shift+Enter 줄바꿈)";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 14px;
  pointer-events: none;
}
.card-ai-chat-input-row:has(textarea:not(:placeholder-shown))::after {
  display: none;
}

.btn-outline-primary{background-color: #fff;}
.btn-outline-danger{background-color: #fff;}

@media (max-width: 993px) {
  .card-ai-chat-input-row::after {content: "궁금한 점을 물어보세요...";}

  .btn-outline-primary{border-color: var(--border) !important}
  .btn-outline-danger{border-color: var(--border) !important}
  .btn-outline-secondary{border-color: var(--border) !important;}
}

/* ─── 칸반 카드 일괄 선택(체크박스) — 프로젝트 상세/내 업무 공용 ─────
   평소엔 드래그 핸들만 보이고, "선택" 모드가 켜지면 그 자리를 체크박스로
   대체한다(동시 노출 시 드래그와 선택이 겹쳐 혼란스러워 상호배타 처리). */
.kc-select-check {
  display: none;
  width: 24px; flex-shrink: 0;
  align-items: center; justify-content: center;
  border-right: 1px solid var(--border);
  cursor: pointer;
  margin: 0;
}
.kc-select-check input { margin: 0; cursor: pointer; }
.kanban-board.select-mode .kc-drag-handle,
.kanban-cards.select-mode .kc-drag-handle { display: none; }
.kanban-board.select-mode .kc-select-check,
.kanban-cards.select-mode .kc-select-check { display: flex; }
.kanban-board.select-mode .kanban-card:hover,
.kanban-cards.select-mode .kanban-card:hover {
  transform: none; /* 선택모드에서는 카드가 드래그되지 않으므로 hover 들뜸 효과도 끔 */
}

/* 컬럼 헤더의 "이 컬럼 전체 선택" 체크박스 — 카드 개별 체크박스와 마찬가지로
   평소엔 숨기고 선택모드에서만 노출 */
.kc-select-all { display: none; margin: 0; cursor: pointer; }
.kc-select-all input { margin: 0; cursor: pointer; }
.kanban-board.select-mode .kc-select-all { display: flex; align-items: center; }

.bulk-action-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  padding: 10px 14px; margin-bottom: 14px;
  flex-wrap: wrap;
}
.bulk-action-count { font-size: .85rem; color: var(--text-muted); flex-shrink: 0; }
.bulk-action-buttons { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
/* 선택 여부가 한눈에 보이도록 좌측 액센트 바 + 카운트 강조(2026-09-01, 아래 참고) */
.bulk-action-bar { border-left: 4px solid var(--accent); }
.bulk-action-count b { color: var(--accent); font-size: 1rem; }

@media (max-width: 993px) {
}

/* ─── 2026-09-01 프로젝트·업무 화면 UX/UI 리프레시 ──────────────────
   대상: 프로젝트 목록(projects/list.html)·프로젝트 상세(projects/detail.html)·
   내 업무(tasks/index.html) — 세 화면이 공유하는 .kanban-board/.kanban-col/
   .kanban-card/.proj-kpi/.proj-filter-bar 컴포넌트에만 덧입힌다.
   마크업 구조·클래스명·id·JS(Sortable.js 드래그, 필터링, 일괄선택 등)는
   전혀 안 건드림 — 기존 "디자인 리뉴얼"들과 동일한 원칙(§CLAUDE.md
   "디자인 시스템" 참고). .kanban-board 클래스는 정확히 이 3개 화면에서만
   쓰여(grep으로 확인) 다른 화면에 영향이 없다. ── */

/* 2026-09-13 — 위 "트레이"+굵은 상단 액센트 바 조합이 레퍼런스 디자인(컬럼이
   페이지 배경 위에 얇은 테두리만으로 떠 있고, 상태는 헤더 안의 작은 점
   .col-dot 하나로만 표시)보다 훨씬 무거워("컨셉이 다르다" 피드백) 걷어냄.
   트레이 배경/굵은 테두리를 없애 컬럼이 본문 위에 바로 놓이게 하고, 상단
   액센트 바도 지운다 — 상태 구분은 원래부터 있던 .col-dot(위 359행)만으로
   충분하다. 마크업은 그대로, 순수 톤 다운. */
.kanban-board {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
}
.kanban-board .kanban-col { border-top: 1px solid var(--border); }
.col-title { font-family: var(--font-display); letter-spacing: -.01em; }

/* 카드 제목이 아주 길 때 컬럼마다 카드 높이가 들쭉날쭉해지는 것 방지(2줄 클램프).
   ⚠️ list.html의 프로젝트 카드는 class="kc-title d-block mt-2"라 부트스트랩
   .d-block{display:block!important}이 같이 걸려있다 — display를 !important
   없이 덮으면 조용히 무시돼 클램프가 안 먹는다(style.css가 bootstrap.min.css
   보다 나중에 로드되므로 동일 특이도에서 !important끼리는 이 규칙이 이김,
   §CLAUDE.md 위쪽 ".btn-primary !important" 오버라이드와 동일 원칙). */
.kc-title {
  display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 카드 hover 시 그림자에 액센트 톤을 살짝 얹어 브랜드 컬러가 더 드러나도록 */
.kanban-card:hover {
  box-shadow: 0 14px 30px rgba(15,15,20,.10), 0 3px 10px rgba(var(--accent-rgb),.10);
}

/* 우선순위 배지 — 텍스트 앞에 작은 점을 CSS ::before로만 추가(마크업 무변경,
   서버 렌더 카드·JS가 그 자리에서 추가하는 카드 전부에 자동 적용됨) */
.priority-badge::before {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin-right: 4px; background: currentColor; opacity: .75; flex-shrink: 0;
}

/* 빈 컬럼 — 밋밋한 텍스트 대신 점선 박스로("여기로 드래그해 놓으세요" 느낌의
   플레이스홀더 영역), 실제 표시 여부(JS의 d-none/display 토글)는 그대로 둠 */
.proj-col-empty, .task-empty-col, .kanban-cards .search-empty.col-search-empty {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  margin: 2px;
  background: rgba(255,255,255,.55);
}

/* 선택 체크박스 — form-check-input 클래스가 없어(§kc-select-check/kc-select-all
   마크업 참고) 그동안 브라우저 기본(파란) 체크박스가 그대로 노출되고 있었다.
   accent-color만으로 브랜드 코랄에 맞춤(마크업 변경 없음). */
.kc-card-checkbox, .kc-col-select-all { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }

/* "선택" 모드 토글 버튼 — 켜지면 부트스트랩 기본 회색(.btn-secondary)이 아니라
   액센트로 채워 지금 선택모드인지 바로 보이게 함(전역 .btn-secondary는 앱 전체
   모달 취소/닫기 버튼에도 광범위하게 쓰여 그대로 두고, id로 좁혀서만 적용). */
#btnToggleSelectMode.btn-secondary,
#btnToggleTaskSelectMode.btn-secondary {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}

/* 필터 바의 깔때기 아이콘을 KPI 아이콘과 같은 톤의 작은 배지로 */
.proj-filter-label {
  width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0;
  background: var(--accent-light); color: var(--accent);
  justify-content: center;
}
.proj-filter-label i { font-size: .9rem; }

/* KPI 카드 — 아이콘 색과 같은 톤의 얇은 좌측 액센트 바 + hover 시 아이콘 확대 */
.proj-kpi { position: relative; overflow: hidden; }
.proj-kpi::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--text-light);
}
.proj-kpi:has(.proj-kpi-ic.blue)::before   { background: var(--blue); }
.proj-kpi:has(.proj-kpi-ic.green)::before  { background: var(--lime); }
.proj-kpi:has(.proj-kpi-ic.violet)::before { background: #7c3aed; }
.proj-kpi:has(.proj-kpi-ic.amber)::before  { background: var(--yellow); }
.proj-kpi-ic { transition: transform .18s; }
.proj-kpi:hover .proj-kpi-ic { transform: scale(1.08); }
.proj-kpi-val { font-family: var(--font-display); }

/* 프로젝트 상세 설명 — 다른 화면(카드 상세/댓글/결재 등)과 공유하는 .ql-content
   자체는 안 건드리고, 프로젝트 설명 전용 래퍼(.proj-desc-card, projects/detail.html)
   에만 카드형 박스를 얹어 본문과 시각적으로 분리 */
.proj-desc-card {
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 14px 16px;
}

/* ═══════════════════════════════════════════════════════════════════
   2026-09-01 관리자 화면(admin + superadmin) UX/UI 리프레시
   대상: templates/admin/*.html, templates/superadmin/*.html — 사용자관리,
   부서/직급, 구독현황, 감사로그, 인증관리, AI개발현황, 업체관리, 플랜관리,
   AI사용량, 데스크톱앱버전, 결재유형설정. 전부 base.html을 그대로 상속하는
   일반 페이지라 body/컨테이너에 별도 스코프 클래스가 없다 — 마크업을
   건드리지 않고 이 화면들이 실제로 쓰는 클래스(.data-table-card, 부트스트랩
   card/badge/progress 등)를 전역으로 재정의하는 기존 방식(§CLAUDE.md
   "2026-08-26 Bootstrap 기본 컴포넌트 액센트 오버라이드"와 동일 원칙)을
   그대로 확장한다. 일부 화면(사용자관리/업체관리)에만 KPI 요약 타일을
   소폭 추가(§해당 템플릿 참고, 기존 .proj-kpi 패턴 재사용 — 새 컴포넌트
   신설 없음). ══════════════════════════════════════════════════════ */

/* ── 배지 색상 재매핑 — 부트스트랩 기본 초록/빨강/노랑/파랑이 브랜드
   크림+코랄 톤과 어긋나 보이던 것을 서브 액센트(--lime/--yellow/--blue/
   --coral 등)로 통일. .badge는 이미 pill 형태로 재정의돼 있어(위 .badge
   규칙) 배경/글자색만 덮어씀 — 앱 전체 화면(칸반 상태 배지 등 .badge.bg-*
   를 직접 안 쓰는 곳)에는 영향 없고, 이 색 조합을 실제로 쓰는 곳(주로
   관리자 화면의 상태/역할 배지)에서만 자연히 적용된다. */
.badge.bg-success        { background-color: var(--lime-bg) !important;   color: var(--lime-text) !important; }
.badge.bg-success-subtle { background-color: var(--lime-bg) !important;   color: var(--lime-text) !important; }
.badge.bg-danger         { background-color: var(--coral-bg) !important;  color: var(--coral-text) !important; }
.badge.bg-danger-subtle  { background-color: var(--coral-bg) !important;  color: var(--coral-text) !important; }
.badge.bg-warning        { background-color: var(--yellow-bg) !important; color: var(--yellow-text) !important; }
.badge.bg-warning-subtle { background-color: var(--yellow-bg) !important; color: var(--yellow-text) !important; }
.badge.bg-info           { background-color: var(--blue-bg) !important;   color: var(--blue-text) !important; }
.badge.bg-info-subtle    { background-color: var(--blue-bg) !important;   color: var(--blue-text) !important; }
.badge.bg-primary        { background-color: var(--accent-light) !important; color: var(--accent) !important; }
.badge.bg-primary-subtle { background-color: var(--accent-light) !important; color: var(--accent) !important; }
.badge.bg-secondary        { background-color: var(--border) !important; color: var(--text-muted) !important; }
.badge.bg-secondary-subtle { background-color: var(--border-light) !important; color: var(--text-muted) !important; }
.badge.bg-light             { background-color: var(--bg) !important; color: var(--text) !important; border-color: var(--border) !important; }
.badge.text-dark            { color: var(--text) !important; }

/* ── 부트스트랩 원시 카드(card.border-0.shadow-sm) — 구독현황/AI사용량/
   인증관리 요약타일/결재유형설정 등에서 광범위하게 쓰이는데, 지금까지
   순백 배경+회색 그림자로 .data-table-card(크림 보더+웜 그림자)와 톤이
   어긋나 있었다. border-0라 보더가 아예 없던 것도 카드끼리 경계가
   흐릿해 보이는 원인 — .data-table-card와 동일한 톤(연한 보더+웜 그림자)
   으로 통일. 다른 화면(카드 상세 등)에도 이 조합을 쓰는 카드가 있을 수
   있어 완전한 신규 규칙이 아니라 기존 --shadow-xs/--border 톤을 그대로
   입히는 수준으로 보수적으로 작성. */
.card.border-0.shadow-sm {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-xs) !important;
  transition: box-shadow .15s;
}
.card.border-0.shadow-sm:hover { box-shadow: var(--shadow) !important; }
.card .card-header.bg-transparent { border-color: var(--border) !important; }

/* progress 바 — 부트스트랩 기본 회색 트랙+원색 bar를 브랜드 톤으로.
   구독현황/AI사용량/superadmin 구독 모달의 사용량 바가 전부 이 조합. */
.progress { background-color: var(--bg) !important; border-radius: var(--radius-pill); overflow: hidden; }
.progress-bar.bg-primary { background-color: var(--accent) !important; }
.progress-bar.bg-success { background-color: var(--lime) !important; }
.progress-bar.bg-warning { background-color: var(--yellow) !important; }
.progress-bar.bg-danger  { background-color: var(--accent-hover) !important; }
.progress-bar.bg-info    { background-color: var(--blue) !important; }

/* alert — info/warning/danger 박스(구독현황 한도경고, 라이센스 가이드 등) */
.alert-info    { background-color: var(--blue-bg) !important;   color: var(--blue-text) !important;   border-color: transparent !important; }
.alert-warning { background-color: var(--yellow-bg) !important; color: var(--yellow-text) !important; border-color: transparent !important; }
.alert-danger  { background-color: var(--coral-bg) !important;  color: var(--coral-text) !important;  border-color: transparent !important; }
.alert-success { background-color: var(--lime-bg) !important;   color: var(--lime-text) !important;   border-color: transparent !important; }
/* .alert-light — Tabler는 이 변형을 "밝은 색 그 자체"(--tblr-light, 거의 흰색)로
   칠해 글자색까지 흰색이 된다(Bootstrap 5.3의 "어두운 글자+연회색 배경"과 반대).
   2026-09-17 Tabler 전환 이후 AI 요약/위험성 평가 결과 박스(카드·전자결재 첨부),
   전자계약·워크플로우 안내문이 전부 흰 배경에 흰 글자라 내용이 안 보였다 —
   앱 토큰으로 되돌린다. 이 박스들은 전부 `alert alert-light border`로 쓰는데
   위 .alert{border-color:transparent!important}가 .border 유틸까지 눌러
   테두리도 사라지므로 여기서 함께 되살린다. */
.alert-light   { background-color: var(--bg) !important;       color: var(--text) !important;        border-color: var(--border) !important; }
.alert-link { color: inherit !important; font-weight: 700; text-decoration: underline; }

/* 카드 안 아이콘(bi-*) 컬러 유틸리티 — 구독현황/AI사용량 등에서 항목별로
   text-success/text-warning/text-info를 아이콘 컬러로만 쓰는 곳이 많다.
   .card 스코프로 좁혀(전역 .text-success 자체는 배지/뱃지 텍스트 등 다른
   의미로도 쓰일 수 있어 건드리지 않음 — §CLAUDE.md "초록=성공은 브랜드와
   무관하게 통용" 원칙과 동일하게 범위를 좁게 유지) */
.card .text-success  { color: var(--lime-text) !important; }
.card .text-warning   { color: var(--yellow-text) !important; }
.card .text-info      { color: var(--blue-text) !important; }
.card .text-danger    { color: var(--coral-text) !important; }
.card .text-secondary { color: var(--text-muted) !important; }

/* 관리자 화면 큰 숫자 요약(라이센스관리 상단 4칸처럼 KPI 타일로 아직
   안 바꾼 곳) — .fs-2.fw-bold류 큰 숫자에 디스플레이 폰트를 입혀 통일감 */
.card .fs-2.fw-bold, .card .fs-3.fw-bold, .card .fs-4.fw-bold {
  font-family: var(--font-display);
}

/* 감사로그/결재유형설정 등에서 쓰는 code(슬러그, client_id 등) 태그 —
   기본 브라우저 monospace red가 아니라 브랜드 코랄 톤으로 */
code {
  background: var(--bg); color: var(--accent-hover);
  padding: 2px 6px; border-radius: 6px; font-size: .85em;
  font-family: var(--font-mono);
}
pre code { background: transparent; padding: 0; color: inherit; }
pre.bg-dark { background: var(--sidebar-bg) !important; border-radius: var(--radius-sm) !important; }

/* ── 부서/직급/사용자 관리 등 아이콘 배지 — bi-building/bi-award가
   부트스트랩 text-primary/text-warning 그대로라 브랜드와 어긋남 */
.data-table-card .bi-building.text-primary,
.data-table-card .bi-file-earmark-check.text-primary { color: var(--accent) !important; }
.data-table-card .bi-award.text-warning { color: var(--yellow-text) !important; }

/* ── 감사로그 테이블처럼 "상세" 컬럼에 긴 텍스트가 들어가는 경우,
   전역 table{white-space:nowrap}(위 규칙) 때문에 잘려 보이던 것 완화 */
#auditLogTable td, .data-table-card td.small.text-muted:not(.text-nowrap) {
  white-space: normal;
  word-break: break-word;
}

/* ── 사용자관리/업체관리 목록 상단 KPI 요약(.admin-kpi-row) — 기존
   .proj-kpi-row/.proj-kpi를 그대로 재사용하는 별칭. 색상 클래스도
   .proj-kpi-ic와 동일 규칙을 그대로 상속받는다(신규 스타일 없음,
   클래스명만 이 화면 맥락에 맞게 admin-*로 부여). */
.admin-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.admin-kpi { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-xs); transition: box-shadow .15s, transform .15s; position: relative; overflow: hidden; }
.admin-kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.admin-kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: var(--radius) 0 0 var(--radius); background: var(--text-light); }
.admin-kpi:has(.admin-kpi-ic.blue)::before   { background: var(--blue); }
.admin-kpi:has(.admin-kpi-ic.green)::before  { background: var(--lime); }
.admin-kpi:has(.admin-kpi-ic.amber)::before  { background: var(--yellow); }
.admin-kpi:has(.admin-kpi-ic.coral)::before  { background: var(--accent); }
.admin-kpi:has(.admin-kpi-ic.violet)::before { background: #7c3aed; }
.admin-kpi-ic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; flex-shrink: 0; transition: transform .18s; }
.admin-kpi:hover .admin-kpi-ic { transform: scale(1.08); }
.admin-kpi-ic.blue   { background: var(--blue-bg); color: var(--blue-text); }
.admin-kpi-ic.green  { background: var(--lime-bg); color: var(--lime-text); }
.admin-kpi-ic.amber  { background: var(--yellow-bg); color: var(--yellow-text); }
.admin-kpi-ic.coral  { background: var(--accent-light); color: var(--accent); }
.admin-kpi-ic.violet { background: #f5f3ff; color: #7c3aed; }
.admin-kpi-val { font-size: 1.4rem; font-weight: 700; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; font-family: var(--font-display); }
.admin-kpi-label { font-size: .76rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; }

/* ── 데이터 테이블 카드 — hover 시 살짝 뜨는 느낌 + 아바타를 코랄 톤으로 통일 */
.data-table-card { transition: box-shadow .15s; }
.data-table-card .table tbody tr { transition: background .12s; }

/* role-select 등 테이블 안 select — 포커스 시 브랜드 톤 링(이미 전역
   .form-select:focus 규칙이 있지만 테이블 안 select-sm은 select2 등과
   겹칠 수 있어 명시적으로 한 번 더 확인) */
.data-table-card select.form-select-sm:focus { border-color: var(--accent); }

/* ⚠️ 사용자관리 role-select(style="width:auto") 텍스트 잘림 버그 —
   전역 .form-select{padding:0 10px}가 부트스트랩 기본 padding-right
   (드롭다운 화살표 자리만큼 더 넓게 잡는 값)를 균등하게 눌러버려서,
   화살표 아이콘 배경이미지가 텍스트 뒷부분과 겹쳐 "관리자"가 "관리 자"
   처럼 잘려 보였다(실측: width:auto가 62px로 계산되며 "자" 글자가
   화살표에 가려짐). 이 select만 오른쪽 패딩을 화살표 폭만큼 넓히고
   최소 폭을 지정해 항상 셀렉트 텍스트 전체가 보이게 함 — 마크업/JS는
   무변경. */
.role-select { min-width: 92px; padding-right: 28px !important; }

/* ── 필터 카드(감사로그 상단 검색폼처럼 .card.border-0.shadow-sm 안에
   폼 필드가 나열되는 형태)는 배경을 살짝 낮춰(--bg) 위 데이터 테이블
   카드(--surface, 흰색)와 명도차로 구분되게 함 */
.admin-filter-card {
  background: var(--bg) !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: none !important;
}

/* ── 라이센스관리 상단 요약 4칸(.card.text-center)을 KPI 톤에 맞춤 */
.card.text-center .fs-2.fw-bold { font-family: var(--font-display); }

/* ── 구독현황(admin/subscription.html) 최상단 "현재 플랜" 요약 카드 —
   그 아래 사용량 KPI 4칸과 구분되도록 살짝 강조(좌측 액센트 바).
   .sub-plan-header(신설, subscription.html 최상단 카드 전용 클래스 추가)
   로 좁혀 다른 페이지의 카드에 영향 없게 함. */
.sub-plan-header.card.border-0.shadow-sm {
  border-left: 4px solid var(--accent) !important;
}

/* ── 모달 헤더 아이콘이 늘 --text 기본색이라 밋밋했던 것을 액센트로 */
.modal-title i { color: var(--accent); }

/* ── 업체관리/플랜관리의 "기능" 선택 그리드 — 전역 .form-check가 평범한
   한 줄이 된 뒤(위 규칙 참고) 수십 개가 나열되면 어디까지가 한 항목인지
   안 보여서, 이 그리드에만 의도적으로 "고를 수 있는 카드"를 입힌다.
   예전의 우연한 회색 박스와 달리 체크 상태가 테두리·배경으로 드러난다.
   :has() 미지원 브라우저에서는 평범한 한 줄로만 보인다(기능은 동일). */
.feature-check, .plan-feature-check { accent-color: var(--accent); }
.form-check:has(> .feature-check), .form-check:has(> .plan-feature-check) {
  width: 100%; padding: 8px 10px; gap: .55em;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background-color: var(--bg); color: var(--text-muted);
  transition: border-color .15s var(--ease-out), background-color .15s var(--ease-out);
}
/* 대부분의 기능은 켜져 있는 게 정상이라, 켠 항목을 코랄로 칠하면 화면이 온통
   코랄 벽이 된다 — 반대로 "끈 항목이 가라앉아" 보이게 한다. */
.form-check:has(> .feature-check:checked),
.form-check:has(> .plan-feature-check:checked) {
  background-color: var(--surface); color: var(--text);
  border-color: rgba(var(--accent-rgb), .45);
}
.form-check:has(> .feature-check:not(:disabled)):hover,
.form-check:has(> .plan-feature-check:not(:disabled)):hover { border-color: var(--accent); }
.form-check:has(> .feature-check:disabled) { opacity: .5; }

/* ── AI 사용량 페이지 기간 선택(.ai-usage-filter-bar 안 btn-group) —
   부트스트랩 기본 회색 active 상태를 브랜드 톤으로. 메일 작성 화면의
   "HTML/텍스트" 토글도 같은 조합(.btn-group .btn-outline-secondary.active)을
   쓰고 있어 전역으로 걸면 그쪽까지 영향받는다 — 이번 리프레시 범위가
   아니므로 ai_usage.html 필터 바 전용 클래스(신설)로 좁힘. */
.ai-usage-filter-bar .btn-outline-secondary.active {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}

@media (max-width: 768px) {
  .admin-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
/* ─── 2026-09-12 아트디렉션+모션 리프레시 ─────────────────────────
   "장난감 같다"는 피드백으로 만든 시안(대시보드/칸반/스타일토큰)을 실제
   화면에 반영 — 위 :root 토큰 교체(색상·라운드·그림자·서체)가 기본 바탕이고,
   여기서는 토큰만으로 안 되는 것(그라디언트 버튼, 호버 디테일, 진입 모션)만
   보탠다. prefers-reduced-motion 사용자는 전부 최종 상태로 즉시 표시. */
@keyframes fadeUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes growX  { from { transform:scaleX(0); } to { transform:scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* 버튼 — 단색 배경 위에 그라디언트+은은한 글로우 한 겹만 얹는다(의미색 배지에는 안 씀) */
.btn-primary {
  background-image: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
  box-shadow: var(--glow-accent);
  transition: box-shadow .18s var(--ease-standard), transform .18s var(--ease-standard), background-color .15s;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  box-shadow: 0 8px 22px rgba(225,97,60,.34);
  transform: translateY(-1px);
}

/* 칸반 카드 — 호버 시 좌측에 코랄 엣지가 살짝 나타남(선택 상태와는 별개 디테일) */
.kanban-card { position: relative; overflow: hidden; }
.kanban-card::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2.5px;
  border-radius: 2px; background: transparent; transition: background .18s var(--ease-standard);
}
.kanban-card:hover::before { background: var(--accent); }

/* 칸반 컬럼 진입 애니메이션 — 컬럼은 보드 뼈대라 드래그·필터 중 다시 그려지는
   빈도가 낮아(카드만 옮겨다님) 안전하게 순차 진입을 줄 수 있다. 카드 자체는
   드래그·페이징으로 자주 재생성돼 매번 다시 애니메이션되면 산만해질 수 있어
   진입 모션 대상에서 제외하고 호버 디테일만 남긴다. */
.kanban-board > .kanban-col { animation: fadeUp .5s var(--ease-out) both; }
.kanban-board > .kanban-col:nth-child(1) { animation-delay: 0ms; }
.kanban-board > .kanban-col:nth-child(2) { animation-delay: 60ms; }
.kanban-board > .kanban-col:nth-child(3) { animation-delay: 120ms; }

/* 칸반 드래그 중 고정 드롭존 — 카드가 많아 컬럼이 길어진 상태로 스크롤을
   내려도, 항상 화면 상단에 3개 컬럼 각각의 드롭 가능 영역을 보여준다
   (§CLAUDE.md "프로젝트 관리" 참고). 평소엔 화면 밖에 둬 레이아웃에 영향이
   없다가 드래그 시작 시(.kfz-active)에만 슬라이드로 나타난다. */
.kfz-bar {
  position: fixed; left: 50%; top: -80px;
  transform: translateX(-50%);
  display: flex; gap: 10px;
  padding: 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1500;
  opacity: 0; pointer-events: none;
  transition: top .2s var(--ease-out), opacity .2s var(--ease-out);
}
.kfz-bar.kfz-active {
  top: 16px; opacity: 1; pointer-events: auto;
}
.kfz-zone {
  display: flex; align-items: center; gap: 8px;
  min-width: 140px; padding: 14px 18px;
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 700; color: var(--text-muted);
  background: var(--bg);
  transition: border-color .15s, background .15s, color .15s;
}
.kfz-zone.sortable-ghost,
.kfz-zone.kfz-over {
  border-color: var(--accent); background: var(--accent-light); color: var(--text);
}
.kfz-zone .kanban-card, .kfz-zone .project-card, .kfz-zone .task-card { display: none; }

/* ─────────────────────────────────────────────────────────────
   회의록(2026-09-24 전면 재디자인) — 목록/작성(녹음·업로드)/상세 3화면 공용.
   메신저(.chat-*)와 분리된 전용 클래스, 새 색 없이 :root 토큰만 사용
   (화자별 색만 JS가 hsl()로 인라인 계산). 전역 .form-control 높이(42px)에 맞춤.
   ───────────────────────────────────────────────────────────── */

/* 공통: 상태 배지 */
.mm-status {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  padding: 2px 9px; border-radius: var(--radius-pill);
  font-size: .72rem; font-weight: 600; line-height: 1.6; white-space: nowrap;
  background: var(--bg); color: var(--text-muted);
}
.mm-status-completed { background: var(--lime-bg); color: var(--lime-text); }
.mm-status-processing { background: var(--blue-bg); color: var(--blue-text); }
.mm-status-failed { background: var(--coral-bg); color: var(--coral-text); }
.mm-status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: mmPulse 1.4s ease-in-out infinite; }
@keyframes mmPulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* 공통: 검색창(전역 .form-control 강제값을 안 타도록 input을 직접 꾸밈) */
.mm-search {
  position: relative; display: flex; align-items: center; flex: 1 1 260px; min-width: 0;
  height: 42px; padding: 0 12px 0 36px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.mm-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12); }
.mm-search > i { position: absolute; left: 13px; color: var(--text-light); font-size: .9rem; }
.mm-search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: .88rem; color: var(--text); }
.mm-search-sm { flex: 0 1 220px; height: 34px; }

/* 공통: 빈 상태 */
.mm-empty { text-align: center; padding: 56px 20px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.mm-empty > i { font-size: 2rem; color: var(--text-light); display: block; margin-bottom: 10px; }
.mm-empty-title { font-weight: 700; font-size: 1rem; }
.mm-empty-sub { color: var(--text-muted); font-size: .87rem; margin-top: 4px; }

/* ── 목록 ───────────────────────────────────────────────────── */
.mm-list-page { max-width: 1080px; }
.mm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.mm-stat {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.mm-stat-ic {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
  background: var(--accent-light); color: var(--accent);
}
.mm-stat-ic.is-blue { background: var(--blue-bg); color: var(--blue); }
.mm-stat-ic.is-yellow { background: var(--yellow-bg); color: var(--yellow); }
.mm-stat-ic.is-coral { background: var(--coral-bg); color: var(--coral-text); }
.mm-stat-num { font-size: 1.35rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mm-stat-label { font-size: .78rem; color: var(--text-muted); }

.mm-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.mm-seg {
  display: inline-flex; padding: 3px; gap: 2px; height: 42px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.mm-seg button {
  border: 0; background: transparent; padding: 0 12px; border-radius: 6px;
  font-size: .83rem; font-weight: 600; color: var(--text-muted); white-space: nowrap;
  transition: background .15s, color .15s;
}
.mm-seg button:hover { color: var(--text); }
.mm-seg button.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.mm-source-select { width: auto !important; min-width: 130px; }

.mm-group { margin-bottom: 22px; }
.mm-group-title { font-size: .78rem; font-weight: 700; color: var(--text-muted); letter-spacing: .02em; margin: 0 0 8px 2px; }
.mm-group-list {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.mm-item {
  display: flex; align-items: flex-start; gap: 16px; padding: 14px 16px;
  color: inherit; text-decoration: none; border-top: 1px solid var(--border-light);
  transition: background .15s;
}
.mm-group-list > .mm-item:first-child,
.mm-group-list > .mm-item.d-none + .mm-item { border-top: 0; }
.mm-item:hover { background: var(--bg); color: inherit; }
.mm-item:hover .mm-item-arrow { color: var(--accent); transform: translateX(2px); }
.mm-item-date {
  width: 44px; flex: none; text-align: center; padding: 4px 0;
  border-radius: 10px; background: var(--bg);
}
.mm-item:hover .mm-item-date { background: var(--surface); }
.mm-item-day { display: block; font-size: 1.15rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mm-item-wd { display: block; font-size: .7rem; color: var(--text-muted); }
.mm-item-body { flex: 1; min-width: 0; }
.mm-item-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mm-item-title { font-weight: 650; font-size: .96rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-item-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 3px; font-size: .78rem; color: var(--text-muted); }
.mm-item-meta span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.mm-item-meta i { font-size: .76rem; color: var(--text-light); }
.mm-item-summary {
  margin: 7px 0 0; font-size: .85rem; line-height: 1.55; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mm-item-summary.is-muted { color: var(--text-light); }
.mm-item-side { display: flex; align-items: center; gap: 10px; flex: none; align-self: center; }
.mm-item-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
  border-radius: var(--radius-pill); background: var(--bg); font-size: .75rem; color: var(--text-muted);
}
.mm-item-arrow { color: var(--text-light); transition: transform .15s, color .15s; }
#mmNoResult { margin-top: 4px; }

@media (max-width: 767px) {
  .mm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mm-stat { padding: 10px 12px; }
  .mm-seg { flex: 1 1 100%; }
  .mm-seg button { flex: 1; padding: 0 6px; }
  .mm-source-select { flex: 1 1 100%; }
  .mm-item { gap: 12px; padding: 12px; }
  .mm-item-chip { display: none; }
}

/* ── 작성(녹음 / 업로드) ─────────────────────────────────────── */
.mm-new { max-width: 1080px; }
.mm-new-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mm-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.mm-panel-title { font-size: 1rem; font-weight: 700; margin: 0 0 14px; }

.mm-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mm-tab {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1.5px solid transparent; color: var(--text-muted);
  transition: border-color .15s, background .15s, color .15s;
}
.mm-tab > i { font-size: 1.25rem; flex: none; }
.mm-tab b { display: block; font-size: .88rem; color: var(--text); }
.mm-tab small { display: block; font-size: .74rem; }
.mm-tab:hover { border-color: var(--border); }
.mm-tab.is-on { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }

.mm-rec { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 8px 6px; }
.mm-rec-state {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px;
  border-radius: var(--radius-pill); background: var(--bg);
  font-size: .76rem; font-weight: 600; color: var(--text-muted);
}
.mm-rec-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-light); }
.mm-rec[data-state="recording"] .mm-rec-state { background: var(--coral-bg); color: var(--coral-text); }
.mm-rec[data-state="recording"] .mm-rec-dot { background: #D93B30; animation: mmPulse 1.1s ease-in-out infinite; }
.mm-rec[data-state="paused"] .mm-rec-state { background: var(--yellow-bg); color: var(--yellow-text); }
.mm-rec[data-state="paused"] .mm-rec-dot { background: var(--yellow); }
.mm-rec[data-state="done"] .mm-rec-state { background: var(--lime-bg); color: var(--lime-text); }
.mm-rec[data-state="done"] .mm-rec-dot { background: var(--lime); }
.mm-rec-timer {
  font-size: 3rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 12px 0 4px;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.mm-rec[data-state="idle"] .mm-rec-timer { color: var(--text-light); }
.mm-rec-wave { width: 100%; max-width: 420px; height: 64px; margin: 6px 0 14px; color: var(--border); }
.mm-rec[data-state="recording"] .mm-rec-wave { color: var(--accent); }
.mm-rec[data-state="paused"] .mm-rec-wave { color: var(--text-light); }
.mm-rec[data-state="idle"] .mm-rec-wave { background: linear-gradient(var(--border), var(--border)) center / 100% 2px no-repeat; }
.mm-rec[data-state="done"] .mm-rec-controls { display: none; }
.mm-tab b { word-break: keep-all; }

.mm-rec-controls { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; min-height: 86px; }
.mm-rec-btn {
  width: 84px; height: 84px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 4px solid var(--coral-bg);
  transition: transform .15s var(--ease-standard), border-color .15s;
}
.mm-rec-btn:hover { transform: scale(1.04); border-color: rgba(217,59,48,.28); }
.mm-rec-btn:active { transform: scale(.97); }
.mm-rec-btn-core { width: 58px; height: 58px; border-radius: 50%; background: #D93B30; box-shadow: 0 6px 18px rgba(217,59,48,.35); }
.mm-rec-side, .mm-rec-stop {
  display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 20px;
  border-radius: var(--radius-pill); font-weight: 600; font-size: .9rem;
  transition: background .15s, transform .15s;
}
.mm-rec-side { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.mm-rec-side:hover { background: var(--bg); }
.mm-rec-stop { background: var(--text); border: 0; color: #fff; }
.mm-rec-stop:hover { background: #000; }
.mm-rec-side i, .mm-rec-stop i { font-size: 1.15rem; }
.mm-rec-review { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 440px; }
.mm-rec-review audio { width: 100%; }
.mm-rec-hint { margin: 14px 0 0; font-size: .82rem; color: var(--text-muted); max-width: 420px; }

.mm-upload { padding-top: 16px; }
.mm-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 230px; padding: 24px; text-align: center; cursor: pointer; margin: 0;
  border: 2px dashed var(--border); border-radius: var(--radius); background: var(--bg);
  transition: border-color .15s, background .15s;
}
.mm-drop > i { font-size: 2.2rem; color: var(--text-light); margin-bottom: 6px; transition: color .15s; }
.mm-drop b { font-size: .92rem; }
.mm-drop small { font-size: .78rem; color: var(--text-muted); }
.mm-drop:hover, .mm-drop.is-over { border-color: var(--accent); background: var(--accent-light); }
.mm-drop:hover > i, .mm-drop.is-over > i { color: var(--accent); }
.mm-file {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg);
}
.mm-file-ic {
  width: 44px; height: 44px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  background: var(--accent-light); color: var(--accent);
}
.mm-file-info { flex: 1; min-width: 0; }
.mm-file-name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-file-meta { font-size: .78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.mm-file-remove {
  width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--text-muted); flex: none;
}
.mm-file-remove:hover { background: var(--coral-bg); color: var(--coral-text); }
.mm-file-preview { width: 100%; margin-top: 12px; }

.mm-field { margin-bottom: 14px; min-width: 0; }
.mm-field .form-label { font-size: .82rem; font-weight: 600; margin-bottom: 5px; }
.mm-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mm-field-help { font-size: .75rem; color: var(--text-muted); margin-top: 5px; }
.mm-flow {
  list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border-light);
  font-size: .76rem; color: var(--text-muted);
}
.mm-flow li { display: inline-flex; align-items: center; gap: 5px; }
.mm-flow li + li::before { content: '›'; color: var(--text-light); margin-right: 1px; }
.mm-flow i { color: var(--accent); }

.mm-submit {
  display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.mm-submit-info { flex: 1; min-width: 0; }
.mm-submit-hint { font-size: .85rem; color: var(--text-muted); }
.mm-submit .btn { height: 42px; padding: 0 22px; flex: none; }

@media (max-width: 991px) {
  .mm-new-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575px) {
  .mm-panel { padding: 14px; }
  .mm-tab small { display: none; }
  .mm-rec-timer { font-size: 2.4rem; }
  .mm-field-row { grid-template-columns: 1fr; gap: 0; }
  .mm-submit { flex-direction: column; align-items: stretch; gap: 10px; }
}

/* ── 상세 ───────────────────────────────────────────────────── */
.mm-detail { max-width: 1360px; }
.mm-hero {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 14px;
}
.mm-hero-top { display: flex; align-items: flex-start; gap: 16px; }
.mm-hero-main { flex: 1; min-width: 0; }
.mm-hero-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.mm-src-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px;
  border-radius: var(--radius-pill); background: var(--bg); color: var(--text-muted);
  font-size: .72rem; font-weight: 600; line-height: 1.6;
}
.mm-hero-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; margin: 0; word-break: keep-all; overflow-wrap: anywhere; }
.mm-hero-actions { display: flex; gap: 6px; flex: none; }
.mm-hero-actions .dropdown-item { font-size: .86rem; }
.mm-hero-meta {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 20px;
  margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--border-light);
}
.mm-hero-meta > div { min-width: 0; }
.mm-hero-meta-wide { grid-column: 1 / -1; }
.mm-hero-meta dt { display: flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 600; color: var(--text-muted); margin-bottom: 3px; }
.mm-hero-meta dt i { color: var(--text-light); }
.mm-hero-meta dd { margin: 0; font-size: .88rem; overflow-wrap: anywhere; }
.mm-people { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-person {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px;
  border-radius: var(--radius-pill); background: var(--bg); font-size: .82rem;
}
.mm-person-av {
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700;
}

.mm-progress {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 14px;
}
.mm-steps { list-style: none; display: flex; margin: 0 0 14px; padding: 0; }
.mm-steps li {
  flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: .76rem; color: var(--text-light); text-align: center;
}
.mm-steps li::before {
  content: ''; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--border);
}
.mm-steps li:first-child::before { display: none; }
.mm-step-ic {
  position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
  background: var(--bg); border: 2px solid var(--border); color: var(--text-light);
}
/* 지난 단계 = 채움, 현재 단계 = 강조 + 깜빡임 */
.mm-progress[data-step="2"] li[data-step="1"], .mm-progress[data-step="3"] li[data-step="1"], .mm-progress[data-step="3"] li[data-step="2"],
.mm-progress[data-step="4"] li { color: var(--text-muted); }
.mm-progress[data-step="2"] li[data-step="1"] .mm-step-ic, .mm-progress[data-step="3"] li[data-step="1"] .mm-step-ic,
.mm-progress[data-step="3"] li[data-step="2"] .mm-step-ic, .mm-progress[data-step="4"] li .mm-step-ic {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.mm-progress[data-step="2"] li[data-step="2"]::before, .mm-progress[data-step="3"] li[data-step="2"]::before,
.mm-progress[data-step="3"] li[data-step="3"]::before { background: var(--accent); }
.mm-progress[data-step="1"] li[data-step="1"], .mm-progress[data-step="2"] li[data-step="2"], .mm-progress[data-step="3"] li[data-step="3"] {
  color: var(--text); font-weight: 600;
}
.mm-progress[data-step="1"] li[data-step="1"] .mm-step-ic, .mm-progress[data-step="2"] li[data-step="2"] .mm-step-ic,
.mm-progress[data-step="3"] li[data-step="3"] .mm-step-ic {
  background: var(--accent-light); border-color: var(--accent); color: var(--accent);
  animation: mmStepGlow 1.6s ease-in-out infinite;
}
@keyframes mmStepGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .35); } 50% { box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0); } }
.mm-progress-text { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .86rem; justify-content: center; text-align: center; }
.mm-progress-text .spinner-border { color: var(--accent); }
.mm-progress-note { flex-basis: 100%; font-size: .76rem; color: var(--text-muted); }

.mm-failed {
  display: flex; gap: 12px; padding: 16px 18px; margin-bottom: 14px;
  background: var(--coral-bg); border: 1px solid rgba(162,58,50,.18); border-radius: var(--radius);
}
.mm-failed-ic { color: var(--coral-text); font-size: 1.2rem; line-height: 1.3; }
.mm-failed-body { flex: 1; min-width: 0; }
.mm-failed-title { font-weight: 700; color: var(--coral-text); }
.mm-failed-msg { font-size: .87rem; margin-top: 2px; overflow-wrap: anywhere; }
.mm-failed-sub { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }

.mm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; }
.mm-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--border-light);
}
.mm-card-head h2 { display: flex; align-items: center; gap: 7px; font-size: .95rem; font-weight: 700; margin: 0; }
.mm-card-head h2 > i { color: var(--accent); }
.mm-card-count { font-size: .72rem; font-weight: 600; color: var(--text-muted); background: var(--bg); padding: 1px 8px; border-radius: var(--radius-pill); }
.mm-card-body { padding: 16px 18px; }
.mm-card-empty { padding: 28px 12px; text-align: center; color: var(--text-muted); font-size: .85rem; }
.mm-card-empty > i { display: block; font-size: 1.6rem; color: var(--text-light); margin-bottom: 6px; }

.mm-sum-lead { font-size: .92rem; line-height: 1.7; margin: 0 0 4px; }
.mm-sum-h { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--text-muted); margin: 18px 0 8px; }
.mm-sum-h span { font-weight: 600; background: var(--bg); padding: 0 7px; border-radius: var(--radius-pill); font-size: .72rem; }
.mm-sum-decisions, .mm-sum-actions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mm-sum-decisions li { display: flex; gap: 8px; font-size: .88rem; line-height: 1.55; }
.mm-sum-decisions i { color: var(--lime); font-size: .85rem; margin-top: 3px; flex: none; }
.mm-sum-actions li {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--border-light); border-radius: var(--radius-sm); font-size: .87rem; line-height: 1.5;
}
.mm-sum-owner {
  flex: none; max-width: 40%; padding: 1px 8px; border-radius: var(--radius-pill);
  background: var(--blue-bg); color: var(--blue-text); font-size: .76rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mm-sum-owner.is-none { background: var(--bg); color: var(--text-muted); }
.mm-sum-task { min-width: 0; }
.mm-sum-unclear {
  display: flex; gap: 8px; margin-top: 16px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--yellow-bg); color: var(--yellow-text); font-size: .82rem; line-height: 1.55;
}
.mm-sum-unclear i { margin-top: 2px; }

.mm-link-row { display: flex; gap: 8px; }
.mm-link-row .form-select { flex: 1; min-width: 0; }
.mm-link-row .btn { height: 42px; flex: none; padding: 0 16px; }
.mm-link-card { margin-top: 10px; }
.mm-link-card a {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-width: 0;
  border-radius: var(--radius-sm); background: var(--bg); color: var(--text); text-decoration: none; font-size: .86rem;
}
.mm-link-card a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-link-card a:hover { background: var(--accent-light); color: var(--accent); }
.mm-link-hint { font-size: .78rem; color: var(--text-muted); }

/* 본문 2컬럼 — 데스크톱은 나란히, 모바일은 세로 스택 */
.mm-split-row { display: flex; align-items: flex-start; gap: 14px; }
.mm-split-col { min-width: 0; }
.mm-split-summary { flex: 0 0 38%; }
.mm-split-chat { flex: 1 1 0; }
@media (max-width: 991px) {
  .mm-split-row { flex-direction: column; align-items: stretch; }
  .mm-split-summary { flex-basis: auto; }
}
@media (max-width: 767px) {
  .mm-hero { padding: 14px; }
  .mm-hero-top { flex-direction: column; gap: 10px; }
  .mm-hero-title { font-size: 1.15rem; }
  .mm-hero-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mm-steps li { font-size: .68rem; }
  .mm-search-sm { flex: 1 1 100%; }
}

/* 대화 내용 — 재생기 sticky + 화자 범례 + 말풍선 */
.mm-audio-sticky {
  position: sticky; top: 0; z-index: 5; background: var(--surface);
  padding: 12px 18px; border-bottom: 1px solid var(--border-light);
}
.mm-audio-player { width: 100%; height: 40px; display: block; }
/* 화상회의(jitsi_live) 녹화분은 영상 트랙도 있어 <video>로 재생 — id/이벤트는 <audio>와 같아 재생 JS 공유 */
.mm-video-player { width: 100%; max-height: 360px; border-radius: var(--radius-sm); background: #000; display: block; }
.mm-speakers { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px 0; }
.mm-speaker-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface);
  font-size: .8rem; font-weight: 600; color: var(--text);
  transition: border-color .15s, background .15s;
}
.mm-speaker-chip:hover { border-color: var(--accent); background: var(--accent-light); }
.mm-speaker-dot { width: 9px; height: 9px; border-radius: 50%; }
.mm-speaker-count { font-weight: 500; color: var(--text-muted); font-size: .72rem; }
.mm-chat-help { display: flex; align-items: center; gap: 5px; padding: 8px 18px 0; font-size: .74rem; color: var(--text-light); }
.mm-chat-list {
  display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 18px;
  max-height: 680px; overflow-y: auto; scroll-behavior: smooth;
}
.mm-chat-turn { display: flex; gap: 10px; align-items: flex-start; scroll-margin-top: 90px; }
.mm-chat-turn.mm-align-right { flex-direction: row-reverse; }
.mm-chat-turn.mm-align-right .mm-chat-meta { flex-direction: row-reverse; }
.mm-chat-turn.mm-align-right .mm-chat-bubble { margin-left: auto; }
.mm-chat-avatar {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  color: #fff; font-size: .8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.mm-chat-bubble {
  border: 1px solid transparent; border-radius: 14px;
  padding: 8px 13px 9px; max-width: 80%; cursor: pointer;
  transition: box-shadow .15s var(--ease-standard), border-color .15s;
}
.mm-chat-turn:not(.mm-align-right) .mm-chat-bubble { border-top-left-radius: 4px; }
.mm-chat-turn.mm-align-right .mm-chat-bubble { border-top-right-radius: 4px; }
.mm-chat-bubble:hover { border-color: var(--border); }
.mm-chat-turn.is-active .mm-chat-bubble {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15);
}
.mm-chat-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.mm-chat-speaker { font-weight: 700; font-size: .8rem; cursor: pointer; }
.mm-chat-speaker:hover { text-decoration: underline; }
.mm-chat-time { font-size: .72rem; color: var(--text-muted); font-family: var(--font-mono); cursor: pointer; }
.mm-chat-time:hover { color: var(--accent); text-decoration: underline; }
.mm-chat-text { font-size: .9rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .mm-chat-list { max-height: none; padding: 14px; }
  .mm-audio-sticky, .mm-speakers, .mm-chat-help { padding-left: 14px; padding-right: 14px; }
  .mm-chat-bubble { max-width: 88%; }
}
@media (prefers-reduced-motion: reduce) {
  .mm-status-dot, .mm-rec-dot, .mm-step-ic { animation: none !important; }
}

/* ── 회의록 메일 발송 — 받는 사람 선택 목록(메일 작성 창 주소록 모달의
 * .mail-ab-*와 동일 룩, 그쪽 스타일은 compose.html 인라인이라 재사용 불가) ── */
.mm-ab-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 4px; }
.mm-ab-group-label { font-size: .78rem; font-weight: 700; color: var(--text-muted); padding: 8px 4px 4px; }
.mm-ab-item { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; cursor: pointer; transition: background .12s; }
.mm-ab-item:hover { background: var(--bg); }
.mm-ab-item.disabled { opacity: .45; cursor: not-allowed; }
.mm-ab-item .form-check-input { margin: 0; flex-shrink: 0; }
.mm-ab-av { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-light); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; flex-shrink: 0; }
.mm-ab-info { flex: 1; min-width: 0; }
.mm-ab-name { font-size: .84rem; color: var(--text); font-weight: 600; }
.mm-ab-name .mm-ab-pos { font-weight: 400; color: var(--text-muted); font-size: .76rem; margin-left: 4px; }
.mm-ab-email { font-size: .76rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-ab-email.mm-ab-none { color: var(--text-light); font-style: italic; }
.kanban-board > .kanban-col:nth-child(4) { animation-delay: 180ms; }

/* ─────────────────────────────────────────────────────────────
   데스크톱 OS 셸(2026-09-18 신설, blueprints/desktop.py +
   static/js/desktop.js + templates/desktop/index.html) — 사이드바를
   완전히 대체하는 바탕화면 아이콘 런처. 아이콘을 누르면 기존 화면을
   iframe(base.html ?embed=1)으로 담은 "창"이 뜨는 브라우저 안 미니
   윈도우 매니저다. 기존 화면(iframe 안쪽)은 그대로 이 style.css를
   공유해 지금 톤을 유지하지만, OS 셸 자체(바탕화면/타이틀바/작업표시줄)는
   일부러 어두운 크롬으로 분리해 "운영체제" 느낌을 낸다 — 앱 내용은 밝고
   OS 크롬은 어두운, 실제 데스크톱 OS와 같은 대비 구조.
───────────────────────────────────────────────────────────── */

/* embed(=창 안에 뜬 기존 화면)일 때 — 사이드바가 없으니 여백 제거 */
.main-wrapper.embed-page { margin-left: 0 !important; }
/* ⚠️ §"0821" 섹션의 전역 body{padding:16px}(데스크톱 전용, ≤993px에서는 이미 0)와
   .main-wrapper{border-radius}가 창(iframe) 안에서도 그대로 적용돼, 창을
   최대화하면 사방에 바탕색(--bg) 프레임이 남았다("IDE 최대화하면 주변에 하얀색
   배경" 실사용 스크린샷 신고). 창 크롬 자체가 이미 프레임 역할이라 embed에서는
   둘 다 걷어내 내용이 창을 꽉 채우게 한다. */
body:has(> .main-wrapper.embed-page) { padding: 0; }
.main-wrapper.embed-page { border-radius: 0; }
.main-wrapper.embed-page .topbar { padding: 0 16px; height: 50px; }
/* 창 제목바에 이미 화면 이름이 떠 있어 상단바 제목은 중복(§base.html의
   embed-empty-check 스크립트 옆 주석 참고) — 분홍빛 장식 배경도 함께 제거.
   topbar_actions(실제 버튼)가 있는 화면은 이 bar 자체는 남되(버튼은 그대로),
   비어있으면 그 스크립트가 .topbar를 통째로 display:none 처리한다. */
.main-wrapper.embed-page .topbar-title { display: none; }
/* 창 안 상단바에 "실제로 자리를 차지하는" 버튼이 하나도 없을 때(액션이 아예
   없는 화면, 그리고 모바일에서 버튼이 전부 우하단 FAB(position:fixed)로 빠져
   나간 화면) 높이만 0으로 접는다 — base.html의 embed 스크립트가 이 클래스를
   붙였다 뗐다 한다(창 크기 변경에도 다시 판정).
   ⚠️ display:none을 쓰지 말 것 — FAB 버튼들이 이 상단바의 자손이라 통째로
   사라진다(§base.html 같은 스크립트 옆 주석). 높이만 접어야 FAB는 살아남는다. */
.main-wrapper.embed-page .topbar.is-actionless {
  height: 0; min-height: 0; padding-top: 0; padding-bottom: 0;
  border: 0; box-shadow: none;
}
.main-wrapper.embed-page .topbar::before { display: none; }

/* "채워서 쓰는" 화면(IDE/캘린더/메일/메신저/전자계약 편집기/구 프로젝트별 IDE)이
   창 안에서 사방에 흰 여백을 두른 채 떠 있던 문제(2026-09-18, 실사용자가 IDE를
   최대화한 스크린샷으로 직접 지적) — 이 화면들은 전부 자기 몫의 전체 높이를
   `height: calc(100vh - N px)`로 직접 계산해서 쓰는데, 그 N은 사이드바 있는
   기존 레이아웃(topbar 58px+main-content 상하패딩 56px+…) 기준으로 맞춰둔
   값이라 창 안(사이드바 없음, topbar 0~50px로 가변, main-content 패딩도
   아래에서 0으로 지움)에서는 항상 과하게 빼서 실제 필요한 것보다 훨씬 작게
   그려지고, 그 차이만큼이 흰 여백으로 남았다. 페이지마다 다른 매직넘버를
   다시 맞추는 대신 — `.main-content`를 flex 컨테이너로 바꾸고 이 화면들의
   높이를 `flex:1`로 "부모가 실제로 내준 만큼"만 채우게 해서, topbar가
   있든 없든(§"창 안 상단바" 항목 참고) 항상 정확히 맞는다. `.vsc-shell`/
   `.ide-wrap`은 자체 테두리+둥근 모서리까지 갖고 있어(원래 "패널처럼 보이는"
   디자인) 창 안에서는 창 자체가 이미 그 역할이라 그것도 함께 제거 —
   "패널 안에 또 패널" 이중 프레임을 없앤다. */
.main-wrapper.embed-page .main-content:has(
  > .vsc-shell, > .cal-page, > .mail-layout, > .messenger-wrap,
  > .ct-layout, > .ide-wrap
) {
  padding: 0;
  display: flex;
  flex-direction: column;
}
.main-wrapper.embed-page .vsc-shell,
.main-wrapper.embed-page .cal-page,
.main-wrapper.embed-page .mail-layout,
.main-wrapper.embed-page .messenger-wrap,
.main-wrapper.embed-page .ct-layout,
.main-wrapper.embed-page .ide-wrap {
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.main-wrapper.embed-page .vsc-shell,
.main-wrapper.embed-page .ide-wrap {
  border: none;
  border-radius: 0;
}

.embed-subnav {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 8px 16px; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.embed-subnav-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-pill);
  font-size: .8rem; font-weight: 600; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.embed-subnav-pill:hover { color: var(--text); border-color: var(--accent); }
.embed-subnav-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── OS 셸 전체 레이아웃 ── */
.os-shell {
  position: fixed; inset: 0;
  /* position:fixed 요소는 html/body와 무관하게 뷰포트(ICB) 기준으로 크기가
     정해지는데, 모바일 브라우저는 이 ICB를 기본적으로 "큰 뷰포트"(주소창/
     탭바가 숨겨진 상태 기준)로 잡는다 — 앱 시작 직후처럼 그 바가 실제로
     보이는 순간엔 셸 전체가 그만큼 더 크게 잡혀, 맨 아래 flex 항목인
     작업표시줄(.os-taskbar)이 화면 밖(브라우저 탭바 뒤)으로 밀려나 가려진다
     (2026-09-18, "시작하면 하단이 가려진다" 실사용 신고). dvh는 그 바의
     실제 상태를 반영하는 동적 뷰포트라 이 문제가 없음 — inset:0이 이미
     top/bottom:0을 걸어둔 상태에서 height를 명시하면 CSS 과잉제약 규칙상
     bottom이 재계산되어 자연히 안전하게 적용된다. */
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background:
    radial-gradient(circle at 12% 8%, rgba(225,97,60,.20), transparent 42%),
    radial-gradient(circle at 88% 18%, rgba(239,162,78,.14), transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(79,111,190,.14), transparent 45%),
    linear-gradient(160deg, #14151a 0%, #1b1c24 55%, #22212c 100%);
  overflow: hidden;
  font-family: var(--font-display);
}
.os-shell::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .5;
}

/* 사용자 지정 배경화면(2026-09-18 신설, §CLAUDE.md "배경화면 설정" 참고) —
   desktop.js가 로드 시점/저장 직후 #osShell에 이 클래스를 붙이고
   background-image만 인라인 style로 지정한다(사진 URL이 사용자마다 달라
   CSS에 고정할 수 없음) — background-size/position/repeat 같은 나머지
   배경 속성은 여기서 고정해두면 인라인 style이 건드리지 않는 한 그대로
   적용된다(둘 다 서로 다른 개별 속성이라 충돌 없음). 점무늬 오버레이(::before)는
   사진 위에서 과하게 도드라지지 않도록 옅게 낮춘다. */
.os-shell.has-wallpaper { background-size: cover; background-position: center; background-repeat: no-repeat; }
.os-shell.has-wallpaper::before { opacity: .18; }

.os-topbar {
  display: flex; align-items: center; gap: 14px;
  height: 54px; padding: 0 16px; flex-shrink: 0;
  background: rgba(18,19,24,.72); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative; z-index: 5000;
}
.os-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.os-brand img { width: 26px; height: 26px; flex-shrink: 0; }
.os-brand span { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.os-topbar-spacer { flex: 1; }
.os-topbar-actions { display: flex; align-items: center; gap: 6px; }
.os-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: transparent; border: none; color: rgba(255,255,255,.78);
  font-size: 1.05rem; cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s;
}
.os-icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.os-topbar .notif-bell .btn-notif { color: rgba(255,255,255,.78); width: 36px; height: 36px; }
.os-topbar .notif-bell .btn-notif:hover { background: rgba(255,255,255,.1); color: #fff; }
.os-topbar .notif-bell .btn-notif.active { background: var(--accent-light); color: var(--accent); }

.os-desktop { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.os-icons { position: absolute; inset: 0; }
/* 레이어 순서(2026-09-24): 아이콘 < 위젯(z 1) < 창(z 2). 두 컨테이너에 z-index를
   줘 각자 독립된 쌓임 맥락으로 만든다 — 위젯 안의 z-index(드래그 중 4000 등)가
   아무리 커도 창 층을 넘지 못한다. 예전엔 둘 다 z-index가 없어 드래그 중이거나
   pointercancel로 .dragging이 남은 위젯이 창(z 101~) 위로 올라와 앱을 가렸다. */
.os-windows { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.os-windows .os-window { pointer-events: auto; }

/* ── 바탕화면 아이콘 ── */
.os-icon {
  position: absolute; width: 88px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 4px; border-radius: var(--radius-sm);
  cursor: pointer; user-select: none; -webkit-user-select: none;
  touch-action: none;
  transition: background .12s;
}
.os-icon:hover, .os-icon.dragging { background: rgba(255,255,255,.08); }
.os-icon.dragging { z-index: 4000; background: rgba(255,255,255,.14); }
.os-icon-glyph {
  position: relative;
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  transition: transform .12s, background .12s;
}
.os-icon:hover .os-icon-glyph { background: rgba(255,255,255,.16); transform: translateY(-1px); }
.os-icon:active .os-icon-glyph { transform: scale(.92); transition-duration: .06s; }

/* 아이콘 우상단 안읽은 알림 배지(메신저 등, 2026-09-18 신설) — notif-badge와
   동일한 톤(빨강 원형)이되 어두운 바탕화면 위에서도 또렷하도록 흰 테두리를 둠. */
.os-icon-badge {
  position: absolute; top: -4px; right: -4px;
  background: #ef4444; color: #fff;
  font-size: .62rem; font-weight: 700; line-height: 1;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; border: 2px solid #14151a;
  display: flex; align-items: center; justify-content: center;
}
.os-icon-label {
  font-size: .74rem; font-weight: 600; color: #fff; text-align: center;
  line-height: 1.25; max-width: 84px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* 워크플로우 실행형 아이콘("바탕화면에 추가"로 만든 것, 2026-09-18 신설) —
   클릭하면 창이 아니라 즉시 실행(schedule_rules.py run-now)이라, 실행 중임을
   아이콘 자체에 스피너로 보여준다(창의 .os-window-spinner와 동일 @keyframes
   osSpin 재사용). 완료될 때까지 재클릭은 JS(runWorkflowIcon)에서 무시한다. */
.os-icon.os-icon-running { cursor: wait; }
.os-icon.os-icon-running .os-icon-glyph > i { opacity: .2; }
.os-icon.os-icon-running .os-icon-glyph::after {
  content: ''; position: absolute; inset: 12px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.25); border-top-color: var(--accent);
  animation: osSpin .7s linear infinite;
}

/* ── 창(윈도우) ── */
.os-window {
  position: absolute; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.2);
  min-width: 320px; min-height: 240px;
  border: 1px solid rgba(0,0,0,.08);
  opacity: 1; transform: scale(1);
  transition: opacity .2s var(--ease-out,ease), transform .2s var(--ease-out,ease), box-shadow .15s ease;
}
.os-window.maximized { border-radius: 0; }
.os-window.minimized { display: none; }
.os-window.focused { box-shadow: 0 28px 70px rgba(0,0,0,.5), 0 0 0 2px rgba(var(--accent-rgb),.55); }
/* 열기/닫기 — transform-origin은 JS가 아이콘 위치 기준으로 매 창마다 지정 */
.os-window.os-window-enter { opacity: 0; transform: scale(.08); }
.os-window.os-window-closing { opacity: 0; transform: scale(.92); pointer-events: none; }
/* 최대화/복원 토글 "그 순간"에만 위치·크기까지 부드럽게(desktop.js가 토글 시에만
   이 클래스를 잠깐 붙였다 뗀다 — 상시 걸어두면 드래그/리사이즈마다 버벅인다) */
.os-window.os-window-animating { transition: left .2s var(--ease-out,ease), top .2s var(--ease-out,ease), width .2s var(--ease-out,ease), height .2s var(--ease-out,ease), opacity .2s ease, transform .2s ease; }
.os-window-titlebar {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 8px 0 12px; flex-shrink: 0;
  background: var(--sidebar-bg); color: rgba(255,255,255,.92);
  cursor: move; user-select: none;
}
.os-window-titlebar i.os-window-icon { font-size: .95rem; color: var(--accent); flex-shrink: 0; }
.os-window-title {
  flex: 1; min-width: 0; font-size: .82rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.os-window-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  background: transparent; border: none; color: rgba(255,255,255,.65);
  font-size: .85rem; cursor: pointer; transition: background .12s, color .12s;
}
.os-window-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.os-window-btn.os-window-close:hover { background: #E5484D; color: #fff; }
/* 창 안(iframe)에서 목록→상세로 들어가면 되돌아갈 방법이 없던 문제(2026-09-18
   "상세쪽에 뒤로가기 버튼이 있어야 한다" 실사용 신고) — 제목바 왼쪽의 뒤로가기
   버튼. 돌아갈 곳이 없으면(첫 화면) 비활성. desktop.js가 창별 자체 URL 스택으로
   판정한다(§CLAUDE.md "데스크톱 OS 셸" 참고).
   ⚠️ 2026-09-18 재후속 — "뒤로가기 버튼이 잘 안 보인다" 실사용 신고로 수정.
   min/max/close와 똑같이 평소엔 투명하고 hover에만 배경이 뜨는 스타일을 그대로
   썼더니, 어두운 제목바 배경(--sidebar-bg) 위에서 옅은 회색 화살표 하나가
   바로 옆 채도 높은 앱 아이콘(--accent)에 묻혀 존재 자체를 못 알아채는
   경우가 많았다 — min/max/close는 누구나 아는 익숙한 창 조작 아이콘이라
   투명해도 형태만으로 인지되지만, 이 앱에서 새로 만든 뒤로가기는 그렇지
   않다. 활성 상태일 때만 옅은 배경 필을 상시 둘러 "눌러도 되는 버튼"임을
   hover 전에도 알 수 있게 하고, 아이콘도 완전한 흰색으로 밝혔다. */
.os-window-btn.os-window-back:not(:disabled) {
  background: rgba(255,255,255,.14); color: #fff;
}
.os-window-btn.os-window-back:not(:disabled):hover { background: rgba(255,255,255,.24); }
.os-window-btn.os-window-back:disabled {
  opacity: .28; cursor: default;
  background: transparent !important; color: rgba(255,255,255,.65) !important;
}
.os-window-body { flex: 1; min-height: 0; position: relative; }
.os-window-body iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--surface); }
/* iframe 로드 대기 중 표시 — 창은 클릭 즉시 뜨지만 내용은 서버 왕복만큼
   늦게 채워지므로, 그 사이를 빈 화면 대신 스피너로 채워 "먹통"처럼 안
   보이게 한다(desktop.js가 iframe load 이벤트에서 .hide를 붙이고 제거). */
.os-window-loading {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  opacity: 1; transition: opacity .18s ease;
}
.os-window-loading.hide { opacity: 0; pointer-events: none; }
.os-window-spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: osSpin .7s linear infinite;
}
@keyframes osSpin { to { transform: rotate(360deg); } }
/* 리사이즈 손잡이 8방향(모서리 4 + 변 4, 2026-09-18 후속 — "구석만 되고 박스
   전체가 안 된다"는 지적으로 네 변 전체를 잡을 수 있게 확장) — 변은 안쪽으로
   살짝 겹치는 얇은 띠, 모서리는 그 위에 겹치는 사각 그랩 영역(모서리가 변보다
   나중에 그려져 우선 반응). 화면 가장자리 살짝 밖으로도 손잡이를 걸쳐둬(음수
   오프셋) 실제로 잡기 쉽게 함. */
.os-window-resize { position: absolute; z-index: 4; }
.os-window-resize-n,
.os-window-resize-s { left: 10px; right: 10px; height: 8px; cursor: ns-resize; }
.os-window-resize-n { top: -4px; }
.os-window-resize-s { bottom: -4px; }
.os-window-resize-e,
.os-window-resize-w { top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
.os-window-resize-e { right: -4px; }
.os-window-resize-w { left: -4px; }
.os-window-resize-ne, .os-window-resize-nw,
.os-window-resize-se, .os-window-resize-sw { width: 16px; height: 16px; z-index: 5; }
.os-window-resize-ne { top: -4px; right: -4px; cursor: nesw-resize; }
.os-window-resize-nw { top: -4px; left: -4px; cursor: nwse-resize; }
.os-window-resize-se { bottom: -4px; right: -4px; cursor: nwse-resize; }
.os-window-resize-sw { bottom: -4px; left: -4px; cursor: nesw-resize; }
.os-window.maximized .os-window-resize { display: none; }

/* ── 시작 메뉴(전체 앱) ── */
.os-start-menu {
  position: absolute; top: 12px; left: 12px; width: 300px; max-height: 70vh;
  background: rgba(28,29,36,.94); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.1); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  display: flex; flex-direction: column; z-index: 6000;
  overflow: hidden;
  opacity: 0; transform: translateY(-8px) scale(.97); pointer-events: none;
  transition: opacity .15s ease, transform .15s var(--ease-out,ease);
}
.os-start-menu.d-none { display: none; }
.os-start-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.os-start-search-wrap { padding: 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.os-start-search-wrap input {
  width: 100%; border: none; outline: none; border-radius: 8px;
  padding: 8px 12px; font-size: .85rem;
  background: rgba(255,255,255,.08); color: #fff;
}
.os-start-search-wrap input::placeholder { color: rgba(255,255,255,.4); }
.os-start-list { overflow-y: auto; padding: 6px; }
.os-start-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  color: rgba(255,255,255,.88); font-size: .84rem; font-weight: 500;
  transition: background .12s;
}
.os-start-item:hover { background: rgba(255,255,255,.1); }
.os-start-item i { font-size: 1rem; width: 20px; text-align: center; color: var(--accent); flex-shrink: 0; }
.os-start-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-start-empty { padding: 16px; text-align: center; color: rgba(255,255,255,.4); font-size: .82rem; }

/* 시작 메뉴 각 앱 옆 "바탕화면에 표시" 스위치(2026-09-18 신설) — 바탕화면
   아이콘을 켜고 끄는 유일한 창구. 체크박스는 시각적으로 숨기고 트랙/썸
   두 span으로 pill 스위치를 그린다(새 컴포넌트 라이브러리 없이 순수 CSS). */
.os-start-toggle { position: relative; display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.os-start-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.os-start-toggle-track {
  display: block; width: 30px; height: 17px; border-radius: 999px;
  background: rgba(255,255,255,.18); transition: background .15s ease;
}
.os-start-toggle-thumb {
  display: block; width: 13px; height: 13px; margin: 2px; border-radius: 50%;
  background: #fff; transition: transform .15s var(--ease-out,ease);
}
.os-start-toggle input:checked ~ .os-start-toggle-track { background: var(--accent); }
.os-start-toggle input:checked ~ .os-start-toggle-track .os-start-toggle-thumb { transform: translateX(13px); }
.os-start-toggle input:focus-visible ~ .os-start-toggle-track { box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.5); }

/* 시작 메뉴 하단 "바탕화면 위젯" on/off 섹션(2026-09-18 신설) — 앱 목록과
   동일한 .os-start-item/.os-start-toggle을 그대로 재사용, 위젯은 검색
   필터 대상이 아니라 항상 목록 아래 고정 섹션으로 둔다. defs가 하나도
   없으면(그 회사/역할에 해당 위젯이 전부 미해당) :empty로 자동 숨김. */
.os-start-widgets { padding: 6px; border-top: 1px solid rgba(255,255,255,.08); }
.os-start-widgets:empty { display: none; padding: 0; border-top: none; }
.os-start-widgets-label {
  padding: 6px 10px 4px; font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: rgba(255,255,255,.35);
}
.os-start-item-widget { cursor: default; }

/* ── 작업표시줄(taskbar) ── */
.os-shell { --os-taskbar-h: calc(52px + env(safe-area-inset-bottom, 0px)); }
.os-taskbar {
  display: flex; align-items: center; gap: 10px;
  /* 아이폰 홈 인디케이터 영역만큼 아래 여백(safe-area, 없는 기기는 0) — 모바일 창
     높이 계산(--os-taskbar-h)과 반드시 같은 값을 써야 창 바닥이 딱 맞는다 */
  height: var(--os-taskbar-h); padding: 0 14px env(safe-area-inset-bottom, 0px); flex-shrink: 0;
  box-sizing: border-box;
  background: rgba(14,15,19,.82); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,.08);
  position: relative; z-index: 5000;
}
.os-taskbar-windows { flex: 1; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.os-taskbar-windows::-webkit-scrollbar { display: none; }
.os-taskbar-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.8);
  font-size: .8rem; font-weight: 600; white-space: nowrap;
  cursor: pointer; border: 1px solid transparent; max-width: 190px;
  transition: background .12s, border-color .12s;
  animation: osTaskbarIn .18s var(--ease-out,ease-out);
}
@keyframes osTaskbarIn { from { opacity: 0; transform: translateY(6px) scale(.92); } to { opacity: 1; transform: none; } }
.os-taskbar-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-taskbar-item:hover { background: rgba(255,255,255,.12); }
.os-taskbar-item.active { background: rgba(var(--accent-rgb),.28); border-color: rgba(var(--accent-rgb),.5); color: #fff; }
.os-clock { color: rgba(255,255,255,.75); font-size: .82rem; font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* ── 바탕화면 위젯(2026-09-18 신설 — 첫 번째: 시계+캘린더) ──
   .os-windows와 동일한 레이어 원칙: 컨테이너는 pointer-events:none으로
   비워두고 위젯 자신만 auto — 빈 영역 클릭은 아래 아이콘 레이어로 통과. */
.os-widgets { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
/* 모바일 전용 "아래로 스크롤하면 앱 아이콘" 안내(§아래 767px 블록에서 실제
   표시) — 데스크톱(아이콘 자유배치, 위젯도 겹치지 않게 각자 드래그)에서는
   애초에 문제 자체가 없어 기본은 항상 숨김. */
.os-scroll-hint { display: none; }
.os-widget {
  position: absolute; pointer-events: auto;
  background: rgba(28,29,36,.78); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.1); border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  color: #fff; user-select: none; -webkit-user-select: none;
  touch-action: none;
}
.os-widget.dragging { box-shadow: 0 24px 60px rgba(0,0,0,.5); opacity: .92; z-index: 4000; }

/* 위젯 크기 조절(2026-09-19) — 우하단 손잡이(desktop.js bindWidgetResize).
   크기를 한 번 정하면 .is-sized: 세로 flex로 바꿔 목록 영역(일정·메모·AI개발·
   비서 대화)이 남는 높이를 채우고 넘치면 그 안에서만 스크롤한다. */
.os-widget-resize {
  position: absolute; right: 2px; bottom: 2px; width: 16px; height: 16px;
  cursor: nwse-resize; z-index: 2; border-radius: 0 0 14px 0; opacity: .45;
  background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,.55) 50%, rgba(255,255,255,.55) 58%, transparent 58%, transparent 70%, rgba(255,255,255,.55) 70%, rgba(255,255,255,.55) 78%, transparent 78%);
}
.os-widget:hover .os-widget-resize, .os-widget.resizing .os-widget-resize { opacity: .9; }
.os-widget.resizing { z-index: 4000; user-select: none; }
.os-widget.is-sized { display: flex; flex-direction: column; overflow: hidden; }
.os-widget.is-sized > * { flex-shrink: 0; }
.os-widget.is-sized .os-widget-day { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.os-widget.is-sized .os-widget-day-list,
.os-widget.is-sized .os-widget-memo-list,
.os-widget.is-sized .os-widget-todo-list,
.os-widget.is-sized .os-widget-aidev-list,
.os-widget.is-sized .os-widget-asst-log { flex: 1 1 auto; min-height: 0; max-height: none; }

/* 위젯 개별 숨기기(X) 버튼(2026-09-18 신설) — 시작 메뉴 스위치와 동일한
   서버 저장(hidden)을 즉시 호출, 위젯 위에서 바로 끌 수 있는 지름길.
   드래그 손잡이(bindWidgetDrag가 button을 드래그 시작에서 제외)와 겹치지
   않게 항상 위젯 안쪽 우상단에 둔다. */
.os-widget-close {
  border: none; background: rgba(255,255,255,.08); color: rgba(255,255,255,.55);
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .72rem; padding: 0;
}
.os-widget-close:hover { background: rgba(255,255,255,.18); color: #ff8f8f; }
/* 시계 위젯 헤더엔 다른 버튼이 없어(memo/aidev는 이미 flex 헤더 안에 open
   버튼과 나란히 배치) 자체 positioning context를 만들어 absolute로 얹는다
   — 모바일에서 .os-widget이 position:static !important로 바뀌어도 이
   컨테이너는 항상 relative라 영향 없음. */
.os-widget-clock-top { position: relative; }
.os-widget-clock-top .os-widget-close { position: absolute; top: 0; right: 0; }

.os-widget-clock { width: 284px; padding: 16px 16px 12px; }
.os-widget-clock-top { cursor: move; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.os-widget-clock-time { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.os-widget-clock-time .t { font-size: 2.1rem; font-weight: 700; letter-spacing: .01em; line-height: 1.1; }
.os-widget-clock-time .s { font-size: .95rem; font-weight: 600; color: rgba(255,255,255,.45); }
.os-widget-clock-date { margin-top: 2px; font-size: .82rem; font-weight: 500; color: rgba(255,255,255,.65); }
.os-widget-cal { margin-top: 10px; }
.os-widget-cal-head { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.os-widget-cal-title {
  flex: 1; text-align: center; background: transparent; border: none; cursor: pointer;
  color: #fff; font-size: .86rem; font-weight: 700; padding: 4px; border-radius: 8px;
  transition: background .12s;
}
.os-widget-cal-title:hover { background: rgba(255,255,255,.08); }
.os-widget-cal-nav {
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: rgba(255,255,255,.6); cursor: pointer;
  border-radius: 8px; font-size: .78rem; transition: background .12s, color .12s;
}
.os-widget-cal-nav:hover { background: rgba(255,255,255,.1); color: #fff; }
.os-widget-cal-dow, .os-widget-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.os-widget-cal-dow span { text-align: center; font-size: .66rem; font-weight: 600; color: rgba(255,255,255,.45); padding: 2px 0; }
.os-widget-cal-dow span.is-sun { color: rgba(255,140,140,.75); }
.os-widget-cal-dow span.is-sat { color: rgba(140,175,255,.75); }
.os-widget-cal-day {
  position: relative; height: 30px; border: none; background: transparent;
  color: rgba(255,255,255,.85); font-size: .74rem; font-weight: 500;
  border-radius: 8px; padding: 0; cursor: pointer;
  transition: background .12s;
}
/* 날짜 클릭 = 선택(하단 일정 패널 갱신) — 캘린더 앱 여부와 무관하게 항상 동작 */
.os-widget-cal-day:hover { background: rgba(255,255,255,.1); }
.os-widget-cal-day.is-sun, .os-widget-cal-day.is-holiday { color: #ff8f8f; }
.os-widget-cal-day.is-sat { color: #8fb2ff; }
.os-widget-cal-day.is-selected:not(.is-today) {
  background: rgba(var(--accent-rgb), .16);
  box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), .85);
}
.os-widget-cal-day.is-today { background: var(--accent); color: #fff; font-weight: 700; }
.os-widget-cal-day.is-today:hover { background: var(--accent); }
.os-widget-cal-day .dot {
  display: none; position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.os-widget-cal-day.has-events .dot { display: block; }
.os-widget-cal-day.is-today .dot { background: #fff; }
.os-widget-cal-empty { height: 30px; }

/* 하단 "선택한 날짜의 일정" 패널 */
.os-widget-day { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.08); }
.os-widget-day-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.os-widget-day-label { flex: 1; font-size: .74rem; font-weight: 700; color: rgba(255,255,255,.6); }
.os-widget-day-open {
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: rgba(255,255,255,.55); cursor: pointer;
  border-radius: 8px; font-size: .74rem; transition: background .12s, color .12s;
}
.os-widget-day-open:hover { background: rgba(255,255,255,.1); color: #fff; }
.os-widget-day-list {
  display: flex; flex-direction: column; gap: 3px;
  max-height: 132px; overflow-y: auto; scrollbar-width: thin;
}
.os-widget-day-item {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 7px; border-radius: 7px; background: rgba(255,255,255,.05);
}
.os-widget-day-item .evdot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.os-widget-day-item .time {
  color: rgba(255,255,255,.5); font-size: .68rem; font-weight: 600;
  font-variant-numeric: tabular-nums; flex-shrink: 0; min-width: 32px;
}
.os-widget-day-item .title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: rgba(255,255,255,.88); font-size: .76rem; font-weight: 500;
}
.os-widget-day-item.is-holiday .evdot { background: #ff8f8f; }
.os-widget-day-item.is-holiday .time, .os-widget-day-item.is-holiday .title { color: #ff8f8f; }
.os-widget-day-empty { padding: 8px 6px; font-size: .74rem; color: rgba(255,255,255,.4); text-align: center; }

/* ── 바탕화면 위젯 — 메모(§CLAUDE.md "데스크톱 OS 셸" 위젯 참고) ── */
.os-widget-memo { width: 260px; padding: 14px 14px 10px; }
.os-widget-memo-head { display: flex; align-items: center; gap: 6px; cursor: move; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.os-widget-memo-title { flex: 1; font-size: .86rem; font-weight: 700; }
.os-widget-memo-open {
  border: none; background: rgba(255,255,255,.08); color: rgba(255,255,255,.75);
  width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.os-widget-memo-open:hover { background: rgba(255,255,255,.16); color: #fff; }
.os-widget-memo-add { margin-top: 8px; display: flex; gap: 6px; }
.os-widget-memo-add textarea {
  flex: 1; resize: none; height: 34px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; color: #fff; font-size: .76rem; padding: 7px 8px; font-family: inherit;
}
.os-widget-memo-add textarea::placeholder { color: rgba(255,255,255,.35); }
.os-widget-memo-add button {
  border: none; background: var(--accent); color: #fff; width: 34px; height: 34px; border-radius: 8px;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.os-widget-memo-add button:hover { background: var(--accent-hover); }
.os-widget-memo-list { margin-top: 10px; max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.os-widget-memo-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.06);
}
.os-widget-memo-item:hover { background: rgba(255,255,255,.12); }
.os-widget-memo-item .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.os-widget-memo-item .txt {
  flex: 1; min-width: 0; font-size: .76rem; color: rgba(255,255,255,.85); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.os-widget-memo-item .del {
  border: none; background: none; color: rgba(255,255,255,.35); flex-shrink: 0; opacity: 0; padding: 0;
  width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
}
.os-widget-memo-item:hover .del { opacity: 1; }
.os-widget-memo-item .del:hover { color: #ff8f8f; }
.os-widget-memo-empty { padding: 10px 4px; font-size: .74rem; color: rgba(255,255,255,.4); text-align: center; }
.os-widget-memo-item[data-color="yellow"] .dot { background: #FCEEA6; }
.os-widget-memo-item[data-color="pink"]   .dot { background: #F6D3DE; }
.os-widget-memo-item[data-color="green"]  .dot { background: #D3ECD1; }
.os-widget-memo-item[data-color="blue"]   .dot { background: #D3E3F6; }
.os-widget-memo-item[data-color="purple"] .dot { background: #E3D6F2; }
.os-widget-memo-item[data-color="gray"]   .dot { background: #E5E5E8; }

/* ── 바탕화면 위젯 — 할 일(todos.py, widget:todo) ── */
.os-widget-todo { width: 270px; padding: 14px 14px 10px; }
.os-widget-todo-head { display: flex; align-items: center; gap: 6px; cursor: move; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.os-widget-todo-title { flex: 1; font-size: .86rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.os-widget-todo-badge {
  font-size: .68rem; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.85); display: inline-flex; align-items: center; justify-content: center;
}
.os-widget-todo-badge.is-overdue { background: #d9534f; color: #fff; }
.os-widget-todo-open {
  border: none; background: rgba(255,255,255,.08); color: rgba(255,255,255,.75);
  width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.os-widget-todo-open:hover { background: rgba(255,255,255,.16); color: #fff; }
.os-widget-todo-add { margin-top: 8px; display: flex; gap: 6px; }
.os-widget-todo-add input {
  flex: 1; min-width: 0; height: 32px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; color: #fff; font-size: .76rem; padding: 0 9px; font-family: inherit;
}
.os-widget-todo-add input::placeholder { color: rgba(255,255,255,.35); }
.os-widget-todo-add input:focus { outline: none; border-color: rgba(255,255,255,.3); }
.os-widget-todo-add button {
  border: none; background: var(--accent); color: #fff; width: 32px; height: 32px; border-radius: 8px;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.os-widget-todo-add button:hover { background: var(--accent-hover); }
.os-widget-todo-list { margin-top: 10px; max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.os-widget-todo-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.06); transition: opacity .25s, background .15s;
}
.os-widget-todo-item:hover { background: rgba(255,255,255,.12); }
.os-widget-todo-item .chk {
  width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.45); background: none;
  flex-shrink: 0; padding: 0; display: flex; align-items: center; justify-content: center; color: transparent; font-size: .7rem;
}
.os-widget-todo-item .chk:hover { border-color: var(--accent); color: rgba(255,255,255,.6); }
.os-widget-todo-item.is-done { opacity: .45; }
.os-widget-todo-item.is-done .chk { background: var(--accent); border-color: var(--accent); color: #fff; }
.os-widget-todo-item.is-done .txt { text-decoration: line-through; }
.os-widget-todo-item .txt {
  flex: 1; min-width: 0; font-size: .76rem; color: rgba(255,255,255,.88);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.os-widget-todo-item.is-high .txt::before { content: '●'; color: #ff8f8f; font-size: .55rem; margin-right: 5px; vertical-align: 2px; }
.os-widget-todo-item .due { font-size: .66rem; color: rgba(255,255,255,.45); flex-shrink: 0; }
.os-widget-todo-item .due.is-today { color: #ffc46b; }
.os-widget-todo-item .due.is-overdue { color: #ff8f8f; }
.os-widget-todo-empty { padding: 10px 4px; font-size: .74rem; color: rgba(255,255,255,.4); text-align: center; }

.os-widget-aidev { width: 280px; padding: 14px 14px 10px; }
.os-widget-aidev-head { display: flex; align-items: center; gap: 6px; cursor: move; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.os-widget-aidev-title { flex: 1; font-size: .86rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.os-widget-aidev-open {
  border: none; background: rgba(255,255,255,.08); color: rgba(255,255,255,.75);
  width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.os-widget-aidev-open:hover { background: rgba(255,255,255,.16); color: #fff; }
.os-widget-aidev-list { margin-top: 10px; max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.os-widget-aidev-item { padding: 7px 8px; border-radius: 8px; cursor: pointer; background: rgba(255,255,255,.06); }
.os-widget-aidev-item:hover { background: rgba(255,255,255,.12); }
.os-widget-aidev-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.os-widget-aidev-item-top .name {
  flex: 1; min-width: 0; font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.9);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.os-widget-aidev-item-top .elapsed { flex-shrink: 0; font-size: .68rem; color: var(--accent, #E1613C); font-weight: 600; }
.os-widget-aidev-item-sub {
  margin-top: 2px; font-size: .68rem; color: rgba(255,255,255,.45);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.os-widget-aidev-empty { padding: 10px 4px; font-size: .74rem; color: rgba(255,255,255,.4); text-align: center; }

/* ── AI 개발 현황 위젯의 캐릭터(작은 로봇, 2026-09-23) ──────────────────
   desktop.js `aidevBotSvg()`가 만드는 인라인 SVG(외부 이미지·라이브러리 없음).
   상태는 위젯 루트의 `.is-working`/`.is-idle` 두 클래스로만 갈리고, 새 색은
   만들지 않고 기존 토큰(--accent/--accent-2)만 쓴다. 애니메이션은 전부
   transform/opacity라 레이아웃을 다시 계산하지 않으며, prefers-reduced-motion
   에서는 파일 하단 블록이 통째로 끈다(§"디자인 시스템" 원칙). */
.os-widget-aidev-stage { display: flex; align-items: center; gap: 10px; cursor: move; padding: 10px 2px 4px; }
.os-aidev-bot { width: 74px; height: 64px; flex-shrink: 0; overflow: visible; }
.os-widget-aidev-mood { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.os-widget-aidev-mood .line1 { font-size: .82rem; font-weight: 700; color: rgba(255,255,255,.85); }
.os-widget-aidev.is-working .os-widget-aidev-mood .line1 { color: var(--accent-2, #EFA24E); }
.os-widget-aidev-mood .line2 { font-size: .67rem; line-height: 1.35; color: rgba(255,255,255,.45); }

.os-aidev-shadow { fill: rgba(0,0,0,.28); }
.os-aidev-head { fill: #EDEEF3; }
.os-aidev-torso { fill: #D9DBE6; }
.os-aidev-ear { fill: rgba(255,255,255,.42); }
.os-aidev-visor { fill: #1E1F27; }
.os-aidev-antenna { stroke: #C9CBD6; stroke-width: 2.4; stroke-linecap: round; }
.os-aidev-bulb { fill: var(--accent, #E1613C); }
.os-aidev-desk { fill: rgba(255,255,255,.22); }
.os-aidev-arm path { fill: none; stroke: #A9ACBE; stroke-width: 5; stroke-linecap: round; }
.os-aidev-arm circle { fill: #FBFBFD; }
.os-aidev-eyes-closed path { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 2; stroke-linecap: round; }
.os-aidev-sparks circle { fill: var(--accent-2, #EFA24E); opacity: .7; }
.os-aidev-zzz text { fill: rgba(255,255,255,.5); font-size: 11px; font-weight: 700; }
/* SVG 요소를 제 중심 기준으로 키우거나 줄이려면 transform-box가 필요하다
   (기본값 view-box는 SVG 전체 좌표계 원점이 기준이라 엉뚱하게 날아간다). */
.os-aidev-eye, .os-aidev-core { transform-box: fill-box; transform-origin: center; }
.os-aidev-eye { fill: var(--accent-2, #EFA24E); }
.os-aidev-core { fill: var(--accent, #E1613C); }

/* 눈 뜬 모습↔감은 모습, 활동 점↔zZz는 상태별로 서로 배타 */
.os-aidev-eyes-closed, .os-aidev-sparks, .os-aidev-zzz { display: none; }
.os-widget-aidev.is-idle .os-aidev-eyes { display: none; }
.os-widget-aidev.is-idle .os-aidev-eyes-closed,
.os-widget-aidev.is-idle .os-aidev-zzz { display: block; }
.os-widget-aidev.is-working .os-aidev-sparks { display: block; }
.os-widget-aidev.is-idle .os-aidev-bulb,
.os-widget-aidev.is-idle .os-aidev-core { opacity: .3; }

/* 작업 중 — 몸 반동 + 손 타이핑(좌우 교차) + 눈·안테나·가슴등 깜빡임 */
.os-widget-aidev.is-working .os-aidev-bot-body { animation: os-aidev-bob 1.4s ease-in-out infinite; }
.os-widget-aidev.is-working .os-aidev-arm.is-l { animation: os-aidev-type .44s ease-in-out infinite; }
.os-widget-aidev.is-working .os-aidev-arm.is-r { animation: os-aidev-type .44s ease-in-out .22s infinite; }
.os-widget-aidev.is-working .os-aidev-eye { animation: os-aidev-blink 4.2s ease-in-out infinite; }
.os-widget-aidev.is-working .os-aidev-bulb { animation: os-aidev-pulse 1.1s ease-in-out infinite; }
.os-widget-aidev.is-working .os-aidev-core { animation: os-aidev-pulse 2.2s ease-in-out infinite; }
.os-widget-aidev.is-working .os-aidev-sparks circle { animation: os-aidev-spark 2.4s ease-out infinite; }
.os-widget-aidev.is-working .os-aidev-sparks circle:nth-child(2) { animation-delay: .8s; }
.os-widget-aidev.is-working .os-aidev-sparks circle:nth-child(3) { animation-delay: 1.6s; }
/* 대기 중 — 느린 숨쉬기 + zZz */
.os-widget-aidev.is-idle .os-aidev-bot-body { animation: os-aidev-breathe 3.8s ease-in-out infinite; }
.os-widget-aidev.is-idle .os-aidev-zzz text { animation: os-aidev-zzz 3.2s ease-out infinite; }
.os-widget-aidev.is-idle .os-aidev-zzz text:nth-child(2) { animation-delay: 1s; }
.os-widget-aidev.is-idle .os-aidev-zzz text:nth-child(3) { animation-delay: 2s; }

@keyframes os-aidev-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes os-aidev-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1.6px); } }
@keyframes os-aidev-type { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2.6px); } }
@keyframes os-aidev-blink { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.12); } }
@keyframes os-aidev-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes os-aidev-spark { 0% { opacity: 0; transform: translateY(6px); } 25% { opacity: .85; } 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes os-aidev-zzz { 0% { opacity: 0; transform: translate(0, 5px); } 25% { opacity: .75; } 100% { opacity: 0; transform: translate(7px, -9px); } }

/* ── AI 비서 위젯(2026-09-19, §ai_assistant.py) — 메모 위젯과 같은 톤 ── */
.os-widget-asst { width: 340px; padding: 14px 14px 10px; display: flex; flex-direction: column; }
.os-widget-asst-head { display: flex; align-items: center; gap: 6px; cursor: move; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.os-widget-asst-title { flex: 1; font-size: .86rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.os-widget-asst-title .bi { color: var(--accent, #E1613C); }
.os-widget-asst-reset {
  border: none; background: rgba(255,255,255,.08); color: rgba(255,255,255,.75);
  width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.os-widget-asst-reset:hover { background: rgba(255,255,255,.16); color: #fff; }
/* 답변은 복사할 수 있어야 해서 위젯 전역의 user-select:none을 여기서만 푼다 */
.os-widget-asst-log {
  margin-top: 10px; max-height: 360px; min-height: 120px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px; user-select: text; -webkit-user-select: text;
}
.os-asst-empty { font-size: .74rem; color: rgba(255,255,255,.5); display: flex; flex-direction: column; gap: 6px; padding: 4px 2px; }
.os-asst-chip {
  text-align: left; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: rgba(255,255,255,.85);
  border-radius: 8px; padding: 6px 8px; font-size: .74rem;
}
.os-asst-chip:hover { background: rgba(255,255,255,.12); }
.os-asst-msg { font-size: .78rem; line-height: 1.5; border-radius: 10px; padding: 7px 9px; word-break: break-word; }
.os-asst-user { align-self: flex-end; max-width: 85%; background: var(--accent, #E1613C); color: #fff; }
.os-asst-bot { align-self: stretch; background: rgba(255,255,255,.07); }
.os-asst-msg .p { margin: 0; }
.os-asst-msg .li { padding-left: 12px; position: relative; margin: 1px 0; }
.os-asst-msg .li::before { content: '•'; position: absolute; left: 2px; color: rgba(255,255,255,.5); }
.os-asst-msg .li.lv1 { margin-left: 12px; }
.os-asst-msg .li.lv2 { margin-left: 24px; }
.os-asst-msg .li.lv3 { margin-left: 36px; }
.os-asst-msg .li.lv1::before, .os-asst-msg .li.lv2::before, .os-asst-msg .li.lv3::before { content: '◦'; }
.os-asst-msg .li.ol { padding-left: 20px; }
.os-asst-msg .li.ol::before { content: none; }
.os-asst-msg .li.ol .num { position: absolute; left: 0; min-width: 16px; text-align: right; color: rgba(255,255,255,.6); font-variant-numeric: tabular-nums; }
.os-asst-msg .gap { height: 6px; }
.os-asst-msg .h { font-weight: 700; color: #fff; margin: 6px 0 2px; }
.os-asst-msg .h:first-child { margin-top: 0; }
.os-asst-msg .h1 { font-size: .9rem; }
.os-asst-msg .h2 { font-size: .85rem; }
.os-asst-msg .h3 { font-size: .8rem; }
.os-asst-msg strong { font-weight: 700; color: #fff; }
.os-asst-user strong { color: inherit; }
.os-asst-msg em { font-style: italic; }
.os-asst-msg code {
  font-family: var(--font-mono, ui-monospace, monospace); font-size: .72rem;
  background: rgba(255,255,255,.1); border-radius: 4px; padding: 0 4px; color: #ffd8b0;
}
.os-asst-msg pre.code {
  font-family: var(--font-mono, ui-monospace, monospace); font-size: .7rem; line-height: 1.45;
  background: rgba(0,0,0,.3); border-radius: 6px; padding: 6px 8px; margin: 4px 0;
  white-space: pre; overflow-x: auto; color: rgba(255,255,255,.9);
}
.os-asst-msg .quote { border-left: 2px solid rgba(255,255,255,.3); padding-left: 8px; color: rgba(255,255,255,.75); margin: 2px 0; }
.os-asst-msg hr { border: 0; border-top: 1px solid rgba(255,255,255,.15); margin: 6px 0; opacity: 1; }
.os-asst-msg .tbl { overflow-x: auto; margin: 4px 0; }
.os-asst-msg .tbl table { border-collapse: collapse; font-size: .72rem; min-width: 100%; }
.os-asst-msg .tbl th, .os-asst-msg .tbl td { border: 1px solid rgba(255,255,255,.14); padding: 3px 6px; text-align: left; vertical-align: top; word-break: keep-all; overflow-wrap: anywhere; }
.os-asst-msg .tbl th { background: rgba(255,255,255,.08); font-weight: 600; color: #fff; }
.os-asst-msg .tbl td:not(:first-child) { font-variant-numeric: tabular-nums; }
.os-asst-msg a { color: #9fc4ff; text-decoration: underline; margin-left: 2px; }
.os-asst-msg a.os-asst-open {
  text-decoration: none; font-size: .68rem; padding: 0 6px; border-radius: 6px;
  background: rgba(159,196,255,.15); margin-left: 4px;
}
.os-asst-steps { font-size: .72rem; color: rgba(255,255,255,.55); }
.os-asst-steps::before {
  content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 6px; vertical-align: -1px;
  border: 2px solid rgba(255,255,255,.25); border-top-color: var(--accent, #E1613C); border-radius: 50%;
  animation: osSpin .8s linear infinite;
}
.os-asst-action {
  margin-top: 8px; border: 1px solid rgba(225,97,60,.45); background: rgba(225,97,60,.1);
  border-radius: 8px; padding: 7px 8px;
}
.os-asst-action .sum { font-size: .75rem; }
.os-asst-action .btns { display: flex; gap: 6px; margin-top: 6px; }
.os-asst-action button { border: none; border-radius: 6px; font-size: .72rem; padding: 3px 10px; }
.os-asst-action .run { background: var(--accent, #E1613C); color: #fff; }
.os-asst-action .cancel { background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); }
.os-asst-action button:disabled { opacity: .5; }
.os-asst-action .result { margin-top: 6px; font-size: .72rem; }
.os-asst-action .result.ok { color: #9be7a8; }
.os-asst-action .result.err { color: #ff9f9f; }
.os-asst-action .result.muted { color: rgba(255,255,255,.5); }
.os-widget-asst-form { margin-top: 8px; display: flex; gap: 6px; }
.os-widget-asst-form textarea {
  flex: 1; resize: none; height: 36px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; color: #fff; font-size: .78rem; padding: 8px; font-family: inherit;
}
.os-widget-asst-form textarea::placeholder { color: rgba(255,255,255,.35); }
.os-widget-asst-form button {
  border: none; background: var(--accent); color: #fff; width: 36px; height: 36px; border-radius: 8px;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.os-widget-asst-form button:hover { background: var(--accent-hover); }
.os-widget-asst-form button:disabled { opacity: .5; }
@media (prefers-reduced-motion: reduce) { .os-asst-steps::before { animation: none; } }

/* ── 모바일(≤767px): 자유배치 대신 반응형 그리드, 창은 항상 풀스크린 ── */
@media (max-width: 767px) {
  .os-desktop { overflow-y: auto; display: flex; flex-direction: column; }
  .os-icons { position: static; display: grid; grid-template-columns: repeat(auto-fill, 76px); justify-content: space-between; gap: 4px; padding: 14px; }
  /* ⚠️ 2026-09-18 발견·수정 — .os-icon의 touch-action:none(데스크톱 자유배치
     드래그 제스처와 세로 스크롤 제스처 충돌 방지용, 위 컴포넌트 정의부 참고)이
     모바일에선 안 풀린 채 그대로 남아있었다. 모바일은 아이콘을 드래그하지 않고
     탭으로만 여는데도(bindIconInteraction의 isMobile() 분기) 이 속성 때문에
     아이콘 위에서 시작하는 터치는 브라우저 기본 스크롤 제스처 자체가 막혀,
     화면을 한 번 내려 아이콘 그리드가 보이는 상태가 되면 그 다음부턴 어떤
     터치도 아이콘에서 시작돼 스크롤이 아예 안 먹는 것처럼 보였다("내리고 나면
     못 올린다" 실사용 신고로 발견) — auto로 되돌려 기본 스크롤 제스처를 허용. */
  .os-icon { position: static !important; width: 76px; touch-action: auto;
    -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  /* 길게 눌러 순서 바꾸는 중(desktop.js bindMobileReorder) — 손가락 아래 다른 아이콘을
     찾을 수 있게 pointer-events를 끄고, 다른 아이콘 위로 뜨게 한다. */
  .os-icon.os-icon-reordering { position: relative !important; z-index: 4000; pointer-events: none;
    transition: none; background: rgba(255,255,255,.16); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
  /* 창도 .os-shell과 동일한 이유로 dvh 필요 — 모바일 풀스크린 창의
     하단(입력창/버튼 등)이 브라우저 탭바에 가려지는 걸 방지. */
  /* ⚠️ 2026-09-19 수정 — 예전엔 inset:0 + height:100dvh(화면 전체)였는데, 모바일에서도
     작업표시줄(.os-taskbar, z-index:5000)이 계속 떠 있어 모든 창의 바닥 52px(메신저
     입력창·저장 버튼 등)이 작업표시줄 뒤에 가려졌다("바닥이 먹힌다" 신고). 창은
     위에서부터 작업표시줄 바로 위까지만 차지한다 — bottom 대신 top+height(dvh)로
     잡는 이유는 위 .os-shell 주석과 같다(fixed의 bottom은 큰 뷰포트 기준이라
     브라우저 탭바 상태에 따라 어긋남). */
  .os-window { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: auto !important; width: 100% !important; height: calc(100vh - var(--os-taskbar-h)) !important; height: calc(100dvh - var(--os-taskbar-h)) !important; border-radius: 0; }
  .os-window-resize { display: none; }
  /* ⚠️ 2026-09-18 발견·수정 — `.os-topbar`(바탕화면 상단바, z-index:5000)가
     창(z-index는 포커스 스택용으로 훨씬 낮음)보다 항상 위에 그려지도록
     설계돼 있는데, 이건 데스크톱(창을 자유롭게 옮겨 topbar 아래로 보낼 수
     있어 topbar가 항상 눌러야 함)에서는 맞는 설계지만, 모바일은 창이
     `inset:0` 풀스크린이라 창 자신의 타이틀바(뒤로가기/최소화/최대화/닫기
     버튼, `.os-window-titlebar`)가 화면 맨 위 정확히 같은 자리에 그려지고도
     topbar에 완전히 가려 눌리지 않는 사고로 이어졌다(실측: 좌표까지 겹침
     확인) — "창 제목바 뒤로가기 버튼"(§CLAUDE.md 참고, 목록→상세처럼 창
     안에서 이전 화면으로 되돌아가는 유일한 방법)이 정작 모바일에서는
     아예 눌리지 않는 채로 반년 가까이 방치돼 있었던 셈. 최소화(작업표시줄
     탭)·닫기(뒤로가기 제스처/History 트랩)는 다른 경로로도 되지만, 창
     내부 뒤로가기는 이 버튼이 유일한 경로라 실질적 기능 손실이었다.
     최소화된 창(`.minimized`, display:none)은 화면에 없으므로 제외하고,
     실제로 보이는 창이 하나라도 있을 때만 바탕화면 상단바를 숨겨 그
     창의 타이틀바가 정확히 그 자리에서 그대로 눌리게 한다. */
  .os-shell:has(.os-window:not(.minimized)) .os-topbar { display: none; }
  .os-start-menu { left: 10px; right: 10px; width: auto; }
  .os-brand span { max-width: 120px; }
  /* 위젯은 아이콘 그리드 위에 정적 배치(드래그 없음, order로 DOM 순서보다
     먼저 보이게) — touch-action도 풀어 페이지 스크롤을 막지 않는다 */
  .os-widgets { position: static; pointer-events: auto; order: -1; padding: 14px 14px 0; }
  .os-widget { position: static !important; width: auto; touch-action: auto; }
  .os-widget-resize { display: none; }
  .os-widget-clock { width: auto; }
  .os-widget-clock-top { cursor: default; }
  .os-widget-memo { width: auto; }
  .os-widget-memo-head { cursor: default; }
  .os-widget-todo { width: auto; }
  .os-widget-todo-head { cursor: default; }
  .os-widget-aidev { width: auto; }
  .os-widget-aidev-head { cursor: default; }
  .os-widget-aidev-stage { cursor: default; }
  /* ⚠️ 2026-09-18 발견·수정 — 위젯 2개(시계+캘린더, 메모)를 합치면 세로
     길이가 뷰포트 하나를 거의 다 채워, 아이콘 그리드가 첫 진입 시점엔
     화면 밖으로 완전히 밀려나 있다(`.os-desktop`가 overflow-y:auto라
     스크롤 자체는 되지만, 아무 단서 없이 위젯 아래가 그냥 빈 배경처럼
     보여 "여기서 더 내려가면 앱이 있다"는 걸 알 방법이 없었다 — 실제
     모바일 화면 캡처로 재현·확인). 위젯 스택 바로 아래(아이콘 그리드
     바로 위, DOM에서도 `#osWidgets` 다음·`#osIcons` 이전)에 얇은 안내
     바를 하나 추가해 "앱 더보기"를 알려준다 — 새 스크롤 컨테이너나
     레이아웃 변경 없이 기존 flex 스택에 항목 하나만 끼워 넣는 최소
     변경. `desktop.js`가 `.os-desktop` 스크롤을 감지해 스크롤을 시작하면
     `.hide`를 붙여 사라지게 한다(계속 떠 있으면 아이콘 위를 가리므로). */
  /* position:sticky — 위젯이 몇 개든(뷰포트보다 훨씬 길어져도) 항상 스크롤
     영역 하단에 붙어 즉시 눈에 띈다. flex 흐름상 order로는 여전히 위젯
     바로 다음(아이콘 그리드 바로 위)에 있어, "그 사이에 안내가 있다"는
     자연스러운 순서를 유지 — 이 sticky 없이 일반 흐름에만 맡기면 위젯
     스택이 뷰포트를 넘는 순간 안내 자체도 함께 화면 밖으로 밀려나 아무
     효과가 없었다(최초 구현에서 실측으로 확인, 위젯 카드 바로 아래 몇
     px만 살짝 삐져나와 있었음). */
  .os-scroll-hint {
    display: flex; order: -1; align-items: center; justify-content: center;
    position: sticky; bottom: 6px; z-index: 2;
    gap: 6px; margin: 6px 14px 0; padding: 6px 0; flex-shrink: 0;
    color: rgba(255,255,255,.55); font-size: .74rem; font-weight: 600;
    opacity: 1; transition: opacity .25s ease;
  }
  .os-scroll-hint.hide { opacity: 0; pointer-events: none; }
  .os-scroll-hint i { animation: os-scroll-hint-bounce 1.6s ease-in-out infinite; }
  @keyframes os-scroll-hint-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .os-window, .os-window.os-window-enter, .os-window.os-window-closing, .os-window.os-window-animating,
  .os-start-menu, .os-taskbar-item, .os-icon-glyph, .os-window-loading,
  .os-scroll-hint, .os-scroll-hint i {
    transition: none !important; animation: none !important;
  }
  /* AI 개발 현황 캐릭터 — 애니메이션만 끄고 모습(뜬 눈/감은 눈, zZz)은 그대로
     둬 상태 구분은 유지된다. */
  .os-aidev-bot-body, .os-aidev-arm, .os-aidev-eye, .os-aidev-bulb,
  .os-aidev-core, .os-aidev-sparks circle, .os-aidev-zzz text {
    animation: none !important;
  }
}

/* ── 메모(memos.py, templates/memos/list.html) — 개인 스티키노트 그리드 ──
   위 바탕화면 위젯(.os-widget-memo)과 색상 팔레트를 공유하되, 이쪽은 어두운
   유리 패널이 아니라 밝은 배경의 일반 화면이라 별도 클래스로 분리했다. */
.memo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.memo-card {
  position: relative; border-radius: var(--radius); padding: 14px 14px 32px; min-height: 130px;
  border: 1px solid rgba(0,0,0,.06); box-shadow: var(--shadow-xs); cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform .15s var(--ease-standard), box-shadow .15s var(--ease-standard);
}
.memo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.memo-card.is-pinned { outline: 2px solid var(--accent); outline-offset: -2px; }
.memo-card-title { font-weight: 700; font-size: .92rem; margin-bottom: 4px; color: #24252b; }
.memo-card-content {
  flex: 1; font-size: .84rem; color: #3a3b42; white-space: pre-wrap; word-break: break-word;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical;
}
.memo-card-footer { margin-top: 8px; font-size: .7rem; color: rgba(0,0,0,.4); }
.memo-card-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.memo-card:hover .memo-card-actions, .memo-card.is-pinned .memo-card-actions { opacity: 1; }
.memo-card-pin, .memo-card-del {
  border: none; background: rgba(255,255,255,.65); color: #3a3b42; width: 26px; height: 26px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8rem;
}
.memo-card-pin:hover, .memo-card-del:hover { background: #fff; }
.memo-card.is-pinned .memo-card-pin { color: var(--accent); }
.memo-card-del:hover { color: #c0392b; }

.memo-card[data-color="yellow"], .memo-swatch[data-color="yellow"] { background: #FCEEA6; }
.memo-card[data-color="pink"],   .memo-swatch[data-color="pink"]   { background: #F6D3DE; }
.memo-card[data-color="green"],  .memo-swatch[data-color="green"]  { background: #D3ECD1; }
.memo-card[data-color="blue"],   .memo-swatch[data-color="blue"]   { background: #D3E3F6; }
.memo-card[data-color="purple"], .memo-swatch[data-color="purple"] { background: #E3D6F2; }
.memo-card[data-color="gray"],   .memo-swatch[data-color="gray"]   { background: #E5E5E8; }

.memo-color-picker { display: flex; gap: 8px; }
.memo-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.memo-swatch.is-selected { border-color: var(--text); box-shadow: 0 0 0 2px #fff inset; }

/* ── 할 일(todos.py, templates/todos/list.html) — 개인 체크리스트 ── */
.todo-wrap { max-width: 860px; }
.todo-hint { font-size: .82rem; color: var(--text-muted); margin: 0 0 14px; }
.todo-add {
  display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px 8px 14px;
  box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s;
}
.todo-add:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.todo-add-icon { color: var(--text-muted); font-size: 1.05rem; }
.todo-add-title { flex: 1; min-width: 0; border: none; outline: none; background: none; font-size: .95rem; padding: 6px 0; color: var(--text); }
.todo-add-opts { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.todo-add-opts .form-control, .todo-add-opts .form-select { height: 32px; min-height: 0; font-size: .8rem; }
.todo-add-opts .form-control { width: 140px; }
.todo-add-opts .form-select { width: 82px; }

.todo-bar { display: flex; align-items: center; gap: 12px; margin: 18px 0 10px; }
.todo-tabs { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; min-width: 0; }
.todo-tab {
  border: none; background: none; color: var(--text-muted); font-size: .84rem; font-weight: 600;
  padding: 6px 11px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px;
}
.todo-tab:hover { background: var(--bg); color: var(--text); }
.todo-tab.is-active { background: var(--text); color: #fff; }
.todo-tab .cnt { font-size: .72rem; font-weight: 700; opacity: .7; }
.todo-tab .cnt.is-danger { color: #d9534f; opacity: 1; }
.todo-tab.is-active .cnt.is-danger { color: #ffb3b0; }
.todo-search { max-width: 200px; }

.todo-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.todo-list:empty { display: none; }
.todo-row {
  position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s;
}
.todo-row:last-child { border-bottom: none; }
.todo-row:hover { background: var(--bg); }
.todo-row[data-priority="high"]::before {
  content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; background: #d9534f;
}
.todo-check {
  width: 22px; height: 22px; border-radius: 50%; border: 1.8px solid #b9bbc3; background: var(--surface);
  flex-shrink: 0; margin-top: 1px; padding: 0; display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: .85rem; transition: background .15s, border-color .15s, color .15s;
}
.todo-check:hover { border-color: var(--accent); color: var(--accent); }
.todo-row.is-done .todo-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.todo-body { flex: 1; min-width: 0; }
.todo-title { font-size: .92rem; color: var(--text); word-break: break-word; line-height: 1.45; }
.todo-row.is-done .todo-title { color: var(--text-muted); text-decoration: line-through; }
.todo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; font-size: .75rem; color: var(--text-muted); }
.todo-due.is-today { color: var(--accent); font-weight: 600; }
.todo-due.is-overdue { color: #d9534f; font-weight: 600; }
.todo-prio.is-high { color: #d9534f; }
.todo-note { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 160px; }
.todo-del {
  border: none; background: none; color: var(--text-muted); width: 28px; height: 28px; border-radius: 50%;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s;
}
.todo-row:hover .todo-del { opacity: 1; }
.todo-del:hover { background: #fdecea; color: #c0392b; }
.todo-foot { margin-top: 12px; display: flex; justify-content: flex-end; }

@media (max-width: 767px) {
  .todo-add { flex-wrap: wrap; padding: 10px 12px; }
  .todo-add-title { flex-basis: calc(100% - 30px); }
  .todo-add-opts { width: 100%; }
  .todo-add-opts .form-control { flex: 1; width: auto; }
  .todo-bar { flex-direction: column; align-items: stretch; }
  .todo-search { max-width: none; }
  .todo-del { opacity: 1; }
}

/* ── 회사 로고(2026-09-19, §CLAUDE.md "회사 로고") ─────────────────────
   회사가 올린 로고는 가로로 긴 워드마크일 수 있어 폭을 자동으로 두고 상한만 건다.
   사이드바·데스크톱 상단바가 둘 다 어두운 배경이라, 밝은 배경용으로 만든 로고도
   보이도록 흰 칩 위에 얹는다. */
.sidebar-brand-logo.is-company,
.os-brand img.is-company {
  width: auto; height: 30px; max-width: 132px;
  object-fit: contain; background: #fff; border-radius: 6px; padding: 3px 6px;
  flex-shrink: 0; box-sizing: border-box;
}
.os-brand img.is-company { height: 28px; max-width: 150px; }
.sidebar.collapsed .sidebar-brand-logo.is-company { max-width: 44px; padding: 3px; }
@media (max-width: 993px) {
  .sidebar-brand-logo.is-company { max-width: 44px; padding: 3px; }
  .os-brand img.is-company { max-width: 96px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   쇼핑몰 연동(2026-09-24 전면 재디자인) — templates/malls/*.html + static/js/malls.js 공용.
   화면마다 따로 두던 <style>(ml-/mo-/mp-/mc-/sg-/st-/rv-/op-/pf-/hs-)도 전부 여기로 모았다
   — 클래스 이름은 스크립트가 그리는 마크업과 짝이라 바꾸지 않았다(값만 새 디자인).
   주문 상태 색: 주문=노랑·입금=파랑·준비=보라·배송=초록·완료=회색·취소/반품/품절=코랄,
   항상 글자와 함께 쓴다(색만으로 구분하지 않음).
   ═══════════════════════════════════════════════════════════════════════ */
.mall-shell { --mx-violet:#6D5BD0; --mx-violet-bg:#EFEDFB;
  display:grid; grid-template-columns:212px minmax(0,1fr); gap:22px; align-items:start; max-width:1440px; }
.mall-main { min-width:0; display:flex; flex-direction:column; gap:14px; }
.mall-main > * { margin-bottom:0 !important; }

/* 왼쪽 메뉴 */
.mall-nav { position:sticky; top:12px; display:flex; flex-direction:column; gap:1px; padding:10px 8px;
            background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); }
.mall-nav-head { display:flex; align-items:center; gap:8px; padding:4px 10px 10px; margin-bottom:4px;
                 border-bottom:1px solid var(--border-light); font-size:.8rem; font-weight:700; color:var(--text-muted); }
.mall-nav-head i { color:var(--accent); font-size:1rem; }
.mall-nav a { text-decoration:none; color:var(--text); }
.mall-nav-top { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px;
                font-size:.86rem; font-weight:600; transition:background .15s, color .15s; }
.mall-nav-top i { color:var(--text-light); font-size:1rem; width:18px; text-align:center; transition:color .15s; }
.mall-nav-top span { flex:1; min-width:0; }
.mall-nav-top:hover { background:var(--bg); }
.mall-nav-top:hover i { color:var(--text-muted); }
.mall-nav-top.active { background:var(--accent-light); color:var(--accent); }
.mall-nav-top.active i, .mall-nav-top.active-parent i { color:var(--accent); }
.mall-nav-top.active-parent { color:var(--text); }
.mall-nav-sub { display:none; flex-direction:column; gap:1px; margin:2px 0 6px 19px; padding-left:10px; border-left:1px solid var(--border); }
.mall-nav-group.open .mall-nav-sub { display:flex; }
.mall-nav-sub a { display:flex; align-items:center; justify-content:space-between; gap:6px;
                  padding:6px 10px; font-size:.82rem; color:var(--text-muted); border-radius:6px; }
.mall-nav-sub a:hover { color:var(--text); background:var(--bg); }
.mall-nav-sub a.active { color:var(--accent); font-weight:700; background:var(--accent-light); }
.mall-nav-badge { font-style:normal; font-size:.68rem; font-weight:700; min-width:18px; padding:0 6px; line-height:1.55;
                  border-radius:999px; background:var(--accent); color:#fff; text-align:center; }

/* 화면 머리말(제목 · 한 줄 설명) */
.mall-head { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.mall-crumb { font-size:.76rem; color:var(--text-muted); display:flex; align-items:center; gap:5px; }
.mall-crumb i { font-size:.7rem; color:var(--text-light); }
.mall-head h1 { font-size:1.35rem; font-weight:700; letter-spacing:-.01em; margin:2px 0 0; }
.mall-head p { margin:3px 0 0; font-size:.84rem; color:var(--text-muted); max-width:760px; }

@media (max-width:993px) {
  .mall-shell { grid-template-columns:minmax(0,1fr); gap:12px; }
  .mall-nav { position:static; flex-direction:row; flex-wrap:nowrap; overflow-x:auto; padding:5px; gap:3px; }
  .mall-nav-head { display:none; }
  .mall-nav-group { display:contents; }
  .mall-nav-top { flex:none; white-space:nowrap; padding:7px 11px; font-size:.82rem; }
  .mall-nav-top.active-parent { background:var(--accent-light); color:var(--accent); }
  .mall-nav-sub, .mall-nav-group.open .mall-nav-sub { display:none; }
  /* 모바일: 현재 대분류의 하위 메뉴는 머리말 위 칩 줄(_layout.html .mall-subchips)로 */
  .mall-head h1 { font-size:1.15rem; }
}
.mall-subchips { display:none; }
@media (max-width:993px) {
  .mall-subchips { display:flex; gap:6px; overflow-x:auto; padding-bottom:2px; }
  .mall-subchips a { flex:none; white-space:nowrap; font-size:.8rem; font-weight:600; text-decoration:none;
                     color:var(--text-muted); background:var(--surface); border:1px solid var(--border); border-radius:999px; padding:5px 12px; }
  .mall-subchips a.active { background:var(--accent); border-color:var(--accent); color:#fff; }
  .mall-subchips .mall-nav-badge { margin-left:4px; }
  .mall-subchips a.active .mall-nav-badge { background:#fff; color:var(--accent); }
}

/* ── 공용 부품 ─────────────────────────────────────────────── */
.mx-panel, .ml-panel, .mc-conn, .mc-guide, .hs-hero {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px 20px; min-width:0; }
.mx-panel.is-error, .mc-conn.is-error { border-color:rgba(162,58,50,.45); box-shadow:inset 3px 0 0 var(--coral-text); }
.mx-panel h3, .ml-panel h3 { font-size:.95rem; font-weight:700; margin:0 0 14px; display:flex; align-items:center;
                              justify-content:space-between; gap:8px; flex-wrap:wrap; min-width:0; }
.mx-panel h3 > span:first-child { display:inline-flex; align-items:center; gap:6px; flex-wrap:wrap; min-width:0; }
.mx-panel h3 > span:last-child:not(:first-child) { display:inline-flex; gap:6px; flex-wrap:wrap; }
.ml-panel h3 > .btn, .mx-panel h3 .btn { flex:none; }

/* 필터 줄 — 흰 카드 한 줄, 높이 통일 */
.mx-filters, .mp-filters { display:flex; gap:8px; flex-wrap:wrap; align-items:center; padding:10px 12px;
                           background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); }
.mx-panel .mx-filters { padding:0; border:0; background:none; }
.mx-filters .form-control, .mx-filters .form-select, .mp-filters .form-control, .mp-filters .form-select {
  width:auto; max-width:100%; height:38px !important; border-radius:8px !important; font-size:.86rem !important; }
.mx-filters input[type=text], .mp-filters input[type=text] { flex:1 1 200px; min-width:160px; }
.mx-filters > .btn, .mp-filters > .btn { height:38px; }

/* 표 — 흰 카드에 담아 머리행은 옅게 */
/* 아이콘+글자 버튼 — 플렉스 안에서 사이 공백이 사라져 붙어 보이던 것 */
.mall-main .btn, .mall-main ~ .modal .btn { gap:5px; }
/* 표 안 입력칸 — 전역 42px는 줄을 너무 두껍게 만든다 */
.mall-main .table .form-control, .mall-main .table .form-select { height:34px !important; border-radius:8px !important; font-size:.84rem !important; padding-top:0 !important; padding-bottom:0 !important; }
.mall-main .table-responsive { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); }
.mx-panel .table-responsive, .ml-panel .table-responsive, .modal .table-responsive { border:0; border-radius:0; background:none; }
.mall-main .table { margin:0; font-size:.86rem; }
.mall-main .table > thead th { background:var(--bg); color:var(--text-muted); font-size:.74rem; font-weight:600;
                               text-transform:none; letter-spacing:0; border-bottom:1px solid var(--border); white-space:nowrap; padding:10px 12px; }
.mall-main .table > tbody td { padding:10px 12px; border-color:var(--border-light); vertical-align:middle; }
.mall-main .table > tbody tr:hover > td { background:rgba(15,15,20,.015); }
.mall-main .table-responsive .table > tbody tr:last-child td { border-bottom:0; }
.mx-table td, .mx-table th { vertical-align:middle; }
.mx-table .sub, .mp-sub { font-size:.76rem; color:var(--text-muted); }

/* 수치 칸 */
.mx-kpis, .ml-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(124px,1fr)); gap:12px; }
.ml-cards { grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); }
.mx-panel .mx-kpis { margin-bottom:14px; }
.mx-kpi, .ml-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:14px 16px; min-width:0; }
.mx-panel .mx-kpi { background:var(--bg); border-color:transparent; }
.mx-kpi .label, .ml-card .label { font-size:.78rem; color:var(--text-muted); margin-bottom:4px; }
.mx-kpi .value, .ml-card .value { font-size:1.3rem; font-weight:700; letter-spacing:-.01em; }
.mx-kpi .value.accent, .ml-card .value.accent { color:var(--accent); }
.ml-card .value { font-size:1.5rem; }
.ml-delta { font-size:.76rem; font-weight:700; margin-top:5px; }
.ml-delta.up { color:var(--lime-text); } .ml-delta.down { color:var(--coral-text); } .ml-delta.flat { color:var(--text-muted); font-weight:500; }

/* 상태 표시 */
.mx-badge { display:inline-flex; align-items:center; gap:5px; font-size:.72rem; font-weight:600; line-height:1.6; padding:1px 9px;
            border-radius:999px; background:var(--bg); color:var(--text-muted); white-space:nowrap; border:0; }
.mx-badge::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.85; }
.mx-badge.s-주문 { background:var(--yellow-bg); color:var(--yellow-text); }
.mx-badge.s-입금 { background:var(--blue-bg); color:var(--blue-text); }
.mx-badge.s-준비 { background:var(--mx-violet-bg); color:var(--mx-violet); }
.mx-badge.s-배송 { background:var(--lime-bg); color:var(--lime-text); }
.mx-badge.s-완료 { background:var(--bg); color:var(--text-muted); }
.mx-badge.s-취소, .mx-badge.s-반품, .mx-badge.s-품절, .mx-badge.bad { background:var(--coral-bg); color:var(--coral-text); }
.mx-badge.ok { background:var(--lime-bg); color:var(--lime-text); }
.mx-badge.warn { background:var(--yellow-bg); color:var(--yellow-text); }

/* 탭(가로 칩) */
.mx-tabs { display:inline-flex; flex-wrap:wrap; gap:2px; padding:3px; background:var(--bg); border:1px solid var(--border); border-radius:10px; width:max-content; max-width:100%; }
.mx-tabs button { border:0; background:transparent; border-radius:7px; padding:6px 14px; font-size:.84rem; font-weight:600; color:var(--text-muted); }
.mx-tabs button:hover { color:var(--text); }
.mx-tabs button.active { background:var(--surface); color:var(--text); box-shadow:var(--shadow-xs); }

/* 빈 상태 · 안내 · 기타 */
.mx-empty, .mp-empty, .mc-empty, .ml-setup { text-align:center; padding:40px 16px; color:var(--text-muted); font-size:.88rem; line-height:1.7; }
.mall-main > .mx-empty, .mall-main > .mp-empty, .ml-setup, .mc-conn.mc-empty { background:var(--surface); border:1px dashed var(--border); border-radius:var(--radius); }
.mx-empty a, .mp-empty a { font-weight:600; }
.ml-setup { padding:48px 20px; }
.ml-setup h3 { margin:0 0 8px; font-size:1.1rem; color:var(--text); }
.ml-setup p { margin:0 auto 18px; max-width:460px; }
.ml-empty { text-align:center; padding:26px 10px; color:var(--text-muted); font-size:.84rem; }
.mx-note { position:relative; font-size:.84rem; line-height:1.7; background:var(--blue-bg); color:var(--text); border-radius:10px; padding:11px 14px 11px 38px; }
.mx-note::before { content:'\F431'; font-family:'bootstrap-icons'; position:absolute; left:14px; top:11px; color:var(--blue-text); }
.mx-note.is-error { background:var(--coral-bg); color:var(--coral-text); }
.mx-note.is-error::before { content:'\F33B'; color:var(--coral-text); }
.mx-panel .mx-note { margin:0 0 12px; }
.mx-muted { color:var(--text-muted); font-size:.8rem; }
.mx-warn-text { color:var(--yellow-text); }
.mx-bad-text { color:var(--coral-text); }
.mx-mono { font-family:var(--font-mono); font-size:.8rem; }
.mx-page, .mp-page { display:flex; gap:4px; justify-content:center; flex-wrap:wrap; }
.mx-page:empty, .mp-page:empty { display:none; }
.mx-page .btn, .mp-page .btn { min-width:34px; }
.mx-num { font-variant-numeric:tabular-nums; text-align:right; white-space:nowrap; }
.mx-section-title { font-size:.78rem; font-weight:700; color:var(--text-muted); margin:18px 0 10px; display:flex; align-items:center; gap:6px; }
.mx-section-title::after { content:''; flex:1; height:1px; background:var(--border-light); }
.mx-section-title small { font-weight:400; margin-left:2px; }
.mx-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.mx-grid-2 > * { min-width:0; }
@media (max-width:900px){ .mx-grid-2 { grid-template-columns:1fr; } }
.mx-dl { display:grid; grid-template-columns:120px minmax(0,1fr); gap:8px 14px; font-size:.84rem; margin:0; }
.mx-dl dt { color:var(--text-muted); font-weight:500; }
.mx-dl dd { margin:0; word-break:break-all; }
.mx-pre { white-space:pre-wrap; word-break:break-word; font-size:.86rem; background:var(--bg); border-radius:8px; padding:10px 12px; margin:0; }

/* 반품·교환 모달(malls.js) */
.mx-claim-order { font-size:.86rem; background:var(--bg); border-radius:10px; padding:10px 12px; }
.mx-line, .mx-newline { display:flex; align-items:center; gap:10px; padding:9px 12px; border:1px solid var(--border);
                        border-radius:10px; margin-bottom:6px; font-size:.84rem; }
.mx-line:has(input:checked) { border-color:var(--accent); background:var(--accent-light); }
.mx-line.disabled { opacity:.5; }
.mx-line .name { flex:1; min-width:0; }
.mx-newline .name { flex:1 1 160px; min-width:140px; }
.mx-line .qty { white-space:nowrap; color:var(--text-muted); }
.mx-line .amt { white-space:nowrap; font-variant-numeric:tabular-nums; font-weight:700; }
.mx-newline select { width:auto; max-width:260px; }
.mx-newline input[type=number] { width:70px; }
.mx-claim-search { margin-top:8px; }
.mx-pick { display:block; width:100%; text-align:left; border:none; background:none; padding:7px 10px; border-radius:8px; font-size:.84rem; }
.mx-pick:hover { background:var(--bg); }
@media (max-width:600px){ .mx-newline { flex-wrap:wrap; } .mx-newline select { max-width:100%; } }
.mp-dirty { border-color:var(--accent) !important; box-shadow:0 0 0 3px rgba(var(--accent-rgb),.12) !important; }

/* ── 대시보드(ml-) ─────────────────────────────────────────── */
.ml-panels { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:14px; }
.ml-panels-3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.ml-panels-2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
@media (max-width:1100px){ .ml-panels-3 { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:900px){ .ml-panels, .ml-panels-3, .ml-panels-2 { grid-template-columns:minmax(0,1fr); } }
.ml-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:9px 0; border-bottom:1px solid var(--border-light); font-size:.85rem; }
.ml-row:last-child { border-bottom:none; }
.ml-row .sub { color:var(--text-muted); font-size:.76rem; }
.ml-row .amount { font-variant-numeric:tabular-nums; font-weight:700; white-space:nowrap; }
.ml-row .name { min-width:0; overflow:hidden; }
.ml-row .name > div:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; }
.ml-rank { display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; margin-right:4px; border-radius:6px;
           background:var(--bg); color:var(--text-muted); font-size:.72rem; font-weight:700; font-variant-numeric:tabular-nums; }
.ml-pills { display:flex; gap:8px; flex-wrap:wrap; }
.ml-pill { display:inline-flex; align-items:center; gap:6px; background:var(--surface); border:1px solid var(--border); border-radius:999px;
           padding:6px 14px; font-size:.83rem; text-decoration:none; color:var(--text-muted); }
.ml-pill b { font-variant-numeric:tabular-nums; color:var(--text); }
a.ml-pill:hover { border-color:var(--accent); color:var(--text); }
.ml-pill.warn { background:var(--accent-light); border-color:rgba(var(--accent-rgb),.35); color:var(--accent); }
.ml-pill.warn b { color:var(--accent); }
.ml-pill.info { background:var(--blue-bg); border-color:transparent; color:var(--blue-text); }
.ml-pill.info b { color:var(--blue-text); }
.ml-bar { height:6px; border-radius:3px; background:var(--border-light); margin-top:6px; overflow:hidden; }
.ml-bar > i { display:block; height:100%; background:var(--blue); border-radius:3px; }
.ml-mini { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.ml-mini > div { background:var(--bg); border-radius:10px; padding:11px 13px; }
.ml-mini .label { font-size:.76rem; color:var(--text-muted); margin-bottom:3px; }
.ml-mini .value { font-size:1.15rem; font-weight:700; font-variant-numeric:tabular-nums; }
.ml-conn-bad { color:var(--coral-text); font-size:.78rem; font-weight:600; }
.ml-period { font-size:.76rem; color:var(--text-muted); font-weight:400; }
.ml-chart { position:relative; height:190px; }
.ml-chart.sm { height:120px; }
.ml-chart-label { display:flex; align-items:center; gap:6px; font-size:.76rem; font-weight:600; color:var(--text-muted); margin:4px 0 6px; }
.ml-chart-label i { width:10px; height:10px; border-radius:3px; display:inline-block; }
.ml-chart + .ml-chart-label { margin-top:14px; }

/* ── 주문(mo-) ─────────────────────────────────────────────── */
.mo-order { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); margin-bottom:8px; transition:border-color .15s, box-shadow .15s; }
.mo-order:hover { border-color:var(--text-light); }
.mo-order.open { border-color:var(--text-light); box-shadow:var(--shadow); }
.mo-top { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:13px 18px; cursor:pointer; flex-wrap:wrap; }
.mo-top::after { content:'\F282'; font-family:'bootstrap-icons'; color:var(--text-light); font-size:.8rem; transition:transform .2s; }
.mo-order.open .mo-top::after { transform:rotate(180deg); }
.mo-main { display:flex; align-items:center; gap:12px; flex-wrap:wrap; min-width:0; flex:1; }
.mo-buyer { font-weight:700; }
.mo-mall { font-size:.77rem; color:var(--text-muted); }
.mo-amt { font-variant-numeric:tabular-nums; font-weight:700; font-size:1rem; }
.mo-flags { font-size:.72rem; color:var(--text-muted); }
.mo-detail { display:none; padding:0 18px 16px; border-top:1px solid var(--border-light); }
.mo-order.open .mo-detail { display:block; }
.mo-items { width:100%; font-size:.85rem; margin:12px 0; }
.mo-items td { padding:7px 0; border-bottom:1px solid var(--border-light); }
.mo-items td.r { text-align:right; font-variant-numeric:tabular-nums; }
.mo-info { font-size:.84rem; color:var(--text-muted); line-height:1.8; background:var(--bg); border-radius:10px; padding:10px 14px; }
.mo-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:12px; }
.mo-actions input { width:auto; }
.mo-check { margin-right:2px; }
.mo-bulk { display:none; align-items:center; gap:10px; padding:10px 14px; font-size:.86rem; font-weight:600;
           background:var(--accent-light); border:1px solid rgba(var(--accent-rgb),.3); border-radius:var(--radius); }
.mo-bulk.show { display:flex; }

/* ── 상품(mp-) · 재고(st-) · 옵션(op-) · 상품 등록(pf-) ───────── */
.mp-table td { vertical-align:middle; }
.mp-thumb { width:44px; height:44px; object-fit:cover; border-radius:8px; border:1px solid var(--border-light); background:var(--bg); display:block; }
.mp-name { font-weight:600; }
.mp-inline { width:104px; font-variant-numeric:tabular-nums; }
.mp-inline.qty { width:84px; }
.mp-link { font-size:.78rem; }
.st-opt td { background:var(--bg); font-size:.84rem; }
.st-opt td:first-child { padding-left:28px; }
.mx-table td.st-low { color:var(--coral-text); font-weight:700; }
.st-qty { width:90px; }
.op-wrap { display:grid; grid-template-columns:300px minmax(0,1fr); gap:14px; align-items:start; }
@media (max-width:1100px){ .op-wrap { grid-template-columns:minmax(0,1fr); } }
.op-list { max-height:70vh; overflow:auto; margin:0 -6px; }
.op-item { display:flex; gap:10px; align-items:center; padding:8px 10px; border-radius:8px; cursor:pointer; font-size:.84rem; }
.op-item:hover { background:var(--bg); }
.op-item.active { background:var(--accent-light); color:var(--accent); font-weight:600; }
.op-item img, .op-item .ph { width:36px; height:36px; border-radius:8px; object-fit:cover; background:var(--bg); flex:none; }
.op-item .n { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pf-img { display:flex; gap:14px; align-items:center; }
.pf-img img { width:80px; height:80px; object-fit:cover; border-radius:10px; border:1px solid var(--border); background:var(--bg); }
.pf-actions { position:sticky; bottom:0; z-index:5; display:flex; gap:8px; justify-content:flex-end; padding:12px 16px;
              background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:0 -4px 16px rgba(15,15,20,.05); }

/* ── 리뷰(rv-) ─────────────────────────────────────────────── */
.rv-stars { color:#D99A1E; letter-spacing:1px; white-space:nowrap; }
.rv-body { font-size:.87rem; margin-top:6px; white-space:pre-wrap; word-break:break-word; line-height:1.65; }
.rv-reply { margin-top:10px; background:var(--bg); border-radius:0 10px 10px 10px; padding:9px 12px; font-size:.84rem; }
.rv-hidden { opacity:.55; }

/* ── 쇼핑몰 연결(mc-) · 설정(sg-) ─────────────────────────── */
.mc-conn { display:flex; flex-direction:column; gap:12px; }
.mc-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; flex-wrap:wrap; }
.mc-head > div:first-child { min-width:0; flex:1 1 300px; }
.mc-name { display:flex; align-items:center; gap:8px; font-size:1.05rem; font-weight:700; margin:0 0 4px; }
.mc-name::before { content:''; width:9px; height:9px; border-radius:50%; background:var(--lime); flex:none; box-shadow:0 0 0 3px var(--lime-bg); }
.mc-conn.is-error .mc-name::before { background:var(--coral-text); box-shadow:0 0 0 3px var(--coral-bg); }
.mc-url { font-size:.8rem; color:var(--text-muted); word-break:break-all; }
.mc-state { display:flex; align-items:flex-start; gap:6px; font-size:.8rem; margin-top:6px; color:var(--text-muted); }
.mc-state.ok { color:var(--lime-text); }
.mc-state.bad { color:var(--coral-text); }
.mc-actions { display:flex; gap:6px; flex-wrap:wrap; }
.mc-opts { margin-top:14px; padding-top:14px; border-top:1px solid var(--border-light); display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px; }
.mc-opt, .sg-opt { font-size:.86rem; }
.mc-opt .hint, .sg-opt .hint { display:block; color:var(--text-muted); font-size:.76rem; margin-top:2px; line-height:1.55; }
.mc-guide h3 { margin:0 0 10px; font-size:.95rem; font-weight:700; }
.mc-guide ol { margin:0 0 12px; padding-left:20px; font-size:.86rem; line-height:1.9; color:var(--text-muted); }
.mc-guide code { background:var(--bg); padding:2px 6px; border-radius:4px; }
.mc-guide-foot { font-size:.84rem; color:var(--text-muted); margin:0 0 12px; line-height:1.7; }
.mc-promo { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
            background:linear-gradient(135deg, var(--accent-light), var(--surface)); border-color:rgba(var(--accent-rgb),.25); }
.mc-logs { font-size:.82rem; }
.mc-logs td { padding:6px 8px; }
.sg-opts { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:10px; }
.sg-opt { display:block; padding:12px 14px; border:1px solid var(--border-light); border-radius:10px; cursor:pointer; }
.sg-opt:hover { border-color:var(--border); }
/* 켠 칸을 색칠하지 않는다 — 거의 다 켜진 화면이라 칠하면 온통 한 색이 된다(체크 표시로 충분) */
.sg-opt > .form-check-input { margin-right:6px; }
.sg-opt > .form-select { margin-top:6px; }

/* ── 쇼핑몰 신청(hs-) ──────────────────────────────────────── */
.hs-hero h3 { font-size:1.05rem; font-weight:700; margin:0 0 6px; }
.hs-hero p { margin:0; color:var(--text-muted); font-size:.88rem; line-height:1.7; }
.hs-status { display:flex; gap:14px; align-items:flex-start; }
.hs-status .ico { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:1.3rem;
                  flex-shrink:0; background:var(--accent-light); color:var(--accent); }
.hs-badge { display:inline-flex; align-items:center; gap:5px; font-size:.74rem; font-weight:600; padding:1px 10px; border-radius:999px; background:var(--blue-bg); color:var(--blue-text); }
.hs-badge::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.hs-badge.requested { background:var(--yellow-bg); color:var(--yellow-text); }
.hs-badge.in_progress { background:var(--blue-bg); color:var(--blue-text); }
.hs-badge.completed { background:var(--lime-bg); color:var(--lime-text); }
.hs-badge.rejected, .hs-badge.canceled { background:var(--bg); color:var(--text-muted); }
.hs-check { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:12px; }
.hs-check li { background:var(--bg); border-radius:10px; padding:14px 16px; min-width:0; }
.hs-check li b { display:flex; align-items:center; gap:8px; font-size:.9rem; margin-bottom:6px; }
.hs-check li b i { color:var(--accent); }
.hs-check li span { display:block; font-size:.82rem; color:var(--text-muted); line-height:1.65; }
.hs-note { font-size:.8rem; color:var(--text-muted); line-height:1.7; margin-top:12px; }
.hs-form .row > div { margin-bottom:12px; }
.hs-form label { font-size:.82rem; font-weight:600; margin-bottom:4px; }
.hs-form .req { color:var(--coral-text); }
.hs-kv { display:grid; grid-template-columns:120px 1fr; gap:6px 12px; font-size:.86rem; margin-top:12px; }
.hs-kv dt { color:var(--text-muted); font-weight:500; }
.hs-kv dd { margin:0; word-break:break-word; }

@media (max-width:767px) {
  .mx-panel, .ml-panel, .mc-conn, .mc-guide, .hs-hero { padding:14px; }
  .mx-filters .form-control, .mx-filters .form-select, .mp-filters .form-control, .mp-filters .form-select { flex:1 1 140px; }
  .mx-dl { grid-template-columns:96px minmax(0,1fr); }
  .mo-top { padding:12px 14px; }
  .mo-detail { padding:0 14px 14px; }
}

/* ═══════════════════════════════════════════════════════════════
   채팅 말풍선 "복사" 버튼 (2026-09-24 신설, static/js/chat-copy.js)
   말풍선 우상단에 얹히는 작은 버튼 — 기준이 되는 position:relative는
   그 JS가 대상 요소에 직접 넣는다(style.css를 안 쓰는 독립 문서에서도
   동작해야 하므로). 배경을 흰 카드로 둬서 흰 말풍선(받은 메시지)과
   코랄 말풍선(보낸 메시지) 어느 쪽에서도 그대로 읽힌다.
   ⚠️ PyQt6 데스크톱 메신저(templates/messenger/desktop.html)는 이
   스타일시트를 쓰지 않아 같은 규칙을 그 문서의 <style>에 따로 두었다 —
   여기를 고치면 그쪽도 함께 볼 것.
═══════════════════════════════════════════════════════════════ */
.chat-copy-btn {
  position: absolute; top: 3px; right: 3px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0;
  border: 1px solid var(--border, #e5e7eb); border-radius: 6px;
  background: var(--surface, #fff); color: var(--text-muted, #6b7280);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
  cursor: pointer; opacity: 0; transition: opacity .12s ease, color .12s ease;
  font-size: 0; line-height: 0;   /* 아이콘만 보이는 버튼 — §"기타" FAB 함정과 같은 이유 */
}
/* 말풍선 바깥에 놓을 자리가 있으면 그쪽으로 — 짧은 메시지의 글자를 가리지
   않게(chat-copy.js place()가 어느 쪽에 자리가 있는지 보고 붙인다). */
.chat-copy-btn.pos-right { right: -26px; }
.chat-copy-btn.pos-left  { right: auto; left: -26px; }
.chat-copy-btn:hover { color: var(--accent, #E1613C); }
.chat-copy-btn.is-done { color: var(--lime-text, #5B7A22); opacity: 1; }
.chat-copy-btn.is-fail { color: var(--coral-text, #B23A1F); opacity: 1; }
[data-copy-ready="1"]:hover > .chat-copy-btn,
.chat-copy-btn:focus-visible { opacity: 1; }
/* 터치 기기는 hover가 없어 눌러볼 대상이 안 보인다 — 흐리게 항상 노출. */
@media (hover: none) {
  .chat-copy-btn { opacity: .5; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-copy-btn { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   고객관리(2026-09-24 — 구 "명함관리", templates/business_cards/list.html)
   고객 한 명 = 명함 한 장. 카드형/목록형(#bcGrid.is-list) 두 보기를 같은 마크업으로.
   ═══════════════════════════════════════════════════════════════════════ */
.bc-page { max-width:1320px; display:flex; flex-direction:column; gap:14px; }
.bc-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.bc-stat { display:flex; align-items:center; gap:12px; padding:14px 16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); min-width:0; }
.bc-stat b { display:block; font-size:1.35rem; font-weight:700; line-height:1.15; }
.bc-stat span:not(.bc-stat-ic) { font-size:.78rem; color:var(--text-muted); }
.bc-stat-ic { width:38px; height:38px; border-radius:10px; flex:none; display:flex; align-items:center; justify-content:center; font-size:1.05rem; background:var(--accent-light); color:var(--accent); }
.bc-stat-ic.is-blue { background:var(--blue-bg); color:var(--blue); }
.bc-stat-ic.is-lime { background:var(--lime-bg); color:var(--lime-text); }
.bc-stat-ic.is-yellow { background:var(--yellow-bg); color:var(--yellow-text); }

.bc-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.bc-tabs { display:inline-flex; gap:2px; padding:3px; background:var(--bg); border:1px solid var(--border); border-radius:10px; }
.bc-tab { padding:6px 13px; border-radius:7px; font-size:.84rem; font-weight:600; color:var(--text-muted); cursor:pointer; user-select:none; white-space:nowrap; }
.bc-tab:hover { color:var(--text); }
.bc-tab.active { background:var(--surface); color:var(--text); box-shadow:var(--shadow-xs); }
.bc-tab .bc-count { font-weight:500; opacity:.7; margin-left:2px; }
.bc-search { position:relative; display:flex; align-items:center; flex:1 1 220px; height:38px; padding:0 12px 0 34px;
             background:var(--surface); border:1px solid var(--border); border-radius:8px; }
.bc-search:focus-within { border-color:var(--accent); box-shadow:0 0 0 3px rgba(var(--accent-rgb),.12); }
.bc-search > i { position:absolute; left:12px; color:var(--text-light); font-size:.85rem; }
.bc-search input { border:0; outline:0; background:transparent; width:100%; font-size:.86rem; color:var(--text); }
.bc-sort { width:auto !important; height:38px !important; border-radius:8px !important; font-size:.85rem !important; }
.bc-view { display:inline-flex; gap:2px; padding:3px; background:var(--bg); border:1px solid var(--border); border-radius:8px; }
.bc-view button { border:0; background:transparent; width:32px; height:30px; border-radius:6px; color:var(--text-muted); }
.bc-view button.is-on { background:var(--surface); color:var(--text); box-shadow:var(--shadow-xs); }

.bc-cats { display:flex; gap:6px; flex-wrap:wrap; }
.bc-cats .category-chip { display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border-radius:999px; font-size:.8rem; font-weight:600;
                          background:var(--surface); border:1px solid var(--border); color:var(--text-muted); }
.bc-cats .category-chip span { font-weight:500; opacity:.7; }
.bc-cats .category-chip:hover { color:var(--text); }
.bc-cats .category-chip.active { background:var(--text); border-color:var(--text); color:#fff; }
.bc-dot { width:8px; height:8px; border-radius:50%; display:inline-block; flex:none; }

/* 카드형 */
.bc-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:12px; align-items:start; }
.bc-card { position:relative; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; transition:border-color .15s, box-shadow .15s; }
.bc-card:hover { border-color:var(--text-light); }
.bc-card.expanded { border-color:var(--text-light); box-shadow:var(--shadow); }
.bc-summary { display:flex; gap:12px; align-items:center; padding:14px 16px 10px; cursor:pointer; user-select:none; }
.bc-thumb { width:52px; height:52px; border-radius:12px; object-fit:cover; background:var(--bg); flex-shrink:0; cursor:zoom-in; border:1px solid var(--border-light); }
.bc-avatar { width:52px; height:52px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:1.2rem; font-weight:700;
             background:var(--accent-light); color:var(--accent); }
.bc-avatar.is-blue { background:var(--blue-bg); color:var(--blue-text); }
.bc-avatar.is-lime { background:var(--lime-bg); color:var(--lime-text); }
.bc-avatar.is-yellow { background:var(--yellow-bg); color:var(--yellow-text); }
.bc-avatar.is-coral { background:var(--coral-bg); color:var(--coral-text); }
.bc-avatar.is-violet { background:#EFEDFB; color:#5B4BBE; }
.bc-avatar-fallback { display:none; }
.bc-thumb.is-broken { display:none; }
.bc-thumb.is-broken + .bc-avatar-fallback { display:flex; }
.bc-info { flex:1; min-width:0; }
.bc-name { font-weight:700; font-size:.98rem; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bc-name small { font-size:.78rem; font-weight:500; color:var(--text-muted); margin-left:6px; }
.bc-role { display:flex; align-items:center; gap:5px; font-size:.8rem; color:var(--text-muted); margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bc-role i { color:var(--text-light); font-size:.76rem; }
.bc-summary-badges { display:flex; gap:5px; flex-shrink:0; align-items:center; }
.bc-cat-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.bc-chevron { flex-shrink:0; color:var(--text-light); transition:transform .18s; font-size:.85rem; }
.bc-card.expanded .bc-chevron { transform:rotate(180deg); color:var(--text); }
.bc-quick { display:flex; flex-wrap:wrap; gap:6px; padding:0 16px 14px 80px; }
.bc-quick a { display:inline-flex; align-items:center; gap:6px; max-width:100%; min-width:0; padding:4px 10px; border-radius:8px; font-size:.78rem;
              background:var(--bg); color:var(--text); text-decoration:none; }
.bc-quick a span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bc-quick a i { color:var(--text-muted); }
.bc-quick a:hover { background:var(--accent-light); color:var(--accent); }
.bc-quick a:hover i { color:var(--accent); }
.bc-quick-none { font-size:.78rem; color:var(--text-light); }
.bc-detail { display:none; padding:14px 16px 16px; border-top:1px solid var(--border-light); background:linear-gradient(var(--bg), var(--surface) 60px); }
.bc-card.expanded .bc-detail { display:block; }
.bc-rows { display:flex; flex-direction:column; gap:7px; margin:0; }
.bc-row { display:grid; grid-template-columns:78px minmax(0,1fr); gap:10px; font-size:.83rem; }
.bc-row dt { display:flex; align-items:center; gap:6px; color:var(--text-muted); font-weight:500; }
.bc-row dt i { color:var(--text-light); width:14px; text-align:center; }
.bc-row dd { margin:0; overflow-wrap:anywhere; }
.bc-row a { color:var(--text); text-decoration:none; }
.bc-row a:hover { color:var(--accent); }
.bc-memo { white-space:pre-line; }
.bc-badges { display:flex; gap:6px; margin-top:12px; flex-wrap:wrap; }
.bc-badge { display:inline-flex; align-items:center; gap:4px; font-size:.72rem; font-weight:600; padding:2px 9px; border-radius:999px; white-space:nowrap; background:var(--bg); color:var(--text-muted); }
.bc-badge .spinner-border { width:.65rem; height:.65rem; border-width:.12em; }
.bc-badge.cat { background:var(--surface); border:1px solid var(--border); color:var(--text); }
.bc-badge.shared { background:var(--lime-bg); color:var(--lime-text); }
.bc-badge.pending { background:var(--yellow-bg); color:var(--yellow-text); }
.bc-badge.failed { background:var(--coral-bg); color:var(--coral-text); }
.bc-detail-actions { display:flex; gap:6px; margin-top:14px; }
.bc-detail-actions button { display:inline-flex; align-items:center; gap:5px; height:32px; padding:0 12px; border-radius:8px; font-size:.8rem; font-weight:600;
                            border:1px solid var(--border); background:var(--surface); color:var(--text); cursor:pointer; }
.bc-detail-actions button:hover { border-color:var(--text-light); }
.bc-detail-actions button.bc-btn-delete { margin-left:auto; color:var(--coral-text); }
.bc-detail-actions button.bc-btn-delete:hover { background:var(--coral-bg); border-color:transparent; }

/* 목록형 — 같은 카드 마크업을 한 줄로 */
.bc-grid.is-list { grid-template-columns:minmax(0,1fr); gap:0; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.bc-grid.is-list .bc-card { border:0; border-radius:0; border-top:1px solid var(--border-light); display:grid; grid-template-columns:minmax(0,1fr) auto; }
.bc-grid.is-list .bc-quick { max-width:520px; }
.bc-grid.is-list .bc-card:first-child, .bc-grid.is-list .bc-card.d-none + .bc-card { border-top:0; }
.bc-grid.is-list .bc-card:hover { background:var(--bg); }
.bc-grid.is-list .bc-card.expanded { box-shadow:none; background:var(--surface); }
.bc-grid.is-list .bc-summary { padding:10px 16px; }
.bc-grid.is-list .bc-thumb, .bc-grid.is-list .bc-avatar { width:38px; height:38px; font-size:.95rem; }
.bc-grid.is-list .bc-quick { padding:10px 16px; align-items:center; justify-content:flex-end; }
.bc-grid.is-list .bc-detail { grid-column:1 / -1; }
.bc-grid.is-list .bc-rows { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:7px 24px; }

.bc-empty { text-align:center; padding:56px 20px; color:var(--text-muted); background:var(--surface); border:1px dashed var(--border); border-radius:var(--radius); }
.bc-empty > i { display:block; font-size:2.2rem; color:var(--text-light); margin-bottom:10px; }
.bc-empty-title { font-weight:700; color:var(--text); font-size:1rem; }
.bc-empty p { margin:6px auto 16px; max-width:420px; font-size:.86rem; }

/* 등록·수정 창 */
.bc-photo-zone { display:flex; align-items:center; gap:16px; padding:14px; margin-bottom:6px; background:var(--bg); border-radius:12px; }
.bc-photo-preview { width:112px; height:72px; border-radius:10px; object-fit:cover; background:var(--surface); border:1px solid var(--border); flex-shrink:0; cursor:zoom-in; }
.bc-photo-placeholder { width:112px; height:72px; border-radius:10px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:1.8rem;
                        background:var(--surface); color:var(--text-light); border:1.5px dashed var(--border); }
.bc-photo-side { min-width:0; }
.bc-photo-title { font-weight:700; font-size:.9rem; }
.bc-photo-help { font-size:.78rem; color:var(--text-muted); margin:2px 0 8px; }
.bc-photo-btns { display:flex; flex-wrap:wrap; gap:6px; }
.bc-ocr-status { font-size:.82rem; color:var(--yellow-text); background:var(--yellow-bg); border-radius:8px; padding:8px 12px; margin-bottom:6px; display:none; align-items:center; gap:8px; }
.bc-ocr-status.show { display:flex; }
.bc-form-sec { font-size:.76rem; font-weight:700; color:var(--text-muted); margin:14px 0 2px; display:flex; align-items:center; gap:8px; }
.bc-form-sec::after { content:''; flex:1; height:1px; background:var(--border-light); }
.bc-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px 12px; }
.bc-form-grid .full { grid-column:1 / -1; }
.bc-form-grid .bc-form-sec { margin:6px 0 -2px; }
#bcModal .modal-content, #bcBulkModal .modal-content { height:auto; }

.bc-bulk-pick-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.bc-bulk-strip { display:flex; flex-wrap:wrap; gap:10px; min-height:96px; padding:12px; background:var(--bg); border:1.5px dashed var(--border); border-radius:12px; margin-bottom:10px; }
.bc-bulk-empty { color:var(--text-muted); font-size:.84rem; margin:auto; }
.bc-bulk-thumb-wrap { position:relative; width:72px; height:72px; flex-shrink:0; }
.bc-bulk-thumb { width:72px; height:72px; object-fit:cover; border-radius:8px; border:1px solid var(--border); }
.bc-bulk-remove { position:absolute; top:-6px; right:-6px; width:20px; height:20px; border-radius:50%; background:var(--text); color:#fff; border:2px solid var(--surface);
                  font-size:.68rem; line-height:1; display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0; }
.bc-bulk-count { font-size:.84rem; color:var(--text-muted); }

.bc-lightbox { display:none; position:fixed; inset:0; z-index:2000; background:rgba(0,0,0,.85); align-items:center; justify-content:center; padding:32px; cursor:zoom-out; }
.bc-lightbox.show { display:flex; }
.bc-lightbox img { max-width:100%; max-height:100%; border-radius:10px; box-shadow:0 10px 40px rgba(0,0,0,.5); object-fit:contain; cursor:default; }
.bc-lightbox-close { position:fixed; top:20px; right:24px; width:40px; height:40px; border-radius:50%; border:none; background:rgba(255,255,255,.15); color:#fff;
                     font-size:1.1rem; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.bc-lightbox-close:hover { background:rgba(255,255,255,.28); }

@media (max-width:991px) { .bc-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:767px) {
  .bc-tabs { flex:1 1 100%; order:1; } .bc-tab { flex:1; text-align:center; padding:6px 8px; }
  .bc-search { flex:1 1 100%; order:2; }
  .bc-sort { order:3; flex:1 1 auto; }
  .bc-view { order:4; }
  .bc-grid { grid-template-columns:minmax(0,1fr); }
  .bc-grid.is-list .bc-card { grid-template-columns:minmax(0,1fr); }
  .bc-grid.is-list .bc-quick { justify-content:flex-start; padding:0 16px 10px 66px; }
  .bc-quick { padding-left:16px; }
  .bc-form-grid { grid-template-columns:1fr; }
  .bc-photo-zone { flex-direction:column; align-items:flex-start; }
}
