/* KOKORONE WORK · 與 hr.kokorone.my 同一套品牌色 */
:root {
  --brass: #675128; --beige: #E3DDD2; --sage: #434A33; --midnight: #0A2430; --grey: #323330;
  --teal: #146B70; --teal-dark: #0F5458;
  --paper: #F8F6F2; --line: #D4CCBD; --line-soft: #E7E1D6; --muted: #66665D;
  --sage-wash: #E3E5DE; --blue-wash: #E1E7E8; --brass-wash: #EBE3D4;
  /* 狀態色（低彩度，與品牌色同調） */
  --over: #A33A2B;  --over-bg: #F4E1DC;
  --warn: #7A5410;  --warn-bg: #F1E6CF;
  --run: #146B70;   --run-bg: #DDEBEC;
  --done: #434A33;  --done-bg: #E3E5DE;
  --review: #4E4470; --review-bg: #E6E2EE;
  --idle: #5C5C54;  --idle-bg: #ECE9E3;
  --radius: 12px;
  --font: "Work Sans", "Taipei Sans TC Beta", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-head: Absans, "YuPearl Light", "Work Sans", "Noto Sans TC", "PingFang TC", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--midnight); font-family: var(--font); font-size: 15px; line-height: 1.55; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; margin: 0; letter-spacing: .2px; }
:focus-visible { outline: 3px solid #7FB3B6; outline-offset: 2px; }

/* ---------- 版面 ---------- */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
@media (min-width: 641px) { .shell { flex-wrap: nowrap; } .side { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.side { flex: 0 0 228px; background: var(--midnight); color: #fff; display: flex; flex-direction: column; padding: 26px 18px; gap: 22px; }
.brand { padding: 0 8px; }
.brand .word { font-family: "Work Sans", sans-serif; font-size: 30px; font-weight: 400; letter-spacing: 2px; line-height: 1; }
.brand .sub { font-size: 11px; letter-spacing: 3px; color: #A9B6BB; margin-top: 8px; }
.side .new { background: var(--teal); color: #fff; border: 0; border-radius: 10px; padding: 12px 14px; font-weight: 600; text-align: left; min-height: 46px; }
.side .new:hover { background: #1A7C82; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-g { font-size: 11px; letter-spacing: 2.5px; color: #8FA0A6; padding: 14px 12px 4px; }
.nav-g:first-child { padding-top: 0; }
.nav button { background: transparent; border: 0; color: #C9D2D5; text-align: left; padding: 11px 12px; border-radius: 9px; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav button.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.nav .count { background: var(--over); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 8px; font-weight: 600; }
.side .foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.14); padding-top: 16px; font-size: 13px; color: #A9B6BB; display: flex; flex-direction: column; gap: 8px; }
.side .foot b { color: #fff; font-weight: 600; font-size: 14px; }
.side .foot button { background: transparent; border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 8px; padding: 7px 10px; align-self: flex-start; }
.main { flex: 999 1 400px; min-width: 0; padding: 32px 40px 80px; }
.wrap { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.demo-bar { background: var(--brass); color: #fff; font-size: 13px; padding: 8px 16px; text-align: center; width: 100%; }

@media (max-width: 640px) {
  .kpi .num { font-size: 30px; }
  .side { flex: 1 1 100%; padding: 14px 16px; gap: 12px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .brand .word { font-size: 22px; }
  .brand .sub { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; }
  .nav-g { display: none; }
  .side .foot { display: none; }
  .side .new { padding: 9px 12px; min-height: 40px; margin-left: auto; }
  .main { padding: 20px 16px 60px; }
}

/* ---------- 標題列 ---------- */
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.eyebrow { font-size: 12px; letter-spacing: 2.5px; color: var(--muted); text-transform: uppercase; }
.head h1 { font-size: 30px; margin-top: 4px; }
.head p { margin: 6px 0 0; color: var(--muted); max-width: 680px; }
.section-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.section-title h2 { font-size: 20px; }
.section-title .hint { font-size: 13px; color: var(--muted); }

/* ---------- 卡片與數字 ---------- */
.card { background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; padding: 20px 22px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.additem { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.additem input[type=text] { grid-column: 1 / -1; }
.additem .btn { grid-column: 1 / -1; }
.kpi { border-radius: 14px; padding: 16px 18px; border: 1px solid transparent; }
.kpi .label { font-size: 13px; font-weight: 600; }
.kpi .num { font-size: 38px; font-weight: 600; line-height: 1.15; font-family: "Work Sans", sans-serif; }
.kpi .num small { font-size: 15px; font-weight: 500; }
.kpi .note { font-size: 12.5px; }
.k-over { background: var(--over-bg); color: var(--over); }
.k-warn { background: var(--warn-bg); color: var(--warn); }
.k-run { background: var(--run-bg); color: var(--run); }
.k-review { background: var(--review-bg); color: var(--review); }
.k-done { background: var(--done-bg); color: var(--done); }

.badge { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-weight: 600; }
.b-over { background: var(--over-bg); color: var(--over); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-run { background: var(--run-bg); color: var(--run); }
.b-review { background: var(--review-bg); color: var(--review); }
.b-done { background: var(--done-bg); color: var(--done); }
.b-idle { background: var(--idle-bg); color: var(--idle); }
.b-line { background: #fff; color: var(--muted); border: 1px solid var(--line); }
.tag { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 12px; background: var(--brass-wash); color: var(--brass); font-weight: 600; }

/* ---------- 按鈕 ---------- */
.btn { border-radius: 10px; padding: 10px 16px; min-height: 44px; border: 1px solid var(--line); background: #fff; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { border-color: #B9AE9B; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-dark); }
.btn.dark { background: var(--midnight); border-color: var(--midnight); color: #fff; }
.btn.good { background: var(--sage); border-color: var(--sage); color: #fff; }
.btn.warn { color: var(--warn); border-color: #D9C49A; }
.btn.danger { color: var(--over); border-color: #E3B6AD; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn.link { border: 0; background: transparent; color: var(--teal); padding: 4px 0; min-height: 0; align-self: flex-start; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; min-height: 38px; font-size: 14px; }
.chip.on { background: var(--midnight); border-color: var(--midnight); color: #fff; font-weight: 600; }

/* ---------- 工作卡片 ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.task { background: #fff; border: 1px solid var(--line-soft); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.task.is-over { border-color: #E3B6AD; box-shadow: inset 4px 0 0 var(--over); }
.task.is-warn { box-shadow: inset 4px 0 0 #C9A25A; }
.task .t-top { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.task .t-title { font-size: 17px; font-weight: 600; }
.task .t-meta { font-size: 13px; color: var(--muted); }
.task .t-crit { font-size: 14px; background: var(--paper); border-radius: 9px; padding: 8px 12px; }
.task .t-crit b { color: var(--brass); font-weight: 600; }
.task .t-note { font-size: 13.5px; color: var(--warn); }
.panel { border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); }
.panel.warn { background: var(--warn-bg); }
.empty { padding: 22px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 14px; }

/* ---------- 表單 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .lbl { font-weight: 600; }
.field .help { font-size: 12.5px; color: var(--muted); }
.field .help.err { color: var(--over); font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: #fff; min-height: 44px; width: 100%;
}
textarea { resize: vertical; min-height: 80px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

/* ---------- 人員卡 ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.person { background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 999px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.who { display: flex; align-items: center; gap: 10px; }
.who .n { font-weight: 600; font-size: 16px; }
.who .r { font-size: 12.5px; color: var(--muted); }
.stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); text-align: center; gap: 4px; }
.stats4 .v { font-size: 24px; font-weight: 600; font-family: "Work Sans", sans-serif; }
.stats4 .l { font-size: 12px; color: var(--muted); }
.bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--idle-bg); }
.bar span { display: block; height: 100%; }

/* ---------- 表格 ---------- */
.table-box { background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 820px; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); background: var(--paper); padding: 11px 14px; font-size: 13px; }
td { padding: 12px 14px; border-top: 1px solid var(--line-soft); vertical-align: top; }

/* ---------- 專案 ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.proj { text-align: left; background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; width: 100%; }
.proj:hover { border-color: #C9BEAB; }
.proj .pn { font-size: 17px; font-weight: 600; }
.phase-row { display: grid; grid-template-columns: 74px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.prog { height: 8px; background: var(--idle-bg); border-radius: 999px; overflow: hidden; }
.prog span { display: block; height: 100%; background: var(--teal); }
.prog span.full { background: var(--sage); }
.phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line-soft); border-radius: 11px; padding: 10px 12px; min-height: 48px; }
.item.late { border-color: #E3B6AD; }
.item .box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #BDB2A0; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; }
.item.done .box { background: var(--sage); border-color: var(--sage); }
.item.done .iname { color: var(--muted); text-decoration: line-through; }
.item .iname { font-weight: 600; font-size: 14px; display: block; }
.item .imeta { font-size: 12px; color: var(--muted); display: block; }

/* ---------- 週會 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 10px 16px; font-weight: 500; color: var(--muted); min-height: 44px; }
.tabs button.on { color: var(--midnight); border-bottom-color: var(--teal); font-weight: 600; }
.ready { display: flex; flex-wrap: wrap; gap: 10px; }
.ready .p { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line-soft); border-radius: 999px; padding: 5px 14px 5px 5px; font-size: 14px; }
.agenda-step { display: flex; gap: 14px; align-items: flex-start; }
.agenda-step .no { width: 30px; height: 30px; border-radius: 999px; background: var(--midnight); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex: none; margin-top: 2px; }
.agenda-step .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.line-item:first-child { border-top: 0; }
.line-item .grow { flex: 999 1 320px; min-width: 0; }
.line-item > .row { flex: 1 1 100%; }
.item .box { padding: 0; }
.line-item .tt { font-weight: 600; }
.line-item .mm { font-size: 13px; color: var(--muted); }
.prep-card { background: #fff; border: 1px solid var(--line-soft); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.prep-card.missing { border-style: dashed; background: #FCFAF7; }
.prep-card .lbl { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.prep-card .txt { white-space: pre-wrap; font-size: 14px; }

/* ---------- 登入 ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px; background: #F0F3F5; }
.login .box { display: flex; flex-wrap: wrap; width: 100%; max-width: 1060px; background: #fff; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(10,36,48,.08); }
.login .l { flex: 1 1 380px; background: var(--midnight); color: #fff; padding: 56px 52px; display: flex; flex-direction: column; gap: 18px; min-height: 420px; }
.login .l .word { font-size: 46px; letter-spacing: 3px; font-weight: 400; }
.login .l .k { font-size: 12px; letter-spacing: 3px; color: #A9B6BB; margin-top: 18px; }
.login .l h2 { font-size: 30px; }
.login .l p { color: #C9D2D5; margin: 0; }
.login .l .co { margin-top: auto; font-size: 11px; letter-spacing: 2px; color: #A9B6BB; border-top: 1px solid rgba(255,255,255,.2); padding-top: 16px; }
.login .r { flex: 1 1 380px; padding: 52px 48px; display: flex; flex-direction: column; gap: 18px; }
.login .r h1 { font-size: 28px; }
.login .r p { margin: 0; color: var(--muted); }
.login .err { color: var(--over); font-weight: 600; font-size: 14px; }
.demo-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.demo-pick button { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px; display: flex; gap: 10px; align-items: center; }
.demo-pick button:hover { border-color: var(--teal); }

/* ---------- 對話框 / 提示 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10,36,48,.45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 20; }
.dialog { background: #fff; border-radius: 18px; width: 100%; max-width: 680px; padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.dialog .dh { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.dialog .dh h2 { font-size: 24px; }
.dialog .x { border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--muted); padding: 4px 8px; }
.rule { background: var(--midnight); color: #fff; border-radius: 12px; padding: 14px 16px; font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }
.rule b { color: #E7C98F; font-weight: 600; }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--midnight); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; }
#toast.show { opacity: 1; }
.loading { padding: 60px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===== v3：跟 hr.kokorone.my 同一套外框 ===== */
.side { flex: 0 0 236px; padding: 30px 18px 22px; gap: 0; }
.brand { padding: 0 10px 22px; }
.brand .word { font-size: 31px; letter-spacing: 3px; }
.brand .sub { font-size: 11px; letter-spacing: 3.5px; margin-top: 10px; color: #C9D2D5; }
.side-line { border-top: 1px solid rgba(255,255,255,.18); margin: 0 0 18px; }
.nav button { color: #E4E9EA; padding: 12px 14px; border-radius: 10px; min-height: 48px; font-size: 15.5px; }
.nav button .nl { display: inline-flex; align-items: center; gap: 12px; }
.nav button.on { background: var(--beige); color: var(--midnight); font-weight: 600; }
.nav button.on svg { color: var(--midnight); }
.nav-g { padding: 16px 14px 6px; }
.side .co { margin-top: auto; padding: 22px 10px 0; font-size: 11px; letter-spacing: 2px; color: #A9B6BB; line-height: 1.8; }
.main { padding: 26px 40px 80px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.topbar .big { font-family: var(--font-head); font-size: 34px; font-weight: 500; margin-top: 4px; }
.toplogo { height: 74px; width: auto; }
.head-actions { justify-content: flex-end; }
.login .box { max-width: 1120px; }
.login .l { background: var(--sage); padding: 64px 56px; }
.login .l .loginlogo { width: 260px; height: auto; margin-bottom: 18px; }
.login .l .k { color: #D9DCD2; margin-top: 30px; }
.login .l .co { color: #C8CCBF; }
.login .r .btn.primary { background: #3A402C; border-color: #3A402C; }
.login .r .btn.primary:hover { background: #2E3323; }
.btn.wide { width: 100%; min-height: 50px; font-size: 16px; }
.login-note { border-top: 1px solid var(--line); padding-top: 16px; font-size: 13px; color: var(--muted); line-height: 1.8; }
@media (max-width: 640px) { .toplogo { height: 46px; } .topbar .big { font-size: 26px; } .side .co, .side-line { display: none; } .brand { padding-bottom: 6px; } .nav button { min-height: 40px; padding: 8px 10px; font-size: 14px; } .nav button svg { display: none; } }

.lead-list { background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; padding: 4px 18px; }
.lead-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.lead-row:first-child { border-top: 0; }
.lead-row .grow { flex: 999 1 300px; min-width: 0; }
.lead-row .tt { font-weight: 600; }
.lead-row .mm { font-size: 13px; color: var(--muted); }
.lead-row .one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-list .task { margin: 10px 0; }

/* ===== v5：內頁改成和登入頁一樣的綠色 ===== */
:root { --green: #434A33; --green-dark: #353B28; --green-wash: #E3E5DE; --ink: #1F241A; }
html, body { color: var(--ink); }
.side { background: var(--green); }
.brand .sub, .side .co { color: #D3D7CA; }
.nav-g { color: #B9BFAD; }
.nav button { color: #EEF0E9; }
.nav button:hover { background: rgba(255,255,255,.08); }
.nav button.on { background: var(--beige); color: var(--ink); }
.nav button.on svg { color: var(--ink); }
.nav .count { background: #B4442F; }
.btn.primary { background: var(--green-dark); border-color: var(--green-dark); }
.btn.primary:hover { background: #2A2F1F; }
.btn.dark { background: var(--green-dark); border-color: var(--green-dark); }
.chip.on { background: var(--green-dark); border-color: var(--green-dark); }
.tabs button.on { border-bottom-color: var(--green); color: var(--ink); }
.agenda-step .no { background: var(--green); }
a { color: var(--green-dark); }
.btn.link { color: var(--green-dark); }
:focus-visible { outline-color: #9BA585; }
.topbar .big, h1, h2 { color: var(--ink); }
#toast { background: var(--green-dark); }
.rule { background: var(--green-dark); }

/* ===== 我的工作：五格，顏色區分 ===== */
.legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.lg { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); border-radius: 14px; padding: 12px 14px; border: 1px solid transparent; }
.lg-no { width: 26px; height: 26px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; flex: none; font-size: 13px; }
.lg-l { flex: 1; font-weight: 600; font-size: 14px; }
.lg-n { font-family: "Work Sans", sans-serif; font-size: 24px; font-weight: 600; }
.lg-red { background: var(--over-bg); } .lg-red .lg-no { background: var(--over); } .lg-red .lg-n { color: var(--over); }
.lg-purple { background: var(--review-bg); } .lg-purple .lg-no { background: var(--review); } .lg-purple .lg-n { color: var(--review); }
.lg-green { background: var(--green-wash); } .lg-green .lg-no { background: var(--green); } .lg-green .lg-n { color: var(--green); }
.lg-grey { background: #fff; border-color: var(--line); } .lg-grey .lg-no { background: #8A877D; } .lg-grey .lg-n { color: #6E6B62; }
.lg-track { background: #fff; border: 1px dashed var(--line); } .lg-track .lg-no { background: #B5AE9F; } .lg-track .lg-n { color: #6E6B62; }
.bucket { border-radius: 18px; padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.bucket-head { display: flex; align-items: flex-start; gap: 12px; }
.bucket-head .grow { flex: 1; min-width: 0; }
.bucket-head h2 { font-size: 20px; display: flex; align-items: center; gap: 10px; }
.bucket-no { width: 32px; height: 32px; border-radius: 999px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.bucket-n { font-family: "Work Sans", sans-serif; font-size: 14px; font-weight: 600; border-radius: 999px; padding: 1px 10px; background: #fff; }
.bucket-ex { font-size: 13.5px; color: #4E4B44; margin-top: 3px; }
.bucket .task { border-color: transparent; box-shadow: none; }
.bucket .task.is-over, .bucket .task.is-warn { box-shadow: none; border-color: transparent; }
.b-red { background: var(--over-bg); } .b-red .bucket-no { background: var(--over); } .b-red .bucket-n { color: var(--over); } .b-red .task, .b-red .item-wrap { border-left: 5px solid var(--over); }
.b-purple { background: var(--review-bg); } .b-purple .bucket-no { background: var(--review); } .b-purple .bucket-n { color: var(--review); } .b-purple .task { border-left: 5px solid var(--review); }
.b-green { background: var(--green-wash); } .b-green .bucket-no { background: var(--green); } .b-green .bucket-n { color: var(--green); } .b-green .task, .b-green .item-wrap { border-left: 5px solid var(--green); }
.b-grey { background: #fff; border: 1px solid var(--line); } .b-grey .bucket-no { background: #8A877D; } .b-grey .task { border: 1px solid var(--line-soft); }
.b-track { background: transparent; border: 1px dashed var(--line); } .b-track .bucket-no { background: #B5AE9F; } .b-track .task { border: 1px solid var(--line-soft); }
.item-wrap { background: #fff; border-radius: 14px; padding: 10px 14px 4px; display: flex; flex-direction: column; gap: 4px; }
.item-wrap .item { border: 0; padding: 6px 0 10px; min-height: 0; }
.kind { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1px; color: #4E4B44; background: #F1ECE4; border-radius: 6px; padding: 2px 8px; }
.item-wrap > .kind { align-self: flex-start; }
@media (max-width: 900px) { .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== v6：諮詢名單表格、標準清單設定 ===== */
.lead-table { background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; }
.lt-head, .lt-row { display: grid; grid-template-columns: minmax(170px, 1.4fr) 110px 130px minmax(200px, 2.2fr) 120px 190px; gap: 14px; align-items: start; padding: 14px 18px; }
.lt-head { background: var(--paper); font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 1px; padding-top: 10px; padding-bottom: 10px; }
.lt-row { border-top: 1px solid var(--line-soft); }
.lt-row.is-over { box-shadow: inset 4px 0 0 var(--over); }
.lt-row.open { background: #FBFAF7; }
.lt-name .nm { font-size: 16px; font-weight: 700; }
.lt-name .sub { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 12.5px; }
.blocker { display: inline-block; background: #F7E9CF; color: #6B4A0E; border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 700; }
.lt-note { font-size: 13.5px; color: #3E3B34; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lt-row.open .lt-note { -webkit-line-clamp: unset; }
.lt-last { font-size: 12px; color: var(--muted); margin-top: 4px; }
.lt-next { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.lt-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.lt-detail { padding: 4px 18px 18px; background: #FBFAF7; display: flex; flex-direction: column; gap: 8px; }
.lt-detail .lbl { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
@media (max-width: 1100px) { .lt-head { display: none; } .lt-row { grid-template-columns: 1fr 1fr; } .lt-note { grid-column: 1 / -1; } .lt-act { justify-content: flex-start; } }
.tpl-row { display: grid; grid-template-columns: 1fr 72px 120px auto; gap: 6px; align-items: center; }
.tpl-row input, .tpl-row select { min-height: 40px; padding: 8px 10px; }
.tpl-phases { display: flex; flex-direction: column; gap: 14px; }
.tpl-row { grid-template-columns: minmax(240px, 1fr) 90px 150px 60px; max-width: 760px; }
input[type="datetime-local"] { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); }

/* ===== v7：開會議程步驟列 ===== */
.stepper { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.stepper .st { display: flex; gap: 10px; align-items: center; text-align: left; background: #fff; border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--ink); }
.stepper .st .n { width: 28px; height: 28px; border-radius: 999px; background: var(--beige); color: var(--green-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.stepper .st .tx { display: flex; flex-direction: column; line-height: 1.35; }
.stepper .st .tx b { font-size: 14.5px; }
.stepper .st .tx span { font-size: 12.5px; color: var(--muted); }
.stepper .st .tx span.w { color: var(--over); font-weight: 600; }
.stepper .st.on { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.stepper .st.on .n { background: #fff; }
.stepper .st.on .tx span { color: #E3DDD2; }
.stepper .st.on .tx span.w { color: #F4C9BF; }
.line-item .acts { display: flex; gap: 6px; margin-left: auto; flex: none; }
.tabs .count { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--over); color: #fff; font-size: 11.5px; line-height: 18px; margin-left: 4px; }

/* ===== v8：登入頁左側文字統一成白色，只用大小分層次 ===== */
.login .l, .login .l h2, .login .l p, .login .l .k, .login .l .co { color: #FFFFFF; }
.login .l p { font-weight: 400; line-height: 1.8; }
.login .l .co { border-top-color: rgba(255,255,255,.28); }
.ready .pbtn { cursor: pointer; font: inherit; color: inherit; }
.ready .pbtn.on { border-color: var(--green-dark); box-shadow: 0 0 0 2px var(--green-dark) inset; }

/* ===== v9：依人看、結束會議總整理 ===== */
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; font: inherit; padding: 8px 18px; border-radius: 999px; cursor: pointer; color: var(--ink); font-weight: 600; }
.seg button.on { background: var(--green-dark); color: #fff; }
.stepper .st .av { flex: none; }
.pblk { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.pblk-h { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.no.sm { width: 24px; height: 24px; border-radius: 999px; background: var(--beige); color: var(--green-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.sum { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; }
.sum-row { display: grid; grid-template-columns: 34px 150px 1fr auto; gap: 10px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.sum-row:first-child { border-top: 0; }
.sum-row .n { width: 24px; height: 24px; border-radius: 999px; background: var(--beige); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.sum-row .t { font-weight: 600; }
.sum-row.w .v { color: var(--over); font-weight: 600; }
/* v10：步驟列一排放得下；選人 */
.stepper.s6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stepper.s5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stepper .st { padding: 12px; gap: 8px; min-width: 0; }
.stepper .st .tx { min-width: 0; }
.stepper .st .tx b, .stepper .st .tx span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .stepper.s6, .stepper.s5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.who-bar .cnt { display: inline-block; min-width: 20px; padding: 0 7px; border-radius: 999px; background: var(--beige); font-size: 12px; line-height: 20px; margin-left: 4px; }
.who-bar .cnt.w { background: #F4E1DC; color: var(--over); font-weight: 700; }
.who-bar .cnt.z { background: #E3E5DE; color: var(--muted); }
.who-bar .chip.on .cnt { background: rgba(255,255,255,.22); color: #fff; }

/* ===== v11：例行工作表單、清單打勾 ===== */
.mdays { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; max-width: 520px; }
.mdays .chip { justify-content: center; padding: 6px 0; min-height: 38px; }
.steps-mini { margin: 2px 0 0; padding-left: 20px; font-size: 13.5px; color: #3E3B34; }
.steps-mini li { margin: 2px 0; }
.step-check { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: #fff; cursor: pointer; font-size: 15px; }
.step-check input { width: 20px; height: 20px; accent-color: var(--green-dark); }
.step-check.on { background: #EEF0E8; border-color: #C9CDBE; }
.step-check.on span:last-child { text-decoration: line-through; color: var(--muted); }

/* ===== v12：每個人的報告三欄對照 ===== */
.prep-rows { display: flex; flex-direction: column; gap: 12px; }
.prep-row { border: 1px solid var(--line-soft); border-radius: 16px; background: #fff; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.prep-row.missing { border-style: dashed; border-color: #E4C3BB; background: #FDF9F8; }
.pr-who { display: flex; align-items: center; gap: 12px; }
.pr-who .n { font-weight: 700; font-size: 16px; }
.pr-who .r { font-size: 12.5px; color: var(--muted); }
.pr-who .badge { margin-left: auto; }
.pr-flow { display: grid; grid-template-columns: 1fr 22px 1fr 22px 1fr; align-items: stretch; }
.pr-arrow { display: flex; align-items: center; justify-content: center; color: #B5AE9E; font-size: 18px; }
.pr-col { border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pr-col.last { background: #F3EFE7; }
.pr-col.did { background: #fff; border: 1.5px solid var(--green-dark); }
.pr-col.next { background: #E8EBE0; }
.pr-k { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .5px; display: flex; align-items: center; gap: 6px; }
.pr-k span { width: 18px; height: 18px; border-radius: 999px; background: #fff; color: var(--green-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; border: 1px solid #CFC8B8; }
.pr-col.did .pr-k { color: var(--green-dark); }
.pr-v { font-size: 14.5px; line-height: 1.65; white-space: pre-wrap; color: var(--ink); }
.pr-col.last .pr-v { color: #5E5A4F; }
.pr-v.none { color: #A9A294; font-style: italic; }
.prep-row.missing .pr-col.did .pr-v.none { color: var(--over); font-style: normal; font-weight: 600; }
@media (max-width: 900px) { .pr-flow { grid-template-columns: 1fr; gap: 8px; } .pr-arrow { transform: rotate(90deg); height: 16px; } }
.rf .btn.link { white-space: nowrap; }

/* ===== v13：每日紀錄跟進 ===== */
.pr-col.iss { background: #F7E6E1; }
.pr-col.iss .pr-v { color: #7A2C20; font-weight: 600; }
.prep-row .acts { margin-left: auto; }

/* ===== v14：每日紀錄歷史（日曆／清單） ===== */
.dh-ctl { display: flex; flex-direction: column; gap: 12px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; margin-right: 6px; vertical-align: -1px; }
.cal { background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; }
.cal-h { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--paper); font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: center; padding: 8px 0; }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-c { min-height: 104px; border: 0; border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); background: #fff; padding: 8px; text-align: left; display: flex; flex-direction: column; gap: 4px; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.cal-c:nth-child(7n+1) { border-left: 0; }
.cal-c.empty { background: #FBFAF7; cursor: default; }
.cal-c.fut { background: #FBFAF7; color: #C9C3B6; cursor: default; }
.cal-c:hover:not(.fut):not(.empty) { background: #F6F4EE; }
.cal-c.sel { box-shadow: inset 0 0 0 2px var(--green-dark); }
.cal-c.today .cal-n { background: var(--green-dark); color: #fff; }
.cal-n { font-weight: 700; font-size: 13px; width: 24px; height: 24px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.cal-c .badge { align-self: flex-start; font-size: 11.5px; padding: 1px 8px; }
.cal-t { font-size: 12px; color: #5E5A4F; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-iss { font-size: 11.5px; color: var(--over); font-weight: 700; }
.cal-ppl { display: flex; flex-wrap: wrap; gap: 4px; }
.cal-p { width: 24px; height: 24px; border-radius: 999px; color: #fff; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.dh-list { background: #fff; border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; }
.dh-row { display: grid; grid-template-columns: 150px 1.4fr 1fr 1fr; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line-soft); align-items: start; }
.dh-row:first-child { border-top: 0; }
.dh-row.dh-head { background: var(--paper); font-size: 12.5px; font-weight: 700; color: var(--muted); padding-top: 8px; padding-bottom: 8px; }
.dh-row.miss { background: #FDF6F4; }
.dh-date { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.dh-v { font-size: 14px; white-space: pre-wrap; line-height: 1.6; }
.dh-v.none { color: #A9A294; font-style: italic; }
.dh-row.miss .dh-v.none { color: var(--over); font-style: normal; font-weight: 600; }
.dh-group { display: flex; flex-direction: column; gap: 8px; }
.dh-gh { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.dh-gh .small { margin-left: 8px; }
@media (max-width: 900px) { .dh-row { grid-template-columns: 1fr; } .dh-head { display: none; } .cal-c { min-height: 70px; } .cal-t { display: none; } }
.dh-date { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }

/* ---------- 主選單分組（我的／團隊與專案／公司營運） ---------- */
.nav { gap: 0; }
.nav-sec, .nav-items { display: flex; flex-direction: column; gap: 3px; }
.nav-sec .nav-g { display: block; padding: 18px 14px 6px; font-size: 11.5px; letter-spacing: 2px; font-weight: 600; }
.nav-sec:first-child .nav-g { padding-top: 0; }
.nav-sec + .nav-sec { border-top: 1px solid rgba(255,255,255,.10); margin-top: 10px; }
@media (max-width: 640px) {
  .nav { flex-direction: column; gap: 10px; }
  .nav-sec + .nav-sec { margin-top: 0; padding-top: 8px; }
  .nav-sec .nav-g { display: block; padding: 0 2px 4px; font-size: 11px; letter-spacing: 1.5px; }
  .nav-items { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .nav-items button { flex: 1 1 auto; justify-content: center; gap: 6px; min-height: 42px; }
}
tr.editing td { background: #FBFAF7; }
