:root {
  color-scheme: light;
  --blue: #2563eb; --blue-hover: #1d4ed8; --sidebar: #0f1b2a;
  --bg: #f4f7fb; --card: #fff; --text: #172235; --muted: #758195;
  --border: #e8edf4; --green: #10a67b; --red: #e65060;
  --shadow: 0 3px 14px #16315804;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-decoration: none; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; border: 1px solid transparent; border-radius: 7px; padding: 9px 15px; font-size: 12px; font-weight: 550; color: white; background: var(--blue); cursor: pointer; transition: background .15s, box-shadow .15s; }
button:hover, .button:hover { background: var(--blue-hover); }
button:disabled { opacity: .5; cursor: wait; }
input, select, textarea { min-width: 0; width: 100%; min-height: 43px; background: #f9fbfe; border: 1px solid #e0e7f0; border-radius: 6px; padding: 10px 12px; color: var(--text); }
input::placeholder, textarea::placeholder { color: #8b96a8; opacity: 1; }
textarea { resize: vertical; }
input[type="checkbox"] { width: 17px; min-height: 17px; height: 17px; padding: 0; accent-color: var(--green); }
:focus-visible { outline: 3px solid #82aaf8; outline-offset: 3px; }
button:focus-visible { position: relative; z-index: 1; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: #142034; }
.icon { width: 19px; height: 19px; flex-shrink: 0; vertical-align: middle; }
.icon-button { padding: 8px; width: 36px; min-height: 36px; flex-shrink: 0; color: var(--muted); background: transparent; border-radius: 6px; }
.icon-button:hover { color: var(--blue); background: #edf3ff; }
.secondary { background: #eff3f8; color: #34445b; border-color: #e7edf4; }
.secondary:hover { background: #e4ebf6; }
.text-button { color: var(--blue); background: transparent; padding: 7px 10px; }
.text-button:hover { background: #edf3ff; }
.text-link { font-size: 11px; color: var(--blue); }
.muted { color: var(--muted); }
.eyebrow { color: var(--blue); font-size: 9px; letter-spacing: .14em; font-weight: 650; margin-bottom: 7px; }
.skip-link { position: fixed; top: -100px; left: 20px; padding: 15px; background: white; z-index: 100; }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; }
.sidebar { width: 220px; position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; padding: 29px 18px 20px; color: #c5cfdd; background: linear-gradient(170deg, #112033, #101e28); overflow-y: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 25px; font-weight: 650; letter-spacing: -.9px; color: white; }
.logo-mark { display: inline-grid; place-items: center; width: 26px; height: 29px; border: 2px solid currentColor; border-radius: 5px; font-size: 20px; line-height: 1; font-weight: 700; letter-spacing: -2px; padding-right: 2px; transform: skewY(-5deg); }
.sidebar > .brand { padding: 0 12px; margin-bottom: 18px; }
/* Ambientes (D-012): ocupa o espaço que era margem sob a marca, sem deslocar o menu. */
.workspace-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; margin: 0 0 13px; border-radius: 8px; background: #ffffff0b; }
.workspace-switch button { min-height: 30px; padding: 6px 4px; font-size: 11.5px; font-weight: 500; color: #b8c5d6; background: transparent; border-radius: 6px; }
.workspace-switch button:hover { background: #ffffff10; color: white; }
.workspace-switch button.active { background: var(--blue); color: white; }
.workspace-chip { display: none; }
.main-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 11px 13px; min-height: 43px; color: #cbd5e1; font-size: 12px; font-weight: 450; border-radius: 7px; background: transparent; text-decoration: none; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-item:hover { background: #ffffff09; color: white; }
.nav-item.active { color: #f3f7ff; background: #203e61; box-shadow: inset 0 0 0 1px #ffffff04; }
.sidebar-categories { padding: 23px 4px 10px; border-top: 1px solid #ffffff0b; margin-top: 22px; }
.sidebar-categories h2 { font-size: 10px; font-weight: 400; color: #9daebf; margin: 0 9px 10px; }
/* Rótulos (D-013): o cabeçalho da seção ganha o atalho "Gerenciar" no Trabalho. */
.sidebar-section-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 9px 10px; }
.sidebar-section-heading h2 { margin: 0; }
.sidebar-section-heading button { min-height: 0; padding: 2px 6px; font-size: 10px; font-weight: 400; color: #9daebf; background: transparent; }
.sidebar-section-heading button:hover { color: white; background: #ffffff10; }
#category-nav { display: grid; gap: 1px; }
.category-nav-item { justify-content: flex-start; gap: 12px; color: #c1cdda; background: transparent; font-size: 11px; padding: 6px 10px; min-height: 31px; font-weight: 400; }
.category-nav-item:hover, .category-nav-item.active { background: #ffffff0c; color: white; }
.category-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--category, #579af9); box-shadow: inset 0 0 0 1px #ffffff35; flex-shrink: 0; }
.blue { --category: #3b82f6; --category-bg: #eaf2ff; --category-text: #2264ce; }
.orange { --category: #eda246; --category-bg: #fff3e7; --category-text: #a96423; }
.pink { --category: #ea6f9f; --category-bg: #ffedf3; --category-text: #ad4670; }
.purple { --category: #9183db; --category-bg: #f1edff; --category-text: #7054bc; }
.green { --category: #49b784; --category-bg: #eaf8f1; --category-text: #28865a; }
.teal { --category: #20b59a; --category-bg: #e6f7f1; --category-text: #09856d; }
.emerald { --category: #75aeab; --category-bg: #eaf6f3; --category-text: #377f72; }
.indigo { --category: #7c83d9; --category-bg: #eeeeff; --category-text: #626ac0; }
.gray { --category: #9aa8ba; --category-bg: #eff2f6; --category-text: #64748b; }
.sidebar-bottom { margin-top: auto; padding-top: 30px; }
.sidebar-bottom > button { width: 100%; }
.sidebar-bottom > p { font-size: 11px; color: #a7b6c5; text-align: center; line-height: 1.9; margin: 28px 0 0; }
.sidebar-bottom small { display: block; font-size: 10px; color: #899baa; }
.workspace { margin-left: 220px; padding: 34px clamp(22px, 3vw, 48px) 22px; max-width: 1800px; }
/* Sem a frase do dia e sem altura mínima: a lista começa logo abaixo do título (pedido do usuário). */
.top-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; margin-bottom: 18px; }
.heading { min-width: 0; }
.heading h1 { font-size: 27px; letter-spacing: -.8px; line-height: 1.3; margin-bottom: 6px; overflow-wrap: anywhere; }
.heading > p { color: #627188; font-size: 13px; margin: 0; }
.header-tools { display: flex; gap: 16px; align-items: center; padding-top: 3px; }
.search-box { display: flex; align-items: center; gap: 8px; background: #ffffff8c; border: 1px solid var(--border); border-radius: 7px; padding: 0 10px; color: #7e8da2; }
.search-box .icon { width: 16px; height: 16px; }
.search-box input { width: 198px; border: 0; background: transparent; min-height: 35px; padding: 6px 0; font-size: 11px; }
.avatar { width: 35px; height: 35px; min-height: 35px; padding: 0; border-radius: 50%; background: #e1eafb; color: #4268a4; border: 3px solid white; box-shadow: 0 1px 4px #122c5612; }
.avatar:hover { background: #d2e2ff; }
.mobile-brand, .mobile-nav { display: none; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1fr) 245px; gap: 20px; align-items: start; }
.today-main { min-width: 0; display: grid; gap: 19px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.summary-card { display: flex; align-items: center; gap: 11px; padding: 16px 15px; border-radius: 9px; min-height: 76px; }
.summary-card > .icon { width: 25px; height: 25px; }
.summary-card strong { display: block; font-size: 22px; font-weight: 650; line-height: 1.15; }
.summary-card span { display: block; font-size: 9px; margin-top: 4px; color: #596c84; white-space: nowrap; }
.summary-card.blue { background: #e8f1ff; color: #2563eb; }
.summary-card.green { background: #e6f6f0; color: #199676; }
.summary-card.red { background: #fff0f0; color: #e65b58; }
.summary-card.orange { background: #fff4e6; color: #df941f; }
button.summary-card { justify-content: flex-start; width: 100%; border: 2px solid transparent; font-weight: inherit; text-align: left; }
button.summary-card:hover { filter: brightness(.97); }
button.summary-card.blue:hover { background: #e8f1ff; } button.summary-card.green:hover { background: #e6f6f0; }
button.summary-card.red:hover { background: #fff0f0; } button.summary-card.orange:hover { background: #fff4e6; }
button.summary-card.active { border-color: currentColor; }
.card { border: 1px solid var(--border); border-radius: 10px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 16px 17px 10px; }
.section-heading h2 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; margin: 0; }
.section-heading h2 .icon { color: var(--blue); width: 17px; height: 17px; }
.section-count { font-weight: 500; font-size: 11px; color: #4b5970; }
.overdue-section .section-heading h2 .icon { color: #ed655f; }
.task-list { list-style: none; padding: 0 15px; margin: 0; }
.task-row { display: flex; align-items: center; gap: 9px; min-height: 49px; border-bottom: 1px solid #eef2f7; padding: 5px 0; }
.task-row:last-child { border-bottom: none; }
.task-check { display: grid; place-items: center; cursor: pointer; min-width: 28px; min-height: 36px; margin-left: -5px; }
.task-check input { appearance: none; border: 1.5px solid #cbd6e3; background: white; border-radius: 4px; cursor: pointer; margin: 0; width: 16px; height: 16px; min-height: 16px; position: relative; }
.task-check input:checked { border-color: var(--green); background: var(--green); }
.task-check input:checked::after { content: ""; position: absolute; width: 7px; height: 4px; border-left: 1.5px solid white; border-bottom: 1.5px solid white; transform: rotate(-45deg); top: 3px; left: 3px; }
.task-check input:disabled { opacity: .5; cursor: wait; }
.task-body { min-width: 0; flex: 1; }
.task-title { justify-content: flex-start; padding: 4px 0; border: 0; border-radius: 3px; min-height: 28px; background: transparent; color: #29374b; font-size: 12px; font-weight: 400; text-align: left; line-height: 1.55; word-break: break-word; }
.task-title:hover { color: var(--blue); background: transparent; }
.is-done .task-title { color: #85929f; text-decoration: line-through; text-decoration-color: #bdc6d2; }
.task-subtitle { display: flex; flex-wrap: wrap; gap: 8px; font-size: 9px; color: #8894a5; overflow-wrap: anywhere; }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 10px; }
.category-badge { display: inline-block; padding: 3px 7px; border-radius: 5px; background: var(--category-bg); color: var(--category-text); font-size: 10px; line-height: 1.5; white-space: nowrap; }
.late-label { color: #dd5263; font-size: 10px; white-space: nowrap; min-width: 76px; }
.priority-high { color: #d65867; font-size: 9px; font-weight: 550; }
.priority-urgent { color: #d92d3f; font-size: 9px; font-weight: 650; }
.task-time { display: inline-flex; gap: 5px; align-items: center; color: #526782; font-size: 10px; white-space: nowrap; }
.task-time .icon { width: 13px; height: 13px; color: var(--blue); }
.date-label { font-size: 10px; color: #79869a; }
.task-row > .icon-button { width: 29px; padding: 5px; margin-right: -4px; }
.add-activity { color: var(--blue); background: #f1f6ff; width: calc(100% - 30px); margin: 12px 15px 15px; min-height: 42px; font-size: 11px; }
.add-activity:hover { background: #e5eeff; }
.section-empty { color: var(--muted); font-size: 11px; padding: 10px 17px 16px; margin: 0; }
.right-panel { display: grid; gap: 17px; }
.right-panel h2 { font-size: 11px; }
.right-panel .section-heading { padding: 16px 13px 10px; }
.right-panel .section-heading h2 > .icon { display: none; }
.progress-card { padding: 16px 18px 18px; }
.progress-card h2 { margin-bottom: 18px; }
.progress-ring { --progress: 0%; width: 132px; height: 132px; margin: 0 auto; border-radius: 50%; padding: 9px; background: conic-gradient(var(--blue) var(--progress), #e8eef5 0); transform: rotate(-90deg); }
.progress-ring > div { background: white; border-radius: 50%; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; flex-direction: column; transform: rotate(90deg); }
.progress-ring strong { font-size: 26px; letter-spacing: -1px; line-height: 1.2; }
.progress-ring span { font-size: 10px; color: #7b879b; margin-top: 5px; }
.progress-card > p { text-align: center; font-size: 10px; line-height: 1.8; color: #60718a; margin: 20px 0 0; }
.featured-project { display: flex; gap: 9px; align-items: center; padding: 10px 13px; color: var(--text); }
.featured-project:hover { background: #f8fbff; }
.featured-project > .icon { width: 18px; color: var(--blue); }
.featured-project > div:not(.progress-bar) { flex: 1; min-width: 0; }
.featured-project strong { display: block; font-size: 11px; font-weight: 550; overflow-wrap: anywhere; }
.featured-project small { display: block; font-size: 9px; color: #8a96a8; }
.progress-bar { height: 5px; width: 100%; background: #e9eef6; border-radius: 9px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.featured-project .progress-bar { max-width: 53px; }
.quick-action { display: flex; justify-content: flex-start; gap: 10px; align-items: center; padding: 9px 10px; min-height: 37px; font-size: 10px; border: 1px solid #eaf0f7; background: #f1f5fa; border-radius: 6px; margin: 7px 12px; width: calc(100% - 24px); color: #354b67; }
.quick-action .icon { width: 16px; height: 16px; }
.quick-action:hover { background: #e9f0fb; }
.quick-action:last-child { margin-bottom: 13px; }
.primary-soft { color: var(--blue); background: #e8f1ff; }
.page-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.page-toolbar > p { font-size: 12px; margin: 0; }
.page-toolbar > button { margin-left: auto; }
.page-toolbar > select { width: auto; }
.category-filters { display: flex; gap: 5px; flex-wrap: wrap; margin: 0 0 20px; }
.filter-chip { background: transparent; color: #64748b; font-size: 10px; gap: 6px; min-height: 32px; padding: 6px 10px; border-radius: 6px; }
.filter-chip .icon { width: 12px; height: 12px; }
.filter-chip .category-dot { width: 6px; height: 6px; }
.filter-chip:hover, .filter-chip.active { background: #e5efff; color: #2563eb; }
.active-filter { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; margin-bottom: 15px; border: 1px solid #d6e5ff; background: #eef5ff; border-radius: 7px; color: #3665a6; font-size: 11px; }
.active-filter .text-button { min-height: 30px; font-size: 11px; }
.active-filter .icon { width: 13px; height: 13px; }
.days-board { display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.day-column { border: 1px solid var(--border); border-radius: 9px; background: #ffffff75; min-height: 430px; padding: 14px 10px; }
.day-column:first-child { background: #edf5ff; border-color: #dce9fa; }
.day-heading { border-bottom: 1px solid var(--border); margin-bottom: 12px; padding: 0 4px 8px; }
.day-heading h2 { text-transform: capitalize; font-size: 13px; margin-bottom: 2px; }
.day-heading strong { font-weight: 400; font-size: 11px; }
.day-heading p { color: #77869d; font-size: 10px; margin: 11px 0 0; }
.board-task { display: block; position: relative; min-height: 41px; width: 100%; text-align: left; background: white; box-shadow: 0 2px 5px #22395704; border: 1px solid #e9edf4; color: #334158; padding: 9px 10px 9px 13px; margin-bottom: 8px; font-size: 11px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
.board-task::before { position: absolute; content: ""; left: 4px; top: 8px; bottom: 8px; width: 2px; background: var(--category); border-radius: 4px; }
.board-task:hover { background: #f8fbff; border-color: #bdd4f7; }
.board-task small { display: block; font-size: 9px; margin-top: 3px; color: #8794a7; }
.day-add { color: var(--blue); background: #f8fbff; border: 1px solid #e5edf8; width: 100%; min-height: 34px; font-size: 10px; }
.day-add .icon { width: 14px; height: 14px; }
.day-add:hover { background: #e6f0ff; }
.day-empty { font-size: 10px; color: #99a5b7; text-align: center; margin: 25px 0; }
.board-controls { display: flex; align-items: center; gap: 7px; width: 100%; justify-content: flex-end; }
.board-controls input { max-width: 145px; min-height: 36px; padding: 6px; font-size: 11px; }
.board-controls button { min-height: 36px; }
.board-footnote { font-size: 11px; color: #8390a2; margin-top: 20px; }
.projects-grid, .notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.project-card { display: flex; flex-direction: column; gap: 12px; color: var(--text); padding: 22px; }
.project-card:hover { border-color: #c5dafa; box-shadow: 0 5px 20px #24416a09; }
.project-card-top { display: flex; align-items: center; justify-content: space-between; }
.project-card-top > .icon { width: 27px; height: 27px; color: var(--blue); }
.status-badge { color: #4770ad; background: #edf4ff; border-radius: 5px; padding: 4px 8px; font-size: 10px; white-space: nowrap; }
.project-card h2 { font-size: 18px; margin: 5px 0 0; overflow-wrap: anywhere; }
.project-description { font-size: 12px; color: var(--muted); margin-bottom: auto; white-space: pre-line; overflow-wrap: anywhere; }
.project-card > .category-badge { align-self: flex-start; }
.project-counts { display: flex; justify-content: space-between; gap: 7px; font-size: 10px; color: #6e7e94; margin-top: 8px; }
.project-card > small { font-size: 10px; }
.back-link { display: inline-flex; gap: 5px; align-items: center; font-size: 11px; margin-bottom: 17px; }
.back-link .icon { width: 13px; height: 13px; }
.project-banner { display: flex; align-items: center; gap: 25px; padding: 20px; margin-bottom: 20px; }
.project-banner-progress { flex: 1; max-width: 300px; margin-left: auto; }
.project-banner-progress strong { display: block; font-size: 11px; margin-bottom: 7px; font-weight: 500; }
.tabs { display: flex; border-bottom: 1px solid #dfe7f0; gap: 15px; margin-bottom: 20px; }
.tab { background: transparent; border-radius: 0; font-size: 12px; color: #6a7a92; border-bottom: 2px solid transparent; padding: 10px 6px; }
.tab:hover { background: #edf3fc; }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.project-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; align-items: start; }
.project-details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 5px 17px 20px; font-size: 11px; margin: 0; }
.project-details dt { color: #7a8ba0; }
.project-details dd { margin: 0; overflow-wrap: anywhere; }
.project-detail-grid .note-content { padding: 12px 17px; }
.history-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.history-filters select { width: auto; max-width: 100%; font-size: 12px; }
.history-filters label { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.history-filters input { width: 145px; font-size: 12px; }
.report-summary { display: flex; align-items: center; gap: 18px; padding: 22px; margin-bottom: 20px; color: #627188; }
.report-summary .icon { width: 30px; height: 30px; color: var(--blue); }
.report-summary strong { color: var(--blue); font-size: 34px; }
.report-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 35px; gap: 20px; padding: 14px 20px; align-items: center; font-size: 12px; }
.report-row .progress-bar > span { background: var(--category); }
.note-card { padding: 20px; }
.note-heading { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.note-heading > .icon { color: var(--blue); width: 16px; }
.note-heading h2 { font-size: 15px; flex: 1; margin: 0; overflow-wrap: anywhere; }
.note-content { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; color: #65758b; line-height: 1.8; }
.note-card .note-content { max-height: 250px; overflow-y: auto; }
.empty-state { text-align: center; padding: 36px 22px; }
.empty-state > .icon { width: 32px; height: 32px; padding: 7px; background: #eff5ff; border-radius: 50%; box-sizing: content-box; color: #84a5dd; margin-bottom: 12px; }
.empty-state h3 { font-size: 14px; margin-bottom: 8px; }
.empty-state p { color: #8592a5; font-size: 12px; margin-bottom: 0; }
.empty-state > button, .empty-state > a { margin-top: 20px; }
.empty-card { background: white; border: 1px solid var(--border); padding: 35px; text-align: center; border-radius: 10px; }
.empty-card h2 { font-size: 20px; }
.empty-card p { color: var(--muted); }
.loading-state { padding: 60px 20px; display: flex; align-items: center; justify-content: center; gap: 15px; color: var(--muted); }
.loader { width: 22px; height: 22px; border: 2px solid #d6e4f8; border-top-color: var(--blue); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.feedback { background: #e7f5ee; color: #267558; padding: 12px 15px; border-radius: 7px; border: 1px solid #d6ecdf; margin-bottom: 20px; font-size: 12px; }
.feedback.error { color: #b94049; background: #fff0f0; border-color: #f4dadd; }
.workspace-footer { text-align: center; color: #98a5b6; font-size: 10px; margin-top: 40px; }
.workspace-footer span { padding: 0 8px; color: #bac5d4; }
dialog { padding: 0; border: 1px solid #e5ebf4; border-radius: 14px; background: white; color: var(--text); box-shadow: 0 25px 100px #0b203a30; max-height: 90dvh; max-width: calc(100vw - 28px); overflow-y: auto; }
dialog::backdrop { background: #0e1e356b; backdrop-filter: blur(3px); }
.form-dialog { width: 480px; padding: 25px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 23px; }
.dialog-heading h2 { font-size: 19px; letter-spacing: -.3px; margin: 0; }
.dialog-heading .icon-button { margin-right: -8px; }
.form-dialog form > label, .form-grid > label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: #53637b; margin-bottom: 16px; }
.optional { display: contents; color: #99a4b4; font-size: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.date-options { padding: 0; border: 0; margin: 0 0 15px; }
.date-options legend { font-size: 12px; color: #53637b; margin-bottom: 8px; }
.segmented { display: flex; background: #f2f5f9; border-radius: 6px; padding: 3px; gap: 2px; }
.segmented button { flex: 1; min-height: 32px; font-size: 11px; padding: 6px; background: transparent; color: #77869c; }
.segmented button.active { background: white; color: var(--blue); box-shadow: 0 1px 4px #1c325412; }
.time-option { display: flex; gap: 14px; align-items: center; margin: 0 0 17px; font-size: 12px; color: #53637b; }
.time-option > label { flex: 1; }
#has-time { appearance: none; width: 32px; height: 19px; min-height: 19px; border-radius: 20px; position: relative; background: #d5ddea; border: 0; cursor: pointer; }
#has-time::after { content: ""; width: 13px; height: 13px; background: white; border-radius: 50%; position: absolute; top: 3px; left: 3px; box-shadow: 0 1px 3px #1c325420; }
#has-time:checked { background: var(--blue); }
#has-time:checked::after { left: 16px; }
#has-time:disabled { opacity: .5; cursor: not-allowed; }
.time-option input[type="time"] { width: 115px; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.form-error, .error, .observation-error { color: #c24450; font-size: 12px; }
/* Observações da atividade (D-021): registro com data, último campo do formulário. */
.observations { border: 0; border-top: 1px solid var(--border); padding: 14px 0 0; margin: 4px 0 12px; }
.observations legend { font-size: 12px; color: #53637b; padding: 0 6px 0 0; }
.observations-list { list-style: none; margin: 8px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }
.observation { background: #f9fbfe; border: 1px solid #e0e7f0; border-radius: 6px; padding: 6px 6px 8px 12px; }
.observation-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.observation-head time { font-size: 10px; color: var(--muted); }
.observation-head .icon-button { width: 28px; height: 28px; min-height: 28px; }
.observation p { margin: 2px 0 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.observation-empty { font-size: 12px; color: var(--muted); }
.observation-new { display: flex; gap: 8px; align-items: flex-end; }
.observation-new button { flex: none; }
/* Situação da atividade (D-021/D-024): só o ícone, antes do título; o nome fica no title. */
.task-heading { display: flex; align-items: flex-start; gap: 4px; }
.status-icon { display: inline-grid; place-items: center; flex: none; width: 18px; height: 28px; }
.status-icon .icon { width: 15px; height: 15px; }
.task-heading + .task-subtitle { padding-left: 44px; }
.priority-icon { display: inline-grid; place-items: center; flex: none; width: 16px; height: 28px; margin-right: 2px; }
.priority-icon .icon { width: 14px; height: 14px; stroke-width: 2; }
.priority-icon.is-0 { color: #d92d3f; }
.priority-icon.is-0 .icon { width: 15px; height: 15px; fill: #fde3e6; }
.priority-icon.is-1 { color: #d65867; }
.task-row.is-urgent { background: #fff5f6; box-shadow: inset 3px 0 0 #d92d3f; }
.task-row.is-urgent .task-title { color: #b3212f; font-weight: 550; }
.priority-icon.is-2 { color: #d19a2a; }
.priority-icon.is-3 { color: #6f94c9; }
.status-icon.is-not_started { color: #8a97a8; }
.status-icon.is-in_progress { color: #2264ce; }
.status-icon.is-suspended { color: #c07d14; }
.status-icon.is-done { color: #2f9a5d; }
.status-icon.is-cancelled { color: #9a6b7a; }
.form-dialog form > .check-label { flex-direction: row; align-items: center; gap: 10px; }
.action-dialog { width: 370px; padding: 22px; }
.action-dialog .dialog-heading { margin-bottom: 10px; }
.action-dialog .dialog-heading h2 { font-size: 16px; }
#action-title { font-size: 12px; margin-bottom: 15px; overflow-wrap: anywhere; }
.task-action { display: flex; justify-content: flex-start; width: 100%; border-radius: 0; border-bottom: 1px solid #eef2f7; background: transparent; color: #475870; padding: 13px 5px; font-size: 12px; }
.task-action:hover { background: #f2f6fc; }
.task-action .icon { width: 17px; height: 17px; }
.success-text { color: #18946f; }
.danger-text { color: #de5165; }
.action-dismiss { width: 100%; margin-top: 20px; }
.settings-body { text-align: center; color: #7b899e; font-size: 13px; }
.settings-avatar { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 15px; }
.settings-body h3 { font-size: 22px; }
.settings-body .button { width: 100%; margin: 12px 0; }
.danger-button { background: #fff0f0; color: #c74e5c; width: 100%; }
.danger-button:hover { background: #ffe1e5; }
.login-page { background: #f4f7fb; }
.login-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.login-story { padding: 45px clamp(32px, 5vw, 80px) 32px; color: #c9d7e7; background: radial-gradient(ellipse at 20% 55%, #204a78, transparent 65%), linear-gradient(140deg, #12233a, #0f1b2a); display: flex; flex-direction: column; overflow: hidden; position: relative; }
.login-story .brand { font-size: 30px; }
.story-content { margin: auto 0; padding: 60px 0 30px; position: relative; }
.story-content .eyebrow { color: #81b3fb; margin-bottom: 21px; font-size: 10px; }
.story-content h1 { color: white; font-size: clamp(35px, 4vw, 58px); letter-spacing: -2px; line-height: 1.17; margin-bottom: 22px; font-weight: 650; }
.story-content h1 em { font-style: normal; color: #85b8ff; }
.story-content > p { font-size: 14px; line-height: 1.8; color: #a6bbd2; }
.login-preview { margin-top: 39px; border: 1px solid #ffffff1a; background: #ffffff09; border-radius: 12px; padding: 20px; max-width: 380px; transform: rotate(-3deg); box-shadow: 0 20px 50px #050e201a; }
.login-preview > p { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 20px; color: #deebff; }
.login-preview > p span { color: #8ba9ce; }
.preview-task { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-top: 1px solid #ffffff0b; font-size: 12px; color: #b5c9e4; }
.preview-check { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid #62809f; border-radius: 4px; color: white; font-size: 11px; }
.preview-check.done { background: #21a58c; border-color: #21a58c; }
.preview-task > small { margin-left: auto; background: #397baf29; padding: 3px 6px; border-radius: 4px; color: #8bbbee; font-size: 9px; }
.story-footer { color: #8ca2b9; font-size: 11px; margin: 0; }
.story-footer span { display: block; font-size: 10px; margin-top: 4px; color: #6f89a5; }
.login-panel { padding: 48px 32px; display: grid; place-items: center; }
.login-card { width: 100%; max-width: 350px; }
.login-card h2 { font-size: 27px; letter-spacing: -.7px; margin: 13px 0 10px; }
.login-subtitle { font-size: 13px; color: #8592a6; margin-bottom: 30px; }
.login-card form { display: grid; gap: 17px; }
.login-card label { display: grid; gap: 7px; font-size: 12px; color: #51637c; }
.login-card input { background: white; min-height: 47px; }
.telegram-help { display: flex; align-items: flex-start; gap: 12px; background: #e9f1fe; color: #58799f; padding: 14px; border-radius: 8px; margin-top: 3px; }
.telegram-help > span { font-size: 22px; color: var(--blue); line-height: 1.3; }
.telegram-help p { font-size: 11px; line-height: 1.8; margin: 0; }
.telegram-help a { text-decoration: underline; text-underline-offset: 3px; }
.telegram-help strong { color: #2b68b4; }
.login-card .code-input { letter-spacing: .5em; font-size: 20px; }
.field-help { font-size: 10px; color: #8390a3; margin: -10px 0 0; }
.login-card button[type="submit"] { min-height: 47px; font-size: 13px; margin-top: 4px; justify-content: space-between; }
.login-footnote { font-size: 10px; color: #93a0b2; text-align: center; margin: 25px 0 0; }
.login-card .error { margin: 0; }
@media (min-width: 1600px) { .workspace { padding-left: 60px; padding-right: 60px; } .today-grid { grid-template-columns: minmax(0, 1fr) 280px; } .task-row { min-height: 55px; } }
@media (max-width: 1200px) {
  .sidebar { width: 195px; padding: 26px 14px 18px; }
  .workspace { margin-left: 195px; padding: 28px 23px; }
  .today-grid { grid-template-columns: minmax(0, 1fr) 215px; gap: 15px; }
  .summary-grid { gap: 8px; }
  .summary-card { padding: 13px 10px; gap: 7px; }
  .summary-card > .icon { width: 20px; height: 20px; }
  .summary-card span { font-size: 8px; }
  .summary-card strong { font-size: 20px; }
  .task-meta { gap: 5px; }
  .late-label { min-width: 0; }
  .header-tools { gap: 9px; }
  .search-box input { width: 145px; }
  .heading h1 { font-size: 25px; }
  .projects-grid, .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .sidebar { width: 185px; }
  .workspace { margin-left: 185px; padding: 27px 20px; }
  .today-grid { grid-template-columns: minmax(0, 1fr); }
  .right-panel { grid-template-columns: 1fr 1fr; }  /* 4 cartões com Prazos (D-016): 2 × 2 */
  .progress-ring { width: 100px; height: 100px; padding: 7px; }
  .progress-ring strong { font-size: 22px; }
  .progress-card { padding: 15px 10px; }
  .right-panel .section-heading { display: block; }
  .right-panel .text-link { font-size: 9px; }
  .featured-project { gap: 6px; }
  .featured-project .progress-bar { display: none; }
  .summary-card { padding: 16px; }
  .summary-card span { font-size: 9px; }
  .summary-card > .icon { width: 25px; height: 25px; }
  .top-header { gap: 14px; flex-wrap: wrap; }
  .header-tools { padding: 0; }
  .project-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .project-banner { flex-wrap: wrap; gap: 14px; }
}
@media (min-width: 701px) and (max-width: 850px) {
  .sidebar { transform: translateX(-100%); visibility: hidden; box-shadow: 12px 0 30px #0b203a25; }
  .sidebar-open .sidebar { transform: translateX(0); visibility: visible; top: 66px; }
  .workspace { margin-left: 0; }
  .mobile-brand { display: flex; align-items: center; gap: 10px; width: 100%; }
  .mobile-brand .brand { color: #172d48; font-size: 21px; }
  .top-header { flex-wrap: wrap; }
}
@media (max-width: 700px) {
  body { font-size: 13px; }
  .sidebar { width: 240px; transform: translateX(-100%); visibility: hidden; box-shadow: 12px 0 30px #0b203a25; top: 62px; bottom: 68px; padding-top: 16px; }
  .sidebar-open .sidebar { transform: translateX(0); visibility: visible; }
  .sidebar > .brand { display: none; }
  .sidebar-bottom { padding-top: 12px; }
  .sidebar-bottom > p { margin-top: 12px; }
  .workspace { margin-left: 0; padding: 0 16px calc(95px + env(safe-area-inset-bottom)); }
  .top-header { padding-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; margin-bottom: 21px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; grid-column: 1; grid-row: 1; margin-left: -8px; min-height: 36px; }
  .mobile-brand .brand { font-size: 22px; color: #15293f; }
  .mobile-brand .logo-mark { width: 19px; height: 23px; font-size: 16px; border-width: 1.7px; border-radius: 3px; }
  .header-tools { display: contents; }
  .header-tools > .avatar { grid-column: 2; grid-row: 1; width: 32px; height: 32px; }
  .search-box { grid-row: 3; grid-column: 1 / -1; margin-top: 15px; background: #ffffffa6; }
  .search-box input { width: 100%; min-height: 35px; }
  .heading { grid-row: 2; grid-column: 1 / -1; padding-top: 23px; }
  .heading h1 { font-size: 24px; margin-bottom: 5px; }
  .heading > p { font-size: 11px; line-height: 1.6; margin-bottom: 0; }
  .today-main { gap: 15px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .summary-card { min-height: 67px; padding: 12px 16px; gap: 12px; }
  .summary-card strong { font-size: 22px; }
  .summary-card span { font-size: 9px; }
  .section-heading { padding: 14px 12px 9px; }
  .section-heading h2 { font-size: 12px; }
  .task-list { padding: 0 11px; }
  .task-row { display: grid; grid-template-columns: 23px minmax(0, 1fr) 30px; gap: 0 5px; padding: 9px 0; }
  .task-check { grid-column: 1; grid-row: 1 / 3; align-self: start; min-height: 34px; min-width: 24px; margin: 0; }
  .task-body { grid-column: 2; grid-row: 1; }
  .task-row > .icon-button { grid-column: 3; grid-row: 1 / 3; align-self: start; min-height: 36px; width: 30px; }
  .task-meta { grid-column: 2; grid-row: 2; gap: 6px; margin-top: 3px; min-width: 0; }
  .task-meta:empty { display: none; }
  .task-title { font-size: 12px; line-height: 1.5; min-height: 28px; }
  .task-subtitle { font-size: 9px; }
  .category-badge { font-size: 9px; padding: 2px 6px; }
  .late-label, .task-time, .date-label { font-size: 9px; }
  .task-time .icon { width: 12px; height: 12px; }
  .right-panel { display: none; }
  .mobile-nav { position: fixed; z-index: 25; inset: auto 0 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: #fffffff5; border-top: 1px solid #e4ebf4; backdrop-filter: blur(15px); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -3px 18px #1d365008; }
  .mobile-nav > a { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; color: #8593a7; font-size: 9px; min-height: 44px; }
  .mobile-nav > a.active { color: var(--blue); font-weight: 600; }
  .mobile-nav .icon { width: 20px; height: 20px; }
  .mobile-add { border-radius: 50%; width: 43px; height: 43px; min-height: 43px; padding: 0; margin: auto; box-shadow: 0 3px 8px #2563eb25; }
  .mobile-add .icon { width: 23px; height: 23px; }
  .page-toolbar { gap: 10px; margin-bottom: 17px; }
  .page-toolbar > p { font-size: 11px; flex: 1; }
  .page-toolbar > button { font-size: 11px; min-height: 38px; }
  .category-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; gap: 3px; margin-bottom: 14px; }
  .filter-chip { white-space: nowrap; font-size: 10px; padding: 6px 9px; }
  .days-board { grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; scroll-snap-type: x mandatory; }
  .day-column { scroll-snap-align: start; min-height: 370px; }
  .board-task { font-size: 12px; min-height: 48px; }
  .board-controls { justify-content: flex-start; gap: 5px; }
  .board-controls .secondary { font-size: 10px; padding: 6px 8px; }
  .board-controls input { width: 125px; margin-left: auto; }
  .board-controls .icon-button { width: 27px; padding: 5px; }
  .projects-grid, .notes-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .project-card { padding: 19px; }
  .project-banner { padding: 15px; gap: 13px; }
  .project-banner-progress { max-width: none; min-width: 135px; }
  .project-banner > button { width: 100%; }
  .history-filters { gap: 8px; }
  .history-filters select { flex: 1; font-size: 11px; min-width: 130px; }
  .history-filters label { width: calc(50% - 4px); }
  .history-filters input { width: 100%; padding: 7px; }
  .report-summary { gap: 12px; font-size: 11px; padding: 17px; }
  .report-summary strong { font-size: 28px; }
  .report-row { grid-template-columns: 85px minmax(0, 1fr) 25px; padding: 13px; gap: 12px; font-size: 11px; }
  .form-dialog { padding: 21px; max-height: 94dvh; width: calc(100vw - 20px); max-width: 480px; }
  .dialog-heading h2 { font-size: 18px; }
  .dialog-footer > button { flex: 1; }
  .dialog-footer { position: sticky; bottom: -21px; background: white; padding: 13px 0 6px; margin-top: 8px; box-shadow: 0 -7px 10px white; }
  .form-grid { gap: 10px; }
  .form-dialog input, .form-dialog textarea, .form-dialog select, .login-card input { font-size: 16px; }
  .form-dialog select { padding: 9px 7px; }
  .action-dialog { align-self: end; width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 17px 17px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .task-action { min-height: 48px; font-size: 13px; }
  .workspace-footer { margin-top: 25px; font-size: 9px; }
  .empty-state { padding: 28px 16px; }
  .empty-state h3 { font-size: 13px; }
  .empty-state p { font-size: 11px; }
  .login-layout { display: block; }
  .login-story { padding: 23px 26px 27px; }
  .login-story .brand { font-size: 24px; }
  .login-story .logo-mark { width: 22px; height: 25px; font-size: 18px; }
  .story-content { padding: 25px 0 0; }
  .story-content h1 { font-size: 31px; letter-spacing: -1px; margin: 0; }
  .story-content h1 br { display: none; }
  .story-content .eyebrow, .story-content > p:not(.eyebrow), .login-preview, .story-footer { display: none; }
  .login-panel { padding: 29px 26px 34px; }
  .login-card { max-width: 400px; }
  .login-card h2 { font-size: 25px; }
  .login-subtitle { margin-bottom: 25px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
/* Sem sidebar visível (tablet/celular), o ambiente atual aparece ao lado da marca. */
@media (max-width: 850px) {
  .workspace-chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--blue); background: #e8f0fe; white-space: nowrap; }
}

/* Rótulos (D-013): a cor vem do servidor já validada (#RRGGBB) e entra só como variável CSS;
   os mesmos --category* das categorias alimentam selos, pontos, quadro e relatórios. */
.label-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.label-chip { min-height: 30px; padding: 5px 10px; gap: 6px; font-size: 11px; font-weight: 500; border-radius: 999px; background: #f2f5f9; color: #53637b; border: 1px solid #e3e9f1; }
.label-chip:hover { background: #e8eef6; }
.label-chip[aria-pressed="true"] { background: var(--category-bg); color: var(--category-text); border-color: var(--category); }
.label-chip .category-dot { width: 7px; height: 7px; }
.task-meta .category-badge + .category-badge { margin-left: -2px; }
.labels-help { font-size: 12px; margin: -8px 0 14px; }
.labels-list { max-height: 50vh; overflow-y: auto; margin: 0 -4px 10px; padding: 0 4px; }
.label-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 6px; align-items: center; margin-bottom: 8px; }
.label-row.label-new { grid-template-columns: 38px minmax(0, 1fr) auto; }
.label-row .label-top { color: #b3bfcd; }
.label-row .label-top[aria-pressed="true"] { color: var(--blue); background: #eaf2ff; }
.label-row input[type="color"] { width: 38px; height: 38px; padding: 3px; border: 1px solid #e3e9f1; border-radius: 7px; background: white; cursor: pointer; }
.label-row input[name="name"] { min-width: 0; }
.label-new { padding-top: 12px; border-top: 1px solid #edf1f6; }

/* Prazo final (D-016): neutro com folga, laranja quando esgotando, vermelho no dia ou vencido. */
.deadline-badge { display: inline-block; padding: 3px 7px; border-radius: 5px; font-size: 10px; line-height: 1.5; white-space: nowrap; color: #53637b; background: #f2f5f9; }
.deadline-badge.soon { color: #b45309; background: #fff3e0; }
.deadline-badge.due { color: #c0392b; background: #fdecec; font-weight: 600; }
.board-task small.deadline-text.soon { color: #b45309; }
.board-task small.deadline-text.due { color: #c0392b; font-weight: 600; }
.deadline-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 0; padding: 9px 13px; border-radius: 0; border-bottom: 1px solid #eef2f6; background: transparent; color: #334158; font-size: 11px; font-weight: 400; text-align: left; }
.deadline-card-mobile { display: none; margin-top: 17px; }
.deadline-card-mobile .deadline-item { padding: 11px 17px; font-size: 13px; }
@media (max-width: 700px) { .deadline-card-mobile { display: block; } }
.deadline-item:last-child { border-bottom: 0; }
.deadline-item:hover { background: transparent; color: var(--blue); }
.deadline-item > span:first-child { min-width: 0; overflow-wrap: anywhere; }

/* Add-ons (D-022) */
.addon-nav { margin-top: 10px; padding-top: 10px; border-top: 1px solid #ffffff12; }
.addons-settings { text-align: left; margin: 8px 0 14px; }
.addons-settings h4 { font-size: 12px; color: #53637b; margin: 0 0 8px; }
.addon-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.addon-text { display: flex; flex-direction: column; gap: 2px; }
.addon-text strong { color: var(--text); font-size: 13px; font-weight: 600; }
.addon-text small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.addon-row input { width: auto; min-height: 0; flex: none; }

/* Coisas de bordo (D-022) */
.bordo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; align-items: start; }
.bordo-pack .section-heading h2 .icon { color: #d9822b; }
.bordo-card .section-heading .icon-button { width: 30px; height: 30px; min-height: 30px; padding: 6px; }
.bordo-qty { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 4px; background: #eef2f7; color: #53637b; font-size: 10px; font-weight: 600; }
.bordo-missing { color: #b8631c; background: #fdf1dc; border-radius: 5px; padding: 3px 7px; white-space: nowrap; }
.bordo-category { color: #53637b; background: #eff2f6; border-radius: 5px; padding: 3px 7px; white-space: nowrap; }
.bordo-add { display: flex; gap: 8px; padding: 8px 17px 14px; border-top: 1px solid #eef2f7; }
.bordo-add input { min-height: 36px; padding: 7px 10px; font-size: 12px; }
.bordo-add .icon-button { flex: none; width: 36px; height: 36px; min-height: 36px; }
.bordo-help { font-size: 12px; line-height: 1.5; margin: 0 0 14px; }
.bordo-help code { background: #eef2f7; border-radius: 3px; padding: 0 4px; font-size: 11px; }
.page-toolbar > button + button { margin-left: 0; }
@media (max-width: 900px) { .bordo-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .bordo-add { padding: 8px 12px 12px; } .bordo-add input { font-size: 16px; } }
