:root {
  --navy: #0d2942;
  --navy-2: #173d5b;
  --ink: #243647;
  --muted: #718294;
  --line: #dfe7ee;
  --surface: #ffffff;
  --canvas: #f2f6f9;
  --teal: #1d7b68;
  --teal-soft: #e7f6f0;
  --blue: #2f6fa7;
  --blue-soft: #eaf2fa;
  --amber: #b7791f;
  --amber-soft: #fff3dd;
  --red: #b6453c;
  --red-soft: #fcebe8;
  --gray-soft: #f3f6f8;
  --shadow: 0 10px 28px rgba(19, 43, 64, .07);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { min-width: 320px; background: var(--canvas); }
body {
  margin: 0; color: var(--ink); font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif; font-size: 14px;
  background: radial-gradient(circle at 10% 0%, rgba(47,111,167,.08), transparent 26%), var(--canvas);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); outline: none; transition: border-color .16s, box-shadow .16s; }
input, select { height: 38px; padding: 0 10px; }
textarea { padding: 10px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: #78a1c3; box-shadow: 0 0 0 3px rgba(47,111,167,.11); }
.topbar {
  position: sticky; top: 0; z-index: 40; height: 64px; display: flex; align-items: center; gap: 20px;
  padding: 0 18px 0 22px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 11px; width: 225px; flex: 0 0 225px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; font-size: 17px; font-weight: 800; background: linear-gradient(145deg, #2e6da4, #17324d 60%, #1f7a68); box-shadow: 0 8px 18px rgba(16,42,67,.18); }
.brand-title { font-size: 15px; font-weight: 800; letter-spacing: .1px; }
.brand-subtitle { margin-top: 2px; color: #8a99a7; font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.global-search { position: relative; display: flex; align-items: center; flex: 1; max-width: 620px; height: 38px; padding: 0 10px 0 13px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.global-search .search-icon { color: #7890a3; font-size: 19px; transform: rotate(-20deg); margin-right: 7px; }
.global-search input { flex: 1; height: 34px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: 12px; }
.global-search kbd { color: #97a5b1; background: #fff; border: 1px solid #e2e8ee; border-radius: 5px; padding: 2px 6px; font-size: 9px; font-family: inherit; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-left: auto; }
.sync-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border-radius: 999px; color: var(--muted); background: var(--gray-soft); font-size: 10px; white-space: nowrap; }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.sync-pill.online .sync-dot { background: var(--teal); box-shadow: 0 0 0 3px rgba(29,123,104,.1); }
.sync-pill.error .sync-dot { background: var(--red); }
.online-wrap { padding-left: 7px; }
.online-stack { display: flex; align-items: center; min-width: 16px; }
.online-avatar { display: grid; place-items: center; width: 27px; height: 27px; margin-left: -5px; border: 2px solid #fff; border-radius: 50%; color: #fff; font-size: 9px; font-weight: 800; }
.online-more { background: #8293a2; }
.ghost-button, .secondary-button, .primary-button, .user-button, .text-button, .icon-button, .icon-action { border: 0; border-radius: 9px; height: 36px; padding: 0 12px; white-space: nowrap; }
.ghost-button { color: var(--navy); background: #fff; border: 1px solid var(--line); font-size: 11px; }
.ghost-button:hover, .secondary-button:hover { background: #f5f8fa; border-color: #c4d2de; }
.secondary-button { color: var(--navy); background: #eef4f8; border: 1px solid #d5e1ea; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: #fff; background: linear-gradient(140deg, #2e6da4, #17324d); box-shadow: 0 7px 16px rgba(23,50,77,.16); }
.primary-button:hover { filter: brightness(1.04); }
.primary-button.small { height: 32px; padding: 0 12px; font-size: 11px; }
.text-button { color: var(--blue); background: transparent; padding: 0 7px; font-size: 11px; }
.user-button { display: flex; align-items: center; gap: 7px; background: transparent; border: 1px solid transparent; padding: 0 5px; font-size: 11px; }
.user-button:hover { background: var(--gray-soft); }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: var(--teal); font-size: 10px; font-weight: 800; }
.icon-action { width: 34px; height: 34px; padding: 0; color: #647b8e; background: #fff; border: 1px solid var(--line); font-size: 18px; }
.app-frame { display: grid; grid-template-columns: 225px minmax(0, 1fr) 290px; align-items: stretch; height: calc(100vh - 64px); }
.sidebar { display: flex; flex-direction: column; gap: 18px; padding: 18px 13px 14px; overflow: auto; background: #fbfcfd; border-right: 1px solid var(--line); }
.new-task-button { display: flex; align-items: center; justify-content: center; gap: 7px; height: 40px; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(140deg, #2e6da4, #17324d); font-size: 12px; font-weight: 700; box-shadow: 0 8px 17px rgba(23,50,77,.14); }
.side-section { display: flex; flex-direction: column; gap: 7px; }
.side-label { padding: 0 7px; color: #94a1ad; font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-item { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 35px; padding: 0 9px; border: 0; border-radius: 8px; color: #54687a; background: transparent; font-size: 11px; text-align: left; }
.side-item:hover { background: #f0f4f7; }
.side-item.active { color: var(--navy); background: #e9f1f7; font-weight: 800; }
.side-item b { display: grid; place-items: center; min-width: 21px; height: 19px; border-radius: 999px; color: #6b7f90; background: rgba(255,255,255,.78); font-size: 9px; }
.side-item.active b { color: var(--blue); background: #fff; }
.side-cycle-card { margin-top: auto; padding: 12px; border: 1px solid #e1e9f0; border-radius: 12px; background: #fff; box-shadow: 0 5px 14px rgba(19,43,64,.035); }
.side-cycle-card select { height: 34px; margin: 7px 0 8px; font-size: 11px; font-weight: 700; color: var(--navy); }
.cycle-meta { color: #8a99a7; font-size: 10px; }
.mini-progress { height: 6px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: #e9eff4; }
.mini-progress span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2e6da4, #1d7b68); transition: width .3s; }
.cycle-foot { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 9px; }
.cycle-foot strong { color: var(--navy); font-size: 10px; }
.sidebar-footer { padding: 0 7px; }
.online-label { color: #94a1ad; font-size: 9px; font-weight: 800; letter-spacing: .8px; }
.online-people { margin-top: 5px; overflow: hidden; color: #6d7f8f; font-size: 10px; line-height: 1.55; }
.workspace { min-width: 0; overflow: auto; padding: 21px 22px 32px; }
.workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.breadcrumb { color: #95a2ae; font-size: 9px; }
.breadcrumb span { padding: 0 4px; color: #c3ccd4; }
.breadcrumb b { color: #617587; font-weight: 700; }
.title-line { display: flex; align-items: center; gap: 9px; margin-top: 5px; }
.title-line h1 { margin: 0; color: var(--navy); font-size: 24px; letter-spacing: -.4px; }
.count-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 800; }
#resultSummary { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.head-actions { display: flex; align-items: center; gap: 8px; padding-top: 16px; }
.view-switch { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.view-switch button { height: 29px; padding: 0 11px; border: 0; border-radius: 7px; color: #708294; background: transparent; font-size: 10px; }
.view-switch button:hover { background: #f2f6f9; }
.view-switch button.active { color: #fff; background: var(--navy); box-shadow: 0 3px 8px rgba(13,41,66,.16); }
.kpi-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px; margin-bottom: 13px; }
.kpi-card { min-width: 0; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 5px 15px rgba(19,43,64,.035); }
.kpi-label { display: block; color: #718395; font-size: 9px; font-weight: 700; white-space: nowrap; }
.kpi-value { display: block; margin: 5px 0 2px; color: var(--navy); font-size: 24px; line-height: 1.1; letter-spacing: -.5px; }
.kpi-value.success { color: var(--teal); }
.kpi-value.info { color: var(--blue); }
.kpi-value.danger { color: var(--red); }
.kpi-value.warning { color: var(--amber); }
.kpi-hint { color: #9aa6b1; font-size: 8px; white-space: nowrap; }
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.quick-filter-group { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.quick-chip { height: 29px; padding: 0 9px; border: 0; border-radius: 7px; color: #6c8091; background: transparent; font-size: 10px; white-space: nowrap; }
.quick-chip:hover { background: #f2f6f9; }
.quick-chip.active { color: var(--navy); background: #e9f1f7; font-weight: 800; }
.filter-controls { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.compact-field { display: flex; align-items: center; gap: 5px; color: #8695a2; font-size: 9px; }
.compact-field select { width: auto; min-width: 88px; max-width: 120px; height: 30px; padding: 0 24px 0 8px; font-size: 10px; }
.view-section { min-width: 0; }
.board { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 10px; align-items: start; overflow-x: auto; padding-bottom: 10px; }
.board-column { min-width: 190px; border: 1px solid #e1e8ef; border-radius: 12px; background: #edf2f6; }
.board-column.drag-over { outline: 2px solid rgba(47,111,167,.35); outline-offset: 2px; }
.column-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 11px 9px; border-bottom: 1px solid #e1e8ef; }
.column-title { display: flex; align-items: center; gap: 7px; color: #4e6476; font-size: 11px; font-weight: 800; }
.column-dot { width: 7px; height: 7px; border-radius: 50%; }
.column-count { display: grid; place-items: center; min-width: 21px; height: 19px; border-radius: 999px; color: #718395; background: rgba(255,255,255,.8); font-size: 9px; font-weight: 800; }
.column-cards { display: flex; flex-direction: column; gap: 8px; min-height: 90px; max-height: calc(100vh - 350px); overflow: auto; padding: 8px; }
.board-card { position: relative; padding: 11px 11px 10px; border: 1px solid #e1e8ef; border-radius: 10px; background: #fff; box-shadow: 0 3px 9px rgba(19,43,64,.035); cursor: pointer; transition: transform .14s, box-shadow .14s, border-color .14s; }
.board-card:hover { transform: translateY(-1px); border-color: #c2d2df; box-shadow: 0 7px 15px rgba(19,43,64,.075); }
.board-card.dragging { opacity: .5; transform: rotate(1deg); }
.card-tags { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 8px; }
.card-tags-left { display: flex; align-items: center; gap: 5px; min-width: 0; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 19px; padding: 0 6px; border-radius: 5px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.pill.priority-P0, .pill.priority-p0 { color: #9b2d21; background: var(--red-soft); }
.pill.priority-P1, .pill.priority-p1 { color: #946018; background: var(--amber-soft); }
.pill.priority-P2, .pill.priority-p2 { color: #5d6b78; background: var(--gray-soft); }
.pill.risk-high { color: #9b2d21; background: var(--red-soft); }
.pill.risk-mid { color: #946018; background: var(--amber-soft); }
.pill.risk-low { color: #17624e; background: var(--teal-soft); }
.card-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 700; line-height: 1.55; }
.card-meta { display: flex; align-items: center; gap: 5px; margin-top: 7px; color: #8797a5; font-size: 8px; }
.card-progress { display: flex; align-items: center; gap: 7px; margin-top: 9px; }
.card-progress-track { flex: 1; height: 5px; overflow: hidden; border-radius: 99px; background: #eaf0f4; }
.card-progress-fill { height: 100%; border-radius: inherit; background: var(--blue); }
.card-progress-fill.done { background: var(--teal); }
.card-progress-fill.danger { background: var(--red); }
.card-progress span { width: 28px; color: #7e8e9c; font-size: 8px; text-align: right; }
.card-next { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; color: #6a7c8b; font-size: 9px; line-height: 1.5; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 9px; padding-top: 8px; border-top: 1px solid #edf1f4; }
.card-owner { display: flex; align-items: center; gap: 5px; color: #66788a; font-size: 8px; }
.mini-avatar { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; color: #fff; font-size: 7px; font-weight: 800; }
.card-side-meta { display: flex; align-items: center; gap: 7px; color: #91a0ae; font-size: 8px; }
.column-empty { display: grid; place-items: center; min-height: 70px; color: #9aa8b4; font-size: 9px; }
.list-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; border-bottom: 1px solid #edf1f5; }
.list-toolbar-copy { display: flex; align-items: center; gap: 8px; }
.list-toolbar-copy h2 { margin: 0; color: var(--navy); font-size: 14px; }
.list-toolbar-copy span { color: var(--muted); font-size: 9px; }
.legend { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 9px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; }
.legend-dot.done { background: var(--teal); }
.legend-dot.progress { background: var(--blue); }
.legend-dot.danger { background: var(--red); }
.table-wrap { max-height: calc(100vh - 370px); min-height: 390px; overflow: auto; }
table { width: 100%; min-width: 1010px; border-collapse: separate; border-spacing: 0; }
thead { position: sticky; top: 0; z-index: 2; background: #f4f7fa; }
th { padding: 10px 10px; color: #6c7f91; text-align: left; font-size: 9px; font-weight: 800; letter-spacing: .5px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid #edf1f5; vertical-align: middle; font-size: 11px; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #f8fbfd; }
tbody tr.selected { background: #eef6fb; }
.check-cell { width: 34px; text-align: center; }
.check-cell input { width: 15px; height: 15px; padding: 0; accent-color: var(--teal); }
td.task-cell { width: 230px; min-width: 215px; }
.task-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); font-weight: 700; line-height: 1.4; }
.task-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.mini-chip { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; color: #597185; background: #f0f4f7; font-size: 8px; white-space: nowrap; }
.mini-chip.dept { color: #285d91; background: var(--blue-soft); }
.owner-cell { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.owner-mini { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: #fff; font-size: 8px; font-weight: 800; }
.priority { display: inline-flex; min-width: 30px; height: 21px; align-items: center; justify-content: center; border-radius: 6px; font-size: 9px; font-weight: 800; }
.p0 { color: #9b2d21; background: var(--red-soft); }
.p1 { color: #946018; background: var(--amber-soft); }
.p2 { color: #5d6b78; background: var(--gray-soft); }
.status-select { width: 91px; height: 28px; padding: 0 23px 0 8px; border: 0; border-radius: 999px; font-size: 10px; font-weight: 800; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #718496 50%), linear-gradient(135deg, #718496 50%, transparent 50%); background-position: calc(100% - 11px) 11px, calc(100% - 7px) 11px; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }
.status-done { color: #17624e; background-color: var(--teal-soft); }
.status-progress { color: #285d91; background-color: var(--blue-soft); }
.status-pending { color: #946018; background-color: var(--amber-soft); }
.status-missed { color: #9b2d21; background-color: var(--red-soft); }
.status-notstarted { color: #4b5563; background-color: var(--gray-soft); }
.progress-cell { width: 105px; min-width: 105px; }
.progress-line { display: flex; align-items: center; gap: 7px; }
.progress-track { flex: 1; height: 6px; overflow: hidden; border-radius: 999px; background: #e8eef3; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--blue); transition: width .3s; }
.progress-fill.done { background: var(--teal); }
.progress-fill.danger { background: var(--red); }
.progress-num { width: 28px; color: var(--muted); text-align: right; font-size: 9px; }
.risk-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 21px; border-radius: 6px; font-size: 9px; font-weight: 800; }
.risk-high { color: #9b2d21; background: var(--red-soft); }
.risk-mid { color: #946018; background: var(--amber-soft); }
.risk-low { color: #17624e; background: var(--teal-soft); }
.next-cell { width: 170px; max-width: 170px; color: #53687a; line-height: 1.5; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.updated-cell { width: 84px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.updated-cell strong { color: #506477; font-size: 10px; }
.row-button { border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--blue); height: 28px; padding: 0 9px; white-space: nowrap; font-size: 10px; }
.row-button:hover { background: var(--blue-soft); border-color: #b7cde2; }
.empty-state { display: grid; place-items: center; padding: 70px 20px; text-align: center; color: var(--muted); }
.empty-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--gray-soft); color: #8da0b1; font-size: 24px; }
.empty-state h3 { margin: 10px 0 4px; color: var(--ink); font-size: 14px; }
.empty-state p { margin: 0; font-size: 10px; }
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; padding: 9px 11px; border: 1px solid #cfe0ed; border-radius: 10px; background: #edf6fb; box-shadow: 0 5px 14px rgba(47,111,167,.05); }
.bulk-count { color: #4d6578; font-size: 10px; white-space: nowrap; }
.bulk-count strong { color: var(--blue); font-size: 13px; }
.bulk-controls { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.bulk-controls select, .bulk-controls input { width: auto; min-width: 86px; max-width: 125px; height: 30px; font-size: 9px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; align-items: start; }
.dashboard-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-heading h2 { margin: 0; color: var(--navy); font-size: 13px; }
.card-heading p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.eyebrow-chip { color: #7e96a8; background: #eff4f7; border-radius: 5px; padding: 4px 6px; font-size: 8px; font-weight: 800; letter-spacing: .8px; }
.donut-layout { display: flex; align-items: center; gap: 23px; padding: 7px 4px 5px; }
.donut { position: relative; display: grid; place-items: center; width: 132px; height: 132px; flex: 0 0 132px; border-radius: 50%; background: conic-gradient(#1d7b68 0deg, #1d7b68 0deg, #2f6fa7 0deg, #2f6fa7 0deg, #b6453c 0deg); }
.donut::after { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: #fff; }
.donut-center { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.donut-center strong { color: var(--navy); font-size: 25px; }
.donut-center span { color: var(--muted); font-size: 9px; }
.donut-legend { display: flex; flex-direction: column; gap: 9px; flex: 1; }
.donut-legend-row { display: grid; grid-template-columns: 7px minmax(0, 1fr) 36px; gap: 7px; align-items: center; color: #687b8c; font-size: 10px; }
.donut-legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.donut-legend-row strong { text-align: right; color: var(--navy); font-size: 11px; }
.dept-bars { display: flex; flex-direction: column; gap: 13px; padding: 2px 3px; }
.dept-bar-row { display: grid; grid-template-columns: 57px minmax(0, 1fr) 38px; gap: 8px; align-items: center; }
.dept-bar-name { color: var(--navy); font-size: 10px; font-weight: 700; }
.dept-bar-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e9eff4; }
.dept-bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2f6fa7, #1d7b68); }
.dept-bar-rate { color: var(--muted); font-size: 9px; text-align: right; }
.risk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.risk-stat { padding: 14px 10px; border-radius: 9px; background: #f7f9fb; text-align: center; }
.risk-stat strong { display: block; margin-bottom: 4px; font-size: 21px; color: var(--navy); }
.risk-stat span { color: var(--muted); font-size: 9px; }
.risk-stat.high strong { color: var(--red); }
.risk-stat.mid strong { color: var(--amber); }
.risk-stat.low strong { color: var(--teal); }
.attention-list, .workload-list, .schedule-summary { display: flex; flex-direction: column; gap: 8px; }
.attention-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 8px; background: #f8fafb; }
.attention-row:hover { background: #f1f7fb; }
.attention-main { min-width: 0; }
.attention-title { overflow: hidden; color: var(--ink); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.attention-meta { margin-top: 3px; color: var(--muted); font-size: 8px; }
.attention-tag { color: var(--red); background: var(--red-soft); border-radius: 5px; padding: 3px 5px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.workload-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 25px; gap: 8px; align-items: center; }
.workload-name { overflow: hidden; color: #596e80; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.workload-track { height: 7px; overflow: hidden; border-radius: 999px; background: #edf2f5; }
.workload-fill { height: 100%; border-radius: inherit; background: #6f9bc0; }
.workload-count { color: var(--muted); font-size: 9px; text-align: right; }
.schedule-stat { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: 8px; background: #f8fafb; color: var(--muted); font-size: 10px; }
.schedule-stat strong { color: var(--navy); font-size: 13px; }
.right-rail { overflow: auto; padding: 21px 14px 24px 0; }
.rail-card { margin-bottom: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.rail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.rail-heading h2 { margin: 0; color: var(--navy); font-size: 13px; }
.rail-heading p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.live-badge { padding: 3px 5px; border-radius: 4px; color: var(--teal); background: var(--teal-soft); font-size: 7px; font-weight: 800; letter-spacing: .8px; }
.activity-card { max-height: 56vh; }
.activity-list { display: flex; flex-direction: column; gap: 12px; max-height: calc(56vh - 64px); overflow: auto; padding-right: 2px; }
.activity-item { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 8px; align-items: start; }
.activity-avatar { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #fff; font-size: 8px; font-weight: 800; }
.activity-title { color: var(--ink); font-size: 9px; line-height: 1.5; }
.activity-title strong { color: var(--blue); }
.activity-summary { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.activity-time { margin-top: 2px; color: #9aa7b2; font-size: 8px; }
.rail-alert-list { display: flex; flex-direction: column; gap: 7px; }
.rail-alert { display: flex; align-items: flex-start; gap: 7px; padding: 8px 9px; border-radius: 8px; background: #fafbfc; }
.rail-alert-icon { display: grid; place-items: center; width: 19px; height: 19px; flex: 0 0 19px; border-radius: 50%; color: var(--red); background: var(--red-soft); font-size: 10px; font-weight: 800; }
.rail-alert-text { color: #5c7183; font-size: 9px; line-height: 1.5; }
.rail-alert-text strong { color: var(--navy); }
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(10,25,39,.3); backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(650px, 96vw); display: flex; flex-direction: column; background: #f8fafb; box-shadow: -18px 0 46px rgba(10,25,39,.17); transform: translateX(105%); transition: transform .22s ease; }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 21px 15px; color: #fff; background: var(--navy); }
.drawer-eyebrow { margin-bottom: 4px; color: #8fc1d2; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; }
.drawer-head h2 { max-width: 520px; margin: 0; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { width: 32px; height: 32px; padding: 0; color: #fff; background: rgba(255,255,255,.12); font-size: 20px; line-height: 1; }
.drawer-tabs { display: flex; align-items: center; gap: 3px; padding: 0 21px; border-bottom: 1px solid var(--line); background: #fff; }
.drawer-tab { height: 40px; padding: 0 10px; border: 0; border-bottom: 2px solid transparent; color: #7b8d9d; background: transparent; font-size: 10px; }
.drawer-tab:hover { color: var(--navy); }
.drawer-tab.active { color: var(--navy); border-bottom-color: var(--blue); font-weight: 800; }
.drawer-tab span { display: inline-grid; place-items: center; min-width: 17px; height: 16px; margin-left: 3px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 8px; }
.drawer-body { flex: 1; overflow: auto; padding: 17px 21px 32px; }
.form-section { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid #e5ebf0; }
.form-section:last-of-type { border-bottom: 0; }
.form-section-title { margin-bottom: 10px; color: #8293a1; font-size: 9px; font-weight: 800; letter-spacing: .8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { color: #596f81; font-size: 10px; font-weight: 700; }
.span-2 { grid-column: span 2; }
.form-actions { position: sticky; bottom: -1px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 11px 0 10px; border-top: 1px solid #e2e9ef; background: #f8fafb; }
.save-note { color: var(--muted); font-size: 9px; }
.progress-label-row { display: flex; align-items: center; justify-content: space-between; color: #596f81; font-size: 10px; font-weight: 700; }
.progress-label-row strong { color: var(--teal); font-size: 13px; }
.progress-editor { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.progress-editor input[type="range"] { flex: 1; height: 22px; padding: 0; border: 0; box-shadow: none; accent-color: var(--teal); }
.progress-editor input[type="number"] { width: 64px; height: 34px; }
.progress-editor > span { color: var(--muted); font-size: 10px; }
.progress-shortcuts { display: flex; gap: 5px; margin-top: 5px; }
.progress-shortcuts button { height: 23px; padding: 0 7px; border: 1px solid #dce6ed; border-radius: 5px; color: #677d8f; background: #fff; font-size: 8px; }
.progress-shortcuts button:hover { color: var(--blue); border-color: #b7cde2; background: var(--blue-soft); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-heading h3 { margin: 0; color: var(--navy); font-size: 13px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.count-chip { display: grid; place-items: center; min-width: 23px; height: 20px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 9px; font-weight: 800; }
.comment-list { display: flex; flex-direction: column; gap: 8px; }
.comment-item { padding: 10px 11px; border: 1px solid #e3eaf0; border-radius: 9px; background: #fff; }
.comment-top { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; }
.comment-top strong { color: var(--navy); }
.comment-text { margin-top: 4px; color: var(--ink); font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.comment-form { display: flex; gap: 7px; margin-top: 11px; }
.comment-form input { flex: 1; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item { padding: 9px 10px; border-radius: 8px; color: #718393; background: #fff; border: 1px solid #e5ebf0; font-size: 9px; line-height: 1.5; }
.history-item strong { color: #50677a; }
.modal { width: min(410px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 17px; background: transparent; box-shadow: 0 28px 70px rgba(10,25,39,.26); }
.modal::backdrop { background: rgba(10,25,39,.38); backdrop-filter: blur(3px); }
.modal-card { padding: 25px; border-radius: 17px; background: #fff; }
.modal-mark { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 14px; border-radius: 13px; color: #fff; background: var(--navy); font-size: 18px; font-weight: 800; }
.modal h2 { margin: 0; color: var(--navy); font-size: 20px; }
.modal p { margin: 8px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.modal-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 16px; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 90; min-width: 170px; max-width: min(500px, calc(100vw - 28px)); transform: translate(-50%, 20px); padding: 10px 15px; border-radius: 9px; color: #fff; background: var(--navy); box-shadow: 0 12px 26px rgba(13,41,66,.22); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; font-size: 11px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--red); }
.loading { padding: 19px 5px; color: #99a6b1; font-size: 9px; text-align: center; }
@media (max-width: 1450px) {
  .app-frame { grid-template-columns: 215px minmax(0, 1fr); }
  .right-rail { display: none; }
  .kpi-grid { grid-template-columns: repeat(7, minmax(100px, 1fr)); }
}
@media (max-width: 1020px) {
  .topbar { gap: 12px; }
  .brand { width: 195px; flex-basis: 195px; }
  .global-search { max-width: none; }
  .app-frame { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding-left: 9px; padding-right: 9px; }
  .workspace { padding-left: 14px; padding-right: 14px; }
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filter-bar { align-items: flex-start; flex-direction: column; }
  .filter-controls { justify-content: flex-start; }
  .board { grid-template-columns: repeat(5, 220px); }
}
@media (max-width: 780px) {
  .topbar { height: auto; min-height: 64px; flex-wrap: wrap; padding: 10px 12px; }
  .brand { width: auto; flex: 1; }
  .global-search { order: 3; flex-basis: 100%; max-width: none; }
  .top-actions { gap: 5px; }
  .sync-pill, .online-wrap { display: none; }
  .app-frame { display: block; height: auto; }
  .sidebar { position: static; height: auto; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }
  .side-section, .side-cycle-card, .sidebar-footer { display: none; }
  .new-task-button { width: 100%; }
  .workspace { padding: 14px 10px 28px; }
  .workspace-head { align-items: flex-start; flex-direction: column; }
  .head-actions { padding-top: 0; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .bulk-bar { align-items: flex-start; flex-direction: column; }
  .bulk-controls { justify-content: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .drawer { width: 100vw; }
  .drawer-body { padding-left: 14px; padding-right: 14px; }
  .form-actions { align-items: flex-start; flex-direction: column; }
  .form-actions .primary-button { width: 100%; }
}

.cycle-rollover { width: 100%; height: 29px; margin-top: 9px; border: 1px solid #cfdee9; border-radius: 7px; color: var(--blue); background: #f6fafc; font-size: 9px; }
.cycle-rollover:hover { border-color: #a9c4d8; background: var(--blue-soft); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(9, 24, 38, .44); backdrop-filter: blur(4px); }
.task-dialog {
  position: fixed; left: 50%; top: 50%; z-index: 110;
  display: grid; grid-template-columns: minmax(0, 1fr) 268px; grid-template-rows: auto 43px minmax(0, 1fr);
  width: min(1120px, 94vw); height: min(820px, 90vh);
  overflow: hidden; border: 1px solid rgba(255,255,255,.35); border-radius: 22px; background: #f8fafb;
  box-shadow: 0 34px 100px rgba(7, 21, 35, .34), 0 12px 32px rgba(7, 21, 35, .18);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate(-50%, -48%) scale(.965);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.task-dialog.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.task-dialog .drawer-head { grid-column: 1 / -1; grid-row: 1; min-height: 76px; padding: 17px 24px 16px; background: linear-gradient(135deg, #0d2942, #173d5b 62%, #1f5269); }
.task-dialog .drawer-head h2 { display: -webkit-box; max-width: 940px; overflow: hidden; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.task-dialog .drawer-tabs { grid-column: 1; grid-row: 2; padding: 0 24px; }
.task-dialog .drawer-body { grid-column: 1; grid-row: 3; min-height: 0; padding: 19px 24px 24px; background: #f8fafb; }
.task-dialog .drawer-body > .task-tab-panel { min-height: 100%; }
.task-dialog .form-section { margin-bottom: 15px; padding-bottom: 13px; }
.task-dialog .form-section-title { margin-bottom: 8px; }
.task-dialog .form-grid { gap: 10px 12px; }
.task-dialog .form-actions { margin-top: 4px; }
.task-summary-rail {
  grid-column: 2; grid-row: 2 / 4; overflow: auto; padding: 21px 18px 20px;
  border-left: 1px solid #e1e8ee; background: linear-gradient(180deg, #f4f8fa 0%, #f8fafb 100%);
}
.summary-kicker { color: #8999a7; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; }
.summary-status-row { display: flex; align-items: center; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.summary-status, .summary-risk { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 7px; font-size: 9px; font-weight: 800; }
.summary-status { color: #285d91; background: var(--blue-soft); }
.summary-status.is-done { color: #17624e; background: var(--teal-soft); }
.summary-status.is-missed { color: #9b2d21; background: var(--red-soft); }
.summary-status.is-pending { color: #946018; background: var(--amber-soft); }
.summary-status.is-notstarted { color: #4b5563; background: var(--gray-soft); }
.summary-risk { color: #946018; background: var(--amber-soft); }
.summary-risk.is-high { color: #9b2d21; background: var(--red-soft); }
.summary-risk.is-low { color: #17624e; background: var(--teal-soft); }
.summary-progress-ring { --progress: 0; position: relative; display: grid; place-items: center; width: 126px; height: 126px; margin: 21px auto 19px; border-radius: 50%; background: conic-gradient(var(--teal) calc(var(--progress) * 1%), #e3ebf0 0); }
.summary-progress-ring::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #f7fafb; box-shadow: inset 0 0 0 1px #e4ebf0; }
.summary-progress-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.summary-progress-inner strong { color: var(--navy); font-size: 24px; line-height: 1.1; }
.summary-progress-inner span { margin-top: 3px; color: #8b9aa7; font-size: 8px; }
.summary-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 9px; }
.summary-info-grid div, .summary-update { min-width: 0; padding: 9px 10px; border: 1px solid #e3eaf0; border-radius: 8px; background: #fff; }
.summary-info-grid span, .summary-update span { display: block; color: #93a0ac; font-size: 8px; }
.summary-info-grid strong, .summary-update strong { display: block; overflow: hidden; margin-top: 4px; color: #43596c; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.summary-divider { height: 1px; margin: 15px 0; background: #e3eaf0; }
.summary-date-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 1px; color: #7f90a0; font-size: 9px; }
.summary-date-row strong { color: #4a6072; font-size: 10px; }
.summary-update { margin-top: 2px; }
.summary-update small { display: block; margin-top: 3px; color: #9aa7b2; font-size: 8px; }
.summary-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.summary-action { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 34px; padding: 0 10px; border: 1px solid #dce6ed; border-radius: 8px; color: #5c7385; background: #fff; font-size: 9px; }
.summary-action:hover { color: var(--blue); border-color: #b7cde2; background: var(--blue-soft); }
.summary-action b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 8px; }
.summary-note { margin-top: 13px; padding: 10px; border-left: 3px solid #d7a54b; border-radius: 5px 8px 8px 5px; color: #8a6a32; background: #fff7e8; font-size: 9px; line-height: 1.55; }
@media (max-width: 1050px) {
  .task-dialog { width: min(960px, 96vw); height: 91vh; grid-template-columns: minmax(0, 1fr) 236px; }
  .task-summary-rail { padding-left: 13px; padding-right: 13px; }
}
@media (max-width: 780px) {
  .task-dialog { left: 8px; top: 8px; width: calc(100vw - 16px); height: calc(100vh - 16px); grid-template-columns: 1fr; grid-template-rows: auto 43px minmax(0,1fr); transform: translate(0, 12px) scale(.98); border-radius: 16px; }
  .task-dialog.open { transform: translate(0, 0) scale(1); }
  .task-dialog .drawer-head { padding-left: 16px; padding-right: 16px; }
  .task-dialog .drawer-tabs { padding-left: 14px; padding-right: 14px; }
  .task-dialog .drawer-body { padding: 15px 14px 20px; }
  .task-summary-rail { display: none; }
}
.column-head { width: 100%; border: 0; border-bottom: 1px solid #e1e8ef; background: transparent; text-align: left; cursor: pointer; transition: background .16s; }
.column-head:hover { background: rgba(255,255,255,.56); }
.column-head-right { display: flex; align-items: center; gap: 8px; }
.focus-hint { color: #7791a7; font-size: 8px; font-weight: 600; white-space: nowrap; }
.column-head:hover .focus-hint { color: var(--blue); }
.board.focus-mode { grid-template-columns: minmax(0, 1fr); }
.board.focus-mode .board-column { min-width: 0; animation: focusExpand .22s ease-out; }
.board.focus-mode .column-head { background: #fff; padding-top: 13px; padding-bottom: 11px; }
.board.focus-mode .column-title { font-size: 13px; }
.board.focus-mode .column-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 10px; align-items: start; max-height: calc(100vh - 315px); padding: 11px; }
.board.focus-mode .board-card { min-height: 215px; padding: 14px; }
.board.focus-mode .card-title { -webkit-line-clamp: 4; font-size: 12px; }
.board.focus-mode .card-next { -webkit-line-clamp: 3; font-size: 10px; }
.board-column.is-focused { border-color: #bcd2e2; box-shadow: 0 9px 26px rgba(36, 78, 111, .09); }
@keyframes focusExpand { from { opacity: .55; transform: scale(.985); } to { opacity: 1; transform: scale(1); } }
/* Reference-inspired fintech SaaS theme */
:root {
  --navy: #11182f;
  --navy-2: #1b2442;
  --ink: #252a3c;
  --muted: #727a91;
  --line: #e5e8f1;
  --surface: #ffffff;
  --canvas: #f4f6fb;
  --teal: #1f9d7a;
  --teal-soft: #e9f8f3;
  --blue: #6758e5;
  --blue-soft: #efedff;
  --amber: #d9922f;
  --amber-soft: #fff5e4;
  --red: #de5361;
  --red-soft: #fdeef0;
  --gray-soft: #f4f5f9;
  --shadow: 0 12px 30px rgba(31, 38, 77, .065);
  --radius: 18px;
}
body {
  background:
    radial-gradient(circle at 18% -8%, rgba(103, 88, 229, .15), transparent 29%),
    radial-gradient(circle at 91% -2%, rgba(75, 114, 200, .11), transparent 26%),
    linear-gradient(180deg, #f7f8fc 0%, #f3f5fa 100%);
}
.topbar {
  height: 66px; background: rgba(255,255,255,.94); border-bottom-color: #e7e9f2;
  box-shadow: 0 1px 0 rgba(17,24,47,.015);
}
.app-frame { height: calc(100vh - 66px); grid-template-columns: 216px minmax(0, 1fr) 286px; }
.brand { width: 216px; flex-basis: 216px; }
.brand-mark {
  border-radius: 13px;
  background: radial-gradient(circle at 72% 24%, #9b8fff 0%, transparent 28%), linear-gradient(145deg, #242d59, #10172e 72%);
  box-shadow: 0 8px 20px rgba(50, 44, 128, .22);
}
.brand-title { color: #11182f; font-size: 15px; letter-spacing: .1px; }
.brand-subtitle { color: #9299ad; }
.global-search {
  height: 40px; border-color: #e5e7f0; border-radius: 999px; background: #f7f7fb;
  box-shadow: inset 0 1px 2px rgba(17,24,47,.02);
}
.global-search input { font-size: 12px; }
.global-search kbd { border-color: #e4e6ef; background: #fff; color: #8d93a5; }
.sync-pill { color: #697188; background: #f5f6fa; }
.sync-pill.online .sync-dot { background: #1f9d7a; box-shadow: 0 0 0 3px rgba(31,157,122,.1); }
.ghost-button { border-color: #e2e5ee; color: #30374d; }
.primary-button, .new-task-button, .view-switch button.active {
  background: linear-gradient(135deg, #1b2444, #11182f); box-shadow: 0 8px 18px rgba(17,24,47,.17);
}
.primary-button:hover, .new-task-button:hover { background: linear-gradient(135deg, #27315a, #151d39); }
.secondary-button { color: #343b52; background: #f6f7fb; border-color: #e1e4ed; }
.text-button { color: #6758e5; }
.sidebar { padding-top: 20px; background: rgba(251,251,254,.95); border-right-color: #e8eaf2; }
.side-label { color: #9a9fb1; letter-spacing: 1.15px; }
.side-item { height: 36px; border-radius: 9px; color: #596076; }
.side-item:hover { background: #f3f3f9; }
.side-item.active { color: #fff; background: #151c35; box-shadow: 0 7px 16px rgba(17,24,47,.13); }
.side-item.active b { color: #fff; background: rgba(255,255,255,.16); }
.side-item b { color: #7c8297; background: #f1f2f7; }
.side-cycle-card { border-color: #e5e8f1; border-radius: 14px; background: #fff; box-shadow: 0 8px 18px rgba(31,38,77,.045); }
.mini-progress { background: #ececf5; }
.mini-progress span { background: linear-gradient(90deg, #6758e5, #8b84f1); }
.cycle-rollover { color: #5d4fe0; border-color: #dcd9f7; background: #f8f7ff; }
.cycle-rollover:hover { border-color: #bbb5f0; background: #efedff; }
.workspace { padding-top: 22px; }
.workspace-head { margin-bottom: 16px; }
.title-line h1 { color: #11182f; font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.breadcrumb { color: #999fb1; }
.breadcrumb b { color: #737a8e; }
.count-pill { color: #5b4ddb; background: #efedff; }
#resultSummary { color: #858ca0; }
.view-switch { border-color: #e3e5ee; background: #fff; box-shadow: 0 4px 12px rgba(31,38,77,.035); }
.view-switch button { color: #777e92; }
.view-switch button.active { color: #fff; }
.icon-action { border-color: #e2e5ee; color: #6b7288; background: #fff; }
.kpi-grid { gap: 10px; margin-bottom: 14px; }
.kpi-card { position: relative; overflow: hidden; min-height: 93px; padding: 13px 14px; border-color: #e7e9f2; border-radius: 15px; background: #fff; box-shadow: 0 7px 18px rgba(31,38,77,.045); }
.kpi-card::after { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 8px; color: #6758e5; background: #f0eeff; font-size: 11px; font-weight: 800; }
.kpi-card:nth-child(1)::after { content: "▦"; }
.kpi-card:nth-child(2)::after { content: "✓"; color: #1f9d7a; background: #e9f8f3; }
.kpi-card:nth-child(3)::after { content: "◔"; color: #6758e5; background: #efedff; }
.kpi-card:nth-child(4)::after { content: "!"; color: #de5361; background: #fdeef0; }
.kpi-card:nth-child(5)::after { content: "⚠"; color: #de5361; background: #fdeef0; }
.kpi-card:nth-child(6)::after { content: "◷"; color: #d9922f; background: #fff5e4; }
.kpi-card:nth-child(7)::after { content: "%"; color: #4b72c8; background: #edf3ff; }
.kpi-label { color: #737b90; }
.kpi-value { color: #121a32; font-size: 25px; font-weight: 800; }
.kpi-value.info { color: #5d4fdf; }
.kpi-value.success { color: #198c6d; }
.kpi-value.warning { color: #cc8422; }
.kpi-value.danger { color: #d84c5b; }
.kpi-hint { color: #9a9fb1; }
.filter-bar { border-color: #e7e9f1; border-radius: 14px; background: #fff; box-shadow: 0 6px 16px rgba(31,38,77,.035); }
.quick-chip { color: #747b8f; }
.quick-chip:hover { background: #f5f4fb; }
.quick-chip.active { color: #5a4dd6; background: #efedff; }
.compact-field { color: #8b91a4; }
.compact-field select { border-color: #e5e7ef; background: #fbfbfd; }
.board { gap: 12px; }
.board-column { border-color: #e6e8f1; border-radius: 16px; background: #f0f2f9; }
.column-head { border-bottom-color: #e2e5ee; }
.column-head:hover { background: rgba(255,255,255,.72); }
.column-title { color: #4d546b; font-size: 11px; }
.column-count { color: #737a90; background: #fff; }
.focus-hint { color: #9398aa; }
.board-card { border-color: #e8eaf2; border-radius: 12px; box-shadow: 0 5px 13px rgba(31,38,77,.04); }
.board-card:hover { border-color: #c9c4f2; box-shadow: 0 10px 23px rgba(72,62,163,.09); }
.card-title { color: #252b3e; font-size: 12px; }
.card-meta, .card-side-meta { color: #8990a3; font-size: 8.5px; }
.card-next { color: #697186; font-size: 9.5px; }
.card-progress-track { background: #ececf4; }
.card-progress-fill { background: #6758e5; }
.board.focus-mode .board-column { border-color: #cfcaf0; box-shadow: 0 12px 30px rgba(62,53,139,.08); }
.list-card, .dashboard-card, .rail-card { border-color: #e7e9f1; border-radius: 16px; background: #fff; box-shadow: 0 9px 23px rgba(31,38,77,.045); }
.list-toolbar { border-bottom-color: #eceef4; }
.table-wrap { background: #fff; }
thead { background: #f6f7fb; }
th { color: #747b8f; border-bottom-color: #e4e6ee; }
td { border-bottom-color: #eef0f5; }
tbody tr:hover { background: #faf9ff; }
tbody tr.selected { background: #f1efff; }
.status-progress { color: #5748d3; background-color: #efedff; }
.progress-fill { background: #6758e5; }
.mini-chip.dept { color: #584acb; background: #efedff; }
.risk-high { color: #c94452; background: #fdeef0; }
.risk-mid { color: #b9781d; background: #fff5e4; }
.risk-low { color: #198c6d; background: #e9f8f3; }
.primary-button.small { background: linear-gradient(135deg, #1b2444, #11182f); }
.dashboard-grid { gap: 12px; }
.dashboard-card { padding: 16px; }
.card-heading h2, .rail-heading h2 { color: #141c34; }
.eyebrow-chip { color: #696f83; background: #f3f4f8; }
.donut-layout { gap: 22px; }
.donut::after { background: #fff; }
.dept-bar-track, .workload-track { background: #eeedf5; }
.dept-bar-fill { background: linear-gradient(90deg, #6758e5, #8d85ef); }
.workload-fill { background: linear-gradient(90deg, #9b8fff, #6758e5); }
.risk-stat { background: #f7f7fb; border: 1px solid #ececf3; }
.attention-row, .schedule-stat { border: 1px solid #ececf3; background: #fafafd; }
.attention-row:hover { background: #f3f1ff; }
.live-badge { color: #6655df; background: #efedff; }
.rail-card { padding: 16px; }
.drawer-head, .task-dialog .drawer-head { background: radial-gradient(circle at 86% 8%, rgba(124,104,255,.34), transparent 30%), linear-gradient(135deg, #11182f, #1b2442 65%, #29255b); }
.drawer-eyebrow { color: #a9a2ff; }
.drawer-tab.active { color: #5d4fdf; border-bottom-color: #6758e5; }
.task-dialog { border-color: rgba(255,255,255,.55); border-radius: 22px; background: #f8f8fc; box-shadow: 0 34px 100px rgba(20,24,55,.28), 0 12px 32px rgba(20,24,55,.14); }
.task-dialog .drawer-body { background: #f8f8fc; }
.task-summary-rail { border-left-color: #e3e4ef; background: linear-gradient(180deg, #f2f0ff 0%, #f7f7fc 53%, #fafafe 100%); }
.summary-kicker { color: #777e93; }
.summary-status { color: #5748d3; background: #efedff; }
.summary-risk { color: #b9781d; background: #fff5e4; }
.summary-progress-ring { background: conic-gradient(#6758e5 calc(var(--progress) * 1%), #e6e5f0 0); }
.summary-info-grid div, .summary-update { border-color: #e5e5ef; background: rgba(255,255,255,.88); }
.summary-action { border-color: #deddf0; background: rgba(255,255,255,.9); }
.summary-action:hover { color: #5d4fdf; border-color: #bfb8f2; background: #efedff; }
.summary-action b { color: #5d4fdf; background: #efedff; }
.summary-note { border-left-color: #a99fff; color: #7066a4; background: #f3f0ff; }
.form-actions { background: #f8f8fc; }
.modal-backdrop { background: rgba(19, 23, 48, .4); }
@media (max-width: 1450px) { .app-frame { grid-template-columns: 205px minmax(0, 1fr); } }
.progress-editor input[type="range"] { -webkit-appearance: none; appearance: none; height: 6px; padding: 0; border: 0; border-radius: 999px; background: #e6e7f0; box-shadow: none; accent-color: #6758e5; }
.progress-editor input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: transparent; }
.progress-editor input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 17px; height: 17px; margin-top: -5.5px; border: 3px solid #6758e5; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(64,52,163,.22); }
.progress-editor input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: transparent; }
.progress-editor input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 3px solid #6758e5; border-radius: 50%; background: #fff; }
[hidden] { display: none !important; }
.progress-label-row strong { color: #6758e5; }
@media (max-width: 780px) {
  .topbar { height: auto; min-height: 66px; flex-wrap: wrap; }
  .app-frame { display: block; height: auto; }
}
.new-task-button { margin: 7px 0 13px; }
.side-label-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 7px; }
.side-label-row .side-label { padding: 0; }
.side-head-actions { display: flex; align-items: center; gap: 4px; }
.side-head-actions button { padding: 0 1px; border: 0; color: #858ba0; background: transparent; font-size: 8px; white-space: nowrap; }
.side-head-actions button:hover { color: #5b4ed9; }
.custom-view-nav { display: flex; flex-direction: column; gap: 2px; }
.custom-view-item span::before { content: "◆"; margin-right: 6px; color: #8d82ee; font-size: 7px; }
.category-modal { width: min(760px, calc(100vw - 28px)); max-width: 760px; padding: 0; border: 0; border-radius: 20px; background: transparent; box-shadow: 0 30px 80px rgba(20,24,55,.28); }
.category-modal::backdrop { background: rgba(19,23,48,.42); backdrop-filter: blur(4px); }
.category-modal-card { overflow: hidden; border-radius: 20px; background: #f9f9fc; }
.category-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 19px 21px 17px; color: #fff; background: radial-gradient(circle at 86% 8%, rgba(124,104,255,.35), transparent 31%), linear-gradient(135deg, #11182f, #1b2442 65%, #29255b); }
.category-kicker { margin-bottom: 4px; color: #aaa3ff; font-size: 8px; font-weight: 800; letter-spacing: 1.2px; }
.category-modal-head h2 { margin: 0; font-size: 18px; }
.category-modal-head p { margin: 5px 0 0; color: rgba(255,255,255,.65); font-size: 9px; }
.category-tabs { display: flex; align-items: center; gap: 3px; padding: 0 20px; border-bottom: 1px solid #e5e7f0; background: #fff; }
.category-tab { height: 39px; padding: 0 10px; border: 0; border-bottom: 2px solid transparent; color: #7d8498; background: transparent; font-size: 10px; }
.category-tab.active { color: #5b4ddb; border-bottom-color: #6758e5; font-weight: 800; }
.category-modal-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; max-height: min(620px, calc(100vh - 180px)); overflow: auto; padding: 18px 20px 22px; }
.category-create-section, .category-list-section { min-width: 0; padding: 15px; border: 1px solid #e6e8f1; border-radius: 13px; background: #fff; }
.category-create-section h3, .category-list-section h3 { margin: 0 0 13px; color: #20273f; font-size: 12px; }
#categoryForm { display: flex; flex-direction: column; gap: 11px; }
.category-filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.category-filter-grid .field > span { font-size: 9px; }
.category-filter-grid .check-filter { height: 34px; }
.category-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.category-list-head span { color: #969cad; font-size: 8px; }
.category-list { display: flex; flex-direction: column; gap: 7px; }
.category-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 9px 10px; border: 1px solid #e8e9f1; border-radius: 9px; background: #fbfbfd; }
.category-row-main { min-width: 0; }
.category-row-name { overflow: hidden; color: #30374e; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.category-row-meta { margin-top: 3px; color: #9096a8; font-size: 8px; }
.category-delete { flex: 0 0 auto; height: 25px; padding: 0 8px; border: 1px solid #efd3d7; border-radius: 6px; color: #c94755; background: #fff6f7; font-size: 8px; }
.category-delete:hover:not(:disabled) { border-color: #e5aeb5; background: #fdeef0; }
.category-delete:disabled { color: #a4a9b6; border-color: #e5e6ec; background: #f5f5f8; opacity: 1; }
.category-system { flex: 0 0 auto; padding: 3px 6px; border-radius: 5px; color: #777e92; background: #f1f2f7; font-size: 7px; }
.empty-category { padding: 22px 8px; color: #969cad; text-align: center; font-size: 9px; }
@media (max-width: 720px) {
  .category-modal-body { grid-template-columns: 1fr; max-height: calc(100vh - 160px); }
  .category-filter-grid { grid-template-columns: 1fr; }
  .category-filter-grid .span-2 { grid-column: span 1; }
}
.check-filter { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 10px; border: 1px solid #e4e6ef; border-radius: 8px; color: #747b8f; background: #fbfbfd; font-size: 9px; }
.check-filter input { width: 15px; height: 15px; margin: 0; padding: 0; accent-color: #6758e5; }
.image-upload-zone { display: flex; align-items: center; gap: 11px; min-height: 60px; padding: 11px 13px; border: 1px dashed #c9c5ee; border-radius: 10px; background: #faf9ff; cursor: pointer; transition: border-color .16s, background .16s, box-shadow .16s; }
.image-upload-zone:hover, .image-upload-zone.drag-over { border-color: #6758e5; background: #f1efff; box-shadow: 0 0 0 3px rgba(103,88,229,.08); }
.image-upload-zone.disabled { cursor: not-allowed; opacity: .62; }
.upload-icon { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 31px; border-radius: 9px; color: #5d4fdf; background: #efedff; font-size: 20px; }
.upload-copy strong { display: block; color: #3f4058; font-size: 10px; }
.upload-copy span { display: block; margin-top: 3px; color: #9298aa; font-size: 8px; }
.image-upload-status { margin-top: 8px; padding: 7px 9px; border-radius: 7px; color: #5b4ed9; background: #efedff; font-size: 9px; }
.image-upload-status.error { color: #c94452; background: #fdeef0; }
.task-image-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.task-image-item { position: relative; overflow: hidden; min-width: 0; border: 1px solid #e2e3ee; border-radius: 9px; background: #fff; }
.task-image-thumb { display: block; width: 100%; aspect-ratio: 1.4 / 1; overflow: hidden; background: #f1f2f7; cursor: zoom-in; }
.task-image-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.task-image-item:hover .task-image-thumb img { transform: scale(1.035); }
.task-image-info { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 6px 7px; }
.task-image-info strong { overflow: hidden; color: #596076; font-size: 8px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.image-delete-btn { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; padding: 0; border: 0; border-radius: 5px; color: #c44c59; background: #fff0f2; font-size: 13px; }
.image-delete-btn:hover { background: #fde0e4; }
.image-empty { grid-column: 1 / -1; padding: 12px; border-radius: 8px; color: #969cad; background: #fafafd; text-align: center; font-size: 9px; }
.image-preview-dialog { width: min(1080px, 94vw); max-width: 1080px; padding: 0; border: 0; border-radius: 18px; background: transparent; box-shadow: 0 30px 90px rgba(9,14,30,.42); }
.image-preview-dialog::backdrop { background: rgba(9,14,30,.72); backdrop-filter: blur(4px); }
.image-preview-card { overflow: hidden; border-radius: 18px; background: #121727; }
.image-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 17px; color: #fff; background: #171d31; }
.image-preview-head strong { display: block; max-width: 800px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.image-preview-head span { display: block; margin-top: 3px; color: #8e96ad; font-size: 9px; }
.image-preview-stage { display: grid; place-items: center; min-height: 300px; max-height: calc(90vh - 66px); padding: 18px; background: radial-gradient(circle at 50% 30%, #202944, #0d1220 75%); }
.image-preview-stage img { max-width: 100%; max-height: calc(90vh - 110px); object-fit: contain; border-radius: 8px; }
@media (max-width: 780px) {
  .task-image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-preview-dialog { width: calc(100vw - 16px); max-width: none; }
}
.date-field-shell { position: relative; display: flex; align-items: center; gap: 0; }
.date-field-shell input { padding-right: 40px; background: #fff; }
.date-picker-trigger { position: absolute; right: 5px; display: grid; place-items: center; width: 29px; height: 29px; padding: 0; border: 0; border-radius: 7px; color: #6558d8; background: #f0eeff; }
.date-picker-trigger:hover { color: #fff; background: #6758e5; }
.date-picker-trigger svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.bulk-date-shell { min-width: 122px; max-width: 145px; }
.bulk-date-shell input { height: 30px; padding: 0 31px 0 8px; font-size: 9px; }
.bulk-date-shell .date-picker-trigger { right: 3px; width: 24px; height: 24px; }
.date-picker-popover { position: fixed; z-index: 180; width: 308px; padding: 12px; border: 1px solid #e2e2f0; border-radius: 15px; background: #fff; box-shadow: 0 20px 55px rgba(27,31,67,.22), 0 6px 18px rgba(27,31,67,.08); animation: datePopIn .16s ease-out; }
@keyframes datePopIn { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.date-picker-header { display: grid; grid-template-columns: 30px minmax(0, 1fr) 30px; align-items: center; gap: 7px; padding-bottom: 10px; border-bottom: 1px solid #ececf3; }
.date-nav-btn { display: grid; place-items: center; width: 29px; height: 29px; padding: 0; border: 1px solid #e5e4ee; border-radius: 8px; color: #5c5a73; background: #fff; font-size: 19px; line-height: 1; }
.date-nav-btn:hover { color: #5a4dd6; border-color: #cfc9f3; background: #f3f1ff; }
.date-selectors { display: flex; align-items: center; justify-content: center; gap: 4px; }
.date-selectors select { width: auto; min-width: 84px; height: 29px; padding: 0 22px 0 8px; border: 0; border-radius: 7px; color: #292f46; background: #f6f5fb; font-size: 10px; font-weight: 800; }
.date-selectors select:last-child { min-width: 64px; }
.date-weekdays, .date-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.date-weekdays { margin-top: 8px; }
.date-weekdays span { display: grid; place-items: center; height: 24px; color: #9a9fb0; font-size: 8px; font-weight: 700; }
.date-days { gap: 2px; }
.date-day { display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 9px; color: #3e4357; background: transparent; font-size: 9px; }
.date-day:hover { color: #5a4dd6; background: #efedff; }
.date-day.other-month { color: #c0c3ce; }
.date-day.today { color: #5a4dd6; outline: 1px solid #bdb6ee; background: #faf9ff; }
.date-day.selected { color: #fff; background: #6758e5; box-shadow: 0 4px 10px rgba(103,88,229,.23); }
.date-day.selected:hover { color: #fff; background: #5b4dd7; }
.date-picker-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #ececf3; }
.date-foot-btn { height: 29px; padding: 0 9px; border: 1px solid #e4e4ee; border-radius: 7px; color: #686d80; background: #fff; font-size: 9px; }
.date-foot-btn:hover { color: #5a4dd6; border-color: #c9c3ef; background: #f4f2ff; }
.date-foot-btn.danger { margin-left: auto; color: #c44c59; border-color: #f0d7da; background: #fff7f8; }
.date-confirm-btn { height: 29px; padding: 0 12px; border: 0; border-radius: 7px; color: #fff; background: linear-gradient(135deg, #1b2444, #11182f); font-size: 9px; font-weight: 700; }
@media (max-width: 500px) { .date-picker-popover { width: min(308px, calc(100vw - 20px)); } }
.board-column { overflow: hidden; }
.column-head { border-radius: 15px 15px 0 0; }
.board.focus-mode .column-head { border-radius: 15px 15px 0 0; }
.board.focus-mode .board-column.is-focused { background: #f0f2f9; }
.export-wrap { position: relative; }
.export-menu { position: absolute; top: calc(100% + 7px); right: 0; z-index: 60; display: flex; flex-direction: column; width: 176px; padding: 6px; border: 1px solid #e2e4ee; border-radius: 11px; background: #fff; box-shadow: 0 16px 40px rgba(22,26,57,.16); }
.export-menu button { height: 32px; padding: 0 9px; border: 0; border-radius: 7px; color: #4d556b; background: transparent; text-align: left; font-size: 9px; }
.export-menu button:hover { color: #584bd4; background: #f1efff; }
.export-divider { height: 1px; margin: 5px 2px; background: #ececf3; }
.import-dialog { width: min(780px, calc(100vw - 24px)); max-width: 780px; padding: 0; border: 0; border-radius: 19px; background: transparent; box-shadow: 0 28px 75px rgba(20,24,55,.28); }
.import-dialog::backdrop { background: rgba(19,23,48,.42); backdrop-filter: blur(4px); }
.import-card { overflow: hidden; border-radius: 19px; background: #f9f9fc; }
.import-body { padding: 17px 19px 19px; }
.import-drop { display: flex; align-items: center; gap: 12px; min-height: 74px; padding: 13px 16px; border: 1px dashed #c9c5ee; border-radius: 12px; background: #faf9ff; cursor: pointer; }
.import-drop:hover, .import-drop.drag-over { border-color: #6758e5; background: #f1efff; }
.import-drop-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; color: #5d4fdf; background: #efedff; font-size: 18px; }
.import-drop strong { display: block; color: #363b51; font-size: 10px; }
.import-drop > span:last-child { display: block; margin-top: 4px; color: #9298aa; font-size: 8px; }
.import-file-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; color: #72798c; font-size: 9px; }
.import-preview { max-height: 270px; overflow: auto; margin-top: 11px; border: 1px solid #e4e5ee; border-radius: 10px; background: #fff; }
.import-preview table { min-width: 100%; }
.import-preview th { position: sticky; top: 0; background: #f4f4f9; }
.import-preview td, .import-preview th { padding: 7px 8px; font-size: 8px; white-space: nowrap; }
.import-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.import-actions span { color: #7c8497; font-size: 9px; }
.import-actions .primary-button { min-width: 92px; }
@media (max-width: 600px) { .export-menu { right: -45px; } .import-actions { align-items: flex-start; flex-direction: column; } }
.file-subsection-title { margin: 16px 0 7px; color: #777e93; font-size: 9px; font-weight: 800; letter-spacing: .7px; }
.file-upload-zone { margin-top: 0; background: #f8f9fd; }
.task-file-list { display: flex; flex-direction: column; gap: 7px; margin-top: 9px; }
.task-file-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 8px 9px; border: 1px solid #e7e7f0; border-radius: 9px; background: #fff; }
.file-type-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #5b4dd7; background: #efedff; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.file-meta { min-width: 0; }
.file-name { overflow: hidden; color: #394056; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.file-sub { margin-top: 3px; color: #969cac; font-size: 8px; }
.file-actions { display: flex; align-items: center; gap: 4px; }
.file-download, .file-delete { display: grid; place-items: center; height: 25px; padding: 0 7px; border-radius: 6px; font-size: 8px; text-decoration: none; }
.file-download { color: #5b4dd7; border: 1px solid #dcd8f5; background: #f7f5ff; }
.file-download:hover { background: #efedff; }
.file-delete { border: 1px solid #f0d7da; color: #c44c59; background: #fff7f8; }
.file-empty { padding: 10px; border-radius: 8px; color: #969cad; background: #fafafd; text-align: center; font-size: 9px; }
.user-menu-wrap { position: relative; }
.user-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; width: 176px; padding: 7px; border: 1px solid #e2e4ee; border-radius: 11px; background: #fff; box-shadow: 0 16px 40px rgba(22,26,57,.16); }
.user-menu-head { padding: 8px 9px 9px; border-bottom: 1px solid #ececf3; }
.user-menu-head strong { display: block; color: #252b3f; font-size: 10px; }
.user-menu-head span { display: block; margin-top: 3px; color: #8b91a4; font-size: 8px; }
.user-menu > button { width: 100%; height: 32px; margin-top: 5px; border: 0; border-radius: 7px; color: #5f667a; background: transparent; text-align: left; padding: 0 9px; font-size: 9px; }
.user-menu > button:hover { color: #584bd4; background: #f1efff; }
.auth-modal { width: min(430px, calc(100vw - 28px)); }
.auth-card { padding: 25px; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .modal-mark { margin: 0; }
.auth-brand h2 { margin: 0; color: #151d35; font-size: 20px; }
.auth-brand p { margin: 5px 0 0; color: #8c93a5; font-size: 9px; }
.auth-tabs { display: flex; gap: 4px; margin: 19px 0 14px; padding: 4px; border-radius: 9px; background: #f4f4f9; }
.auth-tabs button { flex: 1; height: 31px; border: 0; border-radius: 7px; color: #747b8f; background: transparent; font-size: 10px; }
.auth-tabs button.active { color: #fff; background: #151d35; font-weight: 800; }
#userForm { display: flex; flex-direction: column; gap: 11px; }
.auth-message { min-height: 16px; margin: 0; color: #c34856; font-size: 9px; line-height: 1.5; }
.auth-message.success { color: #1e8c70; }
.auth-submit { width: 100%; height: 38px; }
.auth-hint { margin: 14px 0 0; color: #9197a8; font-size: 8px; line-height: 1.6; }
.management-dialog { width: min(860px, calc(100vw - 24px)); max-width: 860px; padding: 0; border: 0; border-radius: 19px; background: transparent; box-shadow: 0 28px 75px rgba(20,24,55,.28); }
.management-dialog::backdrop { background: rgba(19,23,48,.44); backdrop-filter: blur(4px); }
.management-card { overflow: hidden; border-radius: 19px; background: #f9f9fc; }
.management-summary { display: flex; gap: 9px; flex-wrap: wrap; padding: 15px 18px 0; }
.management-stat { min-width: 110px; padding: 10px 12px; border: 1px solid #e6e8f1; border-radius: 10px; background: #fff; }
.management-stat strong { display: block; color: #20273f; font-size: 20px; }
.management-stat span { color: #8c93a5; font-size: 8px; }
.management-list { display: flex; flex-direction: column; gap: 8px; max-height: min(520px, calc(100vh - 220px)); overflow: auto; padding: 14px 18px 19px; }
.management-user { display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid #e5e7ef; border-radius: 10px; background: #fff; }
.management-user-name strong { display: block; color: #30374e; font-size: 10px; }
.management-user-name span { display: block; margin-top: 3px; color: #9197a8; font-size: 8px; }
.management-user select { height: 31px; font-size: 9px; }
.management-empty { padding: 35px; color: #9298aa; text-align: center; font-size: 10px; }
@media (max-width: 620px) { .management-user { grid-template-columns: 1fr 1fr; } .management-user-name { grid-column: 1 / -1; } }

/* v2.1 task quick actions and interactive KPI filters */
button.kpi-card {
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
button.kpi-card:hover {
  transform: translateY(-2px);
  border-color: #c9c4ee;
  box-shadow: 0 12px 26px rgba(64, 54, 143, .10);
}
button.kpi-card:focus-visible {
  outline: 3px solid rgba(103, 88, 229, .18);
  outline-offset: 2px;
}
button.kpi-card.active {
  border-color: #bdb6ee;
  background: linear-gradient(145deg, #ffffff 30%, #f3f1ff 100%);
  box-shadow: 0 0 0 3px rgba(103, 88, 229, .07), 0 12px 28px rgba(64, 54, 143, .12);
}
button.kpi-card.active .kpi-hint::after {
  content: " · 正在查看";
  color: #6254d8;
  font-weight: 700;
}
.card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #ececf3;
}
.card-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 25px;
  padding: 0 8px;
  border: 1px solid #e2e4ed;
  border-radius: 7px;
  color: #697083;
  background: #fafafd;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: color .14s, border-color .14s, background .14s;
}
.card-quick-btn span { font-size: 10px; line-height: 1; }
.card-quick-btn.complete { color: #187c64; border-color: #cce8df; background: #f2fbf8; }
.card-quick-btn.complete:hover:not(:disabled) { border-color: #93d2c0; background: #e8f8f3; }
.card-quick-btn.danger { color: #bf4d5a; border-color: #f0d8dc; background: #fff7f8; }
.card-quick-btn.danger:hover { border-color: #e6adb5; background: #fdeef0; }
.card-quick-btn:disabled { color: #8a91a2; border-color: #e7e8ee; background: #f4f4f8; opacity: 1; cursor: default; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.row-button.complete { color: #187c64; border-color: #cce8df; background: #f2fbf8; }
.row-button.complete:hover { border-color: #93d2c0; background: #e8f8f3; }
.row-button.danger { color: #bf4d5a; border-color: #f0d8dc; background: #fff7f8; }
.row-button.danger:hover { border-color: #e6adb5; background: #fdeef0; }
th:last-child, td:last-child { width: 146px; min-width: 146px; }

/* v2.2 multi-value pickers, department tree and cycle date controls */
.multi-field { min-width: 0; }
.multi-field > span { display: flex; align-items: center; gap: 6px; }
.multi-field > span small { color: #8a90a4; font-size: 8px; font-weight: 600; }
.multi-picker { position: relative; z-index: 12; }
.multi-picker summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #30364d;
  background: #fff;
  cursor: pointer;
  list-style: none;
  transition: border-color .16s, box-shadow .16s;
}
.multi-picker summary::-webkit-details-marker { display: none; }
.multi-picker summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.multi-picker summary i { color: #8b90a3; font-size: 12px; font-style: normal; transition: transform .16s; }
.multi-picker[open] { z-index: 140; }
.multi-field:has(.multi-picker[open]) { position: relative; z-index: 140; }
.multi-picker[open] summary { border-color: #9f99df; box-shadow: 0 0 0 3px rgba(103,88,229,.09); }
.multi-picker[open] summary i { transform: rotate(180deg); }
.multi-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  padding: 6px;
  overflow: hidden;
  border: 1px solid #dfe1eb;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(24,28,61,.18);
}
.multi-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  margin-bottom: 5px;
  padding: 0 8px;
  border: 1px solid #e6e5ef;
  border-radius: 8px;
  background: #fafafd;
}
.multi-search-box > span { color: #8f93a6; font-size: 15px; }
.multi-search-box input {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 9px;
}
.multi-search-box small { color: #9b9fb0; font-size: 8px; white-space: nowrap; }
.multi-options-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 154px;
  overflow: auto;
  padding-right: 1px;
}
.owner-grid-menu {
  left: auto;
  right: 0;
  width: min(420px, calc(100vw - 40px));
}
.owner-grid-menu .multi-options-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 3px;
  max-height: 176px;
}
.multi-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 30px;
  padding: 0 6px;
  border-radius: 7px;
  color: #555d72;
  cursor: pointer;
  font-size: 9px;
}
.owner-grid-menu .multi-option { gap: 5px; padding: 0 5px; }
.multi-option:hover { background: #f5f3ff; }
.multi-option[hidden] { display: none; }
.multi-option input { position: absolute; opacity: 0; pointer-events: none; }
.multi-option-check {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1px solid #d8d9e4;
  border-radius: 5px;
  color: transparent;
  background: #fff;
  font-size: 9px;
  font-weight: 900;
}
.multi-option input:checked + .multi-option-check { color: #fff; border-color: #6758e5; background: #6758e5; }
.multi-option-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-no-match { grid-column: 1 / -1; padding: 18px 8px; color: #9b9fb0; text-align: center; font-size: 9px; }
.multi-menu-footer { display: flex; gap: 6px; margin-top: 5px; padding-top: 5px; border-top: 1px solid #eeeef5; }
.multi-clear, .multi-done { flex: 1; height: 29px; margin: 0; border-radius: 7px; font-size: 8px; }
.multi-clear { border: 1px solid #e7dadd; color: #9a6570; background: #fffafb; }
.multi-clear:hover { color: #c44c59; border-color: #e8bfc5; background: #fff3f5; }
.multi-done { border: 0; color: #fff; background: #6758e5; font-weight: 700; }
.multi-done:hover { background: #584bd4; }
@media (max-width: 620px) {
  .owner-grid-menu { left: 0; right: 0; width: auto; }
  .owner-grid-menu .multi-options-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.dept-tree-group { display: flex; flex-direction: column; gap: 1px; }
.dept-tree-row { display: flex; align-items: center; gap: 4px; }
.dept-tree-toggle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin-left: 1px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #8d93a5;
  background: transparent;
  transition: color .16s, border-color .16s, background .16s, box-shadow .16s;
}
.dept-tree-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.dept-tree-toggle[aria-expanded="true"] { color: #5d4fe0; border-color: #dedaf8; background: #f0eeff; box-shadow: 0 3px 9px rgba(93,79,224,.08); }
.dept-tree-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.dept-tree-toggle:hover { color: #5d4fe0; border-color: #e5e2f7; background: #f5f3ff; }
.dept-parent { flex: 1; min-width: 0; }
.dept-parent span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-subnav { display: flex; flex-direction: column; gap: 1px; margin: 1px 0 4px 32px; padding-left: 8px; border-left: 1px solid #e8e8f1; }
.team-subnav[hidden] { display: none; }
.team-side-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 29px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  color: #7b8194;
  background: transparent;
  text-align: left;
  font-size: 9px;
}
.team-side-item:hover { color: #4d556a; background: #f4f4fa; }
.team-side-item.active { color: #5749cf; background: #efedff; font-weight: 800; }
.team-side-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-side-item b { color: #8a90a3; background: transparent; font-size: 8px; }
.team-empty { padding: 6px 8px 7px; color: #adb1bf; font-size: 8px; }
.cycle-date-view { display: flex; flex-direction: column; gap: 4px; margin: 0 0 8px; color: #8d93a6; font-size: 8px; font-weight: 700; }
.cycle-date-shell input { height: 29px; padding: 0 31px 0 8px; border-color: #e4e5ef; background: #fafafd; font-size: 9px; }
.cycle-date-shell .date-picker-trigger { right: 3px; width: 24px; height: 24px; }
.rollover-panel { margin-top: 8px; padding: 10px; border: 1px solid #dedbf5; border-radius: 10px; background: linear-gradient(150deg, #fbfaff, #f4f2ff); }
.rollover-panel[hidden] { display: none; }
.rollover-panel-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 9px; }
.rollover-panel-head strong { color: #33394e; font-size: 9px; }
.rollover-panel-head span { color: #888fa3; font-size: 8px; }
.rollover-date-label { display: block; margin-bottom: 4px; color: #7e8498; font-size: 8px; font-weight: 700; }
.rollover-panel .date-field-shell input { height: 31px; font-size: 9px; }
.rollover-target-preview { display: flex; flex-direction: column; gap: 2px; margin-top: 7px; padding: 8px; border-radius: 8px; color: #9398aa; background: rgba(255,255,255,.72); font-size: 8px; }
.rollover-target-preview.ready { color: #656b7f; }
.rollover-target-preview strong { color: #5b4dd7; font-size: 10px; }
.rollover-target-preview span { color: #7d8397; }
.rollover-target-preview small { color: #9a9fb0; }
.rollover-panel-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 8px; }
.rollover-panel-actions .primary-button { height: 28px; font-size: 9px; }
.owner-avatar-stack { display: inline-flex; align-items: center; flex: 0 0 auto; }
.owner-stack-avatar { border: 2px solid #fff; }
.owner-stack-avatar + .owner-stack-avatar { margin-left: -6px; }
.card-owner .owner-label { max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-cell { min-width: 0; max-width: 150px; }
.owner-cell > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* v2.4 arbitrary date range picker */
.date-picker-popover:has(.date-range-tools:not([hidden])) { width: min(342px, calc(100vw - 20px)); }
.date-range-tools { display: flex; flex-direction: column; gap: 9px; margin-bottom: 11px; padding-bottom: 11px; border-bottom: 1px solid #ececf3; }
.date-range-tools[hidden] { display: none; }
.date-range-title { display: flex; flex-direction: column; gap: 3px; }
.date-range-title strong { color: #2b3148; font-size: 10px; }
.date-range-title span { color: #6b7084; font-size: 9px; }
.date-range-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.date-range-presets button { height: 28px; border: 1px solid #e5e4ee; border-radius: 7px; color: #666b7e; background: #fff; font-size: 8px; font-weight: 700; }
.date-range-presets button:hover { color: #584bd4; border-color: #cfc9f3; background: #f4f2ff; }
.date-range-hint { color: #9a9fb0; font-size: 8px; line-height: 1.5; }
.date-day.in-range { color: #5347c8; border-radius: 0; background: #eeebff; }
.date-day.in-range:hover { color: #fff; background: #7567e9; }
.date-day.range-start, .date-day.range-end { color: #fff; background: #6758e5; box-shadow: 0 4px 10px rgba(103,88,229,.2); }
.date-day.range-start { border-radius: 9px 0 0 9px; }
.date-day.range-end { border-radius: 0 9px 9px 0; }
.date-day.range-start.range-end { border-radius: 9px; }

/* v2.4 department team management */
.team-subnav-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 5px 3px; color: #a0a4b3; font-size: 8px; }
.team-subnav-head button { height: 22px; padding: 0 5px; border: 0; border-radius: 5px; color: #6254d8; background: transparent; font-size: 8px; }
.team-subnav-head button:hover { background: #efedff; }
.team-side-row { display: flex; align-items: center; gap: 1px; }
.team-side-row .team-side-item { flex: 1; min-width: 0; }
.team-delete-btn { display: grid; place-items: center; width: 21px; height: 23px; flex: 0 0 21px; padding: 0; border: 0; border-radius: 6px; color: #b6a7ac; background: transparent; font-size: 12px; opacity: 0; transition: opacity .14s, color .14s, background .14s; }
.team-side-row:hover .team-delete-btn, .team-delete-btn:focus-visible { opacity: 1; }
.team-delete-btn:hover { color: #c44c59; background: #fff1f3; }

/* v2.4 custom team delete confirmation */
.team-delete-dialog { width: min(470px, calc(100vw - 24px)); max-width: 470px; padding: 0; border: 0; border-radius: 20px; background: transparent; box-shadow: 0 30px 90px rgba(17,21,45,.30); }
.team-delete-dialog::backdrop { background: rgba(16,20,40,.48); backdrop-filter: blur(5px); }
.team-delete-card { overflow: hidden; padding: 22px; border-radius: 20px; background: #fff; }
.team-delete-head { display: grid; grid-template-columns: 42px minmax(0, 1fr) 32px; gap: 12px; align-items: start; }
.team-delete-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #c84957; background: #fff0f2; font-size: 19px; font-weight: 900; box-shadow: inset 0 0 0 1px #f5d5da; }
.team-delete-kicker { color: #c45a66; font-size: 8px; font-weight: 800; letter-spacing: 1.1px; }
.team-delete-head h2 { margin: 3px 0 0; color: #20263d; font-size: 18px; letter-spacing: -.3px; }
.team-delete-head p { margin: 4px 0 0; color: #9297aa; font-size: 9px; }
.team-delete-head .icon-button { width: 30px; height: 30px; color: #777d90; background: #f5f5f9; }
.team-delete-copy { margin: 16px 0 12px; color: #686f82; font-size: 10px; line-height: 1.65; }
.team-delete-target { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 11px; border: 1px solid #e8e8f0; border-radius: 12px; background: #fafafd; }
.team-delete-target div { min-width: 0; }
.team-delete-target span { display: block; color: #969bad; font-size: 8px; }
.team-delete-target strong { display: block; margin-top: 5px; overflow: hidden; color: #3c4259; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.team-delete-warning { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; padding: 10px 12px; border-left: 3px solid #e9b7bd; border-radius: 0 9px 9px 0; color: #8a6b70; background: #fff7f8; font-size: 8px; line-height: 1.5; }
.team-delete-warning strong { color: #9c4e58; font-size: 9px; }
.team-delete-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; padding-top: 15px; border-top: 1px solid #eeeef4; }
.team-delete-actions button { height: 34px; padding: 0 15px; border-radius: 8px; font-size: 9px; font-weight: 700; }
.danger-confirm-button { border: 0; color: #fff; background: linear-gradient(135deg, #d65764, #b93646); box-shadow: 0 7px 16px rgba(185,54,70,.22); }
.danger-confirm-button:hover { filter: brightness(1.04); }
.danger-confirm-button:disabled { opacity: .62; box-shadow: none; }
@media (max-width: 520px) { .team-delete-card { padding: 17px; } .team-delete-actions { flex-direction: column-reverse; } .team-delete-actions button { width: 100%; } }

/* v2.5 unified glass scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 113, 137, .28) transparent;
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-button,
*::-webkit-scrollbar-button:single-button,
*::-webkit-scrollbar-button:double-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}
*::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  min-height: 38px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(110, 113, 137, .28);
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(103, 88, 229, .44);
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:active {
  background: rgba(103, 88, 229, .58);
  background-clip: content-box;
}
*::-webkit-scrollbar-corner {
  background: transparent;
}
:where(.sidebar, .workspace, .board, .column-cards, .table-wrap, .right-rail, .activity-list, .drawer-body, .task-summary-rail, .category-modal-body, .import-preview, .management-list, .multi-options-grid) {
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 118, 143, .24) transparent;
}
:where(.sidebar, .workspace, .board, .column-cards, .table-wrap, .right-rail, .activity-list, .drawer-body, .task-summary-rail, .category-modal-body, .import-preview, .management-list, .multi-options-grid)::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

/* v2.6 user department and team assignment */
.management-dialog { width: min(1080px, calc(100vw - 24px)); max-width: 1080px; }
.management-help { margin: 10px 18px 0; padding: 10px 12px; border: 1px solid #e6e1fb; border-radius: 9px; color: #6c6592; background: #f7f5ff; font-size: 8px; line-height: 1.55; }
.management-help b { color: #5749cf; }
.management-user { grid-template-columns: minmax(165px, 1fr) minmax(600px, 2.25fr); align-items: start; }
.management-user-name { padding-top: 9px; }
.management-user-name small { display: block; margin-top: 6px; color: #6e63c8; font-size: 8px; font-weight: 700; }
.management-user-fields { display: grid; grid-template-columns: repeat(4, minmax(118px, 1fr)); gap: 7px; min-width: 0; }
.management-user-fields label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.management-user-fields label > span { color: #9398aa; font-size: 7px; font-weight: 700; letter-spacing: .3px; }
.management-user-fields select { width: 100%; min-width: 0; height: 31px; font-size: 8.5px; }
@media (max-width: 980px) {
  .management-user { grid-template-columns: 1fr; }
  .management-user-name { padding-top: 0; }
  .management-user-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .management-user-fields { grid-template-columns: 1fr; }
  .management-help { margin-left: 12px; margin-right: 12px; }
}

/* v2.7 MCP agent integration */
.assistant-integration-dialog { width: min(760px, calc(100vw - 24px)); max-width: 760px; padding: 0; border: 0; border-radius: 20px; background: transparent; box-shadow: 0 30px 85px rgba(17,21,45,.30); }
.assistant-integration-dialog::backdrop { background: rgba(16,20,40,.48); backdrop-filter: blur(5px); }
.assistant-integration-card { overflow: hidden; border-radius: 20px; background: #f8f8fc; }
.assistant-integration-head { background: linear-gradient(135deg, #171e38 0%, #2f2a71 65%, #6758e5 100%); }
.assistant-integration-head h2 { color: #fff; }
.assistant-integration-head p { color: rgba(235,234,255,.74); }
.assistant-integration-head .category-kicker { color: rgba(210,207,255,.78); }
.assistant-integration-head .icon-button { color: #fff; border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.10); }
.assistant-integration-body { max-height: min(720px, calc(100vh - 100px)); overflow: auto; padding: 18px 20px 20px; }
.assistant-token-status { padding: 11px 13px; border: 1px solid #e2e1ef; border-radius: 10px; color: #666d82; background: #fff; font-size: 9px; line-height: 1.55; }
.assistant-token-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.assistant-token-actions .secondary-button.small { height: 32px; font-size: 9px; }
.assistant-token-warning { margin-top: 10px; padding: 9px 11px; border-left: 3px solid #df9a45; border-radius: 0 8px 8px 0; color: #815e2f; background: #fff8e9; font-size: 8px; }
.assistant-token-value { width: 100%; min-height: 64px; margin-top: 8px; padding: 10px; border: 1px solid #ddd9f4; border-radius: 9px; color: #4e43b7; background: #f6f4ff; font-family: Consolas,monospace; font-size: 9px; line-height: 1.55; resize: vertical; }
.assistant-integration-section { margin-top: 15px; padding: 14px; border: 1px solid #e5e6ef; border-radius: 12px; background: #fff; }
.assistant-integration-section h3 { margin: 0 0 6px; color: #30374e; font-size: 11px; }
.assistant-integration-section p { margin: 0 0 9px; color: #797f93; font-size: 8.5px; line-height: 1.6; }
.assistant-mcp-config { max-height: 230px; margin: 0; overflow: auto; padding: 12px; border-radius: 9px; color: #d8d3ff; background: #171d31; white-space: pre-wrap; word-break: break-word; font-family: Consolas,monospace; font-size: 8.5px; line-height: 1.6; }
.assistant-integration-actions { display: flex; justify-content: flex-end; gap: 5px; margin-top: 7px; }
.assistant-mcp-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.assistant-mcp-tools div { padding: 10px; border-radius: 9px; background: #f7f7fb; }
.assistant-mcp-tools strong { display: block; color: #5549c8; font-size: 8.5px; font-family: Consolas,monospace; }
.assistant-mcp-tools span { display: block; margin-top: 5px; color: #858a9d; font-size: 7.5px; line-height: 1.5; }
.assistant-integration-note { margin-top: 12px; padding: 10px 12px; border-radius: 9px; color: #7f6b54; background: #fff7ea; font-size: 8px; line-height: 1.6; }
@media (max-width: 620px) { .assistant-integration-body { padding: 14px; } .assistant-mcp-tools { grid-template-columns: 1fr; } }

/* v2.9 batch assignment and department removal */
.bulk-multi-field { display: flex; align-items: center; gap: 5px; min-width: 0; }
.bulk-multi-field > span { color: #718395; font-size: 8px; font-weight: 700; white-space: nowrap; }
.bulk-picker { width: 120px; min-width: 108px; max-width: 148px; }
.bulk-picker summary { height: 30px; padding: 0 8px; border-radius: 7px; }
.bulk-picker summary span { font-size: 8.5px; }
.bulk-picker .multi-picker-menu { left: 0; right: auto; width: 280px; }
.bulk-picker.owner-grid-menu .multi-picker-menu { width: 310px; }
.bulk-delete-button { height: 30px; padding: 0 9px; border: 1px solid #efd0d5; border-radius: 7px; color: #bf4d5a; background: #fff5f6; font-size: 9px; font-weight: 800; white-space: nowrap; }
.bulk-delete-button:hover { border-color: #dfadb5; background: #fdeef0; }
.bulk-delete-button:disabled { opacity: .55; cursor: wait; }
@media (max-width: 780px) { .bulk-multi-field { width: 100%; } .bulk-picker { flex: 1; width: auto; max-width: none; } }

/* v2.9.2 mentions and notifications */
.notification-wrap { position: relative; }
.notification-button { position: relative; display: inline-flex; align-items: center; gap: 5px; }
.notification-bell { color: #6758e5; font-size: 12px; }
.notification-count { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border: 2px solid #f7f8fc; border-radius: 999px; color: #fff; background: #d95462; font-size: 7px; line-height: 1; }
.notification-menu { position: absolute; top: calc(100% + 9px); right: 0; z-index: 95; width: 350px; overflow: hidden; border: 1px solid #e2e4ee; border-radius: 13px; background: #fff; box-shadow: 0 18px 45px rgba(22,26,57,.18); }
.notification-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 13px; border-bottom: 1px solid #ececf3; background: #fbfbfd; }
.notification-head strong { display: block; color: #2c334b; font-size: 10px; }
.notification-head span { display: block; margin-top: 3px; color: #969cad; font-size: 7.5px; }
.notification-head .text-button { font-size: 8px; white-space: nowrap; }
.notification-list { display: flex; flex-direction: column; gap: 2px; max-height: min(440px, 65vh); overflow: auto; padding: 6px; }
.notification-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; align-items: start; width: 100%; padding: 9px; border: 1px solid transparent; border-radius: 9px; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.notification-item:hover { border-color: #e5e2fb; background: #f8f7ff; }
.notification-item.unread { border-color: #e9e5ff; background: #faf9ff; }
.notification-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #6657db; background: #efedff; font-size: 11px; font-weight: 800; }
.notification-icon.mention { color: #b16e1e; background: #fff4df; }
.notification-icon.deleted { color: #bf4d5a; background: #fff0f2; }
.notification-main { min-width: 0; }
.notification-main strong { display: block; overflow: hidden; color: #3a4159; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.notification-main span { display: block; margin-top: 3px; color: #787f94; font-size: 8px; line-height: 1.45; }
.notification-main small { display: block; margin-top: 4px; color: #a2a6b4; font-size: 7px; }
.notification-unread-dot { width: 6px; height: 6px; margin-top: 5px; border-radius: 50%; background: #6758e5; }
.notification-empty { padding: 30px 16px; color: #989dae; text-align: center; font-size: 8.5px; }
.comment-input-wrap { position: relative; flex: 1; min-width: 0; }
.comment-input-wrap input { width: 100%; padding-right: 58px; }
.mention-trigger { position: absolute; top: 50%; right: 6px; height: 25px; padding: 0 8px; transform: translateY(-50%); border: 1px solid #ddd7fa; border-radius: 6px; color: #5b4dd7; background: #f5f2ff; font-size: 8px; font-weight: 800; cursor: pointer; }
.mention-trigger:hover { background: #efedff; }
.mention-menu { position: absolute; right: 0; bottom: calc(100% + 7px); z-index: 150; width: 250px; max-height: 260px; overflow: auto; padding: 6px; border: 1px solid #e0e1eb; border-radius: 11px; background: #fff; box-shadow: 0 16px 35px rgba(24,28,61,.18); }
.mention-menu-head { padding: 5px 7px 7px; color: #9499aa; font-size: 7.5px; }
.mention-option { display: flex; align-items: center; gap: 7px; width: 100%; padding: 6px 7px; border: 0; border-radius: 7px; color: #555d74; background: transparent; text-align: left; font-size: 8.5px; cursor: pointer; }
.mention-option:hover { color: #5548c9; background: #f3f1ff; }
.mention-avatar { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 7px; color: #fff; background: #7b6ce6; font-size: 7px; font-weight: 800; }
.comment-mention { padding: 1px 3px; border-radius: 4px; color: #594bd4; background: #efedff; font-weight: 700; }
@media (max-width: 780px) { .notification-menu { position: fixed; top: 70px; right: 10px; left: 10px; width: auto; } .notification-list { max-height: 60vh; } }
.mcp-entry-button { color: #d9d4ff; border-color: rgba(159,148,255,.28); background: rgba(103,88,229,.12); }
.mcp-entry-button:hover { color: #fff; border-color: rgba(178,168,255,.45); background: rgba(103,88,229,.24); }
.bulk-team-field { display: flex; align-items: center; gap: 5px; }
.bulk-team-field > span { color: #718395; font-size: 8px; font-weight: 700; white-space: nowrap; }
.bulk-team-field select { width: 94px; min-width: 94px; max-width: 120px; height: 30px; font-size: 9px; }

/* v2.9.5 compact mention picker */
.mention-menu { top: calc(100% + 7px); bottom: auto; width: min(460px, calc(100vw - 28px)); max-height: 360px; padding: 0; overflow: hidden; border-radius: 13px; }
.mention-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px 10px; border-bottom: 1px solid #ececf3; background: linear-gradient(135deg, #faf9ff, #f4f2ff); }
.mention-menu-head strong { display: block; color: #30364e; font-size: 10px; }
.mention-menu-head span { display: block; margin-top: 3px; color: #969bad; font-size: 7.5px; }
.mention-close { display: grid; place-items: center; width: 25px; height: 25px; border: 0; border-radius: 7px; color: #777d92; background: rgba(255,255,255,.72); font-size: 15px; cursor: pointer; }
.mention-search { display: flex; align-items: center; gap: 6px; margin: 9px 10px 7px; padding: 0 9px; height: 32px; border: 1px solid #e1e3ed; border-radius: 8px; background: #f8f8fc; }
.mention-search > span { color: #969bad; font-size: 12px; }
.mention-search input { width: 100%; height: 30px; min-width: 0; padding: 0; border: 0; color: #4d536a; background: transparent; font-size: 9px; outline: 0; }
.mention-search small { flex: 0 0 auto; color: #9b9faf; font-size: 7px; }
.mention-options-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; max-height: 215px; overflow: auto; padding: 4px 10px 8px; }
.mention-option { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 6px 7px; border: 1px solid transparent; border-radius: 8px; color: #50576e; background: #fff; text-align: left; cursor: pointer; }
.mention-option:hover { border-color: #dcd6fb; color: #5447ce; background: #f7f5ff; }
.mention-avatar { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px; color: #fff; background: linear-gradient(135deg, #7b6ce6, #5d4bd1); font-size: 7px; font-weight: 800; }
.mention-name { min-width: 0; overflow: hidden; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.mention-check { margin-left: auto; color: #b1a9ed; font-size: 10px; }
.mention-empty { padding: 18px 12px; color: #999eaf; text-align: center; font-size: 8px; }
.mention-menu-footer { display: flex; justify-content: space-between; gap: 8px; padding: 7px 12px; border-top: 1px solid #ececf3; color: #9ba0b1; background: #fbfbfd; font-size: 7px; }
@media (max-width: 620px) { .mention-menu { width: min(390px, calc(100vw - 16px)); } .mention-options-grid { grid-template-columns: 1fr; } }

/* v3.0 recycle bin and permission management */
.recycle-bin-dialog, .user-permission-dialog { width: min(850px, calc(100vw - 24px)); max-width: 850px; padding: 0; border: 0; border-radius: 20px; background: transparent; box-shadow: 0 30px 85px rgba(17,21,45,.30); }
.recycle-bin-dialog::backdrop, .user-permission-dialog::backdrop { background: rgba(16,20,40,.48); backdrop-filter: blur(5px); }
.recycle-bin-card, .user-permission-card { overflow: hidden; border-radius: 20px; background: #fafafe; }
.recycle-bin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #e8e9f1; background: #fff; }
.recycle-bin-summary strong { color: #252c43; font-size: 22px; }
.recycle-bin-summary span { margin-left: 5px; color: #999fb0; font-size: 8px; }
.recycle-bin-actions { display: flex; gap: 7px; }
.recycle-bin-actions .danger-confirm-button { height: 29px; padding: 0 10px; font-size: 8px; }
.recycle-bin-list { display: flex; flex-direction: column; gap: 7px; max-height: min(560px, calc(100vh - 190px)); overflow: auto; padding: 14px 18px 18px; }
.recycle-bin-item { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid #e5e7ef; border-radius: 11px; background: #fff; }
.recycle-bin-item input { accent-color: #6758e5; }
.recycle-bin-main { min-width: 0; }
.recycle-bin-main strong { display: block; overflow: hidden; color: #343b53; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.recycle-bin-main span { display: block; margin-top: 4px; color: #9097a9; font-size: 8px; }
.recycle-bin-main small { display: block; margin-top: 3px; color: #a0a5b4; font-size: 7.5px; }
.recycle-bin-item button { height: 26px; padding: 0 8px; border: 1px solid #dcd8f3; border-radius: 6px; color: #5b4dd7; background: #f7f5ff; font-size: 8px; cursor: pointer; }
.recycle-bin-empty { padding: 45px 20px; color: #969caf; text-align: center; font-size: 9px; }
.user-permission-body { padding: 18px 20px 20px; }
.permission-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.permission-check { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 8px 11px; border: 1px solid #e6e7f0; border-radius: 10px; color: #626a80; background: #fff; font-size: 9px; cursor: pointer; }
.permission-check input { accent-color: #6758e5; }
.permission-check:has(input:checked) { border-color: #d8d1fa; color: #5548c9; background: #f7f5ff; }
.permission-scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.permission-scope-grid h3 { margin: 0 0 8px; color: #3d455d; font-size: 10px; }
.permission-options { display: flex; flex-wrap: wrap; gap: 5px; max-height: 145px; overflow: auto; padding: 9px; border: 1px solid #e6e7f0; border-radius: 9px; background: #fff; }
.permission-options label { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 7px; color: #6d7488; background: #f7f8fb; font-size: 8.5px; cursor: pointer; }
.permission-options label:has(input:checked) { color: #5548c9; background: #efedff; }
.permission-options input { accent-color: #6758e5; }
.permission-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #e8e9f1; }
.permission-foot span { max-width: 570px; color: #969cad; font-size: 7.5px; line-height: 1.6; }
@media (max-width: 700px) { .permission-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .permission-scope-grid { grid-template-columns: 1fr; } .permission-foot { align-items: flex-start; flex-direction: column; } }
.management-user-name .permission-open-btn { margin-top: 7px; height: 24px; padding: 0 7px; border: 1px solid #ddd8fa; border-radius: 6px; color: #5b4dd7; background: #f7f5ff; font-size: 7.5px; cursor: pointer; }
.management-user-name .permission-open-btn:hover { background: #efedff; }
.permission-empty { color: #9aa0b1; font-size: 8px; }
.top-actions { gap: 7px; }
.top-actions .ghost-button { min-height: 29px; }


/* v3.0 final UI polish: consistent controls, responsive shell, refined dialogs */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
input[type="checkbox"], input[type="radio"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
  border-radius: 5px;
  box-shadow: none;
  accent-color: #6758e5;
  cursor: pointer;
}
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible {
  outline: 3px solid rgba(103, 88, 229, .18);
  outline-offset: 2px;
  box-shadow: none;
}
input[type="hidden"] { display: none !important; }
button:focus-visible, .side-item:focus-visible, .board-card:focus-visible {
  outline: 3px solid rgba(103, 88, 229, .22);
  outline-offset: 2px;
}
.topbar { box-shadow: 0 1px 0 rgba(17, 24, 47, .025), 0 8px 26px rgba(28, 34, 66, .035); }
.top-actions .ghost-button { transition: color .16s, border-color .16s, background .16s, transform .16s; }
.top-actions .ghost-button:hover { transform: translateY(-1px); border-color: #d4d0f0; background: #faf9ff; }
.kpi-card::before {
  content: "";
  position: absolute;
  right: 47px;
  bottom: 12px;
  left: 14px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(103,88,229,.30), rgba(103,88,229,0));
  opacity: .7;
}
.list-card, .table-wrap { min-width: 0; max-width: 100%; }
.table-wrap { width: 100%; overscroll-behavior: contain; scrollbar-gutter: stable; }
.list-toolbar-copy { min-width: 0; }
.permission-check-grid { gap: 10px; }
.permission-check {
  min-height: 58px;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 11px;
  transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
}
.permission-check:hover { transform: translateY(-1px); border-color: #d8d4ef; background: #fbfaff; }
.permission-check:has(input:checked) { border-color: #d3cdf7; background: linear-gradient(145deg, #faf9ff, #f3f0ff); box-shadow: 0 6px 16px rgba(79, 66, 170, .055); }
.permission-check > span { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.permission-check strong { color: #3d445c; font-size: 9.5px; font-weight: 800; }
.permission-check small { color: #9298aa; font-size: 7.5px; line-height: 1.45; }
.permission-check:has(input:checked) strong { color: #5144c4; }
.permission-options label { min-height: 30px; transition: color .16s, background .16s, box-shadow .16s; }
.permission-options label:hover { background: #f3f2fa; }
.permission-options label:has(input:checked) { box-shadow: inset 0 0 0 1px rgba(103, 88, 229, .08); }
.permission-options input { width: 15px; height: 15px; min-width: 15px; flex-basis: 15px; }
.user-permission-card, .recycle-bin-card { background: linear-gradient(180deg, #fbfbfe, #f7f7fc); }
.recycle-bin-item { transition: border-color .16s, box-shadow .16s, transform .16s; }
.recycle-bin-item:hover { transform: translateY(-1px); border-color: #d9d5f0; box-shadow: 0 7px 18px rgba(39, 34, 93, .055); }
.bulk-bar { position: sticky; top: 8px; z-index: 24; backdrop-filter: blur(12px); }
.bulk-bar:not([hidden]) { animation: bulkBarIn .18s ease-out; }
@keyframes bulkBarIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 780px) {
  .topbar { gap: 8px 10px; align-content: flex-start; }
  .brand { min-width: 0; }
  .brand-copy { min-width: 0; }
  .top-actions {
    order: 2;
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    padding: 2px 1px 4px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .top-actions::-webkit-scrollbar { display: none; }
  .top-actions > * { flex: 0 0 auto; }
  .top-actions .mcp-entry-button { display: none !important; }
  .global-search { order: 3; flex: 0 0 100%; }
  .list-toolbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .legend { flex-wrap: wrap; }
  .recycle-bin-dialog, .user-permission-dialog, .category-modal, .management-dialog, .assistant-integration-dialog {
    width: calc(100vw - 16px);
    max-width: none;
    margin: 8px auto;
  }
  .recycle-bin-toolbar { align-items: flex-start; flex-direction: column; }
  .recycle-bin-actions { width: 100%; }
  .recycle-bin-actions button { flex: 1; }
  .recycle-bin-item { grid-template-columns: 22px minmax(0, 1fr); }
  .recycle-bin-item button { grid-column: 2; justify-self: start; }
  .user-permission-body { padding: 14px; }
  .permission-check-grid { grid-template-columns: 1fr; }
  .permission-foot { align-items: stretch; flex-direction: column; }
  .permission-foot .primary-button { width: 100%; }
}

@media (max-width: 500px) {
  .topbar { padding: 9px 10px 8px; }
  .brand { gap: 8px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 11px; }
  .brand-title { font-size: 14px; }
  .brand-subtitle { display: none; }
  .global-search { height: 38px; }
  .workspace { padding-top: 12px; }
  .title-line h1 { font-size: 24px; }
  .head-actions { width: 100%; justify-content: space-between; }
  .view-switch { flex: 1; }
  .view-switch button { flex: 1; }
  .kpi-grid { gap: 8px; }
  .kpi-card { min-height: 88px; padding: 12px; }
  .kpi-value { font-size: 23px; }
  .filter-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; align-items: end; }
  .compact-field { min-width: 0; align-items: flex-start; flex-direction: column; }
  .compact-field select { width: 100%; max-width: none; }
  .filter-controls #clearFilters { align-self: end; height: 30px; }
  .bulk-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .bulk-controls > * { width: 100% !important; max-width: none !important; }
  .recycle-bin-list { padding: 12px; }
  .user-permission-body { padding: 12px; }
}

/* mobile action fit */
@media (max-width: 500px) {
  .top-actions { gap: 4px; }
  .top-actions .ghost-button { padding-left: 9px; padding-right: 9px; }
  .user-menu-wrap .user-button { padding: 0 4px; }
  #userNameLabel { display: none; }
}


/* v3.1 account menu and granular permissions */
.user-menu-wrap .user-menu {
  width: 332px;
  max-height: min(720px, calc(100vh - 78px));
  overflow: auto;
  padding: 9px;
  border-color: #e4e4ef;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(23, 27, 58, .20), 0 8px 20px rgba(23, 27, 58, .08);
}
.user-menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; border-bottom: 1px solid #efeff5; }
.user-menu-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; color: #fff; background: #6758e5; font-size: 10px; font-weight: 800; }
.user-menu-head > div:last-child { min-width: 0; }
.user-menu-head strong { overflow: hidden; color: #242a40; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-head span { margin-top: 3px; color: #8c92a5; font-size: 8px; }
.user-menu-label { margin: 9px 7px 4px; color: #9a9fb0; font-size: 7.5px; font-weight: 800; letter-spacing: 1px; }
.user-menu .user-menu-item { display: grid; width: 100%; min-height: 47px; height: auto; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; margin: 2px 0; padding: 7px 8px; border: 0; border-radius: 10px; color: #4c5369; background: transparent; text-align: left; transition: color .16s, background .16s, transform .16s; }
.user-menu .user-menu-item:hover { color: #5144c8; background: #f4f2ff; transform: translateX(1px); }
.user-menu-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #5e51d4; background: #efedff; font-size: 9px; font-weight: 800; }
.user-menu-icon.recycle { color: #b8791d; background: #fff5e4; }
.user-menu-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.user-menu-copy strong { color: inherit; font-size: 9.5px; font-weight: 800; }
.user-menu-copy small { overflow: hidden; color: #949aac; font-size: 7.5px; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-item > i { color: #b0b3c2; font-size: 14px; font-style: normal; }
.user-menu-chevron { transition: transform .16s; }
.user-menu .export-wrap { margin: 2px 0; }
.user-menu .export-menu { position: static; width: auto; margin: 3px 0 5px 39px; padding: 5px; border: 1px solid #e7e5f5; border-radius: 10px; background: #f8f7fd; box-shadow: none; }
.user-menu .export-menu button { height: 29px; font-size: 8px; }
.user-menu-divider { height: 1px; margin: 8px 7px; background: #efeff4; }
.user-menu .user-menu-logout:hover { color: #c04453; background: #fff1f3; }
.user-menu .user-menu-logout .user-menu-icon { color: #bf4b59; background: #fdeef0; }

.permission-disabled { pointer-events: none; opacity: .58; filter: grayscale(.15); }
.user-permission-dialog { width: min(1040px, calc(100vw - 24px)); max-width: 1040px; }
.user-permission-body { max-height: min(780px, calc(100vh - 96px)); overflow: auto; }
.permission-preset-bar { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; align-items: center; gap: 14px; margin-bottom: 13px; padding: 11px 13px; border: 1px solid #e4e2f2; border-radius: 12px; background: linear-gradient(135deg, #faf9ff, #f5f3ff); }
.permission-preset-bar > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.permission-preset-bar strong { color: #403a75; font-size: 9.5px; }
.permission-preset-bar span { color: #8c90a3; font-size: 7.5px; }
.permission-presets { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.permission-presets button { height: 29px; padding: 0 9px; border: 1px solid #dedaf4; border-radius: 7px; color: #5c50c9; background: #fff; font-size: 8px; font-weight: 700; }
.permission-presets button:hover { border-color: #c6bff0; background: #f0edff; }
.permission-presets button:disabled { opacity: .45; cursor: not-allowed; }
.permission-preset-bar > b { min-width: 92px; color: #5b4dd2; font-size: 8.5px; text-align: right; }
.permission-groups { display: flex; flex-direction: column; gap: 13px; }
.permission-group { overflow: hidden; border: 1px solid #e7e6ef; border-radius: 13px; background: rgba(255,255,255,.62); }
.permission-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 13px 9px; border-bottom: 1px solid #eeedf4; background: rgba(248,247,253,.78); }
.permission-group-head h3 { margin: 0; color: #353b53; font-size: 10px; }
.permission-group-head p { margin: 4px 0 0; color: #9297a9; font-size: 7.5px; line-height: 1.5; }
.permission-group-head > span { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; color: #7a70c9; background: #efedff; font-size: 7px; font-weight: 800; }
.permission-group .permission-check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 10px; }
.permission-group .permission-check { min-height: 54px; }
.permission-scope-help { margin: -4px 0 7px; color: #9b9eae; font-size: 7.5px; }

@media (max-width: 940px) {
  .permission-group .permission-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .permission-preset-bar { grid-template-columns: 1fr; align-items: flex-start; }
  .permission-preset-bar > b { text-align: left; }
}
@media (max-width: 620px) {
  .user-menu-wrap .user-menu { position: fixed; top: 68px; right: 8px; left: 8px; width: auto; max-height: calc(100vh - 82px); }
  .permission-group .permission-check-grid { grid-template-columns: 1fr; }
  .permission-presets { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .permission-presets button { width: 100%; }
  .user-permission-body { padding: 12px; }
}

/* account menu mobile alignment */
@media (max-width: 780px) {
  .top-actions { justify-content: flex-end; }
}

/* v3.2 weekly templates and dispatch */
.weekly-tools { display: flex; flex-direction: column; gap: 6px; margin: -4px 0 14px; }
.weekly-dispatch-btn { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 48px; padding: 8px 10px; border: 1px solid #dcd8f6; border-radius: 11px; color: #5042c4; background: linear-gradient(135deg, #f6f4ff, #eeebff); text-align: left; box-shadow: 0 6px 15px rgba(83,68,180,.055); }
.weekly-dispatch-btn > span { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 9px; color: #fff; background: linear-gradient(135deg, #7567ea, #5a4bd2); font-size: 13px; }
.weekly-dispatch-btn div { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.weekly-dispatch-btn strong { font-size: 10px; }
.weekly-dispatch-btn small { color: #8f88bb; font-size: 7.5px; }
.weekly-dispatch-btn:hover { border-color: #c5bdf1; background: #efecff; transform: translateY(-1px); }
.weekly-tools-row { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.weekly-tools-row button { height: 29px; padding: 0 7px; border: 1px solid #e3e4ec; border-radius: 7px; color: #697084; background: #fff; font-size: 8px; }
.weekly-tools-row button:hover { color: #5749cf; border-color: #d0caf2; background: #f8f6ff; }
.automation-dialog { width: min(1120px, calc(100vw - 24px)); max-width: 1120px; height: min(860px, calc(100vh - 32px)); padding: 0; border: 0; border-radius: 20px; background: transparent; box-shadow: 0 34px 90px rgba(18,22,52,.30); }
.automation-dialog::backdrop { background: rgba(16,20,42,.48); backdrop-filter: blur(5px); }
.automation-card { display: flex; height: 100%; overflow: hidden; flex-direction: column; border-radius: 20px; background: #f8f8fc; }
.automation-card .category-modal-head { flex: 0 0 auto; }
.automation-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.automation-section-head > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.automation-section-head strong { color: #343a51; font-size: 10px; }
.automation-section-head span { color: #9298aa; font-size: 7.5px; }
.template-manager-layout { display: grid; min-height: 0; flex: 1; grid-template-columns: 292px minmax(0, 1fr); overflow: hidden; }
.template-list-pane { display: flex; min-height: 0; flex-direction: column; gap: 11px; padding: 16px; border-right: 1px solid #e5e6ef; background: #f3f3f9; }
.template-list { display: flex; min-height: 0; flex-direction: column; gap: 7px; overflow: auto; padding-right: 3px; }
.template-list-item { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; padding: 11px; border: 1px solid #e6e5ef; border-radius: 10px; color: #4c5369; background: #fff; text-align: left; }
.template-list-item:hover, .template-list-item.active { color: #5548c9; border-color: #cfc9f2; background: #f7f5ff; }
.template-list-item div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.template-list-item strong { overflow: hidden; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.template-list-item span, .template-list-item small { color: #9298aa; font-size: 7.5px; }
.template-list-item i { color: #aaaebe; font-style: normal; }
.template-editor { min-height: 0; overflow: auto; padding: 18px 20px 22px; background: #fbfbfe; }
.template-meta-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 9px; align-items: end; margin-top: 14px; padding: 12px; border: 1px solid #e7e6ef; border-radius: 11px; background: #fff; }
.template-enable-check, .automation-check { display: flex; align-items: center; gap: 8px; color: #5e657a; font-size: 8.5px; cursor: pointer; }
.template-enable-check { min-height: 38px; }
.template-item-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.template-item-row { padding: 12px; border: 1px solid #e5e6ef; border-radius: 12px; background: #fff; }
.template-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.template-item-head strong { color: #5d56a7; font-size: 9px; }
.template-item-remove { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid #f0d7dc; border-radius: 6px; color: #c05865; background: #fff5f6; font-size: 14px; }
.template-item-title { margin-bottom: 8px; }
.template-item-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 8px; }
.template-item-row .field { gap: 4px; }
.template-item-row .field span { font-size: 7.5px; }
.template-item-row input, .template-item-row select { height: 32px; font-size: 8.5px; }
.template-add-item { width: 100%; height: 35px; margin-top: 10px; border: 1px dashed #cfc8ef; border-radius: 9px; color: #5f52cb; background: #f8f6ff; font-size: 9px; }
.template-add-item:hover { border-color: #afa6e9; background: #f1eeff; }
.template-editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e7e6ef; }
.danger-text-button { margin-right: auto; height: 32px; padding: 0 8px; border: 0; color: #c14a58; background: transparent; font-size: 8px; }
.template-status-pill { padding: 3px 6px; border-radius: 999px; color: #6559cb; background: #efedff; font-size: 7px; }
.dispatch-dialog, .copy-week-dialog { width: min(980px, calc(100vw - 24px)); max-width: 980px; }
.dispatch-body, .copy-week-body { min-height: 0; flex: 1; overflow: auto; padding: 16px 20px 20px; }
.dispatch-config { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 13px; border: 1px solid #e7e7f0; border-radius: 12px; background: #fff; }
.dispatch-config .field { gap: 4px; }
.dispatch-config .field > span { font-size: 8px; }
.dispatch-config input, .dispatch-config select { height: 34px; font-size: 8.5px; }
.automation-check { padding: 7px 9px; border-radius: 8px; background: #f8f8fc; }
.automation-check > span { display: flex; flex-direction: column; gap: 2px; }
.automation-check strong { font-size: 8.5px; }
.automation-check small { color: #999eae; font-size: 7px; }
.dispatch-template-section { margin-top: 12px; padding: 13px; border: 1px solid #e7e7f0; border-radius: 12px; background: #fff; }
.dispatch-template-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.dispatch-template-option { display: flex; align-items: flex-start; gap: 8px; padding: 9px; border: 1px solid #e9e8f1; border-radius: 9px; background: #fbfbfe; cursor: pointer; }
.dispatch-template-option:has(input:checked) { border-color: #cec8f3; background: #f5f2ff; }
.dispatch-template-option > span { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.dispatch-template-option strong { color: #434a61; font-size: 8.5px; }
.dispatch-template-option small { color: #9399aa; font-size: 7px; line-height: 1.45; }
.automation-preview { margin-top: 12px; overflow: hidden; border: 1px solid #e6e5ef; border-radius: 12px; background: #fff; }
.automation-empty { padding: 28px 16px; color: #969bac; text-align: center; font-size: 8.5px; }
.automation-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border-bottom: 1px solid #ececf3; background: #faf9ff; }
.automation-preview-head > div { display: flex; flex-direction: column; gap: 3px; }
.automation-preview-head strong { color: #393f56; font-size: 9.5px; }
.automation-preview-head span { color: #9499aa; font-size: 7.5px; }
.automation-preview-head b { color: #5b4ed0; font-size: 14px; }
.automation-preview-list { display: flex; max-height: min(330px, 38vh); flex-direction: column; gap: 5px; overflow: auto; padding: 9px; }
.automation-preview-item { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border: 1px solid #e8e9f1; border-radius: 9px; background: #fff; }
.automation-preview-item.duplicate { background: #fff9ec; }
.automation-preview-check { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px; color: #5c4fd2; background: #efecff; font-size: 10px; font-weight: 800; }
.automation-preview-item.duplicate .automation-preview-check { color: #a8701e; background: #fff1d7; }
.automation-preview-main { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.automation-preview-main strong { overflow: hidden; color: #3e455c; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.automation-preview-main span, .automation-preview-main small { overflow: hidden; color: #858c9e; font-size: 7.3px; text-overflow: ellipsis; white-space: nowrap; }
.automation-preview-badge { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; font-size: 6.8px; font-weight: 800; }
.automation-preview-badge.new { color: #1b7d65; background: #e9f8f3; }
.automation-preview-badge.duplicate { color: #a8701e; background: #fff0d4; }
.automation-footer { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; border-top: 1px solid #e7e7ef; background: #fff; }
.automation-footer > span { color: #8f95a7; font-size: 7.5px; }
.automation-footer > div { display: flex; gap: 7px; }
.copy-week-body .dispatch-config { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.copy-week-body .multi-field { grid-column: span 1; }
.copy-week-body .automation-check { grid-column: 2; }
@media (max-width: 820px) {
  .template-manager-layout { grid-template-columns: 1fr; }
  .template-list-pane { max-height: 250px; border-right: 0; border-bottom: 1px solid #e5e6ef; }
  .template-meta-grid, .template-item-grid, .dispatch-config, .dispatch-template-list { grid-template-columns: 1fr; }
  .copy-week-body .automation-check { grid-column: auto; }
  .automation-dialog { height: calc(100vh - 16px); width: calc(100vw - 16px); margin: 8px auto; }
  .automation-footer { align-items: flex-start; flex-direction: column; }
  .automation-footer > div { width: 100%; }
  .automation-footer button { flex: 1; }
}


/* v3.4 web reminder settings */
.user-menu-icon.reminder { color: #a66b16; background: #fff4df; }
.reminder-settings-dialog { width: min(720px, calc(100vw - 24px)); max-width: 720px; height: min(820px, calc(100vh - 28px)); padding: 0; border: 0; border-radius: 20px; background: transparent; box-shadow: 0 34px 90px rgba(18,22,52,.30); }
.reminder-settings-dialog::backdrop { background: rgba(16,20,42,.48); backdrop-filter: blur(5px); }
.reminder-settings-card { display: flex; height: 100%; overflow: hidden; flex-direction: column; border-radius: 20px; background: #f8f8fc; }
.reminder-settings-body { display: flex; min-height: 0; flex: 1; overflow: auto; flex-direction: column; gap: 14px; padding: 17px 20px 20px; }
.reminder-enabled-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #e7e5ef; border-radius: 11px; background: #fff; }
.reminder-enabled-row .automation-check { flex: 1; }
.reminder-webhook-row { display: flex; align-items: center; gap: 7px; }
.reminder-webhook-row input { flex: 1; }
.reminder-settings-section { padding: 13px; border: 1px solid #e7e6ef; border-radius: 11px; background: #fff; }
.reminder-day-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-top: 10px; }
.reminder-day-grid label { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 33px; padding: 5px; border: 1px solid #e7e7ef; border-radius: 8px; color: #697084; background: #fafafd; font-size: 8px; cursor: pointer; }
.reminder-day-grid label:has(input:checked) { color: #5548c9; border-color: #d1cbf4; background: #f3f0ff; }
.reminder-time-add { display: flex; align-items: center; gap: 6px; }
.reminder-time-add input { width: 105px; height: 31px; }
.reminder-time-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.reminder-time-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 4px 6px 4px 10px; border: 1px solid #d9d3f5; border-radius: 999px; color: #5548c9; background: #f5f2ff; font-size: 8.5px; }
.reminder-time-chip strong { font-weight: 800; }
.reminder-time-chip button { display: grid; place-items: center; width: 19px; height: 19px; padding: 0; border: 0; border-radius: 50%; color: #8e80da; background: #eae5ff; font-size: 12px; }
.reminder-time-chip button:hover { color: #fff; background: #6b5ada; }
.reminder-time-empty { color: #9a9fb0; font-size: 8px; }
.reminder-settings-grid { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; }
.reminder-status-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 10px; border: 1px solid #e8e6f1; border-radius: 10px; background: linear-gradient(135deg, #faf9ff, #f5f4fb); }
.reminder-status-panel > div { display: flex; min-width: 0; flex-direction: column; gap: 4px; padding: 8px 9px; border-radius: 8px; background: rgba(255,255,255,.74); }
.reminder-status-panel strong { color: #77728f; font-size: 7.5px; }
.reminder-status-panel span { overflow: hidden; color: #5a6076; font-size: 8px; line-height: 1.5; text-overflow: ellipsis; }
@media (max-width: 680px) {
  .reminder-settings-dialog { width: calc(100vw - 16px); height: calc(100vh - 16px); margin: 8px auto; }
  .reminder-settings-body { padding: 13px; }
  .reminder-day-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .reminder-settings-grid, .reminder-status-panel { grid-template-columns: 1fr; }
  .reminder-webhook-row { align-items: stretch; flex-direction: column; }
  .reminder-webhook-row .secondary-button { width: 100%; }
  .reminder-time-add { width: 100%; }
  .reminder-time-add input { flex: 1; }
  .reminder-settings-dialog .automation-footer { align-items: flex-start; flex-direction: column; }
  .reminder-settings-dialog .automation-footer > div { width: 100%; }
  .reminder-settings-dialog .automation-footer button { flex: 1; }
}


/* Period views: day / week / month / quarter */
.period-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 13px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(110deg, #ffffff, #f7f9fc); box-shadow: 0 7px 22px rgba(19,43,64,.045); }
.period-tabs { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 10px; background: #edf2f7; }
.period-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 8px; color: #6d8091; background: transparent; font-size: 11px; font-weight: 750; white-space: nowrap; transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
.period-tabs button:hover { color: var(--navy); background: rgba(255,255,255,.7); }
.period-tabs button.active { color: #fff; background: linear-gradient(135deg, var(--navy), #254d72); box-shadow: 0 4px 12px rgba(13,41,66,.2); transform: translateY(-1px); }
.period-tabs small { font-size: 7px; letter-spacing: .9px; opacity: .62; }
.period-nav { display: flex; align-items: center; gap: 5px; min-width: 0; }
.period-arrow, .period-today { display: inline-grid; place-items: center; height: 30px; border: 1px solid #e0e8ef; border-radius: 8px; color: #63798b; background: #fff; font-size: 16px; line-height: 1; transition: border-color .18s ease, color .18s ease, background .18s ease; }
.period-arrow { width: 30px; padding: 0; }
.period-today { padding: 0 10px; font-size: 10px; font-weight: 700; }
.period-arrow:hover, .period-today:hover { color: var(--navy); border-color: #c8d8e4; background: #f4f8fb; }
.period-arrow:disabled { opacity: .35; cursor: not-allowed; }
.period-focus { display: flex; flex-direction: column; justify-content: center; min-width: 190px; padding: 0 8px; text-align: center; }
.period-focus strong { color: var(--navy); font-size: 11px; }
.period-focus span { margin-top: 2px; color: #8998a6; font-size: 9px; white-space: nowrap; }
@media (max-width: 980px) { .period-toolbar { align-items: stretch; flex-direction: column; } .period-tabs { align-self: flex-start; } .period-nav { justify-content: space-between; } .period-focus { flex: 1; } }
@media (max-width: 620px) { .period-tabs { width: 100%; } .period-tabs button { flex: 1; justify-content: center; padding: 0 5px; } .period-tabs small { display: none; } .period-focus { min-width: 0; } .period-focus span { overflow: hidden; text-overflow: ellipsis; } }
