/* Pretendard 1.3.9 (SIL OFL 1.1, fonts/LICENSE.txt) — 외부 CDN 대신 직접 둠. 받는 동안은 기본 글꼴로 먼저 보임 */
@font-face { font-family: 'Pretendard'; font-weight: 45 920; font-style: normal; font-display: swap; src: url('/fonts/PretendardVariable.woff2') format('woff2-variations'), url('/fonts/PretendardVariable.woff2') format('woff2'); }
:root {
  --bg: #f4f6fa; --panel: #ffffff; --panel-2: #f8f9fc; --line: #e3e7ef; --line-2: #eef1f6;
  --text: #1b2333; --muted: #6b7486; --faint: #9aa3b5;
  --brand: #2f5bea; --brand-weak: #e8eefe; --brand-ink: #1e44c4;
  --red: #d93a3a; --red-weak: #fdeceb; --orange: #c86a10; --orange-weak: #fff3e3;
  --green: #18875a; --green-weak: #e4f6ee; --blue: #2f5bea; --blue-weak: #e8eefe;
  --purple: #7046d6; --purple-weak: #f0eafd; --gray-weak: #eef0f4;
  --side: #121a2c; --side-ink: #c5cde0; --side-active: #ffffff;
  --radius: 10px; --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420; --panel: #171d2b; --panel-2: #1c2333; --line: #2a3346; --line-2: #222a3b;
    --text: #e6e9f0; --muted: #98a2b6; --faint: #6c7689;
    --brand: #6a8cff; --brand-weak: #22305a; --brand-ink: #a9bcff;
    --red: #ff6b6b; --red-weak: #3a1f24; --orange: #f0a04b; --orange-weak: #3a2a17;
    --green: #3fcf8e; --green-weak: #173327; --blue: #6a8cff; --blue-weak: #22305a;
    --purple: #a88bff; --purple-weak: #2c2450; --gray-weak: #262e40;
    --side: #0b0f19; --shadow: none; --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Pretendard, -apple-system, 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif; font-size: 14px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 15px; } h4 { font-size: 13px; margin: 16px 0 8px; color: var(--muted); } h5 { font-size: 12px; color: var(--muted); margin: 0 0 4px; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-height: 34px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); }
textarea { resize: vertical; line-height: 1.55; width: 100%; }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; }
.red { color: var(--red); } .orange { color: var(--orange); } .green { color: var(--green); } .blue { color: var(--blue); }
.pre { white-space: pre-wrap; word-break: break-word; }
.row { display: flex; align-items: center; } .gap { gap: 8px; } .gap-sm { gap: 4px; } .grow { flex: 1; } .right { text-align: right; }
.mt { margin-top: 20px; } .mb { margin-bottom: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 600; white-space: nowrap; color: var(--text); transition: background .12s, border-color .12s; }
.btn:hover { background: var(--panel-2); border-color: var(--faint); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger.ghost { color: var(--red); background: transparent; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.block { width: 100%; height: 42px; }
.btn:disabled { opacity: .5; cursor: wait; }
.icon-btn { border: 0; background: transparent; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); font-size: 16px; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn.sm { width: 24px; height: 24px; font-size: 13px; }
.link { border: 0; background: none; color: var(--green); cursor: pointer; padding: 0; font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.check input { min-height: 0; }

/* 배지 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--gray-weak); color: var(--muted); white-space: nowrap; }
.badge.red { background: var(--red-weak); color: var(--red); } .badge.orange { background: var(--orange-weak); color: var(--orange); }
.badge.green { background: var(--green-weak); color: var(--green); } .badge.blue { background: var(--blue-weak); color: var(--blue); }
.badge.purple { background: var(--purple-weak); color: var(--purple); } .badge.gray { opacity: .75; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 5px; background: var(--brand-weak); color: var(--brand-ink); font-weight: 600; }

/* 로그인 */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1200px 600px at 20% 0%, var(--brand-weak), transparent), var(--bg); }
.login-card { width: min(380px, 100%); background: var(--panel); padding: 32px; border-radius: 16px; box-shadow: var(--shadow-lg); display: grid; gap: 14px; }
.login-card label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
.login-card .google-login { text-align: center; text-decoration: none; }
.login-card .google-login.disabled { opacity: .5; pointer-events: none; }

/* 셸 */
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; }
.brand b { display: block; font-size: 15px; } .brand small { color: var(--side-ink); font-size: 11px; }
.brand.big { color: var(--text); padding: 0 0 8px; } .brand.big small { color: var(--muted); }
.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.shell { display: flex; min-height: 100vh; }
.side { width: 232px; flex: none; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.nav-group { font-size: 11px; font-weight: 700; color: #6f7a93; padding: 14px 10px 6px; letter-spacing: .04em; }
.nav-sep { height: 1px; background: rgba(255, 255, 255, .07); margin: 12px 8px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--side-ink); font-weight: 500; }
.side nav a i { font-style: normal; width: 18px; text-align: center; opacity: .7; }
.side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side nav a.active { background: rgba(106, 140, 255, .18); color: var(--side-active); font-weight: 700; }
.side-foot { padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .07); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-foot .me { display: flex; gap: 8px; align-items: center; min-width: 0; }
.side-foot b { color: #fff; font-size: 13px; display: block; } .side-foot small { font-size: 11px; }
.side-foot .btn.ghost { color: var(--side-ink); }
.side-foot .btn.ghost:hover { background: rgba(255, 255, 255, .08); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-2); }
.top h1 { font-size: 18px; flex: 1; }
.top-right { display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; }
.content { padding: 20px 24px 60px; max-width: 1480px; width: 100%; }
.loading { padding: 60px; text-align: center; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.live.on i { background: var(--green); box-shadow: 0 0 0 3px var(--green-weak); }
.timer-pill { display: flex; align-items: center; gap: 8px; background: var(--red-weak); padding: 4px 4px 4px 12px; border-radius: 99px; max-width: 420px; }
.timer-pill a { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.timer-pill b { font-variant-numeric: tabular-nums; color: var(--red); }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1.2s infinite; flex: none; }
@keyframes blink { 50% { opacity: .25; } }

/* 아바타 */
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand-weak); color: var(--brand-ink); font-weight: 700; flex: none; position: relative; font-size: 13px; }
.avatar.xs { width: 22px; height: 22px; font-size: 11px; }
.avatar.on::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); border: 2px solid var(--panel); }
.side .avatar { background: rgba(106, 140, 255, .25); color: #fff; }

/* 카드 / 패널 */
.card { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card > footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.greet { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.greet h2 { font-size: 20px; margin-bottom: 4px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 4px; color: var(--text); box-shadow: var(--shadow); min-width: 0; }
a.kpi:hover { border-color: var(--brand); }
.kpi small { color: var(--muted); font-weight: 600; font-size: 12px; }
.kpi b { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi.warn b { color: var(--red); }
.team { list-style: none; margin: 0; padding: 0; }
.team li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.team li:last-child { border: 0; }
.working { color: var(--green); font-weight: 600; }
.todo-list { list-style: none; padding: 0; margin: 0; }
.todo-list li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.todo-list li a { color: var(--text); } .todo-list li.red a { color: var(--red); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding-top: 6px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bar i { display: block; width: 100%; max-width: 34px; background: var(--brand); border-radius: 5px 5px 2px 2px; opacity: .85; }
.bar small { font-size: 11px; color: var(--muted); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty div { font-weight: 600; color: var(--text); margin-bottom: 4px; }
.intro { background: var(--brand-weak); color: var(--text); padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; line-height: 1.6; }
.intro.warn { background: var(--orange-weak); }
.box { background: var(--panel-2); border-radius: 8px; padding: 10px 12px; margin: 0; }
.green-box { background: var(--green-weak); margin-top: 12px; }

/* 툴바 · 합계 */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { min-width: 200px; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--brand); color: #fff; }
.sumbar { display: flex; flex-wrap: wrap; gap: 4px 28px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); margin-bottom: 12px; }
.sumbar div { display: flex; gap: 8px; align-items: baseline; }
.sumbar small { color: var(--muted); font-weight: 600; }
.sumbar b { font-size: 15px; font-variant-numeric: tabular-nums; }
.bulkbar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--brand-weak); border-radius: 8px; margin-bottom: 10px; }

/* 표 */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); }
.modal .table-wrap { box-shadow: none; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 12px; background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--panel-2); }
.tbl tfoot th { background: var(--panel-2); border-top: 1px solid var(--line); color: var(--text); }
.tbl th.num { text-align: right; }
.tbl select.inline { min-height: 28px; padding: 3px 6px; font-size: 12px; max-width: 160px; }
.tbl select.empty-sel { border-color: var(--orange); color: var(--orange); }
.tbl.items input { width: 100%; min-height: 30px; padding: 4px 6px; }
.tbl.items td { padding: 4px; }
.tbl.vat th { background: transparent; color: var(--text); font-size: 13px; }
.tbl.vat td, .tbl.vat th { padding: 12px; border-bottom: 1px solid var(--line-2); }
.tbl.vat tr.total th, .tbl.vat tr.total td { border-top: 2px solid var(--text); font-size: 16px; }
.hbar { position: relative; height: 22px; display: flex; align-items: center; min-width: 160px; }
.hbar i { position: absolute; left: 0; top: 3px; bottom: 3px; background: var(--brand-weak); border-radius: 4px; }
.hbar b { position: relative; padding-left: 6px; font-variant-numeric: tabular-nums; }

/* 칸반 */
.quick-add { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.quick-add input[name=title] { flex: 1; min-width: 240px; height: 40px; font-size: 15px; }
.quick-add select, .quick-add input, .quick-add .btn { height: 40px; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; min-height: 200px; transition: background .15s; }
.col.over { background: var(--brand-weak); border-color: var(--brand); }
.col > header { display: flex; justify-content: space-between; padding: 12px 14px 8px; }
.col > header span { background: var(--gray-weak); color: var(--muted); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.col-body { padding: 4px 10px 12px; display: grid; gap: 8px; }
.col-empty { font-size: 12px; color: var(--faint); text-align: center; padding: 24px 8px; border: 1px dashed var(--line); border-radius: 8px; }
.task { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: grab; box-shadow: var(--shadow); display: grid; gap: 6px; transition: transform .1s, box-shadow .1s; }
.task:hover { border-color: var(--faint); }
.task.drag { opacity: .4; }
.task.running { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-weak); }
.task-top { display: flex; gap: 4px; flex-wrap: wrap; } .task-top:empty { display: none; }
.task-title { font-weight: 600; line-height: 1.4; word-break: break-word; }
.task-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.timer-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; height: 26px; min-width: 26px; padding: 0 8px; cursor: pointer; color: var(--green); font-weight: 700; font-size: 11px; }
.timer-btn:hover { background: var(--green-weak); border-color: var(--green); }
.timer-btn.on { background: var(--red-weak); color: var(--red); border-color: var(--red); font-variant-numeric: tabular-nums; }
.progress { height: 5px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.progress.warn i { background: var(--red); }
.task-detail .kv { margin-bottom: 14px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.kv > div { display: grid; gap: 3px; } .kv small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.slider { display: flex; align-items: center; gap: 10px; margin: 14px 0; font-weight: 600; }
.slider input { flex: 1; padding: 0; border: 0; box-shadow: none; }
.comments { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px; }
.comments li { background: var(--panel-2); border-radius: 8px; padding: 8px 12px; }
.time-log { padding-left: 18px; margin: 0; }

/* 업무보고 */
.report .report-meta { display: flex; gap: 24px; padding: 10px 14px; background: var(--panel-2); border-radius: 8px; margin-bottom: 14px; }
.report .report-meta div { display: grid; gap: 2px; } .report .report-meta small { color: var(--muted); font-size: 11.5px; }
.report-form { display: grid; gap: 14px; }
.rf { display: grid; gap: 6px; } .rf > span { font-weight: 700; font-size: 13px; }
.report.compact { padding: 14px 16px; }
.report.compact .grid-2 { gap: 12px; }

/* 통장 · 카드 */
.accounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.acct { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 3px; cursor: pointer; box-shadow: var(--shadow); text-align: left; }
.acct.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); }
.acct.add { place-items: center; color: var(--muted); border-style: dashed; font-weight: 600; background: transparent; min-height: 110px; }
.big-num { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 4px 0 2px; } .big-num small { font-size: 13px; color: var(--muted); margin-left: 2px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ccard { background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.ccard.dim { opacity: .55; }
.ccard.overdue { border-color: var(--red); }
.ccard-face { background: linear-gradient(135deg, #24345c, #3b5bb5); color: #fff; padding: 16px 18px; display: grid; gap: 14px; }
.ccard-face .badge { background: rgba(255, 255, 255, .2); color: #fff; }
.ccard-no { font-family: ui-monospace, Consolas, monospace; font-size: 17px; letter-spacing: .08em; }
.ccard-info { padding: 14px 18px; display: grid; gap: 6px; flex: 1; }
.ccard-actions { display: flex; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }

/* 차트 */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 180px; overflow-x: auto; }
.day { flex: 1; min-width: 14px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; cursor: pointer; }
.day:hover .pair { background: var(--panel-2); }
.pair { display: flex; gap: 1px; align-items: flex-end; height: calc(100% - 18px); width: 100%; justify-content: center; border-radius: 4px; }
.pair i { width: 45%; max-width: 12px; border-radius: 3px 3px 0 0; min-height: 0; }
.day small { font-size: 10px; color: var(--muted); height: 14px; white-space: nowrap; }
.card-c { background: var(--brand); } .out-c { background: var(--orange); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 2px 0 8px; vertical-align: middle; }
.aging { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.aging div { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; display: grid; } .aging small { color: var(--muted); font-size: 11px; }
.aging .red b { color: var(--red); }

/* 설정 */
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 0 16px; align-items: start; }
.settings .card.wide { grid-column: 1 / -1; }
.copy-row { display: flex; gap: 6px; margin: 8px 0; } .copy-row input { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.steps { padding-left: 20px; line-height: 1.8; margin: 8px 0; }

/* 폼 · 모달 */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 14px; }
.field { display: grid; gap: 5px; align-content: start; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field[hidden] { display: none; }
.field > label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.field input, .field select { width: 100%; }
.req { color: var(--red); margin-left: 2px; }
.hint { color: var(--faint); font-size: 11.5px; }
.totals { font-size: 13px; } .totals b { font-variant-numeric: tabular-nums; } .totals .big { font-size: 17px; color: var(--brand); }
.modal-wrap { position: fixed; inset: 0; background: rgba(10, 14, 25, .45); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel); border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .15s; }
.modal.wide { width: min(960px, 100%); }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-2); gap: 12px; }
.modal > header h3 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal > footer { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
#toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: #1b2333; color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 500; line-height: 1.5; border-left: 4px solid var(--green); animation: pop .2s; transition: opacity .4s, transform .4s; }
.toast.err { border-left-color: #ff6b6b; } .toast.warn { border-left-color: #f0a04b; } .toast.info { border-left-color: #6a8cff; }
.toast.out { opacity: 0; transform: translateX(20px); }

/* 세금계산서 양식 */
.ti { border: 2px solid #d14b4b; padding: 14px; background: #fff; color: #222; border-radius: 4px; }
.ti h2 { text-align: center; color: #c33; font-size: 20px; margin-bottom: 12px; } .ti h2 small { font-size: 13px; }
.ti table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 8px; }
.ti th, .ti td { border: 1px solid #e0a0a0; padding: 5px 7px; }
.ti th { background: #fff4f4; color: #b33; font-weight: 600; white-space: nowrap; }
.ti-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ti-party.buy th { background: #f3f6ff; color: #3355aa; } .ti-party.buy th, .ti-party.buy td { border-color: #a9b9e0; }
.ti .vt { writing-mode: vertical-rl; width: 26px; letter-spacing: .3em; }
.ti-foot { text-align: right; margin: 4px 0 0; font-weight: 600; }
.print-body { background: #fff; padding: 24px; }
@media print { .print-body { padding: 0; } .ti { border-width: 1.5px; } }

/* 반응형 */
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(4, 260px); } }
@media (max-width: 900px) {
  .side { position: fixed; z-index: 50; left: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .menu-btn { display: inline-block; }
  .grid-2, .settings { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .top { padding: 0 16px; }
  .timer-pill a { max-width: 90px; }
  .ti-parties { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .toolbar input[type=search] { min-width: 0; flex: 1; }
  .live span { display: none; }
  .aging { grid-template-columns: repeat(2, 1fr); }
  .kpi b { font-size: 19px; }
}

/* OTP 로그인 · 앱(PWA) */
.otp { font-size: 30px; letter-spacing: 14px; text-align: center; font-weight: 800; height: 60px; font-variant-numeric: tabular-nums; }
.login-card .intro { margin: 0; }
@supports (padding: env(safe-area-inset-top)) {
  .top { padding-top: env(safe-area-inset-top); height: calc(58px + env(safe-area-inset-top)); }
  .content { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .side { padding-top: env(safe-area-inset-top); }
}
@media (display-mode: standalone) { body { overscroll-behavior-y: none; } }
.sync-line { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.sync-dot.ok { background: var(--green); } .sync-dot.fail { background: var(--red); }
.code-block { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; white-space: pre; overflow-x: auto; }

[hidden] { display: none !important; }

/* ───── 알림 · 배지 ───── */
.bell { position: relative; font-size: 17px; }
.bell b { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10px; line-height: 16px; font-style: normal; }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.nav-badge:empty { display: none; }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.notif-list li { padding: 10px 12px; border-radius: 8px; background: var(--panel-2); cursor: pointer; display: grid; gap: 2px; }
.notif-list li.unread { background: var(--brand-weak); }
.center { text-align: center; }

/* ───── 하단 탭바 (휴대폰) ───── */
.tabbar { display: none; }
@media (max-width: 900px) {
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--panel); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; font-size: 11px; color: var(--muted); position: relative; font-weight: 600; }
  .tabbar a i { font-style: normal; font-size: 19px; line-height: 1.1; }
  .tabbar a.active { color: var(--brand); }
  .tabbar .nav-badge { position: absolute; top: 2px; left: 55%; margin: 0; }
  .content { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .top h1 { font-size: 16px; }
  .live { display: none; }
}

/* ───── 카드 정리 (휴대폰 우선) ───── */
.label-page { max-width: 640px; margin: 0 auto; display: grid; gap: 12px; }
.label-head { background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: 16px; display: grid; gap: 4px; box-shadow: var(--shadow); }
.label-head .big { font-size: 24px; color: var(--red); }
.done-all { display: grid; place-items: center; gap: 6px; padding: 18px 0; text-align: center; }
.done-emoji { font-size: 44px; }
.recent { display: grid; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); min-height: 38px; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-select { border-radius: 99px; min-height: 38px; font-size: 13px; max-width: 150px; }
.label-list { display: grid; gap: 10px; }
.lbl { background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: opacity .25s, transform .25s; scroll-margin-top: 70px; }
.lbl.saved { opacity: 0; transform: translateX(40px); }
.lbl.editing { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); }
.lbl-head { display: flex; gap: 10px; align-items: center; padding: 14px 16px; cursor: pointer; }
.lbl-head .grow { display: grid; gap: 2px; min-width: 0; }
.lbl-head .grow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.lbl-amt { font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; } .lbl-amt small { font-size: 12px; color: var(--muted); }
.lbl-body { display: none; padding: 0 16px 16px; gap: 10px; }
.lbl.editing .lbl-body { display: grid; }
.lbl-body input, .lbl-body select:not(.chip-select) { width: 100%; min-height: 44px; font-size: 16px; } /* 16px: iOS 확대 방지 */
.lbl-body .btn.block { height: 46px; font-size: 15px; }
.reject { background: var(--red-weak); color: var(--red); font-size: 13px; font-weight: 600; padding: 8px 16px; }

/* ───── 업무 보드 보강 ───── */
.field > label { white-space: pre-line; }
.tag.star { background: #fff5d6; color: #a46a00; }
@media (prefers-color-scheme: dark) { .tag.star { background: #3a2f12; color: #f3c25a; } }
.kanban { grid-template-columns: repeat(4, minmax(230px, 1fr)) minmax(180px, .7fr); }
.col-hold { opacity: .85; }
.task.in-approval { border-color: var(--purple); }
.appr-line { color: var(--purple); font-weight: 600; }
.purple-t { color: var(--purple); font-weight: 600; }
.progress-row { display: flex; align-items: center; gap: 8px; }
.progress-row .progress { flex: 1; }
.progress-row small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress.lg { height: 10px; margin-bottom: 12px; }
.chips label.chip { user-select: none; }

/* ───── 업무창 ───── */
.td { display: grid; gap: 14px; max-width: 1200px; }
.back { font-size: 13px; font-weight: 600; }
.td-head { display: grid; gap: 8px; }
.td-head h2 { font-size: 22px; line-height: 1.35; word-break: break-word; }
.td-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.stages { list-style: none; padding: 0; margin: 4px 0 0; display: flex; gap: 0; max-width: 560px; }
.stages li { flex: 1; text-align: center; font-size: 12px; font-weight: 700; color: var(--faint); padding: 8px 4px; background: var(--panel-2); border: 1px solid var(--line-2); position: relative; }
.stages li:first-child { border-radius: 8px 0 0 8px; } .stages li:last-child { border-radius: 0 8px 8px 0; }
.stages li.done { color: var(--green); background: var(--green-weak); }
.stages li.now { color: #fff; background: var(--brand); border-color: var(--brand); }
.my-turn { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-color: var(--purple); background: var(--purple-weak); }
.td-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.td-side .card { margin-bottom: 14px; }
.big-pct { font-size: 22px; color: var(--brand); font-variant-numeric: tabular-nums; }
.steps-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; }
.steps-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--panel-2); }
.steps-list li .check { flex: 1; font-size: 14px; white-space: normal; }
.steps-list li .check input { width: 18px; height: 18px; }
.steps-list li.done .check span { text-decoration: line-through; color: var(--muted); }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.people li { display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 6px; font-size: 13px; }
.people li > small { color: var(--muted); font-weight: 600; }
.person { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.people-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.block { width: 100%; }
.timer-on { border-color: var(--red); color: var(--red); background: var(--red-weak); font-variant-numeric: tabular-nums; }
.timeline { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.timeline li { display: grid; grid-template-columns: 12px 1fr; gap: 10px; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin-top: 5px; }
.tl-comment .tl-dot { background: var(--brand); }
.tl-approve .tl-dot, .tl-complete .tl-dot { background: var(--green); }
.tl-reject .tl-dot { background: var(--red); }
.tl-submit .tl-dot { background: var(--purple); }

/* ───── 결재라인 ───── */
.aline { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.aline li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 13px; }
.aline li.ceo { background: var(--purple-weak); border-color: transparent; }
.aline-no { width: 20px; height: 20px; border-radius: 50%; background: var(--gray-weak); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); flex: none; }
.aline-add { width: 100%; }
.aline-view { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.aline-arrow { color: var(--faint); }
.astep { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); font-size: 12px; background: var(--panel); }
.astep div { display: grid; } .astep small { color: var(--muted); font-size: 11px; } .astep i { font-style: normal; }
.astep.ok { background: var(--green-weak); border-color: transparent; } .astep.ok i { color: var(--green); }
.astep.no { background: var(--red-weak); border-color: transparent; } .astep.no i { color: var(--red); }
.astep.cur { border-color: var(--purple); box-shadow: 0 0 0 2px var(--purple-weak); }

/* ───── 홈 ───── */
.home-qa { max-width: 560px; flex: 1; }
.home-qa input[name=title] { min-width: 180px; }
.home-kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kpi.accent { border-color: var(--brand); background: var(--brand-weak); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash-sec { padding: 14px 16px; }
.dash-sec > header { margin-bottom: 8px; }
.dash-sec .count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 99px; background: var(--gray-weak); color: var(--muted); font-size: 12px; text-align: center; margin-left: 4px; }
.sec-today { border-top: 3px solid var(--brand); }
.sec-alert { border-top: 3px solid var(--purple); }
.dash-sec.compact .trow { padding: 7px 4px; }
.tlist { list-style: none; padding: 0; margin: 0; }
.tlist.done .trow b { color: var(--muted); text-decoration: line-through; font-weight: 500; }
.trow { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: var(--panel-2); }
.trow.running { background: var(--green-weak); border-radius: 8px; }
.trow-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.trow-title b { font-weight: 600; word-break: break-word; }
.trow-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.mini-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.mini-kpis a { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; display: grid; color: var(--text); }
.mini-kpis small { color: var(--muted); font-size: 11px; } .mini-kpis b { font-variant-numeric: tabular-nums; }

@media (max-width: 1000px) { .td-grid, .home-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .kanban { grid-template-columns: repeat(5, 250px); } .home-qa { max-width: none; } }

/* ───── 일정 · 활동 · 질문 ───── */
.more summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--brand); padding: 6px 0; }
.more[open] summary { margin-bottom: 10px; }
.row.wrap { flex-wrap: wrap; }
.act-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.team-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.tcard { flex: none; display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line-2); background: var(--panel); border-radius: 10px; cursor: pointer; min-width: 150px; color: var(--text); }
.tcard.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); }
.tcard small { color: var(--muted); font-size: 11px; }
.sched-form { display: grid; gap: 8px; padding: 12px; background: var(--panel-2); border-radius: 10px; margin-bottom: 14px; }
.sched-form input[type=time] { width: 110px; }
.sched-form .place { width: 160px; }
.sched-form .chip { padding: 5px 10px; min-height: 30px; font-size: 12px; }
.tl { list-style: none; padding: 0; margin: 0; }
.tl-item { display: grid; grid-template-columns: 74px 28px 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.tl-item:last-child { border-bottom: 0; }
.tl-time { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.tl-ico { font-size: 17px; text-align: center; }
.tl-body { display: grid; gap: 4px; min-width: 0; }
.tl-body .amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-schedule .tl-time { color: var(--brand); }
.t-card .amt { color: var(--orange); }
.t-work .tl-time { color: var(--green); }
.tl-actions:empty { display: none; }
.ask-form { display: flex; gap: 6px; } .ask-form input { flex: 1; }
.qa { border-left: 3px solid var(--line); padding: 6px 10px; margin: 4px 0; background: var(--panel-2); border-radius: 0 8px 8px 0; display: grid; gap: 4px; }
.qa.open { border-left-color: var(--purple); background: var(--purple-weak); }
.qa .ans { color: var(--green); }
.qa.flash { animation: flash 1.6s 2; }
@keyframes flash { 50% { box-shadow: 0 0 0 4px var(--purple-weak); } }
.answer-form input { min-height: 32px; }
.sched-time { font-weight: 700; color: var(--brand); font-size: 13px; min-width: 42px; font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) { .act-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .tl-item { grid-template-columns: 52px 22px 1fr; } .sched-form .place { width: 100%; } }

.g { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; background: #4285f4; color: #fff; font-size: 10px; font-weight: 800; vertical-align: 1px; }
.gcal-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--panel-2); border-radius: 8px; margin-bottom: 10px; }
.sched-more { margin-bottom: 12px; } .sched-more summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--brand); padding: 4px 0 8px; }

/* ───── 메일 · 소통 요약 ───── */
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mail-grid, .comms-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 14px; align-items: start; }
.mail-list, .comms-list { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); max-height: calc(100vh - 190px); overflow-y: auto; }
.mail-list li, .comms-list li { padding: 11px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; display: grid; gap: 3px; }
.mail-list li:hover, .comms-list li:hover { background: var(--panel-2); }
.mail-list li.on, .comms-list li.on { background: var(--brand-weak); }
.mail-list li.need { border-left: 3px solid var(--red); }
.mail-read, .comms-detail { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px; min-height: 300px; display: grid; gap: 10px; align-content: start; }
.comms-detail { background: transparent; border: 0; padding: 0; }
.comms-detail .card { margin-bottom: 0; }
.mail-body { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 14px; line-height: 1.65; background: var(--panel-2); padding: 14px; border-radius: 8px; margin: 0; max-height: 60vh; overflow: auto; }
.mail-actions select { max-width: 220px; }
.thread { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 13px; }
.thread li { padding: 6px 8px; border-radius: 6px; cursor: pointer; } .thread li.on { background: var(--brand-weak); }
.back-btn { display: none; justify-self: start; }
.compose { display: grid; gap: 8px; }
.compose .lbl-s, .lbl-s { width: 70px; font-size: 12px; font-weight: 700; color: var(--muted); flex: none; }
.compose textarea { font-size: 14px; line-height: 1.6; }
.sum-lines { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }
.ai-card { border-color: var(--purple); }
.ai-text { font-size: 14px; line-height: 1.7; }
.ai-sched { margin-bottom: 10px; } .ai-sched input { min-height: 38px; }
.t-mail .tl-time { color: var(--purple); }
.tl-item.click { cursor: pointer; } .tl-item.click:hover { background: var(--panel-2); }
@media (max-width: 900px) {
  .mail-grid, .comms-grid { grid-template-columns: 1fr; }
  .mail-grid.reading .mail-list, .comms-grid.reading .comms-list { display: none; }
  .mail-grid:not(.reading) .mail-read, .comms-grid:not(.reading) .comms-detail { display: none; }
  .back-btn { display: inline-flex; }
}

/* ───── 관리자 페이지 · 처음 설정 ───── */
.admin-tabs .seg a.segbtn { padding: 6px 14px; border-radius: 6px; font-weight: 600; color: var(--muted); }
.admin-tabs .seg a.segbtn.on { background: var(--brand); color: #fff; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checks li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); }
.checks li.bad { background: var(--red-weak); }
.checks .ck { font-size: 18px; width: 24px; text-align: center; }
.setup { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1200px 600px at 20% 0%, var(--brand-weak), transparent), var(--bg); }
.setup-card { width: min(560px, 100%); background: var(--panel); padding: 28px; border-radius: 16px; box-shadow: var(--shadow-lg); display: grid; gap: 14px; }
.setup-steps { display: flex; gap: 6px; } .setup-steps span { flex: 1; height: 4px; border-radius: 99px; background: var(--line); } .setup-steps span.on { background: var(--brand); }
.fld { display: grid; gap: 5px; font-size: 13px; font-weight: 700; color: var(--muted); }
.fld input { font-weight: 400; color: var(--text); min-height: 40px; }

/* ───── 업무 유형 · 조직 ───── */
.type-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.type-tabs button[data-t] { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 7px 14px; font-weight: 700; cursor: pointer; color: var(--text); }
.type-tabs button[data-t].on { background: var(--tc, var(--brand)); border-color: var(--tc, var(--brand)); color: #fff; }
.ttype { font-size: 11px; font-weight: 700; color: var(--tc, var(--muted)); }
.ttype.big { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--tc) 14%, transparent); }
.task { border-left: 3px solid var(--tc, var(--line)); }
.tfields { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.tfields small { color: var(--muted); }
.col-sum { padding: 0 14px 6px; font-size: 12px; font-weight: 700; color: var(--green); }
.kanban.pipeline { grid-template-columns: repeat(6, minmax(200px, 1fr)); }
.tview { display: grid; gap: 12px; }
.tgroup .tlist .trow { gap: 12px; }
.tdate { min-width: 52px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--brand); }
.type-pick .chip { font-size: 13px; }
.type-box { border: 1px solid var(--line); border-left: 3px solid var(--tc); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; background: var(--panel-2); }
.split-box .sub-row, .sub-row { margin-bottom: 6px; } .sub-row select, .sub-row input[type=date] { max-width: 150px; }
.matrix td.has { background: var(--brand-weak); font-weight: 700; } .star-t { color: #d4a000; margin-right: 3px; }
.type-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tchip { padding: 7px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-2); border-left: 4px solid var(--tc); color: var(--text); font-size: 13px; }
.team-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.tcard2 { display: grid; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border-left: 4px solid var(--tc); color: var(--text); }
.tcard2:hover { background: var(--brand-weak); }
.wide-sec { margin-bottom: 16px; }
.team li.click { cursor: pointer; } .team li.click:hover { background: var(--panel-2); }
.chip.xs { padding: 4px 9px; min-height: 26px; font-size: 12px; }
.team-edit-list { display: grid; gap: 10px; }
.team-edit { padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border-left: 4px solid var(--tc); }
.team-edit .tname { font-weight: 700; width: 180px; }
.type-edit { border: 1px solid var(--line-2); border-left: 4px solid var(--tc); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.type-edit[data-off] { opacity: .6; }
.type-edit summary { cursor: pointer; }
.frows { display: grid; gap: 6px; } .frow .f-label { width: 160px; }
.type-info .people li { grid-template-columns: 90px 1fr; }

/* ───── 업무 보드 정리 ───── */
.board-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.board-bar .quick-add { flex: 1; min-width: 240px; }
.board-bar .quick-add input { width: 100%; height: 40px; }
.board-bar select, .board-bar input[type=search] { height: 40px; }
.board-bar input[type=search] { width: 160px; min-width: 0; }
.kanban { grid-template-columns: repeat(4, minmax(220px, 1fr)); }
.task { gap: 4px; padding: 10px 12px; }
.task-title { font-weight: 600; line-height: 1.4; display: flex; gap: 4px; align-items: baseline; flex-wrap: wrap; }
.task-sub { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; color: var(--muted); min-width: 0; }
.task-sub .ell { max-width: 140px; }
.task-foot { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.task.held { opacity: .7; }
.urgent { font-size: 10px; font-weight: 800; color: #fff; background: var(--red); border-radius: 4px; padding: 0 4px; }
.progress.thin { height: 3px; }
.proj-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.proj-chip { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-2); border-left: 4px solid var(--tc); color: var(--text); max-width: 340px; }
.proj-chip b { max-width: 160px; }
.pc-bar { width: 60px; height: 5px; border-radius: 99px; background: var(--line-2); overflow: hidden; flex: none; } .pc-bar i { display: block; height: 100%; background: var(--tc); }
.proj-chip small { color: var(--muted); white-space: nowrap; }
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(4, 240px); } }
@media (max-width: 900px) { .kanban { grid-template-columns: repeat(4, 250px); } .board-bar input[type=search] { flex: 1; } }

/* ───── 내 할 일 (목록형) ───── */
.todo-page { max-width: 860px; }
.todo-add { display: flex; gap: 8px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); }
.todo-add input { flex: 1; min-width: 200px; height: 44px; font-size: 16px; border: 0; outline: none; background: transparent; }
.todo-add:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); } /* 안쪽 입력칸은 테두리가 없어 바깥 상자에 포커스 표시 */
.todo-add select { height: 44px; max-width: 220px; }
.todo-sec { margin-top: 18px; }
.todo-sec h4, .todo-sec > summary { font-size: 13px; color: var(--muted); margin: 0 0 6px; font-weight: 700; cursor: default; }
.todo-sec > summary { cursor: pointer; list-style: revert; }
.todo-list { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.todo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.todo:first-child { border-top: 0; }
.todo:hover { background: var(--panel-2); }
.todo.done b { color: var(--muted); text-decoration: line-through; font-weight: 500; }
.todo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.todo-main > b { font-weight: 600; }
.todo-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.todo-sub:empty { display: none; }
.todo-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--faint); }
.todo-dot.s-진행 { border-color: var(--blue); background: var(--blue); }
.todo-dot.s-결재중 { border-color: var(--purple); background: var(--purple-weak); }
.todo-dot.s-완료 { border-color: var(--green); background: var(--green); }
.todo-dot.s-보류 { border-color: var(--orange); }
.todo .btn { flex: none; }
.todo-check { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--faint); background: none; padding: 0; cursor: pointer; display: grid; place-items: center; color: transparent; font-size: 12px; line-height: 1; }
.todo-check::after { content: '✓'; }
.todo-check:hover, .todo-check:focus-visible { border-color: var(--green); background: var(--green-weak); color: var(--green); }
.todo-lock { flex: none; width: 20px; text-align: center; font-size: 13px; }
.todo.doing { box-shadow: inset 3px 0 0 var(--blue); }
.todo-now { color: var(--blue); font-weight: 600; }
.todo-star { flex: none; color: var(--faint); }
.todo-star.on { color: #d4a000; }
.todo-sec.over h4 { color: var(--red); }
.todo-ai { display: block; margin-top: 12px; padding: 10px 14px; border-radius: var(--radius); background: var(--brand-weak); color: var(--brand-ink); text-decoration: none; }
.todo-none { margin-top: 16px; }
.td-finish { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.field label.tf-appr { display: flex; align-items: center; justify-content: flex-start; gap: 6px; white-space: nowrap; }
.field label.tf-appr input { width: auto; min-height: 0; flex: none; margin: 0; }
.field label.tf-appr b { flex: none; }
.urgent { font-size: 10px; font-weight: 800; color: #fff; background: var(--red); border-radius: 4px; padding: 1px 5px; vertical-align: 2px; }
.progress.thin { height: 3px; max-width: 240px; }

/* ───── 프로젝트 ───── */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.proj-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--tc, var(--brand)); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); }
.proj-card:hover { border-color: var(--tc, var(--brand)); }
.proj-card h3 { margin: 0; font-size: 16px; }
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mini-list li { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.mini-list .ell { min-width: 0; flex: 1; }
.mb { margin-bottom: 12px; }

/* ───── 보고서 ───── */
.report-card { border-left: 4px solid var(--brand); }
.collect { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.suggest { background: var(--orange-weak); border-radius: 8px; padding: 8px 10px; }
.link-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.link-row { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.link-row .grow { min-width: 0; }
.link-row.제외 { opacity: .5; }
.rep-form { display: flex; flex-direction: column; gap: 10px; }
.rep-f { display: flex; flex-direction: column; gap: 4px; }
.rep-f > small { color: var(--muted); font-weight: 700; }
.rep-f textarea, .rep-f input { width: 100%; }
@media (max-width: 640px) { .todo-add select { max-width: none; flex: 1; } .todo { padding: 12px 10px; } }

/* ═════════════ 달력 (구글 캘린더형 레이아웃) ═════════════ */
.gc { --gc-line: var(--line-2); --gc-today: var(--brand); display: grid; grid-template-columns: 248px 1fr; gap: 16px; height: calc(100dvh - 58px - 40px); min-height: 520px; }
.gc [hidden] { display: none !important; }
.gc-side { display: flex; flex-direction: column; gap: 18px; overflow-y: auto; padding-right: 4px; }
.gc-create { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px 0 16px; border-radius: 16px; border: 0; background: var(--panel); box-shadow: 0 1px 3px rgba(16,24,40,.15), 0 4px 10px rgba(16,24,40,.08); font-size: 15px; font-weight: 700; color: var(--text); cursor: pointer; transition: box-shadow .15s, background .15s; }
.gc-create:hover { box-shadow: 0 2px 6px rgba(16,24,40,.2), 0 8px 18px rgba(16,24,40,.1); background: var(--panel-2); }
.gc-create span { font-size: 26px; color: var(--brand); line-height: 1; margin-top: -2px; }
.gc-mini-h { display: flex; align-items: center; padding: 0 4px 6px; font-size: 14px; }
.gc-mini-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; text-align: center; }
.gc-mini-g .dw { font-size: 10.5px; color: var(--muted); padding: 4px 0; font-weight: 600; }
.gc-mini-g button { aspect-ratio: 1; border: 0; background: transparent; border-radius: 50%; font-size: 11.5px; cursor: pointer; color: var(--text); padding: 0; min-height: 0; }
.gc-mini-g button:hover { background: var(--panel-2); }
.gc-mini-g button.out { color: var(--faint); }
.gc-mini-g button.rng { background: var(--brand-weak); border-radius: 0; }
.gc-mini-g button.sel { background: var(--brand-weak); color: var(--brand-ink); font-weight: 700; border-radius: 50%; }
.gc-mini-g button.today { background: var(--gc-today); color: #fff; font-weight: 700; border-radius: 50%; }
.gc-cals-h { font-size: 13px; font-weight: 700; padding: 0 4px 6px; }
.gc-cal { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.gc-cal:hover { background: var(--panel-2); }
.gc-cal input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--c); margin: 0; cursor: pointer; display: grid; place-items: center; min-height: 0; padding: 0; }
.gc-cal input:checked { background: var(--c); }
.gc-cal input:checked::after { content: "\2713"; color: #fff; font-size: 12px; font-weight: 800; line-height: 1; }
.gc-help { margin-top: auto; line-height: 1.6; }

.gc-main { display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.gc-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--gc-line); }
.gc-bar #gc-today { border-radius: 99px; padding: 0 18px; }
.gc-bar .icon-btn { width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; }
.gc-title { font-size: 20px; font-weight: 600; margin: 0 0 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-views { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.gc-views button { border: 0; background: transparent; padding: 7px 16px; font-weight: 600; font-size: 13px; color: var(--text); cursor: pointer; }
.gc-views button + button { border-left: 1px solid var(--line); }
.gc-views button.on { background: var(--brand-weak); color: var(--brand-ink); }
.gc-create-m { display: none; }
.gc-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* 일정 칩 공통 */
.gc-ev { position: absolute; display: block; text-align: left; border: 0; cursor: pointer; font: inherit; font-size: 12px; line-height: 20px; height: 20px; min-height: 0; padding: 0 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); background: transparent; }
.gc-ev.bar { background: var(--c); color: #fff; font-weight: 600; }
.gc-ev.bar.cl { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.gc-ev.bar.cr { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.gc-ev.dot i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 4px; vertical-align: 0; }
.gc-ev.dot .t { color: var(--muted); }
.gc-ev.dot:hover, .gc-more:hover { background: var(--panel-2); }
.gc-ev.bar:hover, .gc-ev.blk:hover { filter: brightness(1.07); box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.gc-ev.static { position: static; width: 100%; margin-bottom: 2px; }
.gc-more { position: absolute; border: 0; background: transparent; text-align: left; font-size: 12px; font-weight: 700; padding: 0 6px; height: 20px; min-height: 0; border-radius: 4px; color: var(--text); cursor: pointer; }

/* 월 보기 */
.gc-month { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.gc-mhead { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--gc-line); }
.gc-mhead div { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px 0 4px; }
.gc-mhead .sun, .gc-dnum.sun { color: #d93a3a; }
.gc-mhead .sat, .gc-dnum.sat { color: #3f6fe0; }
.gc-weeks { flex: 1; display: grid; grid-template-rows: repeat(6, 1fr); min-height: 0; }
.gc-week { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--gc-line); min-height: 0; overflow: hidden; }
.gc-week:last-child { border-bottom: 0; }
.gc-cell { border-right: 1px solid var(--gc-line); cursor: pointer; text-align: center; padding-top: 4px; }
.gc-cell:last-child { border-right: 0; }
.gc-cell.out { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.gc-cell.out .gc-dnum { color: var(--faint); }
.gc-dnum { border: 0; background: transparent; min-width: 24px; height: 24px; min-height: 0; padding: 0 6px; border-radius: 99px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text); }
.gc-dnum:hover { background: var(--panel-2); }
.gc-cell.today .gc-dnum { background: var(--gc-today); color: #fff; }

/* 주 · 일 보기 */
.gc-tg { flex: 1; display: flex; flex-direction: column; min-height: 0; --gut: 64px; }
.gc-tg-head, .gc-allday { display: grid; grid-template-columns: var(--gut) 1fr; }
.gc-tg-head { grid-template-columns: var(--gut) repeat(var(--n), 1fr); }
.gc-gutter { display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 8px 4px 0; font-size: 10px; }
.gc-dh { text-align: center; padding: 8px 0 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.gc-dh span { font-size: 11px; font-weight: 700; color: var(--muted); }
.gc-dh button { border: 0; background: transparent; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; font-weight: 500; cursor: pointer; color: var(--text); padding: 0; }
.gc-dh button:hover { background: var(--panel-2); }
.gc-dh.sun span { color: #d93a3a; }
.gc-dh.sat span { color: #3f6fe0; }
.gc-dh.today span { color: var(--gc-today); }
.gc-dh.today button { background: var(--gc-today); color: #fff; }
.gc-allday { border-bottom: 1px solid var(--line); min-height: 28px; max-height: 120px; overflow-y: auto; }
.gc-allday .gc-gutter { align-items: center; }
.gc-allday-g { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); }
.gc-ad-cell { border-left: 1px solid var(--gc-line); cursor: pointer; }
.gc-scroll { flex: 1; overflow-y: auto; min-height: 0; scrollbar-gutter: stable; }
.gc-tg-head, .gc-allday { scrollbar-gutter: stable; overflow-y: hidden; }
.gc-allday { overflow-y: auto; }
.gc-grid { position: relative; display: grid; grid-template-columns: var(--gut) 1fr; }
.gc-hours { position: relative; }
.gc-hours div { position: absolute; right: 8px; transform: translateY(-50%); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.gc-cols { display: grid; grid-template-columns: repeat(var(--n), 1fr); background-image: repeating-linear-gradient(to bottom, var(--gc-line) 0 1px, transparent 1px 48px); }
.gc-col { position: relative; border-left: 1px solid var(--gc-line); cursor: cell; user-select: none; }
.gc-col.today { background: color-mix(in srgb, var(--brand-weak) 35%, transparent); }
.gc-ev.blk { height: auto; line-height: 1.3; padding: 3px 6px; white-space: normal; background: var(--c); color: #fff; border-radius: 6px; border: 1px solid var(--panel); display: flex; flex-direction: column; overflow: hidden; }
.gc-ev.blk b { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-ev.blk span { font-size: 11px; opacity: .92; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-ev.blk.short { flex-direction: row; gap: 6px; align-items: center; padding-top: 0; padding-bottom: 0; }
.gc-now { position: absolute; left: -1px; right: 0; height: 2px; background: #ea4335; z-index: 30; pointer-events: none; }
.gc-now::before { content: ""; position: absolute; left: -6px; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: #ea4335; }
.gc-ghost { position: absolute; left: 1px; right: 4px; background: var(--brand); color: #fff; opacity: .85; border-radius: 6px; font-size: 11px; font-weight: 700; padding: 3px 6px; z-index: 40; pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,.2); }

/* 목록 보기 */
.gc-list { overflow-y: auto; padding: 4px 0; }
.gc-lday { display: grid; grid-template-columns: 120px 1fr; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--gc-line); }
.gc-ldate { border: 0; background: transparent; display: flex; align-items: center; gap: 8px; align-self: start; cursor: pointer; color: var(--text); padding: 4px 0; text-align: left; }
.gc-ldate b { font-size: 22px; font-weight: 500; min-width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.gc-ldate span { font-size: 11px; font-weight: 700; color: var(--muted); }
.gc-lday.today .gc-ldate b { background: var(--gc-today); color: #fff; }
.gc-litems { display: flex; flex-direction: column; }
.gc-litem { border: 0; background: transparent; display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text); font: inherit; font-size: 13.5px; }
.gc-litem:hover { background: var(--panel-2); }
.gc-litem i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.gc-litem .tm { width: 150px; flex: none; color: var(--muted); font-size: 12.5px; }

/* 팝업 */
.gc-pop { position: fixed; z-index: 90; width: 360px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow-y: auto; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px 18px 18px; border: 1px solid var(--line); }
.gc-pop-bar { display: flex; justify-content: flex-end; gap: 2px; margin-right: -8px; }
.gc-pop-bar .icon-btn { display: inline-grid; place-items: center; text-decoration: none; }
.gc-pop-t { display: flex; gap: 14px; margin: 2px 0 12px; }
.gc-pop-t i { width: 14px; height: 14px; border-radius: 4px; background: var(--c); margin-top: 6px; flex: none; }
.gc-pop-t h3 { font-size: 19px; font-weight: 600; margin: 0 0 4px; line-height: 1.35; word-break: break-all; }
.gc-pop-r { display: flex; gap: 14px; font-size: 13.5px; padding: 5px 0; }
.gc-pop-r > span { width: 14px; text-align: center; flex: none; color: var(--muted); }
.gc-pop-r .memo { white-space: pre-wrap; word-break: break-all; color: var(--muted); }
.gc-pop-n { margin: 8px 0 0 28px; }
.gc-daypop { width: 240px; text-align: center; }
.gc-daypop-h { display: flex; flex-direction: column; align-items: center; margin-bottom: 8px; }
.gc-daypop-h span { font-size: 11px; font-weight: 700; color: var(--muted); }
.gc-daypop-h button { border: 0; background: transparent; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; cursor: pointer; color: var(--text); padding: 0; }
.gc-daypop-h button:hover { background: var(--panel-2); }

/* 구글 연결 */
.gc-sync { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.gc-sync .gc-cals-h { padding: 0; }
.gc-sdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--green); }
.gc-sdot.bad { background: var(--red); }

/* 만들기 창 */
.gc-form { display: flex; flex-direction: column; gap: 12px; }
.gc-form .gc-f-title { font-size: 20px; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; padding: 6px 2px; background: transparent; }
.gc-form .gc-f-title:focus { outline: none; border-bottom-color: var(--brand); }
.gc-form textarea, .gc-form input[name=place] { width: 100%; }
.gc-form [hidden] { display: none !important; }
.gc-form label select { margin-left: 8px; }
.gc-f-kinds .chip { padding: 5px 12px; min-height: 0; font-size: 12.5px; }

@media (max-width: 1000px) { .gc { grid-template-columns: 1fr; } .gc-side { display: none; }
  .gc-create-m { display: inline-flex; position: fixed; right: 18px; bottom: 24px; z-index: 50; width: 56px; height: 56px; border-radius: 16px; font-size: 28px; padding: 0; box-shadow: 0 4px 14px rgba(16,24,40,.3); } }
@media (max-width: 900px) { .gc-create-m { bottom: calc(80px + env(safe-area-inset-bottom)); } }
@media (max-width: 900px) { .gc { height: calc(100dvh - 58px - 40px - 64px); } }
@media (max-width: 640px) {
  .gc-bar { flex-wrap: wrap; padding: 8px 10px; }
  .gc-title { font-size: 16px; order: 9; width: 100%; margin: 4px 0 0 4px; }
  .gc-views button { padding: 6px 11px; }
  .gc-tg { --gut: 44px; }
  .gc-tg-head .gc-gutter { font-size: 0; }
  .gc-hours div { font-size: 9.5px; right: 4px; }
  .gc-lday { grid-template-columns: 1fr; padding: 8px 10px; }
  .gc-litem .tm { width: 110px; }
  .gc-dh button { width: 36px; height: 36px; font-size: 18px; }
}

/* 메일 연결 (단계 안내) */
.gm-steps { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.gm-step { display: flex; gap: 12px; align-items: flex-start; }
.gm-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; margin-top: 1px; }
.gm-code { width: 100%; font-size: 20px; letter-spacing: 2px; font-family: ui-monospace, Consolas, monospace; height: 48px; text-align: center; }
.gm-done { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--green-weak); }
.gm-ok { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.mt-s { margin-top: 8px; }

.gm-gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 52px; margin-top: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); transition: background .12s, box-shadow .12s; }
.gm-gbtn:hover { background: var(--panel-2); box-shadow: 0 2px 8px rgba(16,24,40,.12); }
.gm-gbtn:disabled { opacity: .6; cursor: wait; }
.gm-glogo { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 15px; color: #fff; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }
.center { text-align: center; }
.gm-admin { display: grid; gap: 10px; padding-left: 20px; margin-top: 10px; }
.gm-admin a { font-weight: 700; }

/* 메일 본문(서식) · 첨부 */
.mail-html { width: 100%; min-height: 120px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; margin-top: 10px; display: block; }
.mail-atts { margin-top: 12px; }
.mail-att-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.mail-att { display: flex; flex-direction: column; gap: 2px; width: 150px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); text-decoration: none; }
.mail-att:hover { border-color: var(--brand); background: var(--panel-2); }
.mail-att img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; background: var(--panel-2); }
.mail-att-ico { height: 90px; display: grid; place-items: center; font-size: 40px; background: var(--panel-2); border-radius: 6px; }
.mail-att-n { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 메일 · AI 연결 페이지: ① 메일 → ② Gemini 순서 */
.settings #gem { order: 1; }

/* 메일 자동 정리: 분류 탭 · 칩 */
.mail-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.mail-tabs::-webkit-scrollbar { display: none; }
.mail-tabs button { flex: none; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 99px; padding: 7px 14px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.mail-tabs button:hover { background: var(--panel-2); }
.mail-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.mail-tabs button b { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px; border-radius: 99px; background: var(--brand-weak); color: var(--brand-ink); font-size: 11px; line-height: 18px; text-align: center; }
.mail-tabs button.on b { background: rgba(255,255,255,.25); color: #fff; }
.mcat { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.mcat-red { background: var(--red-weak); color: var(--red); }
.mcat-orange { background: var(--orange-weak); color: var(--orange); }
.mcat-blue { background: var(--blue-weak); color: var(--blue); }
.mcat-green { background: var(--green-weak); color: var(--green); }
.mcat-gray { background: var(--gray-weak); color: var(--muted); }
.mprio { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 6px; vertical-align: 1px; }
.msum { color: var(--text); opacity: .85; }
.mdue { color: var(--orange); font-weight: 700; }
.mail-list li.dim { opacity: .62; }
.mail-list li.dim:hover, .mail-list li.dim.on { opacity: 1; }

/* ── 명함첩 ── */
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ct-card { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text); box-shadow: var(--shadow); cursor: pointer; font: inherit; min-width: 0; }
.ct-card:hover { border-color: var(--brand); }
.ct-thumb { flex: none; width: 96px; height: 58px; border-radius: 6px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line-2); display: grid; place-items: center; }
.ct-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ct-thumb span { font-size: 22px; font-weight: 700; color: var(--faint); }
.ct-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ct-mail { color: var(--brand-ink); }
.ct-progress { display: flex; gap: 8px; align-items: center; padding: 10px 12px; margin-bottom: 12px; border-radius: var(--radius); background: var(--purple-weak); color: var(--purple); }
.ct-progress .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ct-spin .8s linear infinite; }
@keyframes ct-spin { to { transform: rotate(360deg); } }
.ct-detail { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 18px; }
.ct-imgs { display: flex; flex-direction: column; gap: 6px; }
.ct-imgs img, .ct-edit-img { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }
.ct-big { font-size: 18px; }
.ct-rows { margin: 10px 0; display: flex; flex-direction: column; gap: 4px; }
.ct-row { display: grid; grid-template-columns: 70px 1fr; gap: 8px; word-break: break-all; }
.ct-mails { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; }
.ct-mails a { display: block; padding: 6px 8px; border-radius: 6px; color: var(--text); text-decoration: none; }
.ct-mails a:hover { background: var(--panel-2); }
.ct-edit { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 16px; align-items: start; }
.ct-edit:not(:has(img)) { grid-template-columns: 1fr; }
.mail-contact { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--brand-ink); text-decoration: none; }
@media (max-width: 720px) {
  .ct-detail, .ct-edit { grid-template-columns: 1fr; }
  .ct-grid { grid-template-columns: 1fr; }
}

/* ── 구글 챗 ── */
.gcc { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; height: calc(100dvh - 58px - 40px); min-height: 480px; }
.gcc-side, .gcc-main { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0; }
.gcc-side-top { display: flex; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line-2); }
.gcc-side-top input { flex: 1; min-width: 0; }
.gcc-spaces { list-style: none; margin: 0; padding: 4px; overflow: auto; flex: 1; }
.gcc-spaces li[data-id] { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; cursor: pointer; min-width: 0; }
.gcc-spaces li[data-id]:hover { background: var(--panel-2); }
.gcc-spaces li.on { background: var(--brand-weak); color: var(--brand-ink); }
.gcc-spaces li.unread .grow { font-weight: 700; }
.gcc-ico { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--panel-2); font-size: 13px; color: var(--muted); }
.gcc-sec { position: sticky; top: -4px; z-index: 1; background: var(--panel); margin-top: 6px; }
.gcc-sec:first-child { margin-top: 0; }
.gcc-sec button { width: 100%; display: flex; align-items: center; gap: 6px; padding: 7px 8px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; border-radius: 6px; text-align: left; }
.gcc-sec button:hover { background: var(--panel-2); }
.gcc-caret { flex: none; width: 14px; color: var(--muted); }
.gcc-sec-new { flex: none; font-size: 11px; font-weight: 700; color: var(--brand-ink); background: var(--brand-weak); padding: 1px 7px; border-radius: 99px; }
.gcc-old button { width: 100%; border: 0; background: none; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; padding: 7px 10px; border-radius: 6px; text-align: left; }
.gcc-old button:hover { background: var(--panel-2); color: var(--text); }
.gcn-kinds { margin-bottom: 12px; }
.gcn-field { display: block; width: 100%; margin-bottom: 10px; font-size: 13px; }
.gcn-field[hidden] { display: none; }
label.gcn-field input { display: block; width: 100%; margin-top: 4px; }
.gcn-warn { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.gcn-warn > div { flex: 1 1 240px; }
.gcn-picked:not(:empty) { margin-bottom: 10px; }
.gcn-chip { cursor: pointer; border: 1px solid var(--line); background: var(--brand-weak); color: var(--brand-ink); border-radius: 99px; padding: 3px 10px; font: inherit; font-size: 12px; }
.gcn-list { height: min(320px, 42vh); overflow: auto; border: 1px solid var(--line-2); border-radius: 8px; padding: 4px; }
.gcn-row { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; border-radius: 6px; text-align: left; min-width: 0; }
.gcn-row:hover { background: var(--panel-2); }
.gcn-row.on { background: var(--brand-weak); }
.gcn-check { flex: none; color: var(--brand-ink); font-weight: 700; }
.gcn-none { padding: 14px; }
.gcn-hint:not(:empty) { margin-top: 8px; }
.gcc-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.gcc-err { padding: 12px; color: var(--red); font-size: 13px; }
.gcc-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); min-width: 0; }
.gcc-msgs { flex: 1; overflow: auto; padding: 12px 16px; display: flex; flex-direction: column; }
.gcc-older { align-self: center; margin-bottom: 8px; }
.gcc-day { text-align: center; margin: 14px 0 8px; font-size: 12px; color: var(--muted); }
.gcc-day span { background: var(--panel-2); padding: 3px 10px; border-radius: 99px; }
.gcc-msg { max-width: 78%; margin-top: 10px; align-self: flex-start; position: relative; }
.gcc-msg.cont { margin-top: 3px; }
.gcc-msg.mine { align-self: flex-end; }
.gcc-msg.mine .gcc-who { justify-content: flex-end; }
.gcc-msg.reply { margin-left: 22px; }
.gcc-who { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 3px; }
.gcc-who img { width: 20px; height: 20px; border-radius: 50%; }
.gcc-bubble { padding: 8px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-2); white-space: normal; word-break: break-word; overflow-wrap: anywhere; line-height: 1.5; }
.gcc-msg.mine .gcc-bubble { background: var(--brand-weak); border-color: transparent; }
.gcc-bubble a { color: var(--brand-ink); }
.gcc-text { white-space: pre-wrap; } /* 메시지 글자만 줄바꿈 그대로 (코드의 공백·줄바꿈은 무시) */
.gcc-text + .gcc-files { margin-top: 6px; }
.gcc-bubble > .gcc-files:first-child { margin-top: 0; }
.gcc-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; white-space: normal; }
.gcc-files img { max-width: 240px; max-height: 200px; border-radius: 8px; display: block; }
.gcc-rbtn { position: absolute; right: -36px; bottom: 4px; opacity: 0; color: var(--muted); }
.gcc-msg.mine .gcc-rbtn { right: auto; left: -36px; }
.gcc-msg:hover .gcc-rbtn { opacity: 1; }
.gcc-send { border-top: 1px solid var(--line-2); padding: 10px; }
.gcc-send textarea { resize: none; min-height: 40px; max-height: 160px; }
.gcm-add { margin: 10px 0; display: grid; gap: 6px; justify-items: start; }
.gcm-add input { width: 100%; }
.gcm-pick { width: 100%; height: min(210px, 32vh); }
.gcm-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 55vh; overflow: auto; }
.gcm-list li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line-2); min-width: 0; }
.gcm-list li:first-child { border-top: 0; }
.gcm-role { flex: none; color: var(--brand-ink); background: var(--brand-weak); padding: 1px 8px; border-radius: 99px; }
.gcc-atts { display: flex; flex-wrap: wrap; gap: 6px; }
.gcc-atts:not(:empty) { margin-bottom: 8px; }
.gcc-att { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 6px 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); font-size: 12.5px; }
.gcc-att .ell { max-width: 220px; }
.gcc-att button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px 5px; font: inherit; }
.gcc-att button:hover { color: var(--red); }
.gcc-clip { flex: none; padding-left: 10px; padding-right: 10px; }
.gcc-main { position: relative; }
.gcc-main.gcc-dropping::after { content: '여기에 놓으면 첨부됩니다 (보내기를 눌러야 전송)'; position: absolute; inset: 6px; z-index: 5; display: grid; place-items: center; border: 2px dashed var(--brand); border-radius: var(--radius); background: color-mix(in srgb, var(--brand-weak) 88%, transparent); color: var(--brand-ink); font-weight: 700; pointer-events: none; }
.gcc-replying { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.gcc-intro { max-width: 620px; }
@media (max-width: 720px) {
  .gcc { grid-template-columns: 1fr; height: calc(100dvh - 58px - 80px); }
  .gcc.reading .gcc-side { display: none; }
  .gcc:not(.reading) .gcc-main { display: none; }
  .gcc .back-btn { display: inline-flex; }
  .gcc-msg { max-width: 90%; }
  .gcc-rbtn { position: static; opacity: 1; margin-top: 2px; }
}
.gcc-errtext, .gcc-err { word-break: break-all; }
.gcc-errtext a, .gcc-err a { color: var(--brand-ink); }

/* ── 첫 로그인 시작하기 ── */
.onb p { margin: 0; }
.onb-steps { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 8px; counter-reset: s; }
.onb-steps li { counter-increment: s; padding: 10px 12px 10px 44px; border-radius: 10px; background: var(--panel-2); position: relative; color: var(--muted); }
.onb-steps li::before { content: counter(s); position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--line); color: var(--muted); }
.onb-steps li.now { color: var(--text); background: var(--brand-weak); }
.onb-steps li.now::before { background: var(--brand); color: #fff; }
.onb-steps li.done::before { content: '✓'; background: var(--green); color: #fff; }
.onb-btn { justify-self: stretch; justify-content: center; }
.onb-warn { padding: 12px 14px; border-radius: 10px; background: var(--orange-weak); color: var(--text); }
.onb-warn ul { margin: 6px 0 0; padding-left: 18px; }
.onb-team td, .onb-team th { padding: 4px 10px 4px 0; text-align: left; }

/* ── 처음 설정 (단계형) ── */
.onb-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.onb-progress div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--faint); }
.onb-progress i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--line); color: var(--muted); }
.onb-progress .now { color: var(--text); font-weight: 600; } .onb-progress .now i { background: var(--brand); color: #fff; }
.onb-progress .done i { background: var(--green); color: #fff; }
.onb-services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.onb-services div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); text-align: center; }
.onb-services span { font-size: 22px; } .onb-services small { color: var(--muted); }
.onb-services .on { background: var(--green-weak); border-color: transparent; } .onb-services .on small { color: var(--green); font-weight: 600; }
.onb-next { width: 100%; justify-content: center; }
.onb-ok { padding: 10px 12px; border-radius: 10px; background: var(--green-weak); color: var(--green); font-weight: 600; text-align: center; }
.onb-wait { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 10px; border-radius: 10px; background: var(--purple-weak); color: var(--purple); font-size: 13px; }
.onb-wait .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ct-spin .8s linear infinite; }
.onb-done { text-align: center; } .onb-done > div { font-size: 48px; } .onb-done h3 { margin: 4px 0; }
.onb-foot { border-top: 1px solid var(--line-2); padding-top: 10px; }
.wk { display: grid; gap: 14px; }
.wk-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wk-tile { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 12px 14px; color: var(--text); text-decoration: none; display: grid; gap: 2px; }
.wk-tile small { color: var(--muted); } .wk-tile b { font-size: 22px; }
.wk-tile.warn b { color: var(--red); }
.wk-auto { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; white-space: nowrap; }
.wk-ai, .wk-mine { list-style: none; margin: 8px 0 0; padding: 0; }
.wk-ai li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line-2); }
.wk-ai-main { flex: 1 1 320px; min-width: 0; overflow-wrap: anywhere; }
.wk-ai-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wk-ai-act select { max-width: 190px; }
.wk-quote { color: var(--muted); border-left: 2px solid var(--line); padding-left: 8px; margin-top: 4px; }
.wk-none { padding: 8px 0 2px; }
.wk-list { display: grid; }
.wk-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(200px, 2fr) 120px 84px; gap: 14px; align-items: center; padding: 12px 8px; border-top: 1px solid var(--line-2); color: var(--text); text-decoration: none; border-radius: 6px; }
.wk-row:hover { background: var(--panel-2); }
.wk-name { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.wk-now { min-width: 0; overflow-wrap: anywhere; }
.wk-last { text-align: right; }
.wk-mine li { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line-2); }
.wk-mine li a { flex: 1; min-width: 0; color: var(--text); overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .wk-tiles { grid-template-columns: repeat(2, 1fr); }
  .wk-row { grid-template-columns: 1fr 76px; }
  .wk-name, .wk-now { grid-column: 1 / -1; }
  .wk-ai-act select { flex: 1 1 100%; max-width: none; }
}
#docs.doc-over { outline: 2px dashed var(--brand); outline-offset: 2px; background: var(--brand-weak); }
.doc-hint { margin: 0 0 8px; }
.doc-group { margin-top: 12px; }
.doc-gt { font-weight: 700; margin-bottom: 4px; }
.doc-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-2); border-radius: 8px; }
.doc-list li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line-2); }
.doc-list li:first-child { border-top: 0; }
.doc-main { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.doc-title { font-weight: 600; color: var(--text); }
.doc-acts { display: flex; align-items: center; gap: 2px; flex: none; }
.doc-acts a { text-decoration: none; }
.doc-acts select { font-size: 12px; height: 28px; min-height: 0; padding: 0 22px 0 6px; width: auto; }
.doc-result { list-style: none; margin: 4px 0 0; padding: 8px 10px; background: var(--panel-2); border-radius: 8px; overflow-wrap: anywhere; }
.pm-board { display: grid; gap: 14px; margin-top: 12px; }
.pm-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; flex-wrap: wrap; }
.pm-none { margin: 2px 0 0 28px; }
.pm-done { margin-top: 6px; }
.pm-done summary { cursor: pointer; margin-bottom: 4px; }
.gl-list { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; margin-top: 8px; }
.gl-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-2); min-width: 0; }
.gl-row:last-child { border-bottom: 0; }
.gl-row:hover { background: var(--panel-2); }
.gl-row b { font-weight: 600; min-width: 0; }
.gl-row small { font-weight: 400; display: inline-block; }
.gl-ico { flex: none; width: 22px; text-align: center; }
.gl-state { flex: none; }
.gm-svcs { display: flex; flex-wrap: wrap; gap: 4px 12px; }
@media (max-width: 480px) { .onb-services { grid-template-columns: repeat(2, 1fr); } .onb-progress span { font-size: 11px; } }

/* ── 내 폴더 ── */
.fl-bar { flex-wrap: wrap; }
.fl-crumbs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-weight: 600; }
.fl-crumbs a { cursor: pointer; color: var(--brand-ink); }
.fl-note { margin: -4px 0 10px; }
.fl-drop { border: 2px dashed transparent; border-radius: var(--radius); transition: border-color .15s; }
.fl-drop.over { border-color: var(--brand); background: var(--brand-weak); }
.fl-list { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.fl-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line-2); min-width: 0; }
.fl-row:last-child { border-bottom: 0; } .fl-row:hover { background: var(--panel-2); }
.fl-ico { flex: none; width: 24px; text-align: center; font-size: 18px; }
.fl-name { flex: 1; min-width: 0; text-align: left; }
.link-like { border: 0; background: none; padding: 0; font: inherit; color: var(--text); cursor: pointer; }
.link-like:hover { color: var(--brand-ink); text-decoration: underline; }
.fl-meta { flex: none; width: 70px; text-align: right; }
.fl-acts { flex: none; display: flex; gap: 2px; } .fl-acts a { text-decoration: none; }
.fl-text { width: 100%; min-height: 55vh; font: 13px/1.6 ui-monospace, Consolas, monospace; }
.fl-img { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; border-radius: 8px; }
.fl-pdf { width: 100%; height: 70vh; border: 0; border-radius: 8px; background: #fff; }
@media (max-width: 720px) { .fl-meta:last-of-type { display: none; } .fl-meta { width: 56px; } }
.gd-more { text-align: center; padding: 12px; }
.fl-name.link-like { text-decoration: none; display: block; }
#list .fl-acts { width: 96px; justify-content: flex-end; align-items: center; }
@media (max-width: 720px) { .gd-tabs .grow { display: none; } .gd-tabs input[type=search] { flex: 1 1 100%; } }
/* ── AI 비서 ── */
.as { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; height: calc(100dvh - 58px - 40px); min-height: 480px; }
.as-side, .as-main { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0; }
.as-new { display: flex; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; } .as-new .btn { flex: 1; justify-content: center; }
.as-list { list-style: none; margin: 0; padding: 4px; overflow: auto; flex: 1; }
.as-list li[data-id] { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; cursor: pointer; min-width: 0; }
.as-list li[data-id]:hover { background: var(--panel-2); } .as-list li.on { background: var(--brand-weak); color: var(--brand-ink); }
.as-folder { padding: 10px; border-top: 1px solid var(--line-2); text-decoration: none; }
.as-p { flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: #c96442; }
.as-p.astra { background: #10a37f; }
.as-p.gemini { background: #1a73e8; }
.as-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); min-width: 0; }
.as-msgs { flex: 1; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.as-msg { display: flex; } .as-msg.me { justify-content: flex-end; }
.as-b { max-width: 82%; padding: 10px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; line-height: 1.6; }
.as-msg.me .as-b { background: var(--brand-weak); border-color: transparent; }
.as-b h4, .as-b h5 { margin: 6px 0 2px; } .as-b a { color: var(--brand-ink); }
.as-code { background: var(--bg); padding: 8px 10px; border-radius: 8px; overflow: auto; font: 12px/1.5 ui-monospace, Consolas, monospace; white-space: pre; }
.as-step { font-size: 12px; color: var(--muted); padding: 2px 6px; } .as-step.ok > span:first-child { color: var(--green); } .as-step.err > span:first-child { color: var(--orange); }
.as-step a { color: var(--brand-ink); }
.as-think { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--purple); padding: 6px; }
.as-send { border-top: 1px solid var(--line-2); padding: 10px; } .as-send textarea { resize: none; min-height: 40px; max-height: 200px; }
.as-atts { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.as-hello { margin: auto; text-align: center; max-width: 560px; padding: 20px; display: grid; gap: 10px; }
.as-hello .as-send { border: 1px solid var(--line-2); border-radius: var(--radius); text-align: left; }
.as-logo { font-size: 40px; }
.as-sug { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; } .as-sug .chip { cursor: pointer; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ct-spin .8s linear infinite; flex: none; }
.as .back-btn { display: none; }
@media (max-width: 720px) {
  .as { grid-template-columns: 1fr; height: calc(100dvh - 58px - 80px); }
  .as.reading .as-side { display: none; } .as:not(.reading) .as-main { display: none; }
  .as .back-btn { display: inline-flex; } .as-b { max-width: 92%; }
}

/* ── 출석부 ── */
.att-tabs { margin-bottom: 12px; }
.att-today { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.att-clock b { font-size: 34px; font-variant-numeric: tabular-nums; display: block; line-height: 1.1; }
.att-actions { display: flex; gap: 8px; align-items: center; }
.att-btn { font-size: 16px; padding: 12px 22px; }
.att-mhead { margin: 6px 0 10px; align-items: center; }
.att-sum { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 8px; }
.att-sumc { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; }
.att-sumc b { font-size: 22px; }
.att-g { margin: 14px 0 6px; }
.att-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.att-p { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; display: grid; gap: 4px; }
.att-p:disabled { cursor: default; } .att-p.none { opacity: .7; }
.att-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 6px; align-items: center; }
.att-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); margin-right: 4px; vertical-align: 1px; }
.att-dot.green { background: var(--green); } .att-dot.orange { background: var(--orange); } .att-dot.blue { background: var(--blue); } .att-dot.purple { background: var(--purple); } .att-dot.red { background: var(--red); }
.att-grid-wrap { overflow: auto; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel); }
.att-grid { border-collapse: collapse; font-size: 12px; }
.att-grid th, .att-grid td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); padding: 4px 3px; text-align: center; min-width: 34px; white-space: nowrap; }
.att-grid th { background: var(--panel-2); position: sticky; top: 0; font-weight: 600; }
.att-grid .att-name { position: sticky; left: 0; background: var(--panel); text-align: left; min-width: 90px; padding: 4px 8px; z-index: 1; }
.att-grid th.att-name { z-index: 2; background: var(--panel-2); }
.att-grid .we { background: var(--panel-2); color: var(--faint); }
.att-grid td.click { cursor: pointer; } .att-grid td.click:hover { background: var(--brand-weak); }
@media (max-width: 720px) { .att-today { grid-template-columns: 1fr; } .att-sum { grid-template-columns: repeat(3, 1fr); } .att-btn { width: 100%; justify-content: center; } .att-actions { flex-wrap: wrap; } }
/* ── 조직도 ── */
.og-wrap { overflow: auto; padding: 8px 0 16px; }
.og-tree, .og-tree ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; position: relative; }
.og-tree ul { padding-top: 22px; }
.og-tree li { position: relative; padding: 22px 8px 0; display: flex; flex-direction: column; align-items: center; }
.og-tree > li { padding-top: 0; }
.og-tree li::before, .og-tree li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 2px solid var(--line); }
.og-tree li::after { right: auto; left: 50%; border-left: 2px solid var(--line); }
.og-tree li:only-child::before, .og-tree li:only-child::after { display: none; } .og-tree li:only-child { padding-top: 22px; }
.og-tree > li:only-child { padding-top: 0; }
.og-tree li:first-child::before, .og-tree li:last-child::after { border: 0 none; }
.og-tree li:last-child::before { border-right: 2px solid var(--line); border-radius: 0 6px 0 0; }
.og-tree li:first-child::after { border-radius: 6px 0 0 0; }
.og-tree ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid var(--line); }
.og-unit, .og-ceo { background: var(--panel); border: 1px solid var(--line-2); border-top: 4px solid var(--c, var(--brand)); border-radius: 10px; box-shadow: var(--shadow); min-width: 170px; max-width: 240px; padding: 8px; display: grid; gap: 6px; }
.og-ceo { border-top-color: var(--text); }
.og-uhead { border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; display: grid; text-align: center; padding: 2px; border-radius: 6px; }
.og-uhead:hover { background: var(--panel-2); } .og-uhead small { color: var(--muted); font-size: 11px; } .og-uhead b { font-size: 15px; } .og-uhead span { font-size: 12px; color: var(--muted); }
.og-members { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.og-person { border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 8px; padding: 4px 8px; font: inherit; font-size: 12px; color: var(--text); cursor: pointer; display: inline-flex; gap: 4px; align-items: baseline; }
.og-person:hover { border-color: var(--brand); } .og-person small { color: var(--muted); }
.og-add { border: 1px dashed var(--line); background: none; border-radius: 6px; color: var(--muted); cursor: pointer; padding: 3px; font: inherit; font-size: 12px; }
.og-add:hover { color: var(--brand-ink); border-color: var(--brand); }
/* ── 권한 ── */
.pm-tbl th { white-space: normal; font-size: 11px; min-width: 64px; text-align: center; }
.pm-tbl td { text-align: center; } .pm-tbl td:first-child, .pm-tbl th:first-child { text-align: left; }
.pm-tbl input[type=checkbox] { width: 18px; height: 18px; }
.pm-ov { font-weight: 800; background: var(--orange-weak); }
@media (max-width: 720px) { .og-tree, .og-tree ul { flex-direction: column; align-items: stretch; } .og-tree li { padding: 8px 0 0 14px; align-items: stretch; } .og-tree li::before, .og-tree li::after, .og-tree ul::before { display: none; } .og-unit, .og-ceo { max-width: none; } .og-tree ul { padding-top: 0; border-left: 2px solid var(--line); margin-left: 6px; } }

/* ── 계산서 수신 메일함 ── */
.tm-stat { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); }
.tm-log td { vertical-align: top; } .tm-log .ell { max-width: 280px; }

/* ───────── AI 문서 확인 대기 (원본과 나란히 대조) ───────── */
.rv { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.rv-list { position: sticky; top: 74px; display: grid; gap: 10px; max-height: calc(100vh - 96px); overflow: auto; }
.rv-help { margin: 0; line-height: 1.5; }
.rv-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rv-items li { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; min-width: 0; }
.rv-items li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-items li:hover { border-color: var(--line); }
.rv-items li.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.rv-items li.rv-done { display: flex; gap: 8px; align-items: center; cursor: default; }
.rv-main { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 1fr); gap: 16px; align-items: start; min-width: 0; }
.rv-main > .empty { grid-column: 1 / -1; }
.rv-orig { position: sticky; top: 74px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; height: calc(100vh - 96px); min-height: 420px; }
.rv-orig > header { padding: 8px 12px; border-bottom: 1px solid var(--line-2); }
.rv-orig > header select { max-width: 60%; }
.rv-orig iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.rv-img { flex: 1; overflow: auto; background: var(--panel-2); }
.rv-img img { display: block; max-width: 100%; margin: 0 auto; }
.rv-orig .empty { flex: 1; display: grid; place-content: center; }
.rv-form { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: grid; gap: 12px; min-width: 0; }
.rv-form h3 { margin: 2px 0 0; overflow-wrap: anywhere; }
.rv-checks { list-style: none; margin: 0; padding: 10px 12px; background: var(--panel-2); border-radius: 8px; display: grid; gap: 4px; font-size: 13px; }
.rv-checks li { display: flex; gap: 8px; line-height: 1.45; }
.rv-checks li b { flex: none; width: 1em; text-align: center; }
.rv-checks li.green { color: var(--muted); }
.rv-checks li.green b { color: var(--green); }
.rv-form form[inert] { opacity: .75; }
.rv-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line-2); padding-top: 12px; }
.rv-hist ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; }
@media (max-width: 1180px) {
  .rv-main { grid-template-columns: minmax(0, 1fr); }
  .rv-orig { position: static; height: 70vh; }
}
@media (max-width: 720px) {
  .rv { grid-template-columns: minmax(0, 1fr); }
  .rv-list { position: static; max-height: none; }
  .rv-orig { height: 60vh; min-height: 320px; }
  .rv-form .form-grid { grid-template-columns: minmax(0, 1fr); }
  .rv-form { order: -1; } /* 휴대폰: 고칠 칸·승인 버튼 먼저, 원본은 아래 */
}
.mail-hint { margin: 0 0 8px; }
.sugg .spin { display: inline-block; vertical-align: -2px; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ct-spin .8s linear infinite; }
.sugg-list li { padding: 5px 0; border-bottom: 1px solid var(--line-2); }
.sugg-list input { flex: none; width: auto; min-height: 0; }
/* 공유 폴더 — 올리기 진행 줄 */
.fl-note { word-break: keep-all; }
.sh-prog { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 10px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); }
.sh-prog > .ell { flex: 0 1 260px; min-width: 0; font-weight: 600; }
.sh-prog progress { flex: 1; min-width: 80px; height: 8px; }
@media (max-width: 720px) { .sh-prog { flex-wrap: wrap; } .sh-prog > .ell { flex-basis: 100%; } }
.as-p.claudesub { background: #8f4a2e; }

/* ── 키보드 접근 · 움직임 줄이기 ── */
[data-kb]:focus-visible, #tab-more:focus-visible, .btn:focus-visible, .icon-btn:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
tr[data-kb]:focus-visible, li[data-kb]:focus-visible { outline-offset: -2px; }
#tab-more { cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
