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

:root {
  --ink: #102B3A;
  --muted: #697D88;
  --line: #DCE5E8;
  --line-soft: #EDF2F3;
  --paper: #FFFFFF;
  --canvas: #F4F7F6;
  --teal: #0B6E69;
  --teal-dark: #075852;
  --mint: #BDEBDF;
  --orange: #E99A32;
  --blue: #3C82D0;
  --lime: #8BC65A;
  --purple: #8873D1;
  --member-width: 210px;
  --week-width: 48px;
  --row-height: 64px;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100vh; padding-top: 16px; }
.topbar { position: relative; z-index: 20; width: calc(100% - 68px); height: 68px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.96); border: 1px solid rgba(220,229,232,.8); border-radius: 24px; box-shadow: 0 10px 28px rgba(18,50,61,.07); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--ink); display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 10px; }
.brand-mark span { width: 4px; border-radius: 3px; background: #8EDCCB; }
.brand-mark span:nth-child(1) { height: 9px; }.brand-mark span:nth-child(2) { height: 17px; }.brand-mark span:nth-child(3) { height: 13px; }
.brand-title { font-family: Manrope, sans-serif; font-weight: 800; letter-spacing: -.03em; font-size: 17px; line-height: 1.1; }
.brand-subtitle { color: var(--muted); font-size: 11px; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.topbar-actions .btn { border-radius: 16px; }
.save-state { display: flex; align-items: center; gap: 8px; margin-right: 5px; font-size: 12px; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #55B58C; box-shadow: 0 0 0 4px rgba(85,181,140,.12); }
.save-state.syncing .status-dot { background: var(--orange); animation: pulse 1s infinite; }
.save-state.error .status-dot { background: #D95C59; }
@keyframes pulse { 50% { opacity: .35; } }

.btn { min-height: 40px; border: 1px solid transparent; border-radius: 10px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 700; text-decoration: none; transition: .18s ease; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { color: #fff; background: var(--teal); box-shadow: 0 7px 16px rgba(11,110,105,.16); }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); }
.btn-secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.btn-secondary:hover, .btn-ghost:hover { border-color: #B9C9CE; background: #F7FAFA; }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn-danger { color: #B23E3A; background: #FFF3F2; border-color: #F4D3D1; }
.btn-code { width: 100%; background: #132A3A; color: #fff; margin-top: 16px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.icon-button:hover { color: var(--ink); border-color: #B9C9CE; }
.icon-button svg { width: 18px; height: 18px; }

main { width: 100%; max-width: none; margin: 0; padding: 24px 34px 34px; }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 0 0 20px; padding: 6px 2px 2px; }
.eyebrow, .drawer-kicker { color: var(--teal); font-family: Manrope, sans-serif; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
h1 { font-family: Manrope, sans-serif; font-size: clamp(25px, 2.7vw, 34px); margin: 6px 0 5px; letter-spacing: -.045em; }
.hero-row p { color: var(--muted); margin: 0; font-size: 14px; }
.summary-cards { display: flex; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 30px rgba(25,57,66,.05); }
.summary-card { min-width: 112px; padding: 13px 17px; display: flex; gap: 11px; align-items: center; }
.summary-card + .summary-card { border-left: 1px solid var(--line-soft); }
.summary-card strong { display: block; font-family: Manrope, sans-serif; font-size: 19px; line-height: 1; }
.summary-card small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.summary-icon { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 8px; }
.summary-icon.people { color: var(--teal); background: #E5F5F1; }.summary-icon.activity { color: var(--orange); background: #FFF2DF; }.summary-icon.week { color: var(--blue); background: #EAF2FC; }

.workspace-card { background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 18px 44px rgba(18,50,61,.07); overflow: hidden; }
.toolbar { min-height: 66px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; }
.search-box { width: 280px; height: 36px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; padding: 0 12px; color: #8CA0A9; transition: .2s; }
.search-box:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11,110,105,.08); }
.search-box svg { width: 17px; height: 17px; flex: 0 0 auto; }
.search-box input { border: 0; outline: 0; width: 100%; padding: 0 0 0 9px; color: var(--ink); font-size: 13px; }
.search-box input::placeholder { color: #9BADB4; }
.toolbar-filter-control { width: 165px; flex: 0 0 165px; }
.toolbar-filter-control .ant-select { width: 100%; }
.toolbar-filter-control .ant-select-selector { min-height: 36px !important; font-size: 11px; font-weight: 700; box-shadow: 0 1px 2px rgba(18,50,61,.04); }
.toolbar-filter-control .ant-select-selection-wrap { min-height: 34px; }
.toolbar-filter-control .ant-select-clear { width: 23px; height: 23px; margin-top: -11px; display: grid; place-items: center; opacity: 1; border-radius: 7px; background: #EAF2F1; color: #365661; }
.toolbar-filter-control .ant-select-clear:hover { background: #DDEAE8; color: var(--ink); }
.toolbar-filter-control .ant-select-clear .anticon { font-size: 15px; }
.modal .ant-select-clear { width: 23px; height: 23px; margin-top: -11px; display: grid; place-items: center; opacity: 1; border-radius: 7px; background: #EAF2F1; color: #365661; }
.modal .ant-select-clear:hover { background: #DDEAE8; color: var(--ink); }
.modal .ant-select-clear .anticon { font-size: 15px; }

.timeline-scroll { overflow: auto; min-height: 420px; max-height: calc(100vh - 310px); scrollbar-color: #B8C8CC #F1F5F5; scrollbar-width: thin; }
.timeline-scroll:focus { outline: none; box-shadow: inset 0 0 0 2px rgba(11,110,105,.25); }
.timeline { min-width: calc(var(--member-width) + 28 * var(--week-width)); position: relative; background: #fff; }
.month-row, .week-row, .member-row { display: grid; grid-template-columns: var(--member-width) repeat(28, var(--week-width)); position: relative; }
.month-row { height: 38px; position: sticky; top: 0; z-index: 8; background: #F8FAFA; border-bottom: 1px solid var(--line); }
.week-row { height: 40px; position: sticky; top: 38px; z-index: 8; background: #fff; box-shadow: 0 3px 9px rgba(20,47,57,.05); }
.header-corner { position: sticky; left: 0; z-index: 10; grid-column: 1; display: flex; align-items: center; padding: 0 18px; color: #6B8089; font-size: 10px; font-weight: 800; letter-spacing: .11em; background: inherit; border-right: 1px solid var(--line); }
.month-group { display: flex; align-items: center; justify-content: center; font-family: Manrope, sans-serif; font-size: 12px; font-weight: 700; color: #3A5662; border-right: 1px solid var(--line); }
.week-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; }
.week-cell strong { color: var(--ink); font-size: 11px; }.week-cell.today { background: #ECF8F5; color: var(--teal); }.week-cell.today strong { color: var(--teal); }
.member-row { height: var(--row-height); border-bottom: 1px solid var(--line-soft); }
.member-row.is-filtered { display: none; }
.member-row:hover { background: #FBFDFC; }
.member-cell { position: sticky; left: 0; z-index: 6; grid-column: 1; background: #fff; border-right: 1px solid var(--line); padding: 0 11px 0 15px; display: flex; align-items: center; gap: 10px; }
.member-row:hover .member-cell { background: #FBFDFC; }
.avatar { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; color: #fff; font-family: Manrope, sans-serif; font-size: 11px; font-weight: 800; }
.member-meta { min-width: 0; flex: 1; }
.member-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 700; }
.member-role { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 10px; margin-top: 2px; }
.member-actions { opacity: 0; display: flex; align-items: center; transition: .15s; }
.member-row:hover .member-actions { opacity: 1; }
.member-menu { width: 26px; height: 26px; border: 0; background: transparent; color: #84979F; border-radius: 6px; font-size: 16px; }
.member-menu:hover { background: #EAF1F0; color: var(--ink); }
.grid-cell { border-right: 1px solid var(--line-soft); position: relative; }
.grid-cell:nth-of-type(4n + 1) { border-right-color: var(--line); }
.grid-cell.today { background: rgba(11,110,105,.035); }
.task-bar { position: absolute; top: 14px; height: 36px; border-radius: 8px; z-index: 3; display: flex; align-items: center; padding: 0 12px; color: #183443; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: grab; box-shadow: inset 0 -1px 0 rgba(0,0,0,.08), 0 3px 7px rgba(20,45,55,.08); user-select: none; touch-action: none; transition: filter .15s, box-shadow .15s; }
.task-bar:hover { filter: saturate(1.08) brightness(.98); box-shadow: inset 0 -1px 0 rgba(0,0,0,.1), 0 5px 10px rgba(20,45,55,.14); }
.task-bar.dragging { cursor: grabbing; z-index: 15; opacity: .9; box-shadow: 0 10px 22px rgba(20,45,55,.22); transition: none; }
.task-bar.integration { background: #F6B83F; }.task-bar.testing { background: #99D269; }.task-bar.gap { background: #4D9AD8; color: #fff; }.task-bar.planning { background: #A795DF; color: #fff; }
.task-bar.search-dim { opacity: .18; }
.activity-bar { gap: 8px; }
.activity-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.activity-project-label { flex: 0 0 auto; max-width: 48%; overflow: hidden; text-overflow: ellipsis; margin-left: auto; padding: 3px 6px; border-radius: 5px; background: rgba(255,255,255,.38); font-size: 8px; font-weight: 800; letter-spacing: .015em; }
.empty-project-bar { position: absolute; z-index: 3; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px dashed var(--project-color); border-radius: 8px; background: color-mix(in srgb, var(--project-color) 9%, white); color: #526A73; cursor: pointer; overflow: hidden; white-space: nowrap; }
.empty-project-bar span { font-size: 10px; font-weight: 800; }.empty-project-bar small { overflow: hidden; text-overflow: ellipsis; font-size: 9px; }
.empty-project-bar:hover { background: color-mix(in srgb, var(--project-color) 16%, white); }
.empty-project-bar.search-dim { opacity: .18; }
.resize-handle { position: absolute; top: 0; width: 9px; height: 100%; cursor: ew-resize; opacity: 0; }
.task-bar:hover .resize-handle { opacity: 1; }
.resize-handle::after { content: ""; position: absolute; width: 2px; height: 14px; top: 11px; background: rgba(16,43,58,.35); border-radius: 2px; }
.resize-handle.start { left: 1px; }.resize-handle.start::after { left: 3px; }.resize-handle.end { right: 1px; }.resize-handle.end::after { right: 3px; }
.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); }
.workspace-footer { min-height: 45px; display: flex; justify-content: space-between; align-items: center; gap: 18px; border-top: 1px solid var(--line); padding: 10px 17px; color: var(--muted); font-size: 10px; }
.tip span { color: var(--teal); font-weight: 800; font-size: 14px; margin-right: 6px; }.range-label { font-weight: 700; color: #516873; }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(9,25,34,.26); z-index: 30; opacity: 0; pointer-events: none; transition: .22s; backdrop-filter: blur(2px); }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; right: 0; top: 0; width: min(440px, 94vw); height: 100vh; z-index: 31; background: #fff; box-shadow: -20px 0 50px rgba(9,30,40,.17); padding: 25px 26px; transform: translateX(103%); transition: .26s ease; overflow-y: auto; }
.drawer.open { transform: translateX(0); }
.drawer-header, .modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.drawer h2, .modal h2 { font-family: Manrope, sans-serif; letter-spacing: -.035em; font-size: 23px; margin: 4px 0 0; }
.sync-status-card { display: flex; gap: 13px; padding: 14px; background: #F4F8F7; border: 1px solid #DFE9E7; border-radius: 12px; margin-bottom: 20px; }
.sync-status-card.success { background: #ECF8F3; border-color: #C9E8D9; }.sync-status-card.error { background: #FFF4F3; border-color: #F2D4D1; }
.sync-icon { width: 36px; height: 36px; border-radius: 10px; background: #fff; color: var(--teal); display: grid; place-items: center; flex: 0 0 auto; }
.sync-icon svg { width: 19px; height: 19px; }
.sync-status-card strong { font-size: 13px; }.sync-status-card p { font-size: 11px; color: var(--muted); margin: 3px 0 0; }
.form-field { margin-bottom: 15px; }
.form-field label { display: block; font-size: 11px; font-weight: 700; margin-bottom: 7px; color: #3B5662; }
.form-field label span { color: var(--muted); font-weight: 400; }
.form-field > input, .form-field > select, .form-field > textarea, .form-field .input-with-action input { width: 100%; border: 1px solid #D5E0DF; border-radius: 10px; background: linear-gradient(180deg, #fff 0%, #F8FBFA 100%); color: var(--ink); outline: none; padding: 10px 12px; font-size: 13px; box-shadow: 0 1px 2px rgba(18,50,61,.04); transition: border-color .16s, box-shadow .16s, background .16s; }
.form-field > input, .form-field > select, .form-field .input-with-action input { height: 36px; }.form-field > textarea { resize: vertical; }
.form-field > input:hover, .form-field > select:hover, .form-field > textarea:hover, .form-field .input-with-action input:hover { border-color: #B8CBC8; background: #fff; }
.form-field > input:focus, .form-field > select:focus, .form-field > textarea:focus, .form-field .input-with-action input:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 3px rgba(11,110,105,.09), 0 3px 8px rgba(18,50,61,.06); }
.form-field > input::placeholder, .form-field > textarea::placeholder { color: #93A5AC; }
.antd-field .ant-select, .antd-field .ant-picker, .antd-control { width: 100%; }
.antd-field .ant-select-selector, .antd-field .ant-picker { box-shadow: 0 1px 2px rgba(18,50,61,.04); }
.antd-field .ant-select-focused .ant-select-selector, .antd-field .ant-picker-focused { box-shadow: 0 0 0 3px rgba(11,110,105,.09) !important; }
.ant-select-dropdown, .ant-picker-dropdown { font-size: 12px; }
.form-field small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.input-with-action { display: flex; }.input-with-action input { border-radius: 9px 0 0 9px; }.input-with-action button { border: 1px solid var(--line); border-left: 0; border-radius: 0 9px 9px 0; background: #F7FAFA; color: var(--teal); font-size: 11px; font-weight: 700; padding: 0 11px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 3px 0 16px; }
.switch-row span strong, .switch-row span small { display: block; }.switch-row span strong { font-size: 12px; }.switch-row span small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.switch-row input { position: absolute; opacity: 0; }.switch-row i { width: 40px; height: 22px; border-radius: 12px; background: #C9D4D7; position: relative; transition: .2s; flex: 0 0 auto; }.switch-row i::after { content: ""; position: absolute; width: 16px; height: 16px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.16); transition: .2s; }.switch-row input:checked + i { background: var(--teal); }.switch-row input:checked + i::after { transform: translateX(18px); }
.drawer-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 9px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; color: #79909A; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.setup-steps { display: grid; gap: 11px; }.setup-steps > div { display: flex; align-items: flex-start; gap: 10px; }.setup-steps b { width: 23px; height: 23px; border-radius: 7px; background: #E6F4F1; color: var(--teal); display: grid; place-items: center; font-size: 11px; flex: 0 0 auto; }.setup-steps p { margin: 2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }.setup-steps strong { color: var(--ink); }
.security-note { font-size: 9px; line-height: 1.5; color: #84979F; text-align: center; margin: 10px 20px; }

.modal { width: min(700px, calc(100vw - 28px)); overflow: visible; border: 0; border-radius: 16px; padding: 0; color: var(--ink); box-shadow: 0 24px 70px rgba(8,28,38,.26); }
.modal::backdrop { background: rgba(9,25,34,.42); backdrop-filter: blur(3px); }
.modal form { padding: 25px; }.modal.small { width: min(520px, calc(100vw - 28px)); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.modal-actions { display: flex; align-items: center; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }.modal-actions span { flex: 1; }
.is-hidden { display: none !important; }

.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: grid; gap: 8px; }
.toast { width: min(350px, calc(100vw - 44px)); padding: 12px 14px; border-radius: 11px; color: #fff; background: #183442; box-shadow: 0 12px 26px rgba(10,31,41,.22); display: flex; align-items: center; gap: 9px; font-size: 12px; animation: toast-in .2s ease; }.toast.success { background: #0B6E69; }.toast.error { background: #A8423F; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Multi-scale timeline controls */
.toolbar-right { flex-wrap: wrap; justify-content: flex-end; }
.scale-switcher { display: inline-flex; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #F4F7F6; }
.scale-switcher button { height: 31px; min-width: 54px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; }
.scale-switcher button:hover { color: var(--ink); }
.scale-switcher button.active { background: #fff; color: var(--teal); box-shadow: 0 2px 7px rgba(16,43,58,.1); }
.btn-holiday { min-height: 38px; padding: 0 11px; border-color: var(--line); background: #fff; color: var(--muted); font-size: 11px; }
.btn-holiday.active { color: #8B5A19; border-color: #E9D4A9; background: #FFF9ED; }
.holiday-pattern { width: 15px; height: 15px; border-radius: 4px; border: 1px solid #E2C68C; background: repeating-linear-gradient(135deg, #FFF1D1 0 3px, #F8DEAA 3px 5px); }

/* Dynamic date cells */
.timeline { min-width: 0; }
.month-row, .week-row, .member-row { grid-template-columns: none; }
.timeline[data-scale="day"] .week-cell { font-size: 9px; }
.timeline[data-scale="month"] .week-cell strong, .timeline[data-scale="year"] .week-cell strong { font-size: 12px; text-transform: uppercase; }
.week-cell, .grid-cell { min-width: 0; }
.week-cell { position: relative; }
.grid-cell { appearance: none; width: auto; height: 100%; padding: 0; border: 0; border-right: 1px solid var(--line-soft); border-radius: 0; background: transparent; cursor: cell; }
.grid-cell:nth-of-type(4n + 1) { border-right-color: var(--line-soft); }
.grid-cell:hover { background: rgba(11,110,105,.065); box-shadow: inset 0 0 0 1px rgba(11,110,105,.22); }
.cell-add { position: absolute; inset: 0; display: grid; place-items: center; color: var(--teal); font-size: 17px; font-weight: 500; opacity: 0; transition: opacity .14s; }
.grid-cell:hover .cell-add, .grid-cell:focus-visible .cell-add { opacity: .72; }
.grid-cell:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; z-index: 2; }
.week-cell.holiday-cell, .grid-cell.holiday-cell { background: repeating-linear-gradient(135deg, rgba(245,184,66,.09) 0 5px, rgba(245,184,66,.17) 5px 8px); }
.week-cell.weekend-cell, .grid-cell.weekend-cell { background: repeating-linear-gradient(135deg, rgba(117,133,145,.075) 0 5px, rgba(117,133,145,.14) 5px 8px); }
.week-cell.holiday-cell.today, .grid-cell.holiday-cell.today { box-shadow: inset 0 -3px 0 var(--teal); }
.holiday-badge { position: absolute; top: 5px; right: 5px; width: 5px; height: 5px; border-radius: 50%; background: #E0932B; box-shadow: 0 0 0 2px #FFF4D8; }

/* Member ordering */
.member-cell { padding-left: 8px; gap: 8px; }
.member-drag { width: 22px; height: 32px; flex: 0 0 auto; border: 0; background: transparent; color: #A3B1B7; border-radius: 6px; cursor: grab; font-size: 17px; line-height: 1; padding: 0; opacity: .55; touch-action: none; }
.member-drag:hover { color: var(--teal); background: #EAF5F2; opacity: 1; }
.member-drag:active { cursor: grabbing; }
.member-row.member-dragging { opacity: .45; }
.member-row.member-drop-target::after { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 3px; background: var(--teal); z-index: 20; box-shadow: 0 1px 5px rgba(11,110,105,.28); }

/* Timeline color customization */
.color-control { min-height: 44px; display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 10px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; }
.color-control input[type="color"] { width: 52px; height: 30px; padding: 2px; border-radius: 7px; cursor: pointer; }
.color-control span { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: #4D626C; font-size: 12px; font-weight: 700; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.color-swatch { width: 25px; height: 25px; padding: 0; border-radius: 7px; border: 2px solid #fff; background: var(--swatch); box-shadow: 0 0 0 1px var(--line); }
.color-swatch:hover { transform: translateY(-1px); }
.color-swatch.selected { box-shadow: 0 0 0 2px var(--ink); }
.activity-editor { margin: 19px 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #F8FAFA; }
.activity-editor-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.activity-editor-header strong, .activity-editor-header small { display: block; }.activity-editor-header strong { font-size: 12px; }.activity-editor-header small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.activity-editor-header .btn { min-height: 34px; padding: 0 11px; font-size: 11px; }
.activity-edit-row { display: grid; grid-template-columns: minmax(140px, 1.05fr) minmax(150px, 1fr) minmax(250px, 1.45fr) 30px; gap: 7px; align-items: center; padding: 8px; border: 1px solid var(--line-soft); border-radius: 9px; background: #fff; }
.activity-edit-row + .activity-edit-row { margin-top: 7px; }
.activity-edit-row .antd-control { min-width: 0; }
.activity-edit-row .ant-select-selector, .activity-edit-row .ant-picker { min-height: 34px !important; border-radius: 8px; font-size: 11px; }
.activity-edit-row .ant-select-selection-wrap { min-height: 32px; }
.activity-edit-row .ant-picker-input > input { font-size: 11px; }
.teamflow-range-popup .ant-picker-panel-container { max-width: calc(100vw - 32px); }
.teamflow-range-popup .ant-picker-header { min-height: 34px; padding: 0 6px; }
.teamflow-range-popup .ant-picker-header button { font-size: 12px; }
.teamflow-range-popup .ant-picker-header-view { line-height: 34px; font-size: 12px; }
.teamflow-range-popup .ant-picker-body { padding: 6px 8px 8px; }
.teamflow-range-popup .ant-picker-content th { height: 24px; font-size: 10px; }
.teamflow-range-popup .ant-picker-cell { padding: 1px 0; font-size: 11px; }
.activity-edit-row input[type="color"] { padding: 3px; }.remove-activity { width: 28px; height: 28px; border: 0; border-radius: 7px; background: #FFF1F0; color: #B23E3A; font-size: 17px; }
.activity-empty { margin: 3px 0 1px; padding: 15px; border: 1px dashed #CCD8DB; border-radius: 9px; color: var(--muted); text-align: center; font-size: 11px; }

@media (max-width: 880px) {
  .app-shell { padding-top: 12px; }.topbar { width: calc(100% - 32px); padding: 0 16px; }.save-state { display: none; }.topbar-actions .btn-secondary { font-size: 0; padding: 0 11px; }.topbar-actions .btn-secondary svg { margin: 0; }
  main { padding: 23px 16px; }.hero-row { align-items: flex-start; }.summary-cards { display: none; }.search-box { width: min(45vw, 250px); }.toolbar { align-items: flex-start; flex-wrap: wrap; }.toolbar-left { flex-wrap: wrap; }.toolbar-right { width: 100%; justify-content: flex-start; }
  .timeline-scroll { max-height: calc(100vh - 295px); }
}
@media (max-width: 590px) {
  .app-shell { padding-top: 10px; }.brand-subtitle { display: none; }.topbar { width: calc(100% - 20px); height: 62px; padding: 0 12px; border-radius: 20px; }.brand { gap: 9px; }.brand-mark { width: 34px; height: 34px; padding-bottom: 8px; }.topbar-actions { gap: 6px; }.topbar-actions .btn-primary { width: 40px; padding: 0; font-size: 0; }.hero-row { margin-bottom: 18px; }.hero-row p { font-size: 12px; }
  .toolbar { flex-direction: column; }.toolbar-left { width: 100%; }.search-box { width: 100%; }.toolbar-filter-control { flex: 1 1 145px; min-width: 145px; width: auto; }.toolbar-right { display: flex; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }.toolbar-right .icon-button { display: none; }.scale-switcher button { min-width: 49px; }.btn-holiday { flex: 0 0 auto; }.workspace-footer { justify-content: center; }.range-label { display: none; }.form-grid { grid-template-columns: 1fr; gap: 0; }
  .activity-editor-header { align-items: flex-start; }.activity-edit-row { grid-template-columns: 1fr 1fr 30px; }.activity-name-control, .activity-member-control { grid-column: 1 / -1; }.activity-range-control { grid-column: 1 / 3; }
  .teamflow-range-popup { width: min(312px, calc(100vw - 32px)) !important; min-width: 0 !important; }
  .teamflow-range-popup .ant-picker-panel-container, .teamflow-range-popup .ant-picker-panels, .teamflow-range-popup .ant-picker-panel { width: 100%; }
  .teamflow-range-popup .ant-picker-panels { flex-direction: column; }
  .teamflow-range-popup .ant-picker-panel:last-child { display: none; }
}
