/* Team work · milestones · timeline · notifications — v3 visual language */
body.v3-shell .team-work, body.v3-shell .milestones, body.v3-shell .notifications { max-width: 1240px; margin: 0 auto; padding: 18px 20px 40px; }
body.v3-shell .tw-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
body.v3-shell .tw-heading h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.2px; margin: 0; color: var(--v3-text); }
body.v3-shell .tw-heading .eyebrow { font-size: 11px; letter-spacing: 1px; color: var(--v3-text-light); margin: 0 0 4px; }
body.v3-shell .tw-note { font-size: 12px; color: var(--v3-text-mid); }

/* Tabs */
body.v3-shell .tw-tabs { display: flex; gap: 4px; padding: 3px; background: var(--v3-cream-mid); border-radius: 999px; width: max-content; max-width: 100%; margin: 0 0 16px; overflow-x: auto; }
body.v3-shell .tw-tab { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--v3-text-mid); text-decoration: none; white-space: nowrap; }
body.v3-shell .tw-tab-active, body.v3-shell .tw-tab[aria-current="page"] { background: #fff; color: var(--v3-green); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

/* Form controls — one consistent look */
body.v3-shell .team-work input:not([type=checkbox]):not([type=hidden]):not([type=file]), body.v3-shell .team-work select, body.v3-shell .team-work textarea,
body.v3-shell .milestones input:not([type=hidden]), body.v3-shell .milestones select, body.v3-shell .milestones textarea {
  appearance: none; -webkit-appearance: none; font: inherit; font-size: 13px; color: var(--v3-text); background: #fff;
  border: 1px solid var(--v3-border); border-radius: 8px; padding: 8px 10px; min-height: 36px; line-height: 1.3; }
body.v3-shell .team-work select, body.v3-shell .milestones select { padding-right: 28px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%234a5e54' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; }
body.v3-shell .team-work input:focus, body.v3-shell .team-work select:focus, body.v3-shell .team-work textarea:focus,
body.v3-shell .milestones input:focus, body.v3-shell .milestones select:focus, body.v3-shell .milestones textarea:focus { outline: 2px solid var(--v3-green-light); outline-offset: 1px; border-color: var(--v3-green-light); }
body.v3-shell .team-work .button, body.v3-shell .milestones .button, body.v3-shell .notifications .button { font: inherit; font-size: 13px; font-weight: 600; padding: 8px 14px; min-height: 36px; border-radius: 999px; border: 1px solid var(--v3-border); background: #fff; color: var(--v3-green); cursor: pointer; }
body.v3-shell .team-work .button.dark, body.v3-shell .milestones .button.dark { background: var(--v3-green); border-color: var(--v3-green); color: #fff; }

/* Quick add */
body.v3-shell .tw-quick-add { display: grid; grid-template-columns: minmax(0,1fr) 150px 150px 190px auto; gap: 8px; align-items: center; padding: 10px; background: #fff; border: 1px solid var(--v3-border); border-radius: var(--v3-radius-lg); margin: 0 0 16px; }
body.v3-shell .tw-quick-add .tw-quick-title { min-width: 0; }
body.v3-shell .tw-quick-add label { display: contents; }

/* Groups / board */
body.v3-shell .tw-group { margin: 0 0 18px; }
body.v3-shell .tw-group > h3, body.v3-shell .tw-board-col-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--v3-text-light); margin: 0 0 8px; }
body.v3-shell .tw-count { background: var(--v3-cream-mid); color: var(--v3-text-mid); font-size: 11px; border-radius: 999px; padding: 1px 7px; }
body.v3-shell .tw-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
body.v3-shell .tw-board-col { background: var(--v3-cream-mid); border-radius: var(--v3-radius-lg); padding: 10px; min-height: 120px; }
body.v3-shell .tw-board-cards { display: grid; gap: 8px; }
body.v3-shell .tw-empty, body.v3-shell .tw-empty-col { font-size: 12px; color: var(--v3-text-light); margin: 6px 0; }

/* Task card */
body.v3-shell .tw-task { background: #fff; border: 1px solid var(--v3-border); border-radius: var(--v3-radius-lg); padding: 12px 12px 10px; margin: 0 0 8px; }
body.v3-shell .tw-task.tw-overdue-card { border-color: #c98b7a; box-shadow: inset 3px 0 0 #b9634f; }
body.v3-shell .tw-task-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
body.v3-shell .tw-task-top a, body.v3-shell .tw-task-top strong { font-size: 14px; font-weight: 600; color: var(--v3-text); text-decoration: none; line-height: 1.35; }
body.v3-shell .tw-task-top a:hover { color: var(--v3-green-light); }
body.v3-shell .tw-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--v3-cream-mid); color: var(--v3-text-mid); white-space: nowrap; }
body.v3-shell .tw-tag-in_progress { background: #e3ecf7; color: #2f4f7a; }
body.v3-shell .tw-tag-blocked { background: #f7e4e0; color: #9a3d2c; }
body.v3-shell .tw-tag-awaiting_approval { background: #f6ecd6; color: #7a5a17; }
body.v3-shell .tw-tag-done { background: var(--v3-green-faint); color: var(--v3-green-mid); }
body.v3-shell .tw-excerpt { font-size: 12px; color: var(--v3-text-mid); margin: 6px 0 0; line-height: 1.5; }
body.v3-shell .tw-task-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--v3-text-light); margin: 8px 0 0; align-items: center; }
body.v3-shell .tw-priority { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
body.v3-shell .tw-overdue, body.v3-shell .tw-overdue-label { color: #b9634f; font-weight: 600; }
body.v3-shell .tw-today { color: var(--v3-green-light); font-weight: 600; }
body.v3-shell .tw-initial { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--v3-green-faint); color: var(--v3-green); font-size: 11px; font-weight: 700; align-items: center; justify-content: center; }
body.v3-shell .tw-checklist-progress { font-size: 11px; color: var(--v3-text-mid); }

/* Inline actions */
body.v3-shell .tw-inline-actions { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--v3-cream-mid); }
body.v3-shell .tw-inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
body.v3-shell .tw-select-inline { min-height: 30px !important; padding: 4px 26px 4px 8px !important; font-size: 12px !important; border-radius: 6px !important; flex: 1 1 110px; }
body.v3-shell .tw-btn-done, body.v3-shell .tw-btn-save { font: inherit; font-size: 12px; font-weight: 600; min-height: 30px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--v3-border); background: #fff; color: var(--v3-green); cursor: pointer; }
body.v3-shell .tw-btn-done { background: var(--v3-green); border-color: var(--v3-green); color: #fff; }
body.v3-shell .tw-btn-done[disabled] { opacity: .45; cursor: default; }
body.v3-shell .tw-inline-form.is-enhanced .tw-btn-save { display: none; }

/* Detail layout */
body.v3-shell .tw-layout, body.v3-shell .tw-item-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 18px; align-items: start; }
body.v3-shell .tw-panel, body.v3-shell .tw-item-main, body.v3-shell .tw-item-aside > section, body.v3-shell .tw-checklist, body.v3-shell .tw-links, body.v3-shell .tw-watchers, body.v3-shell .tw-history { background: #fff; border: 1px solid var(--v3-border); border-radius: var(--v3-radius-lg); padding: 16px; margin: 0 0 12px; }
body.v3-shell .tw-form { display: grid; gap: 12px; }
body.v3-shell .tw-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--v3-text-mid); }
body.v3-shell .tw-form textarea { min-height: 120px; resize: vertical; }
body.v3-shell .tw-section-heading, body.v3-shell .tw-checklist h2, body.v3-shell .tw-links h2, body.v3-shell .tw-watchers h2, body.v3-shell .tw-history h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--v3-text-light); margin: 0 0 10px; }
body.v3-shell .tw-checklist-bar { height: 6px; background: var(--v3-cream-mid); border-radius: 999px; overflow: hidden; margin: 0 0 10px; }
body.v3-shell .tw-checklist-fill { height: 100%; background: var(--v3-green-light); }
body.v3-shell .tw-checklist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
body.v3-shell .tw-cl-item { display: flex; align-items: center; gap: 10px; }
body.v3-shell .tw-cl-check { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--v3-border); background: #fff; color: var(--v3-green); font-size: 13px; cursor: pointer; padding: 0; }
body.v3-shell .tw-cl-done .tw-cl-check { background: var(--v3-green); border-color: var(--v3-green); color: #fff; }
body.v3-shell .tw-cl-done .tw-cl-text { color: var(--v3-text-light); text-decoration: line-through; }
body.v3-shell .tw-cl-text { flex: 1; font-size: 14px; }
body.v3-shell .tw-cl-del { border: 0; background: none; color: var(--v3-text-light); cursor: pointer; font-size: 12px; }
body.v3-shell .tw-cl-add { display: flex; gap: 8px; margin-top: 10px; }
body.v3-shell .tw-cl-add input { flex: 1; }
body.v3-shell .tw-links-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
body.v3-shell .tw-link-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; background: var(--v3-cream-mid); border-radius: 999px; font-size: 12px; }
body.v3-shell .tw-link-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
body.v3-shell .tw-link-chip a { color: var(--v3-green); text-decoration: none; font-weight: 600; }
body.v3-shell .tw-link-del { border: 0; background: none; color: var(--v3-text-light); cursor: pointer; }
body.v3-shell .tw-link-add { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
body.v3-shell .tw-history ul, body.v3-shell .tw-changes { list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--v3-text-mid); display: grid; gap: 6px; }
body.v3-shell .tw-pre { white-space: pre-wrap; font: inherit; font-size: 14px; line-height: 1.55; color: var(--v3-text); margin: 0; }

/* Timeline */
body.v3-shell .tw-tl-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--v3-border); border-radius: var(--v3-radius-lg); padding: 6px; -webkit-overflow-scrolling: touch; }
body.v3-shell .tw-timeline { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 980px; table-layout: fixed; font-size: 12px; }
body.v3-shell .tw-timeline th, body.v3-shell .tw-timeline td { border-bottom: 1px solid var(--v3-cream-mid); border-right: 1px solid var(--v3-cream-mid); vertical-align: top; padding: 6px; }
body.v3-shell .tw-timeline th:first-child, body.v3-shell .tw-timeline td:first-child { position: sticky; left: 0; background: #fff; width: 200px; min-width: 200px; text-align: left; z-index: 1; border-right: 1px solid var(--v3-border); }
body.v3-shell .tw-tl-week { font-weight: 600; color: var(--v3-text-light); text-transform: uppercase; letter-spacing: .4px; font-size: 11px; white-space: nowrap; }
body.v3-shell .tw-tl-now { background: var(--v3-green-faint); }
body.v3-shell .tw-tl-marker { font-weight: 600; color: var(--v3-text); }
body.v3-shell .tw-tl-marker.tw-tl-overdue { color: #b9634f; }
body.v3-shell .tw-tl-milestone-chip, body.v3-shell .tw-tl-task-chip { display: block; padding: 4px 8px; border-radius: 6px; margin: 2px 0; font-size: 11px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
body.v3-shell .tw-tl-milestone-chip { background: var(--v3-green); color: #fff; font-weight: 600; }
body.v3-shell .tw-tl-task-chip { background: var(--v3-cream-mid); color: var(--v3-text); }
body.v3-shell .tw-tl-overdue .tw-tl-task-chip, body.v3-shell .tw-tl-task-chip.tw-tl-overdue { background: #f7e4e0; color: #9a3d2c; }
body.v3-shell .tw-tl-unscheduled { margin-top: 16px; }
body.v3-shell .tw-tl-unscheduled h2, body.v3-shell .tw-tl-unscheduled h3 { font: inherit; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--v3-text-light); margin: 0 0 8px; }

/* Milestones */
body.v3-shell .tw-days-out { font-size: 12px; color: var(--v3-text-mid); }
body.v3-shell .tw-wide { grid-column: 1 / -1; }

/* Notifications */
body.v3-shell .notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
body.v3-shell .notif-list li { background: #fff; border: 1px solid var(--v3-border); border-radius: var(--v3-radius-lg); padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; }
body.v3-shell .notif-list li.is-unread { border-left: 3px solid var(--v3-green-light); }
body.v3-shell .tw-tag-new { background: var(--v3-green); color: #fff; }
body.v3-shell .v3-notif-badge { display: inline-flex; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #b9634f; color: #fff; font-size: 10px; font-weight: 700; align-items: center; justify-content: center; position: absolute; top: -4px; right: -6px; }
body.v3-shell .v3-account-details { position: relative; }

/* Mobile */
@media (max-width: 700px) {
  body.v3-shell .team-work, body.v3-shell .milestones, body.v3-shell .notifications { padding: 12px 12px 32px; }
  body.v3-shell .tw-heading { flex-direction: column; align-items: flex-start; gap: 6px; }
  body.v3-shell .tw-quick-add { grid-template-columns: 1fr 1fr; }
  body.v3-shell .tw-quick-add .tw-quick-title { grid-column: 1 / -1; }
  body.v3-shell .tw-quick-add .button { grid-column: 1 / -1; }
  body.v3-shell .tw-layout, body.v3-shell .tw-item-layout { grid-template-columns: 1fr; }
  body.v3-shell .tw-board { grid-template-columns: 1fr; }
  body.v3-shell .tw-timeline { min-width: 760px; }
  body.v3-shell .tw-timeline th:first-child, body.v3-shell .tw-timeline td:first-child { width: 140px; min-width: 140px; }
}

/* Timeline must scroll inside its wrapper, never widen the page */
body.v3-shell .team-work, body.v3-shell .tw-dashboard, body.v3-shell .v3-content { min-width: 0; max-width: 100%; }
body.v3-shell .tw-tl-wrap { max-width: 100%; width: 100%; box-sizing: border-box; }
body.v3-shell .tw-timeline { width: max-content; min-width: 100%; }
body.v3-shell .v3-content > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
body.v3-shell section.team-work { width: 100%; overflow: hidden; }
body.v3-shell .tw-tl-wrap { overflow-x: auto; }

/* Page gutter + a few legacy classes used by profiles/people pages */
body.v3-shell section.team-work { padding: 18px 20px 40px; box-sizing: border-box; }
body.v3-shell .tw-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
body.v3-shell .tw-profile-fields { font-size: 13px; }
body.v3-shell .tw-profile-fields dt { font-size: 11px; color: var(--v3-text-light); text-transform: uppercase; letter-spacing: .5px; }
body.v3-shell .tw-profile-fields dd { margin: 2px 0 10px; }
body.v3-shell .tw-changes dt { font-weight: 600; text-transform: capitalize; }
body.v3-shell .tw-changes dd { margin: 2px 0 8px; white-space: pre-wrap; }
body.v3-shell .team-work :is(a,button,input,textarea,select,summary):focus-visible { outline: 2px solid var(--v3-green-light); outline-offset: 2px; }
@media (max-width: 700px) { body.v3-shell section.team-work { padding: 12px 12px 32px; } }

/* Beat legacy workspace.css !important gutter reset */
body.v3-shell.workspace-app .team-work { padding: 18px 20px 40px !important; max-width: 1240px !important; margin: 0 auto; }
body.v3-shell.workspace-app .team-work button { font-size: 13px; padding: 8px 14px; border-radius: 999px; }
body.v3-shell.workspace-app .team-work .tw-btn-done, body.v3-shell.workspace-app .team-work .tw-btn-save { font-size: 12px; padding: 4px 10px; border-radius: 6px; }
body.v3-shell.workspace-app .team-work .tw-cl-check { padding: 0; border-radius: 6px; }
@media (max-width: 700px) { body.v3-shell.workspace-app .team-work { padding: 12px 12px 32px !important; } }

/* Timeline: fixed, even week columns; markers never truncate */
body.v3-shell .tw-timeline { table-layout: fixed; width: max-content; min-width: 100%; }
body.v3-shell .tw-timeline th:not(:first-child), body.v3-shell .tw-timeline td:not(:first-child) { width: 92px; min-width: 92px; max-width: 92px; }
body.v3-shell .tw-timeline th:first-child a, body.v3-shell .tw-timeline td:first-child a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--v3-text); text-decoration: none; font-weight: 600; }
body.v3-shell .tw-tl-task-label a { font-weight: 500 !important; color: var(--v3-text-mid) !important; padding-left: 10px; }
body.v3-shell .tw-tl-milestone-chip, body.v3-shell .tw-tl-task-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; overflow: visible; max-width: none; padding: 3px 8px; }
body.v3-shell .tw-tl-flag { width: 0; height: 0; border-left: 7px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
body.v3-shell .tw-tl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--v3-green-light); }
body.v3-shell .tw-tl-overdue .tw-tl-dot { background: #b9634f; }
body.v3-shell .tw-tl-milestone-row th { background: var(--v3-cream-mid) !important; }
/* Card header wrap */
body.v3-shell .tw-task-top { flex-wrap: wrap; align-items: center; row-gap: 4px; }
body.v3-shell .tw-task-id { margin-left: auto; font-size: 11px; color: var(--v3-text-light); }
body.v3-shell .tw-priority-high { color: #9a3d2c; font-weight: 700; }
body.v3-shell .tw-priority-low { color: var(--v3-text-light); }
body.v3-shell .tw-task h3 { margin: 6px 0 0; font-size: 14px; }
body.v3-shell .tw-task h3 a { color: var(--v3-text); text-decoration: none; font-weight: 600; }
/* Milestone form controls */
body.v3-shell .milestones .tw-form textarea { min-height: 90px; }
body.v3-shell .milestones .tw-form { grid-template-columns: 1fr; }
body.v3-shell .tw-tl-loose-row th { color: var(--v3-text-light) !important; font-weight: 500 !important; }
body.v3-shell .tw-dashboard > .tw-note:last-child, body.v3-shell .tw-dashboard > p.tw-note { margin-top: 20px; }
@media (max-width: 700px) {
  body.v3-shell .tw-quick-add { grid-template-columns: 1fr 1fr; }
  body.v3-shell .tw-quick-add select[name="milestone_id"] { grid-column: 1 / -1; }
  body.v3-shell .tw-group { margin-top: 8px; }
  body.v3-shell .v3-footer { font-size: 11px; line-height: 1.5; }
}
/* Dock is mobile-only; hard-hide elsewhere */
@media (min-width: 701px) { body .v3-dock { display: none !important; } }
.v3-dock svg { width: 20px; height: 20px; }
/* Inline controls read as quick actions, not a form; hide duplicate status badge when the select is present */
body.v3-shell .tw-task:has(.tw-inline-form) .tw-task-top .tw-tag { display: none; }
body.v3-shell .tw-inline-actions { border-top: 0; padding-top: 6px; margin-top: 8px; }
body.v3-shell .tw-inline-form { gap: 6px; }
body.v3-shell .tw-select-inline { flex: 0 1 auto; min-width: 110px; background-color: var(--v3-cream-mid); border-color: transparent !important; }
body.v3-shell .tw-btn-done { margin-left: auto; }
/* Timeline loose row: single line */
body.v3-shell .tw-tl-loose-row th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Notifications */
body.v3-shell .notif-list li .tw-task-top { width: 100%; align-items: center; }
body.v3-shell .notif-list li .tw-tag-new { margin-left: auto; }
@media (max-width: 700px) {
  body.v3-shell.workspace-app .v3-topbar-nav { display: none !important; }
  body.v3-shell.workspace-app .v3-dock { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  body.v3-shell.workspace-app .v3-dock-link { min-width: 0; overflow: hidden; }
  body.v3-shell.workspace-app .v3-dock-link span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.v3-shell.workspace-app .v3-topbar { gap: 8px; }
}
/* Card inline row aligns with card content */
body.v3-shell .tw-inline-actions { padding-left: 0; margin-left: 0; }
body.v3-shell .tw-inline-form { padding: 0; margin: 0; }
