:root {
  --primary: #62A1FE;
  --primary-dark: #4388ED;
  --active-tab-color: var(--primary);
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f2f4ff;
  --text: #242029;
  --muted: #756f7b;
  --border: #e3e6f4;
  --shadow: 0 14px 40px rgba(45, 34, 62, .09);
}

[data-theme="dark"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f2f4ff;
  --text: #242029;
  --muted: #756f7b;
  --border: #e3e6f4;
  --shadow: 0 14px 40px rgba(45, 55, 120, .09);
  color-scheme: light;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
body.ui-text-select-off,
body.ui-text-select-off *:not(input):not(textarea):not(select):not([contenteditable="true"]):not([contenteditable=""]) {
  -webkit-user-select: none;
  user-select: none;
}
body.ui-text-select-off input,
body.ui-text-select-off textarea,
body.ui-text-select-off select,
body.ui-text-select-off [contenteditable="true"],
body.ui-text-select-off [contenteditable=""] {
  -webkit-user-select: text;
  user-select: text;
}
a { color: var(--primary); }
.app-shell { min-height: 100vh; }
.app-sidebar { display: contents; }
.content { width: min(760px, 100%); min-height: 100vh; margin: auto; padding: 28px 20px 120px; background: #fff; transition: background-color .3s ease; touch-action: pan-y; overscroll-behavior-x: contain; }
.content.is-main-tab { --surface: #fff; --surface-soft: #f0edf5; --text: #242029; --muted: #756f7b; --border: #e7e1eb; background: #fff; color: var(--text); }
.app-view { display: none; }
.app-view.active { display: block; animation: view-in .2s ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } }
.topbar, .page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.greeting, .page-header h1 { margin: 2px 0 0; font-size: clamp(1.65rem, 5vw, 2.25rem); font-weight: 750; letter-spacing: -.04em; }
.eyebrow { color: var(--primary); font-size: .75rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.avatar { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--primary); color: white; font-size: 1.15rem; font-weight: 800; }
.avatar-lg { width: 68px; height: 68px; font-size: 1.6rem; }

.project-tabs-menu { position: relative; z-index: 2; display: flex; flex: 0 0 auto; align-items: center; gap: 2px; align-self: flex-start; margin-top: 2px; }
.project-tabs-menu[hidden] { display: none !important; }
.project-tabs-toggle { display: inline-flex; max-width: min(42vw, 220px); height: 40px; align-items: center; gap: 6px; padding: 0 10px 0 12px; border: 1px solid color-mix(in srgb, var(--active-tab-color, var(--primary)) 25%, var(--border)); border-radius: 999px; background: color-mix(in srgb, #fff 76%, transparent); color: var(--active-tab-color, var(--primary)); font-size: .84rem; font-weight: 750; box-shadow: 0 5px 16px rgba(28, 21, 36, .08); }
.project-tabs-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: inherit; font-weight: inherit; color: inherit; }
.project-tabs-toggle .bi-chevron-down { flex: 0 0 auto; color: #000; font-size: .85rem; transition: transform .18s ease; }
.project-tabs-menu.is-open .project-tabs-toggle .bi-chevron-down { transform: rotate(180deg); }
.project-tabs-dropdown { position: absolute; top: calc(100% + 6px); right: 0; z-index: 1060; display: none; min-width: min(260px, calc(100vw - 28px)); max-width: min(320px, calc(100vw - 28px)); max-height: min(440px, 70vh); padding: 8px; overflow: auto; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: 0 18px 42px rgba(28, 21, 36, .2); }
.project-tabs-menu.is-open .project-tabs-dropdown { display: block; }
.project-tabs-dropdown .tabs-list { flex-direction: column; align-items: stretch; gap: 2px; max-width: none; overflow: visible; }
.project-tabs-dropdown .tab-pill { width: 100%; padding: 11px 12px 11px 14px; text-align: left; white-space: normal; line-height: 1.25; }
.project-tabs-dropdown .tab-pill::after { top: 10px; right: auto; bottom: 10px; left: 0; width: 3px; height: auto; border-radius: 999px; transform: scaleY(.35); }
.project-tabs-dropdown .tab-pill.active::after { transform: scaleY(1); }
.project-tabs-dropdown .favorites-tab { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: .95rem; font-weight: 750; box-shadow: none; transform: none; filter: none; }
.project-tabs-dropdown .favorites-tab > i { flex: 0 0 auto; font-size: 1.05rem; }
.project-tabs-dropdown .favorites-tab:hover { color: var(--text); background: color-mix(in srgb, var(--active-tab-color, var(--primary)) 8%, var(--surface-soft)); }
.project-tabs-dropdown .favorites-tab.active { color: var(--active-tab-color, var(--primary)); background: color-mix(in srgb, var(--active-tab-color, var(--primary)) 12%, #fff); }
.project-tabs-dropdown .favorites-tab.active::after { background: var(--active-tab-color, var(--primary)); }
.project-tabs-dropdown .favorites-tab::after { background: var(--active-tab-color, var(--primary)); }
.tabs-list { display: flex; min-width: 0; max-width: 100%; gap: 16px; overflow-x: auto; scrollbar-width: none; touch-action: pan-y; }
.tabs-list.is-sorting { touch-action: none; }
.tabs-list.is-sorting .tab-pill { transition: none !important; }
.tabs-list::-webkit-scrollbar { display: none; }
.projects-home-toggle { display: inline-flex; height: 38px; flex: 0 0 auto; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: .82rem; font-weight: 750; box-shadow: 0 5px 16px rgba(28, 21, 36, .06); transition: .18s ease; }
.projects-home-toggle:hover, .projects-home-toggle.active { border-color: var(--active-tab-color, var(--primary)); color: var(--active-tab-color, var(--primary)); transform: translateY(-1px); }
.project-chrome {
  position: sticky;
  z-index: 100;
  top: 0;
  isolation: isolate;
  margin: -28px -20px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--active-tab-color, var(--primary)) 25%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--active-tab-color, var(--primary)) 36%, #fff), color-mix(in srgb, var(--active-tab-color, var(--primary)) 18%, #fff));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform .24s ease, opacity .2s ease;
}
.project-chrome::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(circle at 18% 26%, rgba(255, 255, 255, .72) 0 1.5px, transparent 2px) 0 0 / 18px 18px, repeating-linear-gradient(118deg, transparent 0 18px, color-mix(in srgb, var(--active-tab-color, var(--primary)) 9%, transparent) 19px 20px, transparent 21px 38px); opacity: .72; pointer-events: none; }
.project-chrome::after { content: ""; position: absolute; z-index: -1; right: 0; bottom: 0; width: 150px; height: 86px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--active-tab-color, var(--primary)) 25%, transparent), transparent 68%); pointer-events: none; }
.project-context-header { display: flex; min-height: 62px; align-items: center; gap: 10px; margin: 0; padding: calc(10px + env(safe-area-inset-top)) 20px 10px; border: 0; background: transparent; box-shadow: none; }
.project-context-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 8px;
}
.project-header-add { display: none; }
.project-header-add-menu { display: none; }
.project-context-icon {
  display: none;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: color-mix(in srgb, var(--project-color, var(--active-tab-color, var(--primary))) 16%, #fff);
  color: var(--project-color, var(--active-tab-color, var(--primary)));
  font-size: .95rem;
}
.project-context-icon.is-visible { display: grid; }
.project-context-icon img { width: 100%; height: 100%; object-fit: cover; }
.project-context-icon > span { font-size: 1rem; line-height: 1; }
.project-context-copy > span:not(.project-context-icon) { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.project-context-header h1 {
  margin: 0;
  overflow: hidden;
  color: #000;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.project-context-header .projects-home-toggle { width: 38px; padding: 0; justify-content: center; border: 0; background: transparent; box-shadow: none; font-size: 1.15rem; }
.project-context-brand { --brand-arm: 22px; --brand-bar: 3.5px; --brand-strike: 56px; flex: 0 0 auto; gap: 6px; max-width: min(42vw, 140px); }
.project-context-brand .projects-brand-mess { font-size: 18px; }
.project-context-brand .projects-brand-half { height: .5em; }
.project-members-menu { flex: 0 0 auto; align-self: flex-start; margin-top: 2px; }
.project-members-toggle { display: flex; height: 40px; align-items: center; gap: 5px; padding: 3px 8px 3px 5px; border: 1px solid color-mix(in srgb, var(--active-tab-color, var(--primary)) 25%, var(--border)); border-radius: 999px; background: color-mix(in srgb, #fff 76%, transparent); color: var(--text); box-shadow: 0 5px 16px rgba(28, 21, 36, .08); }
.project-fullscreen-toggle,
.project-refresh-toggle { display: grid; width: 40px; height: 40px; flex: 0 0 40px; align-self: flex-start; margin-top: 2px; place-items: center; padding: 0; border: 1px solid color-mix(in srgb, var(--active-tab-color, var(--primary)) 25%, var(--border)); border-radius: 999px; background: color-mix(in srgb, #fff 76%, transparent); color: var(--text); box-shadow: 0 5px 16px rgba(28, 21, 36, .08); font-size: .95rem; transition: .18s ease; }
.project-fullscreen-toggle:hover,
.project-fullscreen-toggle:focus-visible,
.project-fullscreen-toggle.is-active,
.project-refresh-toggle:hover,
.project-refresh-toggle:focus-visible,
.project-refresh-toggle.is-loading { border-color: color-mix(in srgb, var(--active-tab-color, var(--primary)) 45%, var(--border)); color: var(--active-tab-color, var(--primary)); transform: translateY(-1px); }
.project-refresh-toggle.is-loading { pointer-events: none; }
.project-refresh-toggle.is-loading i { animation: project-refresh-spin .7s linear infinite; }
@keyframes project-refresh-spin {
  to { transform: rotate(360deg); }
}
.project-member-stack { display: flex; padding-left: 8px; }
.project-member-stack .project-member-avatar { margin-left: -8px; }
.project-member-avatar { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; overflow: hidden; border: 2.5px solid var(--member-perm-color, #9CA3AF); border-radius: 50%; background: var(--active-tab-color, var(--primary)); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: 0; text-transform: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--member-perm-color, #9CA3AF) 30%, transparent); }
.project-member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.project-member-count { display: grid; width: 30px; height: 30px; margin-left: -8px; place-items: center; border: 2px solid #fff; border-radius: 50%; background: var(--text); color: #fff; font-size: .68rem; font-weight: 800; }
.project-members-dropdown { z-index: 1050; width: min(340px, calc(100vw - 28px)); max-height: min(440px, 70vh); padding: 8px; overflow-y: auto; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: 0 18px 42px rgba(28, 21, 36, .2); }
.project-members-title { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 8px 7px 10px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.project-members-add { display: inline-flex; height: 32px; align-items: center; gap: 6px; padding: 0 11px; border: 0; border-radius: 999px; background: var(--active-tab-color, var(--primary)); color: #fff; font-size: .75rem; font-weight: 750; letter-spacing: 0; text-transform: none; }
.project-members-add:hover { filter: brightness(.92); }
.project-member-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) 36px; align-items: center; gap: 10px; padding: 8px; border-radius: 13px; }
.project-member-row:hover { background: color-mix(in srgb, var(--active-tab-color, var(--primary)) 8%, var(--surface-soft)); }
.project-member-profile { display: contents; color: inherit; text-align: left; }
.project-member-row .project-member-avatar { position: relative; width: 42px; height: 42px; overflow: visible; border: 2.5px solid var(--member-perm-color, #9CA3AF); font-size: .9rem; }
.project-member-row .project-member-avatar .member-presence-dot { position: absolute; right: 0; bottom: 0; width: 7px; height: 7px; border: 2px solid var(--surface); box-sizing: content-box; }
.project-member-row .project-member-avatar .member-presence-dot.is-online { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .14); }
.project-member-copy { min-width: 0; }
.project-member-copy strong, .project-member-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-member-copy small { margin-top: 2px; color: var(--muted); font-size: .75rem; }
.project-member-name-line { display: flex; min-width: 0; align-items: center; gap: 7px; }
.project-member-name-line > strong { min-width: 0; }
.member-presence { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; color: var(--muted); font-size: .66rem; font-weight: 650; white-space: nowrap; }
.member-presence-dot { width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; }
.member-presence.is-online { color: #15803d; }
.member-presence.is-online .member-presence-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .14); }
.project-member-more { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.project-member-more:hover { background: color-mix(in srgb, var(--active-tab-color, var(--primary)) 12%, transparent); color: var(--active-tab-color, var(--primary)); }
.favorites-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border: 0; background: transparent; color: var(--muted); font-size: 1.25rem; transition: color .18s ease, transform .18s ease; }
.favorites-icon.active { color: var(--active-tab-color, var(--primary)); transform: scale(1.08); filter: drop-shadow(0 3px 7px color-mix(in srgb, currentColor 25%, transparent)); }
.tab-pill { position: relative; padding: 10px 2px 12px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: .95rem; font-weight: 750; white-space: nowrap; transition: .18s ease; }
.tab-pill::after { content: ""; position: absolute; right: 0; bottom: 3px; left: 0; height: 3px; border-radius: 999px; background: var(--tab-color); opacity: 0; transform: scaleX(.35); transition: opacity .18s ease, transform .18s ease; }
.tab-pill:hover { color: var(--text); }
.tab-pill.active { color: var(--text); }
.tab-pill.active::after { opacity: 1; transform: scaleX(1); }
.tab-pill:focus-visible { outline: 2px solid var(--tab-color); outline-offset: 3px; }
.tab-pill-fixed { cursor: default; }
.tab-pill.sortable-chosen { z-index: 2; border-radius: 12px; background: #fff; color: var(--text); opacity: 1; box-shadow: 0 12px 28px rgba(28, 21, 36, .18); }
.tab-pill.sortable-drag { border-radius: 12px; background: #fff; opacity: .96 !important; box-shadow: 0 18px 38px rgba(28, 21, 36, .24); }
.tab-drag-fallback { pointer-events: none; transition: none !important; }
.tab-pill.sortable-chosen, .tab-pill.sortable-drag { touch-action: none; will-change: transform; }
.tab-pill.sortable-ghost { box-sizing: border-box; width: var(--placeholder-width) !important; height: var(--placeholder-height) !important; min-width: var(--placeholder-width) !important; min-height: var(--placeholder-height) !important; padding: 0; border: 2px dashed color-mix(in srgb, var(--tab-color) 70%, var(--border)); border-radius: 12px; background: color-mix(in srgb, var(--tab-color) 10%, transparent); color: transparent; opacity: .75; overflow: hidden; }
.tab-pill.sortable-ghost::after { opacity: 0; }
.tab-pill.sortable-ghost > * { opacity: 0; }
.status-tab { position: relative; display: grid; width: 48px; height: 48px; padding: 0; place-items: center; border: 1px solid var(--border); border-radius: 16px; background: color-mix(in srgb, var(--surface) 94%, transparent); color: var(--muted); box-shadow: 0 7px 20px rgba(28, 21, 36, .08); backdrop-filter: blur(12px); transition: .18s ease; }
.status-tab:hover { color: var(--primary); transform: translateY(-2px); }
.status-tab.active { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 9px 22px color-mix(in srgb, var(--primary) 30%, transparent); }
.status-tab::after { content: attr(data-count); position: absolute; top: -6px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border: 2px solid var(--bg); border-radius: 999px; background: var(--text); color: var(--surface); font-size: .65rem; font-weight: 800; line-height: 15px; }
.status-icon { font-size: 1.45rem; line-height: 1; }
.status-label { position: absolute; top: 50%; right: calc(100% + 9px); padding: 6px 9px; border-radius: 8px; background: var(--text); color: var(--surface); font-size: .72rem; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(5px, -50%); transition: .16s ease; white-space: nowrap; }
.status-tab:hover .status-label, .status-tab:focus-visible .status-label { opacity: 1; transform: translate(0, -50%); }

.task-list { min-height: 80px; display: grid; gap: 0; align-content: start; align-items: start; overflow-x: clip; }
.task-item { display: grid; gap: 8px; height: auto; align-self: start; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.task-item + .task-item { padding-top: 10px; }
#taskPanel { touch-action: pan-y; }
#taskPanel.tab-swipe-left { animation: tab-swipe-left .22s ease; }
#taskPanel.tab-swipe-right { animation: tab-swipe-right .22s ease; }
@keyframes tab-swipe-left { from { opacity: .45; transform: translateX(18px); } }
@keyframes tab-swipe-right { from { opacity: .45; transform: translateX(-18px); } }
.task-section-label { margin: 0; color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.task-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 24px 4px 10px;
  min-width: 0;
  flex-wrap: wrap;
}
.project-task-scope-filters { display: none; }
.task-scope-filters {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
}
.task-scope-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
  white-space: nowrap;
}
.task-scope-filter i { font-size: .85rem; }
.task-scope-filter.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(28, 21, 36, .08);
}
.task-scope-filter[data-task-scope="urgent"].active { color: #e11d48; }
.task-urgent-badge {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #e11d48;
  font-size: 1.25rem;
  line-height: 1;
  transform: scale(1.08);
  filter: drop-shadow(0 3px 7px color-mix(in srgb, #e11d48 25%, transparent));
}
.task-card.is-urgent {
  border-color: color-mix(in srgb, #e11d48 28%, transparent);
  background: color-mix(in srgb, #e11d48 5%, transparent);
}
.task-menu-dropdown .dropdown-item[data-action="urgent"] i { color: #e11d48; }
.task-board { display: none; }
.task-board-column { min-width: 0; display: flex; flex-direction: column; gap: 0; }
.task-board-column .task-section-head { margin: 0 12px 10px; }
.task-board-column .task-section-label { margin-top: 0; }
.task-board-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: .82rem; line-height: 1.35; }
.task-board-empty .empty-icon { width: 44px; height: 44px; font-size: 1.25rem; }
.task-card { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: start; gap: 10px; height: auto; padding: 16px; border: 1px solid transparent; border-radius: 18px; background: transparent; box-shadow: none; cursor: default; touch-action: pan-y; transition: transform .2s ease, opacity .2s ease, border-color .15s ease, background-color .15s ease; --task-check-size: 32px; }
.task-card:active { cursor: default; }
.task-card.completed { opacity: .65; }
.task-card.completed .task-body { text-decoration: line-through; }
.task-card.cancelled { opacity: .58; }
.task-card.cancelled .task-body { text-decoration: line-through; text-decoration-style: double; }
.task-card.is-completing .task-body { text-decoration: line-through; opacity: .78; transition: opacity .28s ease; }
.task-complete-toggle { position: relative; z-index: 1; display: grid; width: var(--task-check-size, 32px); height: var(--task-check-size, 32px); margin: 0 auto; padding: 0; place-items: center; border: 2px solid color-mix(in srgb, var(--tab-color, var(--primary)) 48%, var(--border)); border-radius: 9px; background: #fff; color: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.task-complete-toggle::before { content: ''; position: absolute; inset: -12px; border-radius: 14px; }
.task-complete-toggle:hover { border-color: var(--tab-color, var(--primary)); background: color-mix(in srgb, var(--tab-color, var(--primary)) 8%, #fff); transform: scale(1.04); }
.task-complete-toggle:active { transform: scale(.94); }
.task-complete-toggle:focus-visible { outline: 2px solid color-mix(in srgb, var(--tab-color, var(--primary)) 55%, transparent); outline-offset: 3px; }
.task-complete-mark { display: grid; place-items: center; width: 100%; height: 100%; transform: scale(0); opacity: 0; }
.task-complete-mark > i { font-size: 1.15rem; line-height: 1; }
.task-card.completed .task-complete-toggle,
.task-complete-toggle.is-checking { border-color: #1a73e8; background: #1a73e8; color: #fff; box-shadow: 0 4px 14px rgba(26, 115, 232, .28); }
.task-card.completed .task-complete-mark { transform: scale(1); opacity: 1; }
.task-complete-toggle.is-checking { animation: task-check-pop .34s cubic-bezier(.2, .9, .25, 1.25); }
.task-complete-toggle.is-checking .task-complete-mark { animation: task-check-draw .3s cubic-bezier(.2, .85, .25, 1.2) forwards; }
.task-complete-toggle.is-unchecking { animation: task-uncheck-pop .18s ease; }
.task-complete-toggle.is-unchecking .task-complete-mark { animation: task-check-hide .16s ease forwards; }
@keyframes task-check-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
@keyframes task-check-draw {
  0% { opacity: 0; transform: scale(.2) rotate(-18deg); }
  55% { opacity: 1; transform: scale(1.2) rotate(0deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes task-check-hide {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(.4); }
}
@keyframes task-uncheck-pop {
  0% { transform: scale(1); }
  50% { transform: scale(.9); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .task-complete-toggle, .task-complete-mark, .task-card.is-completing .task-body { animation: none !important; transition: none !important; }
}
.task-menu { align-self: start; }
.task-aside { display: flex; justify-content: flex-end; align-items: flex-start; gap: 2px; align-self: start; }
.task-menu-toggle { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.task-menu-toggle:focus-visible, .task-menu-toggle:active, .task-menu-toggle[aria-expanded="true"] { background: color-mix(in srgb, var(--text) 10%, transparent); color: color-mix(in srgb, var(--text) 72%, var(--muted)); }
.task-menu-toggle:active { background: color-mix(in srgb, var(--text) 14%, transparent); }
.task-menu-toggle:disabled { cursor: default; opacity: .45; }
.task-menu-dropdown { min-width: 210px; padding: 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 14px 36px rgba(28, 21, 36, .16); }
.task-menu-dropdown .dropdown-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 9px; color: var(--text); }
.task-menu-dropdown .dropdown-item:hover, .task-menu-dropdown .dropdown-item:focus { background: color-mix(in srgb, var(--tab-color, var(--primary)) 10%, var(--surface)); color: var(--text); }
.task-menu-dropdown .dropdown-item i { color: var(--tab-color, var(--primary)); text-align: center; }
.task-menu-dropdown .badge { background: var(--tab-color, var(--primary)); color: #fff; }
.task-menu-dropdown .task-delete-action, .task-menu-dropdown .task-delete-action i { color: #dc3545; }
.task-menu-dropdown .task-delete-action:hover, .task-menu-dropdown .task-delete-action:focus { background: color-mix(in srgb, #dc3545 10%, var(--surface)); color: #b02a37; }
.task-menu-dropdown .task-delete-action:hover i, .task-menu-dropdown .task-delete-action:focus i { color: #b02a37; }
.task-body { margin: 0; min-height: var(--task-check-size, 32px); display: flex; align-items: center; overflow-wrap: anywhere; font-size: 1.05rem; line-height: 1.25; }
.task-link { display: block; max-width: 100%; margin-top: 7px; color: var(--primary); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-images { display: grid; gap: 7px; margin-top: 10px; }
.task-image { position: relative; overflow: hidden; border-radius: 10px; }
.task-image-open { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: var(--surface-soft); cursor: zoom-in; }
.task-images img { width: 100%; height: auto; max-height: 220px; border-radius: 10px; object-fit: cover; }
.task-image-download { position: absolute; right: 8px; bottom: 8px; display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: rgba(24, 24, 28, .76); color: #fff; text-decoration: none; box-shadow: 0 5px 16px rgba(0, 0, 0, .2); backdrop-filter: blur(8px); }
.task-image-download:hover { background: var(--tab-color, var(--primary)); color: #fff; }
.task-upload-overlay { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; gap: 6px; background: rgba(11, 20, 26, .42); color: #fff; pointer-events: none; }
.task-upload-ring { width: 46px; height: 46px; border-radius: 50%; background: conic-gradient(#fff calc(var(--progress, 0) * 1%), rgba(255, 255, 255, .22) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.task-upload-percent { position: absolute; font-size: .72rem; font-weight: 780; letter-spacing: -.02em; }
.task-upload-overlay.is-failed { background: rgba(179, 38, 30, .55); gap: 4px; }
.task-upload-overlay.is-failed > i { font-size: 1.35rem; }
.task-upload-overlay.is-failed > small { font-size: .72rem; font-weight: 700; }
.task-image.is-uploading img { width: 100%; height: 180px; object-fit: cover; filter: brightness(.92); }
.task-audio-pending { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 58px; padding: 12px 14px; overflow: hidden; border-radius: 14px; background: color-mix(in srgb, var(--tab-color, var(--primary)) 12%, var(--surface-soft)); color: var(--text); }
.task-audio-pending > i { color: var(--tab-color, var(--primary)); font-size: 1.2rem; text-align: center; }
.task-audio-pending strong, .task-audio-pending small { display: block; }
.task-audio-pending small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.task-audio-pending .task-upload-overlay { border-radius: 14px; }
.task-pending-note { margin-top: 8px; color: var(--muted); font-size: .78rem; font-weight: 650; }
.task-card.is-pending { opacity: .98; }
.task-subtasks { display: grid; gap: 7px; margin-top: 12px; }
.task-subtask { display: grid; grid-template-columns: 22px 24px minmax(0, 1fr); align-items: center; gap: 7px; width: 100%; padding: 7px 8px; border: 0; border-radius: 11px; background: color-mix(in srgb, var(--tab-color, var(--primary)) 6%, var(--surface-soft)); color: var(--text); text-align: left; }
.task-subtask-number { color: var(--muted); font-size: .72rem; font-weight: 750; text-align: center; }
.task-subtask-check { display: grid; width: 20px; height: 20px; place-items: center; border: 1.5px solid color-mix(in srgb, var(--tab-color, var(--primary)) 50%, var(--border)); border-radius: 6px; color: transparent; font-size: .72rem; }
.task-subtask.is-completed .task-subtask-check { border-color: #22c55e; background: #22c55e; color: #fff; }
.task-subtask.is-completed > span:last-child { color: var(--muted); text-decoration: line-through; }
.task-videos, .task-files { display: grid; gap: 8px; margin-top: 10px; }
.task-video { position: relative; overflow: hidden; border-radius: 12px; background: #111; }
.task-video.is-uploading video { display: block; width: 100%; height: min(42vw, 220px); min-height: 150px; object-fit: cover; opacity: .85; }
.task-video-player { width: 100%; height: min(56vw, 320px); min-height: 190px; }
.task-video video { display: block; width: 100%; height: 100%; object-fit: contain; }
.task-video > a { position: absolute; top: 8px; right: 8px; display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: rgba(24, 24, 28, .78); color: #fff; backdrop-filter: blur(8px); }
.task-file { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) 30px; align-items: center; gap: 9px; padding: 10px; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-soft); color: var(--text); text-decoration: none; }
.task-file.is-uploading { grid-template-columns: 38px minmax(0, 1fr); min-height: 58px; }
.task-file.is-uploading .task-upload-overlay { border-radius: 13px; }
.task-file > i:first-child { color: var(--tab-color, var(--primary)); font-size: 1.25rem; text-align: center; }
.task-file span, .task-file strong, .task-file small { min-width: 0; display: block; }
.task-file strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.task-file small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.task-file > i:last-child { color: var(--muted); text-align: center; }
.task-audio { display: grid; gap: 7px; margin-top: 10px; }
.task-audio-player { width: 100%; height: 52px; overflow: hidden; border-radius: 10px; }
.task-audio audio { width: 100%; height: 100%; }
.task-list.is-sorting .task-item { transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s ease, box-shadow .18s ease, background-color .18s ease; }
.task-item.sortable-chosen .task-card, .task-item.sortable-drag .task-card { touch-action: none; will-change: transform; }
.task-item.sortable-chosen .task-card { z-index: 2; background: #fff; color: #242029; opacity: 1; box-shadow: 0 16px 38px rgba(28, 21, 36, .2); animation: task-lift .18s ease; }
.task-item.sortable-drag .task-card { opacity: .96 !important; border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); box-shadow: 0 22px 48px rgba(28, 21, 36, .26); filter: saturate(1.05); }
.task-item.sortable-ghost { box-sizing: border-box; width: var(--placeholder-width) !important; height: var(--placeholder-height) !important; min-width: var(--placeholder-width) !important; min-height: var(--placeholder-height) !important; padding: 0; border: 2px dashed color-mix(in srgb, var(--tab-color, var(--primary)) 55%, var(--border)); border-radius: 18px; background: color-mix(in srgb, var(--tab-color, var(--primary)) 9%, transparent); opacity: .55; box-shadow: none; overflow: hidden; }
.task-item.sortable-ghost > * { opacity: 0; }
@keyframes task-lift { from { box-shadow: 0 5px 18px rgba(28, 21, 36, .04); } }
.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty-state h2 { margin: 12px 0 4px; color: var(--text); font-size: 1.15rem; }
.empty-icon { display: grid; width: 62px; height: 62px; margin: auto; place-items: center; color: var(--active-tab-color, var(--primary)); font-size: 1.8rem; transform: rotate(-5deg); }
.projects-loading { display: grid; min-height: 180px; place-items: center; }
.projects-loader { width: 30px; height: 30px; border: 3px solid color-mix(in srgb, var(--primary) 22%, transparent); border-top-color: var(--primary); border-radius: 50%; animation: projects-loader-spin .75s linear infinite; }
@keyframes projects-loader-spin { to { transform: rotate(360deg); } }
.projects-retry-btn { margin-top: 14px; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 600; }
.projects-retry-btn:hover, .projects-retry-btn:focus-visible { background: color-mix(in srgb, var(--primary) 82%, #000); color: #fff; }
.projects-load-error .empty-icon { color: #c44; }

.bottom-nav { position: fixed; z-index: 20; right: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); display: flex; width: max-content; max-width: calc(100% - 20px); justify-content: center; align-items: center; gap: 3px; padding: 7px; border: 0; border-radius: 999px; background: var(--active-tab-color, var(--primary)); box-shadow: 0 12px 30px color-mix(in srgb, var(--active-tab-color, var(--primary)) 34%, transparent); transform: translateX(50%); }
.bottom-actions { position: fixed; z-index: 20; right: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: center; gap: 8px; transform: translateX(50%); transition: transform .24s ease, opacity .2s ease; }
.app-mode-tabs { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: 0 8px 20px rgba(28, 21, 36, .1); }
.app-mode-search { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1rem; }
.app-mode-search:hover,
.app-mode-search:focus-visible { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.app-mode-tab { min-width: 0; padding: 8px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: .82rem; font-weight: 750; }
.app-mode-tab.active { background: var(--primary); color: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--primary) 28%, transparent); }
.floating-search-btn { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: 0 10px 24px rgba(28, 21, 36, .14); font-size: 1.1rem; }
.floating-search-btn:hover, .floating-search-btn:focus-visible { color: var(--primary); }
.bottom-actions.projects-home .app-mode-tabs { display: flex; }
.bottom-actions:not(.chats-mode):not(.projects-home) .app-mode-tabs { display: none; }
.app-chrome-hidden .project-chrome { opacity: 0; pointer-events: none; transform: translateY(calc(-100% - env(safe-area-inset-top))); }
.app-chrome-hidden .bottom-actions { opacity: 0; pointer-events: none; transform: translate(50%, calc(100% + 28px + env(safe-area-inset-bottom))); }
@media (prefers-reduced-motion: reduce) {
  .project-chrome, .bottom-actions { transition: none; }
}
.bottom-actions.account-open,
.bottom-actions.chat-thread-open { display: none; }
.bottom-actions .bottom-nav { position: static; right: auto; bottom: auto; max-width: calc(100vw - 78px); transform: none; }
.bottom-nav .status-tab, .create-nav-btn { width: 40px; height: 40px; flex: 0 0 40px; border: 0; border-radius: 999px; background: transparent; color: rgba(255, 255, 255, .58); box-shadow: none; backdrop-filter: none; }
.bottom-nav .status-tab { display: flex; justify-content: center; gap: 5px; transition: width .22s ease, padding .22s ease, color .18s ease, background-color .18s ease; }
.bottom-nav .status-tab::after { display: none; }
.bottom-nav .status-tab:hover, .bottom-nav .status-tab:active, .create-nav-btn:hover, .create-nav-btn:active { color: #fff; transform: none !important; }
.bottom-nav .status-label { display: none; position: static; padding: 0; background: transparent; color: inherit; opacity: 1; transform: none; font-size: .65rem; }
.bottom-nav .status-tab:hover .status-label, .bottom-nav .status-tab:focus-visible .status-label { opacity: 1; transform: none; }
.bottom-nav .status-tab.active { width: auto; min-width: 84px; flex-basis: auto; padding: 0 10px; border-color: transparent; background: #fff; color: var(--active-tab-color, var(--primary)); box-shadow: 0 3px 10px rgba(0, 45, 110, .18); }
.bottom-nav .status-tab.active .status-label { display: inline; }
.bottom-nav.account-open .status-tab.active { width: 40px; min-width: 40px; flex-basis: 40px; padding: 0; background: transparent; color: rgba(255, 255, 255, .58); box-shadow: none; }
.bottom-nav.account-open .status-tab.active .status-label { display: none; }
.bottom-nav.projects-home { display: none; }
.create-nav-btn { display: grid; padding: 0; place-items: center; transition: color .18s ease, background-color .18s ease; font-size: 1.75rem; line-height: 1; }
.account-nav-btn.active { background: #fff; color: var(--active-tab-color, var(--primary)); box-shadow: 0 3px 10px rgba(0, 45, 110, .18); }
.nav-icon { display: block; font-size: 1.45rem; line-height: 1; }
.floating-create-btn { position: static; z-index: 21; width: 44px; height: 44px; flex: 0 0 44px; border: 0; border-radius: 50%; background: var(--active-tab-color, var(--primary)); color: #fff; box-shadow: 0 10px 24px color-mix(in srgb, var(--active-tab-color, var(--primary)) 34%, transparent); }
.floating-create-btn:hover, .floating-create-btn:focus-visible { background: color-mix(in srgb, var(--active-tab-color, var(--primary)) 82%, #000); color: #fff; }
.floating-account-btn {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 10px 24px rgba(28, 21, 36, .14);
}
.floating-account-btn .account-nav-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.floating-account-btn .account-nav-initial {
  font-size: .95rem;
  font-weight: 800;
  line-height: 1;
}
.floating-account-btn:hover,
.floating-account-btn:focus-visible {
  color: var(--active-tab-color, var(--primary));
}
.settings-card { padding: 24px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.profile-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
#accountView, #settingsView, #uploadsView { --account-accent: var(--primary); }
.account-topbar { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 18px; }
.account-topbar-title { flex: 1; margin: 0; min-width: 0; font-size: 1.12rem; font-weight: 780; letter-spacing: -.02em; text-align: center; }
.account-topbar-spacer { width: 44px; flex: 0 0 44px; }
.account-settings-btn { display: grid; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: 0 6px 16px rgba(28, 21, 36, .08); font-size: 1.15rem; }
.account-settings-btn:hover, .account-settings-btn:focus-visible { border-color: var(--primary); color: var(--primary); }
.account-hero { position: relative; display: grid; gap: 18px; margin-bottom: 22px; padding: 18px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--account-accent) 16%, var(--border)); border-radius: 28px; background:
  radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--account-accent) 22%, transparent), transparent 55%),
  linear-gradient(145deg, color-mix(in srgb, var(--account-accent) 8%, var(--surface)), var(--surface) 68%); }
.account-hero-main { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 14px; }
.account-avatar { position: relative; z-index: 1; width: 84px; height: 84px; border: 3px solid color-mix(in srgb, var(--surface) 88%, transparent); background: var(--account-accent); box-shadow: 0 14px 28px color-mix(in srgb, var(--account-accent) 28%, transparent); font-size: 1.9rem; }
.account-avatar > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-change-btn { position: absolute; right: -5px; bottom: -3px; display: grid; width: 30px; height: 30px; place-items: center; border: 2px solid var(--surface); border-radius: 50%; background: var(--account-accent); color: #fff; font-size: .82rem; cursor: pointer; box-shadow: 0 5px 12px rgba(28, 21, 36, .22); }
.account-hero-copy { position: relative; z-index: 1; min-width: 0; }
.account-hero-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.28rem; font-weight: 800; letter-spacing: -.03em; }
.account-hero-meta { margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .9rem; }
.account-hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--account-accent) 14%, var(--border)); }
.account-hero-stat { display: grid; gap: 2px; justify-items: center; padding: 8px 6px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 78%, transparent); text-align: center; }
.account-hero-stat strong { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; font-size: .98rem; font-weight: 800; letter-spacing: -.02em; }
.account-hero-stat span { color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .02em; }
.account-badge { display: inline-flex; margin-top: 14px; padding: 7px 13px; border-radius: 999px; background: color-mix(in srgb, var(--account-accent) 12%, var(--surface)); color: var(--account-accent); font-size: .72rem; font-weight: 750; }
.account-stack { display: grid; gap: 14px; min-width: 0; }
.account-section-divider { height: 1px; margin: 4px 6px; background: linear-gradient(90deg, transparent, var(--border), transparent); }
.account-card { padding: 18px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: 0 8px 24px rgba(28, 21, 36, .05); min-width: 0; overflow: hidden; }
.account-card-danger { border-color: color-mix(in srgb, #b3261e 22%, var(--border)); }
.account-card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; min-width: 0; }
.account-card-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--account-accent) 12%, var(--surface-soft)); color: var(--account-accent); font-size: 1.15rem; }
.account-card-danger .account-card-icon { background: color-mix(in srgb, #b3261e 12%, var(--surface-soft)); color: #b3261e; }
.account-card-title { margin: 0; font-size: 1.02rem; font-weight: 750; }
.account-card-text { margin: 3px 0 0; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.account-card-head > div { min-width: 0; flex: 1; }
.account-username-field { display: flex; align-items: center; gap: 2px; padding-left: 14px; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface); overflow: hidden; }
.account-username-field:focus-within { border-color: var(--account-accent); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--account-accent) 18%, transparent); }
.account-at { color: var(--account-accent); font-size: 1.15rem; font-weight: 750; }
.account-username-field .form-control { border: 0; box-shadow: none !important; }
.account-save { width: 100%; margin-top: 14px; border-radius: 999px; background: var(--account-accent); border-color: var(--account-accent); font-weight: 700; }
.account-save:hover { background: color-mix(in srgb, var(--account-accent) 82%, #000); border-color: color-mix(in srgb, var(--account-accent) 82%, #000); }
.account-theme { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid color-mix(in srgb, var(--account-accent) 16%, var(--border)); border-radius: 16px; background: color-mix(in srgb, var(--account-accent) 7%, var(--surface-soft)); cursor: pointer; }
.account-theme .form-check-input { width: 2.6em; height: 1.35em; cursor: pointer; }
.account-theme .form-check-input:checked { background-color: var(--account-accent); border-color: var(--account-accent); }
.account-logout { width: 100%; border-radius: 999px; font-weight: 700; }
.settings-panel { display: none; }
.settings-panel.active { display: block; animation: view-in .2s ease; }
#settingsHome.settings-panel.active { display: grid; gap: 18px; }
.settings-group { display: grid; gap: 8px; }
.settings-group-title { margin: 0 4px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.settings-list { display: grid; overflow: hidden; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: 0 8px 24px rgba(28, 21, 36, .05); }
.settings-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px; align-items: center; gap: 12px; width: 100%; padding: 15px 16px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); text-align: left; }
.settings-row:last-child { border-bottom: 0; }
.settings-row:hover, .settings-row:focus-visible { background: color-mix(in srgb, var(--account-accent) 6%, var(--surface)); }
.settings-row-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 0; background: transparent; color: var(--account-accent); font-size: 1.75rem; line-height: 1; }
.settings-row-icon > i { font-size: inherit; line-height: 1; }
.settings-row-copy { min-width: 0; }
.settings-row-copy strong, .settings-row-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-row-copy strong { font-size: .98rem; font-weight: 750; }
.settings-row-copy small { margin-top: 3px; color: var(--muted); font-size: .8rem; }
.settings-row-arrow { color: var(--muted); font-size: .9rem; }
.settings-photo-preview { display: grid; justify-items: center; gap: 12px; margin-bottom: 8px; text-align: center; }
.settings-file-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.settings-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; margin: 0; padding: 14px 4px 4px; cursor: pointer; }
.settings-toggle-copy { min-width: 0; display: grid; gap: 4px; }
.settings-toggle-copy strong { font-size: .95rem; font-weight: 740; }
.settings-toggle-copy small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.ui-switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 48px; height: 28px; }
.ui-switch-input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ui-switch-track { position: absolute; inset: 0; border-radius: 999px; background: color-mix(in srgb, var(--text) 14%, var(--surface-soft)); box-shadow: inset 0 0 0 1px var(--border); transition: background-color .2s ease, box-shadow .2s ease; }
.ui-switch-thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(28, 21, 36, .18); transition: transform .2s ease; }
.ui-switch-input:checked + .ui-switch-track { background: var(--account-accent, var(--primary)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--account-accent, var(--primary)) 35%, transparent); }
.ui-switch-input:checked + .ui-switch-track .ui-switch-thumb { transform: translateX(20px); }
.ui-switch-input:focus-visible + .ui-switch-track { outline: 2px solid color-mix(in srgb, var(--account-accent, var(--primary)) 45%, transparent); outline-offset: 2px; }
.project-uploads { display: grid; gap: 8px; margin: 0 0 14px; }
.project-uploads[hidden] { display: none !important; }
.project-uploads-title { margin: 0; color: var(--muted); font-size: .78rem; font-weight: 720; }
.project-uploads .account-upload-item { background: color-mix(in srgb, var(--primary) 5%, var(--surface-soft)); }
.account-upload-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.account-upload-cancel { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, #b3261e 10%, var(--surface)); color: #b3261e; font-size: .95rem; }
.account-upload-cancel:hover, .account-upload-cancel:focus-visible { background: color-mix(in srgb, #b3261e 18%, var(--surface)); }
.account-uploads { display: grid; gap: 10px; min-width: 0; }
.account-uploads-empty { padding: 14px; border: 1px dashed var(--border); border-radius: 16px; background: var(--surface-soft); color: var(--muted); font-size: .84rem; text-align: center; }
.account-uploads-all { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--account-accent) 18%, var(--border)); border-radius: 999px; background: color-mix(in srgb, var(--account-accent) 7%, var(--surface)); color: var(--account-accent); font-size: .88rem; font-weight: 740; }
.account-uploads-all:hover, .account-uploads-all:focus-visible { background: color-mix(in srgb, var(--account-accent) 12%, var(--surface)); }
.account-uploads-all-count { display: inline-grid; min-width: 22px; height: 22px; place-items: center; padding: 0 6px; border-radius: 999px; background: var(--account-accent); color: #fff; font-size: .72rem; font-weight: 780; }
.uploads-page-summary { margin: 0 0 14px; }
.account-upload-item { display: grid; gap: 8px; min-width: 0; max-width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: color-mix(in srgb, var(--account-accent) 5%, var(--surface-soft)); }
.account-upload-item.is-failed { border-color: color-mix(in srgb, #b3261e 28%, var(--border)); background: color-mix(in srgb, #b3261e 6%, var(--surface)); }
.account-upload-item.is-uploading { border-color: color-mix(in srgb, var(--account-accent) 35%, var(--border)); }
.account-upload-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.account-upload-copy { min-width: 0; flex: 1; }
.account-upload-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; font-weight: 720; }
.account-upload-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; overflow-wrap: anywhere; }
.account-upload-status { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: color-mix(in srgb, var(--account-accent) 12%, var(--surface)); color: var(--account-accent); font-size: .68rem; font-weight: 750; white-space: nowrap; }
.account-upload-item.is-failed .account-upload-status { background: color-mix(in srgb, #b3261e 12%, var(--surface)); color: #b3261e; }
.account-upload-item.is-waiting .account-upload-status { background: color-mix(in srgb, #c27a00 12%, var(--surface)); color: #9a5b00; }
.account-upload-bar { height: 7px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--account-accent) 12%, var(--surface)); }
.account-upload-bar > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--account-accent); transition: width .18s ease; }
.account-upload-bar.is-indeterminate > span { width: 38% !important; animation: account-upload-slide 1.1s ease-in-out infinite; }
@keyframes account-upload-slide { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
.account-upload-meta { color: var(--muted); font-size: .74rem; }
.projects-header { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 10px; }
.projects-heading { display: flex; min-width: 0; flex: 1; align-items: center; gap: 12px; }
.projects-heading-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; }
.projects-header-user { display: grid; min-width: 0; max-width: min(42vw, 220px); justify-items: end; gap: 2px; text-align: right; }
.projects-header-user strong { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; font-weight: 760; letter-spacing: -.02em; }
.projects-header-user small,
.projects-header-email { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .72rem; }
.projects-account-btn.floating-account-btn {
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: var(--primary);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 18%, transparent);
}
.projects-account-btn.floating-account-btn .account-nav-avatar { border-radius: 50%; }
.projects-account-btn.floating-account-btn:hover,
.projects-account-btn.floating-account-btn:focus-visible {
  border-color: transparent;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 16%, var(--surface));
}

.global-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}
.global-search-box i { color: var(--muted); }
.global-search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  font-size: 1rem;
}
.global-search-box .global-search-clear {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--muted);
  font-size: .75rem;
}
.global-search-box .global-search-clear[hidden] { display: none !important; }
.global-search-results { display: grid; gap: 4px; }
.global-search-group { margin-top: 10px; }
.global-search-group:first-child { margin-top: 0; }
.global-search-label {
  margin: 0 4px 8px;
  font-size: .72rem;
  font-weight: 780;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.global-search-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
}
.global-search-item:hover,
.global-search-item:focus-visible {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.global-search-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-soft));
  color: var(--primary);
  font-size: 1.05rem;
}
.global-search-item .wa-avatar {
  width: 40px;
  height: 40px;
  font-size: .85rem;
}
.global-search-copy strong,
.global-search-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-search-copy strong { font-size: .92rem; font-weight: 740; }
.global-search-copy small { margin-top: 2px; color: var(--muted); font-size: .76rem; }
.global-search-people {
  display: grid;
  gap: 8px;
}
.global-search-people .wa-person {
  margin: 0;
  box-shadow: none;
}
.task-item.is-search-hit {
  animation: search-hit-flash .9s ease;
}
@keyframes search-hit-flash {
  0%, 100% { background: transparent; }
  35% { background: color-mix(in srgb, var(--primary) 12%, transparent); }
}
.projects-brand { --brand-arm: 28px; --brand-bar: 5px; --brand-accent: #e11d48; --brand-accent-green: #10b981; --brand-glow: rgba(225, 29, 72, .35); --brand-glow-green: rgba(16, 185, 129, .35); --brand-strike: 80px; display: flex; align-items: center; gap: 8px; color: var(--text); user-select: none; }
.projects-brand-x { position: relative; z-index: 2; width: var(--brand-arm); height: var(--brand-arm); flex: 0 0 var(--brand-arm); }
.projects-brand-bar { position: absolute; left: 50%; top: 50%; width: var(--brand-arm); height: var(--brand-bar); margin-left: calc(var(--brand-arm) / -2); margin-top: calc(var(--brand-bar) / -2); background: var(--brand-accent); box-shadow: 0 0 12px var(--brand-glow); transform-origin: 50% 50%; transition: background .4s ease, box-shadow .4s ease; }
.projects-brand-bar1 { transform: rotate(45deg); }
.projects-brand-bar2 { transform: rotate(-45deg); }
.projects-brand.spinning .projects-brand-bar1,
.projects-brand.spinning .projects-brand-bar2 { animation: projects-brand-spin 1.4s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes projects-brand-spin {
  from { transform: rotate(var(--from)); }
  to { transform: rotate(var(--to)); }
}
.projects-brand.spinning .projects-brand-bar1 { --from: 45deg; --to: 810deg; }
.projects-brand.spinning .projects-brand-bar2 { --from: -45deg; --to: 720deg; }
.projects-brand.plus .projects-brand-bar1 { transform: rotate(90deg); }
.projects-brand.plus .projects-brand-bar2 { transform: rotate(0deg); }
.projects-brand.struck .projects-brand-bar { background: var(--brand-accent-green); box-shadow: 0 0 12px var(--brand-glow-green); }
.projects-brand-extender { position: absolute; left: 100%; top: 0; height: 100%; width: 0; background: var(--brand-accent); box-shadow: 0 0 12px var(--brand-glow); transition: width .75s cubic-bezier(.16, 1, .3, 1), background .4s ease, box-shadow .4s ease; }
.projects-brand.struck .projects-brand-extender { width: var(--brand-strike); background: var(--brand-accent-green); box-shadow: 0 0 12px var(--brand-glow-green); }
.projects-brand-mess { position: relative; font-size: 28px; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.projects-brand-half { display: block; overflow: hidden; height: .5em; transition: transform .55s cubic-bezier(.4, 0, .2, 1), opacity .4s ease; }
.projects-brand-half > span { display: block; line-height: 1em; }
.projects-brand-bot > span { transform: translateY(-.5em); }
.projects-brand.struck .projects-brand-top { transform: translateY(-6px); opacity: .4; }
.projects-brand.struck .projects-brand-bot { transform: translateY(6px); opacity: .4; }
.projects-brand.no-anim,
.projects-brand.no-anim * { transition: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .projects-brand-bar, .projects-brand-extender, .projects-brand-half { transition: none !important; animation: none !important; }
}
.project-filter-tabs { display: flex; width: 100%; gap: 4px; margin-bottom: 14px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-soft); }
.project-filter-tab { min-width: 0; flex: 1; padding: 8px 15px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: .84rem; font-weight: 750; }
.project-filter-tab.active { background: var(--surface); color: var(--primary); box-shadow: 0 3px 10px rgba(28, 21, 36, .09); }
.projects-section-title { margin: 0 0 12px; overflow: hidden; font-size: 1.05rem; font-weight: 760; letter-spacing: -.02em; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.projects-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.projects-section-head .projects-section-title {
  flex: 1;
  margin-bottom: 0;
}
.projects-section-head .wa-icon-btn {
  flex: 0 0 auto;
}
.projects-account-btn, .account-back-btn, .account-settings-btn { display: grid; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 6px 16px rgba(28, 21, 36, .08); }
.account-nav-avatar { width: 100%; height: 100%; border-radius: 13px; object-fit: cover; }
.account-nav-initial { font-size: .95rem; font-weight: 800; line-height: 1; }
.projects-account-btn:hover, .account-back-btn:hover, .account-settings-btn:hover { border-color: var(--primary); color: var(--primary); }
.account-back-btn, .account-settings-btn { width: 44px; height: 44px; flex-basis: 44px; border-radius: 50%; }
.projects-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.projects-grid.is-sorting .project-card { transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s ease, box-shadow .18s ease, background-color .18s ease; }
.project-card { position: relative; display: flex; min-width: 0; min-height: 118px; align-items: stretch; overflow: visible; border: 1px solid color-mix(in srgb, var(--project-color) 24%, var(--border)); border-radius: 22px; background: linear-gradient(135deg, color-mix(in srgb, var(--project-color) 8%, var(--surface)), var(--surface) 58%); color: var(--text); box-shadow: 0 8px 24px color-mix(in srgb, var(--project-color) 10%, transparent); cursor: grab; touch-action: pan-y; transition: transform .2s ease, opacity .2s ease, border-color .15s ease, background-color .15s ease, box-shadow .18s ease; }
.project-card:active { cursor: grabbing; }
.project-card.sortable-chosen { z-index: 2; background: #fff; color: #242029; opacity: 1; box-shadow: 0 16px 38px rgba(28, 21, 36, .2); touch-action: none; will-change: transform; animation: task-lift .18s ease; }
.project-card.sortable-drag, .project-card.sortable-fallback { transition: none !important; }
.project-card.sortable-drag { border-color: color-mix(in srgb, var(--project-color) 55%, var(--border)); opacity: .96 !important; box-shadow: 0 22px 48px rgba(28, 21, 36, .26); touch-action: none; will-change: transform; filter: saturate(1.05); }
.project-card.sortable-ghost { box-sizing: border-box; width: var(--placeholder-width) !important; height: var(--placeholder-height) !important; min-width: var(--placeholder-width) !important; min-height: var(--placeholder-height) !important; border: 2px dashed color-mix(in srgb, var(--project-color) 55%, var(--border)); background: color-mix(in srgb, var(--project-color) 9%, transparent); opacity: .55; overflow: hidden; }
.project-card.sortable-ghost > * { opacity: 0; }
.project-card:has(.dropdown-menu.show) { z-index: 30; }
.projects-grid:not(.is-sorting) .project-card:hover { border-color: color-mix(in srgb, var(--project-color) 55%, var(--border)); box-shadow: 0 13px 30px color-mix(in srgb, var(--project-color) 18%, transparent); transform: translateY(-2px); }
.project-card-open { display: grid; min-width: 0; flex: 1; grid-template-columns: 52px minmax(0, 1fr); align-items: start; gap: 12px; padding: 16px 8px 16px 16px; border: 0; border-radius: 22px; background: transparent; color: inherit; cursor: pointer; touch-action: pan-y; text-align: left; }
.project-card-open:active { cursor: pointer; }
.project-card-menu { display: flex; flex: 0 0 46px; align-items: center; justify-content: center; padding: 8px 4px; }
.project-card-more { display: grid; width: 38px; height: 38px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.project-card-more:focus-visible, .project-card-more:active, .project-card-more[aria-expanded="true"] { background: color-mix(in srgb, var(--text) 10%, transparent); color: color-mix(in srgb, var(--text) 72%, var(--muted)); }
.project-card-more:active { background: color-mix(in srgb, var(--text) 14%, transparent); }
.project-card-menu .dropdown-menu { z-index: 40; min-width: 190px; padding: 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 14px 34px rgba(28, 21, 36, .2); }
.project-card-menu .dropdown-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px; color: var(--text); }
.project-card-menu .dropdown-item.text-danger { color: #dc3545 !important; }
.project-card-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 16px; background: color-mix(in srgb, var(--project-color) 15%, var(--surface-soft)); color: var(--project-color); font-size: 1.35rem; }
.project-card-icon img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.project-card-icon > span { font-size: 1.5rem; line-height: 1; }
.project-card-copy { display: grid; gap: 4px; min-width: 0; padding-top: 2px; }
.project-card-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .78rem; font-weight: 760; line-height: 1.4; }
.project-card-meta { display: block; color: var(--muted); font-size: .78rem; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.project-card-members { display: flex; align-items: center; margin-top: 4px; }
.project-card-member, .project-card-member-more { display: grid; width: 24px; height: 24px; place-items: center; margin-left: -6px; overflow: hidden; border: 2px solid var(--surface); border-radius: 50%; background: color-mix(in srgb, var(--project-color) 18%, var(--surface-soft)); color: var(--project-color); font-size: .62rem; font-weight: 780; }
.project-card-member:first-child { margin-left: 0; }
.project-card-member img { width: 100%; height: 100%; object-fit: cover; }
.project-card-member-more { background: color-mix(in srgb, var(--project-color) 22%, var(--surface)); }
.project-card-arrow { color: var(--muted); }
.project-delete-warning { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid color-mix(in srgb, #dc3545 28%, var(--border)); border-radius: 16px; background: color-mix(in srgb, #dc3545 8%, var(--surface)); color: #b3261e; }
.project-delete-warning > i { font-size: 1.5rem; text-align: center; }
.project-delete-warning p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.project-delete-confirm { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
.project-delete-consent { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.projects-empty { grid-column: 1 / -1; }
.modal-content { border: 1px solid var(--border); border-radius: 24px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
#createModal { top: var(--visual-viewport-top, 0); bottom: auto; height: var(--visual-viewport-height, 100dvh); }
.create-sheet-dialog { width: min(560px, 100%); max-width: none; height: 100%; min-height: 0; margin: 0 auto; display: flex; align-items: flex-end; }
.create-sheet { max-height: calc(var(--visual-viewport-height, 100dvh) - 8px); overflow-y: auto; border-radius: 26px 26px 0 0; animation: sheet-in .22s ease; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: .7; } }
.create-choice-grid { display: grid; gap: 0; padding: 0 0 18px; }
.create-choice-btn { display: grid; grid-template-columns: 48px minmax(0, 1fr) 20px; min-height: 78px; align-items: center; gap: 13px; padding: 14px 18px; text-align: left; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--text); transition: background-color .16s ease; }
.create-choice-btn:last-child { border-bottom: 1px solid var(--border); }
.create-choice-btn:hover { background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.create-choice-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.create-choice-copy { min-width: 0; }
.create-choice-copy strong, .create-choice-copy small { display: block; }
.create-choice-copy strong { font-size: 1rem; font-weight: 750; }
.create-choice-copy small { margin-top: 2px; color: var(--muted); font-size: .82rem; }
.create-choice-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: 1.25rem; }
.create-choice-arrow { color: var(--muted); font-size: .9rem; }
.project-form-topbar { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px; }
.project-form-topbar .modal-title { min-width: 0; margin: 0 auto 0 0; text-align: left; }
.project-form-close { margin: 0; }
.project-form-submit { position: relative; z-index: 1; }
.project-edit-header { padding: 20px 20px 12px; }
.project-edit-header .modal-title { font-weight: 780; letter-spacing: -.035em; }
#editProjectForm { min-height: min(62vh, 500px); background: #fff; }
#editProjectForm:not([hidden]) { display: flex; flex-direction: column; }
#editProjectForm .project-form-body { padding: 14px 20px 24px; }
#editProjectForm .form-control { border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border)); border-radius: 15px; background: #fff; }
#editProjectForm .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--primary) 14%, transparent); }
.project-edit-actions { margin-top: auto; padding: 12px 20px 20px; }
.project-edit-actions .btn { width: 100%; min-height: 48px; border-radius: 999px; font-weight: 750; }
.project-form-body { display: grid; gap: 14px; }
.project-form-body > .form-control { margin-bottom: 2px !important; }
.project-visibility-switch { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border)); border-radius: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, #fff), #fff); cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease; }
.project-visibility-switch:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 10%, transparent); }
.project-visibility-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--primary) 14%, #fff); color: var(--primary); font-size: 1.15rem; }
.project-visibility-switch strong, .project-visibility-switch small { display: block; }
.project-visibility-switch small { margin-top: 3px; color: var(--muted); }
.project-visibility-switch .form-check-input { width: 2.7em; height: 1.4em; cursor: pointer; }
.project-visibility-switch .form-check-input:checked { border-color: var(--primary); background-color: var(--primary); }
.project-icon-editor { padding: 14px; border: 1px solid var(--border); border-radius: 20px; background: #fff; }
.project-icon-editor-label { display: block; margin-bottom: 11px; color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.project-icon-options { display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; }
.project-icon-options::-webkit-scrollbar { display: none; }
.project-icon-option, .project-icon-upload { display: grid; width: 46px; height: 46px; flex: 0 0 46px; padding: 0; place-items: center; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-soft); color: var(--text); font-size: 1.3rem; cursor: pointer; transition: .16s ease; }
.project-icon-option:hover, .project-icon-upload:hover { border-color: var(--primary); transform: translateY(-1px); }
.project-icon-option.active, .project-icon-upload.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, #fff); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 16%, transparent); }
.project-icon-upload.has-image { background-position: center; background-size: cover; color: transparent; }
.project-icon-upload.has-image > i { opacity: 0; }
.project-icon-upload input { display: none; }
.project-icon-file-name { display: block; min-height: 16px; margin-top: 8px; color: var(--primary); font-size: .72rem; font-weight: 650; }
.project-color-editor { padding: 14px; border: 1px solid var(--border); border-radius: 20px; background: #fff; }
.project-color-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.project-color-heading strong, .project-color-heading small { display: block; }
.project-color-heading strong { font-size: .82rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.project-color-heading small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.project-color-preview { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--project-choice, var(--primary)) 14%, #fff); color: var(--project-choice, var(--primary)); font-size: 1.25rem; transition: color .16s ease, background-color .16s ease; }
.project-color-options { display: flex; align-items: center; gap: 9px; overflow-x: auto; scrollbar-width: none; }
.project-color-options::-webkit-scrollbar { display: none; }
.project-color-option, .project-color-custom { position: relative; display: grid; width: 36px; height: 36px; flex: 0 0 36px; padding: 0; place-items: center; border: 3px solid #fff; border-radius: 50%; outline: 1px solid var(--border); background: var(--project-choice, conic-gradient(#62A1FE, #7C6CF2, #EC4899, #F59E0B, #22C55E, #62A1FE)); cursor: pointer; }
.project-color-option.active { outline: 3px solid var(--project-choice); outline-offset: 2px; }
.project-color-option.active::after { content: ""; width: 9px; height: 9px; border: 2px solid #fff; border-top: 0; border-left: 0; transform: translateY(-2px) rotate(45deg); }
.project-color-custom { overflow: hidden; color: #fff; }
.project-color-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.member-search-field { position: relative; }
.member-search-field > i { position: absolute; z-index: 1; top: 50%; left: 15px; color: var(--muted); transform: translateY(-50%); }
.member-search-field .form-control { padding-left: 43px; }
.member-results { display: grid; gap: 8px; min-height: 80px; margin-top: 14px; }
.member-search-state { padding: 20px 12px; color: var(--muted); text-align: center; }
.member-result { display: grid; grid-template-columns: 40px minmax(0, 1fr) 24px; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-soft); color: var(--text); text-align: left; }
.member-result:hover { border-color: var(--primary); }
.member-result > .bi { color: var(--primary); }
.member-avatar { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; }
.member-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.member-modal-dialog { width: min(430px, calc(100% - 28px)); margin-right: auto; margin-left: auto; }
.member-profile-card { overflow: hidden; }
.member-profile-body { display: grid; justify-items: center; padding: 8px 24px 30px; text-align: center; }
.member-profile-avatar { display: grid; width: 92px; height: 92px; margin-bottom: 14px; place-items: center; overflow: hidden; border-radius: 28px; background: var(--active-tab-color, var(--primary)); color: #fff; font-size: 2rem; font-weight: 800; box-shadow: 0 14px 30px color-mix(in srgb, var(--active-tab-color, var(--primary)) 28%, transparent); }
.member-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-profile-body strong { font-size: 1.35rem; }
.member-profile-body span { margin-top: 5px; color: var(--active-tab-color, var(--primary)); font-weight: 750; }
.member-profile-body small { margin-top: 12px; color: var(--muted); }
.member-manage-person { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 18px; padding: 12px; border-radius: 16px; background: var(--surface-soft); }
.member-manage-person .project-member-avatar { width: 48px; height: 48px; }
.member-manage-person strong, .member-manage-person small { display: block; }
.member-manage-person small { color: var(--muted); }
.member-permissions { display: grid; gap: 16px; margin-top: 18px; }
.member-permissions-block { display: grid; gap: 10px; }
.member-permissions-title { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.member-perm-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.member-project-perms { display: grid; }
.member-perm-btn { display: inline-flex; min-height: 36px; align-items: center; gap: 7px; padding: 7px 12px; border: 1.5px solid var(--perm-color, #9ca3af); border-radius: 999px; background: color-mix(in srgb, var(--perm-color, #9ca3af) 10%, #fff); color: var(--perm-color, #9ca3af); font-size: .78rem; font-weight: 750; transition: .16s ease; }
.member-perm-btn > i { font-size: .95rem; }
.member-perm-btn:hover, .member-perm-btn:focus-visible { background: color-mix(in srgb, var(--perm-color, #9ca3af) 18%, #fff); transform: translateY(-1px); }
.member-perm-btn.is-active { background: var(--perm-color, #9ca3af); color: #fff; box-shadow: 0 6px 14px color-mix(in srgb, var(--perm-color, #9ca3af) 28%, transparent); }
.member-perm-btn:disabled { opacity: .72; cursor: default; transform: none; }
.member-perm-slider { display: grid; gap: 6px; }
.member-perm-slider-head { display: flex; align-items: center; justify-content: flex-start; min-width: 0; }
.member-perm-slider-label { display: inline-flex; min-width: 0; color: var(--muted); font-size: .72rem; font-weight: 700; line-height: 1.2; }
.member-perm-chip { display: inline-flex; align-items: center; gap: 4px; color: color-mix(in srgb, var(--perm-color, #9ca3af) 72%, var(--muted)); white-space: nowrap; }
.member-perm-chip > i { font-size: .78rem; }
.member-perm-chip.is-current { color: var(--perm-color, #9ca3af); font-weight: 780; }
.member-perm-range {
  --range-track: #e5e7eb;
  width: 100%;
  height: 28px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.member-perm-range:disabled { cursor: default; opacity: .72; }
.member-perm-range:focus-visible { outline: none; }
.member-perm-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--perm-color, #9ca3af) 0 var(--perm-progress, 0%), var(--range-track) var(--perm-progress, 0%) 100%);
}
.member-perm-range::-moz-range-track {
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--range-track);
}
.member-perm-range::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--perm-color, #9ca3af);
}
.member-perm-range::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -7px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--perm-color, #9ca3af);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--perm-color, #9ca3af) 35%, transparent);
}
.member-perm-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--perm-color, #9ca3af);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--perm-color, #9ca3af) 35%, transparent);
}
.member-perm-scale {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  min-width: 0;
}
.member-perm-scale-item {
  display: inline-flex;
  min-width: 0;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #c4c4c8;
  font-size: .58rem;
  font-weight: 720;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
}
.member-perm-scale-item > i { font-size: .62rem; }
.member-perm-scale-item > span { overflow: hidden; text-overflow: ellipsis; }
.member-perm-scale-item.is-active { color: color-mix(in srgb, var(--perm-color, #9ca3af) 70%, #6b7280); }
.member-perm-scale-item.is-current { color: var(--perm-color, #9ca3af); font-weight: 800; }
.member-perm-slider:has(.member-perm-range:disabled) .member-perm-scale-item { cursor: default; }
.member-tab-perms { display: grid; gap: 10px; max-height: min(280px, 36vh); overflow: auto; padding-right: 2px; }
.member-tab-perm-row { display: grid; gap: 6px; padding: 8px 0; border: 0; border-radius: 0; background: transparent; }
.member-tab-perm-row + .member-tab-perm-row { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.member-tab-perm-row strong { overflow: hidden; font-size: .88rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.member-tab-perms-empty { padding: 14px 10px; color: var(--muted); font-size: .82rem; text-align: center; }
.member-manage-actions { display: grid; grid-template-columns: 1fr; gap: 9px; }
.member-manage-actions .btn { width: 100%; min-height: 48px; }
.create-back-btn { display: grid; width: 38px; height: 38px; flex: 0 0 auto; padding: 0; place-items: center; border: 0; border-radius: 12px; background: var(--surface-soft); color: var(--text); font-size: 1.8rem; line-height: 1; }
.modal-footer .create-back-btn { display: inline-block; width: auto; height: auto; padding: .375rem .75rem; font-size: 1rem; }
.compose-panel { --compose-accent: var(--primary); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: min(72vh, 560px); }
#taskForm:not([hidden]) { width: 100%; height: min(560px, calc(var(--visual-viewport-height, 100dvh) - 8px)); min-height: 0; overflow: hidden; }
#taskForm .compose-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.compose-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 4px; }
.compose-topbar-title { min-width: 0; margin: 0 auto 0 0; overflow: hidden; font-size: 1.15rem; font-weight: 780; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.compose-icon-btn { display: grid; width: 36px; height: 36px; padding: 0; place-items: center; border-radius: 50%; background: transparent; color: var(--text); }
.compose-submit { min-width: 96px; border-radius: 999px; font-weight: 700; --bs-btn-bg: var(--compose-accent); --bs-btn-border-color: var(--compose-accent); --bs-btn-hover-bg: color-mix(in srgb, var(--compose-accent) 82%, #000); --bs-btn-hover-border-color: color-mix(in srgb, var(--compose-accent) 82%, #000); --bs-btn-active-bg: color-mix(in srgb, var(--compose-accent) 76%, #000); --bs-btn-active-border-color: color-mix(in srgb, var(--compose-accent) 76%, #000); }
.tab-compose-panel { --compose-accent: var(--primary); width: 100%; min-width: 0; max-width: 100%; min-height: min(68vh, 540px); background: #fff; }
.tab-compose-panel .compose-topbar { padding: 14px 18px 12px; border-bottom: 1px solid color-mix(in srgb, var(--primary) 14%, var(--border)); }
.tab-compose-panel .compose-icon-btn:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
#createModal #tabForm .compose-submit { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary-dark); --bs-btn-hover-border-color: var(--primary-dark); --bs-btn-active-bg: var(--primary-dark); --bs-btn-active-border-color: var(--primary-dark); }
.tab-compose-body { width: 100%; min-width: 0; padding: 20px 18px 30px; overflow: hidden; }
.tab-compose-editor { display: block; width: 100%; min-width: 0; }
.tab-compose-main { width: 100%; min-width: 0; overflow: hidden; }
.tab-compose-label { display: block; margin-bottom: 8px; color: var(--primary); font-size: .74rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.tab-compose-input { width: 100%; padding: 8px 0 14px; border: 0; border-bottom: 2px solid color-mix(in srgb, var(--primary) 20%, var(--border)); background: transparent; color: var(--text); font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; outline: none; transition: border-color .16s ease; }
.tab-compose-input:focus { border-color: var(--primary); caret-color: var(--primary); }
.tab-compose-input::placeholder { color: #a8a3ad; font-weight: 500; }
.tab-color-title { margin-top: 26px; }
#tabForm .color-palette { width: 100%; min-width: 0; max-width: 100%; margin: 0; padding: 8px 4px 16px; overflow-x: auto; }
#tabForm .color-swatch.active { outline-color: var(--primary); }
.compose-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 8px 16px 12px; }
.compose-main { min-width: 0; }
.compose-textarea { width: 100%; min-height: 140px; padding: 8px 0; border: 0; background: transparent; color: var(--text); font-size: 1.25rem; line-height: 1.4; outline: none; resize: none; }
.compose-textarea:focus { caret-color: var(--compose-accent); }
.compose-textarea::placeholder { color: var(--muted); }
.compose-link-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--compose-accent) 28%, var(--border)); border-radius: 14px; background: color-mix(in srgb, var(--compose-accent) 8%, var(--surface-soft)); color: var(--compose-accent); }
.compose-links { display: grid; gap: 8px; margin-top: 10px; }
.compose-subtasks { display: grid; gap: 8px; margin-top: 10px; }
.compose-subtask { display: grid; grid-template-columns: 24px 22px 24px minmax(0, 1fr) 32px; align-items: center; gap: 6px; padding: 8px; border: 1px solid color-mix(in srgb, var(--compose-accent) 22%, var(--border)); border-radius: 14px; background: color-mix(in srgb, var(--compose-accent) 6%, var(--surface-soft)); }
.compose-subtask-drag, .compose-subtask-remove { display: grid; width: 28px; height: 28px; padding: 0; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.compose-subtask-drag { width: 24px; cursor: grab; }
.compose-subtask-remove:hover { background: color-mix(in srgb, #dc3545 10%, transparent); color: #b3261e; }
.compose-subtask-number { color: var(--compose-accent); font-size: .75rem; font-weight: 800; text-align: center; }
.compose-subtask-check { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: #22c55e; }
.compose-subtask-input { min-width: 0; padding: 5px 2px; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--text); outline: none; }
.compose-subtask-input:focus { border-bottom-color: var(--compose-accent); }
.compose-link-input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); outline: none; }
.compose-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 12px; }
.compose-preview { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: var(--surface-soft); }
.compose-preview img { width: 100%; height: 100%; object-fit: cover; }
.compose-preview-remove { position: absolute; top: 6px; right: 6px; display: grid; width: 30px; height: 30px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: rgba(24, 24, 28, .78); color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .22); }
.compose-preview-remove:hover { background: #dc3545; }
.compose-video-previews, .compose-file-previews { display: grid; gap: 9px; margin-top: 10px; }
.compose-video-preview { overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-soft); }
.compose-video-preview video { display: block; width: 100%; max-height: 260px; background: #111; object-fit: contain; }
.compose-video-preview > div { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; }
.compose-video-preview strong { min-width: 0; overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.compose-file-preview { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.compose-file-preview > i { color: var(--compose-accent); font-size: 1.2rem; text-align: center; }
.compose-file-preview > span:not(.compose-attachment-actions), .compose-file-preview strong, .compose-file-preview small { min-width: 0; display: block; }
.compose-file-preview strong { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.compose-file-preview small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.compose-attachment-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 3px; }
.compose-attachment-actions a, .compose-attachment-actions button { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--compose-accent); }
.compose-attachment-actions button { color: #b3261e; }
.compose-attachment-actions a:hover { background: color-mix(in srgb, var(--compose-accent) 11%, transparent); }
.compose-attachment-actions button:hover { background: color-mix(in srgb, #b3261e 10%, transparent); }
.task-gallery-modal { --bs-modal-bg: #000; }
.task-gallery-modal .modal-content { position: relative; min-height: 100vh; border: 0; border-radius: 0; background: #000; box-shadow: none; overflow: hidden; }
.task-gallery-topbar { position: absolute; z-index: 4; top: 0; right: 0; left: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 16px 14px; background: linear-gradient(to bottom, rgba(0, 0, 0, .65), transparent); pointer-events: none; }
.task-gallery-actions { display: flex; align-items: center; gap: 7px; pointer-events: auto; }
.task-gallery-counter { min-width: 48px; color: #fff; font-size: .82rem; font-weight: 750; text-align: center; text-shadow: 0 1px 5px #000; }
.task-gallery-close, .task-gallery-download, .task-gallery-zoom { display: grid; width: 42px; height: 42px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: rgba(32, 35, 39, .78); color: #fff; font-size: 1.15rem; backdrop-filter: blur(10px); pointer-events: auto; }
.task-gallery-close:hover, .task-gallery-download:hover, .task-gallery-zoom:hover { background: rgba(79, 97, 238, .92); color: #fff; }
.task-gallery-zoom:disabled { opacity: .38; }
.task-gallery-carousel, .task-gallery-carousel .carousel-inner, .task-gallery-carousel .carousel-item { width: 100%; height: 100vh; }
.task-gallery-carousel .carousel-item { overflow: hidden; }
.task-gallery-carousel .carousel-item img { width: 100%; height: 100%; object-fit: contain; user-select: none; touch-action: none; transform-origin: center; will-change: transform; }
.task-gallery-carousel .carousel-control-prev, .task-gallery-carousel .carousel-control-next { width: 12%; min-width: 52px; }
.task-gallery-carousel .carousel-control-prev-icon, .task-gallery-carousel .carousel-control-next-icon { width: 42px; height: 42px; padding: 10px; border-radius: 50%; background-color: rgba(32, 35, 39, .72); background-size: 50%; }
@media (max-width: 600px) {
  .task-gallery-zoom { display: none; }
}
.compose-audio-previews { display: grid; gap: 8px; margin-top: 12px; }
.compose-audio-preview { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: center; gap: 8px; padding: 8px; border: 1px solid color-mix(in srgb, var(--compose-accent) 24%, var(--border)); border-radius: 14px; background: color-mix(in srgb, var(--compose-accent) 7%, var(--surface-soft)); }
.compose-audio-preview audio { width: 100%; height: 38px; }
.compose-audio-remove { display: grid; width: 36px; height: 36px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #b3261e; }
.compose-audio-remove:hover { background: color-mix(in srgb, #b3261e 10%, transparent); }
.compose-audio-saved { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: var(--compose-accent); }
.compose-toolbar { position: relative; z-index: 3; display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid color-mix(in srgb, var(--compose-accent) 18%, var(--border)); background: var(--surface); }
.compose-tools { display: flex; align-items: center; gap: 4px; }
.compose-tool { display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--compose-accent); font-size: 1.2rem; cursor: pointer; }
.compose-tool:hover { background: color-mix(in srgb, var(--compose-accent) 12%, transparent); }
.compose-tool.is-recording { background: #dc3545; color: #fff; animation: voice-recording-pulse 1.15s ease-in-out infinite; }
.compose-tool:disabled { opacity: .45; cursor: not-allowed; }
@keyframes voice-recording-pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, #dc3545 22%, transparent); } }
.compose-counter { color: var(--muted); font-size: .78rem; font-weight: 600; }
#createModal .btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary-dark); --bs-btn-hover-border-color: var(--primary-dark); }
.form-control { border-color: var(--border); background: var(--surface); color: var(--text); }
.form-control:focus { border-color: var(--primary); background: var(--surface); color: var(--text); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--primary) 14%, transparent); }
.color-palette { display: flex; gap: 11px; padding: 6px 5px 14px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: var(--border) transparent; touch-action: pan-x; }
.color-palette::-webkit-scrollbar { height: 5px; }
.color-palette::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--border); }
.color-swatch { position: relative; width: 38px; height: 38px; flex: 0 0 38px; padding: 0; border: 3px solid var(--surface); border-radius: 50%; outline: 1px solid color-mix(in srgb, var(--swatch) 45%, var(--border)); background: var(--swatch); box-shadow: 0 3px 9px rgba(28, 21, 36, .12); transition: transform .15s ease, outline-width .15s ease; }
.color-swatch:hover { transform: translateY(-2px); }
.color-swatch.active { outline: 3px solid var(--text); outline-offset: 2px; transform: scale(1.08); }
.color-swatch.active::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary-dark); --bs-btn-hover-border-color: var(--primary-dark); }
.text-secondary, .form-text { color: var(--muted) !important; }
.app-toast-container { z-index: 1100; width: min(420px, calc(100vw - 28px)); pointer-events: none; }
.app-toast-container .toast { pointer-events: auto; }
.toast,
.app-toast { background: var(--text); color: var(--surface); border-radius: 16px; box-shadow: 0 16px 40px rgba(28, 21, 36, .28); }
.app-toast .toast-body { padding: .85rem 0 .85rem 1rem; font-size: .92rem; font-weight: 650; line-height: 1.35; }
.app-toast .app-toast-close { margin: 0 .7rem 0 0; opacity: .78; }
.app-toast .app-toast-close:hover { opacity: 1; }
.app-toast.bg-danger { background: #dc3545; }

.auth-page { min-height: 100vh; background: radial-gradient(circle at 18% 12%, #eee8f9, var(--bg) 43%); }
.auth-layout { display: grid; width: min(1120px, 100%); min-height: 100vh; margin: auto; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); align-items: center; gap: clamp(44px, 8vw, 110px); padding: clamp(28px, 6vw, 80px); }
.auth-intro { max-width: 560px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.auth-intro-brand { display: flex; align-items: center; }
.auth-intro-heading { min-width: 0; width: 100%; }
.auth-intro-animated-brand {
  --brand-arm: 42px;
  --brand-bar: 7px;
  flex: 0 0 auto;
}
.auth-intro-animated-brand .projects-brand-mess { font-size: clamp(2rem, 4vw, 2.75rem); }
.auth-intro-logo { display: none; }
.auth-intro h2 {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  font-weight: 780;
  letter-spacing: -.04em;
  line-height: 1.2;
  color: var(--text);
}
.auth-intro p { max-width: 470px; margin: 8px 0 0; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.22rem); line-height: 1.55; }
.auth-card { width: 100%; max-width: 460px; justify-self: end; border: 1px solid var(--border) !important; border-radius: 28px; background: rgba(255, 255, 255, .9); color: var(--text); box-shadow: 0 22px 60px rgba(45, 34, 62, .1) !important; backdrop-filter: blur(16px); }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-card-brand {
  --brand-arm: 26px;
  --brand-bar: 4.5px;
}
.auth-card-brand .projects-brand-mess { font-size: 1.45rem; }
.auth-wordmark { color: var(--primary); font-size: 1.35rem; font-weight: 850; letter-spacing: .04em; }
.brand-mark { display: grid; width: 68px; height: 68px; place-items: center; border-radius: 21px; background: color-mix(in srgb, var(--primary) 11%, #fff); color: var(--primary); box-shadow: 0 8px 20px rgba(98, 161, 254, .14); }
.brand-mark img { width: 68px; height: 68px; border-radius: 21px; }
.brand-mark svg { width: 44px; height: 44px; overflow: visible; }
.brand-mark path:first-child { fill: currentColor; opacity: .18; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.brand-mark .project-leaf-veins { fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.auth-card h1 { margin-bottom: 8px; letter-spacing: -.035em; }
.auth-card .form-control { min-height: 58px; border-radius: 14px; }
.auth-card .btn-primary { min-height: 52px; border-radius: 999px; font-weight: 750; }
.auth-card a { font-weight: 650; text-decoration: none; }
.auth-card a:hover { text-decoration: underline; }

@media (min-width: 821px) {
  .auth-card .auth-brand { display: none; }
}

@media (max-width: 820px) {
  .auth-layout { grid-template-columns: 1fr; gap: 22px; padding: 24px 18px; }
  .auth-intro { display: none; }
  .auth-card { max-width: 480px; justify-self: center; }
}

@media (max-width: 799px) {
  #homeBrand,
  #projectFullscreenToggle { display: none !important; }

  .project-tabs-toggle { display: none !important; }

  .project-tabs-menu {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 4px 16px 10px;
    align-self: stretch;
    background: #fff;
    border-top: 1px solid var(--border);
  }

  .project-chrome {
    border-bottom: 1px solid var(--border);
  }

  .project-tabs-dropdown,
  .project-tabs-menu.is-open .project-tabs-dropdown {
    position: static;
    display: flex !important;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    max-width: none;
    max-height: none;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .project-tabs-dropdown .tabs-list {
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    max-width: none;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--text) 22%, transparent) transparent;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }

  .project-tabs-dropdown .tabs-list::-webkit-scrollbar { display: block; height: 3px; }
  .project-tabs-dropdown .tabs-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--text) 22%, transparent);
  }
  .project-tabs-dropdown .tabs-list::-webkit-scrollbar-track { background: transparent; }

  .project-tabs-dropdown .tab-pill {
    width: auto;
    flex: 0 0 auto;
    padding: 8px 2px 10px;
    text-align: center;
    white-space: nowrap;
    line-height: inherit;
  }

  .project-tabs-dropdown .tab-pill::after {
    top: auto;
    right: 0;
    bottom: 3px;
    left: 0;
    width: auto;
    height: 3px;
    border-radius: 999px;
    transform: scaleX(.35);
  }

  .project-tabs-dropdown .tab-pill.active::after { transform: scaleX(1); }

  .project-tabs-dropdown .favorites-tab {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.25rem;
    box-shadow: none;
    transform: none;
    filter: none;
  }

  .project-tabs-dropdown .favorites-tab > span { display: none; }
  .project-tabs-dropdown .favorites-tab > i { font-size: 1.25rem; }
  .project-tabs-dropdown .favorites-tab:hover,
  .project-tabs-dropdown .favorites-tab.active {
    background: transparent;
  }
  .project-tabs-dropdown .favorites-tab.active {
    color: var(--active-tab-color, var(--primary));
    transform: scale(1.08);
    filter: drop-shadow(0 3px 7px color-mix(in srgb, currentColor 25%, transparent));
  }
  .project-tabs-dropdown .favorites-tab::after { display: none; }
}

@media (max-width: 799px) {
  .app-shell-top {
    position: sticky;
    top: 0;
    z-index: 18;
    background: #fff;
    border-bottom: 1px solid var(--border);
  }
  .projects-header {
    position: static;
    top: auto;
    z-index: auto;
    gap: 8px;
    margin: 0;
    padding: 8px 16px;
    background: transparent;
    border-bottom: 0;
  }
  .projects-header-email { display: none; }
  .projects-header-user {
    max-width: min(34vw, 140px);
    gap: 0;
  }
  .projects-header-user strong {
    font-size: .86rem;
    font-weight: 720;
    color: var(--muted);
  }
  .projects-account-btn.floating-account-btn {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
  .content {
    padding: 12px 16px 120px;
  }
  .projects-section-title {
    margin-bottom: 10px;
  }
  .project-filter-tabs {
    margin-bottom: 12px;
  }
  #chatsView .wa-chat-list {
    margin: 0;
  }

  body.chat-thread-open .content {
    padding: 0 !important;
  }

  #chatThreadView.active {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--visual-viewport-top, 0px);
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: var(--visual-viewport-height, 100dvh);
    min-height: 0;
    margin: 0;
    padding: 0;
    background: #fff;
    overflow: hidden;
  }

  #chatThreadView.active .wa-thread-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    margin: 0;
    padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
    transition: transform .24s ease, opacity .2s ease;
  }

  #chatThreadView.active .wa-composer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    margin: 0;
    transition: transform .24s ease, opacity .2s ease;
  }

  #chatThreadView.active .wa-thread-messages {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: calc(64px + env(safe-area-inset-top)) 14px calc(78px + env(safe-area-inset-bottom));
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  body.app-chrome-hidden #chatThreadView.active .wa-thread-top {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(-100% - 8px));
  }

  body.app-chrome-hidden #chatThreadView.active .wa-composer {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 8px));
  }

  @media (prefers-reduced-motion: reduce) {
    #chatThreadView.active .wa-thread-top,
    #chatThreadView.active .wa-composer {
      transition: none;
    }
  }
}

@media (max-width: 540px) {
  .content { padding: 10px 14px 115px; }
  .project-chrome { margin: -10px -14px 16px; }
  .project-context-header { padding-right: 14px; padding-left: 14px; }
  .project-tabs-menu { padding-left: 14px; padding-right: 14px; }
  .projects-home-toggle { padding: 0 10px; }
  .projects-home-toggle span { display: none; }
  .projects-header { padding: 8px 14px; gap: 8px; }
  .projects-heading { gap: 10px; }
  .projects-section-title { font-size: .98rem; margin-bottom: 10px; }
  .projects-header-user { max-width: min(36vw, 130px); }
  .projects-account-btn.floating-account-btn { width: 38px; height: 38px; flex-basis: 38px; }
  .projects-create-btn span { display: none; }
  .projects-create-btn { width: 44px; height: 44px; justify-content: center; padding: 0; }
  .topbar { margin-bottom: 26px; }
  .task-card, .tab-pill { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  .task-card { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 14px 12px; gap: 8px; border-radius: 16px; }
  .settings-card { padding: 18px; }
  .account-hero { padding: 16px; border-radius: 24px; }
  .account-hero-main { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
  .account-avatar { width: 72px; height: 72px; font-size: 1.65rem; }
  .account-hero-copy strong { font-size: 1.15rem; }
  .account-card { padding: 16px; border-radius: 18px; }
  .app-mode-tab { padding: 8px 11px; font-size: .78rem; }
  .app-mode-search { width: 34px; height: 34px; flex-basis: 34px; font-size: .95rem; }
  .wa-thread-messages { margin: 0; }
}

/* Platform chats */
.wa-chats-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.wa-chats-toolbar .projects-section-title { flex: 1; margin-bottom: 0; }
.wa-section-head { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.wa-section-title { margin: 0; flex: 1; font-size: .78rem; font-weight: 780; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.wa-section-count { display: inline-grid; min-width: 20px; height: 20px; padding: 0 6px; place-items: center; border-radius: 999px; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 800; }
.wa-section-hint { margin: 0 0 10px; color: var(--muted); font-size: .8rem; }
.wa-inbox-section { margin-bottom: 14px; padding: 12px; border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border)); border-radius: 18px; background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.wa-chats-list-head { margin-top: 2px; }
.app-mode-tab.has-inbox { position: relative; }
.app-mode-tab.has-inbox::after { content: attr(data-inbox-count); position: absolute; top: -4px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #e11d48; color: #fff; font-size: .62rem; font-weight: 800; line-height: 16px; text-align: center; }
.wa-topbar, .wa-thread-top { display: flex; align-items: center; gap: 10px; min-height: 52px; margin: -8px 0 12px; }
.wa-title { margin: 0; flex: 1; font-size: 1.35rem; font-weight: 780; letter-spacing: -.03em; }
.wa-icon-btn { display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.1rem; }
.wa-icon-btn:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.wa-inbox { display: grid; gap: 8px; }
.wa-inbox:empty { display: none; }
.wa-request { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.wa-request-actions { display: flex; gap: 8px; }
.wa-request-actions .btn { flex: 1; border-radius: 999px; font-weight: 700; }
.wa-chat-list { display: grid; gap: 8px; margin: 0; }
.wa-chat-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--border));
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 5%, var(--surface)), var(--surface) 70%);
  color: inherit;
  text-align: left;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 6%, transparent);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.wa-chat-item:hover,
.wa-chat-item:focus-visible {
  border-color: color-mix(in srgb, var(--primary) 36%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 12%, transparent);
}
.wa-avatar { display: grid; width: 48px; height: 48px; place-items: center; overflow: hidden; border-radius: 50%; background: color-mix(in srgb, var(--primary) 16%, var(--surface-soft)); color: var(--primary); font-weight: 800; }
.wa-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wa-chat-copy { min-width: 0; }
.wa-chat-copy strong, .wa-chat-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-chat-copy strong { font-size: .95rem; font-weight: 740; }
.wa-chat-copy small { margin-top: 3px; color: var(--muted); font-size: .8rem; }
.wa-chat-time { align-self: start; padding-top: 2px; color: var(--muted); font-size: .72rem; white-space: nowrap; }
.wa-empty { padding: 28px 12px; color: var(--muted); text-align: center; font-size: .9rem; }
#chatThreadView.active { display: flex; flex-direction: column; min-height: calc(100dvh - 120px); padding-bottom: 0; }
.wa-thread-top {
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}
.wa-thread-peer { display: flex; min-width: 0; align-items: center; gap: 10px; flex: 1; }
.wa-thread-peer .wa-avatar { width: 40px; height: 40px; font-size: .85rem; }
.wa-thread-peer strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.wa-thread-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 16px 14px 18px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 42%),
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--primary) 7%, transparent), transparent 40%),
    var(--surface-soft);
}
.wa-bubble {
  max-width: min(78%, 420px);
  padding: 9px 12px 6px;
  border-radius: 16px 16px 16px 6px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  box-shadow: 0 4px 12px rgba(28, 21, 36, .05);
  align-self: flex-start;
}
.wa-bubble.is-mine {
  align-self: flex-end;
  border-radius: 16px 16px 6px 16px;
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
  background: color-mix(in srgb, var(--primary) 16%, #fff);
}
.wa-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; line-height: 1.35; }
.wa-bubble time { display: block; margin-top: 4px; color: var(--muted); font-size: .68rem; text-align: right; }
.wa-composer {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.wa-composer-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
}
.wa-composer-input:focus {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}
.wa-composer-send {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 30%, transparent);
}
.wa-composer-send:hover { background: var(--primary-dark); }
.wa-search-box { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface-soft); border: 1px solid var(--border); }
.wa-search-box i { color: var(--muted); }
.wa-search-box input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); outline: none; font-size: 1rem; }
.wa-search-results { display: grid; gap: 10px; }
.wa-person { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.wa-person-copy strong, .wa-person-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-person-copy small { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.wa-person-actions { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; }
.wa-person-actions .btn { border-radius: 999px; font-size: .82rem; font-weight: 700; }
.wa-friend-pick { display: grid; gap: 8px; max-height: 50vh; overflow: auto; }
.wa-friend-pick button { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-align: left; }

/* Desktop ChatGPT-style sidebar */
.sidebar-desktop { display: none; }

@media (min-width: 800px) {
  body { background: #f4f5f7; }
  .app-shell {
    --sidebar-width: 260px;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
    align-items: stretch;
  }
  .app-shell:has(#homeView.active) {
    grid-template-columns: minmax(0, 1fr);
  }
  .app-shell:has(#homeView.active) .app-sidebar {
    display: none;
  }
  .app-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: var(--sidebar-width);
    height: 100vh;
    max-height: 100vh;
    padding: 12px 10px 12px;
    border-right: 1px solid #e5e7eb;
    background: #f9fafb;
    overflow: hidden;
  }
  .app-sidebar .projects-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    padding: 8px 8px 14px;
    border-bottom: 1px solid #e5e7eb;
  }
  .app-sidebar .app-shell-top {
    display: contents;
  }
  .app-sidebar .projects-header[hidden] { display: flex !important; }
  .app-sidebar .sidebar-mobile-user { display: none !important; }
  .app-sidebar .projects-heading { flex: 1; min-width: 0; }
  .app-sidebar .projects-brand { --brand-arm: 24px; --brand-bar: 4px; }
  .app-sidebar .projects-brand-mess { font-size: 22px; }

  .sidebar-desktop {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    overflow: auto;
    padding: 0 2px 4px;
  }
  .sidebar-new-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px dashed color-mix(in srgb, var(--primary) 28%, #d1d5db);
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 6%, #fff);
    color: var(--text);
    font-size: .92rem;
    font-weight: 650;
    text-align: left;
    transition: background .15s ease, border-color .15s ease;
  }
  .sidebar-new-btn:hover {
    background: color-mix(in srgb, var(--primary) 10%, #fff);
    border-color: color-mix(in srgb, var(--primary) 45%, #d1d5db);
  }
  .sidebar-new-btn i { font-size: 1.05rem; color: var(--primary); }
  .sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .sidebar-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #374151;
    font-size: .92rem;
    font-weight: 600;
    text-align: left;
    transition: background .15s ease, color .15s ease;
  }
  .sidebar-item i {
    width: 1.15rem;
    flex: 0 0 auto;
    font-size: 1.05rem;
    opacity: .88;
  }
  .sidebar-item:hover { background: #eceff3; color: #111827; }
  .sidebar-item.active {
    background: color-mix(in srgb, var(--primary) 12%, #fff);
    color: var(--primary-dark);
  }
  .sidebar-item.active i { opacity: 1; }
  .sidebar-item-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
  }
  .sidebar-item-badge[hidden] { display: none !important; }
  .sidebar-spacer { flex: 1; min-height: 12px; }
  .content:has(#homeView.active) {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
    padding: 0;
    overflow: hidden;
  }
  #homeView.active {
    display: grid;
    flex: 1;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas:
      "header"
      "uploads"
      "board";
    width: 100%;
    min-height: 0;
    height: 100%;
    animation: none;
  }
  #homeView .project-chrome {
    grid-area: header;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 28px;
    min-height: 62px;
  }
  #homeView .project-context-header {
    display: contents;
  }
  #homeView .project-context-header > * { align-self: center; }
  #homeBrand { order: 1; }
  #projectsHomeToggle { order: 2; }
  #homeView .project-context-copy { order: 3; }
  #projectTaskScopeFilters {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    order: 4;
    height: 38px;
    padding: 3px;
    border: 1px solid color-mix(in srgb, var(--active-tab-color, var(--primary)) 35%, var(--border));
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--active-tab-color, var(--primary)) 12%, transparent);
  }
  #projectTaskScopeFilters .task-scope-filter {
    height: 30px;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
    box-shadow: none;
  }
  #projectTaskScopeFilters .task-scope-filter:hover {
    color: var(--active-tab-color, var(--primary));
  }
  #projectTaskScopeFilters .task-scope-filter.active {
    background: color-mix(in srgb, var(--active-tab-color, var(--primary)) 10%, #fff);
    color: var(--active-tab-color, var(--primary));
    box-shadow: none;
  }
  #projectTaskScopeFilters .task-scope-filter[data-task-scope="urgent"].active {
    color: #e11d48;
    background: color-mix(in srgb, #e11d48 10%, #fff);
  }
  #projectTaskScopeFilters .task-scope-filter i {
    font-size: .92rem;
  }
  #projectHeaderAddMenu { order: 5; }
  #projectTabsMenu { order: 6; flex: 0 0 auto; margin: 0; padding: 0; border: 0; align-self: flex-start; margin-top: 2px; }
  #projectMembersMenu { order: 7; }
  #projectFullscreenToggle { order: 8; }
  #projectRefreshToggle { order: 9; }
  #projectTaskScopeFilters[hidden] { display: none !important; }
  .task-board-column .task-scope-filters { display: none !important; }
  #homeView .project-uploads {
    grid-area: uploads;
    margin: 0;
    padding: 10px 16px 0;
  }
  #homeView #taskPanel {
    grid-area: board;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: #f4f5f7;
  }
  #homeView #taskPanel > .empty-state,
  #homeView #taskPanel > .projects-loading {
    flex: 1;
    display: grid;
    place-content: center;
  }
  #homeView #taskPanel > .task-section-label,
  #homeView #taskPanel > .task-section-head {
    margin: 16px 16px 0;
  }
  #homeView #taskPanel > .task-list {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 12px 16px 20px;
  }
  .task-board {
    display: flex;
    flex: 1;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  .task-board-column {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 14px 0 16px;
    overflow: hidden;
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    background: #fff;
  }
  .task-board-column:last-child { border-right: 0; }
  .task-board-column .task-section-head {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0 0 10px;
    padding: 0 12px 10px;
    border-bottom: 1px solid var(--border);
    cursor: grab;
    user-select: none;
  }
  .task-board-column .task-section-head:active { cursor: grabbing; }
  .task-board-column .task-section-label {
    margin: 0;
    padding: 0;
    border: 0;
    cursor: inherit;
  }
  .task-board-column.task-board-column-chosen,
  .task-board-column.task-board-column-drag {
    z-index: 5;
    background: #fff;
    box-shadow: 0 16px 40px rgba(28, 21, 36, .16);
  }
  .task-board-column.task-board-column-ghost {
    opacity: .45;
    background: color-mix(in srgb, var(--primary) 6%, #fff);
  }
  .task-board-column .task-board-empty {
    flex: 0 0 auto;
    padding: 20px 12px 8px;
    pointer-events: none;
  }
  .task-board-column .task-board-empty[hidden] { display: none !important; }
  .task-board-column .task-list {
    flex: 1;
    min-height: 120px;
    align-content: start;
    align-items: start;
    overflow: auto;
    padding: 0 12px;
  }
  .task-board-column.is-drop-target {
    background: color-mix(in srgb, var(--primary) 6%, #fff);
  }
  .project-header-add-menu {
    position: relative;
    display: block;
    flex: 0 0 auto;
  }
  .project-header-add {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    flex: 0 0 auto;
    padding: 0 12px 0 14px;
    border: 1px solid color-mix(in srgb, var(--active-tab-color, var(--primary)) 35%, var(--border));
    border-radius: 999px;
    background: #fff;
    color: var(--active-tab-color, var(--primary));
    font-size: .84rem;
    font-weight: 750;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--active-tab-color, var(--primary)) 12%, transparent);
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
  }
  .project-header-add:hover,
  .project-header-add:focus-visible,
  .project-header-add[aria-expanded="true"] {
    background: color-mix(in srgb, var(--active-tab-color, var(--primary)) 10%, #fff);
    border-color: var(--active-tab-color, var(--primary));
    transform: translateY(-1px);
  }
  .project-header-add i { font-size: 1rem; color: #000; }
  .project-header-add-chevron {
    margin-left: 1px;
    font-size: .72rem !important;
    color: #000;
    opacity: 1;
    transition: transform .18s ease;
  }
  .project-header-add[aria-expanded="true"] .project-header-add-chevron {
    transform: rotate(180deg);
  }
  .project-header-add-dropdown {
    z-index: 1050;
    min-width: 260px;
    padding: 6px;
    margin-top: 8px !important;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 18px 42px rgba(28, 21, 36, .18);
  }
  .project-header-add-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 10px 10px;
    border-radius: 12px;
    color: var(--text);
    white-space: normal;
  }
  .project-header-add-item:hover,
  .project-header-add-item:focus {
    background: color-mix(in srgb, var(--active-tab-color, var(--primary)) 9%, var(--surface));
    color: var(--text);
  }
  .project-header-add-item:disabled {
    opacity: .45;
    pointer-events: none;
  }
  .project-header-add-item-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: var(--active-tab-color, var(--primary));
    color: #fff;
    font-size: 1.05rem;
  }
  .project-header-add-item-copy {
    min-width: 0;
    text-align: left;
  }
  .project-header-add-item-copy strong,
  .project-header-add-item-copy small {
    display: block;
  }
  .project-header-add-item-copy strong {
    font-size: .92rem;
    font-weight: 750;
  }
  .project-header-add-item-copy small {
    margin-top: 2px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 500;
  }
  .sidebar-profile {
    gap: 12px;
  }
  .sidebar-profile-avatar {
    display: grid;
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 1.35rem;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: .62rem;
    font-weight: 800;
  }
  .sidebar-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .sidebar-profile-copy {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: 0;
  }
  .sidebar-profile-copy strong,
  .sidebar-profile-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sidebar-profile-copy strong {
    color: inherit;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.2;
  }
  .sidebar-profile-copy small {
    color: #6b7280;
    font-size: .72rem;
    font-weight: 500;
    line-height: 1.2;
  }
  .sidebar-item.sidebar-profile.active .sidebar-profile-copy small {
    color: color-mix(in srgb, var(--primary-dark) 55%, #6b7280);
  }

  .app-sidebar .bottom-actions { display: none !important; }
  .app-chrome-hidden .app-sidebar .bottom-actions { display: none !important; }

  .content {
    width: auto;
    max-width: none;
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    padding: 28px 28px 48px;
    background: #fff;
    box-shadow: none;
  }
  .content:has(#chatThreadView.active),
  .content:has(#chatsView.active) {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
    padding: 0;
    overflow: hidden;
  }
  #chatsView.active {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 28px 28px 48px;
  }
  #chatThreadView.active {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #fff;
  }
  #chatThreadView.active .wa-thread-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    margin: 0;
    padding: 12px 28px;
    background: color-mix(in srgb, var(--primary) 5%, #fff);
  }
  #chatThreadView.active .wa-composer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    margin: 0;
    padding: 12px 28px 16px;
    background: #fff;
  }
  #chatThreadView.active .wa-thread-messages {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 76px 28px 88px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }
  #chatThreadView.active .wa-bubble {
    max-width: min(62%, 560px);
  }
  .content:not(:has(#homeView.active)) .project-chrome {
    margin-left: -28px;
    margin-right: -28px;
    padding-left: 28px;
    padding-right: 28px;
  }

  #settingsBackButton,
  #searchBackButton,
  #accountBackButton,
  #accountSettingsButton {
    display: none !important;
  }
  #settingsView .account-topbar-spacer,
  #searchView .account-topbar-spacer {
    display: none;
  }
  #accountView .account-topbar-title,
  #settingsView .account-topbar-title,
  #searchView .wa-title {
    text-align: left;
  }
}
