/* --- Design System (Team Flow Style) --- */
:root {
    /* Brand — TDS(토스 디자인 시스템) blue500. 흰 글씨 대비가 3.71 이라 버튼 글씨는 700 으로 굵게,
       파란 '글자'는 --brand-text(blue700 #1b64da, 5.41:1)를 쓴다 */
    --brand-blue: #3182f6;
    --brand-blue-dark: #2272eb;
    --brand-text: var(--safe-text);   /* 파란 글자 전용. 테마마다 safe-text 를 따라감 */

    /* 글꼴 — Pretendard 로드 실패 시 한글 시스템 글꼴로 */
    --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', system-ui, sans-serif;

    /* Surface (semantic) */
    --bg-canvas: #f2f4f6;        /* page background (TDS grey100) */
    --bg-surface: #ffffff;       /* card/panel surface */
    --bg-sunken: #f9fafb;        /* inset / input bg */
    --bg-inverse: #191f28;       /* toast / inverted */

    /* Legacy aliases (do not remove yet — used in many places) */
    --bg-main: var(--bg-canvas);
    --bg-white: var(--bg-surface);

    /* Text */
    --text-strong: #191f28;
    --text-normal: #333d4b;
    --text-weak: #4e5968;        /* TDS grey700. 회색 바탕(#f2f4f6) 위에서도 6.45:1 */
    --text-disable: #6b7684;     /* TDS grey600. 빈 상태 안내 등 텍스트로도 쓰이므로 4.62:1 */

    /* Status (각 배경 위 글자 대비 4.5:1 이상) */
    --danger-bg: #ffeeee;
    --danger-text: #d22030;
    --warn-bg: #fff9e7;
    --warn-text: #8a6208;
    --safe-bg: #e8f3ff;
    --safe-text: #1b64da;        /* 연파랑 배경 위 파란 글자 */
    --success-bg: #f0faf6;
    --success-text: #027648;

    /* Team colors (semantic) */
    --team-design: #a234c7;      /* TDS purple500 — 강조 파랑과 구분 */
    --team-marketing: #03b26c;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 72px;

    /* Spacing scale (4px base) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;

    /* Border */
    --border-subtle: 1px solid #f2f4f6;
    --border-light: 1px solid #e5e8eb;
    --border-strong: 1px solid #d1d6db;
    --border-dashed: 1px dashed #d1d6db;

    /* Shadow — TDS 는 그림자 대신 면 색으로 층을 나눈다.
       바닥 카드는 그림자 없음(회색 바탕 위 흰 면 + 선), 떠 있는 층(패널·모달·토스트·드롭다운)만 그림자 */
    --shadow-soft: none;
    --shadow-card: none;
    --shadow-hover: none;
    --shadow-float: 0 4px 16px rgba(16, 24, 40, 0.12);  /* 드롭다운·말풍선 */
    --shadow-panel: -8px 0 32px rgba(16, 24, 40, 0.12);
    --shadow-modal: 0 16px 48px rgba(16, 24, 40, 0.18);

    /* Radius — TDS 비례: 작은 태그 4 / 6, 버튼·입력은 높이에 따라 8(32px) · 12(44px) · 16(큰 면), 알약형 */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-s: 8px;
    --radius-m: 12px;
    --radius-l: 16px;
    --radius-pill: 999px;

    /* z-index scale */
    --z-base: 1;
    --z-sticky: 20;
    --z-sidebar: 50;
    --z-overlay: 900;
    --z-panel: 1000;
    --z-modal: 1100;
    --z-toast: 9999;

    /* Motion */
    --motion-fast: 0.15s ease;
    --motion-base: 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    --motion-panel: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --motion-pop: 0.24s cubic-bezier(0.25, 1, 0.5, 1); /* 바운스 제거 → 부드러운 감속 */
    --ani-duration: 0.3s; /* legacy alias */

    /* Focus ring */
    --focus-ring: 0 0 0 1px #8ac0ff, 0 0 0 3px #b8d9ff;  /* TDS 버튼 포커스 */

    /* ===== 옛 이름(--r-*) — 기본 토큰의 별칭. 새 코드는 왼쪽 기본 토큰을 쓴다 =====
       테마는 기본 토큰만 바꾸면 이 별칭도 따라 바뀐다. */
    --r-canvas:      var(--bg-canvas);
    --r-sky-wash:    #e8f3ff;       /* 연파랑 면: 선택된 메뉴·보기 전환 */
    --r-card:        var(--bg-surface);
    --r-ink:         var(--text-strong);
    --r-graphite:    var(--text-strong);
    --r-slate:       var(--text-normal);
    --r-ash:         var(--text-weak);
    --r-fog:         var(--text-disable);
    --r-hairline:    var(--border-hairline);
    --r-signal-blue: var(--brand-blue);
    --r-action-ink:  var(--text-strong);
    --r-coral:       #f04452;       /* status only */
    --r-emerald:     #03b26c;       /* status only */
    --r-amber:       #ffa927;       /* status only */
    /* Relate shadows — 위 --shadow-card / --shadow-hover 와 같은 2단계로 통일 */
    --r-shadow-sm:   var(--shadow-card);
    --r-shadow-md:   var(--shadow-float);
    --r-shadow-blue: rgba(20,90,255,0.10) 0px 0px 50px -28px, rgba(0,0,0,0.10) 0px 0px 4px -2px;

    /* ============================================================
       [1단계 토큰화] 본문에 흩어져 있던 정적 색상의 의미 있는 별칭.
       값은 픽셀 단위로 기존과 동일 — 시각적 변화 없음.
       향후 테마 전환 시 이 토큰들만 재정의하면 됨.
       ============================================================ */

    /* 텍스트 보조 단계 */
    --text-faint:     #b0b8c1;        /* placeholder / hint / checked-through */
    --text-mute:      #888;           /* list 보조 muted */
    --text-icon-off:  #ccc;           /* 비활성 아이콘 / 미할당 멤버 fallback */
    --text-deep:      #333;           /* selected ring border ink */

    /* 보더 단계 (1px 색만 필요할 때) */
    --border-mute:     #d1d6db;       /* 슬라이더/스크롤바/모바일 인디케이터 dot */
    --border-hairline: #e5e8eb;       /* 일반 hairline */
    --border-faint:    #eee;          /* dashed/dotted 약한 구분 */
    --border-divider:  #f5f6f7;       /* notify item / list divider */

    /* 컨트롤 표면 */
    --surface-control-off:  #cbd0d6;  /* 토글 off 트랙 */
    --surface-control-bg:   #eef0f3;  /* 알림 아바타 등 중성 표면 */
    --surface-toast-bg:     rgba(25, 31, 40, 0.92);  /* 토스트 다크 배경 */
    --surface-overlay-dark: rgba(25, 31, 40, 0.4);   /* 모달 오버레이 */

    /* danger 변형 */
    --danger-bg-soft:  #ffeeee;       /* priority-high / dday urgent 부드러운 배경 */
    --danger-bg-hover: #ffd4d6;       /* bulk-del hover */
    --danger-tint-12:  rgba(224, 41, 41, 0.12);  /* 위험 focus shadow */

    /* safe(브랜드 블루 계열) 변형 — 알림 unread */
    --safe-bg-soft:  #f4f9ff;
    --safe-bg-hover: #c9e2ff;

    /* success 변형 — handoff 버튼 */
    --success-bg-soft:     #f0faf6;
    --success-border-soft: #aeefd5;

    /* brand-blue (#3182f6 = 49,130,246) 알파 변형 */
    --brand-blue-tint-04: rgba(49, 130, 246, 0.04);
    --brand-blue-tint-10: rgba(49, 130, 246, 0.10);
    --brand-blue-tint-12: rgba(49, 130, 246, 0.12);
    --brand-blue-tint-20: rgba(49, 130, 246, 0.20);
    --brand-blue-tint-35: rgba(49, 130, 246, 0.35);  /* focus-ring 과 동일 알파 */

    /* signal-blue 알파 — brand-blue-tint 의 옛 이름 */
    --signal-blue-tint-04: var(--brand-blue-tint-04);
    --signal-blue-tint-05: var(--brand-blue-tint-04);
    --signal-blue-tint-08: var(--brand-blue-tint-10);
    --signal-blue-tint-10: var(--brand-blue-tint-10);
    --signal-blue-tint-12: var(--brand-blue-tint-12);
    --signal-blue-tint-18: var(--brand-blue-tint-20);

    /* coral (--r-coral #f26052 = 242,96,82) 알파 변형 */
    --coral-tint-06: rgba(242, 96, 82, 0.06);
    --coral-tint-08: rgba(242, 96, 82, 0.08);
    --coral-tint-18: rgba(242, 96, 82, 0.18);

    /* emerald (--r-emerald #16ca2e = 22,202,46) 알파 변형 */
    --emerald-tint-08: rgba(22, 202, 46, 0.08);

    /* 잉크(검정) 알파 — 호버/구분/그림자 */
    --ink-tint-03: rgba(0,0,0,0.03);
    --ink-tint-05: rgba(0,0,0,0.05);
    --ink-tint-06: rgba(0,0,0,0.06);
    --ink-tint-08: rgba(0,0,0,0.08);
    --ink-tint-10: rgba(0,0,0,0.10);
    --ink-tint-12: rgba(0,0,0,0.12);
    --ink-tint-15: rgba(0,0,0,0.15);
    --ink-tint-30: rgba(0,0,0,0.3);

    /* 흰색 알파 — 다크 표면 위 */
    --white-tint-15: rgba(255,255,255,0.15);
    --white-tint-25: rgba(255,255,255,0.25);
    --white-tint-60: rgba(255,255,255,0.6);

    /* 캘린더 today 강조 */
    --cal-today-bg:     rgba(49, 130, 246, 0.04);
    --cal-today-border: rgba(49, 130, 246, 0.2);

    /* 검색 하이라이트 */
    --highlight-search: rgba(255, 220, 100, 0.4);

    /* "유색 배경 위 글씨" — 라이트/다크 모두에서 흰색 유지가 가독성 좋은 곳
       (brand-blue, danger, success, mem.color 등 컬러풀 배경 버튼/배지) */
    --text-on-brand: #fff;

    /* "text-strong 배경 위 글씨" — 라이트에선 흰색, 다크에선 text-strong 이
       밝아지므로 어두운 글씨로 바꿔야 가독성 유지 (kpi-filter-btn.active 등) */
    --text-on-strong: #fff;
}

/* Team Badge Styles */
.badge-team { font-size: 11px; padding: 4px 8px; border-radius: var(--radius-sm); font-weight: 700; color: var(--text-on-brand); margin-left: 6px; vertical-align: middle; display: inline-block;}
.badge-team-design { background: var(--team-design); }
.badge-team-marketing { background: var(--team-marketing); }

* { box-sizing: border-box; outline: none; -webkit-tap-highlight-color: transparent; }

/* [hidden] 속성이 CSS display 값보다 우선되도록 강제 (전역 안전장치) */
[hidden] { display: none !important; }

/* Global focus indicator for keyboard users (a11y) */
*:focus-visible {
    box-shadow: var(--focus-ring) !important;
    border-radius: var(--radius-sm);
}
/* 보더 래퍼 안의 input 들은 자체 focus ring 제거 — 래퍼가 :focus-within 으로 처리.
   (그러지 않으면 래퍼 ring + input ring 이중 노출됨) */
.toss-search-card input:focus,
.toss-search-card input:focus-visible,
.archive-search-group input:focus,
.archive-search-group input:focus-visible,
.date-picker-group input:focus,
.date-picker-group input:focus-visible {
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    border-radius: 0 !important;
}

body {
    font-family: var(--font-sans);
    background-color: var(--r-canvas);
    margin: 0; padding: 0;
    color: var(--r-graphite);
    height: 100vh;
    height: 100dvh; /* 모바일 Safari/삼성 인터넷: 주소창 높이 변동 대응 (vh 폴백) */
    display: flex;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.5; /* 조밀한 조작 UI 기준. 긴 본문(메모·댓글)은 개별로 1.65 */
    letter-spacing: -0.1px; /* Pretendard 살짝 negative tracking */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    word-break: keep-all;       /* 한글 단어 중간 줄바꿈 방지 */
    overflow-wrap: anywhere;    /* 긴 URL·영문은 칸을 넘지 않게 */
}
::selection { background: var(--brand-blue-tint-20); color: inherit; }

/* Scrollbar Customization */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background-color: var(--border-mute); border-radius: var(--radius-xs); }
::-webkit-scrollbar-track { background-color: transparent; }

input, button, select, textarea {
    font-family: var(--font-sans) !important;
    font-size: 15px !important;
}
textarea { resize: none; line-height: 1.6; }

/* Visually hidden (a11y) */
.sr-only {
    position: absolute !important; width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important; overflow: hidden !important;
    clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    display: flex; flex-direction: column;
    padding: var(--space-5) var(--space-4);
    flex-shrink: 0; z-index: var(--z-sidebar);
    border-right: 1px solid var(--ink-tint-03);
    transition: all var(--motion-base);
}
.logo-area {
    font-size: 22px; font-weight: 700; color: var(--text-strong);
    display: flex; align-items: center; gap: 10px;
    margin-bottom: var(--space-6); cursor: pointer; padding: 0 var(--space-3);
}
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 로고 바로 아래에서 시작 (가운데 정렬은 메뉴가 떠 보임) */
    min-width: 0;
}
.nav-item {
    padding: 14px 18px; border-radius: var(--radius-m);
    font-size: 16px; font-weight: 600; color: var(--text-weak);
    cursor: pointer; transition: var(--motion-fast);
    display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-1);
    border: none; background: transparent; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--ink-tint-03); color: var(--r-graphite); }
.nav-item.active {
    background: var(--r-sky-wash);
    color: var(--r-graphite);
    font-weight: 600;
}

.btn-refresh {
    margin-top: auto;
    width: 100%; border: var(--border-light); background: var(--bg-surface);
    padding: var(--space-3); border-radius: var(--radius-m);
    font-weight: 700; color: var(--text-normal);
    cursor: pointer; transition: var(--motion-fast);
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-refresh:hover { background: var(--bg-canvas); }

/* --- Main Layout --- */
.main-content {
    flex: 1; display: flex; flex-direction: column;
    overflow: hidden; position: relative;
    background-color: var(--r-canvas);
}
.content-header {
    height: var(--header-height); padding: 0 var(--space-6);
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0; gap: 12px;
    min-width: 0;
}
.header-right-group {
    display: flex; gap: 8px; align-items: center;
    flex-shrink: 0;
}
.btn-member, .btn-focus-mode, .btn-batch-add {
    background: var(--bg-surface); border: 1px solid var(--border-hairline);
    height: 44px; padding: 0 14px; border-radius: var(--radius-m);
    cursor: pointer; font-size: 13px; font-weight: 600;
    color: var(--text-strong); box-shadow: none;
    display: inline-flex; align-items: center; gap: 6px;
    white-space: nowrap; flex-shrink: 0;
    transition: var(--motion-fast);
}
.btn-member:hover, .btn-focus-mode:hover, .btn-batch-add:hover { background: var(--r-sky-wash); border-color: var(--brand-blue); }
/* 헤더 안의 모든 버튼: 줄바꿈 방지 */
.content-header button,
.btn-focus-mode,
.btn-batch-add,
.btn-view-toggle {
    white-space: nowrap;
    flex-shrink: 0;
}
.page-title {
    font-size: 26px; font-weight: 700; color: var(--text-strong);
    display: flex; align-items: center; gap: var(--space-3);
    letter-spacing: -0.5px; margin: 0;
    /* 머리 영역이 좁아도 '디자인 / 팀 보드'처럼 쪼개지지 않게. 검색 영역(flex:1, 최소 폭 있음)이
       먼저 최소 폭까지 줄고, 그래도 모자라면 긴 보드 이름 끝을 '…'로 줄인다 */
    white-space: nowrap; flex: 0 1 auto; min-width: 0;
    overflow: hidden; text-overflow: ellipsis;
    display: block; /* 제목은 글자만 들어가므로 block이어야 말줄임이 된다 */
}
.page-wrapper {
    flex: 1; padding: 0 var(--space-6) var(--space-6) var(--space-6);
    overflow-y: hidden;
    display: none;
    flex-direction: column;
    animation: fadeIn 0.15s ease-out forwards;
}
.page-wrapper.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* 세로로 쌓이는 페이지는 스크롤 + 블록이 눌려 겹치지 않게 (보드는 칼럼이 높이를 채워야 하므로 제외) */
/* 2026-10-21: 보고(글이 길어짐)·데스크톱 앱 화면도 목록에 넣는다. 빠져 있으면 아래가 잘려 스크롤되지 않는다 */
#page-today, #page-calendar, #page-archive, #page-teamreport, #page-activity, #page-app { overflow-y: auto; }
#page-today > *, #page-calendar > *, #page-archive > *, #page-teamreport > *, #page-activity > *, #page-app > * { flex-shrink: 0; }

/* --- Focus Mode (presentations / meetings) --- */
body.focus-mode .sidebar { display: none; }
body.focus-mode .content-header { height: auto; padding: var(--space-3) var(--space-4); }
body.focus-mode .page-title { font-size: 18px; }
body.focus-mode #global-search-container,
body.focus-mode .header-tools-wrapper > .view-toggle-group,
body.focus-mode .header-tools-wrapper > .btn-batch-add { display: none !important; }
body.focus-mode .task-card { font-size: 17px; }
body.focus-mode .card-title-text { font-size: 19px; }
body.focus-mode .swimlane-title { font-size: 22px; }
body.focus-mode .list-row { padding: 16px; font-size: 16px; }
/* 켜진 상태는 연파랑(선택됨) */
body.focus-mode .btn-focus-mode { background: var(--safe-bg); color: var(--brand-text); border-color: var(--brand-blue); }

/* Home Client Pin chips */
.client-pin-row {
    display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-4);
}
.client-pin {
    background: var(--bg-surface); border: var(--border-light); border-radius: var(--radius-pill);
    padding: 6px 14px; font-size: 13px; font-weight: 700; color: var(--text-normal);
    cursor: pointer; transition: var(--motion-fast); display: inline-flex; align-items: center; gap: 6px;
}
.client-pin:hover { background: var(--safe-bg); color: var(--safe-text); border-color: var(--brand-blue); }
.client-pin .count { background: var(--bg-canvas); color: var(--text-weak); padding: 1px 8px; border-radius: var(--radius-s); font-size: 11px; }

/* --- Search Bar & Header Tools --- */
.header-tools-wrapper {
    display: flex; align-items: center; gap: var(--space-3);
}

.toss-search-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--r-card);
    padding: 0 12px 0 18px;
    height: 44px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--r-hairline);
    box-shadow: none;
    transition: var(--motion-fast);
    /* 기본 440px, 자리가 모자라면 240px까지 줄어든다 */
    flex: 0 1 440px; min-width: 240px;
}
.toss-search-card:hover { border-color: var(--r-ash); }
.toss-search-card:focus-within {
    box-shadow: var(--focus-ring);
    border-color: var(--r-hairline);
}

.search-input-area { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.search-icon { font-size: 14px; color: var(--r-fog); }
/* 검색 input — 내부 input은 보더/포커스 제거 (래퍼가 처리) */
.search-input {
    border: none !important;
    outline: none !important;
    font-size: 14px !important;
    width: 100%; min-width: 0;
    background: transparent !important;
    color: var(--r-graphite);
    font-weight: 500;
    padding: 0 !important;
    height: auto !important;
    box-shadow: none !important;
    font-family: var(--font-sans) !important;
}
.search-input:focus,
.search-input:focus-visible {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
.search-input::placeholder { color: var(--r-fog); font-weight: 500; }
.divider-vertical { width: 1px; height: 16px; background: var(--r-hairline); margin: 0 4px; }

/* Switch Toggle */
.filter-toggle-area {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 12px; border-radius: var(--radius-pill);
    cursor: pointer; transition: var(--motion-fast);
}
.filter-toggle-area:hover { background: var(--ink-tint-03); }
.toss-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toss-switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--surface-control-off); transition: background-color var(--motion-fast); border-radius: var(--radius-pill);
}
.slider:before {
    position: absolute; content: ""; height: 18px; width: 18px;
    left: 2px; bottom: 2px; background-color: white;
    transition: transform var(--motion-fast); border-radius: 50%; box-shadow: 0 2px 4px var(--ink-tint-10);
}
input:checked + .slider { background-color: var(--brand-blue); }
input:checked + .slider:before { transform: translateX(18px); }
.switch-label { font-size: 14px; font-weight: 600; color: var(--text-normal); white-space: nowrap; }

/* View Toggle & Batch Button */
.view-toggle-group {
    background: var(--r-card); border-radius: var(--radius-m);
    padding: 3px; height: 44px;
    display: inline-flex; align-items: center;
    border: 1px solid var(--r-hairline);
    box-shadow: none;
}
.btn-view-toggle {
    padding: 0 12px; height: 36px; border: none; background: transparent;
    cursor: pointer; border-radius: var(--radius-s); font-size: 16px; color: var(--r-fog);
    transition: var(--motion-fast); display: inline-flex; align-items: center; justify-content: center;
}
.btn-view-toggle:hover { color: var(--r-graphite); background: var(--r-sky-wash); }
.btn-view-toggle.active { background: var(--r-sky-wash); color: var(--brand-text); }


/* --- Kanban Board --- */
#board-wrapper { display: flex; flex-direction: column; height: 100%; position: relative; }
.board-container {
    display: flex; gap: var(--space-5); height: 100%;
    overflow-x: auto; padding-bottom: 20px;
    align-items: flex-start; scroll-snap-type: x mandatory;
    width: 100%;
}
.list-view-container {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: var(--space-5);
    height: 100%; overflow-y: auto; padding-bottom: 40px;
    padding-right: 8px;
    align-items: start;
}
.list-view-container.active { display: grid; }

.notice-bar-area {
    margin-bottom: var(--space-4); display: flex; gap: var(--space-3); flex-wrap: wrap; flex-shrink: 0;
}
.notice-pill {
    background: var(--bg-surface); color: var(--text-normal);
    padding: 8px 16px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
    border: 1px solid var(--border-hairline);
}

/* 보드 변경 감지 배너 (다른 팀원의 수정/이동/추가/삭제 안내) */
.board-change-banner {
    margin-bottom: var(--space-4); flex-shrink: 0;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px; border-radius: var(--radius-l);
    background: var(--safe-bg); color: var(--safe-text); font-size: 14px; font-weight: 700;
    animation: board-banner-in 0.25s ease;
}
.board-change-banner button {
    margin-left: auto; background: var(--brand-blue); color: var(--text-on-brand);
    border: none; padding: 8px 16px; border-radius: var(--radius-s);
    font-weight: 700; font-size: 13px; cursor: pointer;
}
.board-change-banner button:hover { filter: brightness(0.95); }
@keyframes board-banner-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.column {
    flex: 1; min-width: 260px;
    display: flex; flex-direction: column; height: 100%;
    position: relative; scroll-snap-align: start;
    background: transparent;
}
.column-header {
    font-size: 17px; font-weight: 700; color: var(--text-normal);
    margin-bottom: var(--space-4); display: flex; justify-content: space-between; align-items: center;
    padding: 0 8px; flex-shrink: 0; height: 32px;
}
.column-header span.col-count {
    background: var(--ink-tint-06); color: var(--text-normal);
    padding: 2px 10px; border-radius: var(--radius-s); font-size: 13px; font-weight: 700;
}
.column-body {
    flex: 1; overflow-y: auto; padding: 4px 8px 20px 8px;
    scrollbar-width: thin; min-height: 200px;
}
.column-cards { min-height: 12px; }
.sortable-ghost {
    background: var(--safe-bg) !important;
    border: 2px dashed var(--brand-blue) !important;
    opacity: 0.8;
}

/* Empty State in kanban column */
.col-empty-state {
    text-align: center; padding: 48px 16px; color: var(--text-disable);
    font-size: 13px; line-height: 1.7; font-weight: 500;
}
.col-empty-state .emoji { font-size: 28px; display: block; margin-bottom: 8px; }
.col-empty-state .hint { font-size: 11px; color: var(--text-disable); margin-top: 4px; display: block; }

/* Empty State for swimlanes / archive */
.empty-state {
    text-align: center; padding: 60px 24px; color: var(--text-weak);
    font-size: 14px; line-height: 1.7;
}
.empty-state .emoji { font-size: 36px; display: block; margin-bottom: 12px; }
.empty-state .title { font-size: 16px; font-weight: 700; color: var(--text-normal); margin-bottom: 4px; }

.task-card {
    background: var(--bg-surface); border-radius: var(--radius-l);
    padding: 16px 18px; margin-bottom: var(--space-3);
    box-shadow: var(--shadow-card);
    cursor: pointer; border: 1px solid var(--border-hairline);
    transition: all var(--motion-fast);
    position: relative;
    display: flex; flex-direction: column; gap: 8px;
}
.task-card:focus-visible { box-shadow: var(--focus-ring); }
.task-card:hover {
    border-color: var(--border-mute);
    box-shadow: var(--shadow-hover);
}
.task-card.hidden { display: none !important; }

/* 긴급은 카드 상단의 '긴급' 라벨 + D-Day 색으로 표시 (빨간 점은 중복이라 제거) */
.task-card.p-medium { /* 시각 변화 없음 */ }
.task-card.p-low    { opacity: 0.7; }
.task-card.p-low:hover { opacity: 1; }

/* 긴급 인라인 라벨 (카드 상단 행) */
.urgent-inline {
    display: inline-flex; align-items: center; gap: 2px;
    background: var(--danger-bg-soft); color: var(--danger-text);
    font-size: 11px; font-weight: 700;
    padding: 2px 7px; border-radius: var(--radius-xs);
    white-space: nowrap;
}

/* NEW 표시는 카드 하단 "방금 업데이트" 칩으로만 처리 (외곽 ring 제거) */

/* Card top row */
.card-top-row {
    display: flex; justify-content: space-between;
    align-items: center; gap: 8px;
    min-height: 24px;
}
.card-top-left {
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap; min-width: 0;
}

/* 칼럼의 '업무 추가' — 칸 이름 바로 아래 고정 (카드가 많아져도 같은 자리, 2026-10-19 사용자 요청) */
.btn-sticky-add {
    width: 100%; background: transparent;
    border: 1px dashed var(--border-mute);
    color: var(--text-weak); font-weight: 600; padding: 12px;
    border-radius: var(--radius-m); cursor: pointer; transition: var(--motion-fast);
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 14px !important;
}
.btn-sticky-add:hover { border-color: var(--brand-blue); color: var(--safe-text); background: var(--safe-bg); }

/* 멤버 색 표시 — 멤버 색으로 꽉 채운 배지 (TDS badge fill)
   JS 가 style="--mc:#RRGGBB" 로 멤버 색만 넘김.
   글자색은 배경색과 상관없이 흰색으로 고정 (2026-10-16 사용자 요청: 노랑·초록에서도 흰 글자로 충분히 보임) */
/* 팀 배지(디자인·마케팅)도 같은 방식 */
.badge-team-design { --mc: var(--team-design); }
.badge-team-marketing { --mc: var(--team-marketing); }
.cal-author-chip { --mc: var(--ac); }
.assignee-badge, .member-chip, .activity-item .who, .comment-item .avatar, .mention-avatar, .badge-team, .cal-author-chip {
    --mc-fallback: #8b95a1;
    background: var(--mc, var(--mc-fallback)) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: none;
}
/* 리포트 목록의 팀 표시: 색 없이 회색 글자만 (멤버 색 배지와 헷갈리지 않게) */
.history-team { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--text-weak); vertical-align: middle; white-space: nowrap; }
.assignee-badge {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 3px 9px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 700;
}
.client-name-text {
    font-size: 13px; font-weight: 700; color: var(--text-normal);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: var(--bg-sunken); padding: 2px 8px; border-radius: var(--radius-sm);
}

.card-title-text {
    font-size: 16px; font-weight: 700; color: var(--text-strong);
    margin: 2px 0; line-height: 1.45;
}
.card-meta-text {
    font-size: 13px; color: var(--text-weak);
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    margin-top: 4px;
}
.card-meta-text .meta-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-size: 12px;
}
.card-meta-memo {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-weak);
    width: 100%;
    line-height: 1.4;
    font-size: 12px;
}

/* Checklist mini progress bar in card */
.card-progress-wrap {
    display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-weak); font-weight: 600;
}
.card-progress-bar {
    flex: 1; height: 4px; background: var(--bg-canvas); border-radius: 2px; overflow: hidden;
}
.card-progress-fill { height: 100%; background: var(--brand-blue); border-radius: 2px; transition: width 0.3s; }

.card-bottom-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--bg-canvas);
    font-size: 11px; color: var(--text-disable); font-weight: 500;
    gap: 8px;
}
.card-bottom-row .bottom-left { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.card-bottom-row .icon-stat { display: inline-flex; align-items: center; gap: 3px; color: var(--text-weak); }
.card-bottom-row .muted { color: var(--text-disable); }
.meta-new-tag {
    display: inline-flex; align-items: center;
    background: var(--brand-blue-tint-10); color: var(--brand-text);
    font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-xs);
}

/* 카드 하단 인라인 ✔ 버튼 (uquick complete) — 본문 가리지 않음 */
.btn-quick-done-inline {
    background: transparent; border: 1px solid var(--border-hairline);
    color: var(--text-disable); cursor: pointer;
    width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; transition: var(--motion-fast); flex-shrink: 0;
    opacity: 0.4;
}
.task-card:hover .btn-quick-done-inline,
.task-card:focus-within .btn-quick-done-inline {
    opacity: 1; color: var(--brand-text); border-color: var(--brand-blue);
}
.btn-quick-done-inline:hover {
    background: var(--brand-blue); color: var(--text-on-brand) !important; border-color: var(--brand-blue);
}

.badge-priority { font-size: 11px; padding: 4px 8px; border-radius: var(--radius-sm); font-weight: 700; display:inline-flex; align-items:center; gap:4px; }
.badge-p-high { background: var(--danger-bg-soft); color: var(--danger-text); }
.badge-p-medium { background: var(--bg-canvas); color: var(--text-normal); }
.badge-p-low { background: var(--bg-sunken); color: var(--text-weak); border: var(--border-light);}

/* 구 .btn-quick-done (우상단 floating) — 카드 하단 inline 버튼으로 대체됨 */

/* D-Day chip */
.dday-chip { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; }
.dday-chip.urgent { background: var(--danger-bg-soft); color: var(--danger-text); }
.dday-chip.soon { background: var(--warn-bg); color: var(--warn-text); }
.dday-chip.over { background: #d22030; color: #fff; }   /* 마감 지남: 가장 진한 경고. 모든 테마에서 같은 꽉 찬 빨강 + '지남' 글자 */
.dday-chip.normal { background: var(--bg-sunken); color: var(--text-weak); }

/* List View Styles (Swimlanes) */
.swimlane-group {
    background: var(--bg-surface); border-radius: var(--radius-l); padding: var(--space-5);
    box-shadow: var(--shadow-card);
    display: flex; flex-direction: column;
}
.swimlane-header {
    display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4);
    padding-bottom: var(--space-3); border-bottom: var(--border-subtle); flex-shrink: 0;
}
.swimlane-title { font-size: 18px; font-weight: 700; color: var(--text-strong); }
.swimlane-count { background: var(--bg-canvas); color: var(--text-weak); padding: 2px 8px; border-radius: var(--radius-s); font-size: 13px; font-weight: 700; }

.list-task-container { min-height: 50px; flex: 1; }

.list-section-title {
    font-size: 13px; font-weight: 700; color: var(--brand-text); margin: 16px 0 8px 0;
    display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 0.3px;
}
.list-section-title.normal { color: var(--text-weak); margin-top: 24px; }

.list-row {
    display: flex; align-items: center; padding: 12px 16px;
    border-radius: var(--radius-s); transition: var(--motion-fast); cursor: pointer;
    border: 1px solid transparent; margin-bottom: 4px;
    background: var(--bg-surface);
}
.list-row:hover { background: var(--bg-sunken); border-color: var(--border-subtle); }
.list-row-status { width: 80px; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.list-row-status.todo { color: var(--text-weak); }
.list-row-status.progress { color: var(--brand-text); }
.list-row-status.hold { color: var(--text-weak); }
.list-row-status.waiting { color: var(--warn-text); }
.list-row-title { flex: 1; font-weight: 600; font-size: 15px; color: var(--text-strong); margin: 0 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row-meta { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--text-weak); flex-shrink: 0; }

/* --- Calendar --- */
#page-calendar { overflow-y: auto; overflow-x: hidden; }
.calendar-full-wrapper {
    background: transparent; padding: 8px 0 0;
    display: flex; gap: 32px;
    width: 100%;
    box-sizing: border-box;
}
.cal-left { flex: 3; display: flex; flex-direction: column; min-width: 0; }
.cal-right {
    flex: 1; background: var(--bg-surface); border: 1px solid var(--border-hairline);
    border-radius: var(--radius-l); padding: var(--space-5);
    display: flex; flex-direction: column; min-width: 320px;
}
.cal-right .monthly-list-area { overflow: auto; flex: 1;}

.cal-grid-full {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: var(--space-3); flex: 1; min-height: 600px;
}
/* 월 이동 버튼 — 전역 button 15px !important 를 넘어서는 큼직한 원형 버튼 */
.cal-nav-btn {
    border: 1px solid var(--border-hairline); background: var(--bg-surface);
    width: 44px; height: 44px; border-radius: var(--radius-m); padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 28px !important; line-height: 1; font-weight: 700;
    color: var(--text-strong); cursor: pointer; transition: var(--motion-fast);
}
.cal-nav-btn:hover { background: var(--bg-sunken); border-color: var(--brand-blue); color: var(--brand-text); }
.cal-nav-btn:active { transform: scale(0.96); }
.cal-cell-full {
    border-radius: var(--radius-m); padding: var(--space-3); min-height: 120px;
    border: 1px solid var(--border-hairline); cursor: pointer;
    display: flex; flex-direction: column; gap: 6px;
    transition: var(--motion-fast); background: var(--bg-surface);
    overflow: hidden;
}
.cal-cell-full:hover { background: var(--bg-sunken); z-index: 5; }
.cal-cell-full:focus-visible { z-index: 6; }
.cal-cell-full.today { background: var(--brand-blue-tint-04); border-color: var(--cal-today-border); }
.cal-cell-full.active { border: 2px solid var(--brand-blue); z-index: 2; }

.date-header { display: flex; justify-content: space-between; align-items: flex-start; }
.date-num { font-weight: 700; font-size: 16px; }
.date-num.sunday,
.date-num.holiday { color: var(--danger-text) !important; }
.holiday-name { font-size: 11px; color: var(--danger-text); font-weight: 600; margin-top: 2px; text-align: right;}

/* 캘린더 셀 일정 — 점(dot) → 색상 텍스트 pill (RemindMe 스타일) */
.cal-events { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; min-width: 0; }
.cal-ev {
    font-size: 12px; font-weight: 600; line-height: 1.35;
    padding: 3px 8px; border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--ev, var(--brand-blue)) 14%, var(--bg-surface));
    color: color-mix(in srgb, var(--ev, var(--brand-blue)) 45%, var(--text-strong));
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    cursor: pointer; transition: filter var(--motion-fast);
}
.cal-ev:hover { filter: brightness(0.96); }
/* 작성자 이름 칩 — 우측 패널/월간 리스트에서 '누구의 일정'인지 자동 표기 */
.cal-author-chip {
    flex-shrink: 0; white-space: nowrap;
    font-size: 12px; font-weight: 700; line-height: 1.4;
    color: color-mix(in srgb, var(--ac, var(--text-weak)) 45%, var(--text-strong));
    background: color-mix(in srgb, var(--ac, var(--brand-blue)) 14%, var(--bg-surface));
    padding: 2px 9px; border-radius: var(--radius-pill);
}
@supports not (background: color-mix(in srgb, red 10%, white)) {
    .cal-author-chip { background: var(--bg-sunken); }
}
.cal-ev.notice { font-weight: 700; color: var(--danger-text); }
.cal-ev.done { color: var(--text-disable); text-decoration: line-through; opacity: .75; }
.cal-ev-more { font-size: 11px; font-weight: 700; color: var(--text-weak); padding: 1px 6px; }
/* color-mix 미지원 브라우저 폴백 — 좌측 액센트 + 중립 배경 */
@supports not (background: color-mix(in srgb, red 10%, white)) {
    .cal-ev { background: var(--bg-sunken); }
}

.monthly-item {
    padding: var(--space-4) 0; border-bottom: 1px solid var(--border-faint);
    display: flex; align-items: center; gap: var(--space-3); color: var(--text-normal); font-size: 15px;
}
.memo-link { color: var(--brand-text); text-decoration: underline; }

/* Inline edit for calendar items */
.cal-item-inline-edit {
    width: 100%; padding: 6px 8px; border-radius: var(--radius-sm);
    border: 1px solid var(--brand-blue); font-size: 15px;
    background: var(--bg-surface); outline: none;
}

/* --- Archive --- */
#page-archive { overflow-y: auto; }
.archive-toolbar {
    padding: 0 0 var(--space-4); margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-hairline);
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
}
.btn-period {
    height: 44px; padding: 0 18px; border-radius: var(--radius-m);
    border: 1px solid var(--r-hairline);
    background: var(--r-card); color: var(--r-graphite);
    font-weight: 600; font-size: 13px; cursor: pointer;
    transition: var(--motion-fast); letter-spacing: -0.1px;
}
.btn-period:hover { background: var(--r-sky-wash); border-color: var(--r-signal-blue); color: var(--brand-text); }
.btn-period.active {
    background: var(--safe-bg); color: var(--brand-text); border-color: var(--brand-blue);
}

/* Archive summary block */
.archive-summary {
    background: var(--bg-surface); border: 1px solid var(--border-hairline);
    border-radius: var(--radius-l); padding: var(--space-5);
    margin-bottom: var(--space-5); box-shadow: var(--shadow-card);
}
.archive-summary-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); flex-wrap: wrap; gap: 12px; }
.archive-summary-title { font-size: 17px; font-weight: 700; color: var(--text-strong); }
.archive-summary-actions { display: flex; gap: 8px; }
.btn-export-csv {
    background: var(--bg-sunken); border: var(--border-light); padding: 8px 14px;
    border-radius: var(--radius-s); cursor: pointer; font-size: 13px; font-weight: 700;
    color: var(--text-normal); display: flex; align-items: center; gap: 6px;
}
.btn-export-csv:hover { background: var(--bg-canvas); }
.archive-summary-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-3);
}
.summary-stat { padding: 4px var(--space-4); border-left: 1px solid var(--border-hairline); }
.summary-stat:first-child { border-left: none; padding-left: 0; }
.summary-stat .label { font-size: 12px; color: var(--text-weak); font-weight: 600; margin-bottom: 4px; }
.summary-stat .value { font-size: 22px; font-weight: 700; color: var(--text-strong); }
.summary-stat .sub { font-size: 11px; color: var(--text-weak); margin-top: 2px; }
.member-bar-list { margin-top: var(--space-4); }
.member-bar-item {
    display: flex; align-items: center; gap: 12px; padding: 8px 0;
    font-size: 13px;
}
.member-bar-item .name { width: 60px; font-weight: 700; color: var(--text-normal); display: flex; align-items: center; gap: 6px; }
.member-bar-item .name::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mc, var(--text-disable)); flex-shrink: 0; }
.member-bar-item .bar-track { flex: 1; height: 8px; background: var(--bg-canvas); border-radius: var(--radius-xs); overflow: hidden; }
.member-bar-item .bar-fill { height: 100%; background: var(--brand-blue); border-radius: var(--radius-xs); transition: width 0.4s; }
.member-bar-item .cnt { width: 32px; text-align: right; font-weight: 700; color: var(--text-strong); }

.archive-member-tabs {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: var(--space-4); margin-bottom: 8px;
    scrollbar-width: thin;
}
.archive-tab {
    padding: 8px 16px; border-radius: var(--radius-pill); background: var(--bg-surface);
    border: var(--border-light); color: var(--text-weak); font-weight: 600; font-size: 14px;
    cursor: pointer; transition: var(--motion-fast); white-space: nowrap; display: flex; align-items: center; gap: 6px;
}
.archive-tab:hover { background: var(--bg-sunken); }
.archive-tab.active { background: var(--safe-bg); color: var(--brand-text); border-color: var(--brand-blue); }
.archive-tab-dot { width: 8px; height: 8px; border-radius: 50%; }

.date-picker-group {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--r-card); border: 1px solid var(--r-hairline);
    padding: 0 14px; height: 44px; border-radius: var(--radius-m);
    transition: var(--motion-fast);
}
.date-picker-group:focus-within {
    box-shadow: var(--focus-ring);
    border-color: var(--r-hairline);
}
.date-input {
    border: none; background: transparent; height: 100%;
    font-weight: 500; font-size: 13px; color: var(--r-graphite);
    outline: none; width: auto; min-width: 8.5em; font-family: var(--font-sans);
}
.date-input:focus { outline: none; }
/* archive-search-group 도 단일 보더로 통일 */
.archive-search-group {
    height: 44px !important; padding: 0 14px !important;
    background: var(--r-card) !important;
    border: 1px solid var(--r-hairline);
    border-radius: var(--radius-m) !important;
    transition: var(--motion-fast);
}
.archive-search-group:focus-within {
    box-shadow: var(--focus-ring);
    border-color: var(--r-hairline);
}
.archive-search-input {
    border: none !important; outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-family: var(--font-sans) !important;
}

.history-item {
    padding: 20px var(--space-6); border-bottom: var(--border-subtle);
    display: flex; justify-content: space-between; align-items: center;
    transition: var(--motion-fast); background: var(--bg-surface);
}
.history-item:hover { background: var(--bg-sunken); }
.archive-sub-text {
    font-size: 14px; color: var(--text-weak); margin-left: 16px;
    max-width: 400px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: inline-block; vertical-align: middle;
}
.btn-bulk-del {
    display: none; padding: 8px 16px; border-radius: var(--radius-s);
    background: var(--danger-bg); color: var(--danger-text);
    border: none; font-weight: 700; cursor: pointer; font-size: 14px;
    margin-left: auto; transition: var(--motion-fast);
}
.btn-bulk-del:hover { background: var(--danger-bg-hover); }

/* --- Side Panel --- */
.side-panel-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--ink-tint-30); z-index: var(--z-overlay);
    visibility: hidden; opacity: 0; transition: var(--ani-duration);
}
.side-panel-overlay.open { visibility: visible; opacity: 1; }

.side-panel {
    position: fixed; top: 0; right: -550px; width: 550px; height: 100%;
    background: var(--bg-surface); z-index: var(--z-panel);
    box-shadow: var(--shadow-panel);
    transition: right var(--motion-panel);
    display: flex; flex-direction: column;
}
.side-panel.open { right: 0; }
.side-panel-header {
    padding: var(--space-6); border-bottom: var(--border-subtle);
    display: flex; justify-content: space-between; align-items: center;
}
.side-panel-header .panel-title-row { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
/* 닫기(X) 버튼 — 아이콘 확대 + 44px 히트영역 + 호버 피드백 */
.side-panel-close {
    flex-shrink: 0; background: none; border: none; cursor: pointer;
    font-size: 34px !important; line-height: 1; color: var(--text-weak);
    width: 44px; height: 44px; margin: -6px -8px -6px 4px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-m); transition: var(--motion-fast);
}
.side-panel-close:hover { background: var(--bg-sunken); color: var(--text-strong); }
.side-panel-meta { font-size: 12px; color: var(--text-weak); margin-top: 4px; }
.side-panel-content { flex: 1; overflow-y: auto; padding: var(--space-6); }
.side-panel-footer {
    padding: var(--space-5) var(--space-6); border-top: var(--border-subtle);
    display: flex; gap: var(--space-3); background: var(--bg-surface);
}

/* Mobile drag handle bar */
.side-panel-handle {
    display: none; width: 40px; height: 4px; background: var(--border-mute);
    border-radius: 2px; margin: 8px auto 0; flex-shrink: 0;
}

/* Side panel tabs (Detail / Activity / Comments) */
.panel-tabs {
    display: flex; gap: 4px; padding: 4px; background: var(--bg-canvas);
    border-radius: var(--radius-s); margin-bottom: var(--space-5);
}
.panel-tab {
    flex: 1; padding: 10px 12px; text-align: center; font-size: 13px !important;
    font-weight: 700; color: var(--text-weak); cursor: pointer;
    border-radius: var(--radius-s); transition: var(--motion-fast); position: relative;
    border: none; background: transparent;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.panel-tab.active { background: var(--bg-surface); color: var(--text-strong); box-shadow: 0 2px 6px var(--ink-tint-05); }
.panel-tab .tab-count {
    display: inline-block; margin-left: 4px; background: var(--brand-blue);
    color: var(--text-on-brand); padding: 1px 6px; border-radius: var(--radius-s); font-size: 11px; font-weight: 700;
}
.panel-pane { display: none; }
.panel-pane.active { display: block; }
.side-panel-footer[hidden] { display: none !important; }
/* 버튼이 다섯 개(삭제·복제·기록에 넣기·넘기기·저장)여도 글자가 세로로 꺾이지 않게 */
.side-panel-footer > button { white-space: nowrap; }

/* 업체 자동완성 · 빠른 불러오기 */
.client-input-row { display: flex; align-items: stretch; gap: 8px; }
.client-input-row .form-input { min-width: 0; }
.btn-client-history {
    flex: 0 0 auto; min-width: 68px; border: 1px solid var(--border-hairline);
    border-radius: var(--radius-m); background: var(--bg-surface); color: var(--safe-text);
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-client-history svg { width: 16px; height: 16px; }
.client-quick-history {
    margin: -2px 0 18px; padding: 14px; border-radius: var(--radius-l);
    border: 1px solid var(--border-hairline); background: var(--bg-sunken);
}
.client-quick-head, .client-quick-head > div {
    display: flex; align-items: center; gap: 9px;
}
.client-quick-head { justify-content: space-between; margin-bottom: 8px; }
.client-quick-head > div > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.client-quick-head strong { color: var(--text-strong); font-size: 14px; }
.client-quick-head small { color: var(--text-weak); font-size: 11px; }
.client-quick-mark, .company-history-mark {
    width: 32px; height: 32px; flex: 0 0 32px; border-radius: var(--radius-s);
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--safe-bg); color: var(--safe-text); font-weight: 700;
}
.btn-client-all-history {
    border: 0; background: transparent; color: var(--safe-text); padding: 7px 4px;
    font-size: 12px; font-weight: 700; cursor: pointer;
}
.client-quick-list { display: flex; flex-direction: column; gap: 3px; }
.client-quick-item {
    width: 100%; min-height: 48px; border: 0; border-radius: var(--radius-s);
    background: transparent; color: var(--text-normal); padding: 7px 8px;
    display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
}
.client-quick-item:hover { background: var(--bg-surface); }
.client-quick-item.selected { background: var(--safe-bg); }
.client-quick-radio {
    width: 16px; height: 16px; flex: 0 0 16px; border: 2px solid var(--border-mute); border-radius: 50%;
}
.client-quick-item.selected .client-quick-radio { border: 5px solid var(--brand-blue); }
.client-quick-item > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.client-quick-item strong { color: var(--text-strong); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-quick-item small { color: var(--text-weak); font-size: 11px; }
.btn-open-client-import {
    width: 100%; min-height: 44px; margin-top: 8px; border: 1px solid var(--brand-blue);
    border-radius: var(--radius-m); background: var(--bg-surface); color: var(--brand-text);
    display: flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-open-client-import:disabled { opacity: .45; cursor: not-allowed; }
.btn-open-client-import svg { width: 17px; height: 17px; }

/* 업체 이력 탭 */
.company-history-empty {
    min-height: 360px; padding: 36px 16px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--text-weak);
}
.company-history-empty > svg { width: 38px; height: 38px; color: var(--safe-text); }
#company-history-loading > svg { animation: spin .9s linear infinite; }
.company-history-empty strong { color: var(--text-strong); font-size: 16px; }
.company-history-empty span { max-width: 300px; font-size: 13px; line-height: 1.55; }
.btn-company-back {
    margin-top: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--border-hairline);
    border-radius: var(--radius-m); background: var(--bg-surface); color: var(--safe-text); font-weight: 700; cursor: pointer;
}
.company-history-hero, .company-history-identity { display: flex; align-items: center; gap: 11px; }
.company-history-hero { justify-content: space-between; margin: 6px 0 16px; }
.company-history-mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: var(--radius-m); font-size: 16px; }
.company-history-identity > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.company-history-identity strong { color: var(--text-strong); font-size: 17px; }
.company-history-identity small { color: var(--text-weak); font-size: 12px; }
.btn-new-client-task {
    min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--radius-m);
    background: var(--brand-blue); color: var(--text-on-brand); font-size: 13px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; white-space: nowrap;
}
.btn-new-client-task svg { width: 16px; height: 16px; }
.company-history-stats { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 8px; margin-bottom: 16px; }
.company-history-stats > span {
    min-height: 66px; padding: 10px 12px; border-radius: var(--radius-m);
    background: var(--bg-sunken); display: flex; flex-direction: column; justify-content: center; gap: 5px;
}
.company-history-stats small { color: var(--text-weak); font-size: 11px; }
.company-history-stats strong { color: var(--text-strong); font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-history-filters { display: flex; gap: 6px; margin-bottom: 8px; }
.company-history-filters button {
    min-height: 36px; padding: 0 13px; border: 1px solid var(--border-hairline);
    border-radius: var(--radius-pill); background: var(--bg-surface); color: var(--text-weak);
    font-size: 13px; font-weight: 700; cursor: pointer;
}
.company-history-filters button.active { border-color: var(--brand-blue); background: var(--safe-bg); color: var(--safe-text); }
.company-history-list { display: flex; flex-direction: column; }
.company-history-item {
    width: 100%; min-height: 64px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center; gap: 10px; padding: 9px 8px; border: 0; border-bottom: 1px solid var(--border-faint);
    background: transparent; color: var(--text-normal); text-align: left; cursor: pointer;
}
.company-history-item:hover { background: var(--bg-sunken); }
.company-history-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.company-history-main strong { color: var(--text-strong); font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.company-history-main small { color: var(--text-weak); font-size: 11px; }
.company-history-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand-blue); box-shadow: 0 0 0 4px var(--safe-bg); }
.company-history-dot.done { background: var(--text-weak); box-shadow: 0 0 0 4px var(--bg-sunken); }
.company-history-dot.waiting { background: var(--warn-text); box-shadow: 0 0 0 4px var(--warn-bg); }
.company-history-dot.hold { background: var(--text-disable); box-shadow: 0 0 0 4px var(--bg-sunken); }
.company-history-status { padding: 4px 8px; border-radius: var(--radius-s); background: var(--safe-bg); color: var(--safe-text); font-size: 11px; font-weight: 700; white-space: nowrap; }
.company-history-status.done, .company-history-status.hold { background: var(--bg-sunken); color: var(--text-weak); }
.company-history-status.waiting { background: var(--warn-bg); color: var(--warn-text); }
.company-history-list-empty, .company-history-more { padding: 28px 12px; color: var(--text-weak); text-align: center; font-size: 13px; }
.company-history-more { padding: 12px; }

/* 이전 업무 선택 불러오기 시트 */
.client-import-sheet {
    position: absolute; z-index: var(--z-modal); inset: 0; display: flex; align-items: flex-end;
    background: var(--ink-tint-30);
}
.client-import-sheet[hidden] { display: none !important; }
.client-import-card {
    width: 100%; padding: 22px 24px 26px; border-radius: var(--radius-l) var(--radius-l) 0 0;
    background: var(--bg-surface); box-shadow: 0 -16px 40px var(--ink-tint-15);
}
.client-import-head { display: flex; justify-content: space-between; align-items: flex-start; }
.client-import-head > div { display: flex; flex-direction: column; gap: 4px; }
.client-import-head strong { color: var(--text-strong); font-size: 18px; }
.client-import-eyebrow { color: var(--brand-text); font-size: 12px; font-weight: 700; }
.client-import-source { margin: 8px 0 12px; color: var(--text-weak); font-size: 13px; }
.client-import-options { display: flex; flex-direction: column; gap: 5px; }
.client-import-options label {
    min-height: 54px; padding: 8px 10px; border-radius: var(--radius-m); background: var(--bg-sunken);
    display: flex; align-items: center; gap: 11px; cursor: pointer;
}
.client-import-options label.disabled { opacity: .48; cursor: not-allowed; }
.client-import-options input { width: 18px; height: 18px; accent-color: var(--brand-blue); }
.client-import-options label > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.client-import-options strong { color: var(--text-strong); font-size: 14px; }
.client-import-options small { color: var(--text-weak); font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.client-import-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 14px; }
.btn-import-cancel, .btn-import-confirm { min-height: 44px; border-radius: var(--radius-m); font-weight: 700; cursor: pointer; }
.btn-import-cancel { border: 1px solid var(--border-hairline); background: var(--bg-surface); color: var(--text-normal); }
.btn-import-confirm { border: 0; background: var(--brand-blue); color: var(--text-on-brand); }

@keyframes spin { to { transform: rotate(360deg); } }

/* Activity log */
.activity-list { display: flex; flex-direction: column; gap: 14px; padding: 8px 0; }
.activity-item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 12px; border-radius: var(--radius-s); background: var(--bg-sunken);
}
.activity-item .who {
    width: 32px; height: 32px; border-radius: 50%;
    color: var(--text-on-brand); font-weight: 700; font-size: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.activity-item .body { flex: 1; font-size: 13px; color: var(--text-normal); line-height: 1.6; }
.activity-item .body b { font-weight: 700; }
.activity-item .when { color: var(--text-weak); font-size: 11px; margin-top: 4px; display: block; }
.activity-empty { text-align: center; color: var(--text-disable); padding: 30px 16px; font-size: 13px; }

/* Comments */
.comment-list { display: flex; flex-direction: column; gap: 14px; padding: 8px 0 16px; }
.comment-item {
    display: flex; gap: 12px; align-items: flex-start;
}
.comment-item .avatar {
    width: 36px; height: 36px; border-radius: 50%;
    color: var(--text-on-brand); font-weight: 700; font-size: 14px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.comment-item .bubble {
    flex: 1; background: var(--bg-sunken); border-radius: var(--radius-m);
    padding: 12px 14px; position: relative;
}
.comment-item .bubble .head {
    display: flex; align-items: center; gap: 10px; margin-bottom: 4px;
    font-size: 12px;
}
.comment-item .bubble .author { font-weight: 700; color: var(--text-strong); }
.comment-item .bubble .when { color: var(--text-weak); }
.comment-item .bubble .body {
    font-size: 14px; color: var(--text-normal); line-height: 1.65; white-space: pre-wrap; word-break: break-word;
}
.comment-actions { display: inline-flex; gap: 4px; margin-left: auto; }
.comment-item .btn-comment-del,
.comment-item .btn-comment-edit {
    background: none; border: none; color: var(--r-fog); cursor: pointer;
    font-size: 13px; padding: 2px 6px; border-radius: var(--radius-xs);
    transition: var(--motion-fast);
}
.comment-item .btn-comment-edit:hover { background: var(--r-sky-wash); color: var(--brand-text); }
.comment-item .btn-comment-del:hover { background: var(--coral-tint-08); color: var(--r-coral); }

/* 인라인 댓글 수정 */
.comment-edit-input {
    width: 100%; min-height: 60px;
    padding: 10px 12px;
    border: 1px solid var(--r-hairline);
    border-radius: var(--radius-s);
    font-family: var(--font-sans);
    font-size: 14px !important;
    line-height: 1.5;
    background: var(--r-card);
    resize: vertical;
    outline: none;
    color: var(--r-graphite);
}
.comment-edit-input:focus {
    box-shadow: var(--focus-ring);
}
.comment-edit-actions {
    display: flex; gap: 6px; margin-top: 8px; justify-content: flex-end;
}
.btn-edit-cancel, .btn-edit-save {
    height: 36px; padding: 0 14px;
    border-radius: var(--radius-s); cursor: pointer; font-size: 13px;
    font-weight: 600; transition: var(--motion-fast);
    font-family: var(--font-sans);
}
.btn-edit-cancel {
    background: transparent; border: 1px solid var(--r-hairline);
    color: var(--r-ash);
}
.btn-edit-cancel:hover { border-color: var(--r-ash); color: var(--r-graphite); }
.btn-edit-save {
    background: var(--brand-blue); border: none; color: var(--text-on-brand); font-weight: 700;
}
.btn-edit-save:hover { background: var(--brand-blue-dark); }
.comment-compose {
    display: flex; gap: 8px; margin-top: 8px;
    border-top: var(--border-subtle); padding-top: 16px;
}
.comment-compose textarea {
    flex: 1; padding: 12px; border-radius: var(--radius-s); border: var(--border-light);
    background: var(--bg-surface); outline: none; font-size: 14px !important; min-height: 70px;
}
.comment-compose textarea:focus { border-color: var(--brand-blue); }
.btn-comment-submit {
    background: var(--brand-blue); color: var(--text-on-brand); border: none;
    padding: 0 20px; border-radius: var(--radius-s); font-weight: 700; cursor: pointer;
    align-self: stretch;
}

/* Template picker */
.template-picker {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--space-4);
}
.template-chip {
    background: var(--bg-sunken); border: var(--border-light); border-radius: var(--radius-pill);
    padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--text-normal);
    cursor: pointer; transition: var(--motion-fast);
}
.template-chip:hover { background: var(--safe-bg); color: var(--brand-text); border-color: var(--brand-blue); }

/* --- Modal --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--surface-overlay-dark); z-index: var(--z-modal);
    display: none; justify-content: center; align-items: center;
}
.modal-overlay.open { display: flex; }

.modal-content {
    background: var(--bg-surface); width: 90%; max-width: 480px;
    border-radius: var(--radius-l); padding: var(--space-6);
    box-shadow: var(--shadow-modal);
    animation: scaleUp var(--motion-pop) forwards;
    max-height: 90vh; overflow-y: auto;
}
@keyframes scaleUp { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Custom confirm */
.confirm-modal { max-width: 380px; text-align: center; padding: 28px 24px; }
.confirm-modal .confirm-icon { font-size: 36px; margin-bottom: 12px; display: block; }
.confirm-modal .confirm-title { font-size: 18px; font-weight: 700; color: var(--text-strong); margin-bottom: 8px; }
.confirm-modal .confirm-message { font-size: 14px; color: var(--text-weak); margin-bottom: 24px; line-height: 1.6; white-space: pre-line; word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }
.confirm-modal .confirm-buttons { display: flex; gap: 8px; }
.confirm-modal .confirm-buttons button {
    flex: 1; padding: 14px; border-radius: var(--radius-s); border: none;
    font-weight: 700; cursor: pointer; font-size: 15px;
}
.confirm-modal .btn-confirm-cancel { background: var(--bg-canvas); color: var(--text-normal); }
.confirm-modal .btn-confirm-ok { background: var(--brand-blue); color: var(--text-on-brand); }
.confirm-modal .btn-confirm-ok.danger { background: var(--danger-text); }

/* Batch Import Modal Styles */
.batch-modal-content { max-width: 640px; }
.batch-textarea {
    width: 100%; height: 280px; padding: 16px; border-radius: var(--radius-s);
    border: var(--border-light); font-family: var(--font-sans); font-size: 14px;
    margin-bottom: 16px; resize: none; background: var(--bg-sunken);
}
.batch-textarea:focus { border-color: var(--brand-blue); background: var(--bg-surface); }
.batch-help-text { font-size: 13px; color: var(--text-weak); margin-bottom: 16px; line-height: 1.6; background: var(--bg-canvas); padding: 12px; border-radius: var(--radius-s);}
.batch-preview-area {
    margin-top: 16px; max-height: 200px; overflow-y: auto; display: none;
    border: var(--border-light); border-radius: var(--radius-s); padding: 12px;
}
.batch-preview-item { font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border-faint); display: flex; gap: 8px; align-items: center; }
.batch-preview-item:last-child { border-bottom: none; }
.batch-stats {
    display: flex; gap: 12px; padding: 10px 12px; margin-bottom: 12px;
    background: var(--safe-bg); border-radius: var(--radius-s); font-size: 13px; color: var(--safe-text);
    font-weight: 700;
}
.batch-stats.empty { background: var(--danger-bg); color: var(--danger-text); }

/* ============================================
   Form Styles — Relate 통일 (height 44px, radius 12px)
   ============================================ */
.form-label {
    font-size: 13px; font-weight: 600;
    margin-bottom: 8px; display: block;
    color: var(--r-graphite);
    letter-spacing: -0.1px;
}
.form-label-with-tag {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 3px;
}
.form-label-tag {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    background: var(--bg-sunken);
    color: var(--text-weak);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.form-label-tag-history {
    background: var(--safe-bg);
    color: var(--safe-text);
}
.form-field-help {
    margin: 0 0 8px;
    color: var(--text-weak);
    font-size: 12px;
    line-height: 1.45;
}
.form-field-help-after { margin: 6px 0 0; }
.form-input {
    width: 100%; height: 44px;
    padding: 0 14px;
    border-radius: var(--radius-m);
    border: 1px solid var(--r-hairline);
    outline: none; box-sizing: border-box;
    font-size: 14px;
    transition: var(--motion-fast);
    background: var(--r-card);
    color: var(--r-graphite);
    font-family: var(--font-sans);
    box-shadow: none;
}
.form-input::placeholder { color: var(--r-fog); }
.form-input:hover { border-color: var(--r-ash); }
/* focus: box-shadow ring 만 (border 변경 X — 동시 사용 금지) */
.form-input:focus,
.form-input:focus-visible {
    box-shadow: var(--focus-ring);
    border-color: var(--r-hairline);
}
/* select / textarea 도 동일 시각 통일 */
select.form-input {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
textarea.form-input {
    height: auto; min-height: 120px;
    padding: 12px 14px; line-height: 1.55;
    resize: none;
}
/* date input은 chrome의 calendar 아이콘 위치 보정 */
input[type="date"].form-input,
input.date-input {
    padding-right: 8px;
}
.form-row { display: flex; gap: 16px; margin-bottom: 20px; }

/* 멤버 추가폼 등 작은 input */
.checklist-input,
input[type="text"].checklist-input,
#new-check-text {
    height: 40px !important; padding: 0 12px !important;
    font-size: 14px !important;
}

/* Member Chip & Picker */
.member-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.member-chip {
    padding: 10px 18px; border-radius: var(--radius-pill); color: white; font-size: 15px; font-weight: 600;
    display: flex; align-items: center; gap: 8px; cursor: pointer; transition: var(--motion-fast);
    box-shadow: 0 2px 6px var(--ink-tint-10); border: none;
}
.color-circle { min-width: 32px; min-height: 32px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: var(--motion-fast); }
.color-circle.selected { border-color: var(--text-deep); }

/* Priority & Status UI */
.priority-chip-container { display: flex; gap: 8px; margin-bottom: 20px;}
.priority-chip {
    padding: 8px 16px; border-radius: var(--radius-s); font-size: 14px; font-weight: 600;
    cursor: pointer; transition: var(--motion-fast); border: 1px solid transparent;
    display: flex; align-items: center; gap: 6px;
}
.priority-chip.p-high { background: var(--danger-bg); color: var(--danger-text); border-color: var(--danger-bg);}
.priority-chip.p-medium { background: var(--safe-bg); color: var(--brand-text); border-color: var(--safe-bg);}
.priority-chip.p-low { background: var(--bg-canvas); color: var(--text-weak); border-color: var(--bg-canvas);}
.priority-chip.selected { border: 2px solid; }

.status-toggle-container {
    display: flex; background: var(--bg-canvas); padding: 4px; border-radius: var(--radius-m);
    gap: 4px; overflow-x: auto;
}
.status-toggle-item {
    flex: 1; padding: 12px; text-align: center; font-size: 14px !important; font-weight: 600;
    color: var(--text-weak); cursor: pointer; border-radius: var(--radius-s);
    transition: var(--motion-fast); white-space: nowrap;
    border: none; background: transparent;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.status-toggle-item.selected {
    background: var(--bg-surface); color: var(--text-strong);
    box-shadow: 0 2px 8px var(--ink-tint-06); font-weight: 700;
}

.memo-label-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.btn-copy-small {
    background: var(--ink-tint-05); border: none; border-radius: var(--radius-sm);
    padding: 4px 8px; font-size: 12px; cursor: pointer; color: var(--text-normal);
    transition: var(--motion-fast); display: flex; align-items: center; gap: 4px; font-weight: 600;
}
.btn-copy-small:hover { background: var(--ink-tint-10); }

/* Checklist & Duplicate UI */
.checklist-container { margin-bottom: 24px; }
.checklist-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border-faint);
}
.checklist-item.checked span { text-decoration: line-through; color: var(--text-faint); }
.checklist-input { border: none; background: var(--bg-sunken); padding: 10px; border-radius: var(--radius-s); width: 100%; margin-top: 8px; }
.btn-del-check { background: none; border: none; color: var(--text-disable); cursor: pointer; font-size: 16px; margin-left: auto; }
.btn-del-check:hover { color: var(--danger-text); }

.btn-duplicate {
    flex: 0.4; background: var(--bg-canvas); color: var(--text-normal);
    border: none; padding: 16px; border-radius: var(--radius-m); font-weight: 700;
    cursor: pointer; transition: var(--motion-fast);
}
.btn-duplicate:hover { background: var(--border-hairline); }
.btn-towork { flex: 0.6; white-space: nowrap; }

/* Handoff button */
.btn-handoff {
    background: var(--success-bg-soft); color: var(--success-text); border: 1px solid var(--success-border-soft);
    padding: 10px 14px; border-radius: var(--radius-s); cursor: pointer;
    font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
    margin-left: 8px; transition: var(--motion-fast);
}
.btn-handoff:hover { background: var(--success-text); color: var(--text-on-brand); border-color: var(--success-text); }

/* Export Button for List View */
.btn-export-text {
    background: var(--bg-surface); border: var(--border-light); padding: 6px 12px;
    border-radius: var(--radius-s); cursor: pointer; font-size: 13px; font-weight: 600;
    color: var(--text-weak); display: flex; align-items: center; gap: 4px;
    margin-left: auto;
}
.btn-export-text:hover { background: var(--bg-sunken); color: var(--text-normal); }

/* --- Toast --- */
#toast-container {
    position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
    z-index: var(--z-toast); display: flex; flex-direction: column; gap: 10px; pointer-events: none;
    align-items: center;
}
.toss-toast {
    background: var(--surface-toast-bg);
    color: white; padding: 14px 24px; border-radius: var(--radius-pill);
    font-size: 15px; font-weight: 600;
    /* 긴 문장도 좁게 꺾이지 않게 넉넉한 폭 (2026-10-22) */
    min-width: min(320px, calc(100vw - 32px)); max-width: min(560px, calc(100vw - 32px)); box-sizing: border-box;
    line-height: 1.5; word-break: keep-all; text-wrap: pretty;
    box-shadow: 0 8px 24px var(--ink-tint-12);
    animation: toastSlideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    display: flex; align-items: center; gap: 10px; pointer-events: auto;
}
.toss-toast.fade-out { animation: toastFadeOut 0.3s forwards; }
.toss-toast .toast-undo {
    background: var(--white-tint-15); color: #fff; /* 토스트는 모든 테마에서 어두운 배경 */
    border: none; padding: 4px 12px; border-radius: var(--radius-pill);
    font-size: 13px; font-weight: 700; cursor: pointer;
    margin-left: 8px;
}
.toss-toast .toast-undo:hover { background: var(--white-tint-25); }
@keyframes toastSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastFadeOut { to { opacity: 0; transform: translateY(-10px); } }

/* --- Keyboard shortcut hint pill --- */
.kbd {
    display: inline-flex; align-items: center; padding: 1px 6px;
    background: var(--ink-tint-06); border-radius: var(--radius-xs);
    font-size: 11px; font-weight: 600; color: var(--text-weak);
    font-family: ui-monospace, monospace;
}

/* ============================================
   Floating Action Button (모바일 전용)
   ============================================ */
.fab-container {
    position: fixed; right: 20px; bottom: 90px;
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    z-index: var(--z-sticky);
    display: none; /* 모바일에서만 노출 */
    flex-direction: column; gap: 12px;
    align-items: center;
}
.fab-main, .fab-secondary {
    border-radius: 50%; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px var(--ink-tint-15);
    transition: var(--motion-fast);
}
.fab-main {
    width: 56px; height: 56px; background: var(--brand-blue); color: var(--text-on-brand);
    font-size: 30px; font-weight: 400; line-height: 1;
}
.fab-main:active { transform: scale(0.92); }
.fab-main.open svg, .fab-main.open i { transform: rotate(45deg); }
.fab-menu {
    display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.fab-menu[hidden] { display: none !important; }
.fab-menu button {
    border: 1px solid var(--border-hairline); border-radius: var(--radius-pill);
    background: var(--bg-surface); color: var(--text-strong);
    box-shadow: 0 6px 18px var(--ink-tint-15);
    min-height: 44px; padding: 0 16px;
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}

/* 컬럼 페이지 인디케이터 (모바일 칸반) */
.mobile-col-indicator {
    display: none;
    position: sticky; top: 0;
    background: var(--bg-canvas);
    padding: 8px 0; margin-bottom: 8px; z-index: 1;
    text-align: center; font-size: 12px;
    color: var(--text-weak); font-weight: 600;
}
.mobile-col-indicator .dots { display: inline-flex; gap: 6px; vertical-align: middle; margin-left: 8px; }
.mobile-col-indicator .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-mute); transition: var(--motion-fast); }
.mobile-col-indicator .dot.active { background: var(--brand-blue); width: 16px; border-radius: 3px; }

/* --- Responsive Breakpoints --- */

/* 1280px 이하 — 헤더가 좁아 버튼 텍스트가 줄바꿈되는 구간 */
@media (max-width: 1280px) {
    .toss-search-card { min-width: 200px; }
    .toss-search-card .switch-label { display: none; } /* "내 업무만" 라벨 숨기고 토글만 */
    /* 보드 도구 버튼 두 개(텍스트로 추가·보드·칸 편집)는 아이콘만. 이름은 title·aria-label로 유지 */
    .btn-batch-add .btn-label { display: none; }
    .btn-batch-add { padding: 10px 12px; gap: 0; }
    .btn-focus-mode,
    .btn-member { padding: 9px 12px; font-size: 13px; }
    .content-header { padding: 0 20px; gap: 8px; }
}

@media (max-width: 1200px) {
    .calendar-full-wrapper { flex-direction: column; padding: 8px 0 0; gap: 24px;}
    .cal-left { min-width: 100%; flex: auto; }
    .cal-grid-full { min-height: 400px; }
    .cal-right { min-width: 100%; flex: auto; }
}

@media (max-width: 1024px) {
    .toss-search-card { min-width: 180px; }
    .list-view-container { grid-template-columns: 1fr; }
    .archive-toolbar { gap: 12px; }
    /* 버튼 텍스트 숨기고 아이콘만 (텍스트는 title/aria-label로 접근성 유지) */
    .btn-focus-mode .btn-label,
    .btn-member .btn-label,
    .btn-batch-add .btn-label { display: none; }
    .btn-focus-mode,
    .btn-member,
    .btn-batch-add { padding: 10px 12px; gap: 0; }
}

/* 태블릿 가로(769~960px): 사이드바를 빼면 한 줄에 다 들어가지 않아 오른쪽 버튼이 밀려났다.
   제목·회의 모드·설정은 첫 줄, 검색과 보드 도구는 둘째 줄로 내린다 */
@media (min-width: 769px) and (max-width: 960px) {
    .content-header { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 8px; row-gap: 8px; }
    .page-title { flex: 1 1 0; }
    #global-search-container { order: 3; flex: 1 1 100% !important; justify-content: flex-start !important; }
    .toss-search-card { flex: 1 1 auto; }
}

/* ============================================
   Tablet & Mobile (768px 이하)
   ============================================ */
@media (max-width: 768px) {
    body { flex-direction: column; overflow: hidden; }

    .sidebar {
        position: fixed; bottom: 0; left: 0; right: 0;
        width: 100%; height: 64px;
        /* 아이폰 홈 인디케이터 위로 탭바를 띄움 (미지원 브라우저는 0px 폴백) */
        height: calc(64px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        flex-direction: row; padding-top: 0; padding-left: 0; padding-right: 0;
        border-top: 1px solid var(--border-faint); border-right: none;
        justify-content: stretch; align-items: stretch;
        box-shadow: 0 -4px 16px var(--ink-tint-08); z-index: var(--z-panel);
        overflow: hidden;
    }
    .logo-area, .btn-refresh { display: none; }
    .sidebar-nav {
        flex: 1;
        flex-direction: row !important;
        justify-content: space-around;
        align-items: stretch;
        gap: 0;
        width: 100%;
        height: 100%;
        padding: 0;
        margin: 0;
        /* 보드가 많아지면(최대 12개) 탭이 좁아지지 않고 옆으로 밀어 본다 */
        overflow-x: auto; overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .sidebar-nav::-webkit-scrollbar { display: none; }
    .nav-item {
        /* 56px: 375px 폭에서 탭이 6.7개 보여 끝 탭이 걸쳐 보이므로 옆에 더 있다는 것을 알 수 있다 */
        flex: 1 0 56px; min-width: 56px;
        flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 11px;
        background: transparent !important; color: var(--text-weak); margin-bottom: 0;
        justify-content: center; align-items: center;
        min-height: 44px;
        text-align: center;
        border-radius: 0;
    }
    .nav-item.active { color: var(--brand-text); }
    .nav-item .nav-ico { font-size: 22px; line-height: 1; }
    /* 긴 라벨(디자인팀 보드 등) 대신 짧은 라벨 노출 + 줄바꿈 방지 */
    .nav-item .nav-text {
        font-size: 0;
        line-height: 1.1;
        white-space: nowrap;
        max-width: 100%;
        overflow: hidden;
    }
    .nav-item .nav-text::after {
        content: attr(data-short);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: -0.2px;
    }

    .main-content { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); margin-left: 0; width: 100%; flex: 1; }
    .content-header {
        padding: 12px 16px 0; height: auto; flex-wrap: wrap; gap: 8px;
        margin-bottom: 8px;
    }
    .page-title { font-size: 18px; flex: 1; min-width: 0; gap: 6px; order: 1; display: block; overflow: hidden; text-overflow: ellipsis; }
    .header-right-group { order: 2; }
    #global-search-container { order: 3; flex: 1 1 100% !important; min-width: 0; }
    .header-tools-wrapper { width: 100%; justify-content: space-between; overflow-x: auto; padding-bottom: 8px; gap: 8px; flex-wrap: nowrap; }

    .page-wrapper { padding: 0 16px 156px 16px; overflow-y: auto; }
    body[data-page="calendar"] .fab-container,
    body[data-page="archive"] .fab-container { display: none !important; }

    /* 헤더 안의 데스크톱 전용 버튼 모바일 숨김 */
    .btn-focus-mode { display: none; }
    .btn-batch-add { display: none; } /* FAB로 대체 */
    .today-add-btn { display: none; } /* 모바일 등록은 단일 FAB 메뉴로 통합 */

    .toss-search-card { min-width: auto; flex: 1; padding: 6px 12px; }
    .switch-label { display: none; }
    .toss-switch { transform: scale(0.85); }


    .side-panel { width: 100%; right: -100%; }
    .side-panel-handle { display: block; }
    .side-panel-header { padding: 20px 20px 16px; }
    .side-panel-content { padding: 20px; }
    .side-panel-footer { padding: 16px 20px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }

    /* 보드 — 컬럼별 1개씩 풀스크린 가로 스크롤 */
    .board-container {
        scroll-padding: 0 16px;
        padding: 0 0 24px 0;
        margin: 0 -16px;       /* 풀블리드 */
        padding-left: 16px; padding-right: 16px;
        gap: 12px;
    }
    .column { min-width: calc(100vw - 32px); max-width: calc(100vw - 32px); scroll-snap-align: center; }
    .column-header { padding: 0 4px; }

    .mobile-col-indicator { display: block; }

    .task-card { padding: 14px 16px; margin-bottom: 10px; gap: 6px; }
    .card-title-text { font-size: 15px; margin: 4px 0 4px 0; }
    .client-name-text { font-size: 11px; }
    .card-meta-memo { display: none; } /* 모바일에선 메모 미리보기 숨김 */
    .card-bottom-row .muted { display: none; } /* 모바일에선 업데이트 시각 숨김 */

    /* 모바일은 hover 없으므로 ✔ 버튼 처음부터 보임 */
    .btn-quick-done-inline { opacity: 0.7; width: 30px; height: 30px; font-size: 13px; }

    /* 업무명은 2줄까지 읽히게 하고 담당자·마감·완료는 다음 줄로 분리 */
    .today-row { align-items: flex-start; flex-wrap: wrap; gap: 6px 10px; }
    .today-row .tr-main { flex: 1 1 100%; }
    .today-row .tr-title {
        white-space: normal; display: -webkit-box; -webkit-box-orient: vertical;
        -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.45;
    }
    .today-row .tr-right { width: 100%; justify-content: flex-end; }

    .modal-content {
        width: 95%; padding: 20px;
        max-height: 88vh; max-height: 88dvh; /* dvh 폴백 */
        overflow-y: auto;
    }

    .list-row { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 12px; }
    .list-row-status { width: 100%; display: flex; justify-content: space-between; }
    .list-row-title { margin: 0; white-space: normal; }
    .list-row-meta { width: 100%; justify-content: flex-start; gap: 12px; }

    .calendar-full-wrapper { padding: 0; gap: 16px; }
    .cal-grid-full { gap: 4px; min-height: auto; }
    .cal-cell-full { min-height: 64px; padding: 4px; border-radius: var(--radius-s); overflow: hidden; }
    .date-num { font-size: 12px; }
    .holiday-name { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    /* 좁은 셀: 텍스트 pill → 컴팩트 컬러 바 (제목 숨김). 탭은 셀로 통과시켜 날짜 선택 */
    .cal-events { gap: 2px; margin-top: 2px; }
    .cal-ev {
        font-size: 0; padding: 0; height: 4px; border-radius: 2px;
        background: var(--ev, var(--brand-blue));
        pointer-events: none;
    }
    .cal-ev.done { opacity: .5; text-decoration: none; }
    .cal-ev-more { font-size: 11px; padding: 0; pointer-events: none; }

    .archive-toolbar { flex-direction: column; align-items: stretch; padding: 16px; gap: 12px; }
    .archive-toolbar .archive-btn-group,
    .archive-toolbar .date-picker-group,
    .archive-toolbar .archive-search-group { width: 100%; margin-left: 0 !important; }
    .archive-toolbar .archive-search-group { width: 100% !important; }
    .archive-summary-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .summary-stat .value { font-size: 18px; }
    .history-item { padding: 14px 16px; flex-direction: column; align-items: flex-start; gap: 8px; }

    /* 터치 타겟 44px 보장 */
    .priority-chip, .status-toggle-item { min-height: 44px; padding: 12px 16px; }
    .checklist-item input[type="checkbox"] { transform: scale(1.3); margin-right: 4px; }
    .form-input { font-size: 16px !important; /* iOS 자동 줌 방지 */ }
    .btn-period { min-height: 44px; }

    /* FAB 노출 */
    .fab-container { display: flex; }
}

/* ============================================
   Small Mobile (480px 이하 — 초소형 화면)
   ============================================ */
@media (max-width: 480px) {

    .page-title { font-size: 16px; }


    /* 헤더 우측의 멤버 버튼 작게 */
    .content-header > div[style*="display:flex"]:last-child button {
        padding: 8px 12px !important; font-size: 12px !important;
    }

    .toss-search-card { padding: 4px 10px; }
    .search-input { font-size: 14px; }
    .view-toggle-group { padding: 2px; }
    .btn-view-toggle { padding: 6px 10px; font-size: 16px; }


    /* 칸반 컬럼 풀폭 */
    .column { min-width: calc(100vw - 32px); }

    /* 카드 추가 단순화 */
    .task-card { padding: 14px; }
    .card-progress-wrap { font-size: 11px; }

    /* 캘린더 셀 — 더 작게 + dot 영역 */
    .cal-cell-full { min-height: 56px; padding: 3px; }
    .date-num { font-size: 11px; }
    .holiday-name { display: none; } /* 너무 좁아 가려짐 */

    .cal-right { padding: 16px; }

    /* 모달 풀스크린에 가까움 */
    .modal-content {
        width: 100%; max-width: 100%;
        border-radius: var(--radius-l) var(--radius-l) 0 0;
        margin-bottom: 0; padding: 20px;
        max-height: 95dvh;
    }
    .modal-overlay { align-items: flex-end; }

    /* 사이드 패널 탭 글자 축약 */
    .panel-tab { padding: 10px 6px; font-size: 12px; }

    /* FAB 위치 조금 위로 (탭바와 거리) */
    .fab-container { right: 16px; bottom: 80px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
    .fab-main { width: 52px; height: 52px; font-size: 26px; }

    /* 리포트 요약 */
    .archive-summary-grid { grid-template-columns: 1fr 1fr; }
    .summary-stat { padding: 10px; }
    .summary-stat .value { font-size: 16px; }
    .member-bar-item .name { width: 50px; font-size: 12px; }

    /* 패널 footer 버튼 stack */
    .side-panel-footer { flex-wrap: wrap; }
    .side-panel-footer button { min-height: 44px; }

    /* 멤버 모달 chip */
    .member-chip { padding: 10px 14px; font-size: 13px; }
}

/* ============================================
   메모 줄바꿈 보존 (카드 미리보기)
   ============================================ */
.card-meta-memo {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-weak);
    width: 100%;
    line-height: 1.5;
    font-size: 12px;
    white-space: pre-line; /* \n을 줄바꿈으로 렌더 */
    word-break: break-word;
}


/* ============================================
   Task ID chip — 모든 카드/행에 부착되는 #1234 표시
   클릭하면 클립보드에 복사 (팀 피드에서 #1234로 자동 링크)
   ============================================ */
.task-id-chip {
    display: inline-flex; align-items: center;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    color: var(--r-fog);
    background: transparent;
    border: 1px solid var(--r-hairline);
    padding: 1px 6px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: var(--motion-fast);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    line-height: 1.4;
    user-select: all;
    flex-shrink: 0;
}
.task-id-chip:hover {
    color: var(--brand-text);
    border-color: var(--r-signal-blue);
    background: var(--signal-blue-tint-05);
}
.task-id-chip.copied {
    color: var(--success-text);
    border-color: var(--success-text);
    background: var(--emerald-tint-08);
}

/* 사이드 패널 헤더의 ID chip은 살짝 더 크게 */
.side-panel-header .task-id-chip {
    font-size: 12px;
    padding: 2px 8px;
}

/* 카드 상단 우측 그룹 (ID + D-Day) */
.card-top-right {
    display: inline-flex; align-items: center; gap: 6px;
    flex-shrink: 0;
}

/* 클라이언트 핀 — Relate outlined pill */
.client-pin {
    background: var(--r-card);
    border-color: var(--r-hairline);
    color: var(--r-slate);
}
.client-pin:hover {
    background: var(--r-sky-wash);
    color: var(--brand-text);
    border-color: var(--r-signal-blue);
}
.client-pin .count {
    background: var(--r-sky-wash);
    color: var(--r-slate);
    font-variant-numeric: tabular-nums;
}

/* ============================================
   Team Feed 2차 — 검색바 / 답글 indicator / 리액션 / 이모지 피커 / 알림 토글
   ============================================ */

/* 피드 헤더 (제목 우측 알림 권한 토글 등) */
.feed-toolbar {
    flex-shrink: 0;
    display: flex; align-items: center; gap: 8px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--r-hairline);
    background: var(--r-card);
}
.feed-search-wrap {
    flex: 1;
    display: flex; align-items: center; gap: 8px;
    background: var(--r-card);
    border: 1px solid var(--r-hairline);
    border-radius: var(--radius-m);
    height: 36px; padding: 0 12px;
    transition: var(--motion-fast);
}
.feed-search-wrap:focus-within {
    box-shadow: var(--focus-ring);
    border-color: var(--r-hairline);
}
.feed-search-wrap .icon { color: var(--r-fog); font-size: 13px; }
.feed-search-wrap input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 13px !important; color: var(--r-graphite);
    font-family: var(--font-sans) !important;
    padding: 0;
}
.feed-search-wrap input::placeholder { color: var(--r-fog); }
.feed-search-wrap .btn-clear {
    border: none; background: transparent; cursor: pointer;
    color: var(--r-fog); font-size: 14px; padding: 0 4px;
}
.feed-search-wrap .btn-clear:hover { color: var(--r-coral); }

/* 검색 결과 모드 — 빈 결과 안내 */
.feed-search-empty {
    text-align: center; color: var(--r-fog);
    padding: 40px 20px; font-size: 13px;
}

/* 답글 컨텍스트 — 카카오톡 스타일 (박스/보더 없이 타이포 위계로만)
   1행: "{이름}에게 답장" 작은 회색 라벨
   2행: 원본 본문 (muted) */
.chat-msg .reply-context {
    margin: 6px 0 10px;
    padding: 0;
    cursor: pointer;
    transition: var(--motion-fast);
    max-width: 100%;
}
.chat-msg .reply-context-label {
    font-size: 11px;
    color: var(--r-fog);
    font-weight: 500;
    margin-bottom: 2px;
}
.chat-msg .reply-context-label .to { color: var(--r-graphite); font-weight: 600; }
.chat-msg .reply-context-body {
    font-size: 13px;
    color: var(--r-ash);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-line;
    word-break: break-word;
}
.chat-msg .reply-context:hover .reply-context-label { color: var(--brand-text); }
.chat-msg .reply-context:hover .reply-context-body { color: var(--brand-text); }
.chat-msg .reply-context.deleted .reply-context-body { opacity: 0.6; font-style: italic; }

/* 답글 작성 indicator — 카카오톡 스타일 2단 (compose 영역 위) */
.reply-indicator {
    flex-shrink: 0;
    display: flex; flex-direction: column; gap: 4px;
    padding: 12px 24px;
    background: var(--r-sky-wash);
    border-top: 1px solid var(--r-hairline);
}
.reply-indicator .reply-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.reply-indicator .reply-head-label {
    font-size: 12px; color: var(--r-graphite); font-weight: 600;
}
.reply-indicator .reply-head-label .to { color: var(--brand-text); }
.reply-indicator .reply-body-preview {
    font-size: 13px; color: var(--r-ash); line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-line; word-break: break-word;
}
.reply-indicator .btn-cancel-reply {
    border: none; background: transparent; cursor: pointer;
    color: var(--r-fog); font-size: 18px; line-height: 1;
    padding: 0 4px; flex-shrink: 0;
    border-radius: var(--radius-xs);
    transition: var(--motion-fast);
}
.reply-indicator .btn-cancel-reply:hover { color: var(--r-coral); background: var(--coral-tint-08); }

/* 리액션 배지 (메시지 본문 아래) */
.reactions-row {
    display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px;
}
.reaction-chip {
    display: inline-flex; align-items: center; gap: 4px;
    height: 24px; padding: 0 8px;
    border-radius: var(--radius-pill);
    background: var(--r-card);
    border: 1px solid var(--r-hairline);
    font-size: 12px; color: var(--r-slate); font-weight: 500;
    cursor: pointer; transition: var(--motion-fast);
    font-variant-numeric: tabular-nums;
    position: relative;
}
.reaction-chip:hover { border-color: var(--r-signal-blue); background: var(--r-sky-wash); }
.reaction-chip.mine {
    background: var(--signal-blue-tint-08);
    border-color: var(--r-signal-blue);
    color: var(--brand-text);
}
.reaction-chip .emoji { font-size: 13px; line-height: 1; }
.reaction-chip .cnt { font-size: 11px; }

/* 리액션 커스텀 툴팁 — 누가 달았는지 명확히 표시 (이름 줄바꿈) */
.reaction-chip .reaction-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--r-graphite);
    color: var(--r-card);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-line;
    max-width: 200px;
    min-width: 60px;
    text-align: center;
    box-shadow: var(--r-shadow-md);
    z-index: 25;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s, visibility 0.15s;
    font-weight: 500;
}
.reaction-chip .reaction-tooltip::after {
    content: '';
    position: absolute; top: 100%; left: 50%;
    margin-left: -4px;
    border: 4px solid transparent;
    border-top-color: var(--r-graphite);
}
.reaction-chip:hover .reaction-tooltip {
    opacity: 1; visibility: visible;
}

/* 이모지 피커 (메시지 actions의 + 버튼 클릭 시) */
.emoji-picker {
    position: absolute;
    background: var(--r-card);
    border: 1px solid var(--r-hairline);
    border-radius: var(--radius-m);
    padding: 6px;
    display: flex; gap: 2px;
    box-shadow: var(--r-shadow-md);
    z-index: 30;
}
.emoji-picker button {
    border: none; background: transparent;
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer; font-size: 18px;
    transition: var(--motion-fast);
    display: inline-flex; align-items: center; justify-content: center;
    line-height: 1;
}
.emoji-picker button:hover { background: var(--r-sky-wash); }

/* 메시지 actions에 답글/이모지 버튼 추가 (구조는 chat-msg-actions 그대로 사용) */
.chat-msg-actions .btn-react { /* 동일 패턴 */ }
.chat-msg-actions .btn-reply { /* 동일 패턴 */ }

/* 검색 모드일 때 messages를 컴팩트하게 */
.chat-timeline.search-mode .chat-day-divider { display: none; }
.chat-timeline.search-mode .chat-msg { padding: 8px 4px; }

/* 검색 결과 하이라이트 */
.search-hl {
    background: var(--highlight-search);
    color: var(--r-graphite);
    padding: 0 2px; border-radius: 2px;
    font-weight: 600;
}

/* ============================================
   Touch device (호버 없는 환경) — 데스크톱 사이즈여도 적용
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .btn-quick-done-inline { opacity: 0.6; }
    .task-card:hover { transform: none; }
    .chat-msg-actions { opacity: 0.5; }
}

/* ============================================
   핸드오프 양방향 링크 (사이드패널 헤더)
   ============================================ */
.handoff-link {
    color: var(--brand-text); cursor: pointer;
    font-weight: 600; text-decoration: none;
}
.handoff-link:hover { text-decoration: underline; }
.handoff-link.disabled {
    color: var(--text-weak); cursor: not-allowed; text-decoration: line-through;
}

/* ============================================
   @멘션 자동완성 드롭다운
   ============================================ */
.mention-dropdown {
    position: absolute;
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-m);
    box-shadow: 0 8px 24px var(--ink-tint-12);
    padding: 6px;
    min-width: 180px; max-width: 260px;
    z-index: 9999;
    display: none;
    max-height: 240px; overflow-y: auto;
}
.mention-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius-s);
    cursor: pointer; font-size: 14px;
    transition: background 0.1s;
}
.mention-item:hover, .mention-item.active { background: var(--safe-bg); }
.mention-avatar {
    width: 24px; height: 24px; border-radius: 50%;
    color: var(--text-on-brand); font-weight: 700; font-size: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.mention-name { color: var(--text-strong); font-weight: 600; }

/* ============================================================
   Theme Picker (멤버 관리 모달 안)
   ============================================================ */
.theme-picker-row {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px; padding: 14px 16px;
    background: var(--bg-sunken); border-radius: var(--radius-m);
}
.theme-picker-label {
    font-size: 13px; font-weight: 700; color: var(--text-strong);
    flex-shrink: 0;
}
.theme-picker {
    display: flex; gap: 8px; flex-wrap: wrap; flex: 1;
}
.theme-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: var(--radius-pill);
    background: var(--bg-surface); border: var(--border-light);
    cursor: pointer; transition: var(--motion-fast);
    font-size: 13px; font-weight: 700; color: var(--text-normal);
}
.theme-chip:hover { border-color: var(--brand-blue); }
.theme-chip.active {
    background: var(--brand-blue); color: var(--text-on-brand);
    border-color: var(--brand-blue);
}
.theme-chip-swatch {
    width: 14px; height: 14px; border-radius: 50%;
    border: 1px solid var(--ink-tint-10);
    flex-shrink: 0;
}


/* =====================================================
   업무 패널 · 토스풍 입력 간소화 (진행성 노출)
   - 업무명 크게, 상세 옵션은 접기 → 결정 피로 감소
   ===================================================== */
.form-input-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    padding: 16px 18px;
}
.form-input-title::placeholder { font-weight: 600; color: var(--text-disable); }

.btn-toggle-advanced {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 4px 0 8px;
    padding: 14px 18px;
    background: var(--bg-sunken);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-m);
    cursor: pointer;
    text-align: left;
    transition: background var(--motion-fast), border-color var(--motion-fast);
}
.btn-toggle-advanced:hover { border-color: var(--brand-blue); }
.btn-toggle-advanced .adv-toggle-main {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-strong);
    white-space: nowrap;
}
.btn-toggle-advanced .adv-toggle-caret {
    display: inline-block;
    width: 18px;
    color: var(--brand-text);
    font-weight: 700;
}
.btn-toggle-advanced .adv-toggle-sub {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-weak);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.btn-toggle-advanced.open {
    background: var(--safe-bg);
    border-color: transparent;
}
.btn-toggle-advanced.open .adv-toggle-sub { display: none; }

.detail-advanced {
    margin-top: 6px;
    padding-top: 6px;
    animation: advReveal 0.18s ease;
}
@keyframes advReveal {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   Pull-to-Refresh (모바일 당겨서 새로고침)
   ===================================================== */
.ptr-indicator {
    position: fixed; top: 4px; left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-panel);
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--bg-surface); box-shadow: var(--shadow-soft);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.15s ease;
}
.ptr-indicator.visible { opacity: 1; }
.ptr-spinner {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2.5px solid var(--border-hairline);
    border-top-color: var(--brand-blue);
    transition: transform 0.12s ease;
}
.ptr-indicator.ready .ptr-spinner { transform: rotate(180deg); }
.ptr-indicator.loading .ptr-spinner { animation: ptr-spin 0.6s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* =====================================================
   Lucide 아이콘 — 이모지 대체 (글자 크기에 맞춰 스케일)
   ===================================================== */
svg.lucide {
    width: 1em; height: 1em;
    vertical-align: -0.125em;
    stroke-width: 2;
    flex-shrink: 0;
    display: inline-block;
}
/* 변환 전 <i data-lucide> 는 자리만 차지하고 깜빡임 방지 */
i[data-lucide] {
    display: inline-block;
    width: 1em; height: 1em;
    vertical-align: -0.125em;
}

/* =====================================================
   토스식 인터랙션 — 탭 피드백 (누르면 살짝 눌림)
   기존 transition 을 덮어써도 공통 애니메이션 속성은 유지
   ===================================================== */
.task-card, .list-row, .client-pin, .today-row {
    transition: transform 0.13s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.18s ease,
                background-color 0.15s ease,
                border-color 0.15s ease;
}
.task-card:active, .today-row:active,
.list-row:active, .client-pin:active {
    transform: scale(0.975);
}
/* 접근성: 모션 최소화 선호 시 — 페이지 전환·토스트·모달·호버 이동·눌림 효과 전부 끔 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .task-card:hover, .list-row:hover, .btn-refresh:hover,
    .task-card:active, .today-row:active,
    .list-row:active, .client-pin:active,
    .btn-quick-done-inline:hover, .cal-nav-btn:active { transform: none !important; }
}

/* =====================================================
   기다림(Waiting) 상태 — 카드 표시 + 상세 필드
   ===================================================== */
.card-waiting {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600;
    color: var(--text-weak);
    background: var(--bg-sunken);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-s);
    padding: 6px 10px;
    margin: 2px 0 2px;
}
.card-waiting svg.lucide { color: var(--text-weak); }
.card-waiting > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 확인일 도래 → 주의 색으로 강조 */
.card-waiting.due {
    color: var(--danger-text);
    background: var(--danger-bg);
    border-color: transparent;
}
.card-waiting.due svg.lucide { color: var(--danger-text); }
.waiting-due-tag {
    flex-shrink: 0;
    font-size: 11px; font-weight: 700;
    padding: 2px 7px; border-radius: var(--radius-sm);
    background: var(--danger-text); color: var(--text-on-brand);
}

/* 상세 패널의 기다림 입력 영역 */
.waiting-fields {
    background: var(--bg-sunken);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-l);
    padding: 14px 16px 16px;
    margin: 6px 0 2px;
}
.waiting-fields .form-row { margin-top: 0 !important; }
.waiting-hint {
    font-size: 12px; color: var(--text-weak); margin-top: 8px;
}
.waiting-hint b { color: var(--brand-text); }

/* 기다림 칸반 컬럼 헤더 살짝 구분 */
.column.waiting .column-header { color: var(--text-normal); }

/* =====================================================
   우선순위 = 긴급 토글 하나
   ===================================================== */
.priority-chip-container { display: flex; margin-bottom: 16px; }
/* 업무명 + 긴급 토글 한 줄 배치 */
.title-priority-row { display: flex; align-items: center; gap: 10px; }
.title-priority-row .form-input-title { flex: 1; min-width: 0; }
.title-priority-row .priority-chip-container { margin-bottom: 0; flex-shrink: 0; }
.urgent-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 16px; border-radius: var(--radius-pill);
    border: 1.5px solid var(--border-hairline);
    background: var(--bg-surface); color: var(--text-weak);
    font-size: 14px; font-weight: 700; cursor: pointer;
    transition: var(--motion-fast);
}
.urgent-toggle:hover { border-color: var(--danger-text); color: var(--danger-text); }
.urgent-toggle.on {
    background: var(--danger-bg);
    border-color: transparent;
    color: var(--danger-text);
}
.urgent-toggle svg.lucide { width: 1.05em; height: 1.05em; }

/* =====================================================
   날짜 빠른 선택 칩 (마감일 · 확인일)
   ===================================================== */
.date-quick-row {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.date-chip {
    padding: 8px 12px; border-radius: var(--radius-pill);
    border: 1px solid var(--border-hairline);
    background: var(--bg-surface); color: var(--text-normal);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: var(--motion-fast); white-space: nowrap;
}
.date-chip:hover { border-color: var(--brand-blue); color: var(--brand-text); }
.date-chip.active {
    background: var(--brand-blue); color: var(--text-on-brand);
    border-color: var(--brand-blue);
}
.date-chip-none { color: var(--text-weak); }
.date-inline {
    flex: 1; min-width: 130px; width: auto !important;
}

/* =====================================================
   오늘 (Today) 화면
   ===================================================== */
.today-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.today-hello { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-strong); }
.today-hello b { color: var(--brand-text); }
.today-add-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--brand-blue); color: var(--text-on-brand);
    border: none; padding: 10px 16px; border-radius: var(--radius-pill);
    font-weight: 700; font-size: 14px; cursor: pointer;
}
.today-add-btn:active { transform: scale(0.97); }

.today-wrap { display: flex; flex-direction: column; gap: 16px; max-width: 100%; }
.today-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    align-items: start;
}
.today-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-l);
    padding: 18px 20px 10px;
    box-shadow: var(--shadow-soft);
}
.today-section.is-empty:not(.today-now) {
    padding-top: 14px; padding-bottom: 14px;
}
.today-section.is-empty:not(.today-now) .today-sec-head { margin-bottom: 0; }
.today-section.is-empty:not(.today-now) .today-list { display: none; }
.today-section.today-now { border-color: var(--danger-bg); }
.today-section.today-now .tsh-title { color: var(--danger-text); }

.today-sec-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
}
.tsh-title {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 16px; font-weight: 700; color: var(--text-strong); letter-spacing: -0.02em;
}
.today-count {
    min-width: 22px; height: 22px; padding: 0 7px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-sunken); color: var(--text-weak);
    border-radius: var(--radius-pill); font-size: 12px; font-weight: 700;
}
.today-list { display: flex; flex-direction: column; }
.today-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 8px; border-radius: var(--radius-m); cursor: pointer;
    border-top: 1px solid var(--border-faint);
    transition: background 0.12s ease;
}
.today-row:first-child { border-top: none; }
.today-row:hover { background: var(--bg-sunken); }
.tr-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.today-open {
    border: 0; background: transparent; padding: 0; margin: 0;
    color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.today-open:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 4px; border-radius: var(--radius-xs); }
.tr-title {
    font-size: 15px; font-weight: 600; color: var(--text-strong);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: flex; align-items: center; gap: 5px;
}
.tr-client { color: var(--text-weak); font-weight: 500; }
.tr-urgent { color: var(--danger-text); display: inline-flex; }
.tr-wait { font-size: 12px; color: var(--text-weak); display: inline-flex; align-items: center; gap: 4px; }
.tr-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tr-who { font-size: 12px; color: var(--text-weak); }
.tr-done {
    width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid var(--border-hairline); background: var(--bg-surface);
    color: var(--text-weak); cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center; transition: var(--motion-fast);
}
.tr-done:hover { color: var(--brand-text); border-color: var(--brand-blue); }
.today-empty {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 26px 8px; color: var(--text-disable); font-size: 14px; font-weight: 500; text-align: center;
}
.today-empty svg.lucide { width: 26px; height: 26px; opacity: 0.55; stroke-width: 1.6; }
.today-overload {
    display: flex; align-items: center; gap: 6px;
    background: var(--danger-bg); color: var(--danger-text);
    font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: var(--radius-m); margin-bottom: 8px;
}

/* =====================================================
   오늘 페이지 — 정보구조 폴리시 (참고 대시보드 언어)
   ===================================================== */

/* 섹션별 강조 아이덴티티 (아이콘 + 카운트 배지) — 색상 외 형태(아이콘)로도 구분 */
.ts-respond  .tsh-title svg  { color: var(--brand-text); }
.ts-respond  .today-count    { background: var(--brand-blue-tint-10); color: var(--brand-text); }
.ts-progress .tsh-title svg  { color: var(--warn-text); }
.ts-progress .today-count    { background: var(--warn-bg); color: var(--warn-text); }
.ts-waiting  .tsh-title svg  { color: var(--text-disable); }

/* '지금 처리할 일'이 비면 → 큰 빈 카드 대신 슬림한 all-clear 배너 (JS 변경 없이 :has) */
.today-section.today-now:has(.today-empty) {
    box-shadow: var(--shadow-card);
    border: 1px solid var(--success-border-soft);
    background: var(--success-bg-soft);
}
.today-section.today-now:has(.today-empty) .tsh-title { color: var(--success-text); }
.today-now .today-empty {
    flex-direction: row; justify-content: center; align-items: center;
    padding: 14px 16px; gap: 10px; color: var(--success-text); font-weight: 700;
}
.today-now .today-empty svg.lucide { width: 20px; height: 20px; opacity: 1; color: var(--success-text); }

/* 완료 체크 버튼: 평상시 은은 → 호버/포커스 시 강조 (시각 노이즈 감소) */
.tr-done { opacity: .5; }
.today-row:hover .tr-done,
.tr-done:focus-visible { opacity: 1; }
/* 터치 기기(hover 불가)에서는 항상 또렷하게 */
@media (hover: none) { .tr-done { opacity: 1; } }

/* =====================================================
   오늘 — 머리말(날짜) + 팀 요약 한 줄 (구 '홈' 화면을 통합)
   ===================================================== */
.today-date {
    font-size: 13px; font-weight: 600; color: var(--text-weak);
    margin-bottom: 4px; font-variant-numeric: tabular-nums;
}
.team-summary {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px;
    padding: 12px 16px; margin-bottom: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-l);
    font-size: 13px; color: var(--text-weak);
}
.team-summary-label { font-weight: 700; color: var(--text-normal); }
.team-summary-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.team-stat {
    display: inline-flex; align-items: baseline; gap: 6px;
    padding: 6px 10px; border-radius: var(--radius-s);
    border: none; background: transparent; cursor: pointer;
    font-size: 13px !important; color: var(--text-weak); font-weight: 600;
    transition: background var(--motion-fast);
}
.team-stat strong {
    font-size: 16px; font-weight: 700; color: var(--text-strong);
    font-variant-numeric: tabular-nums;
}
.team-stat:hover { background: var(--bg-sunken); color: var(--text-normal); }
.team-summary-clients-wrap {
    display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0;
}
.team-summary-sub { font-size: 12px; font-weight: 600; color: var(--text-weak); white-space: nowrap; }
.team-summary-clients {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.team-summary-clients-wrap:has(.team-summary-clients:empty) { display: none; }
/* 마감 지남이 있으면 숫자 칸을 빨갛게 채워 첫눈에 보이게 */
.team-stat-overdue.is-alert { background: #d22030; color: #fff; }
.team-stat-overdue.is-alert strong { color: #fff; }
.team-stat-overdue.is-alert:hover { background: #b51b29; color: #fff; }
.data-asof { margin-left: 8px; font-weight: 500; }
.data-asof:not(:empty)::before { content: '·'; margin-right: 8px; }
.data-asof.is-failed { color: var(--danger-text); font-weight: 700; }
.team-summary-clients .client-pin { padding: 4px 10px; font-size: 12px; flex-shrink: 0; white-space: nowrap; }
@media (max-width: 768px) {
    .team-summary { padding: 10px 12px; }
    .team-summary-clients-wrap { margin-left: 0; width: 100%; }
    .team-summary-clients { min-width: 0; overflow-x: auto; flex-wrap: nowrap; }
    .today-add-btn { display: none; }
    .today-row { align-items: flex-start; flex-wrap: wrap; gap: 6px 10px; }
    .today-row .tr-main { flex: 1 1 100%; }
    .today-row .tr-title {
        white-space: normal; display: -webkit-box; -webkit-box-orient: vertical;
        -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.45;
    }
    .today-row .tr-right { width: 100%; justify-content: flex-end; }
    .panel-tabs { gap: 2px; }
    .panel-tab { padding: 10px 3px; font-size: 11px !important; }
    .panel-tab .tab-count { margin-left: 1px; padding: 1px 4px; }
    .client-input-row { align-items: stretch; }
    .btn-client-history { min-width: 62px; }
    .company-history-hero { align-items: flex-start; }
    .company-history-identity { min-width: 0; }
    .company-history-identity strong { display: block; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .btn-new-client-task { padding: 0 10px; }
    .company-history-stats { grid-template-columns: 1fr 1fr; }
    .company-history-stats > span:last-child { grid-column: 1 / -1; }
    .client-import-card { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
}
/* 섹션 제목은 h2 로 (스크린리더 제목 탐색용) — 기본 여백 제거 */
.tsh-title { margin: 0; }
.column > .btn-sticky-add { width: auto; margin: 0 8px 8px; padding: 10px; flex-shrink: 0; }
@media (max-width: 768px) { .column > .btn-sticky-add { margin: 0 4px 8px; } }

/* =====================================================
   한 줄 작업 기록 + 오늘 보고 (worklog.js)
   ===================================================== */
.today-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.today-report-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--safe-bg); color: var(--brand-text);
    border: 0; padding: 10px 16px; border-radius: var(--radius-pill);
    font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit;
}
.today-report-btn:hover { background: var(--safe-bg-hover); }
.today-report-btn:active { transform: scale(0.97); }
.today-report-btn svg.lucide { width: 16px; height: 16px; }

.ts-worklog { padding-bottom: 14px; }

.wl-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* 예정 / 진행 중 / 완료 탭 (worklog.js mount) */
.wl-tabs {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 3px; margin-bottom: 8px;
    background: var(--bg-sunken); border: 1px solid var(--border-hairline); border-radius: var(--radius-m);
}
.wl-tab {
    height: 36px; border: 0; background: transparent; color: var(--text-weak);
    border-radius: var(--radius-s); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.wl-tab b { font-weight: 800; margin-left: 2px; font-variant-numeric: tabular-nums; }
.wl-tab[aria-selected="true"] { background: var(--text-strong); color: var(--bg-surface); }
.wl-tab.is-bump b { animation: wl-bump 0.9s ease-out; }
@keyframes wl-bump { 0%, 100% { color: inherit; } 20%, 60% { color: var(--brand-text); } }
@media (prefers-reduced-motion: reduce) { .wl-tab.is-bump b { animation: none; } }
.wl-form { display: flex; align-items: stretch; gap: 8px; margin-bottom: 8px; position: relative; }
/* 입력 자동완성 (2026-10-22) */
.wl-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; margin: 0; padding: 4px; list-style: none; border: 1px solid var(--border-hairline); border-radius: var(--radius-m); background: var(--bg-surface); box-shadow: 0 8px 24px var(--ink-tint-12); }
.wl-sug { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--radius-s); cursor: pointer; font-size: 14px; color: var(--text-strong); }
.wl-sug:hover { background: var(--bg-sunken); }
.wl-sug.is-on { background: color-mix(in srgb, var(--brand-blue) 12%, var(--bg-surface)); }
.wl-sug-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-sug-tag { flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--text-weak); }
.wl-sug-tag.is-card { padding: 0 8px; border: 1px solid var(--brand-blue); border-radius: var(--radius-pill); color: var(--brand-text); line-height: 20px; }
.wl-tab:focus-visible, .wl-submit:focus-visible, .wl-check:focus-visible, .wl-start:focus-visible, .wl-back:focus-visible,
.wl-body:focus-visible, .wl-drag:focus-visible, .wl-del:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.wl-input, .wl-edit {
    flex: 1; min-width: 0; height: 44px; padding: 0 14px;
    border: 1px solid var(--border-hairline); border-radius: var(--radius-m);
    background: var(--bg-surface); color: var(--text-strong);
    font: inherit; font-size: 15px;
}
.wl-input:focus, .wl-edit:focus { outline: none; border-color: var(--brand-blue); box-shadow: var(--focus-ring); }
.wl-input::placeholder { color: var(--text-disable); }
.wl-submit {
    flex-shrink: 0; border: 0; padding: 0 18px; border-radius: var(--radius-m);
    background: var(--brand-blue); color: var(--text-on-brand);
    font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.wl-submit:active { transform: scale(0.97); }

.wl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.wl-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 6px; border-top: 1px solid var(--border-faint); border-radius: var(--radius-s);
}
.wl-item:first-child { border-top: none; }
.wl-item:hover { background: var(--bg-sunken); }
.wl-item.is-dragging { opacity: .45; background: var(--safe-bg); }
.wl-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.wl-actions { flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.wl-drag {
    width: 28px; height: 28px; flex-shrink: 0; border: 0; border-radius: var(--radius-s);
    background: transparent; color: var(--text-weak); padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.wl-drag { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.wl-drag:active { cursor: grabbing; }
.wl-drag:hover { color: var(--brand-text); background: var(--bg-surface); }
.wl-check {
    width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%;
    border: 2px solid var(--text-disable); background: transparent; color: transparent;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.wl-check:hover { border-color: var(--brand-blue); color: var(--brand-text); }
.wl-item.is-done .wl-check { background: var(--brand-blue); border-color: var(--brand-blue); color: var(--text-on-brand); }
.wl-body {
    flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; padding: 2px 0;
    font: inherit; font-size: 15px; font-weight: 600; color: var(--text-strong); cursor: text;
    word-break: keep-all; overflow-wrap: anywhere; line-height: 1.5;
}
.wl-item.is-done .wl-body { color: var(--text-normal); font-weight: 500; }
.wl-item.is-doing .wl-check { border-color: var(--brand-blue); }
.wl-start {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px;
    border: 1px solid var(--border-hairline); border-radius: var(--radius-s); background: var(--bg-surface);
    color: var(--text-strong); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.wl-start:hover { border-color: var(--brand-blue); color: var(--brand-text); }
.wl-back {
    width: 28px; height: 28px; flex-shrink: 0; border: 0; border-radius: var(--radius-s);
    background: transparent; color: var(--text-weak); cursor: pointer; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.wl-back:hover { color: var(--text-strong); background: var(--bg-sunken); }
.wl-edit { height: 36px; font-size: 15px; }
.wl-main .wl-edit { width: 100%; }
.wl-tail { font-size: 12.5px; font-weight: 500; color: var(--text-weak); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wl-meta { flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--text-weak); font-variant-numeric: tabular-nums; }
.wl-del {
    width: 28px; height: 28px; flex-shrink: 0; border: 0; border-radius: var(--radius-s);
    background: transparent; color: var(--text-weak); cursor: pointer; padding: 0;
    display: inline-flex; align-items: center; justify-content: center; opacity: 0;
}
.wl-item:hover .wl-del, .wl-del:focus-visible { opacity: 1; }
.wl-del:hover { color: var(--danger-text); background: var(--danger-bg); }
@media (hover: none) { .wl-del { opacity: 0.6; } }
.wl-partial {
    flex-shrink: 0; height: 30px; padding: 0 10px; border: 1px solid var(--border-hairline); border-radius: var(--radius-s);
    background: var(--bg-surface); color: var(--text-strong); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.wl-partial:hover { border-color: var(--brand-blue); color: var(--brand-text); }
.wl-partial:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
/* 칸반 연결 (2026-10-21): 올리기 버튼 · 이어진 카드 표시 · 보드·칸 고르기 */
.wl-to-card {
    width: 28px; height: 28px; flex-shrink: 0; border: 0; border-radius: var(--radius-s);
    background: transparent; color: var(--text-weak); cursor: pointer; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.wl-to-card:hover { color: var(--brand-text); background: var(--bg-sunken); }
.wl-to-card:focus-visible, .wl-card-link:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
/* 칸반에서 빼기 (2026-10-22). 웹은 버튼을 모두 보이므로 [⋯]·목록은 쓰지 않는다 (앱·위젯만) */
.wl-unlink {
    width: 28px; height: 28px; flex-shrink: 0; border: 0; border-radius: var(--radius-s);
    background: transparent; color: var(--text-weak); cursor: pointer; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.wl-unlink:hover { color: var(--brand-text); background: var(--bg-sunken); }
.wl-unlink:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.wl-more, .wl-menu { display: none; }
.wl-card-link {
    flex-shrink: 0; align-self: center; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
    border: 1px solid var(--brand-blue); border-radius: var(--radius-pill); background: var(--bg-surface); color: var(--brand-text);
    font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.wl-card-link svg { width: 12px; height: 12px; }
.wl-card-link:hover { background: var(--brand-blue); color: var(--text-on-brand); }
.wl-pick { margin: 2px 0 10px; padding: 12px; border: 2px solid var(--text-strong); border-radius: var(--radius-m); background: var(--bg-surface); list-style: none; }
.wl-pick-title { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--text-strong); }
.wl-pick-title span { margin-left: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-weak); }
.wl-pick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wl-pick-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; font-weight: 700; color: var(--text-weak); }
.wl-pick-field select { height: 38px; min-width: 0; padding: 0 10px; border: 1px solid var(--border-hairline); border-radius: var(--radius-s); background: var(--bg-surface); color: var(--text-strong); font: inherit; font-size: 14px; }
.wl-pick-done { margin: 0; }
.wl-pick-done strong { display: flex; align-items: center; height: 38px; font-size: 14px; font-weight: 600; color: var(--text-strong); white-space: nowrap; }
.wl-pick-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.wl-pick-actions button { height: 36px; padding: 0 16px; border-radius: var(--radius-s); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.wl-pick-cancel { border: 1px solid var(--border-hairline); background: var(--bg-surface); color: var(--text-normal); }
.wl-pick-ok { border: 0; background: var(--brand-blue); color: var(--text-on-brand); }
.wl-pick-ok:disabled { opacity: .55; cursor: default; }
.wl-empty { padding: 14px 6px 6px; font-size: 14px; color: var(--text-disable); line-height: 1.6; word-break: keep-all; }
.wl-order-note { margin: 6px 4px 0; font-size: 12px; color: var(--text-weak); line-height: 1.5; }
.wl-order-note a { color: var(--brand-text); font-weight: 700; }
@media (max-width: 680px) {
    /* 좁으면 버튼만 다음 줄 오른쪽으로 내린다. 제목 칸 최소 폭을 둬서 한 글자씩 꺾이지 않게 한다 */
    .wl-item { flex-wrap: wrap; column-gap: 8px; row-gap: 2px; }
    .wl-drag { width: 20px; }
    .wl-main { flex: 1 1 170px; }
    .wl-actions { margin-left: auto; min-width: 0; }
}

/* 오늘 보고 모달 */
.report-modal-content { max-width: 560px; }
.report-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.report-modal-head h3 { margin: 0; font-size: 22px; font-weight: 700; color: var(--text-strong); }
.report-date { width: auto; height: 44px; font-size: 14px; }
.report-status { margin: 10px 0 12px; font-size: 14px; color: var(--text-weak); line-height: 1.6; word-break: keep-all; min-height: 1.6em; }
.report-textarea {
    width: 100%; box-sizing: border-box; min-height: 340px; resize: vertical;
    padding: 16px; border: 1px solid var(--border-hairline); border-radius: var(--radius-m);
    background: var(--bg-sunken); color: var(--text-strong);
    font-family: var(--font-sans); font-size: 15px; line-height: 1.7;
}
.report-textarea:focus { outline: none; border-color: var(--brand-blue); background: var(--bg-surface); }
.report-actions { display: flex; gap: 8px; margin-top: 16px; }
.report-actions button {
    border: 0; padding: 14px; border-radius: var(--radius-m); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
/* 오늘 보고 이어쓰기: 저장 상태 + 대시보드에서 넣을 만한 항목 (worklog.js mountReport) */
.report-status.rp-st-ok { color: var(--success-text); }
.report-status.rp-st-bad { color: var(--danger-text); }
.rp-conflict { display: inline-flex; gap: 6px; margin-left: 4px; flex-wrap: wrap; }
.rp-conflict-btn {
    border: 1px solid var(--border-hairline); background: var(--bg-surface); color: var(--text-strong);
    border-radius: var(--radius-s, 8px); padding: 4px 10px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.rp-suggest { margin-top: 12px; }
.rp-suggest-title { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--text-strong); word-break: keep-all; }
.rp-suggest-title span { font-weight: 500; color: var(--text-weak); margin-left: 6px; font-size: 13px; }
.rp-suggest-list { display: flex; flex-direction: column; gap: 6px; max-height: 168px; overflow-y: auto; }
.rp-sg {
    display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
    border: 1px dashed var(--border-hairline); background: var(--bg-surface); color: var(--text-strong);
    border-radius: var(--radius-m); padding: 8px 12px; font: inherit; font-size: 14px; cursor: pointer;
    transition: var(--motion-fast);
}
.rp-sg:hover, .rp-sg:focus-visible { border-style: solid; border-color: var(--brand-blue); background: var(--r-sky-wash); }
.rp-sg-kind { flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.rp-sg-done { background: var(--success-bg); color: var(--success-text); }
.rp-sg-todo { background: var(--r-sky-wash); color: var(--brand-text); }
.rp-sg-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-btn-cancel { flex: 0.4; background: var(--bg-canvas); color: var(--text-normal); }
.report-btn-copy { flex: 1; background: var(--brand-blue); color: var(--text-on-brand); }
.report-btn-copy svg.lucide { width: 18px; height: 18px; }

@media (max-width: 480px) {
    .report-textarea { min-height: 260px; }
}

/* =====================================================
   설정 > 데스크톱 앱 연결 (applink.js)
   ===================================================== */
.applink { margin-top: 20px; padding: 20px; border: 1px solid var(--border-hairline); border-radius: var(--radius-l); }
.applink-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--text-strong); }
.applink-title svg.lucide { width: 18px; height: 18px; }
.applink-help { margin: 0 0 12px; font-size: 14px; color: var(--text-weak); line-height: 1.6; word-break: keep-all; }
.applink-issue-row { display: flex; gap: 8px; }
.applink-issue-row .form-input { flex: 1; min-width: 0; }
.applink-issue-btn, .applink-copy-btn {
    flex-shrink: 0; border: 0; padding: 0 16px; height: 44px; border-radius: var(--radius-m);
    background: var(--brand-blue); color: var(--text-on-brand); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}
.applink-issue-btn:disabled { opacity: 0.5; cursor: wait; }
.applink-copy-btn { background: var(--brand-blue); color: var(--text-on-brand); }
.applink-copy-btn svg.lucide { width: 16px; height: 16px; }
.applink-new { margin-top: 12px; padding: 14px; border-radius: var(--radius-m); background: var(--warn-bg); }
.applink-new-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--warn-text); }
.applink-new-row { display: flex; gap: 8px; }
.applink-token { flex: 1; min-width: 0; font-family: Consolas, 'D2Coding', monospace; font-size: 13px; background: var(--bg-surface); }
.applink-list { list-style: none; margin: 12px 0 0; padding: 0; }
.applink-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border-hairline); }
.applink-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.applink-item-label { font-size: 15px; font-weight: 700; color: var(--text-strong); }
.applink-item-meta { font-size: 13px; color: var(--text-weak); }
.applink-revoke-btn {
    flex-shrink: 0; border: 1px solid var(--border-hairline); background: var(--bg-surface); color: var(--danger-text);
    padding: 6px 12px; border-radius: var(--radius-s); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.applink-revoke-btn:hover { background: var(--danger-bg); border-color: var(--danger-bg); }
.applink-empty { padding: 10px 0 0; font-size: 14px; color: var(--text-disable); }
@media (max-width: 480px) {
    .applink-issue-row, .applink-new-row { flex-direction: column; }
}

/* =====================================================
   설정 > 직원 계정 (accounts.js, 최고관리자 전용)
   ===================================================== */
.accounts { margin-top: 20px; padding: 20px; border: 1px solid var(--border-hairline); border-radius: var(--radius-l); }
.acc-list { list-style: none; margin: 8px 0 0; padding: 0; }
.acc-item { padding: 10px 0; border-top: 1px solid var(--border-hairline); }
.acc-item:first-child { border-top: 0; }
.acc-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.acc-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.acc-main { min-width: 0; display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.acc-main .acc-name { min-width: 64px; }
.acc-name { font-size: 15px; font-weight: 700; color: var(--text-strong); }
.acc-status { font-size: 13px; color: var(--text-weak); line-height: 1.5; word-break: keep-all; }
.acc-status--none { color: var(--warn-text); font-weight: 700; }
.acc-tag { font-size: 11px; font-weight: 700; color: var(--safe-text); background: var(--safe-bg); padding: 1px 6px; border-radius: var(--radius-sm); }
.acc-tag--bad { color: var(--danger-text); background: var(--danger-bg); }
.acc-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.acc-btn {
    border: 0; min-height: 36px; padding: 0 12px; border-radius: var(--radius-s); cursor: pointer;
    background: var(--brand-blue); color: var(--text-on-brand); font: inherit; font-size: 13px; font-weight: 700;
}
.acc-btn:disabled { opacity: 0.5; cursor: wait; }
.acc-btn--ghost { background: var(--bg-surface); color: var(--text-normal); border: 1px solid var(--border-hairline); }
.acc-btn:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.acc-form { margin-top: 10px; padding: 14px; border-radius: var(--radius-m); background: var(--bg-sunken); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.acc-form[data-form="link"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.acc-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--text-normal); }
.acc-field .form-input { background: var(--bg-surface); }
.acc-hint { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--text-weak); line-height: 1.6; word-break: keep-all; }
.acc-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 6px; }
.acc-result { margin: 10px 0; padding: 14px; border-radius: var(--radius-m); background: var(--warn-bg); display: flex; flex-direction: column; gap: 8px; }
.acc-result-text {
    width: 100%; box-sizing: border-box; resize: none; padding: 10px 12px; border-radius: var(--radius-s);
    border: 1px solid var(--border-hairline); background: var(--bg-surface); color: var(--text-strong);
    font: inherit; font-size: 14px; line-height: 1.6;
}
.acc-result .applink-copy-btn { align-self: flex-end; }
.acc-empty { padding: 8px 0; font-size: 14px; color: var(--text-disable); }
/* =====================================================
   설정 > 업무 공유 알림 (share-cfg.js, 최고관리자 전용, 앱 0.1.38)
   ===================================================== */
.share-cfg .applink-help { margin-bottom: 4px; }
.sc-field { padding: 14px 0; border-top: 1px solid var(--border-hairline); }
.sc-field:first-of-type { border-top: 0; }
.sc-label { font-size: 15px; font-weight: 700; color: var(--text-strong); margin-bottom: 8px; }
.sc-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sc-switch-row .sc-label { margin-bottom: 0; }
.sc-note { margin-top: 8px; font-size: 13px; color: var(--text-weak); line-height: 1.6; word-break: keep-all; }
.sc-switch-row .sc-note { margin-top: 0; }
.sc-switch {
    position: relative; width: 50px; height: 30px; flex-shrink: 0; padding: 0; border: 0; border-radius: 15px;
    background: var(--brand-blue); cursor: pointer;
}
.sc-switch::after { content: ''; position: absolute; top: 3px; left: 23px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.sc-switch[aria-checked="false"] { background: var(--text-disable); }
.sc-switch[aria-checked="false"]::after { left: 3px; }
.sc-switch:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.share-cfg.is-off .sc-field:not(.sc-switch-row) { opacity: 0.55; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sc-chip {
    min-height: 38px; padding: 0 16px; border-radius: var(--radius-s); border: 1.5px solid var(--border-hairline);
    background: var(--bg-surface); color: var(--text-normal); font: inherit; font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.sc-chip.on { background: var(--text-strong); border-color: var(--text-strong); color: var(--bg-surface); }
.sc-chip:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.sc-num { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--text-normal); white-space: nowrap; }
.sc-num input {
    width: 72px; height: 38px; box-sizing: border-box; border: 1.5px solid var(--border-hairline); border-radius: var(--radius-s);
    background: var(--bg-surface); color: var(--text-strong); font: inherit; font-size: 15px; text-align: center;
}
/* 알림 시간대·점심시간·오늘 뜨는 시각 (앱 0.1.44) */
.sc-num input[type="time"] { width: 132px; padding: 0 8px; }
.sc-times { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-t { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 3px 9px; border-radius: var(--radius-s); background: var(--brand-weak, #e8f3ff); color: var(--brand-text, #1b64da); }
.sc-t.is-skip { background: var(--bg-sunken); color: var(--text-disable); text-decoration: line-through; }
.sc-people { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.sc-people label { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; color: var(--text-normal); white-space: nowrap; cursor: pointer; }
.sc-people input { width: 18px; height: 18px; accent-color: var(--brand-blue); }
.sc-save-row { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border-hairline); }
.sc-saved { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; color: var(--success-text); }
.sc-saved.is-dirty { color: var(--warn-text); }
.sc-saved svg.lucide { width: 16px; height: 16px; }
.sc-save { min-height: 42px; padding: 0 20px; font-size: 15px; white-space: nowrap; }
.sc-add { display: flex; gap: 8px; margin-top: 12px; }
.sc-add .form-input { flex: 1; min-width: 0; max-width: 280px; }
.sc-add .acc-btn { min-height: 40px; white-space: nowrap; }

/* 설정 창 폭: 최고관리자는 직원 계정 칸 때문에 넓게 */
.modal-content.member-modal { max-width: 520px; }
.modal-content.member-modal--wide { max-width: 820px; }
@media (max-width: 760px) {
    .acc-form, .acc-form[data-form="link"] { grid-template-columns: 1fr 1fr; }
    .acc-row { grid-template-columns: 10px minmax(0, 1fr); }
    .acc-actions { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 480px) { .acc-form, .acc-form[data-form="link"] { grid-template-columns: 1fr; } }

/* =====================================================
   설정 > 팀 보드와 칸 (boards.js)
   ===================================================== */
.nav-item[data-page="board"] .nav-ico { color: var(--board-c, currentColor); }
.boardcfg { margin-top: 20px; padding: 20px; border: 1px solid var(--border-hairline); border-radius: var(--radius-l); }
.boardcfg-count { margin-left: 4px; font-size: 13px; font-weight: 600; color: var(--text-weak); }
.boardcfg-hint { margin: 6px 0 8px; font-size: 13px; color: var(--text-weak); line-height: 1.6; word-break: keep-all; }
/* 보드 고르기: 칩 한 줄 (고른 보드는 진하게) */
.boardcfg-chips { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.boardcfg-chip {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 6px;
    border: 1px solid var(--border-hairline); border-radius: var(--radius-pill);
    background: var(--bg-surface); color: var(--text-normal); font-size: 14px; font-weight: 600; cursor: pointer;
}
.boardcfg-chip:hover { border-color: var(--text-weak); }
.boardcfg-chip.is-on { border: 2px solid var(--brand-blue); color: var(--text-strong); font-weight: 700; padding: 0 11px 0 5px; }
.boardcfg-chip-ico { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.boardcfg-chip-ico svg.lucide { width: 14px; height: 14px; }
.boardcfg-chip-n { font-size: 12px; font-weight: 700; color: var(--text-weak); font-variant-numeric: tabular-nums; }
.boardcfg-chip-add { padding: 0 12px; border-style: dashed; color: var(--text-weak); }
.boardcfg-chip-add svg { width: 14px; height: 14px; }
.boardcfg-chips .inline-edit-input { height: 36px; width: 160px; font-size: 14px; }
/* 고른 보드 이름 줄 */
.boardcfg-current { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 16px 0 6px; }
.boardcfg-board-btn { flex-shrink: 0; white-space: nowrap; }
.boardcfg-current:empty { display: none; }
.boardcfg-current-name { font-size: 15px; font-weight: 700; color: var(--text-strong); }
.boardcfg-board-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
    border: 1px solid var(--border-hairline); border-radius: var(--radius-s);
    background: var(--bg-surface); color: var(--text-normal); font-size: 13px; font-weight: 600; cursor: pointer;
}
.boardcfg-board-btn svg { width: 15px; height: 15px; }
.boardcfg-board-btn:hover { border-color: var(--brand-blue); color: var(--brand-text); }
/* 칸 목록: 한 줄 44px */
.boardcfg-clist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border-hairline); border-radius: var(--radius-m); }
.boardcfg-crow { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 6px 4px 8px; background: var(--bg-surface); }
.boardcfg-crow + .boardcfg-crow, .boardcfg-crow-add { border-top: 1px solid var(--border-hairline); }
.boardcfg-crow:first-child { border-radius: var(--radius-m) var(--radius-m) 0 0; }
.boardcfg-crow .col-drag { margin-left: 0; }
.boardcfg-num { flex-shrink: 0; width: 22px; text-align: center; font-size: 13px; font-weight: 700; color: var(--text-weak); }
.boardcfg-crow .col-title { flex: 0 1 auto; margin: 0; font-size: 15px; font-weight: 700; color: var(--text-strong); }
.boardcfg-crow .col-title.is-static { padding: 2px 0; }
.boardcfg-crow .inline-edit-input { flex: 1; font-size: 15px; height: 34px; }
.boardcfg-crow-n { margin-left: auto; font-size: 13px; color: var(--text-weak); white-space: nowrap; }
.boardcfg-kind { flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: var(--radius-sm); background: var(--bg-sunken); color: var(--text-normal); }
.boardcfg-kind--progress { background: var(--r-sky-wash); color: var(--brand-text); }
.boardcfg-kind--waiting { background: var(--warn-bg); color: var(--warn-text); }
.boardcfg-kind--hold { color: var(--text-weak); }
.boardcfg-crow .col-menu-btn { margin-left: 0; }
.boardcfg-crow-add { padding: 6px; }
.boardcfg-crow-add .column-add-btn { height: 36px; border-width: 1px; font-size: 14px; }
.boardcfg-crow-add .inline-edit-input { height: 36px; font-size: 14px; }
.confirm-choice { display: flex; flex-direction: column; gap: 6px; margin: -8px 0 20px; text-align: left; }
.confirm-choice[hidden] { display: none; }

/* =====================================================
   TDS(토스 디자인 시스템) 기준 — 버튼 누름과 글자 굵기
   - 마우스 올림은 색만, 누름은 크기(96%)로 알린다
   - #3182f6 위 흰 글씨는 대비가 3.71 이라 채움 버튼 글씨는 700
   ===================================================== */
button { transition: transform 0.1s ease, background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast); }
button:not(:disabled):active { transform: scale(0.96); }
.today-add-btn, .wl-submit, .btn-new-client-task, .btn-import-confirm, .btn-comment-submit,
.report-btn-copy, .applink-copy-btn, .board-change-banner button, .fab-main,
.date-chip.active, .theme-chip.active, .confirm-modal .btn-confirm-ok { font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
    button:not(:disabled):active { transform: none; }
}

/* =====================================================
   보드에서 바로 편집 (boards.js initInline)
   칸 이름 누르기 → 이름 바꾸기 / ⋯ → 종류·순서·삭제 / 손잡이 끌기 → 순서 / 끝의 '칸 추가'
   ===================================================== */
.col-head-main { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.col-drag {
    display: inline-flex; color: var(--text-weak); cursor: grab; margin-left: -6px;
    opacity: .45; transition: opacity var(--motion-fast);
}
.column-header:hover .col-drag { opacity: 1; }
@media (hover: none) { .col-drag { opacity: 1; } }
.col-drag svg { width: 16px; height: 16px; }
.col-title {
    border: none; background: transparent; padding: 2px 6px; margin: 0 -6px 0 -2px;
    font: inherit; color: inherit; cursor: text; border-radius: var(--radius-s);
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.col-title:hover, .col-title:focus-visible { background: var(--ink-tint-06); }
.col-menu-btn {
    margin-left: 6px; width: 30px; height: 30px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; border-radius: var(--radius-s); background: transparent;
    color: var(--text-weak); cursor: pointer;
}
.col-menu-btn:hover, .col-menu-btn:focus-visible { background: var(--ink-tint-06); color: var(--text-strong); }
.column-ghost { opacity: .4; }
.inline-edit-input {
    font: inherit; font-size: 16px; font-weight: 700; color: var(--text-strong);
    border: 2px solid var(--brand-blue); border-radius: var(--radius-s);
    padding: 4px 8px; background: var(--bg-surface); min-width: 0; width: 100%;
}
.inline-edit-input:focus { outline: none; }
/* 칸 추가: 칸들 오른쪽 끝에 가로 버튼. 칸이 많으면 보드 전체가 좌우로 스크롤된다 */
.column-add { flex: 0 0 200px; scroll-snap-align: end; }
.column-add-btn {
    width: 100%; height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px;
    border: 2px dashed var(--text-weak); border-radius: var(--radius-m);
    background: transparent; color: var(--text-normal); font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.column-add-btn svg { width: 16px; height: 16px; }
.column-add-btn:hover, .column-add-btn:focus-visible { border-color: var(--brand-blue); color: var(--brand-text); background: var(--bg-surface); }
.column-add .inline-edit-input { height: 44px; }
@media (max-width: 768px) {
    .column-add { flex-basis: 180px; }
}

/* 사이드바 '보드 추가' */
.nav-board-add {
    display: flex; align-items: center; gap: var(--space-3); width: 100%;
    padding: 10px 18px; margin-bottom: var(--space-1);
    border: none; background: transparent; border-radius: var(--radius-m);
    font-size: 14px; font-weight: 600; color: var(--text-weak); cursor: pointer; text-align: left;
}
.nav-board-add:hover, .nav-board-add:focus-visible { background: var(--ink-tint-03); color: var(--brand-text); }
.nav-board-input { margin: 0 0 var(--space-1); font-size: 15px; }
@media (max-width: 768px) { .nav-board-add, .nav-board-input { display: none; } }

/* 떠 있는 메뉴 (칸 메뉴·보드 설정) */
.tf-pop {
    position: fixed; z-index: 3000; width: 300px; max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px); overflow-y: auto;
    background: var(--bg-surface); color: var(--text-normal);
    border: 1px solid var(--border-hairline); border-radius: var(--radius-l);
    box-shadow: var(--shadow-float); padding: 12px;
    display: flex; flex-direction: column; gap: 6px; font-size: 14px;
    word-break: keep-all;
}
.tf-pop-title { font-size: 15px; font-weight: 700; color: var(--text-strong); padding: 2px 4px 6px; }
.tf-pop-label { font-size: 12px; font-weight: 700; color: var(--text-weak); padding: 6px 4px 0; display: block; }
.tf-pop-label small { display: block; font-weight: 500; margin-top: 2px; line-height: 1.5; }
.tf-pop-item {
    display: flex; align-items: center; gap: 8px; width: 100%;
    min-height: 40px; padding: 8px 10px; border: none; border-radius: var(--radius-s);
    background: transparent; color: var(--text-normal); font: inherit; font-weight: 600;
    cursor: pointer; text-align: left;
}
.tf-pop-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.tf-pop-item:hover:not(:disabled), .tf-pop-item:focus-visible { background: var(--bg-sunken); }
.tf-pop-item:disabled { opacity: .4; cursor: default; }
.tf-pop-row { display: flex; gap: 4px; }
.tf-pop-row .tf-pop-item { justify-content: center; }
.tf-pop-danger { color: var(--danger-text); }
.tf-pop-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tf-pop-kind {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    padding: 8px 10px; border-radius: var(--radius-s); cursor: pointer; text-align: left;
    border: 2px solid var(--border-hairline); background: var(--bg-surface); color: var(--text-normal); font: inherit;
}
.tf-pop-kind b { font-size: 14px; color: var(--text-strong); }
.tf-pop-kind span { font-size: 12px; color: var(--text-weak); line-height: 1.4; }
.tf-pop-kind.is-on { border-color: var(--brand-blue); background: var(--brand-blue-tint-10); }
.tf-pop-kind:hover:not(.is-on) { border-color: var(--text-weak); }
.tf-pop-input {
    width: 100%; height: 40px; padding: 0 10px; font: inherit; color: var(--text-strong);
    border: 1px solid var(--border-hairline); border-radius: var(--radius-s); background: var(--bg-surface);
}
.tf-pop-input:focus { outline: 2px solid var(--brand-blue); outline-offset: -1px; }
.tf-pop-swatches, .tf-pop-icons { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 2px 4px; }
.tf-pop-swatch {
    width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
    box-shadow: inset 0 0 0 2px var(--bg-surface);
}
.tf-pop-swatch.is-on { border-color: var(--text-strong); }
.tf-pop-icon {
    width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid var(--border-hairline); border-radius: var(--radius-s);
    background: var(--bg-surface); color: var(--text-normal); cursor: pointer;
}
.tf-pop-icon svg { width: 18px; height: 18px; }
.tf-pop-icon.is-on { border-color: var(--brand-blue); color: var(--brand-text); }
.tf-pop-sep { border: none; border-top: 1px solid var(--border-hairline); margin: 6px 0; }
.tf-pop-add { display: flex; gap: 6px; }
.tf-pop-btn {
    flex-shrink: 0; height: 40px; padding: 0 12px; border: none; border-radius: var(--radius-s);
    background: var(--brand-blue); color: var(--text-on-brand, #fff); font: inherit; font-weight: 700; cursor: pointer;
}
.tf-pop-btn:disabled { opacity: .4; cursor: default; }
.tf-pop-note { margin: 2px 4px 0; font-size: 12px; color: var(--text-weak); line-height: 1.6; }

/* =====================================================
   보고와 대시보드 구분 (2026-10-19) — 보고 제안 숨기기, 대시보드와 맞추기
   ===================================================== */
.rp-sg-row { display: flex; align-items: stretch; gap: 4px; }
.rp-sg-row .rp-sg { flex: 1; min-width: 0; }
.rp-sg-hide {
    flex-shrink: 0; width: 36px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-hairline); border-radius: var(--radius-s); background: var(--bg-surface);
    color: var(--text-weak); cursor: pointer;
}
.rp-sg-hide:hover, .rp-sg-hide:focus-visible { color: var(--danger-text); border-color: var(--danger-text); }
.rp-hidden { margin-top: 8px; font-size: 13px; }
.rp-hidden summary { cursor: pointer; font-weight: 700; color: var(--text-normal); }
.rp-hidden summary span { font-weight: 500; color: var(--text-weak); margin-left: 6px; }
.rp-hidden ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rp-hidden li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.rp-hidden li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-weak); }
.rp-unhide { flex-shrink: 0; border: 1px solid var(--border-hairline); background: var(--bg-surface); border-radius: var(--radius-s); padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text-normal); }
.rp-unhide:hover { border-color: var(--brand-blue); color: var(--brand-text); }
.rp-sync { margin-top: 12px; }
.rp-sync-box { border: 1px solid var(--border-hairline); border-radius: var(--radius-m); padding: 10px 12px; background: var(--bg-surface); }
.rp-sync-box > summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--text-strong); word-break: keep-all; }
.rp-sync-box > summary b { display: inline-block; min-width: 22px; margin-left: 4px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--brand-blue); color: #fff; font-size: 12px; text-align: center; }
.rp-sync-box > summary span { font-weight: 500; font-size: 13px; color: var(--text-weak); margin-left: 6px; }
.rp-sync-sec { margin-top: 12px; }
.rp-sync-sec h4 { margin: 0; font-size: 14px; font-weight: 700; color: var(--text-strong); }
.rp-sync-sec h4 b { color: var(--brand-text); margin-left: 2px; }
.rp-sync-help { margin: 2px 0 6px; font-size: 12px; color: var(--text-weak); line-height: 1.6; word-break: keep-all; }
.rp-sync-sec ul { list-style: none; margin: 0; padding: 0; max-height: 168px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.rp-sync-sec label { display: flex; align-items: flex-start; gap: 8px; padding: 6px 4px; border-radius: var(--radius-s); cursor: pointer; font-size: 14px; line-height: 1.5; }
.rp-sync-sec label:hover { background: var(--bg-sunken); }
.rp-sync-sec input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--brand-blue); }
.rp-sync-sec em { font-style: normal; color: var(--text-weak); }
.rp-sync-sec small { font-size: 12px; color: var(--text-weak); margin-left: 4px; }
.rp-sync-act { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
.rp-sync-act select { height: 36px; border: 1px solid var(--border-hairline); border-radius: var(--radius-s); padding: 0 8px; background: var(--bg-surface); color: var(--text-strong); font: inherit; }
.rp-sync-btn { height: 36px; padding: 0 14px; border: none; border-radius: var(--radius-s); background: var(--brand-blue); color: var(--text-on-brand, #fff); font-size: 14px; font-weight: 700; cursor: pointer; }
.rp-sync-btn:disabled { opacity: .4; cursor: default; }
.rp-setup-link { margin-left: 4px; font-weight: 700; color: var(--brand-text); text-decoration: underline; white-space: nowrap; }

/* =====================================================
   왼쪽 아래: 데스크톱 앱 버튼 + 내 정보 (2026-10-19)
   ===================================================== */
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.side-foot .btn-refresh { margin-top: 0; }
.side-app {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px;
    border: 1px solid var(--border-hairline); border-radius: var(--radius-m);
    background: var(--bg-surface); color: var(--text-normal); cursor: pointer; text-align: left; font: inherit;
}
.side-app:hover { border-color: var(--brand-blue); }
.side-app.active { border: 2px solid var(--brand-blue); padding: 9px 11px; }
.side-app-ico { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--radius-s); display: inline-flex; align-items: center; justify-content: center; background: var(--brand-blue); color: #fff; }
.side-app-ico svg { width: 18px; height: 18px; }
.side-app-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.side-app-text b { font-size: 14px; color: var(--text-strong); }
.side-app-text small { font-size: 12px; color: var(--text-weak); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-app.is-linked .side-app-text small { color: var(--safe-text, var(--brand-text)); }
.side-me { display: flex; align-items: center; gap: 10px; padding: 8px 4px 8px 8px; }
.side-me-avatar {
    width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--mc, #8b95a1); color: #fff; font-size: 14px; font-weight: 700;
}
.side-me-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.side-me-text b { font-size: 14px; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-me-text small { font-size: 12px; color: var(--text-weak); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-me-text small:empty { display: none; }
.side-me-out { width: 32px; height: 32px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-s); color: var(--text-weak); }
.side-me-out:hover, .side-me-out:focus-visible { background: var(--ink-tint-06); color: var(--text-strong); }
.side-me-out svg { width: 18px; height: 18px; }
@media (max-width: 768px) { .side-foot { display: none; } }

/* =====================================================
   데스크톱 앱 화면 (설치 안내·연결)
   ===================================================== */
.app-page { max-width: 1080px; margin: 0 auto; padding: 8px 0 48px; display: flex; flex-direction: column; gap: 20px; word-break: keep-all; }
.app-hero { background: var(--bg-surface); border: 2px solid var(--text-strong); border-radius: var(--radius-l); padding: clamp(20px, 3vw, 32px); }
.app-hero h2 { margin: 0 0 8px; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.4; color: var(--text-strong); text-wrap: balance; }
.app-hero p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text-normal); max-width: 62ch; text-wrap: pretty; }
.app-dl { margin-top: 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.app-dl-btn {
    display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 24px;
    border-radius: var(--radius-m); background: var(--brand-blue); color: var(--text-on-brand, #fff);
    font-size: 17px; font-weight: 700; text-decoration: none;
}
.app-dl-btn:hover { filter: brightness(0.95); }
.app-dl-btn svg { width: 20px; height: 20px; }
.app-dl-meta { font-size: 13px; color: var(--text-weak); font-weight: 600; }
.app-dl-none { font-size: 15px; font-weight: 700; color: var(--text-strong); }
.app-dl-admin { margin-top: 6px !important; font-size: 13px !important; color: var(--text-weak) !important; }
.app-dl-admin code { font-size: 12px; background: var(--bg-sunken); padding: 1px 6px; border-radius: 4px; }
.app-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.app-step { position: relative; background: var(--bg-surface); border: 1px solid var(--border-hairline); border-radius: var(--radius-l); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.app-step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--text-strong); color: var(--bg-surface); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
.app-step h3 { margin: 4px 0 0; font-size: 17px; color: var(--text-strong); }
.app-step p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-normal); }
.app-step .app-step-note { font-size: 13px; color: var(--text-weak); }
.app-step .applink-issue-row { margin-top: 4px; }
.app-step .applink-issue-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.app-step .applink-issue-btn svg { width: 16px; height: 16px; }
.app-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; }
.app-box { background: var(--bg-surface); border: 1px solid var(--border-hairline); border-radius: var(--radius-l); padding: 20px; }
.app-box h3 { margin: 0 0 8px; font-size: 17px; color: var(--text-strong); }
.app-box-help { margin: 0 0 8px; font-size: 13px; color: var(--text-weak); line-height: 1.6; }
.app-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.app-feats li { display: grid; grid-template-columns: 108px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border-hairline); font-size: 14px; line-height: 1.6; }
.app-feats li:first-child { border-top: 0; }
.app-feats b { color: var(--text-strong); }
.app-feats span { color: var(--text-normal); }
.app-feats kbd { font: inherit; font-size: 12px; font-weight: 700; padding: 1px 6px; border: 1px solid var(--border-hairline); border-bottom-width: 2px; border-radius: 4px; background: var(--bg-sunken); }
@media (max-width: 1024px) {
    .app-steps { grid-template-columns: 1fr; }
    .app-cols { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .app-feats li { grid-template-columns: 1fr; gap: 2px; } }
.app-step .applink-issue-row { flex-direction: column; }
.app-step .applink-issue-btn { justify-content: center; height: 44px; }
.app-step .applink-issue-row .form-input { flex: none; height: 44px; }

/* ===== 통합 보고 (teamreport.js, 2026-10-20) ===== */
/* 왼쪽: 이어 쓰는 글 / 오른쪽: 대시보드에서 찾은 제안. 좁은 화면에서는 위아래로 */
/* 보드 고르기 (보드마다 따로 쓴다) */
.tr-boards { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tr-board { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border: 2px solid var(--text-strong); border-radius: 999px; background: var(--bg-surface); color: var(--text-strong); font: inherit; font-size: 14.5px; font-weight: 800; cursor: pointer; }
.tr-board[aria-selected="true"] { background: var(--text-strong); color: #fff; }
.tr-board-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-disable); flex-shrink: 0; }
.tr-board:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 2px; }
.tr-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 12px; }
.tr-date { height: 40px; padding: 0 12px; border: var(--border-strong); border-radius: 10px; background: var(--bg-surface); color: var(--text-strong); font: inherit; font-size: 15px; font-weight: 700; }
.tr-origin { font-size: 14px; color: var(--text-weak); word-break: keep-all; line-height: 1.6; }
.tr-status { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--text-weak); }
.tr-status.is-ok { color: var(--success-text); }
.tr-status.is-bad { color: var(--danger-text); }
.tr-copy {
  display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 18px; border: 0; border-radius: 10px;
  background: var(--bg-inverse); color: #fff; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
}
.tr-copy svg { width: 18px; height: 18px; }
.tr-conflict { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; padding: 12px 14px; border-radius: 12px; background: var(--danger-bg); color: var(--danger-text); font-size: 14px; font-weight: 700; word-break: keep-all; line-height: 1.6; }
.tr-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.tr-text {
  width: 100%; min-height: 64vh; box-sizing: border-box; padding: 16px; resize: vertical;
  border: 2px solid var(--text-strong); border-radius: 14px; background: var(--bg-surface); color: var(--text-strong);
  font-family: var(--font-sans); font-size: 14.5px; line-height: 1.65; tab-size: 4;
}
.tr-text:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--safe-bg); }
.tr-help { margin: 8px 2px 0; font-size: 13px; color: var(--text-weak); line-height: 1.6; word-break: keep-all; }
.tr-side { display: grid; gap: 12px; position: sticky; top: 12px; }
.tr-box { padding: 14px; border-radius: 14px; background: var(--bg-surface); border: var(--border-light); }
.tr-box h3 { margin: 0 0 10px; font-size: 15px; font-weight: 800; color: var(--text-strong); }
.tr-box h3 b { margin-left: 4px; color: var(--brand-text); }
.tr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 32vh; overflow-y: auto; }
.tr-sug { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; border-radius: 10px; background: var(--bg-sunken); }
.tr-sug-text { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-normal); word-break: keep-all; }
.tr-sug-text b { color: var(--text-strong); }
.tr-sug-text small { display: block; font-size: 12px; color: var(--text-disable); }
.tr-src { flex-shrink: 0; padding: 2px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 800; background: var(--safe-bg); color: var(--safe-text); }
.tr-src-worklog { background: var(--success-bg); color: var(--success-text); }
.tr-src-report { background: var(--warn-bg); color: var(--warn-text); }
.tr-btn { flex-shrink: 0; height: 30px; padding: 0 11px; border: 1.5px solid var(--text-strong); border-radius: 8px; background: var(--bg-surface); color: var(--text-strong); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.tr-btn:hover { background: var(--text-strong); color: #fff; }
.tr-x { flex-shrink: 0; width: 28px; height: 28px; padding: 5px; border: 0; border-radius: 8px; background: transparent; color: var(--text-disable); cursor: pointer; }
.tr-x:hover { background: var(--bg-canvas); color: var(--text-strong); }
.tr-x svg { width: 100%; height: 100%; }
.tr-empty { padding: 6px 2px; font-size: 13px; color: var(--text-disable); }
.tr-note { margin: 0; font-size: 12.5px; color: var(--text-weak); line-height: 1.65; word-break: keep-all; }
.tr-unhide { justify-self: start; padding: 0; border: 0; background: none; color: var(--brand-text); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 960px) {
  .tr-cols { grid-template-columns: minmax(0, 1fr); }
  .tr-side { position: static; }
  .tr-text { min-height: 50vh; }
  .tr-status { margin-left: 0; }
}

/* =====================================================
   보고 (2026-10-21, teamreport.js mountAuto) — 작업 기록으로 만든 오늘 보고(퇴근)·통합 보고(아침)
   ===================================================== */
.ar-page { max-width: 820px; }
.ar { display: flex; flex-direction: column; gap: 12px; }
.ar-top { display: flex; flex-direction: column; gap: 12px; }
.ar-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.ar-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--radius-m); background: var(--bg-sunken); max-width: 420px; }
.ar-tab { height: 42px; border: 0; border-radius: var(--radius-s); background: transparent; color: var(--text-normal); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.ar-tab small { font-size: 12px; font-weight: 500; color: inherit; opacity: .75; margin-left: 2px; }
.ar-tab[aria-selected="true"] { background: var(--text-strong); color: var(--bg-surface); }
.ar-tab:focus-visible, .ar-board:focus-visible, .ar-btn:focus-visible, .ar-mine:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.ar-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ar-boards { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.ar-boards[hidden] { display: none; }
.ar-board { height: 34px; padding: 0 14px; border: 2px solid var(--text-strong); border-radius: var(--radius-pill); background: var(--bg-surface); color: var(--text-strong); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.ar-board[aria-checked="true"] { background: var(--text-strong); color: var(--bg-surface); }
.ar-date { height: 36px; margin-left: auto; padding: 0 10px; border: 1px solid var(--border-hairline); border-radius: var(--radius-s); background: var(--bg-surface); color: var(--text-strong); font: inherit; font-size: 14px; }
.ar-status { margin: 0; min-height: 1.6em; font-size: 13px; color: var(--text-weak); word-break: keep-all; }
.ar-status.is-ok { color: var(--success-text); }
.ar-status.is-bad { color: var(--danger-text); }
.ar-view { padding: 16px 20px; border: 1px solid var(--border-hairline); border-radius: var(--radius-m); background: var(--bg-surface); font-size: 15px; line-height: 1.7; color: var(--text-strong); overflow-wrap: anywhere; word-break: keep-all; }
.ar-ln { display: block; width: 100%; min-height: 1.7em; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; white-space: pre-wrap; }
.ar-h { font-weight: 700; }
.ar-p { font-weight: 700; }
.ar-sep { color: var(--text-disable); overflow: hidden; white-space: nowrap; }
.ar-mine { color: var(--brand-text); cursor: text; border-radius: var(--radius-s); margin: 0 -6px; padding: 0 6px; width: calc(100% + 12px); }
.ar-mine:hover { background: var(--bg-sunken); }
.ar-edit { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--brand-blue); border-radius: var(--radius-s); background: var(--bg-surface); color: var(--text-strong); font: inherit; font-size: 15px; }
.ar-direct { min-height: 420px; resize: vertical; padding: 16px; border: 1px solid var(--border-hairline); border-radius: var(--radius-m); background: var(--bg-surface); color: var(--text-strong); font: inherit; font-size: 15px; line-height: 1.7; }
.ar-req { display: flex; flex-direction: column; gap: 6px; }
.ar-req[hidden] { display: none; }
.ar-req-label { font-size: 14px; font-weight: 700; color: var(--text-strong); }
.ar-req-label small { margin-left: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-weak); }
.ar-req-text { min-height: 120px; resize: vertical; padding: 12px 14px; border: 1px dashed var(--text-weak); border-radius: var(--radius-m); background: var(--bg-surface); color: var(--text-strong); font: inherit; font-size: 14px; line-height: 1.7; }
.ar-note { margin: 0; font-size: 13px; color: var(--text-weak); line-height: 1.6; word-break: keep-all; }
/* 버튼 글자는 한 줄로, 맨 아래 버튼과 화면 끝 사이는 띄운다 (2026-10-21: 글자가 두 줄로 꺾이고 바닥에 붙었음) */
.ar-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-bottom: 32px; }
.ar-btn { height: 46px; padding: 0 22px; border-radius: var(--radius-m); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.ar-regen { border: 1px solid var(--border-hairline); background: var(--bg-surface); color: var(--text-normal); }
.ar-regen[hidden] { display: none; }
.ar-direct-btn { border: 1px solid var(--border-hairline); background: var(--bg-surface); color: var(--text-normal); }
.ar-direct-btn[hidden] { display: none; }
/* 글 직접 고치기 저장 (2026-10-21). 고친 것이 없으면 '저장됨'으로 흐리게 */
.ar-save { min-width: 96px; border: 0; background: var(--text-strong); color: var(--bg-surface); }
.ar-save[hidden] { display: none; }
.ar-save:disabled { opacity: .45; cursor: default; }
.ar-copy { min-width: 180px; border: 0; background: var(--brand-blue); color: var(--text-on-brand); }

/* 데스크톱 앱 화면 > 핸드폰으로 팀 사무실 보기 (office.php, 2026-10-26) */
.app-mobile { margin-top: 16px; }
.app-mobile-url { margin: 0; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.app-mobile-url a { color: var(--brand-text); }

/* =====================================================
   핸드폰 메뉴 (mobile-nav.js, 2026-10-26 시안 A): 아래 4칸 + [전체] 판. PC 에서는 보이지 않는다
   ===================================================== */
.m-tabbar, .m-sheet-wrap { display: none; }
.m-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); margin: 0; }
@media (max-width: 768px) {
    .sidebar { display: none !important; }
    .m-tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-panel);
        display: flex; height: calc(64px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--bg-surface); border-top: 1px solid var(--border-faint); box-shadow: 0 -4px 16px var(--ink-tint-08);
    }
    .m-tab {
        flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        border: 0; background: transparent; color: var(--text-weak); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 6px 4px;
    }
    .m-tab > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .m-tab svg.lucide, .m-tab-ico svg { width: 23px; height: 23px; }
    .m-tab-ico { display: inline-flex; line-height: 1; }
    .m-tab.on { color: var(--brand-text); }
    .m-tab:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: -4px; border-radius: 10px; }
    .m-sheet-wrap { display: block; position: fixed; inset: 0; z-index: var(--z-modal); }
    .m-sheet-wrap[hidden] { display: none; }
    .m-sheet-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.42); }
    .m-sheet {
        position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh; display: flex; flex-direction: column;
        background: var(--bg-surface); border-radius: 22px 22px 0 0; padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px));
        touch-action: none; will-change: transform;
    }
    .m-grab { flex-shrink: 0; height: 28px; display: flex; align-items: center; justify-content: center; cursor: grab; }
    .m-grab span { width: 44px; height: 5px; border-radius: 3px; background: var(--text-disable); opacity: 0.45; }
    .m-sheet-body { overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
    .m-sec { margin: 4px 2px 8px; font-size: 13px; font-weight: 700; color: var(--text-disable); }
    .m-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
    .m-tile {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 8px 4px;
        border: 0; border-radius: 14px; background: var(--bg-canvas); color: var(--text-strong); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; text-align: center;
    }
    .m-tile > span:last-child { max-width: 100%; overflow-wrap: anywhere; line-height: 1.3; }
    .m-tile-ico { display: inline-flex; color: var(--board-c, currentColor); }
    .m-tile svg { width: 23px; height: 23px; }
    .m-tile.on { background: var(--safe-bg); color: var(--brand-text); }
    .m-tile:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
    .m-close { flex-shrink: 0; min-height: 46px; margin-top: 2px; border: 1.5px solid var(--border-hairline); border-radius: 12px; background: var(--bg-surface);
        color: var(--text-normal); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
}
