/* =========================================================
   내 업무 대시보드 - style.css
   섹션 구분 (2단계 분리 시 → 표시된 파일로 이동)
   1. 변수·기본        → base.css
   2. 공통 부품        → components.css
   3. 로딩·로그인      → components.css
   4. 레이아웃         → layout.css
   5. 사이드바         → layout.css
   6. 상단바           → layout.css
   7. 모달·토스트      → components.css
   8. 홈 화면          → home.css
   9. 달력             → calendar.css
   10. 업무 상세·탭    → task.css
   11. 공통 블록 (기록·자료·링크·체크리스트) → task.css
   12. 특전대 블록 (조직도·목표·일일보고·리포트) → report.css
   13. 운영 블록 (회의록·행사·배치표·교육) → task.css
   14. 반응형(모바일)  → layout.css
   15. 인쇄            → report.css
   ========================================================= */


/* ========== 1. 변수·기본 ========== */
:root {
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --surface-2: #F0F2F5;
  --border: #E2E6EB;
  --text: #1F2933;
  --text-sub: #6B7785;
  --primary: #3B6FE0;
  --primary-soft: #E8EFFD;
  --danger: #E05252;
  --danger-soft: #FDECEC;
  --success: #2E9E6A;
  --success-soft: #E5F6EE;
  --warning: #E59A1C;
  --warning-soft: #FDF3E1;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.18);
  --sidebar-w: 240px;
  --topbar-h: 60px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

[data-theme="dark"] {
  --bg: #15181D;
  --surface: #1E2228;
  --surface-2: #272C33;
  --border: #343A42;
  --text: #E6E9ED;
  --text-sub: #9AA4AF;
  --primary: #5B8BF0;
  --primary-soft: #23314D;
  --danger-soft: #3D2526;
  --success-soft: #1F3A2E;
  --warning-soft: #3D3220;
  --shadow: 0 1px 3px rgba(0,0,0,.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font: inherit; color: inherit; }

.hidden { display: none !important; }
.spacer { flex: 1; }
.text-sub { color: var(--text-sub); font-size: .9em; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }


/* ========== 2. 공통 부품 ========== */
/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary); filter: brightness(1.08); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger); filter: brightness(1.08); }
.btn-sm { padding: 4px 10px; font-size: .85rem; }
.btn-block { width: 100%; }

.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: var(--radius-sm);
  background: transparent; cursor: pointer; font-size: 1.1rem;
}
.icon-btn:hover { background: var(--surface-2); }

/* 입력창 */
input[type="text"], input[type="password"], input[type="date"], input[type="url"],
input[type="number"], input[type="search"], select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
textarea { resize: vertical; }

/* 카드 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 1rem; font-weight: 700; margin-bottom: 12px;
}

/* 상태 배지 */
.badge {
  display: inline-block; padding: 2px 8px;
  border-radius: 20px; font-size: .78rem; font-weight: 600;
  background: var(--surface-2); color: var(--text-sub);
}
.badge-준비 { background: var(--surface-2); color: var(--text-sub); }
.badge-진행 { background: var(--primary-soft); color: var(--primary); }
.badge-보류 { background: var(--warning-soft); color: var(--warning); }
.badge-완료 { background: var(--success-soft); color: var(--success); }
.badge-warn { background: var(--danger-soft); color: var(--danger); }

/* 진행도 막대 */
.progress {
  height: 8px; border-radius: 4px;
  background: var(--surface-2); overflow: hidden;
}
.progress-bar {
  height: 100%; border-radius: 4px;
  background: var(--primary);
  transition: width .4s;
}
.progress-label { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-sub); margin-top: 4px; }

/* 색상 점 */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* 표 */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th, .data-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left;
}
.data-table th { background: var(--surface-2); font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
.data-table tr:hover td { background: var(--surface-2); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table input[type="number"] { width: 70px; padding: 4px 6px; text-align: right; }

/* 빈 화면 안내 */
.empty {
  padding: 40px 20px; text-align: center;
  color: var(--text-sub); border: 2px dashed var(--border); border-radius: var(--radius);
}

/* 칩 (작은 태그) */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  background: var(--surface-2); font-size: .82rem;
}

.error-text { color: var(--danger); font-size: .88rem; min-height: 1.2em; margin-top: 8px; }


/* ========== 3. 로딩·로그인 ========== */
.loading-screen, .login-screen {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: var(--bg);
}
.spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-box {
  width: 320px; padding: 32px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 14px; text-align: center;
}
.login-box h1 { font-size: 1.3rem; margin-bottom: 8px; }


/* ========== 4. 레이아웃 ========== */
.app { display: flex; min-height: 100vh; }
.main-wrap { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.main-view { flex: 1; padding: 24px; max-width: 1400px; width: 100%; margin: 0 auto; }

.page-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-title { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }


/* ========== 5. 사이드바 ========== */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 200;
  width: var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto;
  padding: 12px 10px;
}
.sidebar-logo { font-size: 1.15rem; font-weight: 800; padding: 8px 10px 16px; }
.sidebar-divider { height: 1px; background: var(--border); margin: 10px 4px; }

.nav-item, .task-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text); font-size: .93rem; cursor: pointer;
}
.nav-item:hover, .task-link:hover { background: var(--surface-2); text-decoration: none; }
.nav-item.active, .task-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.group-list { flex: 1; }
.group-header {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; margin-top: 4px;
  font-size: .8rem; font-weight: 700; color: var(--text-sub);
  cursor: pointer; user-select: none;
}
.group-header:hover { color: var(--text); }
.group-header .arrow { transition: transform .2s; font-size: .7rem; }
.group-header.collapsed .arrow { transform: rotate(-90deg); }
.group-header .group-board-btn { margin-left: auto; font-size: .75rem; opacity: .6; }
.group-header .group-board-btn:hover { opacity: 1; }
.group-items { padding-left: 6px; }
.group-header.collapsed + .group-items { display: none; }
.task-link .task-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-link .alert-mark { color: var(--danger); font-size: .75rem; }

.sidebar-backdrop { display: none; }


/* ========== 6. 상단바 ========== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.search-box { flex: 1; max-width: 400px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.today-label { font-size: .9rem; color: var(--text-sub); }
.save-status { font-size: .8rem; color: var(--text-sub); }
.save-status.saving { color: var(--warning); }
.save-status.saved { color: var(--success); }
.save-status.offline { color: var(--danger); font-weight: 600; }
.mobile-only { display: none; }

/* 검색 결과 드롭다운 */
.search-results {
  position: absolute; top: 52px; width: 400px; max-height: 400px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 300;
}
.search-result-item { padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.search-result-item:hover { background: var(--surface-2); }


/* ========== 7. 모달·토스트 ========== */
.modal {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.45); padding: 20px;
}
.modal-box {
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 22px;
}
.modal-small { max-width: 380px; }
.modal-large { max-width: 900px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-header h2 { font-size: 1.2rem; }
.modal-footer { display: flex; align-items: center; gap: 8px; margin-top: 20px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.form-row > span { font-size: .85rem; font-weight: 600; color: var(--text-sub); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-inline input, .form-inline select { width: auto; flex: 1; min-width: 120px; }

.module-box {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.module-box legend { font-size: .85rem; font-weight: 600; color: var(--text-sub); padding: 0 6px; }
.module-box label { display: flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; }

.toast {
  position: fixed; bottom: 24px; left: 50%; z-index: 900;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 22px; border-radius: var(--radius);
  background: #2B3038; color: #fff; font-size: .92rem;
  box-shadow: var(--shadow-lg); opacity: 0;
  transition: transform .3s, opacity .3s;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.error { background: var(--danger); }


/* ========== 8. 홈 화면 ========== */
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.summary-card { display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.summary-card .label { font-size: .85rem; color: var(--text-sub); }
.summary-card .value { font-size: 1.9rem; font-weight: 800; }
.summary-card.warn .value { color: var(--danger); }

.home-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 20px; }

.task-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.task-card {
  position: relative; cursor: pointer;
  border-top: 4px solid var(--task-color, var(--primary));
  transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column; gap: 10px;
}
.task-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.task-card .tc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-card .tc-title { font-weight: 700; font-size: 1.02rem; }
.task-card .tc-meta { font-size: .82rem; color: var(--text-sub); display: flex; gap: 10px; flex-wrap: wrap; }
.task-card .progress-bar { background: var(--task-color, var(--primary)); }
.task-card .stale { color: var(--danger); font-weight: 600; }

.section-title { font-size: 1.05rem; font-weight: 700; margin: 4px 0 12px; }

.today-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.today-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2);
  font-size: .9rem; cursor: pointer;
}
.today-list li:hover { background: var(--primary-soft); }

/* 작은 달력 */
.mini-cal { width: 100%; border-collapse: collapse; text-align: center; font-size: .82rem; }
.mini-cal th { color: var(--text-sub); font-weight: 600; padding: 4px 0; }
.mini-cal td { padding: 5px 0; border-radius: 50%; cursor: pointer; position: relative; }
.mini-cal td:hover { background: var(--surface-2); }
.mini-cal td.today { background: var(--primary); color: #fff; font-weight: 700; }
.mini-cal td.other { color: var(--border); }
.mini-cal td.has-event::after {
  content: ""; position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--warning);
}


/* ========== 9. 달력 ========== */
.cal-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.cal-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-toolbar .cal-month { font-size: 1.25rem; font-weight: 800; min-width: 140px; text-align: center; }
.cal-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.cal-filter .chip { cursor: pointer; opacity: .45; }
.cal-filter .chip.on { opacity: 1; }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--surface);
}
.cal-weekday {
  padding: 8px; text-align: center; font-size: .82rem; font-weight: 700;
  background: var(--surface-2); color: var(--text-sub);
}
.cal-weekday.sun, .cal-cell.sun .cal-date { color: var(--danger); }
.cal-weekday.sat, .cal-cell.sat .cal-date { color: var(--primary); }

.cal-cell {
  min-height: 110px; padding: 4px;
  border-top: 1px solid var(--border); border-left: 1px solid var(--border);
  cursor: pointer; overflow: hidden;
  display: flex; flex-direction: column; gap: 2px;
}
.cal-cell:nth-child(7n+1) { border-left: none; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.other-month { background: var(--bg); opacity: .55; }
.cal-cell.selected { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-date { font-size: .85rem; font-weight: 600; padding: 2px 4px; display: flex; align-items: center; gap: 4px; }
.cal-cell.today .cal-date span {
  background: var(--primary); color: #fff; border-radius: 50%;
  width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
}

.cal-event {
  font-size: .74rem; padding: 1px 6px; border-radius: 4px;
  color: #fff; background: var(--ev-color, var(--primary));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-event.bar-mid { border-radius: 0; margin: 0 -4px; }
.cal-event.bar-start { border-radius: 4px 0 0 4px; margin-right: -4px; }
.cal-event.bar-end { border-radius: 0 4px 4px 0; margin-left: -4px; }
.cal-event.light { background: transparent; color: var(--ev-color); border: 1px solid var(--ev-color); }
.cal-more { font-size: .72rem; color: var(--text-sub); padding-left: 4px; }
.cal-dots { display: flex; gap: 3px; margin-left: auto; }
.cal-dots .dot { width: 6px; height: 6px; }

/* 주간 보기 */
.cal-grid.week .cal-cell { min-height: 360px; }

/* 날짜 상세 패널 */
.day-panel { position: sticky; top: calc(var(--topbar-h) + 20px); }
.day-panel h3 { font-size: 1.05rem; margin-bottom: 12px; }
.day-item {
  padding: 10px; border-radius: var(--radius-sm);
  border-left: 4px solid var(--ev-color, var(--primary));
  background: var(--surface-2); margin-bottom: 8px; font-size: .88rem; cursor: pointer;
}


/* ========== 10. 업무 상세·탭 ========== */
.task-header { border-left: 6px solid var(--task-color, var(--primary)); margin-bottom: 16px; }
.task-header .th-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.task-header .th-title { font-size: 1.45rem; font-weight: 800; }
.task-header .th-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: .9rem; color: var(--text-sub); }
.task-header .th-progress { margin-top: 14px; }
.task-header .progress { height: 10px; }
.task-header .progress-bar { background: var(--task-color, var(--primary)); }

.tabs {
  display: flex; gap: 2px; overflow-x: auto;
  border-bottom: 2px solid var(--border); margin-bottom: 18px;
  scrollbar-width: thin;
}
.tab {
  padding: 10px 16px; border: none; background: none; cursor: pointer;
  font-weight: 600; color: var(--text-sub); white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--task-color, var(--primary)); border-bottom-color: var(--task-color, var(--primary)); }
.tab .count { font-size: .75rem; background: var(--surface-2); border-radius: 10px; padding: 0 6px; margin-left: 4px; }

.tab-panel { animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.panel-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* 개요 탭 정보표 */
.info-list { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; font-size: .92rem; }
.info-list dt { color: var(--text-sub); font-weight: 600; }

/* 상시형 활동 지표 */
.activity-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { text-align: center; padding: 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.stat .stat-value { font-size: 1.5rem; font-weight: 800; }
.stat .stat-label { font-size: .8rem; color: var(--text-sub); }


/* ========== 11. 공통 블록 ========== */
/* 진행 기록 타임라인 */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 18px; }
.timeline-item::before {
  content: ""; position: absolute; left: -23px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--task-color, var(--primary));
}
.timeline-date { font-size: .82rem; font-weight: 700; color: var(--text-sub); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.timeline-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; white-space: pre-wrap; }
.timeline-files { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.timeline-files img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; }
.timeline-actions { margin-left: auto; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.timeline-item:hover .timeline-actions { opacity: 1; }

/* 자료실 */
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 28px; text-align: center; color: var(--text-sub);
  cursor: pointer; margin-bottom: 16px; transition: all .15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.upload-progress { margin-bottom: 12px; }

.file-folders { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.file-folders .chip { cursor: pointer; }
.file-folders .chip.on { background: var(--primary); color: #fff; }

.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.file-item {
  position: relative; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); overflow: hidden; cursor: pointer;
}
.file-item:hover { box-shadow: var(--shadow-lg); }
.file-thumb {
  height: 110px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); font-size: 2.4rem;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-info { padding: 8px; font-size: .8rem; }
.file-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-del {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 50%;
  width: 24px; height: 24px; cursor: pointer; opacity: 0;
}
.file-item:hover .file-del { opacity: 1; }

/* 이미지 크게 보기 */
.lightbox {
  position: fixed; inset: 0; z-index: 800; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: var(--radius-sm); }

/* 링크 */
.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface);
}
.link-item .link-icon { font-size: 1.3rem; }
.link-item .link-main { flex: 1; min-width: 0; }
.link-item .link-title { font-weight: 600; }
.link-item .link-url { font-size: .8rem; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 체크리스트 */
.checklist { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.check-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface);
}
.check-item input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--task-color, var(--primary)); }
.check-item .check-text { flex: 1; }
.check-item.done .check-text { text-decoration: line-through; color: var(--text-sub); }
.check-item .check-due { font-size: .8rem; color: var(--text-sub); }
.check-item .check-due.overdue { color: var(--danger); font-weight: 600; }


/* ========== 12. 특전대 블록 ========== */
/* 조직도 */
.org-tree, .org-tree ul { list-style: none; }
.org-tree ul { padding-left: 28px; position: relative; }
.org-tree ul::before {
  content: ""; position: absolute; left: 12px; top: 0; bottom: 14px;
  width: 2px; background: var(--border);
}
.org-tree li { position: relative; margin: 6px 0; }
.org-tree ul > li::before {
  content: ""; position: absolute; left: -16px; top: 20px;
  width: 14px; height: 2px; background: var(--border);
}
.org-node {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); min-width: 220px;
}
.org-node.leader { border-color: var(--task-color, var(--primary)); border-width: 2px; }
.org-node .org-role {
  font-size: .72rem; font-weight: 700; padding: 1px 6px; border-radius: 4px;
  background: var(--task-color, var(--primary)); color: #fff;
}
.org-node .org-name { font-weight: 600; }
.org-node .org-phone { font-size: .8rem; color: var(--text-sub); }
.org-node .org-actions { margin-left: auto; display: flex; gap: 2px; opacity: 0; }
.org-node:hover .org-actions { opacity: 1; }
.org-toggle { cursor: pointer; font-size: .75rem; width: 16px; }

/* 지표 설정 */
.metric-list { display: flex; gap: 8px; flex-wrap: wrap; }
.metric-list .chip { padding: 6px 12px; font-size: .88rem; }

/* 일일보고 */
.daily-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.daily-head input[type="date"] { width: auto; }
.daily-status { font-size: .85rem; }
.daily-table td.total { font-weight: 700; background: var(--surface-2); }
.daily-table tr.team-row td { background: var(--primary-soft); font-weight: 700; }
.daily-table input.memo { min-width: 140px; }
.daily-table select.slot { width: auto; padding: 4px; }

/* 일자 이동 띠 (최근 입력 현황) */
.daily-strip { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; }
.daily-strip .ds-day {
  min-width: 44px; padding: 6px 4px; text-align: center; font-size: .75rem;
  border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer;
}
.daily-strip .ds-day.done { background: var(--success-soft); color: var(--success); font-weight: 700; }
.daily-strip .ds-day.missing { background: var(--danger-soft); color: var(--danger); }
.daily-strip .ds-day.active { outline: 2px solid var(--primary); }

/* 결과 리포트 */
.report-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.rank-1 td:first-child::before { content: "🥇 "; }
.rank-2 td:first-child::before { content: "🥈 "; }
.rank-3 td:first-child::before { content: "🥉 "; }
.rate-cell { min-width: 140px; }
.rate-cell .progress { display: inline-block; width: 80px; vertical-align: middle; margin-right: 6px; }
.rate-high { color: var(--success); font-weight: 700; }
.rate-mid { color: var(--warning); font-weight: 700; }
.rate-low { color: var(--danger); font-weight: 700; }

/* 막대 그래프 (외부 라이브러리 없이) */
.bar-chart {
  display: flex; align-items: flex-end; gap: 3px;
  height: 180px; padding: 10px 4px 0; border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.bar-chart .bar {
  flex: 1; min-width: 14px; position: relative;
  background: var(--task-color, var(--primary)); border-radius: 3px 3px 0 0;
  transition: height .4s;
}
.bar-chart .bar:hover { filter: brightness(1.15); }
.bar-chart .bar::after {
  content: attr(data-value); position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  font-size: .68rem; color: var(--text-sub);
}
.bar-labels { display: flex; gap: 3px; padding: 4px 4px 0; }
.bar-labels span { flex: 1; min-width: 14px; font-size: .65rem; text-align: center; color: var(--text-sub); }

/* 특전대 통합 현황판 */
.board-table td.ok { color: var(--success); font-weight: 700; }
.board-table td.no { color: var(--danger); font-weight: 700; }
.board-table tr { cursor: pointer; }


/* ========== 13. 운영 블록 ========== */
/* 회의록 */
.meeting-card { margin-bottom: 12px; }
.meeting-card .mt-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.meeting-card .mt-title { font-weight: 700; flex: 1; }
.meeting-card .mt-body { margin-top: 12px; display: grid; gap: 10px; font-size: .9rem; }
.meeting-card .mt-body h4 { font-size: .82rem; color: var(--text-sub); margin-bottom: 2px; }
.meeting-card.collapsed .mt-body { display: none; }

/* 하위 행사 */
.event-card { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.dday {
  min-width: 72px; text-align: center; padding: 10px 6px;
  border-radius: var(--radius-sm); background: var(--task-color, var(--primary)); color: #fff;
  font-weight: 800; font-size: 1.1rem;
}
.dday.past { background: var(--surface-2); color: var(--text-sub); }
.dday.today { background: var(--danger); }
.event-card .ev-main { flex: 1; }

/* 근무 배치표 */
.rotation-table td { min-width: 110px; }
.rotation-table select { padding: 4px 6px; font-size: .85rem; }
.rotation-table td.empty-slot { background: var(--warning-soft); }
.rotation-count .over { color: var(--danger); font-weight: 700; }

/* 교육 과정·출석 */
.attend-table td.att { text-align: center; cursor: pointer; user-select: none; font-size: 1.05rem; }
.attend-table td.att:hover { background: var(--primary-soft); }
.att-o { color: var(--success); }
.att-x { color: var(--danger); }
.att-r { color: var(--warning); }
.session-done td:first-child { text-decoration: line-through; color: var(--text-sub); }


/* ========== 14. 반응형 (모바일) ========== */
@media (max-width: 1100px) {
  .home-grid, .cal-layout { grid-template-columns: 1fr; }
  .day-panel { position: static; }
  .summary-grid, .report-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --topbar-h: 56px; }
  .mobile-only { display: inline-flex; }
  .sidebar { transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 150; }
  .main-wrap { margin-left: 0; }
  .main-view { padding: 14px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .today-label { display: none; }
  #addTaskBtn { padding: 8px 10px; font-size: .85rem; }
  .form-grid, .two-col, .activity-stats { grid-template-columns: 1fr; }
  .module-box { grid-template-columns: 1fr 1fr; }
  .cal-cell { min-height: 64px; }
  .cal-event { font-size: 0; height: 5px; padding: 0; }   /* 모바일은 색 막대로만 표시 */
  .page-title { font-size: 1.25rem; }
  .org-node { min-width: 0; }
  .search-results { width: calc(100vw - 24px); left: 12px; }
}

@media (max-width: 480px) {
  .summary-grid, .report-summary { grid-template-columns: 1fr 1fr; gap: 10px; }
  .summary-card .value { font-size: 1.5rem; }
  .task-cards { grid-template-columns: 1fr; }
}


/* ========== 15. 인쇄 (결과 리포트 출력용) ========== */
@media print {
  .sidebar, .topbar, .tabs, .panel-toolbar, .btn, .icon-btn, .toast, .no-print { display: none !important; }
  .main-wrap { margin-left: 0; }
  .main-view { padding: 0; max-width: none; }
  body { background: #fff; color: #000; font-size: 12px; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .data-table th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .progress-bar, .bar-chart .bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* ========== 16. 검색 (search.js) ========== */
.search-box { position: relative; }
.search-box .search-results { top: calc(100% + 6px); left: 0; }
.search-result-item.active { background: var(--primary-soft); }
.sr-head { display: flex; align-items: center; gap: 6px; }
.sr-head .sr-kind { margin-left: auto; font-size: .72rem; padding: 1px 8px; }
.sr-body { font-size: .82rem; color: var(--text-sub); margin-top: 2px;
           white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-footer { padding: 9px 14px; text-align: center; font-size: .85rem; font-weight: 600;
                 color: var(--primary); background: var(--surface-2); cursor: pointer; }
.search-footer:hover, .search-footer.active { background: var(--primary-soft); }
.card .search-result-item { border-radius: var(--radius-sm); }
mark { background: #FFE58A; color: inherit; border-radius: 2px; padding: 0 1px; }
[data-theme="dark"] mark { background: #7A6420; }

@media (max-width: 768px) {
  .search-box { position: static; }
  .search-box .search-results { left: 12px; width: calc(100vw - 24px); }
}
/* ========== 17. 업무 상세 · 개요 (task.js, overview.js) ========== */
.task-header .th-status { width: auto; padding: 4px 8px; font-size: .85rem; }
.archived-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; margin-bottom: 12px; border-radius: var(--radius);
  background: var(--warning-soft); color: var(--warning); font-weight: 600;
}
.ov-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.memo-area { min-height: 160px; }
.mod-summary { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.mod-summary li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm); background: var(--surface-2);
  font-size: .9rem; cursor: pointer;
}
.mod-summary li:hover { background: var(--primary-soft); }
.mod-summary li .text-sub { text-align: right; }
.recent-log { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.recent-log:last-child { border-bottom: none; }
/* ========== 18. 진행 기록 · 체크리스트 (logs.js, checklist.js) ========== */
.log-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.log-form .form-inline input[type="date"] { flex: 0 0 170px; min-width: 0; }
.log-pick summary { cursor: pointer; font-size: .85rem; color: var(--text-sub); }
.log-pick-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-height: 160px; overflow-y: auto; }
.log-pick-list label {
  display: flex; align-items: center; gap: 4px; font-size: .82rem; cursor: pointer;
  padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.timeline-month { font-weight: 700; font-size: .9rem; color: var(--text-sub); margin: 18px 0 10px -26px; }
.timeline-files .chip { color: var(--text); text-decoration: none; }
.log-edit { display: flex; flex-direction: column; gap: 8px; }
.log-edit input[type="date"] { width: 170px; }

.chk-form { margin-bottom: 12px; }
.chk-form input[type="text"] { flex: 3; }
.chk-form input[type="date"] { flex: 0 0 160px; min-width: 0; }
.chk-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.check-item:hover .chk-actions { opacity: 1; }
.chk-actions .icon-btn { width: 28px; height: 28px; font-size: .9rem; }
.check-item.editing input[type="text"] { flex: 1; }
.check-item.editing input[type="date"] { width: 160px; }
.checklist .empty { list-style: none; }
.chk-footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

@media (max-width: 768px) {
  .chk-actions, .timeline-actions { opacity: 1; }   /* 휴대폰은 마우스를 올릴 수 없으므로 항상 표시 */
  .chk-form input[type="date"] { flex: 1 1 100%; }
}
/* ========== 19. 자료실 · 링크 (files.js, links.js) ========== */
.offline-note {
  padding: 10px 14px; margin-bottom: 14px; border-radius: var(--radius);
  background: var(--danger-soft); color: var(--danger); font-size: .9rem; font-weight: 600;
}
.dropzone { display: block; margin-bottom: 10px; }
.upload-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 120px 60px; gap: 10px;
  align-items: center; font-size: .85rem; padding: 4px 0;
}
.upload-row .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-row.fail .up-pct { color: var(--danger); font-weight: 700; }
.upload-row.fail .progress-bar { background: var(--danger); }
.file-thumb { cursor: zoom-in; }
.file-acts { display: flex; align-items: center; gap: 2px; margin-top: 6px; }
.file-acts .icon-btn, .data-table .icon-btn { width: 28px; height: 28px; font-size: .85rem; text-decoration: none; }
.file-move { flex: 1; min-width: 0; padding: 2px 4px !important; font-size: .78rem; }
.data-table .file-move { width: auto; }

.link-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.link-form-grid { display: grid; grid-template-columns: 2fr 1.5fr 1fr 2fr; gap: 8px; }
.link-cat { margin-bottom: 18px; }
.link-item a.link-title { display: block; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-item a.link-title:hover { color: var(--primary); }
.link-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.link-item:hover .link-actions { opacity: 1; }
.link-actions .icon-btn { width: 28px; height: 28px; font-size: .85rem; }
.link-item.editing { flex-wrap: wrap; }

@media (max-width: 768px) {
  .link-form-grid { grid-template-columns: 1fr; }
  .link-actions { opacity: 1; }
  .upload-row { grid-template-columns: minmax(0, 1fr) 80px 50px; }
}
/* ========== 20. 조직도 · 개인 목표 (org.js, goals.js) ========== */
.org-layout { display: grid; grid-template-columns: 330px 1fr; gap: 20px; align-items: start; }
.org-form-card { position: sticky; top: calc(var(--topbar-h) + 20px); display: flex; flex-direction: column; gap: 14px; }
.org-extra { border-top: 1px solid var(--border); padding-top: 12px; }
.org-extra summary { cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--text-sub); }
.org-node.editing { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.org-node .org-phone { color: var(--text-sub); }
.org-actions .icon-btn { width: 26px; height: 26px; font-size: .8rem; }
.data-table .org-actions { opacity: 1; display: inline-flex; }

.metric-chip { gap: 6px; padding: 6px 8px 6px 12px !important; }
.mini-btn { border: none; background: none; cursor: pointer; font-size: .75rem; color: var(--text-sub); padding: 0 2px; }
.mini-btn:hover { color: var(--primary); }
.mini-btn.del:hover { color: var(--danger); }
.copy-box { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.copy-box label {
  display: flex; align-items: center; gap: 6px; padding: 4px 10px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .85rem;
}
.goal-bulk select, .goal-bulk input { width: auto; }
.goal-bulk input[type="number"] { width: 100px; }
.goal-table input.goal-in { width: 80px; }
.goal-table tfoot td { background: var(--primary-soft); font-weight: 700; }

@media (max-width: 1100px) {
  .org-layout { grid-template-columns: 1fr; }
  .org-form-card { position: static; }
}
@media (max-width: 768px) { .org-actions { opacity: 1; } }
/* ========== 21. 일일보고 (daily.js) ========== */
.daily-head b { font-size: 1.05rem; }
.dy-warn {
  padding: 8px 12px; margin-bottom: 12px; border-radius: var(--radius-sm);
  background: var(--warning-soft); color: var(--warning); font-size: .88rem; font-weight: 600;
}
.daily-strip .ds-day { line-height: 1.35; }
.daily-table input.dy-in { width: 64px; }
.daily-table .sticky-col { position: sticky; left: 0; z-index: 1; background: var(--surface); white-space: nowrap; }
.daily-table thead .sticky-col { z-index: 2; background: var(--surface-2); }
.daily-table tr.entered td, .daily-table tr.entered td.sticky-col { background: var(--success-soft); }
.daily-table tfoot td, .daily-table tfoot td.sticky-col { background: var(--primary-soft); font-weight: 700; }
.daily-table .rate-cell { white-space: nowrap; }
.dy-history tbody tr { cursor: pointer; }
.dy-history tr.active td { background: var(--primary-soft); }
.dy-cum { font-size: .78rem; color: var(--text-sub); }

@media (max-width: 768px) {
  .daily-head .spacer { display: none; }
  .daily-table input.dy-in { width: 52px; }
  .daily-table input.memo { min-width: 100px; }
}
/* ========== 22. 결과 리포트 · 통합 현황판 (report.js, board.js) ========== */
.rp-toolbar .chip { cursor: pointer; }
.rp-toolbar .chip.on { background: var(--primary); color: #fff; }
.rp-toolbar input[type="date"] { width: auto; }
.rp-card, .board-section { margin-bottom: 18px; }
.rp-sort { width: auto; padding: 4px 8px; font-size: .85rem; font-weight: 400; }
.rp-final {
  padding: 10px 14px; margin-bottom: 14px; border-radius: var(--radius);
  background: var(--success-soft); color: var(--success); font-weight: 700;
}
.rp-print-title { display: none; font-size: 1.2rem; font-weight: 800; margin-bottom: 12px; }
.stat-value small { font-size: .8rem; font-weight: 600; margin-left: 2px; color: var(--text-sub); }
.board-table tfoot td { background: var(--primary-soft); font-weight: 700; }
.board-matrix tr { cursor: pointer; }
.board-matrix th, .board-matrix td { text-align: center; padding: 6px 4px; font-size: .8rem; }
.board-matrix th:first-child, .board-matrix td:first-child { text-align: left; white-space: nowrap; }
.board-matrix td.ok { color: var(--success); background: var(--success-soft); font-weight: 700; }
.board-matrix td.no { color: var(--danger); background: var(--danger-soft); }

@media print {
  .rp-print-title { display: block; }
  .rp-toolbar, .archived-banner { display: none !important; }
  .rp-final { border: 1px solid #ccc; }
}
/* ========== 23. 회의록 · 하위 행사 (meetings.js, subevents.js) ========== */
.mt-layout { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.mt-form-card { position: sticky; top: calc(var(--topbar-h) + 20px); }
.mt-names { display: flex; flex-wrap: wrap; gap: 4px; max-height: 96px; overflow-y: auto; }
.mt-names .chip { cursor: pointer; font-size: .78rem; }
.mt-names .chip:hover { background: var(--primary-soft); color: var(--primary); }
.meeting-card .mt-date { font-weight: 700; color: var(--task-color, var(--primary)); white-space: nowrap; }
.meeting-card .arrow, .ev-card .arrow { color: var(--text-sub); font-size: .85rem; }
.mt-text { white-space: pre-wrap; }
.mt-actions { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.mt-actions li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface-2);
}
.mt-actions label { display: flex; align-items: center; gap: 6px; flex: 1; cursor: pointer; }
.mt-actions .done { text-decoration: line-through; color: var(--text-sub); }
.mt-btns { margin-top: 6px; }

.ev-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.ev-card { margin-bottom: 12px; }
.ev-card .event-card { margin: 0; cursor: pointer; }
.ev-card .ev-title { font-weight: 700; font-size: 1.05rem; }
.ev-body { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 16px; }
.ev-fields { display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 10px; }
.ev-h { font-size: .9rem; margin-bottom: 8px; }
.ev-chk { margin-bottom: 8px; }
.ev-chk .icon-btn { width: 26px; height: 26px; font-size: .8rem; }
.ev-chk-form input[type="date"] { flex: 0 0 150px; min-width: 0; }
.ev-notes { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 1100px) {
  .mt-layout { grid-template-columns: 1fr; }
  .mt-form-card { position: static; }
}
@media (max-width: 768px) {
  .ev-fields { grid-template-columns: 1fr; }
  .ev-form .form-inline input[type="date"], .ev-chk-form input[type="date"] { flex: 1 1 100%; }
}
/* ========== 24. 교육·출석 (curriculum.js) ========== */
.cu-table input[type="text"] { min-width: 140px; }
.cu-table input[type="date"] { width: 150px; }
.cu-table input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--task-color, var(--primary)); }
.cu-tools { margin-top: 14px; gap: 14px; }
.cu-tools .form-inline input, .cu-tools .form-inline select { width: auto; flex: 0 0 auto; min-width: 0; }
.cu-tools #cpRate { width: 70px; }
.attend-table .sticky-col { position: sticky; left: 0; z-index: 1; background: var(--surface); white-space: nowrap; }
.attend-table thead .sticky-col { z-index: 2; background: var(--surface-2); }
.attend-table th.att-h { text-align: center; min-width: 42px; font-size: .8rem; line-height: 1.3; }
.attend-table td.att { min-width: 42px; font-weight: 700; }
/* ========== 25. 설정 (settings.js) ========== */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.set-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.set-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.set-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.set-list li input[type="text"] { flex: 1; min-width: 0; padding: 5px 8px; }
.set-list li select { width: auto; max-width: 140px; padding: 4px 6px; font-size: .85rem; }
.set-list .icon-btn { width: 28px; height: 28px; font-size: .85rem; }
.set-list .icon-btn:disabled { opacity: .25; cursor: default; }
.set-count { white-space: nowrap; }
.set-check { display: flex; align-items: center; gap: 4px; font-size: .82rem; white-space: nowrap; cursor: pointer; }
.set-tname { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-sub { font-size: .85rem; color: var(--text-sub); margin: 14px 0 6px; }
.set-sub:first-of-type { margin-top: 0; }
.set-mode { padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem; }
.set-mode.on { background: var(--success-soft); color: var(--success); }
.set-mode.off { background: var(--danger-soft); color: var(--danger); }
.set-btns { gap: 8px; }
.set-danger { padding: 12px 14px; border: 1px solid var(--danger); border-radius: var(--radius-sm); background: var(--danger-soft); }
.set-danger b { color: var(--danger); }

@media (max-width: 1100px) { .set-grid { grid-template-columns: 1fr; } }
