@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #FAFBFD;
  --border: #E3E7EF;
  --border-strong: #CBD2E0;
  --text: #171B24;
  --text-muted: #667085;
  --text-faint: #98A2B3;
  --accent: #2F6FED;
  --accent-weak: #EAF1FE;
  --accent-strong: #1E4FBE;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);

  --st-notstarted: #8A93A3;
  --st-notstarted-bg: #EEF0F3;
  --st-progress: #2F6FED;
  --st-progress-bg: #EAF1FE;
  --st-review: #7C4DE0;
  --st-review-bg: #F1ECFC;
  --st-external: #B7860B;
  --st-external-bg: #FBF3D9;
  --st-hold: #D2691E;
  --st-hold-bg: #FBEADD;
  --st-overdue: #DC2626;
  --st-overdue-bg: #FCE8E8;
  --st-done: #1F9254;
  --st-done-bg: #E7F6ED;
  --st-duesoon: #C2760A;
  --st-duesoon-bg: #FCF0DC;
  --st-needinput: #B54708;
  --st-needinput-bg: #FDF1E8;
  --st-notlinked: #667085;
  --st-notlinked-bg: #EEF0F3;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151C;
    --surface: #1A1E27;
    --surface-2: #1F2430;
    --border: #2B3040;
    --border-strong: #3A4050;
    --text: #E7E9EE;
    --text-muted: #9AA2B1;
    --text-faint: #6B7484;
    --accent: #5B8DEF;
    --accent-weak: #1E2A47;
    --accent-strong: #82AAF7;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.25);

    --st-notstarted: #9AA2B1;
    --st-notstarted-bg: #262B36;
    --st-progress: #5B8DEF;
    --st-progress-bg: #1E2A47;
    --st-review: #A583F0;
    --st-review-bg: #2A2247;
    --st-external: #E0B94A;
    --st-external-bg: #3A3018;
    --st-hold: #F0925A;
    --st-hold-bg: #3A2818;
    --st-overdue: #F0726A;
    --st-overdue-bg: #3A1E1E;
    --st-done: #4CC582;
    --st-done-bg: #16332;
    --st-done-bg: #163B26;
    --st-duesoon: #E0AA4A;
    --st-duesoon-bg: #362D16;
    --st-needinput: #E2954E;
    --st-needinput-bg: #362818;
    --st-notlinked: #9AA2B1;
    --st-notlinked-bg: #262B36;
  }
}
:root[data-theme="dark"] {
  --bg: #12151C; --surface: #1A1E27; --surface-2: #1F2430; --border: #2B3040; --border-strong: #3A4050;
  --text: #E7E9EE; --text-muted: #9AA2B1; --text-faint: #6B7484;
  --accent: #5B8DEF; --accent-weak: #1E2A47; --accent-strong: #82AAF7;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.25);
  --st-notstarted: #9AA2B1; --st-notstarted-bg: #262B36;
  --st-progress: #5B8DEF; --st-progress-bg: #1E2A47;
  --st-review: #A583F0; --st-review-bg: #2A2247;
  --st-external: #E0B94A; --st-external-bg: #3A3018;
  --st-hold: #F0925A; --st-hold-bg: #3A2818;
  --st-overdue: #F0726A; --st-overdue-bg: #3A1E1E;
  --st-done: #4CC582; --st-done-bg: #163B26;
  --st-duesoon: #E0AA4A; --st-duesoon-bg: #362D16;
  --st-needinput: #E2954E; --st-needinput-bg: #362818;
  --st-notlinked: #9AA2B1; --st-notlinked-bg: #262B36;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); }
body {
  margin: 0; color: var(--text); background: var(--bg);
  font-family: 'IBM Plex Sans KR', 'Pretendard', -apple-system, sans-serif;
  font-size: 18.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
h1, h2, h3, h4 { font-family: 'IBM Plex Sans KR', sans-serif; font-weight: 700; margin: 0; text-wrap: balance; }
table { font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; font-family: 'IBM Plex Mono', monospace; }

/* ---------- layout ---------- */
#app { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { padding: 20px 18px 12px; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; border-radius: 9px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 19px; flex: none; }
.brand-text { font-weight: 700; font-size: 19px; line-height: 1.3; }
.brand-text small { display: block; font-weight: 500; color: var(--text-muted); font-size: 15px; }

.navlist { list-style: none; margin: 6px 0; padding: 0 10px; flex: 1; }
.navlist li + li { margin-top: 2px; }
.navlink {
  display: flex; align-items: center; gap: 10px; padding: 11px 10px; border-radius: 8px;
  color: var(--text-muted); text-decoration: none; font-size: 18px; font-weight: 500; cursor: pointer;
  border: 1px solid transparent;
}
.navlink .n { width: 22px; text-align: center; font-family: 'IBM Plex Mono'; font-size: 15px; color: var(--text-faint); }
.navlink:hover { background: var(--surface-2); color: var(--text); }
.navlink.active { background: var(--accent-weak); color: var(--accent-strong); font-weight: 600; }
.navlink.active .n { color: var(--accent-strong); }
.sidebar-foot { padding: 12px 18px; border-top: 1px solid var(--border); font-size: 15px; color: var(--text-faint); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 15px 26px; display: flex; flex-direction: column; gap: 5px;
}
.topbar-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.topbar h1 { font-size: 24px; }
.topbar-sub { font-size: 16px; color: var(--text-muted); }
.spacer { flex: 1; }
.role-switch { display: flex; align-items: center; gap: 6px; font-size: 17px; color: var(--text-muted); }
.select, select, input[type=date], input[type=text], input[type=number], textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 7px; padding: 8px 11px; font-size: 17px;
}
select:focus, input:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn {
  font: inherit; font-weight: 600; font-size: 17px; padding: 9px 15px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-strong); }
.btn.sm { padding: 6px 12px; font-size: 15.5px; }
.updated-stamp { font-size: 15px; color: var(--text-faint); font-family: 'IBM Plex Mono'; }

.content { padding: 22px 26px 60px; display: flex; flex-direction: column; gap: 22px; }

/* ---------- period filter ---------- */
.periodbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip-tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 9px; border: 1px solid var(--border); }
.chip-tab { padding: 8px 13px; border-radius: 7px; font-size: 16px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.chip-tab.active { background: var(--surface); color: var(--accent-strong); box-shadow: var(--shadow); }
.week-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 9px; margin-bottom: 8px; scrollbar-width: thin; }
.week-tab { flex: 0 0 auto; font: inherit; font-size: 15px; font-weight: 600; color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 7px 11px; cursor: pointer; }
.week-tab:hover { border-color: var(--border-strong); color: var(--text); }
.week-tab.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.week-navigator { display: flex; align-items: center; gap: 9px; margin: 4px 0 12px; }
.week-arrow { width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--accent-strong); font: inherit; font-size: 27px; line-height: 1; cursor: pointer; }
.week-arrow:hover:not(:disabled) { background: var(--accent-weak); border-color: var(--accent); }
.week-arrow:disabled { color: var(--text-faint); background: var(--surface-2); cursor: not-allowed; opacity: .6; }
.week-current { min-width: 180px; height: 40px; padding: 7px 16px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.week-current b { color: var(--accent-strong); }
.week-current span { font-family: 'IBM Plex Mono', monospace; color: var(--text-muted); font-size: 15px; }

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: 15px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1180px) { .grid.cols-4 { grid-template-columns: repeat(2,1fr); } .grid.cols-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px) { .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 17px 17px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.card.clickable { cursor: pointer; }
.card.clickable:hover { border-color: var(--border-strong); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card-title { font-size: 17px; font-weight: 600; color: var(--text-muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; font-size: 14.5px; color: var(--text-faint); border-top: 1px dashed var(--border); padding-top: 8px; margin-top: auto; }
.metric-value { font-size: 36px; font-weight: 700; font-family: 'IBM Plex Mono'; letter-spacing: -.5px; }
.metric-sub { font-size: 15.5px; color: var(--text-muted); }

.section-head { display: flex; align-items: center; gap: 10px; }
.section-head h2 { font-size: 20.5px; }
.section-head .desc { font-size: 16px; color: var(--text-muted); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 17px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; flex-wrap: wrap; }
.panel-head h3 { font-size: 18.5px; }
.project-card-simple { align-self: start; }
.project-details { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); }
.project-details summary { cursor: pointer; color: var(--accent-strong); font-weight: 700; font-size: 16px; }
.src-tag { font-size: 14.5px; color: var(--text-faint); font-family: 'IBM Plex Mono'; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 2px 8px; }

/* ---------- category / priority swatches ---------- */
.cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; flex: none; vertical-align: -1px; }
.cat-label { display: inline-flex; align-items: center; white-space: nowrap; }
.prio-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; font-size: 15px; font-weight: 700; }

/* ---------- status legend strip ---------- */
.legend-strip { display: flex; gap: 13px; flex-wrap: wrap; align-items: center; padding: 11px 15px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; font-size: 15.5px; color: var(--text-muted); }
.legend-strip .li { display: flex; align-items: center; gap: 5px; font-weight: 600; }
.legend-strip .li .dot { width: 9px; height: 9px; }

/* ---------- pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; font-size: 15.5px; font-weight: 700; white-space: nowrap; border: 1px solid color-mix(in srgb, currentColor 32%, transparent); }
.pill .dot { width: 9px; height: 9px; box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 18%, transparent); border-radius: 50%; }
.pill.st-미착수, .pill.st-notstarted { color: var(--st-notstarted); background: var(--st-notstarted-bg); }
.pill.st-진행중, .pill.st-progress { color: var(--st-progress); background: var(--st-progress-bg); }
.pill.st-검토중, .pill.st-review { color: var(--st-review); background: var(--st-review-bg); }
.pill.st-외부부서대기, .pill.st-external { color: var(--st-external); background: var(--st-external-bg); }
.pill.st-보류, .pill.st-hold { color: var(--st-hold); background: var(--st-hold-bg); }
.pill.st-완료, .pill.st-done { color: var(--st-done); background: var(--st-done-bg); }
.pill.st-기한초과 { color: var(--st-overdue); background: var(--st-overdue-bg); }
.pill.st-마감임박 { color: var(--st-duesoon); background: var(--st-duesoon-bg); }
.pill.st-입력필요 { color: var(--st-needinput); background: var(--st-needinput-bg); }
.pill.st-데이터미연동 { color: var(--st-notlinked); background: var(--st-notlinked-bg); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

.badge-example { font-size: 14px; font-weight: 700; color: var(--accent-strong); background: var(--accent-weak); border-radius: 5px; padding: 1px 8px; }
.badge-mine { font-size: 14px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 5px; padding: 1px 8px; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
table.datatable { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 17px; }
table.datatable thead th {
  text-align: left; background: var(--surface-2); color: var(--text-muted); font-weight: 600;
  padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0;
}
table.datatable tbody td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.datatable tbody tr:hover { background: var(--surface-2); }
table.datatable tbody tr:last-child td { border-bottom: none; }

.progress-track { width: 100%; height: 9px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 4px; }
.progress-row { display: flex; align-items: center; gap: 8px; }
.progress-row .progress-track { flex: 1; }
.progress-row span { font-size: 15px; color: var(--text-muted); font-family: 'IBM Plex Mono'; min-width: 44px; text-align: right; }

.filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filterbar label { font-size: 15.5px; color: var(--text-muted); display: flex; flex-direction: column; gap: 3px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 15px; flex-wrap: wrap; }
.tab { padding: 10px 14px; font-size: 17px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--accent-strong); border-bottom-color: var(--accent); }

.list-simple { display: flex; flex-direction: column; gap: 0; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--border); font-size: 17px; }
.list-row:last-child { border-bottom: none; }
.list-row .t1 { flex: 1; min-width: 0; }
.list-row .t1 .name { font-weight: 600; }
.list-row .t1 .meta { color: var(--text-muted); font-size: 15px; }

.banner {
  background: var(--accent-weak); border: 1px solid var(--border); color: var(--text); border-radius: 10px;
  padding: 12px 16px; font-size: 17px; display: flex; gap: 10px; align-items: flex-start;
}
.banner.warn { background: var(--st-needinput-bg); }
.banner b { color: var(--accent-strong); }

.formula-box { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 12px 14px; font-family: 'IBM Plex Mono'; font-size: 15.5px; color: var(--text-muted); }

.kanban { display: grid; grid-template-columns: repeat(6, minmax(190px,1fr)); gap: 10px; overflow-x: auto; }
.kcol { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px; min-width: 190px; }
.kcol h4 { font-size: 15.5px; padding: 4px 4px 8px; color: var(--text-muted); }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 11px; font-size: 15.5px; margin-bottom: 6px; box-shadow: var(--shadow); cursor: pointer; }
.kcard .name { font-weight: 600; margin-bottom: 3px; }
.kcard .meta { color: var(--text-muted); font-size: 14.5px; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { font-size: 14.5px; color: var(--text-faint); text-align: center; padding-bottom: 3px; }
.cal-cell { min-height: 76px; border: 1px solid var(--border); border-radius: 8px; padding: 5px; font-size: 14.5px; background: var(--surface-2); }
.cal-cell .d { color: var(--text-faint); font-family: 'IBM Plex Mono'; font-size: 14px; }
.cal-cell.today { border-color: var(--accent); background: var(--accent-weak); }
.cal-item { margin-top: 2px; padding: 1px 4px; border-radius: 4px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.donut-wrap { display: flex; align-items: center; gap: 14px; }
.legend { display: flex; flex-direction: column; gap: 5px; font-size: 15.5px; }
.legend .li { display: flex; align-items: center; gap: 6px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }

.taskmodal-backdrop { position: fixed; inset: 0; background: rgba(15,18,25,.45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 50; overflow-y: auto; }
.taskmodal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 680px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 15px; }
.taskmodal h3 { font-size: 20.5px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; font-size: 16px; }
.modal-grid .full { grid-column: 1 / -1; }
.field-label { color: var(--text-muted); font-size: 15px; margin-bottom: 3px; display:block; }
.close-x { margin-left: auto; cursor: pointer; color: var(--text-faint); font-size: 24px; line-height: 1; background:none; border:none; }
.checklist-item { display: flex; align-items: center; gap: 6px; font-size: 16px; padding: 3px 0; }
.comment-item { font-size: 15.5px; border-top: 1px solid var(--border); padding-top: 6px; margin-top: 6px; }
.comment-item .who { font-weight: 600; }

.mobile-summary { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; width: 100%; flex-direction: row; border-right: none; border-top: 1px solid var(--border); z-index: 20; overflow-x: auto; }
  .brand, .sidebar-foot { display: none; }
  .navlist { display: flex; flex: none; padding: 6px 8px; gap: 2px; margin:0; }
  .navlist li { flex: none; }
  .navlink { flex-direction: column; gap: 2px; font-size: 13.5px; padding: 6px 10px; white-space: nowrap; }
  .navlink .n { display: none; }
  .main { padding-bottom: 64px; }
  .content { padding: 15px 15px 80px; }
  .topbar { padding: 11px 15px; }
  .mobile-summary { display: flex; }
  .kanban { grid-template-columns: repeat(6, 74vw); }
}

.hint { font-size: 15px; color: var(--text-faint); }
a.link { color: var(--accent-strong); text-decoration: none; }
a.link:hover { text-decoration: underline; }
.empty-state { padding: 26px; text-align: center; color: var(--text-faint); font-size: 17px; }
.flex-between { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.owner-tag { display:inline-flex; align-items:center; gap:4px; background: var(--surface-2); border:1px solid var(--border); border-radius:6px; padding:3px 9px; font-size:15px; }

/* ---------- creative card grid ---------- */
.creative-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1280px) { .creative-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .creative-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .creative-grid { grid-template-columns: 1fr; } }
.creative-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.creative-thumb { aspect-ratio: 1 / 1; width: 100%; background: var(--surface-2) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: 15px; }
.creative-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.creative-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 11px; }
.creative-name { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creative-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.creative-metrics .m { text-align: center; }
.creative-metrics .m .v { font-family: 'IBM Plex Mono'; font-weight: 700; font-size: 17px; display: block; }
.creative-metrics .m .l { font-size: 13px; color: var(--text-muted); margin-top: 2px; display: block; }
.creative-rank { position: absolute; margin: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.creative-thumb-wrap { position: relative; }

/* ---- 업무: 캘린더 / 우선순위 ---- */
.pill.st-기타 { color: var(--st-overdue); background: var(--st-overdue-bg); }
.work-toolbar { display:flex; align-items:center; gap:8px; margin:10px 0; }
.work-toolbar .spacer { flex:1; }
.seg { display:inline-flex; border:1px solid var(--line, #E3E6EC); border-radius:8px; overflow:hidden; }
.segbtn { border:0; background:transparent; padding:6px 14px; cursor:pointer; font:inherit; color:inherit; }
.segbtn.active { background:var(--st-progress-bg); color:var(--st-progress); font-weight:600; }
.cal-head { display:flex; align-items:center; gap:6px; margin:8px 0; }
.cal-head .spacer { flex:1; }
.cal-title { font-weight:700; font-size:16px; }
.ncal { border:1px solid var(--line, #E3E6EC); border-radius:8px; overflow:hidden; background:var(--card, #fff); }
.ncal-dow { display:grid; grid-template-columns:repeat(7,1fr); text-align:center; font-size:12px; color:#8A93A3; padding:6px 0; border-bottom:1px solid var(--line, #E3E6EC); }
.wk { position:relative; border-bottom:1px solid var(--line, #E3E6EC); }
.wk:last-child { border-bottom:0; }
.wk-bg { position:absolute; inset:0; display:grid; grid-template-columns:repeat(7,1fr); }
.wk-cell { border-right:1px solid var(--line, #E3E6EC); }
.wk-cell:last-child { border-right:0; }
.wk-fg { position:relative; display:grid; grid-template-columns:repeat(7,1fr); grid-auto-rows:min-content; row-gap:3px; padding-bottom:8px; min-height:96px; }
.daynum { text-align:right; font-size:12px; padding:4px 8px 2px; color:#4B5565; cursor:pointer; }
.daynum.dim { color:#B6BCC8; }
.today-dot { display:inline-block; min-width:20px; height:20px; line-height:20px; text-align:center; border-radius:50%; background:#E5484D; color:#fff; font-weight:700; }
.evchip { margin:0 3px; padding:3px 6px; border:1px solid var(--line, #E3E6EC); border-radius:6px; background:var(--card, #fff); box-shadow:0 1px 1px rgba(0,0,0,.04); cursor:pointer; min-width:0; overflow:hidden; font-size:12px; position:relative; }
.evchip:hover { border-color:var(--st-progress); }
.evchip .evt { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.evchip .pill { font-size:11px; padding:0 6px; margin-top:2px; display:inline-block; }
.evchip.cl { border-top-left-radius:0; border-bottom-left-radius:0; margin-left:0; }
.evchip.cr { border-top-right-radius:0; border-bottom-right-radius:0; margin-right:0; }
.ochip { display:inline-block; font-size:11px; padding:0 6px; border-radius:4px; background:#EEF0F3; margin-right:3px; }
.banner.warn { background:#FCF0DC; color:#8A5A00; }
.pboard { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px; align-items:start; }
.pcol { background:#F6F7F9; border-radius:10px; padding:8px; }
.pcol h4 { margin:2px 4px 8px; font-size:13px; }
.pcol.col-1 { background:#FDECEC; } .pcol.col-2 { background:#FCF3E4; } .pcol.col-보류 { background:#EEF0F3; }
.pcard { background:var(--card, #fff); border:1px solid var(--line, #E3E6EC); border-radius:8px; padding:8px; margin-bottom:8px; cursor:pointer; }
.pcard.hot { border-left:4px solid #DC2626; } .pcard.warm { border-left:4px solid #E0821C; } .pcard.late { border-left:4px solid #7A1F1F; }
.pcard .pt { font-weight:600; font-size:13px; margin-bottom:4px; }
.pcard .pm { font-size:12px; margin-bottom:6px; }
.pact { display:flex; align-items:center; justify-content:space-between; gap:6px; flex-wrap:wrap; }
.prio-btns .pb { border:1px solid var(--line, #E3E6EC); background:transparent; border-radius:6px; padding:1px 7px; margin-left:3px; font-size:11px; cursor:pointer; color:inherit; }
.prio-btns .pb.on { background:var(--st-progress); color:#fff; border-color:var(--st-progress); }
.duebadge { font-size:11px; padding:0 6px; border-radius:10px; font-weight:700; }
.duebadge.hot { background:#FCE8E8; color:#DC2626; } .duebadge.warm { background:#FCF0DC; color:#C2760A; } .duebadge.late { background:#F3D9D9; color:#7A1F1F; }
@media (max-width: 900px) { .pboard { grid-template-columns:1fr 1fr; } }

/* ---- 업무 화면 글자 크기·자간 확대 ---- */
.work-toolbar, .ncal, .pboard, .cal-head { letter-spacing: 0.02em; }
.segbtn { font-size: 16px; padding: 8px 18px; }
.cal-title { font-size: 20px; }
.ncal-dow { font-size: 14px; padding: 8px 0; }
.daynum { font-size: 14px; padding: 6px 10px 4px; }
.today-dot { min-width: 26px; height: 26px; line-height: 26px; }
.wk-fg { min-height: 120px; row-gap: 4px; }
.evchip { font-size: 14px; padding: 5px 8px; line-height: 1.45; }
.evchip .evt { font-weight: 600; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.evchip .pill { font-size: 12px; padding: 1px 8px; margin-top: 4px; }
.ochip { font-size: 13px; padding: 1px 8px; }
.pcol h4 { font-size: 15px; }
.pcard { padding: 12px; }
.pcard .pt { font-size: 15px; line-height: 1.45; margin-bottom: 6px; }
.pcard .pm { font-size: 13px; line-height: 1.6; }
.prio-btns .pb { font-size: 13px; padding: 3px 10px; }
.duebadge { font-size: 12px; padding: 1px 8px; }

.kind-row { display:flex; align-items:center; gap:8px; margin:6px 0 4px; flex-wrap:wrap; letter-spacing:0.02em; }
.kindbtn { border:1px solid var(--line, #E3E6EC); background:transparent; border-radius:16px; padding:5px 14px; font-size:14px; cursor:pointer; color:inherit; display:inline-flex; align-items:center; gap:6px; }
.kindbtn.active { background:var(--st-progress-bg); border-color:var(--st-progress); color:var(--st-progress); font-weight:600; }
.kdot { width:9px; height:9px; border-radius:50%; display:inline-block; }

.wk-cell.drop { background:#EAF1FE; }
.evchip[draggable="true"] { cursor:grab; }
/* ---- 노션 스타일 상세 팝업 ---- */
.nmodal { background:var(--card,#fff); color:inherit; width:min(900px, 94vw); max-height:90vh; overflow-y:auto; border-radius:12px; box-shadow:0 12px 40px rgba(0,0,0,.25); margin:4vh auto; position:relative; letter-spacing:0.01em; }
.taskmodal-backdrop:has(.nmodal) { align-items:flex-start; overflow-y:auto; }
.nm-top { display:flex; align-items:center; gap:6px; padding:10px 14px; position:sticky; top:0; background:var(--card,#fff); z-index:2; }
.nm-top .spacer { flex:1; }
.nm-icon { border:0; background:transparent; cursor:pointer; font-size:17px; padding:4px 8px; border-radius:6px; color:inherit; }
.nm-icon:hover { background:#EEF0F3; }
.nm-body { padding:6px 56px 40px; }
.nm-title { width:100%; border:0; outline:0; font-size:36px; font-weight:800; background:transparent; color:inherit; padding:4px 0 10px; font-family:inherit; }
.nm-title::placeholder { color:#C5C9D2; }
.nm-props { display:grid; grid-template-columns:150px 1fr; row-gap:6px; align-items:center; margin-bottom:14px; }
.nm-label { color:#7A8394; font-size:14px; padding:6px 0; }
.nm-val { display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:15px; min-height:32px; }
.nm-val select, .nm-val input[type=date], .nm-val input[type=text] { border:1px solid transparent; background:transparent; font:inherit; padding:5px 8px; border-radius:6px; color:inherit; }
.nm-val select:hover, .nm-val input:hover, .nm-val select:focus, .nm-val input:focus { background:#F2F4F7; border-color:#E3E6EC; outline:0; }
.nm-val input[type=text] { min-width:320px; }
.nm-chip { padding:3px 12px; border-radius:14px; border:1px solid #E3E6EC; cursor:pointer; font-size:14px; color:#8A93A3; }
.nm-chip.on { background:#E8EEFD; color:#2F6FED; border-color:#BFD0FA; font-weight:600; }
.nm-meta { font-size:12px; color:#8A93A3; margin:4px 0 10px; }
.nm-sec { font-weight:700; font-size:14px; margin:12px 0 6px; }
.nm-cmt { display:flex; gap:10px; margin:8px 0; font-size:14px; }
.nm-av { width:26px; height:26px; line-height:26px; text-align:center; border-radius:50%; background:#D9E3FB; color:#2F6FED; font-weight:700; font-size:13px; flex:none; display:inline-block; }
.nm-cmt-new { display:flex; align-items:center; gap:10px; }
.nm-cmt-new input { flex:1; border:0; outline:0; font:inherit; background:transparent; padding:6px 0; color:inherit; }
.nm-hr { border:0; border-top:1px solid #E3E6EC; margin:16px 0; }
.nm-bodyview { min-height:120px; font-size:16px; line-height:1.7; cursor:text; padding:4px 2px; }
.nm-hint { color:#B0B6C2; }
.nm-bodyedit { width:100%; min-height:160px; border:1px solid #E3E6EC; border-radius:8px; padding:12px; font:inherit; font-size:15px; line-height:1.7; resize:none; background:transparent; color:inherit; box-sizing:border-box; }
.nm-toolbar { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px; }
.nm-toolbar button { border:1px solid #E3E6EC; background:transparent; border-radius:6px; padding:4px 10px; cursor:pointer; font-size:13px; color:inherit; }
.nm-toolbar button.primary { background:var(--st-progress); color:#fff; border-color:var(--st-progress); margin-left:auto; }
.nm-create { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
.md-gap { height:10px; } .md-p { margin:2px 0; } .md-h1 { font-size:26px; font-weight:800; margin:14px 0 6px; } .md-h2 { font-size:21px; font-weight:700; margin:12px 0 4px; } .md-h3 { font-size:18px; font-weight:700; margin:10px 0 4px; }
.md-li { margin:2px 0; } .md-dot { display:inline-block; min-width:18px; color:#6B7280; font-size:11px; } .md-chk { cursor:pointer; font-size:17px; } .md-chk.on { color:#2F6FED; }
.md-q { border-left:3px solid #CBD2DC; padding-left:10px; margin:4px 0; color:#4B5565; }
.nm-bodyview pre { background:#F4F5F7; border-radius:8px; padding:12px; overflow-x:auto; font-size:14px; white-space:pre-wrap; }
.nm-bodyview code { background:#F0F1F4; border-radius:4px; padding:1px 5px; font-size:14px; }
.nm-bodyview hr { border:0; border-top:1px solid #E3E6EC; margin:10px 0; }
.nm-bodyview a { color:#2F6FED; }

/* ---- 블록 편집기 ---- */
.nm-editor { min-height:240px; outline:0; font-size:16px; line-height:1.7; padding:4px 2px 60px; cursor:text; }
.nm-editor .blk { position:relative; }
.nm-editor .blk .bc { min-height:1.7em; outline:0; white-space:pre-wrap; word-break:break-word; }
.nm-editor .blk[data-t="ul"], .nm-editor .blk[data-t="ol"], .nm-editor .blk[data-t="todo"] { }
.nm-editor .blk[data-t="ul"] .bc, .nm-editor .blk[data-t="ol"] .bc, .nm-editor .blk[data-t="todo"] .bc { margin-left:24px; }
.nm-editor .bm { position:absolute; left:0; top:0; width:22px; text-align:center; color:#6B7280; font-size:12px; line-height:1.7; user-select:none; }
.nm-editor .blk[data-t="ol"] .bm { font-size:15px; }
.nm-editor .blk[data-t="todo"] .bm { font-size:18px; cursor:pointer; }
.nm-editor .blk[data-t="todo"] .bm.on { color:#2F6FED; }
.nm-editor .blk[data-t="todo"][data-ck="1"] .bc { color:#9AA2B1; text-decoration:line-through; }
.nm-editor .blk[data-t="h1"] .bc { font-size:28px; font-weight:800; margin-top:14px; }
.nm-editor .blk[data-t="h2"] .bc { font-size:22px; font-weight:700; margin-top:10px; }
.nm-editor .blk[data-t="h3"] .bc { font-size:18px; font-weight:700; margin-top:8px; }
.nm-editor .blk[data-t="q"] .bc { border-left:3px solid #CBD2DC; padding-left:12px; color:#4B5565; }
.nm-editor .blk[data-t="code"] .bc { background:#F4F5F7; border-radius:8px; padding:10px 12px; font-family:ui-monospace,Consolas,monospace; font-size:14px; }
.nm-editor .blk[data-t="hr"] { padding:8px 0; } .nm-editor .blk[data-t="hr"] hr { border:0; border-top:1px solid #E3E6EC; margin:0; }
.nm-editor .bc[data-ph]:empty::before { content:attr(data-ph); color:#B0B6C2; pointer-events:none; }
.nm-editor a { color:#2F6FED; } .nm-editor code { background:#F0F1F4; border-radius:4px; padding:1px 5px; font-size:14px; }

/* ---- 확대(전체 화면) 보기 ---- */
.nm-crumb, .nm-rel { display:none; }
.nmodal.full .nm-crumb { display:inline; font-size:14px; color:#6B7280; margin-left:6px; }
.nmodal.full .nm-rel { display:inline-block; font-size:13px; color:#8A93A3; margin-right:8px; }
.nmodal.full .nm-av.nm-rel { color:#2F6FED; margin-right:10px; }
.nm-crumb-link { cursor:pointer; } .nm-crumb-link:hover { text-decoration:underline; color:#111; }
.taskmodal-backdrop.full { padding:0 !important; align-items:stretch !important; }
.nmodal.full { width:100vw; max-width:none; height:100vh; max-height:none; margin:0; border-radius:0; box-shadow:none; }
.nmodal.full .nm-top { padding:10px 18px; border-bottom:0; }
.nmodal.full .nm-body { max-width:780px; margin:0 auto; padding:48px 24px 120px; }
.nmodal.full .nm-title { font-size:42px; }
.nmodal.full .nm-editor { font-size:17px; min-height:360px; }

.nm-chip.ro { pointer-events:none; }
.nm-ronote { background:#EAF1FE; color:#2F55B0; border-radius:8px; padding:8px 12px; font-size:13px; margin:6px 0 4px; }
.nm-top a.btn { text-decoration:none; display:inline-block; margin-right:6px; }
.work-toolbar a.btn { text-decoration:none; display:inline-block; }
.nm-bodyview.nm-ro { cursor:default; min-height:60px; }

.wk-ok { color:#1F9254; font-weight:600; } .wk-miss { color:#DC2626; font-weight:600; } .wk-pending { color:#8A93A3; }


/* ---- 팀 업무 목록 단순화 ---- */
.warn-chips { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
.warn-chip { border:1px solid var(--border); background:var(--surface); border-radius:999px; padding:7px 14px; font-size:15.5px; font-weight:600; cursor:pointer; color:var(--text-muted); }
.warn-chip b { margin-left:4px; font-size:17px; }
.warn-chip.danger b { color:#DC2626; } .warn-chip.warn b { color:#D2691E; } .warn-chip.info b { color:#2F6FED; }
.warn-chip.active { background:var(--surface-2); border-color:var(--accent-strong, #2F6FED); color:var(--text); }
.detail-filters { background:var(--surface-2); border:1px solid var(--border); border-radius:10px; padding:10px 12px; }
table.tasklist { min-width:0; table-layout:fixed; }
table.tasklist th:nth-child(1) { width:34%; } table.tasklist th:nth-child(2) { width:22%; }
table.tasklist th:nth-child(3) { width:13%; } table.tasklist th:nth-child(4) { width:18%; } table.tasklist th:nth-child(5) { width:13%; }
table.tasklist tbody td { padding:9px 12px; }
.task-row { cursor:pointer; }
.tl-title { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tl-sub { font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tl-owners { white-space:nowrap; overflow:hidden; }
.owner-tag.more { background:transparent; color:var(--text-muted); } .tl-owners .owner-tag { margin-right:4px; }
.tl-date { white-space:nowrap; }
.tl-status { white-space:normal; }
@media (max-width: 900px) { table.tasklist th:nth-child(2), table.tasklist td.tl-owners { display:none; } }
