@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap");

:root {
  --bg: #eef4f8;
  --bg-soft: #f7fafc;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --surface-muted: #f3f7fb;

  --text: #0f172a;
  --text-soft: #334155;
  --text-muted: #64748b;

  --line: rgba(148, 163, 184, 0.32);
  --line-strong: rgba(100, 116, 139, 0.42);

  --primary: #075985;
  --primary-2: #0891b2;
  --primary-soft: #e0f2fe;

  --success: #047857;
  --warning: #b45309;
  --danger: #be123c;

  --owner-bg: #fff7ed;
  --owner-text: #9a3412;
  --owner-line: #fed7aa;

  --dev-bg: #eff6ff;
  --dev-text: #1d4ed8;
  --dev-line: #bfdbfe;

  --tester-bg: #ecfdf5;
  --tester-text: #047857;
  --tester-line: #a7f3d0;

  --assigned-bg: #eff6ff;
  --assigned-line: #93c5fd;

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 20px 50px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.14);
}

[hidden],
.hidden {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  background:
    radial-gradient(900px 520px at 8% -15%, #dfe9ff 0%, transparent 60%),
    radial-gradient(700px 420px at 96% 10%, #d6f1ff 0%, transparent 55%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(23, 33, 47, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 47, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, black 45%, transparent 100%);
}

a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.eyebrow {
  margin: 0 0 0.35rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
}

.subtitle {
  margin: 0 0 1rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.tip {
  margin: 0.65rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.auth-shell {
  width: min(1040px, 96vw);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 460px);
  gap: 1rem;
  align-items: stretch;
}

.brand-panel {
  border-radius: 20px;
  border: 1px solid var(--line);
  padding: 1.6rem 1.4rem;
  background:
    linear-gradient(145deg, rgba(15, 78, 168, 0.97), rgba(33, 108, 226, 0.92)),
    radial-gradient(420px 220px at 90% 0, rgba(255, 255, 255, 0.25), transparent 60%);
  color: #f4f9ff;
  box-shadow: var(--shadow);
}

.brand-panel h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
}

.brand-panel .subtitle,
.brand-panel .eyebrow {
  color: rgba(244, 249, 255, 0.92);
}

.feature-list {
  margin: 0.9rem 0 0;
  padding-left: 1rem;
  color: rgba(244, 249, 255, 0.95);
}

.feature-list li {
  margin-bottom: 0.45rem;
}

.card-lg {
  width: min(520px, 96vw);
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow);
  padding: 1.4rem 1.3rem;
}

.card-lg h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.5rem, 2.7vw, 2rem);
}

.card-lg h2 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 251, 255, 0.86);
  backdrop-filter: blur(10px);
}

.topbar h2 {
  margin: 0;
  font-size: 1.2rem;
}

.top-title-block {
  display: grid;
  gap: 0.45rem;
}

.top-sub-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.top-sub-actions .btn-link,
.top-sub-actions button {
  margin-top: 0;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.top-actions .btn-secondary,
.top-actions a {
  margin-top: 0;
}

.top-actions a {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c7d2e2;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  background: #ffffff;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.top-actions a:hover {
  background: #f2f6fd;
  text-decoration: none;
}

.profile-menu {
  position: relative;
}

.settings-menu {
  position: relative;
}

.profile-trigger {
  margin-top: 0;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0.22rem;
  border-radius: 999px;
  border: 1px solid #c7d2e2;
  background: #ffffff;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-trigger:hover {
  transform: none;
  background: #f2f6fd;
  box-shadow: none;
}

.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 220px;
  border: 1px solid #d2dded;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(24, 47, 80, 0.2);
  padding: 0.55rem;
  z-index: 30;
  display: grid;
  gap: 0.35rem;
}

.settings-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 234px;
  border: 1px solid #d2dded;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(24, 47, 80, 0.2);
  padding: 0.55rem;
  z-index: 30;
  display: grid;
  gap: 0.4rem;
}

.settings-menu-title {
  margin: 0;
  padding: 0.15rem 0.2rem 0.4rem;
  border-bottom: 1px solid #e3eaf5;
  color: #29415f;
  font-size: 0.84rem;
  font-weight: 700;
}

.settings-role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.2rem 0.05rem;
}

.settings-menu-label {
  color: #4d6584;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-action-btn {
  width: 100%;
  margin-top: 0;
  text-align: left;
  border-radius: 10px;
  padding: 0.5rem 0.62rem;
}

.settings-dropdown .settings-action-btn {
  width: 100%;
}

.settings-action-btn.btn-danger {
  text-align: center;
}

.profile-menu-name {
  margin: 0 0 0.25rem;
  padding: 0.2rem 0.35rem 0.45rem;
  border-bottom: 1px solid #e3eaf5;
  color: #29415f;
  font-size: 0.86rem;
  font-weight: 700;
}

.profile-dropdown a,
.profile-dropdown button {
  width: 100%;
  margin-top: 0;
  border-radius: 10px;
  padding: 0.48rem 0.6rem;
  text-align: left;
  font-weight: 600;
}

.profile-dropdown a {
  display: block;
  border: 1px solid transparent;
  color: var(--text);
  background: #ffffff;
}

.profile-dropdown a:hover {
  background: #f2f6fd;
  text-decoration: none;
}

.profile-logout-btn {
  background: #ffffff;
  color: var(--text);
  border: 1px solid #d3deee;
}

.profile-logout-btn:hover {
  background: #f8fbff;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d2dded;
  background: #f0f5fd;
  color: #2f4867;
  border-radius: 999px;
  padding: 0.32rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Dark mode variables and helper styles */
/* Dark mode variables - true dark gray with high contrast text */
body.dark {
  --bg: #0f0f0f;
  --bg-soft: #1a1a1a;
  --surface: rgba(25, 25, 25, 0.98);
  --surface-solid: #1f1f1f;
  --surface-muted: #2a2a2a;

  --text: #f5f5f5;
  --text-soft: #e0e0e0;
  --text-muted: #b0b0b0;

  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.15);

  --primary: #64b5f6;
  --primary-2: #42a5f5;
  --primary-soft: rgba(100, 181, 246, 0.12);

  --owner-bg: #33221a;
  --owner-text: #ffb366;
  --owner-line: rgba(255, 179, 102, 0.15);

  --dev-bg: #1a2d42;
  --dev-text: #90caf9;
  --dev-line: rgba(144, 202, 249, 0.15);

  --tester-bg: #1a3333;
  --tester-text: #80d084;
  --tester-line: rgba(128, 208, 132, 0.15);

  --assigned-bg: #1a2e42;
  --assigned-line: rgba(144, 202, 249, 0.12);
}

/* Dark mode body background - true dark with subtle gradient */
body.dark {
  background:
    radial-gradient(900px 520px at 8% -15%, #1a1a1a 0%, transparent 60%),
    radial-gradient(700px 420px at 96% 10%, #161616 0%, transparent 55%),
    linear-gradient(160deg, #0f0f0f, #141414);
}

body.dark::before {
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

/* Ensure page and main content areas are dark */
body.dark .page {
  background: transparent;
}

body.dark main {
  background: transparent;
}

/* Style panels, cards, and containers */
body.dark .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}

body.dark .card-lg {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}

body.dark .modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}

body.dark .drawer {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}

/* Text elements - ensure readability */
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6 {
  color: #f5f5f5;
}

body.dark .eyebrow,
body.dark .subtitle {
  color: var(--text-soft);
}

body.dark label {
  color: var(--text);
}

/* List and grid items */
body.dark .list-stack {
  background: transparent;
}

body.dark .list-item,
body.dark .project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}

/* Tweak topbar and surface elements in dark mode */
body.dark .topbar {
  background: rgba(6, 10, 16, 0.8);
  border-bottom: 1px solid var(--line);
}

body.dark .brand-panel,
body.dark .card-lg,
body.dark .profile-dropdown,
body.dark .settings-dropdown {
  background: linear-gradient(180deg, var(--surface), var(--surface-muted));
  border: 1px solid var(--line);
}

/* Style inputs, textareas, selects in dark mode */
body.dark input,
body.dark textarea,
body.dark select {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  color: var(--text);
}

body.dark input::placeholder,
body.dark textarea::placeholder {
  color: var(--text-muted);
}

/* Style buttons in dark mode */
body.dark button {
  color: var(--text);
}

body.dark .btn-secondary {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  color: var(--text);
}

body.dark .btn-secondary:hover {
  background: var(--surface-muted);
}

/* Style panels and sections in dark mode */
body.dark .panel {
  border: 1px solid var(--line);
}

body.dark .modal-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-muted));
  border: 1px solid var(--line);
  color: var(--text);
}

body.dark .drawer {
  background: var(--surface-solid);
  border: 1px solid var(--line);
}

/* Night mode toggle inside profile dropdown */
.profile-night-toggle-btn {
  width: 100%;
  margin-top: 0.2rem;
  border-radius: 10px;
  padding: 0.48rem 0.6rem;
  text-align: left;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-night-toggle-btn:hover {
  background: var(--surface-muted);
}

.profile-night-toggle-btn:hover {
  background: var(--surface-muted);
}


.page {
  max-width: 1220px;
  margin: 1rem auto 0;
  padding: 0 1rem 2rem;
}

.page-stack {
  display: grid;
  gap: 1rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 1rem;
}

.panel {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow);
  padding: 1rem;
}

.panel h3 {
  margin: 0 0 0.6rem;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.panel-tools {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 340px);
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.filters-panel {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.75rem;
}

.projects-page .filters-panel .panel-tools {
  grid-template-columns: minmax(280px, 1.4fr) minmax(260px, 0.9fr);
  align-items: center;
}

.projects-page #projectSearch {
  width: 100%;
  max-width: none;
  min-height: 44px;
  margin-top: 0;
  border-radius: 16px;
  padding: 0.58rem 0.9rem;
  font-size: 0.94rem;
}

.projects-page .filters-panel select,
.projects-page .filters-panel button {
  min-height: 44px;
  border-radius: 16px;
}

.projects-page .filters-panel .inline-tools {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 0.6rem;
  width: 100%;
}

.projects-page .filters-panel .inline-tools .btn-secondary {
  min-width: 92px;
}

.project-view-select {
  appearance: none;
  border: 1px solid rgba(14, 116, 144, 0.2);
  width: auto;
  min-width: 260px;
  min-height: 44px;
  margin-top: 0;
  border-radius: 999px;
  padding: 0.58rem 2.3rem 0.58rem 0.95rem;
  font-weight: 800;
  color: var(--text-soft);
  background:
    linear-gradient(45deg, transparent 50%, #0e7490 50%) calc(100% - 1.08rem) 52% / 0.45rem 0.45rem no-repeat,
    linear-gradient(135deg, #0e7490 50%, transparent 50%) calc(100% - 0.78rem) 52% / 0.45rem 0.45rem no-repeat,
    radial-gradient(180px 80px at 100% 0, rgba(34, 211, 238, 0.14), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.86));
  box-shadow: 0 12px 26px rgba(15, 29, 55, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.project-view-select:hover {
  transform: translateY(-1px);
  border-color: rgba(14, 116, 144, 0.42);
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.13);
}

.project-view-select:focus {
  outline: none;
  border-color: rgba(14, 116, 144, 0.58);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14), 0 16px 34px rgba(8, 145, 178, 0.13);
}

.project-view-menu {
  position: relative;
  z-index: 24;
}

.project-view-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  width: auto;
  min-width: 245px;
  min-height: 46px;
  margin-top: 0;
  border: 1px solid rgba(14, 116, 144, 0.24);
  border-radius: 999px;
  padding: 0.56rem 0.88rem;
  background:
    radial-gradient(180px 80px at 100% 0, rgba(34, 211, 238, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 248, 252, 0.9));
  color: #12324a;
  box-shadow: 0 14px 32px rgba(8, 145, 178, 0.1);
  font-size: 0.9rem;
  font-weight: 900;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.project-view-trigger:hover,
.project-view-trigger[aria-expanded="true"] {
  transform: translateY(-1px);
  border-color: rgba(14, 116, 144, 0.5);
  box-shadow: 0 18px 42px rgba(8, 145, 178, 0.17);
}

.project-view-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.16), 0 18px 42px rgba(8, 145, 178, 0.17);
}

.project-view-dot,
.project-view-option-dot {
  flex: 0 0 auto;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: #0891b2;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.project-view-trigger[data-visibility="completed"] .project-view-dot {
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.project-view-trigger[data-visibility="archived"] .project-view-dot {
  background: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.project-view-trigger[data-visibility="all"] .project-view-dot {
  background: #64748b;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.14);
}

.project-view-chevron {
  width: 0.55rem;
  height: 0.55rem;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.72;
}

.project-view-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.55rem);
  width: min(340px, calc(100vw - 2rem));
  display: grid;
  gap: 0.35rem;
  border: 1px solid rgba(14, 116, 144, 0.22);
  border-radius: 22px;
  padding: 0.45rem;
  background:
    radial-gradient(260px 130px at 100% 0, rgba(34, 211, 238, 0.13), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 251, 0.96));
  box-shadow: 0 28px 70px rgba(15, 29, 55, 0.18);
}

.project-view-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.72rem;
  width: 100%;
  min-height: 0;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 17px;
  padding: 0.72rem;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  text-align: left;
}

.project-view-option:hover,
.project-view-option.selected {
  transform: none;
  border-color: rgba(14, 116, 144, 0.24);
  background: rgba(224, 242, 254, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.project-view-option strong,
.project-view-option small {
  display: block;
}

.project-view-option strong {
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}

.project-view-option small {
  margin-top: 0.12rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.project-view-option-dot.completed { background: #10b981; }
.project-view-option-dot.archived { background: #f97316; }
.project-view-option-dot.all { background: #64748b; }

@media (max-width: 720px) {
  .projects-page .filters-panel .panel-tools {
    grid-template-columns: 1fr;
  }

  .projects-page #projectSearch {
    min-height: 46px;
    border-radius: 18px;
    font-size: 16px;
  }

  .projects-page .filters-panel .inline-tools {
    grid-template-columns: 1fr;
  }

  .project-view-select {
    width: 100%;
    min-width: 0;
    border-radius: 18px;
    font-size: 16px;
  }

  .project-view-menu,
  .project-view-trigger {
    width: 100%;
  }

  .project-view-trigger {
    min-width: 0;
    justify-content: flex-start;
    border-radius: 18px;
    font-size: 16px;
  }

  .project-view-dropdown {
    left: 0;
    right: auto;
    width: 100%;
  }
}

.search-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.search-container input {
  flex: 1;
  margin-top: 0;
}

.inline-tools {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.inline-tools>* {
  margin-top: 0;
}

.inline-tools button {
  width: auto;
}

.inline-tools .btn-secondary {
  width: auto;
  min-width: 88px;
}

.inline-tools.end {
  justify-content: flex-end;
  width: 100%;
}

.split-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.filters-grid {
  display: grid;
  gap: 0.58rem;
  margin-bottom: 0.4rem;
}

label {
  display: block;
  margin-bottom: 0.62rem;
  font-weight: 600;
  color: #2b3d56;
}

input,
select,
button,
textarea {
  width: 100%;
  border-radius: 11px;
  font: inherit;
}

input,
select,
textarea {
  margin-top: 0.28rem;
  padding: 0.62rem 0.72rem;
  border: 1px solid #c8d5e7;
  background: #ffffff;
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.compact-input {
  padding: 0.46rem 0.66rem;
  border-radius: 10px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-2);
  box-shadow: 0 0 0 4px rgba(58, 124, 245, 0.16);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

#taskAssignees {
  min-height: 124px;
}

.assignee-field {
  margin-bottom: 0.72rem;
  border: 1px solid #d5e1f0;
  border-radius: 14px;
  padding: 0.85rem;
  background: linear-gradient(180deg, #fbfdff, #f4f8fe);
}

.assignee-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.72rem;
  font-weight: 700;
  color: #2b3d56;
}

.assignee-field-head small {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.assignee-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.assignee-chip {
  margin-top: 0;
  width: 100%;
  min-width: 0;
  padding: 0.72rem 0.8rem;
  border: 1px solid #cfdbeb;
  border-radius: 14px;
  background: #ffffff;
  text-align: left;
  color: #27405c;
  box-shadow: 0 6px 14px rgba(20, 46, 77, 0.04);
}

.assignee-chip:hover {
  background: #f6faff;
  box-shadow: 0 8px 16px rgba(20, 46, 77, 0.08);
}

.assignee-chip.selected {
  border-color: #8fb8f7;
  background: linear-gradient(180deg, #edf5ff, #e1efff);
  box-shadow: 0 10px 18px rgba(38, 90, 171, 0.12);
}

.assignee-chip-name {
  display: block;
  margin-bottom: 0.14rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.assignee-chip small {
  display: block;
  color: #61758f;
  font-size: 0.76rem;
  font-weight: 600;
}

button {
  margin-top: 0.4rem;
  border: 1px solid transparent;
  padding: 0.68rem 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

button:hover {
  transform: translateY(-1px);
  filter: saturate(1.06);
  box-shadow: 0 8px 18px rgba(30, 79, 166, 0.24);
}

button:active {
  transform: translateY(0);
}

.btn-secondary {
  width: auto;
  background: #ffffff;
  color: var(--text);
  border-color: #c7d2e2;
  box-shadow: none;
}

.btn-danger {
  width: auto;
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  color: #ffffff;
  border-color: #991b1b;
}

.btn-danger:hover {
  box-shadow: 0 8px 20px rgba(153, 27, 27, 0.32);
}

.notify-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
}

.icon-bell::before {
  content: "\1F514";
  font-size: 1.02rem;
  line-height: 1;
}

.icon-gear::before {
  content: "\2699";
  font-size: 1.08rem;
  line-height: 1;
}

.icon-filter::before {
  content: "\1F50E";
  font-size: 0.98rem;
  line-height: 1;
}

.icon-back::before {
  content: "\2190";
  font-size: 0.98rem;
  line-height: 1;
}

.notify-btn.icon-btn .notif-count {
  position: absolute;
  top: -0.16rem;
  right: -0.15rem;
}

.notif-count {
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary:hover {
  background: #f2f6fd;
  box-shadow: none;
  transform: none;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.2rem;
}

.project-card {
  border: 1px solid #ccd8e8;
  border-radius: var(--radius);
  padding: 1.4rem;
  background:
    linear-gradient(165deg,
      hsl(var(--project-h, 210) 82% var(--project-la, 96%) / 0.56),
      hsl(var(--project-h, 210) 86% var(--project-lb, 99%) / 0.7));
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.project-card strong {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.project-card small {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.project-desc {
  margin: 0.8rem 0 1rem;
  color: var(--text-muted);
  flex-grow: 1;
  line-height: 1.6;
}

.projects-page {
  max-width: 1400px;
}

.project-grid-spacious {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.project-card-spacious {
  background:
    radial-gradient(160% 120% at 100% 0, hsl(var(--project-h, 214) 84% 76% / 0.16), transparent 48%),
    linear-gradient(180deg,
      hsl(var(--project-h, 214) 84% var(--project-la, 96%) / 0.72),
      hsl(var(--project-h, 214) 84% var(--project-lb, 99%) / 0.84));
  box-shadow: 0 12px 26px rgba(31, 57, 92, 0.12);
}

.project-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: auto;
}

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.project-role {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.52rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #123f76;
  background: #ddeeff;
}

.role-pill {
  border: 1px solid transparent;
}

.role-product-owner {
  background: #fde68a;
  color: #7a4a00;
  border-color: #f6c453;
}

.role-developer {
  background: #dbeafe;
  color: #1d4e89;
  border-color: #99c2ff;
}

.role-tester {
  background: #dcfce7;
  color: #17603a;
  border-color: #93e5b3;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.62rem;
  margin-bottom: 0.75rem;
}

.metric-card {
  border: 1px solid #d5e0ef;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.58rem 0.7rem;
}

.metric-card span {
  display: block;
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-bottom: 0.22rem;
}

.metric-card strong {
  display: block;
  font-size: 1.16rem;
}

.board-page {
  max-width: 1500px;
}

.board-shell {
  display: block;
}

.board-main {
  min-width: 0;
}

.board-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
}

.board-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.72rem;
}

.board-toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mobile-status-tabs {
  display: none;
}

.board-filter-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
}

.icon-inline-btn {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.icon-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.tool-drawer {
  border: 1px solid #d5dfed;
  border-radius: 12px;
  background: #f8fbff;
  margin-bottom: 0.75rem;
}

.tool-drawer summary {
  list-style: none;
  cursor: pointer;
  padding: 0.62rem 0.72rem;
  font-weight: 700;
  color: #29425f;
}

.tool-drawer summary::-webkit-details-marker {
  display: none;
}

.tool-drawer summary::after {
  content: "+";
  float: right;
  color: #5b6f8a;
}

.tool-drawer[open] summary::after {
  content: "-";
}

.tool-drawer-body {
  padding: 0 0.72rem 0.72rem;
}

.board-controls {
  margin-bottom: 0;
}

.metric-strip {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.board-wrap {
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: 0.85rem;
  min-width: 1160px;
}

.message-panel {
  border: 1px solid #d5dfed;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 0.8rem;
}

.message-panel textarea {
  min-height: 78px;
}

.message-list {
  max-height: 420px;
  overflow-y: auto;
  display: grid;
  gap: 0.55rem;
  padding: 0.25rem;
  border: 1px solid #d4deed;
  border-radius: 12px;
  background: #f8fbff;
  margin-bottom: 0.7rem;
}

.message-item {
  border: 1px solid #d4deed;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.55rem 0.65rem;
}

.message-item.mine {
  border-color: #bbd3fb;
  background: #eaf2ff;
}

.message-head {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 0.35rem;
}

.message-head strong {
  font-size: 0.92rem;
}

.message-head small {
  color: var(--text-muted);
  font-size: 0.79rem;
}

.message-item p {
  margin: 0;
  color: #24384f;
  line-height: 1.45;
}

.column {
  border-radius: var(--radius);
  border: 1px solid #d5e0ef;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 0.72rem;
  min-height: 260px;
}

.column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.72rem;
  border-bottom: 1px solid #e0e8f3;
  padding-bottom: 0.52rem;
}

.column-head-main {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.column-collapse-btn {
  width: auto;
  min-width: 70px;
  margin-top: 0;
  padding: 0.4rem 0.65rem;
  font-size: 0.78rem;
}

.column-collapsed .column-head {
  margin-bottom: 0;
  border-bottom-style: dashed;
}

.column h4 {
  margin: 0;
  font-size: 0.89rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  padding: 0.17rem 0.46rem;
  border-radius: 999px;
  background: #edf2fb;
  color: #40556f;
}

.task-card {
  border: 1px solid #d9e3f1;
  border-radius: 14px;
  padding: 0.68rem;
  margin-bottom: 0.6rem;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(16, 42, 74, 0.06);
  position: relative;
}

.task-card-assigned {
  border-color: #a9c8f5;
  background:
    radial-gradient(140% 120% at 100% 0, rgba(126, 177, 245, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(235, 244, 255, 0.96), rgba(247, 251, 255, 0.98));
  box-shadow: 0 10px 22px rgba(44, 98, 177, 0.12);
}

.task-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.task-card strong {
  display: block;
  margin-bottom: 0.22rem;
}

.task-desc {
  margin: 0.24rem 0 0.35rem;
  color: #4e627a;
  font-size: 0.88rem;
  line-height: 1.4;
}

.task-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-bottom: 0.35rem;
}

.task-meta-pill {
  border: 1px solid #d7e3f5;
  border-radius: 999px;
  background: #f5f9ff;
  color: #315277;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.16rem 0.48rem;
}

.task-sub {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 0.16rem;
}

.task-assigned-tag {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.35rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(49, 103, 182, 0.12);
  color: #28518e;
  font-size: 0.74rem;
  font-weight: 700;
}

.task-working-pill {
  display: block;
  margin-bottom: 0.25rem;
  color: #2b5f9c;
  font-size: 0.76rem;
  font-weight: 700;
}

.task-activity-btn {
  margin-top: 0;
  margin-bottom: 0.35rem;
  background: #f4f8ff;
  color: #315a92;
  border-color: #c7d9f7;
}

.task-activity-btn.active {
  background: linear-gradient(180deg, #e6f1ff, #d9eaff);
  border-color: #92b8f4;
  color: #1d4f90;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #31475f;
  font-weight: 600;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.compact-toggle {
  margin-bottom: 0.4rem;
}

.task-card button {
  margin-top: 0.42rem;
  padding: 0.52rem 0.64rem;
  font-size: 0.82rem;
}

.task-settings {
  position: relative;
  flex: 0 0 auto;
}

.task-settings-trigger {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  margin-top: 0;
  border-radius: 10px;
}

.task-settings-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 5;
  min-width: 150px;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid #d3deee;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 28px rgba(17, 41, 70, 0.16);
  display: grid;
  gap: 0.3rem;
}

.task-settings-menu button {
  width: 100%;
  margin-top: 0;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 16, 31, 0.45);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 1rem;
}

.modal-card {
  width: min(560px, 95vw);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid #d2ddec;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(17, 40, 74, 0.24);
  padding: 1rem;
}

.modal-card.modal-lg {
  width: min(760px, 95vw);
}

.delete-project-modal {
  border: 1px solid #f4b4b4;
  box-shadow: 0 26px 46px rgba(89, 18, 18, 0.28);
}

.delete-project-warning {
  margin: 0.2rem 0 0.6rem;
  color: #b91c1c;
  font-size: 1.22rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-card.modal-xl {
  width: min(1020px, 96vw);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.modal-close {
  min-width: 84px;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 16, 31, 0.4);
  z-index: 60;
  display: flex;
  justify-content: flex-end;
}

.drawer {
  width: min(460px, 100vw);
  height: 100%;
  background: #f7fbff;
  border-left: 1px solid #c9d7ea;
  box-shadow: -18px 0 36px rgba(21, 45, 79, 0.16);
  padding: 1rem 0.95rem;
  overflow-y: auto;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.drawer-head h3 {
  margin: 0;
}

.drawer-section {
  margin-bottom: 0.9rem;
}

.drawer-section h4 {
  margin: 0 0 0.52rem;
}

.list-stack {
  display: grid;
  gap: 0.55rem;
}

.notify-item {
  border: 1px solid #d5e0ef;
  border-radius: 12px;
  padding: 0.62rem;
  background: #ffffff;
}

.notify-item p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.notify-item strong {
  display: block;
}

.notify-item small {
  display: block;
  color: var(--text-muted);
  margin-top: 0.18rem;
}

.team-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.member-row {
  border: 1px solid #d5e0ef;
  border-radius: 12px;
  padding: 0.62rem;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
}

.member-row small {
  display: block;
  color: var(--text-muted);
}

.member-role-select {
  min-width: 180px;
}

.info-block {
  border: 1px dashed #b7c8e2;
  border-radius: 12px;
  background: #f4f8ff;
  color: #355070;
  padding: 0.6rem 0.66rem;
  margin-bottom: 0.6rem;
}

.success {
  margin: 0.5rem 0 0;
  color: #0f766e;
  font-weight: 700;
}

.profile-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: start;
}

.profile-identity h3 {
  margin: 0.2rem 0 0.35rem;
}

.profile-identity-wrap {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.profile-headline {
  margin: 0;
  color: #2b4c76;
  font-weight: 600;
}

.profile-stats {
  display: grid;
  gap: 0.6rem;
}

.profile-bio,
.profile-expertise {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.comment-card {
  border: 1px solid #d5e0ef;
  border-radius: 12px;
  padding: 0.65rem;
  background: #ffffff;
}

.comment-card p {
  margin: 0.42rem 0 0;
  color: #2e4665;
}

.comment-card small {
  display: block;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c7d2e2;
  border-radius: 10px;
  padding: 0.45rem 0.72rem;
  background: #ffffff;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.btn-link:hover {
  background: #f2f6fd;
  text-decoration: none;
}

.avatar-shell {
  position: relative;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #cdd8ea;
  background: #eef4ff;
  flex-shrink: 0;
}

.avatar-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-lg {
  width: 96px;
  height: 96px;
}

.avatar-sm {
  width: 36px;
  height: 36px;
}

.avatar-xl {
  width: 132px;
  height: 132px;
}

.top-avatar {
  border-color: #bfd0e9;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #27456d;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #dce9ff, #cce0ff);
}

.avatar-editor {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.avatar-controls {
  flex: 1;
  min-width: 240px;
}

.subtitle.compact {
  margin-bottom: 0.45rem;
}

.avatar-pickable {
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.avatar-pickable:hover {
  transform: translateY(-1px);
  border-color: #3a7cf5;
  box-shadow: 0 10px 24px rgba(35, 86, 172, 0.22);
}

.avatar-pickable:focus-visible {
  outline: none;
  border-color: #3a7cf5;
  box-shadow: 0 0 0 4px rgba(58, 124, 245, 0.22);
}

.avatar-pickable.uploading {
  cursor: progress;
  opacity: 0.86;
}

.empty {
  margin: 0;
  color: var(--text-muted);
  font-style: italic;
}

.status-todo .column-head {
  border-bottom-color: #dbe7ff;
}

.status-in_progress .column-head {
  border-bottom-color: #d8ecff;
}

.status-review .column-head {
  border-bottom-color: #e6defe;
}

.status-test .column-head {
  border-bottom-color: #d8f4ed;
}

.status-done .column-head {
  border-bottom-color: #d8efd9;
}

.error {
  color: var(--danger);
  margin: 0.7rem 0 0;
  font-weight: 600;
}

.chat-fab-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  width: auto;
  min-width: 120px;
  border-radius: 999px;
  padding: 0.74rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  box-shadow: 0 14px 30px rgba(21, 54, 101, 0.3);
}

.chat-fab-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: #86efac;
  box-shadow: 0 0 0 4px rgba(134, 239, 172, 0.25);
}

.chat-popup {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 85;
  width: min(800px, calc(100vw - 2rem));
  height: min(72vh, 620px);
  border-radius: 18px;
  border: 1px solid #d3deee;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 20px 48px rgba(13, 34, 65, 0.28);
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  overflow: hidden;
}

.chat-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid #d9e3f2;
  background: rgba(247, 251, 255, 0.95);
}

.chat-popup-head h3 {
  margin: 0;
  font-size: 1rem;
}

.chat-popup-head .eyebrow {
  margin-bottom: 0.16rem;
}

.chat-tabs {
  display: inline-flex;
  gap: 0.45rem;
  padding: 0.66rem 0.85rem 0.2rem;
}

.chat-tab {
  width: auto;
  margin-top: 0;
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  background: #edf3fd;
  color: #345274;
  border: 1px solid transparent;
  font-size: 0.84rem;
}

.chat-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #ffffff;
}

.chat-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  padding: 0.5rem 0.85rem 0.7rem;
  border-bottom: 1px solid #d9e3f2;
}

.chat-tools input {
  margin-top: 0;
}

.chat-direct-start {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.chat-direct-start select {
  min-width: 240px;
  margin-top: 0;
}

.chat-direct-start button {
  width: auto;
  margin-top: 0;
}

.chat-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.chat-conversation-list {
  border-right: 1px solid #d9e3f2;
  background: #f6f9ff;
  padding: 0.55rem;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 0.42rem;
}

.chat-conversation-item {
  margin-top: 0;
  width: 100%;
  text-align: left;
  border-radius: 12px;
  border: 1px solid #d6e2f2;
  background: #ffffff;
  color: var(--text);
  box-shadow: none;
  transform: none;
  padding: 0.48rem 0.56rem;
}

.chat-conversation-main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.chat-conversation-avatar {
  width: 34px;
  height: 34px;
}

.chat-conversation-avatar-project .avatar-fallback {
  background: linear-gradient(135deg, #cfe3ff, #bfd9ff);
  color: #234a77;
}

.chat-conversation-copy {
  min-width: 0;
  flex: 1;
}

.chat-conversation-item:hover {
  background: #f3f8ff;
  transform: none;
  box-shadow: none;
}

.chat-conversation-item.selected {
  border-color: #9ec0f9;
  background: #eaf3ff;
}

.chat-conversation-item strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.16rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conversation-item small {
  display: block;
  color: #5b6f8a;
  font-size: 0.75rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-thread {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  padding: 0.62rem 0.75rem 0.7rem;
}

.chat-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #dce6f3;
}

.chat-thread-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #2e4b71;
}

.chat-view-profile-link {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 96px;
  text-align: center;
  text-decoration: none;
}

.chat-view-profile-link:hover {
  text-decoration: none;
}

.chat-thread-messages {
  overflow-y: auto;
  padding: 0.65rem 0.15rem 0.35rem;
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.chat-message {
  border: 1px solid #d8e3f2;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.45rem 0.58rem;
  max-width: 88%;
}

.chat-message.mine {
  margin-left: auto;
  border-color: #bcd4fb;
  background: #eaf3ff;
}

.chat-message small {
  display: block;
  color: #5d718e;
  font-size: 0.74rem;
  margin-bottom: 0.16rem;
}

.chat-message p {
  margin: 0;
  color: #1d3047;
  line-height: 1.38;
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: end;
  padding-top: 0.5rem;
}

.chat-compose textarea {
  min-height: 68px;
  margin-top: 0;
}

.chat-compose button {
  width: auto;
  margin-top: 0;
  min-width: 88px;
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .page,
  .board-page {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .team-layout {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }

  .profile-identity-wrap {
    align-items: flex-start;
  }

  .project-grid,
  .project-grid-spacious {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .board-shell {
    display: block;
  }

  .board {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .metric-strip {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .chat-popup {
    width: min(700px, calc(100vw - 1rem));
    right: 0.5rem;
    bottom: 0.5rem;
  }

  .chat-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .chat-direct-start select {
    min-width: 0;
    width: 180px;
  }
}

@media (max-width: 800px) {
  .auth-wrap {
    padding: 0.95rem;
    place-items: start center;
  }

  .auth-shell {
    width: min(100%, 680px);
    gap: 0.85rem;
  }

  .brand-panel,
  .card-lg {
    width: 100%;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.9rem 1rem;
  }

  .topbar>div:last-child {
    width: 100%;
    display: flex;
    gap: 0.6rem;
  }

  .topbar>div:last-child button {
    width: auto;
  }

  .topbar h2 {
    overflow-wrap: anywhere;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .top-sub-actions {
    width: 100%;
  }

  .top-actions a.btn-link {
    margin-right: auto;
  }

  .profile-dropdown,
  .settings-dropdown {
    right: 0;
    left: auto;
    max-width: min(320px, calc(100vw - 2rem));
  }

  .board {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .panel-tools,
  .form-grid,
  .inline-tools {
    grid-template-columns: 1fr;
  }

  .inline-tools {
    display: grid;
  }

  .panel-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .page,
  .board-page {
    margin-top: 0.8rem;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .project-grid,
  .project-grid-spacious {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .project-card,
  .project-card-spacious {
    padding: 1.05rem;
  }

  .project-head,
  .project-meta-row {
    align-items: flex-start;
  }

  .board-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .board-subnav {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .board-subnav .settings-menu {
    align-self: flex-end;
  }

  .board-toolbar {
    justify-content: flex-start;
    width: 100%;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .modal-overlay {
    place-items: end center;
    padding: 0.6rem;
  }

  .modal-card,
  .modal-card.modal-lg,
  .modal-card.modal-xl {
    width: min(100%, 720px);
    max-height: 90vh;
    overflow-y: auto;
  }

  .chat-fab-btn {
    right: 0.7rem;
    bottom: 0.7rem;
  }

  .chat-popup {
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .chat-tools {
    grid-template-columns: 1fr;
  }

  .chat-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 180px 1fr;
  }

  .chat-conversation-list {
    border-right: none;
    border-bottom: 1px solid #d9e3f2;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .chat-message {
    max-width: 94%;
  }

  .drawer {
    width: 100%;
  }

  .member-row {
    flex-direction: column;
    align-items: stretch;
  }

  .member-role-select {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  body {
    background:
      radial-gradient(560px 300px at 12% -5%, #dde9ff 0%, transparent 62%),
      radial-gradient(480px 260px at 92% 8%, #daf2ff 0%, transparent 58%),
      linear-gradient(180deg, #f4f8fd 0%, #eef4fb 100%);
  }

  .topbar {
    gap: 0.75rem;
    padding: calc(0.7rem + env(safe-area-inset-top)) 0.85rem 0.8rem;
    background: rgba(244, 248, 253, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(201, 215, 234, 0.88);
  }

  .topbar h2 {
    font-size: 1.06rem;
    line-height: 1.15;
  }

  .topbar .eyebrow {
    font-size: 0.69rem;
    letter-spacing: 0.11em;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
  }

  .top-actions a,
  .top-actions .btn-link {
    min-height: 42px;
    padding: 0.58rem 0.72rem;
    border-radius: 12px;
    font-size: 0.9rem;
  }

  .page,
  .board-page {
    margin-top: 0.7rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }

  .page-stack {
    gap: 0.75rem;
  }

  .panel {
    padding: 0.92rem 0.88rem;
    border-radius: 18px;
  }

  .panel h3 {
    font-size: 1.02rem;
    margin-bottom: 0.45rem;
  }

  .subtitle {
    line-height: 1.45;
  }

  .panel-title-row {
    margin-bottom: 0.6rem;
  }

  .filters-panel,
  .drawer-section,
  .list-stack {
    gap: 0.65rem;
  }

  .project-grid,
  .project-grid-spacious {
    gap: 0.85rem;
  }

  .project-card,
  .project-card-spacious {
    border-radius: 18px;
    min-height: 0;
  }

  .project-card strong,
  .project-card-spacious strong {
    font-size: 1.08rem;
  }

  .project-desc {
    margin-bottom: 0.85rem;
    line-height: 1.5;
  }

  .project-meta-row {
    gap: 0.32rem 0.45rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .notify-item,
  .member-row,
  .comment-card {
    border-radius: 14px;
    padding: 0.72rem;
  }

  .profile-hero {
    gap: 0.8rem;
  }

  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .avatar-editor {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .avatar-controls {
    width: 100%;
  }

  .assignee-field-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .modal-overlay {
    padding: 0.4rem;
    align-items: end;
  }

  .modal-card,
  .modal-card.modal-lg,
  .modal-card.modal-xl {
    width: 100%;
    max-height: min(92dvh, 92vh);
    border-radius: 20px 20px 0 0;
    padding: 0.95rem 0.9rem calc(1rem + env(safe-area-inset-bottom));
  }

  .modal-head {
    position: sticky;
    top: -0.95rem;
    z-index: 2;
    padding-top: 0.95rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94));
    backdrop-filter: blur(10px);
  }

  .drawer-overlay {
    align-items: end;
    justify-content: stretch;
  }

  .drawer {
    width: 100%;
    height: min(84dvh, 84vh);
    border-left: none;
    border-top: 1px solid #c9d7ea;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 36px rgba(21, 45, 79, 0.18);
    padding: 0.9rem 0.85rem calc(1rem + env(safe-area-inset-bottom));
  }

  .drawer-head {
    position: sticky;
    top: -0.9rem;
    z-index: 2;
    padding-top: 0.9rem;
    background: linear-gradient(180deg, rgba(247, 251, 255, 0.98), rgba(247, 251, 255, 0.9));
  }

  .chat-fab-btn {
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    min-height: 48px;
    border-radius: 16px;
    padding: 0.7rem 0.95rem;
    box-shadow: 0 16px 28px rgba(18, 43, 73, 0.18);
  }

  .chat-popup {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .chat-popup-head {
    padding-top: calc(0.75rem + env(safe-area-inset-top));
  }

  .chat-tabs {
    padding-top: 0.55rem;
  }

  .chat-tab {
    min-height: 40px;
    padding: 0.5rem 0.8rem;
  }

  .chat-thread-messages {
    padding-bottom: 0.7rem;
  }

  .chat-compose textarea {
    min-height: 56px;
    max-height: 120px;
  }

  .profile-dropdown,
  .settings-dropdown {
    width: min(340px, calc(100vw - 1.2rem));
    max-height: min(70dvh, 420px);
    overflow-y: auto;
  }
}

@media (max-width: 640px) {
  .board-shell {
    padding: 0.85rem 0.74rem;
  }

  .auth-wrap {
    padding: calc(0.55rem + env(safe-area-inset-top)) 0.65rem 0.7rem;
  }

  .brand-panel {
    padding: 1rem 0.95rem;
    border-radius: 18px;
  }

  .feature-list {
    display: none;
  }

  .card-lg,
  .panel {
    padding: 1rem 0.9rem;
    border-radius: 16px;
  }

  .topbar {
    padding: 0.8rem;
    gap: 0.7rem;
  }

  .top-title-block,
  .topbar>div:first-child {
    width: 100%;
  }

  .top-actions {
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .topbar>div:last-child {
    gap: 0.45rem;
    flex-wrap: nowrap;
    align-items: center;
  }

  .page,
  .board-page {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    padding-bottom: 1.4rem;
  }

  .panel-title-row,
  .board-subnav,
  .board-heading {
    gap: 0.55rem;
  }

  .board-heading {
    margin-bottom: 0.7rem;
  }

  .panel-title-row button,
  .board-subnav .btn-link,
  .board-toolbar button,
  .board-toolbar a {
    width: 100%;
    justify-content: center;
  }

  .projects-page .panel-title-row>button,
  .projects-page #toggleFiltersBtn {
    min-height: 46px;
  }

  .projects-page .panel .panel-title-row+div {
    width: 100%;
  }

  .board-subnav .settings-menu {
    align-self: stretch;
  }

  .settings-menu .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .metric-strip {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }

  .mobile-status-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(112px, 1fr);
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.15rem 0.05rem 0.35rem;
    margin: 0 0 0.55rem;
    scrollbar-width: none;
  }

  .mobile-status-tabs::-webkit-scrollbar {
    display: none;
  }

  .mobile-status-tab {
    margin-top: 0;
    min-width: 0;
    border: 1px solid #d6e1f0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    padding: 0.62rem 0.72rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    color: #3a5271;
    box-shadow: 0 8px 18px rgba(18, 41, 70, 0.06);
    white-space: nowrap;
  }

  .mobile-status-tab span {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .mobile-status-tab strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: #edf4ff;
    color: #23529b;
    font-size: 0.82rem;
  }

  .mobile-status-tab.selected {
    border-color: #8cb5f7;
    background: linear-gradient(180deg, #eef5ff, #e2efff);
    color: #173c74;
    box-shadow: 0 10px 20px rgba(29, 78, 168, 0.14);
  }

  .mobile-status-tab.selected strong {
    background: #cfe1ff;
  }

  .metric-card {
    padding: 0.6rem;
  }

  .metric-card strong {
    font-size: 1.04rem;
  }

  .board-wrap {
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 0.55rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .board-wrap::-webkit-scrollbar {
    display: none;
  }

  .board {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(84vw, 84vw);
    min-width: max-content;
    gap: 0.75rem;
  }

  .column {
    padding: 0.8rem;
    min-height: calc(100dvh - 21rem);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .column-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .column-collapse-btn {
    min-width: 64px;
  }

  .task-card {
    padding: 0.75rem;
  }

  .task-card-top {
    gap: 0.35rem;
  }

  .task-actions,
  .inline-tools {
    display: grid;
    grid-template-columns: 1fr;
  }

  .task-actions button,
  .task-actions a,
  .inline-tools button,
  .inline-tools a {
    width: 100%;
    justify-content: center;
  }

  .task-activity-btn {
    width: 100%;
  }

  .projects-page .inline-tools,
  .profile-hero .inline-tools {
    gap: 0.55rem;
  }

  .modal-overlay {
    padding: 0.45rem;
  }

  .modal-card,
  .modal-card.modal-lg,
  .modal-card.modal-xl {
    width: 100%;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
  }

  .modal-head {
    align-items: flex-start;
  }

  .profile-dropdown,
  .settings-dropdown {
    left: 0.65rem;
    right: 0.65rem;
    width: auto;
  }

  .drawer {
    padding: 0.9rem;
  }

  .profile-identity-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-identity h3 {
    font-size: 1.28rem;
  }

  .profile-headline {
    line-height: 1.45;
  }

  .profile-stats {
    grid-template-columns: 1fr 1fr;
  }

  .profile-bio,
  .profile-expertise {
    font-size: 0.95rem;
  }

  .avatar-editor {
    gap: 0.75rem;
  }

  .avatar-pickable {
    margin-inline: auto;
  }

  .avatar-xl {
    width: 104px;
    height: 104px;
  }

  .chat-popup-head {
    padding: 0.7rem 0.75rem;
  }

  .assignee-picker {
    grid-template-columns: 1fr;
  }

  .chat-layout {
    grid-template-rows: 160px minmax(0, 1fr);
  }

  .chat-conversation-list {
    grid-auto-columns: minmax(200px, 82vw);
    padding: 0.5rem;
    gap: 0.45rem;
  }

  .chat-conversation-item {
    min-width: 0;
  }

  .chat-tools {
    padding: 0.55rem 0.7rem 0.25rem;
    gap: 0.5rem;
  }

  .chat-direct-start {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .chat-direct-start select,
  .chat-direct-start button {
    width: 100%;
  }

  .chat-thread {
    padding: 0.7rem;
  }

  .chat-thread-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .chat-thread-title {
    font-size: 0.96rem;
  }

  .chat-view-profile-link {
    width: 100%;
  }

  .chat-compose {
    grid-template-columns: 1fr;
  }

  .chat-compose button {
    width: 100%;
  }

  .notify-item .inline-tools,
  .member-row .inline-tools {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {

  .auth-wrap,
  .page,
  .board-page {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .topbar {
    padding: 0.7rem;
  }

  .topbar h2 {
    font-size: 1rem;
  }

  .top-actions a,
  .top-actions .btn-link {
    min-height: 40px;
    padding-inline: 0.62rem;
    font-size: 0.86rem;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .profile-stats {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card-spacious,
  .column,
  .task-card {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .chat-conversation-list {
    grid-auto-columns: minmax(190px, 84vw);
  }

  .board {
    grid-auto-columns: minmax(88vw, 88vw);
  }

  .assignee-chip {
    padding: 0.68rem 0.72rem;
  }

  .modal-card,
  .modal-card.modal-lg,
  .modal-card.modal-xl,
  .drawer {
    border-radius: 18px 18px 0 0;
  }
}

@media (max-width: 360px) {

  .page,
  .board-page,
  .auth-wrap {
    padding-left: 0.42rem;
    padding-right: 0.42rem;
  }

  .panel,
  .card-lg,
  .brand-panel {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .topbar {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .board {
    grid-auto-columns: minmax(90vw, 90vw);
  }
}

/* SprintTeam redesign v2: refined product UI with motion */
:root {
  --bg-0: #eef4f8;
  --bg-1: #e7eff7;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-soft: rgba(247, 250, 253, 0.82);
  --text: #101827;
  --text-muted: #627189;
  --line: rgba(134, 153, 181, 0.34);
  --primary: #075985;
  --primary-2: #0e7490;
  --accent-cyan: #22d3ee;
  --accent-gold: #f59e0b;
  --danger: #b42338;
  --shadow: 0 24px 70px rgba(15, 29, 55, 0.14);
  --shadow-soft: 0 12px 32px rgba(15, 29, 55, 0.08);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  background:
    radial-gradient(800px 460px at 6% -8%, rgba(34, 211, 238, 0.2), transparent 60%),
    radial-gradient(760px 460px at 104% 4%, rgba(14, 116, 144, 0.2), transparent 56%),
    radial-gradient(680px 420px at 52% 106%, rgba(245, 158, 11, 0.1), transparent 60%),
    linear-gradient(145deg, #f8fbfd 0%, #eef5f8 46%, #e7eff7 100%);
}

body::before {
  opacity: 0.8;
  background-image:
    linear-gradient(rgba(16, 24, 39, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 39, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
}

body::after {
  content: "";
  position: fixed;
  inset: auto -14rem -18rem auto;
  width: 38rem;
  height: 38rem;
  pointer-events: none;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 62%);
  filter: blur(4px);
  animation: ambient-orb 12s ease-in-out infinite alternate;
}

@keyframes ambient-orb {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(-3rem, -2rem, 0) scale(1.08);
  }
}

.topbar {
  top: 0.75rem;
  width: min(1500px, calc(100% - 1.5rem));
  margin: 0.75rem auto 0;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 44px rgba(15, 29, 55, 0.1);
  backdrop-filter: blur(22px) saturate(1.2);
}

.topbar::before {
  content: "";
  width: 0.7rem;
  height: 2.7rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--primary-2));
  box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.1);
}

.topbar h2,
.panel h3,
.card-lg h1,
.card-lg h2,
.profile-identity h3 {
  letter-spacing: -0.045em;
}

.eyebrow {
  color: #64748b;
  letter-spacing: 0.14em;
}

.subtitle {
  color: #66758d;
}

.auth-shell {
  width: min(1120px, 96vw);
  gap: 1.2rem;
}

.brand-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 32px;
  padding: clamp(1.45rem, 3vw, 2.5rem);
  background:
    linear-gradient(135deg, rgba(8, 47, 73, 0.98), rgba(21, 94, 117, 0.95) 58%, rgba(14, 116, 144, 0.9)),
    radial-gradient(420px 220px at 92% 4%, rgba(255, 255, 255, 0.24), transparent 62%);
  box-shadow: 0 32px 90px rgba(8, 47, 73, 0.3);
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 1rem;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  mask-image: linear-gradient(135deg, black, transparent 58%);
}

.brand-panel::after {
  content: "";
  position: absolute;
  right: -4rem;
  bottom: -3rem;
  z-index: -1;
  width: 20rem;
  height: 20rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 32%, rgba(255, 255, 255, 0.26), transparent 18%),
    radial-gradient(circle, rgba(34, 211, 238, 0.28), transparent 62%);
}

.brand-panel h1 {
  max-width: 8ch;
  font-size: clamp(2.5rem, 5.2vw, 4.4rem);
  line-height: 0.92;
  letter-spacing: -0.085em;
}

.feature-list {
  display: grid;
  gap: 0.72rem;
  margin-top: 1.4rem;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin: 0;
}

.feature-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 0.66rem;
  height: 0.66rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #67e8f9, #fef3c7);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.1);
}

.card-lg,
.panel,
.modal-card,
.drawer,
.chat-popup,
.profile-dropdown,
.settings-dropdown {
  border: 1px solid rgba(148, 163, 184, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 253, 0.86));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card-lg,
.panel {
  border-radius: var(--radius);
}

.card-lg {
  padding: clamp(1.25rem, 2vw, 1.9rem);
}

label {
  color: #243348;
}

input,
select,
textarea {
  border-color: rgba(126, 147, 176, 0.42);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(14, 116, 144, 0.5);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-2);
  box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.16);
}

button,
.btn-link,
.top-actions a {
  border-radius: 999px;
}

button {
  position: relative;
  background:
    linear-gradient(135deg, #0f766e, #0e7490 52%, #0891b2);
  box-shadow: 0 14px 28px rgba(14, 116, 144, 0.22);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(14, 116, 144, 0.27);
}

.btn-secondary,
.top-actions a,
.profile-trigger {
  border-color: rgba(126, 147, 176, 0.42);
  background: rgba(255, 255, 255, 0.78);
  color: #203047;
  box-shadow: 0 10px 22px rgba(15, 29, 55, 0.06);
}

.btn-secondary:hover,
.top-actions a:hover,
.profile-trigger:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 29, 55, 0.1);
}

.btn-danger {
  background: linear-gradient(135deg, #9f1239, #e11d48);
  box-shadow: 0 14px 30px rgba(190, 18, 60, 0.24);
}

.page {
  max-width: 1320px;
  margin-top: 1.05rem;
}

.projects-page,
.board-page {
  max-width: 1520px;
}

.panel {
  position: relative;
  overflow: visible;
  padding: clamp(1rem, 2vw, 1.4rem);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), transparent 38%);
  opacity: 0.8;
}

.panel>* {
  position: relative;
}

.panel-title-row {
  align-items: center;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.filters-panel {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(241, 247, 250, 0.72);
  padding: 0.85rem;
  animation: slide-soft 180ms ease both;
}

.project-grid-spacious {
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.35rem;
}

.project-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 330px;
  padding: 1.55rem;
  border-color: rgba(126, 147, 176, 0.34);
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
  transform-style: preserve-3d;
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.36rem;
  background: linear-gradient(90deg, hsl(var(--project-h, 202) 75% 42%), hsl(var(--project-h, 202) 86% 72%));
}

.project-card::after {
  content: "";
  position: absolute;
  right: -3rem;
  top: -3rem;
  z-index: -1;
  width: 12rem;
  height: 12rem;
  border-radius: 999px;
  background: hsl(var(--project-h, 202) 85% 64% / 0.16);
  filter: blur(1px);
}

.project-card:hover {
  transform: perspective(900px) rotateX(1.2deg) rotateY(-1.5deg) translateY(-5px);
  border-color: rgba(14, 116, 144, 0.34);
  box-shadow: 0 28px 70px rgba(15, 29, 55, 0.16);
}

.project-state-active:hover {
  border-color: rgba(14, 116, 144, 0.44);
  box-shadow: 0 30px 78px rgba(8, 145, 178, 0.2);
}

.project-state-completed {
  border-color: rgba(16, 185, 129, 0.42);
}

.project-state-completed::before {
  background: linear-gradient(90deg, #059669, #34d399);
}

.project-state-completed::after {
  background: rgba(16, 185, 129, 0.18);
}

.project-state-completed:hover {
  border-color: rgba(5, 150, 105, 0.58);
  box-shadow: 0 30px 78px rgba(5, 150, 105, 0.2);
}

.project-state-archived {
  border-color: rgba(100, 116, 139, 0.42);
}

.project-state-archived::before {
  background: linear-gradient(90deg, #64748b, #94a3b8);
}

.project-state-archived::after {
  background: rgba(100, 116, 139, 0.16);
}

.project-state-archived:hover {
  border-color: rgba(249, 115, 22, 0.48);
  box-shadow: 0 30px 78px rgba(249, 115, 22, 0.17);
}

.project-card strong {
  max-width: 18ch;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.05em;
}

.project-desc {
  font-size: 0.98rem;
  color: #536579;
}

.project-meta-row small {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  background: rgba(255, 255, 255, 0.58);
}

.role-pill {
  border-radius: 999px;
  padding: 0.34rem 0.72rem;
  font-size: 0.74rem;
  letter-spacing: 0.025em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.role-product-owner {
  background: linear-gradient(180deg, #fff7d6, #ffe8a3);
  color: #744707;
  border-color: #e9b949;
}

.role-developer {
  background: linear-gradient(180deg, #e7f7ff, #c9eff8);
  color: #075985;
  border-color: #67d5ef;
}

.role-tester {
  background: linear-gradient(180deg, #e8fff3, #c9f7df);
  color: #0f6a45;
  border-color: #8ee8b4;
}

.metric-card {
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 250, 253, 0.82));
  box-shadow: 0 12px 28px rgba(15, 29, 55, 0.07);
}

.metric-card strong {
  letter-spacing: -0.05em;
}

.board-shell {
  padding: clamp(0.85rem, 1.6vw, 1.25rem);
}

.board-subnav {
  padding: 0.3rem 0.2rem 0.85rem;
}

.board-heading {
  border-radius: 22px;
  padding: 1rem;
  background:
    radial-gradient(340px 180px at 90% 0, rgba(34, 211, 238, 0.14), transparent 60%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(242, 248, 251, 0.62));
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.metric-strip {
  margin-top: 0.85rem;
}

.board {
  gap: 1rem;
}

.column {
  position: relative;
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.3);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 253, 0.84));
  box-shadow: 0 16px 36px rgba(15, 29, 55, 0.08);
}

.column::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.32rem;
  background: linear-gradient(90deg, #94a3b8, #cbd5e1);
}

.status-in_progress::before {
  background: linear-gradient(90deg, #0e7490, #67e8f9);
}

.status-review::before {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.status-test::before {
  background: linear-gradient(90deg, #059669, #86efac);
}

.status-done::before {
  background: linear-gradient(90deg, #15803d, #bbf7d0);
}

.column-head {
  padding-top: 0.25rem;
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

.column h4 {
  color: #26364b;
}

.count {
  background: rgba(255, 255, 255, 0.76);
  color: #334155;
}

.task-card {
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(15, 29, 55, 0.07);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 116, 144, 0.34);
  box-shadow: 0 18px 38px rgba(15, 29, 55, 0.12);
}

.task-card-assigned {
  border-color: rgba(34, 211, 238, 0.54);
  background:
    radial-gradient(170px 110px at 100% 0, rgba(34, 211, 238, 0.18), transparent 62%),
    linear-gradient(180deg, rgba(236, 253, 255, 0.98), rgba(249, 252, 253, 0.98));
}

.task-meta-pill,
.task-assigned-tag,
.task-working-pill {
  border-radius: 999px;
}

.task-settings-menu,
.profile-dropdown,
.settings-dropdown {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(15, 29, 55, 0.18);
  backdrop-filter: blur(20px);
  animation: pop-menu 150ms ease both;
}

.modal-overlay,
.drawer-overlay {
  background:
    radial-gradient(560px 300px at 50% 8%, rgba(34, 211, 238, 0.14), transparent 62%),
    rgba(7, 13, 28, 0.52);
  backdrop-filter: blur(9px);
}

.modal-card,
.drawer {
  border-radius: 28px;
  animation: modal-dock 220ms cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

.delete-project-modal {
  background:
    radial-gradient(520px 220px at 90% 0, rgba(225, 29, 72, 0.08), transparent 60%),
    #ffffff;
}

.profile-hero {
  overflow: hidden;
  background:
    radial-gradient(440px 220px at 90% 0, rgba(34, 211, 238, 0.14), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 253, 0.86));
}

.avatar-shell {
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 14px 30px rgba(15, 29, 55, 0.12);
}

.avatar-fallback {
  background: linear-gradient(135deg, #0f766e, #0891b2);
}

.chat-fab-btn {
  border-radius: 999px;
  background:
    radial-gradient(90px 42px at 80% 0, rgba(255, 255, 255, 0.22), transparent 60%),
    linear-gradient(135deg, #083344, #0e7490 58%, #22d3ee);
  box-shadow: 0 22px 48px rgba(14, 116, 144, 0.34);
}

.chat-fab-dot {
  background: #fbbf24;
  box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.16);
}

.chat-popup {
  border-radius: 28px;
  overflow: hidden;
  grid-template-rows: auto auto 1fr;
}

.chat-popup-head {
  background:
    radial-gradient(280px 130px at 92% 0, rgba(255, 255, 255, 0.18), transparent 62%),
    linear-gradient(135deg, #083344, #0e7490);
  color: #ffffff;
}

.chat-popup-head .eyebrow,
.chat-popup-head h3 {
  color: #ffffff;
}

.chat-thread {
  background:
    radial-gradient(420px 220px at 95% 0, rgba(34, 211, 238, 0.08), transparent 62%),
    #f8fbfd;
}

.chat-message {
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(15, 29, 55, 0.07);
}

.chat-message.mine {
  background: linear-gradient(180deg, #e8fbff, #d7f6fd);
  border-color: rgba(34, 211, 238, 0.4);
}

.notify-item,
.member-row,
.comment-card,
.message-item {
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 29, 55, 0.06);
}

.icon-bell,
.icon-filter,
.icon-gear,
.icon-back {
  position: relative;
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
}

.icon-bell::before {
  content: "";
  position: absolute;
  left: 0.23rem;
  top: 0.16rem;
  width: 0.6rem;
  height: 0.68rem;
  border: 2px solid currentColor;
  border-bottom-width: 3px;
  border-radius: 0.55rem 0.55rem 0.22rem 0.22rem;
}

.icon-bell::after {
  content: "";
  position: absolute;
  left: 0.47rem;
  bottom: 0.03rem;
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 999px;
  background: currentColor;
}

.icon-filter::before {
  content: "";
  position: absolute;
  left: 0.18rem;
  top: 0.2rem;
  width: 0.78rem;
  height: 0.78rem;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 0.24rem 0.24rem;
  clip-path: polygon(0 0, 100% 0, 63% 54%, 63% 100%, 37% 100%, 37% 54%);
}

.icon-gear::before {
  content: "";
  position: absolute;
  inset: 0.18rem;
  border: 2px solid currentColor;
  border-radius: 999px;
  box-shadow:
    0 -0.34rem 0 -0.13rem currentColor,
    0 0.34rem 0 -0.13rem currentColor,
    0.34rem 0 0 -0.13rem currentColor,
    -0.34rem 0 0 -0.13rem currentColor;
}

.icon-gear::after {
  content: "";
  position: absolute;
  inset: 0.43rem;
  border-radius: 999px;
  background: currentColor;
}

.icon-back::before {
  content: "";
  position: absolute;
  left: 0.18rem;
  top: 0.48rem;
  width: 0.74rem;
  height: 0.14rem;
  border-radius: 999px;
  background: currentColor;
}

.icon-back::after {
  content: "";
  position: absolute;
  left: 0.18rem;
  top: 0.34rem;
  width: 0.42rem;
  height: 0.42rem;
  border-left: 0.14rem solid currentColor;
  border-bottom: 0.14rem solid currentColor;
  transform: rotate(45deg);
}

@keyframes modal-dock {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pop-menu {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slide-soft {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {

  .auth-shell,
  .page>.panel {
    animation: page-reveal 380ms ease both;
  }

  .project-card,
  .task-card,
  .metric-card {
    animation: item-rise 320ms ease both;
  }

  .project-card:nth-child(2),
  .column:nth-child(2),
  .task-card:nth-child(2) {
    animation-delay: 45ms;
  }

  .project-card:nth-child(3),
  .column:nth-child(3),
  .task-card:nth-child(3) {
    animation-delay: 90ms;
  }

  .project-card:nth-child(4),
  .column:nth-child(4),
  .task-card:nth-child(4) {
    animation-delay: 135ms;
  }

  .project-card:nth-child(5),
  .column:nth-child(5),
  .task-card:nth-child(5) {
    animation-delay: 180ms;
  }
}

@keyframes page-reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes item-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .topbar {
    width: min(100% - 1rem, 1500px);
    top: 0.5rem;
    margin-top: 0.5rem;
  }

  .project-grid-spacious {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  }
}

@media (max-width: 800px) {
  .topbar {
    border-radius: 22px;
  }

  .topbar::before {
    display: none;
  }

  .project-card {
    min-height: 260px;
  }

  .modal-card,
  .drawer {
    border-radius: 24px 24px 0 0;
  }
}

@media (max-width: 720px) {
  body::after {
    display: none;
  }

  .auth-wrap {
    padding-top: 0.8rem;
  }

  .brand-panel {
    border-radius: 26px;
  }

  .brand-panel h1 {
    font-size: clamp(2.2rem, 14vw, 3.1rem);
  }

  .panel,
  .card-lg,
  .project-card,
  .column,
  .task-card {
    border-radius: 20px;
  }

  .board-heading {
    padding: 0.85rem;
  }

  .chat-popup {
    border-radius: 0;
  }
}

/* Agent brief integration: concrete component refinements */
.project-card-premium {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 0.85rem;
}

.project-card-top,
.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.project-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 18px;
  border: 1px solid hsl(var(--project-h, 202) 72% 52% / 0.24);
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.9), transparent 28%),
    linear-gradient(135deg,
      hsl(var(--project-h, 202) 78% 92%),
      hsl(var(--project-h, 202) 82% 82%));
  color: hsl(var(--project-h, 202) 72% 28%);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: 0 12px 24px hsl(var(--project-h, 202) 80% 44% / 0.12);
}

.project-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.project-meta-grid span {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 0.38rem 0.62rem;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-state-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.active-pill,
.completed-pill,
.frozen-pill {
  width: fit-content;
  margin-top: 0.5rem;
  font-weight: 800;
}

.active-pill {
  border-color: rgba(14, 116, 144, 0.24);
  background: #e0f2fe;
  color: #075985;
}

.completed-pill {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.frozen-pill {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #475569;
}

.project-footnote {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-open-btn {
  width: auto;
  min-width: 132px;
  margin-top: 0;
}

.project-grid .empty-state {
  grid-column: 1 / -1;
}

.empty-state {
  width: min(680px, 100%);
  margin: 0 auto;
  border: 1px dashed rgba(14, 116, 144, 0.34);
  border-radius: 28px;
  padding: clamp(1.3rem, 4vw, 2.25rem);
  text-align: center;
  background:
    radial-gradient(420px 180px at 50% 0, rgba(34, 211, 238, 0.12), transparent 62%),
    rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.empty-state h3 {
  margin: 0.65rem 0 0.35rem;
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
}

.empty-state p {
  margin: 0 auto 1rem;
  max-width: 34rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 24px;
  background: linear-gradient(135deg, #083344, #0e7490 58%, #22d3ee);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 20px 42px rgba(14, 116, 144, 0.26);
}

.task-card[data-assigned="true"],
.task-card.assigned-to-me {
  background:
    linear-gradient(90deg, rgba(16, 185, 129, 0.36), rgba(16, 185, 129, 0.08) 10px, transparent 11px),
    radial-gradient(190px 120px at 100% 0, rgba(16, 185, 129, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(240, 253, 250, 0.96), rgba(255, 255, 255, 0.98));
  border-color: rgba(16, 185, 129, 0.56);
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.1),
    0 16px 34px rgba(5, 150, 105, 0.13);
}

.task-card[data-assigned="true"]:hover,
.task-card.assigned-to-me:hover {
  border-color: rgba(5, 150, 105, 0.72);
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.18),
    0 22px 46px rgba(5, 150, 105, 0.18);
}

.task-card[data-assigned="true"] .task-assigned-tag,
.task-card.assigned-to-me .task-assigned-tag {
  gap: 0.38rem;
  border: 1px solid rgba(16, 185, 129, 0.34);
  background:
    radial-gradient(120px 60px at 100% 0, rgba(16, 185, 129, 0.18), transparent 62%),
    rgba(236, 253, 245, 0.94);
  color: #047857;
  padding: 0.32rem 0.62rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 20px rgba(5, 150, 105, 0.1);
}

.task-card[data-assigned="true"] .task-assigned-tag span,
.task-card.assigned-to-me .task-assigned-tag span {
  color: #22c55e;
  font-size: 0.7rem;
  filter: drop-shadow(0 0 5px rgba(34, 197, 94, 0.42));
}

.task-card[data-assigned="true"] .task-activity-btn,
.task-card.assigned-to-me .task-activity-btn {
  border-color: rgba(16, 185, 129, 0.32);
  color: #065f46;
  background: rgba(236, 253, 245, 0.82);
}

.task-card[data-assigned="true"] .task-activity-btn:hover,
.task-card.assigned-to-me .task-activity-btn:hover {
  background: linear-gradient(135deg, #047857, #10b981);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.2);
}

.task-card[data-assigned="true"] .task-activity-btn.active,
.task-card.assigned-to-me .task-activity-btn.active {
  background: linear-gradient(135deg, #047857, #22c55e);
  color: #ffffff;
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 16px 34px rgba(5, 150, 105, 0.24);
}

html[data-theme="dark"] .task-card[data-assigned="true"],
html[data-theme="dark"] .task-card.assigned-to-me {
  background:
    linear-gradient(90deg, rgba(52, 211, 153, 0.32), rgba(52, 211, 153, 0.08) 10px, transparent 11px),
    radial-gradient(190px 120px at 100% 0, rgba(16, 185, 129, 0.18), transparent 62%),
    linear-gradient(180deg, rgba(6, 35, 32, 0.96), rgba(7, 13, 25, 0.94));
  border-color: rgba(52, 211, 153, 0.42);
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.12),
    0 18px 38px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .task-card[data-assigned="true"] .task-assigned-tag,
html[data-theme="dark"] .task-card.assigned-to-me .task-assigned-tag {
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(6, 78, 59, 0.62);
  color: #a7f3d0;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .task-card[data-assigned="true"] .task-activity-btn,
html[data-theme="dark"] .task-card.assigned-to-me .task-activity-btn {
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(6, 78, 59, 0.4);
  color: #d1fae5;
}

html[data-theme="dark"] .task-card[data-assigned="true"] .task-activity-btn:hover,
html[data-theme="dark"] .task-card.assigned-to-me .task-activity-btn:hover,
html[data-theme="dark"] .task-card[data-assigned="true"] .task-activity-btn.active,
html[data-theme="dark"] .task-card.assigned-to-me .task-activity-btn.active {
  background: linear-gradient(135deg, #047857, #10b981);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(5, 150, 105, 0.24);
}

/* Legacy assigned highlight fallback kept after newer rules for old class order. */
.task-card-assigned {
  background:
    linear-gradient(90deg, rgba(16, 185, 129, 0.36), rgba(16, 185, 129, 0.08) 10px, transparent 11px),
    radial-gradient(190px 120px at 100% 0, rgba(16, 185, 129, 0.16), transparent 62%),
    #ffffff;
  border-color: rgba(16, 185, 129, 0.56);
}

.task-card[data-active="true"],
.task-card.is-active {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.16),
    0 16px 34px rgba(15, 29, 55, 0.1);
}

.profile-expertise {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-soft, #334155);
  font-size: 0.84rem;
  font-weight: 800;
}

.avatar-pickable {
  position: relative;
  overflow: hidden;
}

.avatar-pickable::after {
  content: "Change photo";
  position: absolute;
  inset: auto 0.45rem 0.45rem;
  text-align: center;
  border-radius: 999px;
  padding: 0.36rem 0.45rem;
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.avatar-pickable:hover::after,
.avatar-pickable:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .project-meta-grid {
    grid-template-columns: 1fr;
  }

  .project-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .project-open-btn,
  .empty-state button {
    width: 100%;
  }

  .empty-state {
    border-radius: 22px;
    padding: 1.15rem;
  }
}

/* Logo, command-bar navigation, and cinematic landing page */
.topbar::before {
  display: none;
}

.top-left {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.brand-lockup {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: inherit;
  text-decoration: none;
}

.brand-lockup:hover {
  text-decoration: none;
}

.brand-lockup span {
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  filter: drop-shadow(0 12px 20px rgba(14, 116, 144, 0.22));
}

.top-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 42px;
  border: 1px solid rgba(126, 147, 176, 0.38);
  border-radius: 999px;
  padding: 0.52rem 0.82rem;
  background: rgba(255, 255, 255, 0.76);
  color: #203047;
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(15, 29, 55, 0.06);
}

.top-nav-link:hover {
  background: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
}

.board-settings-row {
  justify-content: flex-end;
}

body.landing-page {
  min-height: 100vh;
  color: #f8fafc;
  background:
    radial-gradient(900px 420px at 50% 96%, rgba(248, 113, 22, 0.22), transparent 64%),
    radial-gradient(700px 320px at 74% 78%, rgba(125, 211, 252, 0.14), transparent 58%),
    linear-gradient(180deg, #030405 0%, #050607 50%, #010101 100%);
}

body.landing-page::before {
  opacity: 0.32;
  background-image:
    radial-gradient(circle at 20% 28%, rgba(255, 255, 255, 0.24) 0 1px, transparent 1px),
    radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 260px 180px, 340px 220px, 52px 52px, 52px 52px;
  mask-image: linear-gradient(180deg, black 20%, transparent 92%);
}

body.landing-page::after {
  display: none;
}

.landing-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.landing-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: 88px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.3rem clamp(1.2rem, 4vw, 5.5rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 900;
}

.landing-nav a,
.landing-nav-login {
  color: rgba(248, 250, 252, 0.72);
  text-decoration: none;
}

.landing-nav a:last-child,
.landing-nav-login {
  justify-self: end;
}

.landing-nav a:hover,
.landing-nav-login:hover {
  color: #ffffff;
}

.landing-nav-login {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.landing-nav-login:hover {
  transform: none;
  box-shadow: none;
}

.landing-logo-link {
  justify-self: center;
}

.landing-logo-link img {
  width: 58px;
  height: 58px;
  opacity: 0.92;
  filter: drop-shadow(0 0 22px rgba(34, 211, 238, 0.28));
  animation: logo-float 4.5s ease-in-out infinite;
}

.landing-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 7rem clamp(1rem, 4vw, 5rem) 3rem;
  text-align: center;
}

.landing-kicker {
  position: absolute;
  top: 22%;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(248, 250, 252, 0.78);
  font-size: clamp(0.72rem, 1vw, 0.92rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  animation: landing-rise 520ms ease both 120ms;
}

.landing-hero h1 {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.2rem, 1.5vw, 1.3rem);
  margin: 0;
  color: #f8fafc;
  font-size: clamp(4rem, 15vw, 16rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.1em;
  text-transform: uppercase;
  text-shadow: 0 0 44px rgba(255, 255, 255, 0.08);
  animation: hero-word 700ms cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

.landing-hero h1 span:last-child {
  color: transparent;
  -webkit-text-stroke: 0.045em rgba(248, 250, 252, 0.92);
  text-stroke: 0.045em rgba(248, 250, 252, 0.92);
}

.landing-hero>p {
  position: absolute;
  z-index: 4;
  bottom: 18%;
  width: min(700px, calc(100% - 2rem));
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: clamp(1rem, 1.7vw, 1.3rem);
  line-height: 1.55;
  animation: landing-rise 520ms ease both 300ms;
}

.landing-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.landing-hero .landing-actions {
  position: absolute;
  z-index: 5;
  bottom: 8%;
  animation: landing-rise 520ms ease both 420ms;
}

.landing-btn {
  min-width: 142px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.88rem 1.18rem;
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
  backdrop-filter: blur(14px);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.landing-btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.landing-btn.primary {
  background: linear-gradient(135deg, #0e7490, #22d3ee);
  box-shadow: 0 22px 45px rgba(34, 211, 238, 0.22);
}

.landing-btn.secondary {
  background: rgba(255, 255, 255, 0.07);
}

.landing-orbit-card {
  position: absolute;
  right: clamp(1rem, 7vw, 8rem);
  top: 34%;
  z-index: 4;
  width: 190px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
  animation: orbital-card 6s ease-in-out infinite alternate;
}

.landing-orbit-card span {
  display: block;
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.landing-orbit-card strong {
  display: block;
  margin-top: 0.35rem;
  color: #ffffff;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.landing-planet {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: -34vw;
  width: min(86vw, 1050px);
  aspect-ratio: 1;
  border-radius: 999px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.92), rgba(226, 232, 240, 0.72) 13%, transparent 21%),
    radial-gradient(circle at 30% 38%, rgba(251, 146, 60, 0.92), transparent 18%),
    radial-gradient(circle at 42% 56%, rgba(124, 45, 18, 0.88), transparent 24%),
    radial-gradient(circle at 64% 42%, rgba(148, 163, 184, 0.78), transparent 26%),
    linear-gradient(135deg, #8b2f11, #18181b 48%, #dbeafe 100%);
  box-shadow:
    inset -90px -70px 110px rgba(0, 0, 0, 0.74),
    inset 80px 40px 100px rgba(255, 255, 255, 0.22),
    0 -30px 90px rgba(248, 113, 22, 0.18),
    0 0 110px rgba(255, 255, 255, 0.12);
  animation: planet-drift 10s ease-in-out infinite alternate;
}

.landing-planet::before {
  content: "";
  position: absolute;
  inset: -3%;
  border-radius: inherit;
  background:
    repeating-linear-gradient(16deg, transparent 0 16px, rgba(255, 255, 255, 0.05) 17px 18px),
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.14), transparent 42%);
  mix-blend-mode: overlay;
}

.landing-section,
.landing-final {
  position: relative;
  z-index: 4;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 7rem) 0;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.landing-feature-grid article,
.landing-final {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.landing-feature-grid article {
  padding: 1.25rem;
}

.landing-feature-grid span {
  color: #67e8f9;
  font-weight: 900;
}

.landing-feature-grid h2,
.landing-final h2 {
  color: #ffffff;
  letter-spacing: -0.045em;
}

.landing-feature-grid p {
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.6;
}

.landing-final {
  margin-bottom: 4rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  text-align: center;
}

.landing-final h2 {
  max-width: 760px;
  margin: 0 auto 1.25rem;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
}

@keyframes logo-float {
  50% {
    transform: translateY(-5px);
  }
}

@keyframes hero-word {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    filter: blur(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes landing-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orbital-card {
  to {
    transform: translate3d(-10px, 12px, 0);
  }
}

@keyframes planet-drift {
  to {
    transform: translateX(-50%) translateY(-14px) rotate(2deg);
  }
}

@media (max-width: 900px) {
  .landing-nav {
    height: 76px;
    grid-template-columns: 1fr auto 1fr;
    padding-inline: 1rem;
    font-size: 0.68rem;
  }

  .landing-logo-link img {
    width: 48px;
    height: 48px;
  }

  .landing-hero h1 {
    flex-direction: column;
    gap: 0;
    font-size: clamp(4.4rem, 22vw, 9rem);
  }

  .landing-hero h1 span:last-child {
    -webkit-text-stroke-width: 0.035em;
    text-stroke-width: 0.035em;
  }

  .landing-orbit-card {
    display: none;
  }

  .landing-planet {
    width: 120vw;
    bottom: -46vw;
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .top-left {
    width: 100%;
    justify-content: space-between;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .top-nav-link {
    min-height: 40px;
    padding: 0.5rem 0.68rem;
    font-size: 0.84rem;
  }

  .landing-nav a:first-child,
  .landing-nav a:last-child {
    display: none;
  }

  .landing-nav {
    grid-template-columns: 1fr;
  }

  .landing-logo-link {
    justify-self: center;
  }

  .landing-kicker {
    top: 17%;
  }

  .landing-hero>p {
    bottom: 20%;
  }

  .landing-hero .landing-actions {
    bottom: 7%;
    width: calc(100% - 2rem);
  }

  .landing-btn {
    width: 100%;
  }
}

/* Light marketing entrance and board command bar refinements. */
body.landing-page {
  color: var(--text);
  background:
    radial-gradient(760px 420px at 8% 8%, rgba(14, 165, 233, 0.18), transparent 62%),
    radial-gradient(720px 420px at 86% 10%, rgba(251, 146, 60, 0.12), transparent 60%),
    radial-gradient(900px 520px at 50% 110%, rgba(8, 145, 178, 0.16), transparent 58%),
    linear-gradient(180deg, #f8fbfd 0%, #eef5f9 48%, #f7fafc 100%);
}

body.landing-page::before {
  opacity: 0.72;
  background-image:
    linear-gradient(rgba(14, 116, 144, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 116, 144, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 20% 24%, rgba(8, 145, 178, 0.13) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 30%, rgba(251, 146, 60, 0.12) 0 1px, transparent 1px);
  background-size: 34px 34px, 34px 34px, 260px 190px, 320px 240px;
  mask-image: radial-gradient(ellipse at center, black 42%, transparent 100%);
}

.landing-shell {
  color: var(--text);
}

.landing-nav {
  height: 92px;
  color: var(--text-soft);
}

.landing-nav::before {
  content: "";
  position: absolute;
  inset: 0 clamp(0.8rem, 3vw, 3.8rem);
  z-index: -1;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 0 0 32px 32px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.landing-nav a,
.landing-nav-login {
  color: rgba(15, 23, 42, 0.72);
}

.landing-nav a:hover,
.landing-nav-login:hover {
  color: var(--primary);
}

.landing-logo-link img {
  opacity: 1;
  filter: drop-shadow(0 14px 28px rgba(8, 145, 178, 0.24));
}

.landing-kicker {
  border-color: rgba(8, 145, 178, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: var(--primary);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.landing-hero h1 {
  color: #102033;
  text-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.landing-hero h1 span:last-child {
  color: transparent;
  -webkit-text-stroke: 0.045em rgba(7, 89, 133, 0.72);
  text-stroke: 0.045em rgba(7, 89, 133, 0.72);
}

.landing-hero>p {
  color: var(--text-soft);
  font-weight: 650;
}

.landing-planet {
  bottom: -38vw;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.98), transparent 20%),
    radial-gradient(circle at 26% 42%, rgba(14, 165, 233, 0.24), transparent 22%),
    radial-gradient(circle at 72% 34%, rgba(251, 146, 60, 0.22), transparent 20%),
    radial-gradient(circle at 52% 58%, rgba(125, 211, 252, 0.2), transparent 25%),
    linear-gradient(135deg, #ffffff 0%, #e8f5fb 42%, #cfeaf6 72%, #fff7ed 100%);
  box-shadow:
    inset -70px -75px 120px rgba(8, 47, 73, 0.13),
    inset 90px 56px 110px rgba(255, 255, 255, 0.8),
    0 -30px 110px rgba(14, 165, 233, 0.16),
    0 40px 110px rgba(15, 23, 42, 0.12);
}

.landing-planet::before {
  background:
    repeating-linear-gradient(16deg, transparent 0 18px, rgba(8, 145, 178, 0.055) 19px 20px),
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.72), transparent 46%);
  mix-blend-mode: normal;
}

.landing-feature-grid article,
.landing-final {
  border-color: rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 251, 253, 0.76));
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.09);
}

.landing-feature-grid span {
  color: var(--primary-2);
}

.landing-feature-grid h2,
.landing-final h2 {
  color: var(--text);
}

.landing-feature-grid p {
  color: var(--text-muted);
}

.landing-btn {
  border-color: rgba(8, 145, 178, 0.2);
}

.landing-btn.secondary {
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-soft);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.landing-auth-card {
  width: min(100%, 460px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(320px 180px at 100% 0, rgba(14, 165, 233, 0.12), transparent 58%),
    #ffffff;
}

.landing-auth-card .modal-head {
  align-items: flex-start;
}

.landing-auth-card button:not(.modal-close):not(.text-button) {
  width: 100%;
}

body.modal-open {
  overflow: hidden;
}

.text-button {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  box-shadow: none;
  font: inherit;
  font-weight: 850;
  vertical-align: baseline;
}

.text-button:hover {
  transform: none;
  text-decoration: underline;
  box-shadow: none;
}

.board-topbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto minmax(280px, 1fr);
  align-items: center;
}

.board-topbar .top-left {
  justify-self: start;
}

.board-topbar .top-actions {
  justify-self: end;
}

.top-center-title {
  justify-self: center;
  min-width: 0;
  max-width: min(48vw, 620px);
  text-align: center;
}

.top-center-title .eyebrow {
  margin-bottom: 0.12rem;
  color: var(--primary);
}

.top-center-title h2 {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .landing-nav::before {
    inset-inline: 0.55rem;
    border-radius: 0 0 24px 24px;
  }

  .landing-planet {
    width: 122vw;
    bottom: -50vw;
  }

  .board-topbar {
    grid-template-columns: 1fr auto;
    row-gap: 0.7rem;
  }

  .board-topbar .top-left {
    width: auto;
    justify-content: flex-start;
  }

  .board-topbar .top-actions {
    grid-column: 2;
  }

  .top-center-title {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: calc(100vw - 2rem);
  }
}

@media (max-width: 640px) {
  .landing-nav {
    grid-template-columns: 1fr auto 1fr;
  }

  .landing-nav a:first-child {
    display: none;
  }

  .landing-nav-login {
    display: inline-flex;
    justify-self: end;
    font-size: 0.68rem;
  }

  .landing-hero {
    padding-top: 6.25rem;
  }

  .landing-hero h1 {
    font-size: clamp(4.4rem, 21vw, 8rem);
  }

  .landing-hero>p {
    bottom: 18%;
  }

  .landing-final .landing-actions {
    width: 100%;
  }

  .board-topbar .brand-text {
    display: none;
  }

  .board-topbar .top-nav-link span:last-child {
    display: none;
  }
}

/* Rebuilt theme system */
html {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --bg-soft: #111b2d;
  --surface: rgba(17, 27, 45, 0.88);
  --surface-solid: #111827;
  --surface-muted: #172236;
  --text: #f5f8fb;
  --text-soft: #d7e2ee;
  --text-muted: #91a4b8;
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(203, 213, 225, 0.34);
  --primary: #67e8f9;
  --primary-2: #22d3ee;
  --primary-soft: rgba(34, 211, 238, 0.14);
  --success: #86efac;
  --warning: #fbbf24;
  --danger: #fb7185;
  --owner-bg: rgba(251, 191, 36, 0.14);
  --owner-text: #fde68a;
  --owner-line: rgba(251, 191, 36, 0.34);
  --dev-bg: rgba(59, 130, 246, 0.16);
  --dev-text: #bfdbfe;
  --dev-line: rgba(96, 165, 250, 0.34);
  --tester-bg: rgba(16, 185, 129, 0.14);
  --tester-text: #bbf7d0;
  --tester-line: rgba(52, 211, 153, 0.34);
  --assigned-bg: rgba(14, 165, 233, 0.14);
  --assigned-line: rgba(125, 211, 252, 0.42);
  --shadow-sm: 0 10px 26px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 22px 56px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 34px 90px rgba(0, 0, 0, 0.46);
}

html[data-theme="dark"] body,
body.dark {
  color: var(--text);
  background:
    radial-gradient(900px 520px at 10% -10%, rgba(34, 211, 238, 0.12), transparent 62%),
    radial-gradient(720px 420px at 95% 4%, rgba(59, 130, 246, 0.1), transparent 58%),
    radial-gradient(700px 420px at 50% 112%, rgba(251, 191, 36, 0.06), transparent 62%),
    linear-gradient(160deg, #07111f 0%, #0b1220 48%, #0a0f1a 100%);
}

html[data-theme="dark"] body::before {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
  opacity: 0.62;
}

html[data-theme="dark"] a {
  color: var(--primary);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .top-center-title h2,
html[data-theme="dark"] .column h4,
html[data-theme="dark"] .project-card strong,
html[data-theme="dark"] .task-card strong {
  color: var(--text);
}

html[data-theme="dark"] .eyebrow {
  color: #7dd3fc;
}

html[data-theme="dark"] .subtitle,
html[data-theme="dark"] .tip,
html[data-theme="dark"] .empty,
html[data-theme="dark"] .project-desc,
html[data-theme="dark"] .task-desc,
html[data-theme="dark"] .task-sub,
html[data-theme="dark"] .project-footnote,
html[data-theme="dark"] .project-meta-grid span,
html[data-theme="dark"] .profile-headline,
html[data-theme="dark"] .profile-bio,
html[data-theme="dark"] .profile-expertise,
html[data-theme="dark"] small {
  color: var(--text-muted);
}

html[data-theme="dark"] .topbar {
  border-bottom-color: var(--line);
  background: rgba(10, 17, 30, 0.78);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .brand-mark {
  filter: drop-shadow(0 14px 26px rgba(34, 211, 238, 0.22));
}

html[data-theme="dark"] .card-lg,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .drawer,
html[data-theme="dark"] .chat-popup,
html[data-theme="dark"] .profile-dropdown,
html[data-theme="dark"] .settings-dropdown,
html[data-theme="dark"] .filters-panel,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .notify-item,
html[data-theme="dark"] .member-row,
html[data-theme="dark"] .comment-card,
html[data-theme="dark"] .message-item,
html[data-theme="dark"] .empty-state {
  border-color: var(--line);
  background:
    radial-gradient(420px 220px at 100% 0, rgba(34, 211, 238, 0.055), transparent 62%),
    linear-gradient(180deg, rgba(17, 27, 45, 0.94), rgba(11, 18, 32, 0.88));
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

html[data-theme="dark"] .panel::before {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.08), transparent 42%);
}

html[data-theme="dark"] .profile-dropdown,
html[data-theme="dark"] .settings-dropdown,
html[data-theme="dark"] .task-settings-menu {
  background: rgba(13, 22, 38, 0.96);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

html[data-theme="dark"] .profile-dropdown a,
html[data-theme="dark"] .profile-dropdown button,
html[data-theme="dark"] .settings-dropdown button,
html[data-theme="dark"] .task-settings-menu button {
  color: var(--text);
}

html[data-theme="dark"] .profile-dropdown a:hover,
html[data-theme="dark"] .profile-dropdown button:hover,
html[data-theme="dark"] .settings-dropdown button:hover,
html[data-theme="dark"] .task-settings-menu button:hover {
  background: rgba(34, 211, 238, 0.1);
}

html[data-theme="dark"] label {
  color: var(--text-soft);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  border-color: var(--line);
  background: rgba(7, 13, 25, 0.72);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: rgba(145, 164, 184, 0.78);
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
  border-color: rgba(103, 232, 249, 0.7);
  box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.14);
}

html[data-theme="dark"] .project-view-select {
  border-color: rgba(125, 211, 252, 0.22);
  color: var(--text);
  background:
    linear-gradient(45deg, transparent 50%, #67e8f9 50%) calc(100% - 1.08rem) 52% / 0.45rem 0.45rem no-repeat,
    linear-gradient(135deg, #67e8f9 50%, transparent 50%) calc(100% - 0.78rem) 52% / 0.45rem 0.45rem no-repeat,
    radial-gradient(180px 80px at 100% 0, rgba(34, 211, 238, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(17, 27, 45, 0.94), rgba(7, 13, 25, 0.82));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .project-view-select:hover,
html[data-theme="dark"] .project-view-select:focus {
  border-color: rgba(103, 232, 249, 0.5);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12), 0 18px 40px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .project-view-trigger {
  border-color: rgba(125, 211, 252, 0.2);
  background:
    radial-gradient(180px 80px at 100% 0, rgba(34, 211, 238, 0.13), transparent 62%),
    linear-gradient(180deg, rgba(17, 27, 45, 0.96), rgba(7, 13, 25, 0.88));
  color: #eaf6ff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .project-view-trigger:hover,
html[data-theme="dark"] .project-view-trigger[aria-expanded="true"] {
  border-color: rgba(103, 232, 249, 0.46);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.09), 0 20px 46px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .project-view-dropdown {
  border-color: rgba(125, 211, 252, 0.2);
  background:
    radial-gradient(280px 150px at 100% 0, rgba(34, 211, 238, 0.14), transparent 62%),
    linear-gradient(180deg, rgba(17, 27, 45, 0.98), rgba(7, 13, 25, 0.98));
  box-shadow: 0 30px 78px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .project-view-option {
  color: #f8fbff;
}

html[data-theme="dark"] .project-view-option:hover,
html[data-theme="dark"] .project-view-option.selected {
  border-color: rgba(103, 232, 249, 0.22);
  background: rgba(8, 47, 73, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .project-view-option small {
  color: rgba(196, 213, 229, 0.78);
}

html[data-theme="dark"] button {
  color: #f8fbff;
}

html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .top-actions a,
html[data-theme="dark"] .profile-trigger,
html[data-theme="dark"] .theme-toggle-btn {
  border-color: var(--line);
  background: rgba(17, 27, 45, 0.76);
  color: var(--text);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .top-actions a:hover,
html[data-theme="dark"] .profile-trigger:hover,
html[data-theme="dark"] .theme-toggle-btn:hover {
  background: rgba(30, 41, 59, 0.92);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .project-card {
  border-color: var(--line);
  background:
    radial-gradient(280px 180px at 96% 0, hsl(var(--project-h, 202) 80% 62% / 0.14), transparent 68%),
    linear-gradient(180deg, rgba(17, 27, 45, 0.94), rgba(11, 18, 32, 0.9));
}

html[data-theme="dark"] .project-card::after {
  background: hsl(var(--project-h, 202) 85% 64% / 0.12);
}

html[data-theme="dark"] .project-state-active:hover {
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 30px 78px rgba(8, 145, 178, 0.26);
}

html[data-theme="dark"] .project-state-completed {
  border-color: rgba(52, 211, 153, 0.36);
  background:
    radial-gradient(280px 180px at 96% 0, rgba(16, 185, 129, 0.16), transparent 68%),
    linear-gradient(180deg, rgba(15, 30, 31, 0.96), rgba(10, 20, 25, 0.94));
}

html[data-theme="dark"] .project-state-completed:hover {
  border-color: rgba(52, 211, 153, 0.62);
  box-shadow: 0 30px 78px rgba(16, 185, 129, 0.24);
}

html[data-theme="dark"] .project-state-archived {
  border-color: rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(280px 180px at 96% 0, rgba(148, 163, 184, 0.12), transparent 68%),
    linear-gradient(180deg, rgba(20, 25, 34, 0.96), rgba(11, 18, 32, 0.92));
}

html[data-theme="dark"] .project-state-archived:hover {
  border-color: rgba(251, 146, 60, 0.52);
  box-shadow: 0 30px 78px rgba(249, 115, 22, 0.2);
}

html[data-theme="dark"] .project-meta-row small,
html[data-theme="dark"] .project-meta-grid span,
html[data-theme="dark"] .task-meta-pill,
html[data-theme="dark"] .task-assigned-tag,
html[data-theme="dark"] .task-working-pill,
html[data-theme="dark"] .badge-soft,
html[data-theme="dark"] .count {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.64);
  color: var(--text-soft);
}

html[data-theme="dark"] .active-pill {
  border-color: rgba(56, 189, 248, 0.34);
  background: rgba(8, 145, 178, 0.18);
  color: #7dd3fc;
}

html[data-theme="dark"] .completed-pill {
  border-color: rgba(52, 211, 153, 0.34);
  background: rgba(16, 185, 129, 0.16);
  color: #86efac;
}

html[data-theme="dark"] .frozen-pill {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(51, 65, 85, 0.42);
  color: #cbd5e1;
}

html[data-theme="dark"] .role-pill {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .role-product-owner {
  background: var(--owner-bg);
  color: var(--owner-text);
  border-color: var(--owner-line);
}

html[data-theme="dark"] .role-developer {
  background: var(--dev-bg);
  color: var(--dev-text);
  border-color: var(--dev-line);
}

html[data-theme="dark"] .role-tester {
  background: var(--tester-bg);
  color: var(--tester-text);
  border-color: var(--tester-line);
}

html[data-theme="dark"] .board-heading,
html[data-theme="dark"] .column,
html[data-theme="dark"] .task-card,
html[data-theme="dark"] .profile-hero,
html[data-theme="dark"] .profile-bio,
html[data-theme="dark"] .profile-expertise {
  border-color: var(--line);
  background:
    radial-gradient(320px 180px at 100% 0, rgba(34, 211, 238, 0.06), transparent 62%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(10, 17, 30, 0.9));
  color: var(--text);
}

html[data-theme="dark"] .task-card-assigned {
  border-color: var(--assigned-line);
  background:
    radial-gradient(180px 120px at 100% 0, rgba(34, 211, 238, 0.2), transparent 64%),
    linear-gradient(180deg, rgba(12, 35, 54, 0.96), rgba(10, 17, 30, 0.94));
}

html[data-theme="dark"] .task-settings-trigger {
  background: rgba(17, 27, 45, 0.82);
}

html[data-theme="dark"] .modal-overlay,
html[data-theme="dark"] .drawer-overlay {
  background:
    radial-gradient(560px 300px at 50% 8%, rgba(34, 211, 238, 0.12), transparent 62%),
    rgba(1, 6, 14, 0.74);
}

html[data-theme="dark"] .delete-project-modal {
  border-color: rgba(251, 113, 133, 0.32);
  background:
    radial-gradient(520px 220px at 90% 0, rgba(251, 113, 133, 0.11), transparent 60%),
    #111827;
}

html[data-theme="dark"] .avatar-shell {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .chat-popup-head {
  background:
    radial-gradient(280px 130px at 92% 0, rgba(103, 232, 249, 0.18), transparent 62%),
    linear-gradient(135deg, #07111f, #0e7490);
}

html[data-theme="dark"] .chat-tabs,
html[data-theme="dark"] .chat-conversation-list,
html[data-theme="dark"] .chat-thread,
html[data-theme="dark"] .chat-compose {
  border-color: var(--line);
  background: rgba(7, 13, 25, 0.76);
}

html[data-theme="dark"] .chat-conversation-item {
  border-color: transparent;
  color: var(--text);
}

html[data-theme="dark"] .chat-conversation-item:hover,
html[data-theme="dark"] .chat-conversation-item.selected {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.11);
}

html[data-theme="dark"] .chat-message {
  border-color: var(--line);
  background: rgba(17, 27, 45, 0.92);
  color: var(--text);
}

html[data-theme="dark"] .chat-message.mine {
  border-color: rgba(34, 211, 238, 0.34);
  background: linear-gradient(180deg, rgba(8, 47, 73, 0.94), rgba(12, 74, 110, 0.78));
}

html[data-theme="dark"] .chat-view-profile-link {
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(34, 211, 238, 0.1);
  color: var(--primary);
}

html[data-theme="dark"] body.landing-page {
  color: var(--text);
  background:
    radial-gradient(820px 460px at 8% 8%, rgba(34, 211, 238, 0.14), transparent 62%),
    radial-gradient(720px 420px at 86% 10%, rgba(251, 146, 60, 0.08), transparent 60%),
    radial-gradient(900px 520px at 50% 110%, rgba(8, 145, 178, 0.14), transparent 58%),
    linear-gradient(180deg, #07111f 0%, #0b1220 52%, #08101c 100%);
}

html[data-theme="dark"] body.landing-page::before {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 20% 24%, rgba(34, 211, 238, 0.12) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 30%, rgba(251, 146, 60, 0.1) 0 1px, transparent 1px);
}

html[data-theme="dark"] .landing-nav::before {
  border-color: var(--line);
  background: rgba(10, 17, 30, 0.72);
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .landing-nav a,
html[data-theme="dark"] .landing-nav-login {
  color: var(--text-soft);
}

html[data-theme="dark"] .landing-nav a:hover,
html[data-theme="dark"] .landing-nav-login:hover {
  color: var(--primary);
}

html[data-theme="dark"] .landing-kicker,
html[data-theme="dark"] .landing-feature-grid article,
html[data-theme="dark"] .landing-final,
html[data-theme="dark"] .landing-auth-card {
  border-color: var(--line);
  background:
    radial-gradient(320px 170px at 100% 0, rgba(34, 211, 238, 0.07), transparent 62%),
    rgba(17, 27, 45, 0.82);
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .landing-hero h1 {
  color: #f8fbff;
  text-shadow: 0 24px 70px rgba(34, 211, 238, 0.1);
}

html[data-theme="dark"] .landing-hero h1 span:last-child {
  color: transparent;
  -webkit-text-stroke-color: rgba(103, 232, 249, 0.72);
  text-stroke-color: rgba(103, 232, 249, 0.72);
}

html[data-theme="dark"] .landing-hero > p,
html[data-theme="dark"] .landing-feature-grid p {
  color: var(--text-muted);
}

html[data-theme="dark"] .landing-feature-grid h2,
html[data-theme="dark"] .landing-final h2 {
  color: var(--text);
}

html[data-theme="dark"] .landing-planet {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.46), transparent 20%),
    radial-gradient(circle at 26% 42%, rgba(34, 211, 238, 0.22), transparent 22%),
    radial-gradient(circle at 72% 34%, rgba(251, 146, 60, 0.12), transparent 20%),
    radial-gradient(circle at 52% 58%, rgba(59, 130, 246, 0.16), transparent 25%),
    linear-gradient(135deg, #132033 0%, #0d1727 46%, #12324a 72%, #241b14 100%);
  box-shadow:
    inset -80px -80px 130px rgba(0, 0, 0, 0.48),
    inset 80px 48px 100px rgba(255, 255, 255, 0.08),
    0 -30px 110px rgba(34, 211, 238, 0.12),
    0 40px 120px rgba(0, 0, 0, 0.3);
}

.landing-nav-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.theme-toggle-btn,
.landing-theme-toggle,
.landing-nav-login {
  min-height: 40px;
  border-radius: 999px;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  border: 1px solid rgba(126, 147, 176, 0.38);
  padding: 0.48rem 0.72rem;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(15, 29, 55, 0.06);
}

.theme-toggle-icon {
  position: relative;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #0f172a;
  box-shadow: inset -0.32rem -0.2rem 0 #f8fafc;
}

.theme-toggle-btn[data-theme-state="dark"] .theme-toggle-icon {
  background: #fbbf24;
  box-shadow: 0 0 0 0.24rem rgba(251, 191, 36, 0.18);
}

.profile-night-toggle-btn {
  width: 100%;
  margin: 0.2rem 0 0;
  text-align: left;
  justify-content: flex-start;
}

.landing-theme-toggle {
  min-height: 36px;
  padding-inline: 0.72rem;
  background: rgba(255, 255, 255, 0.7);
  letter-spacing: 0;
  text-transform: none;
}

html[data-theme="dark"] .landing-theme-toggle {
  background: rgba(17, 27, 45, 0.78);
}

@media (max-width: 640px) {
  .landing-nav-actions {
    gap: 0.4rem;
  }

  .landing-theme-toggle span:last-child {
    display: none;
  }

  .landing-theme-toggle {
    width: 40px;
    padding-inline: 0;
  }
}

.landing-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.landing-nav>a:first-child {
  justify-self: start;
}

.landing-logo-link {
  justify-self: center;
}

.landing-nav-login {
  width: auto;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Final night-mode polish for controls, modals, and task assignment */
.notify-btn.icon-btn,
#settingsMenuBtn.icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #0f4d67;
  background:
    radial-gradient(120px 70px at 72% 0, rgba(34, 211, 238, 0.18), transparent 62%),
    rgba(255, 255, 255, 0.82);
}

.notify-btn.icon-btn:hover,
#settingsMenuBtn.icon-btn:hover {
  color: #075985;
  border-color: rgba(8, 145, 178, 0.28);
}

.icon-bell::before,
.icon-gear::before {
  content: "";
  position: absolute;
  inset: 0.05rem;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: currentColor;
  clip-path: none;
}

.icon-bell::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 22a2.6 2.6 0 0 0 2.45-1.75h-4.9A2.6 2.6 0 0 0 12 22Zm7.4-5.2-1.55-2.05V10.5A5.88 5.88 0 0 0 14 4.95V3a2 2 0 1 0-4 0v1.95a5.88 5.88 0 0 0-3.85 5.55v4.25L4.6 16.8A1.38 1.38 0 0 0 5.7 19h12.6a1.38 1.38 0 0 0 1.1-2.2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 22a2.6 2.6 0 0 0 2.45-1.75h-4.9A2.6 2.6 0 0 0 12 22Zm7.4-5.2-1.55-2.05V10.5A5.88 5.88 0 0 0 14 4.95V3a2 2 0 1 0-4 0v1.95a5.88 5.88 0 0 0-3.85 5.55v4.25L4.6 16.8A1.38 1.38 0 0 0 5.7 19h12.6a1.38 1.38 0 0 0 1.1-2.2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.icon-gear::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M19.14 12.94c.04-.31.06-.63.06-.94s-.02-.63-.06-.94l2.03-1.58a.7.7 0 0 0 .16-.9l-1.92-3.32a.7.7 0 0 0-.85-.31l-2.39.96a7.2 7.2 0 0 0-1.63-.94L14.18 2.4a.7.7 0 0 0-.69-.58h-3.84a.7.7 0 0 0-.69.58l-.36 2.57c-.58.23-1.12.54-1.63.94l-2.39-.96a.7.7 0 0 0-.85.31L1.81 8.58a.7.7 0 0 0 .16.9L4 11.06c-.04.31-.07.63-.07.94s.03.63.07.94l-2.03 1.58a.7.7 0 0 0-.16.9l1.92 3.32c.18.31.55.44.85.31l2.39-.96c.5.39 1.04.71 1.63.94l.36 2.57c.05.34.35.58.69.58h3.84c.34 0 .64-.24.69-.58l.36-2.57c.58-.23 1.12-.54 1.63-.94l2.39.96c.31.13.68 0 .85-.31l1.92-3.32a.7.7 0 0 0-.16-.9l-2.03-1.58ZM11.57 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M19.14 12.94c.04-.31.06-.63.06-.94s-.02-.63-.06-.94l2.03-1.58a.7.7 0 0 0 .16-.9l-1.92-3.32a.7.7 0 0 0-.85-.31l-2.39.96a7.2 7.2 0 0 0-1.63-.94L14.18 2.4a.7.7 0 0 0-.69-.58h-3.84a.7.7 0 0 0-.69.58l-.36 2.57c-.58.23-1.12.54-1.63.94l-2.39-.96a.7.7 0 0 0-.85.31L1.81 8.58a.7.7 0 0 0 .16.9L4 11.06c-.04.31-.07.63-.07.94s.03.63.07.94l-2.03 1.58a.7.7 0 0 0-.16.9l1.92 3.32c.18.31.55.44.85.31l2.39-.96c.5.39 1.04.71 1.63.94l.36 2.57c.05.34.35.58.69.58h3.84c.34 0 .64-.24.69-.58l.36-2.57c.58-.23 1.12-.54 1.63-.94l2.39.96c.31.13.68 0 .85-.31l1.92-3.32a.7.7 0 0 0-.16-.9l-2.03-1.58ZM11.57 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.icon-bell::after,
.icon-gear::after {
  display: none;
}

html[data-theme="dark"] .notify-btn.icon-btn,
html[data-theme="dark"] #settingsMenuBtn.icon-btn {
  color: #bff4ff;
  border-color: rgba(125, 211, 252, 0.24);
  background:
    radial-gradient(120px 70px at 74% 0, rgba(34, 211, 238, 0.2), transparent 62%),
    rgba(17, 27, 45, 0.82);
}

html[data-theme="dark"] .landing-btn.secondary {
  border-color: rgba(125, 211, 252, 0.28);
  background:
    radial-gradient(140px 80px at 80% 0, rgba(34, 211, 238, 0.12), transparent 62%),
    rgba(17, 27, 45, 0.86);
  color: var(--text);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .landing-btn.secondary:hover {
  border-color: rgba(125, 211, 252, 0.44);
  background:
    radial-gradient(140px 80px at 80% 0, rgba(34, 211, 238, 0.18), transparent 62%),
    rgba(30, 41, 59, 0.94);
}

html[data-theme="dark"] .assignee-field {
  border-color: rgba(125, 211, 252, 0.2);
  background:
    radial-gradient(260px 120px at 100% 0, rgba(34, 211, 238, 0.08), transparent 64%),
    rgba(7, 13, 25, 0.58);
}

html[data-theme="dark"] .assignee-field-head {
  color: var(--text);
}

html[data-theme="dark"] .assignee-field-head small,
html[data-theme="dark"] .assignee-chip small {
  color: var(--text-muted);
}

html[data-theme="dark"] .assignee-chip {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(17, 27, 45, 0.84);
  color: var(--text);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .assignee-chip:hover {
  border-color: rgba(125, 211, 252, 0.34);
  background: rgba(30, 41, 59, 0.92);
}

html[data-theme="dark"] .assignee-chip.selected {
  border-color: rgba(103, 232, 249, 0.58);
  background:
    linear-gradient(180deg, rgba(8, 47, 73, 0.96), rgba(12, 74, 110, 0.74));
  color: #f8fbff;
  box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.16), 0 14px 28px rgba(0, 0, 0, 0.28);
}

/* Chat night-mode completion */
.chat-fab-btn {
  min-width: 142px;
  border: 1px solid rgba(103, 232, 249, 0.28);
  background:
    radial-gradient(96px 56px at 78% 0, rgba(255, 255, 255, 0.22), transparent 64%),
    linear-gradient(135deg, #075985, #0891b2 58%, #22d3ee);
}

.chat-fab-icon {
  position: relative;
  width: 1.16rem;
  height: 1.16rem;
  flex: 0 0 auto;
  color: currentColor;
}

.chat-fab-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4.7 18.55A8.85 8.85 0 0 1 3 13.35C3 8.2 7.25 4 12.5 4S22 8.2 22 13.35s-4.25 9.35-9.5 9.35a9.8 9.8 0 0 1-4.3-.98l-4.63.98a.73.73 0 0 1-.84-.91l1.97-3.24ZM8 12.25a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5Zm4.5 0a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5Zm4.5 0a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4.7 18.55A8.85 8.85 0 0 1 3 13.35C3 8.2 7.25 4 12.5 4S22 8.2 22 13.35s-4.25 9.35-9.5 9.35a9.8 9.8 0 0 1-4.3-.98l-4.63.98a.73.73 0 0 1-.84-.91l1.97-3.24ZM8 12.25a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5Zm4.5 0a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5Zm4.5 0a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

html[data-theme="dark"] .chat-fab-btn {
  border-color: rgba(125, 211, 252, 0.36);
  background:
    radial-gradient(120px 72px at 76% 0, rgba(103, 232, 249, 0.24), transparent 62%),
    linear-gradient(135deg, #07111f, #075985 58%, #0891b2);
  color: #f8fbff;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(103, 232, 249, 0.08);
}

html[data-theme="dark"] .chat-popup {
  border-color: rgba(125, 211, 252, 0.22);
  background:
    radial-gradient(520px 260px at 96% 0, rgba(34, 211, 238, 0.09), transparent 62%),
    linear-gradient(180deg, rgba(17, 27, 45, 0.98), rgba(7, 13, 25, 0.96));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
}

html[data-theme="dark"] .chat-popup-head {
  border-bottom-color: rgba(125, 211, 252, 0.18);
  background:
    radial-gradient(280px 130px at 92% 0, rgba(103, 232, 249, 0.2), transparent 62%),
    linear-gradient(135deg, #07111f, #0f4c67 58%, #0e7490);
}

html[data-theme="dark"] #chatCloseBtn {
  border-color: rgba(125, 211, 252, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #f8fbff;
}

html[data-theme="dark"] .chat-tabs {
  background: rgba(10, 17, 30, 0.72);
  border-bottom: 1px solid rgba(125, 211, 252, 0.12);
}

html[data-theme="dark"] .chat-tab {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(17, 27, 45, 0.84);
  color: var(--text-soft);
  box-shadow: none;
}

html[data-theme="dark"] .chat-tab.active {
  border-color: rgba(103, 232, 249, 0.4);
  background: linear-gradient(135deg, #075985, #0891b2);
  color: #ffffff;
}

html[data-theme="dark"] .chat-layout {
  background: rgba(7, 13, 25, 0.42);
}

html[data-theme="dark"] .chat-conversation-list {
  border-right-color: rgba(125, 211, 252, 0.16);
  background:
    linear-gradient(180deg, rgba(10, 17, 30, 0.86), rgba(7, 13, 25, 0.72));
}

html[data-theme="dark"] .chat-conversation-item {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(17, 27, 45, 0.72);
  color: var(--text);
}

html[data-theme="dark"] .chat-conversation-item strong,
html[data-theme="dark"] .chat-thread-title,
html[data-theme="dark"] .chat-message p {
  color: var(--text);
}

html[data-theme="dark"] .chat-conversation-item small,
html[data-theme="dark"] .chat-message small {
  color: var(--text-muted);
}

html[data-theme="dark"] .chat-conversation-item:hover {
  border-color: rgba(125, 211, 252, 0.26);
  background: rgba(30, 41, 59, 0.86);
}

html[data-theme="dark"] .chat-conversation-item.selected {
  border-color: rgba(103, 232, 249, 0.48);
  background:
    radial-gradient(160px 80px at 100% 0, rgba(34, 211, 238, 0.16), transparent 64%),
    rgba(8, 47, 73, 0.72);
}

html[data-theme="dark"] .chat-conversation-avatar-project .avatar-fallback {
  background: linear-gradient(135deg, #075985, #22d3ee);
  color: #f8fbff;
}

html[data-theme="dark"] .chat-thread {
  background:
    radial-gradient(420px 220px at 95% 0, rgba(34, 211, 238, 0.07), transparent 62%),
    rgba(7, 13, 25, 0.62);
}

html[data-theme="dark"] .chat-thread-head {
  border-bottom-color: rgba(125, 211, 252, 0.14);
}

html[data-theme="dark"] .chat-thread-messages {
  scrollbar-color: rgba(125, 211, 252, 0.38) rgba(7, 13, 25, 0.48);
}

html[data-theme="dark"] .chat-message {
  border-color: rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(170px 80px at 100% 0, rgba(148, 163, 184, 0.06), transparent 64%),
    rgba(17, 27, 45, 0.9);
}

html[data-theme="dark"] .chat-message.mine {
  border-color: rgba(103, 232, 249, 0.36);
  background:
    radial-gradient(160px 80px at 100% 0, rgba(34, 211, 238, 0.16), transparent 64%),
    linear-gradient(180deg, rgba(8, 47, 73, 0.96), rgba(12, 74, 110, 0.76));
}

html[data-theme="dark"] .chat-compose {
  border-top: 1px solid rgba(125, 211, 252, 0.14);
  background: rgba(10, 17, 30, 0.72);
}

html[data-theme="dark"] .chat-compose textarea {
  border-color: rgba(125, 211, 252, 0.22);
  background: rgba(7, 13, 25, 0.78);
  color: var(--text);
}

html[data-theme="dark"] .chat-compose textarea::placeholder {
  color: rgba(145, 164, 184, 0.78);
}

@media (max-width: 640px) {
  .chat-fab-btn span:last-child {
    display: none;
  }

  .chat-fab-btn {
    min-width: 0;
    width: 54px;
    height: 54px;
    padding: 0;
  }
}

/* Workspace, archive, activity, comments, and unread chat badges */
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.workspace-section {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.64);
}

.workspace-section h4 {
  margin: 0 0 0.7rem;
}

.workspace-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 0.76rem;
  background: rgba(255, 255, 255, 0.72);
}

.workspace-task-row strong,
.workspace-task-row small {
  display: block;
}

.workspace-task-row small {
  margin-top: 0.18rem;
  color: var(--text-muted);
}

.archived-pill {
  width: fit-content;
  margin-top: 0.5rem;
}

.task-details-body {
  display: grid;
  gap: 1rem;
}

.task-details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.task-details-grid article {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.68);
}

.task-details-grid span {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.task-details-description {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  color: var(--text-soft);
  background: rgba(248, 251, 253, 0.76);
  line-height: 1.55;
}

.task-comments-panel {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.compact-title-row {
  margin-bottom: 0.7rem;
  padding-bottom: 0;
  border-bottom: 0;
}

.task-comment-card p {
  margin: 0.45rem 0 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.activity-timeline {
  display: grid;
  gap: 0.75rem;
  position: relative;
}

.activity-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.68);
}

.activity-dot {
  width: 0.76rem;
  height: 0.76rem;
  margin-top: 0.22rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 0 6px rgba(8, 145, 178, 0.12);
}

.audit-item {
  border-left: 5px solid rgba(8, 145, 178, 0.5);
}

.audit-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
}

.audit-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.28rem;
}

.audit-type {
  width: fit-content;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  background: rgba(224, 242, 254, 0.8);
  color: #075985;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.audit-sprint { border-left-color: #0891b2; }
.audit-task { border-left-color: #2563eb; }
.audit-team { border-left-color: #f97316; }
.audit-project { border-left-color: #0f766e; }
.audit-comment { border-left-color: #7c3aed; }

.audit-team .audit-type {
  background: rgba(255, 237, 213, 0.88);
  color: #c2410c;
}

.activity-item strong,
.activity-item small {
  display: block;
}

.activity-item small {
  margin-top: 0.2rem;
  color: var(--text-muted);
}

.due-overdue {
  border-color: rgba(225, 29, 72, 0.34) !important;
  background: #fff1f2 !important;
  color: #be123c !important;
}

.due-soon {
  border-color: rgba(217, 119, 6, 0.34) !important;
  background: #fffbeb !important;
  color: #92400e !important;
}

.chat-unread-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.2rem;
  min-width: 1.35rem;
  height: 1.35rem;
  border: 2px solid #ffffff;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0 0.28rem;
  background: #e11d48;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.chat-conversation-unread {
  width: 0.58rem;
  height: 0.58rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #0891b2;
  box-shadow: 0 0 0 5px rgba(8, 145, 178, 0.12);
}

.chat-conversation-item.unread strong {
  color: var(--primary);
}

.chat-fab-btn.has-unread {
  box-shadow: 0 24px 56px rgba(14, 116, 144, 0.34), 0 0 0 5px rgba(225, 29, 72, 0.08);
}

html[data-theme="dark"] .workspace-section,
html[data-theme="dark"] .workspace-task-row,
html[data-theme="dark"] .task-details-grid article,
html[data-theme="dark"] .task-details-description,
html[data-theme="dark"] .activity-item {
  border-color: rgba(125, 211, 252, 0.18);
  background:
    radial-gradient(220px 110px at 100% 0, rgba(34, 211, 238, 0.06), transparent 62%),
    rgba(17, 27, 45, 0.78);
  color: var(--text);
}

html[data-theme="dark"] .due-overdue {
  border-color: rgba(251, 113, 133, 0.38) !important;
  background: rgba(127, 29, 29, 0.38) !important;
  color: #fecdd3 !important;
}

html[data-theme="dark"] .due-soon {
  border-color: rgba(251, 191, 36, 0.38) !important;
  background: rgba(120, 53, 15, 0.34) !important;
  color: #fde68a !important;
}

html[data-theme="dark"] .chat-unread-badge {
  border-color: #07111f;
  background: #fb7185;
}

html[data-theme="dark"] .chat-conversation-unread {
  background: #67e8f9;
  box-shadow: 0 0 0 5px rgba(103, 232, 249, 0.12);
}

@media (max-width: 760px) {
  .workspace-grid,
  .task-details-grid {
    grid-template-columns: 1fr;
  }

  .workspace-task-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Professional board/task page refinement */
.board-page {
  max-width: 1680px;
}

.board-shell {
  border-radius: 34px;
  padding: clamp(1rem, 2vw, 1.6rem);
  background:
    radial-gradient(620px 300px at 100% 0, rgba(14, 165, 233, 0.1), transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 253, 0.84));
}

.board-command-center {
  align-items: stretch;
  border-radius: 28px;
  margin-bottom: 1rem;
  padding: clamp(1rem, 2vw, 1.35rem);
}

.board-command-copy {
  display: grid;
  align-content: center;
  gap: 0.28rem;
  min-width: 0;
}

.board-command-copy h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.board-context-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.board-context-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.board-command-center .board-toolbar {
  justify-content: flex-end;
  align-content: center;
  align-items: center;
}

.board-command-center .board-toolbar > button,
.board-command-center .settings-menu > button {
  min-height: 44px;
}

.metric-strip {
  gap: 0.85rem;
  margin: 0 0 1rem;
}

.metric-strip .metric-card {
  min-height: 92px;
  padding: 1rem;
}

.metric-strip .metric-card span {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-strip .metric-card strong {
  margin-top: 0.2rem;
  font-size: 1.65rem;
}

.board-wrap {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 30px;
  padding: 0.85rem;
  background:
    radial-gradient(520px 260px at 100% 0, rgba(8, 145, 178, 0.06), transparent 64%),
    rgba(241, 247, 250, 0.58);
}

.board {
  grid-template-columns: repeat(5, minmax(300px, 1fr));
  min-width: 1560px;
  gap: 1rem;
}

.column {
  min-height: 64vh;
  border-radius: 26px;
  padding: 0.9rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 253, 0.86));
}

.column-head {
  position: sticky;
  top: 5.75rem;
  z-index: 2;
  margin: -0.15rem -0.1rem 0.85rem;
  padding: 0.4rem 0.25rem 0.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78));
  backdrop-filter: blur(12px);
}

.column-head-main h4 {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.column-collapse-btn {
  min-width: 58px;
  min-height: 34px;
  padding: 0.34rem 0.58rem;
}

.task-card {
  display: grid;
  gap: 0.7rem;
  border-radius: 22px;
  padding: 0.95rem;
  margin-bottom: 0.75rem;
  background:
    radial-gradient(220px 120px at 100% 0, rgba(14, 165, 233, 0.06), transparent 62%),
    #ffffff;
}

.task-card-top {
  align-items: flex-start;
}

.task-title-block {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

.task-id {
  width: fit-content;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  padding: 0.16rem 0.48rem;
  color: var(--text-muted);
  background: rgba(248, 250, 252, 0.86);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 900;
}

.task-card strong {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.task-desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.task-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.task-meta-grid .task-meta-pill {
  display: grid;
  gap: 0.14rem;
  border-radius: 14px;
  padding: 0.48rem 0.56rem;
  font-size: 0.78rem;
  line-height: 1.15;
}

.task-meta-pill small {
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-people-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.task-person-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 0.38rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 0.24rem 0.52rem 0.24rem 0.28rem;
  background: rgba(248, 250, 252, 0.86);
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 800;
}

.task-person-pill::first-letter {
  color: var(--primary);
}

.task-person-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-person-pill.muted {
  padding-left: 0.52rem;
  color: var(--text-muted);
}

.task-assigned-tag,
.task-working-pill {
  width: fit-content;
  margin: 0;
}

.task-card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.task-card-actions button,
.task-activity-btn {
  width: 100%;
  margin: 0;
}

.task-move-btn {
  background: linear-gradient(135deg, #075985, #0891b2);
}

.task-settings-trigger {
  border-radius: 14px;
}

html[data-theme="dark"] .board-shell,
html[data-theme="dark"] .board-command-center,
html[data-theme="dark"] .board-wrap {
  border-color: rgba(125, 211, 252, 0.16);
  background:
    radial-gradient(620px 300px at 100% 0, rgba(34, 211, 238, 0.08), transparent 64%),
    linear-gradient(180deg, rgba(17, 27, 45, 0.88), rgba(7, 13, 25, 0.82));
}

html[data-theme="dark"] .column {
  border-color: rgba(125, 211, 252, 0.16);
  background:
    linear-gradient(180deg, rgba(17, 27, 45, 0.9), rgba(10, 17, 30, 0.82));
}

html[data-theme="dark"] .column-head {
  background: linear-gradient(180deg, rgba(17, 27, 45, 0.94), rgba(17, 27, 45, 0.74));
}

html[data-theme="dark"] .task-card {
  border-color: rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(220px 120px at 100% 0, rgba(34, 211, 238, 0.07), transparent 62%),
    rgba(17, 27, 45, 0.9);
}

html[data-theme="dark"] .task-id,
html[data-theme="dark"] .task-person-pill,
html[data-theme="dark"] .task-meta-grid .task-meta-pill {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(7, 13, 25, 0.55);
}

@media (max-width: 900px) {
  .board-command-center {
    flex-direction: column;
  }

  .board-command-center .board-toolbar {
    justify-content: stretch;
  }

  .board-command-center .board-toolbar > button,
  .board-command-center .settings-menu,
  .board-command-center .settings-menu > button {
    width: 100%;
  }

  .board-wrap {
    border-radius: 24px;
    padding: 0.65rem;
  }
}

@media (max-width: 640px) {
  .board {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(88vw, 88vw);
    min-width: 0;
  }

  .column {
    min-height: 66dvh;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Final board focus controls and icon alignment */
.board-command-center .settings-menu {
  display: inline-flex;
  align-items: center;
}

.board-command-center .board-toolbar {
  gap: 0.6rem;
}

.board-command-center .board-toolbar > button.active,
.board-command-center .board-toolbar > button[aria-pressed="true"] {
  color: #075985;
  border-color: rgba(8, 145, 178, 0.34);
  background:
    radial-gradient(120px 80px at 80% 0, rgba(34, 211, 238, 0.18), transparent 62%),
    linear-gradient(180deg, rgba(224, 242, 254, 0.92), rgba(255, 255, 255, 0.84));
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.12);
}

.icon-btn,
.task-settings-trigger.icon-btn,
.notify-btn.icon-btn,
#settingsMenuBtn.icon-btn {
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.icon-inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.46rem;
}

.icon-bell,
.icon-filter,
.icon-gear,
.icon-back {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1.12rem;
  height: 1.12rem;
  flex: 0 0 1.12rem;
  line-height: 1;
}

.icon-bell::before,
.icon-filter::before,
.icon-gear::before {
  content: "";
  position: static;
  inset: auto;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: currentColor;
  clip-path: none;
  transform: none;
}

.icon-filter::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 6.5A1.5 1.5 0 0 1 5.5 5h13A1.5 1.5 0 0 1 20 6.5v.4c0 .4-.16.78-.44 1.06L14 13.52V19a1 1 0 0 1-1.45.9l-3-1.5A1 1 0 0 1 9 17.5v-3.98L3.44 7.96A1.5 1.5 0 0 1 3 6.9v-.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 6.5A1.5 1.5 0 0 1 5.5 5h13A1.5 1.5 0 0 1 20 6.5v.4c0 .4-.16.78-.44 1.06L14 13.52V19a1 1 0 0 1-1.45.9l-3-1.5A1 1 0 0 1 9 17.5v-3.98L3.44 7.96A1.5 1.5 0 0 1 3 6.9v-.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.icon-bell::after,
.icon-filter::after,
.icon-gear::after {
  display: none;
}

.task-settings-trigger.icon-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 14px;
}

.task-card-actions {
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  align-items: stretch;
}

.task-card-actions .task-move-btn {
  grid-column: 1 / -1;
}

html[data-theme="dark"] .board-command-center .board-toolbar > button.active,
html[data-theme="dark"] .board-command-center .board-toolbar > button[aria-pressed="true"] {
  color: #bff4ff;
  border-color: rgba(125, 211, 252, 0.32);
  background:
    radial-gradient(120px 80px at 80% 0, rgba(34, 211, 238, 0.22), transparent 62%),
    rgba(14, 23, 39, 0.9);
}

/* Fix board column headers rendering in the middle of task lists */
.board .column {
  display: flex;
  flex-direction: column;
}

.board .column-head {
  position: relative;
  top: auto;
  z-index: 1;
  order: 0;
  flex: 0 0 auto;
  margin: 0 0 0.85rem;
  padding: 0.25rem 0 0.75rem;
}

.board .column-body {
  order: 1;
  flex: 1 1 auto;
  min-height: 0;
}

/* Keep board toolbar controls stable when toggle labels change */
.board-command-center .board-toolbar {
  display: grid;
  grid-template-columns: 112px 120px 172px 46px;
  justify-content: end;
  align-items: center;
  width: min(100%, 580px);
}

.board-command-center #openCreateTaskBtn {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 54px;
  padding-block: 0.95rem;
  font-size: 0.98rem;
  font-weight: 900;
}

.board-command-center #toggleMyTasksBtn,
.board-command-center #openFilterModalBtn,
.board-command-center #toggleMetricsBtn {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.board-command-center .settings-menu {
  width: 46px;
  min-width: 46px;
}

.board-command-center #settingsMenuBtn {
  width: 46px;
  min-width: 46px;
}

/* Professional task filter modal */
.filter-modal-card {
  width: min(760px, 95vw);
}

.task-filter-panel {
  display: grid;
  gap: 1rem;
}

.filter-search-field {
  display: grid;
  gap: 0.42rem;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-search-field input {
  min-height: 48px;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
  text-transform: none;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.78rem;
}

.filter-grid label {
  display: grid;
  gap: 0.42rem;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-grid select {
  min-height: 46px;
  border-radius: 16px;
  padding: 0.66rem 0.82rem;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-transform: none;
}

.filter-toggle-card {
  margin: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  padding: 0.8rem 0.9rem;
  background:
    radial-gradient(180px 90px at 100% 0, rgba(14, 165, 233, 0.08), transparent 62%),
    rgba(248, 250, 252, 0.78);
}

.filter-actions {
  margin-top: 1rem;
}

html[data-theme="dark"] .filter-search-field input,
html[data-theme="dark"] .filter-grid select,
html[data-theme="dark"] .filter-toggle-card {
  border-color: rgba(125, 211, 252, 0.18);
  background:
    radial-gradient(180px 90px at 100% 0, rgba(34, 211, 238, 0.08), transparent 62%),
    rgba(7, 13, 25, 0.58);
  color: var(--text);
}

@media (max-width: 640px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .board-command-center .board-toolbar {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .board-command-center #openCreateTaskBtn,
  .board-command-center #toggleMyTasksBtn,
  .board-command-center #openFilterModalBtn,
  .board-command-center #toggleMetricsBtn,
  .board-command-center .settings-menu,
  .board-command-center #settingsMenuBtn {
    width: 100%;
  }

  .board-command-center .settings-menu {
    min-width: 0;
  }
}

/* Custom project roles and sprint planning */
.setup-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}

.setup-choice-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 116px;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(220px 110px at 100% 0, rgba(14, 165, 233, 0.08), transparent 64%),
    var(--surface-soft);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.setup-choice-card:hover,
.setup-choice-card.selected {
  transform: translateY(-2px);
  border-color: rgba(14, 116, 144, 0.42);
  box-shadow: var(--shadow-soft);
}

.setup-choice-card input {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  accent-color: var(--primary);
}

.setup-choice-card strong,
.role-editor-head strong,
.sprint-card strong {
  color: var(--text);
}

.setup-choice-card small {
  display: block;
  margin-top: 0.28rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.project-default-sprint {
  margin: 0.75rem 0 1rem;
}

.custom-project-settings,
.team-roles-section,
.sprint-create-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1rem;
  background:
    radial-gradient(320px 170px at 100% 0, rgba(34, 211, 238, 0.08), transparent 60%),
    rgba(248, 250, 252, 0.72);
}

.team-roles-section {
  grid-column: 1 / -1;
}

.role-editor-stack {
  display: grid;
  gap: 0.8rem;
}

.role-summary-card {
  display: grid;
  gap: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--role-color, #2563eb) 28%, var(--line));
  border-radius: 20px;
  padding: 0.95rem;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--role-color, #2563eb) 10%, transparent), transparent 48%),
    var(--surface);
  box-shadow: 0 14px 34px rgba(15, 29, 55, 0.06);
}

.role-summary-card.role-summary-authority {
  position: relative;
  border-color: rgba(249, 115, 22, 0.58);
  background:
    radial-gradient(260px 150px at 100% 0, rgba(251, 146, 60, 0.18), transparent 64%),
    linear-gradient(90deg, rgba(249, 115, 22, 0.16), transparent 52%),
    var(--surface);
  box-shadow:
    0 0 0 1px rgba(249, 115, 22, 0.1),
    0 18px 42px rgba(154, 52, 18, 0.14);
}

.role-summary-card.role-summary-authority .role-color-dot {
  background: linear-gradient(180deg, #ef4444, #f97316);
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.34);
}

.role-summary-card.role-summary-authority .role-summary-head strong {
  color: #9a3412;
}

.role-summary-card.role-summary-authority .role-summary-head p {
  color: #c2410c;
  font-weight: 900;
}

.authority-badge {
  border-color: rgba(249, 115, 22, 0.42);
  background: rgba(255, 237, 213, 0.92);
  color: #9a3412;
  font-weight: 900;
}

.role-summary-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.role-summary-head p {
  margin: 0.18rem 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.role-summary-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.role-summary-permissions span {
  border: 1px solid color-mix(in srgb, var(--role-color, #2563eb) 24%, var(--line));
  border-radius: 999px;
  padding: 0.32rem 0.58rem;
  background: color-mix(in srgb, var(--role-color, #2563eb) 9%, #ffffff);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.role-editor-card {
  border: 1px solid color-mix(in srgb, var(--role-color, #2563eb) 28%, var(--line));
  border-radius: 20px;
  padding: 0.95rem;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--role-color, #2563eb) 12%, transparent), transparent 44%),
    var(--surface);
  box-shadow: 0 14px 34px rgba(15, 29, 55, 0.06);
}

.role-editor-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
}

.role-editor-head label {
  margin: 0;
}

.role-editor-head label span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.role-color-dot {
  width: 18px;
  height: 48px;
  border-radius: 999px;
  background: var(--role-color, #2563eb);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--role-color, #2563eb) 30%, transparent);
}

.role-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.role-color-choice {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--role-color);
  box-shadow: none;
}

.role-color-choice:hover,
.role-color-choice.selected {
  transform: translateY(-1px) scale(1.05);
  border-color: var(--surface-solid, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--role-color) 28%, transparent);
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.permission-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.68rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 800;
}

.permission-toggle input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.role-modal-section {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.task-sprint-required-state {
  display: grid;
  gap: 0.9rem;
  border: 1px solid rgba(14, 116, 144, 0.24);
  border-radius: 24px;
  padding: 1rem;
  background:
    radial-gradient(300px 160px at 100% 0, rgba(34, 211, 238, 0.14), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 248, 251, 0.86));
}

.task-sprint-required-state p {
  margin: 0.28rem 0 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.task-sprint-required-state button {
  width: fit-content;
}

.task-form-fields {
  display: grid;
  gap: 0.85rem;
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(12px);
}

.onboarding-card {
  position: relative;
  width: min(100%, 540px);
  border: 1px solid rgba(14, 116, 144, 0.22);
  border-radius: 30px;
  padding: clamp(1.1rem, 3vw, 1.5rem);
  background:
    radial-gradient(360px 180px at 100% 0, rgba(34, 211, 238, 0.14), transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(241, 248, 251, 0.94));
  box-shadow: 0 30px 90px rgba(15, 29, 55, 0.22);
}

.onboarding-card h3 {
  margin: 0.15rem 0 0.45rem;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
}

.onboarding-card .modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.onboarding-dots {
  display: flex;
  gap: 0.35rem;
  margin: 1rem 0;
}

.onboarding-dots span {
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.26);
}

.onboarding-dots span.active {
  width: 1.6rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.onboarding-launcher {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 65;
  min-height: 42px;
  padding-inline: 1rem;
}

html[data-theme="dark"] .onboarding-card {
  border-color: rgba(125, 211, 252, 0.18);
  background:
    radial-gradient(360px 180px at 100% 0, rgba(34, 211, 238, 0.12), transparent 64%),
    linear-gradient(180deg, rgba(17, 27, 45, 0.98), rgba(7, 13, 25, 0.96));
}

.onboarding-tour-overlay {
  display: block;
  z-index: 150;
  pointer-events: none;
  background: rgba(6, 13, 25, 0.44);
  backdrop-filter: blur(3px);
  background: transparent;
  backdrop-filter: none;
}

.onboarding-tour-overlay[hidden] {
  display: none;
}

.onboarding-tour-card {
  position: fixed;
  z-index: 124;
  z-index: 3;
  pointer-events: auto;
  width: min(430px, calc(100vw - 2rem));
  max-height: min(72dvh, 560px);
  overflow: auto;
  transform-origin: top left;
  animation: guide-card-in 180ms ease both;
}

.onboarding-card-centered {
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%);
}

.onboarding-spotlight {
  position: fixed;
  z-index: 122;
  z-index: 2;
  pointer-events: none;
  border: 2px solid rgba(103, 232, 249, 0.92);
  border-radius: 22px;
  background: rgba(34, 211, 238, 0.08);
  background: transparent;
  box-shadow:
    0 0 0 9999px rgba(6, 13, 25, 0.58),
    0 0 0 9999px rgba(6, 13, 25, 0.5),
    0 0 0 8px rgba(34, 211, 238, 0.13),
    0 22px 58px rgba(8, 145, 178, 0.24);
  transition: left 180ms ease, top 180ms ease, width 180ms ease, height 180ms ease;
}

.onboarding-highlight-target {
  outline: 2px solid rgba(103, 232, 249, 0.68);
  outline-offset: 4px;
  border-radius: 18px;
  animation: guide-target-pulse 1.4s ease infinite;
}

.onboarding-prompt-mode {
  display: grid;
  place-items: center;
  pointer-events: auto;
  background: rgba(6, 13, 25, 0.44);
  backdrop-filter: blur(12px);
}

.onboarding-prompt-mode .onboarding-tour-card {
  pointer-events: auto;
}

.onboarding-launcher {
  border-color: rgba(14, 116, 144, 0.26);
  background:
    radial-gradient(120px 70px at 100% 0, rgba(34, 211, 238, 0.18), transparent 62%),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.14);
  font-weight: 900;
}

.onboarding-launcher::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.45rem;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14);
  vertical-align: 0.05rem;
}

@keyframes guide-card-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes guide-target-pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(34, 211, 238, 0.18);
  }
}

html[data-theme="dark"] .onboarding-tour-overlay {
  background: transparent;
}

html[data-theme="dark"] .onboarding-tour-overlay.onboarding-prompt-mode {
  background: rgba(2, 6, 14, 0.5);
}

html[data-theme="dark"] .onboarding-spotlight {
  border-color: rgba(125, 211, 252, 0.92);
  background: rgba(34, 211, 238, 0.09);
  background: transparent;
  box-shadow:
    0 0 0 9999px rgba(2, 6, 14, 0.66),
    0 0 0 9999px rgba(2, 6, 14, 0.58),
    0 0 0 8px rgba(34, 211, 238, 0.13),
    0 22px 58px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .onboarding-launcher {
  border-color: rgba(125, 211, 252, 0.24);
  background:
    radial-gradient(120px 70px at 100% 0, rgba(34, 211, 238, 0.15), transparent 62%),
    rgba(17, 27, 45, 0.9);
  color: #f8fbff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
}

@media (max-width: 720px) {
  .onboarding-tour-card {
    left: 0.75rem !important;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    top: auto !important;
    width: auto !important;
    max-height: 58dvh;
    border-radius: 24px;
  }

  .onboarding-card-centered {
    left: 0.75rem !important;
    right: 0.75rem;
    top: 50% !important;
    bottom: auto;
    transform: translateY(-50%);
  }

  .onboarding-launcher {
    left: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }
}

.role-pill-custom {
  background: color-mix(in srgb, var(--role-color, #2563eb) 14%, #ffffff);
  color: color-mix(in srgb, var(--role-color, #2563eb) 80%, #0f172a);
  border-color: color-mix(in srgb, var(--role-color, #2563eb) 36%, transparent);
}

.sprint-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.sprint-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.9rem;
  background: var(--surface);
}

.sprint-card p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.sprint-meta {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
}

.sprint-active-toggle-btn {
  min-height: 38px;
  margin-top: 0.25rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
}

.sprint-meta-pill {
  background:
    radial-gradient(120px 70px at 100% 0, rgba(14, 165, 233, 0.14), transparent 58%),
    rgba(224, 242, 254, 0.58);
}

.task-card.task-sprint-active:not(.assigned-to-me) {
  border-color: rgba(8, 145, 178, 0.38);
  background:
    linear-gradient(90deg, rgba(14, 165, 233, 0.15), transparent 9px),
    radial-gradient(220px 120px at 100% 0, rgba(14, 165, 233, 0.08), transparent 62%),
    #ffffff;
}

.task-card.task-sprint-other:not(.assigned-to-me) {
  border-color: rgba(245, 158, 11, 0.42);
  background:
    linear-gradient(90deg, rgba(245, 158, 11, 0.17), transparent 9px),
    radial-gradient(220px 120px at 100% 0, rgba(245, 158, 11, 0.1), transparent 62%),
    #ffffff;
}

.task-card.task-sprint-unscheduled:not(.assigned-to-me) {
  border-color: rgba(100, 116, 139, 0.28);
  background:
    linear-gradient(90deg, rgba(100, 116, 139, 0.11), transparent 9px),
    radial-gradient(220px 120px at 100% 0, rgba(100, 116, 139, 0.08), transparent 62%),
    #ffffff;
}

.task-card.task-sprint-other.assigned-to-me {
  border-color: rgba(245, 158, 11, 0.58);
}

.task-card.task-sprint-unscheduled.assigned-to-me {
  border-color: rgba(100, 116, 139, 0.42);
}

.sprint-meta-pill.sprint-tone-active {
  border-color: rgba(8, 145, 178, 0.28);
  background:
    radial-gradient(120px 70px at 100% 0, rgba(14, 165, 233, 0.16), transparent 58%),
    rgba(224, 242, 254, 0.76);
}

.sprint-meta-pill.sprint-tone-other {
  border-color: rgba(245, 158, 11, 0.3);
  background:
    radial-gradient(120px 70px at 100% 0, rgba(245, 158, 11, 0.16), transparent 58%),
    rgba(254, 243, 199, 0.72);
}

.sprint-meta-pill.sprint-tone-unscheduled {
  border-color: rgba(100, 116, 139, 0.24);
  background:
    radial-gradient(120px 70px at 100% 0, rgba(100, 116, 139, 0.12), transparent 58%),
    rgba(241, 245, 249, 0.82);
}

html[data-theme="dark"] .task-card.task-sprint-active:not(.assigned-to-me) {
  border-color: rgba(34, 211, 238, 0.32);
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.18), transparent 9px),
    radial-gradient(220px 120px at 100% 0, rgba(34, 211, 238, 0.1), transparent 62%),
    rgba(17, 27, 45, 0.92);
}

html[data-theme="dark"] .task-card.task-sprint-other:not(.assigned-to-me) {
  border-color: rgba(251, 191, 36, 0.34);
  background:
    linear-gradient(90deg, rgba(251, 191, 36, 0.16), transparent 9px),
    radial-gradient(220px 120px at 100% 0, rgba(251, 191, 36, 0.1), transparent 62%),
    rgba(17, 27, 45, 0.92);
}

html[data-theme="dark"] .task-card.task-sprint-unscheduled:not(.assigned-to-me) {
  border-color: rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.14), transparent 9px),
    radial-gradient(220px 120px at 100% 0, rgba(148, 163, 184, 0.08), transparent 62%),
    rgba(17, 27, 45, 0.92);
}

html[data-theme="dark"] .sprint-meta-pill.sprint-tone-active {
  border-color: rgba(34, 211, 238, 0.26);
  background: rgba(8, 47, 73, 0.66);
}

html[data-theme="dark"] .sprint-meta-pill.sprint-tone-other {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(69, 46, 13, 0.66);
}

html[data-theme="dark"] .sprint-meta-pill.sprint-tone-unscheduled {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.74);
}

.active-sprint-panel {
  margin: 0 0 1rem;
}

.active-sprint-hero,
.active-sprint-empty {
  border: 1px solid rgba(14, 116, 144, 0.22);
  border-radius: 30px;
  padding: clamp(1rem, 2vw, 1.25rem);
  background:
    radial-gradient(520px 260px at 100% 0, rgba(34, 211, 238, 0.16), transparent 64%),
    radial-gradient(340px 180px at 0 100%, rgba(14, 116, 144, 0.08), transparent 62%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(241, 248, 251, 0.78));
  box-shadow: 0 22px 52px rgba(15, 29, 55, 0.1);
}

.active-sprint-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 1rem;
}

.active-sprint-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.active-sprint-main h4 {
  margin: 0.18rem 0;
  color: var(--text);
  font-size: clamp(1.25rem, 2.5vw, 1.85rem);
  letter-spacing: -0.035em;
}

.active-sprint-main p,
.active-sprint-empty p {
  margin: 0;
  max-width: 780px;
  color: var(--text-muted);
}

.active-sprint-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  border: 1px solid rgba(14, 116, 144, 0.18);
  border-radius: 999px;
  padding: 0.34rem 0.62rem;
  background: rgba(224, 242, 254, 0.72);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  animation: sprint-pulse 1.8s ease infinite;
}

@keyframes sprint-pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(34, 197, 94, 0);
  }
}

.active-sprint-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.85rem 0;
}

.active-sprint-meta span,
.sprint-score-mini span {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 0.42rem 0.68rem;
  background: rgba(255, 255, 255, 0.64);
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 800;
}

.sprint-progress {
  width: 100%;
  height: 0.78rem;
  overflow: hidden;
  border: 1px solid rgba(14, 116, 144, 0.15);
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.42);
}

.sprint-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #06b6d4, #38bdf8);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
  transition: width 240ms ease;
}

.active-sprint-status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.48rem;
  margin-top: 0.85rem;
}

.sprint-health-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  border: 1px solid rgba(14, 116, 144, 0.2);
  border-radius: 22px;
  padding: 0.88rem;
  background:
    radial-gradient(220px 110px at 100% 0, rgba(34, 197, 94, 0.1), transparent 62%),
    rgba(255, 255, 255, 0.72);
}

.sprint-health-card span {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sprint-health-card strong {
  display: block;
  margin-top: 0.12rem;
  color: #047857;
  font-size: 1.25rem;
}

.sprint-health-card p {
  margin: 0.16rem 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.sprint-health-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 0.4rem;
}

.sprint-health-metrics span {
  display: grid;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 0.45rem;
  background: rgba(255, 255, 255, 0.64);
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.sprint-health-metrics strong {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

.sprint-health-watch {
  border-color: rgba(245, 158, 11, 0.34);
  background:
    radial-gradient(220px 110px at 100% 0, rgba(245, 158, 11, 0.15), transparent 62%),
    rgba(255, 251, 235, 0.74);
}

.sprint-health-watch strong {
  color: #b45309;
}

.sprint-health-risk {
  border-color: rgba(225, 29, 72, 0.34);
  background:
    radial-gradient(220px 110px at 100% 0, rgba(225, 29, 72, 0.14), transparent 62%),
    rgba(255, 241, 242, 0.74);
}

.sprint-health-risk strong {
  color: #be123c;
}

.sprint-health-planning strong {
  color: #075985;
}

.active-sprint-status-grid span {
  display: grid;
  gap: 0.1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 0.68rem;
  background: rgba(255, 255, 255, 0.58);
}

.active-sprint-status-grid small,
.sprint-score-card span {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.active-sprint-status-grid strong {
  color: var(--text);
  font-size: 1.15rem;
}

.active-sprint-side {
  display: grid;
  align-content: stretch;
  gap: 0.75rem;
}

.sprint-score-card {
  display: grid;
  align-content: center;
  min-height: 150px;
  border: 1px solid rgba(14, 116, 144, 0.18);
  border-radius: 24px;
  padding: 1rem;
  background:
    radial-gradient(180px 120px at 100% 0, rgba(34, 211, 238, 0.18), transparent 62%),
    rgba(255, 255, 255, 0.7);
}

.sprint-score-card strong {
  color: var(--text);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  letter-spacing: -0.07em;
  line-height: 1;
}

.sprint-score-card small {
  color: var(--text-muted);
  font-weight: 800;
}

.sprint-score-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.sprint-score-mini span {
  display: grid;
  border-radius: 18px;
}

.sprint-score-mini strong {
  color: var(--text);
  font-size: 1.2rem;
}

.active-sprint-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.active-sprint-details section {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.62);
}

.active-sprint-details h5 {
  margin: 0 0 0.65rem;
  color: var(--text);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sprint-assignee-row,
.sprint-task-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sprint-preview-task {
  display: inline-grid;
  gap: 0.12rem;
  min-height: 0;
  margin: 0;
  padding: 0.58rem 0.75rem;
  text-align: left;
  border-radius: 16px;
}

.sprint-preview-task span {
  color: var(--text);
  font-weight: 900;
}

.sprint-preview-task small {
  color: var(--text-muted);
  font-weight: 800;
}

/* Compact sprint focus panel */
.active-sprint-panel {
  margin-bottom: 0.75rem;
}

.active-sprint-hero,
.active-sprint-empty {
  border-radius: 24px;
  padding: clamp(0.78rem, 1.35vw, 1rem);
  background:
    radial-gradient(460px 190px at 100% 0, rgba(34, 211, 238, 0.14), transparent 64%),
    radial-gradient(300px 140px at 0 100%, rgba(14, 116, 144, 0.06), transparent 62%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(241, 248, 251, 0.76));
}

.active-sprint-hero {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 230px);
  gap: 0.75rem;
}

.active-sprint-main h4 {
  margin: 0.12rem 0;
  font-size: clamp(1.08rem, 2vw, 1.45rem);
}

.active-sprint-kicker {
  padding: 0.3rem 0.58rem;
  font-size: 0.7rem;
}

.active-sprint-meta {
  gap: 0.38rem;
  margin: 0.55rem 0;
}

.active-sprint-meta span,
.sprint-score-mini span {
  padding: 0.34rem 0.58rem;
  font-size: 0.78rem;
}

.sprint-progress {
  height: 0.56rem;
}

.sprint-health-card {
  gap: 0.65rem;
  border-radius: 18px;
  padding: 0.68rem;
}

.sprint-health-card strong {
  font-size: 1.05rem;
}

.sprint-health-card p {
  font-size: 0.78rem;
}

.sprint-health-metrics span {
  border-radius: 14px;
  padding: 0.34rem;
}

.active-sprint-status-grid {
  gap: 0.38rem;
  margin-top: 0.62rem;
}

.active-sprint-status-grid span {
  border-radius: 14px;
  padding: 0.48rem;
}

.active-sprint-status-grid strong {
  font-size: 1rem;
}

.active-sprint-side {
  gap: 0.55rem;
}

.sprint-score-card {
  min-height: 104px;
  border-radius: 20px;
  padding: 0.75rem;
}

.sprint-score-card strong {
  font-size: clamp(1.8rem, 3.6vw, 2.55rem);
}

.sprint-score-mini {
  gap: 0.4rem;
}

.sprint-score-mini strong {
  font-size: 1.05rem;
}

.active-sprint-details {
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.active-sprint-details section {
  border-radius: 20px;
  padding: 0.7rem;
}

.active-sprint-details h5 {
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.sprint-card-active {
  border-color: rgba(14, 116, 144, 0.42);
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.12);
}

html[data-theme="dark"] .setup-choice-card,
html[data-theme="dark"] .custom-project-settings,
html[data-theme="dark"] .team-roles-section,
html[data-theme="dark"] .sprint-create-card,
html[data-theme="dark"] .role-summary-card,
html[data-theme="dark"] .role-editor-card,
html[data-theme="dark"] .permission-toggle,
html[data-theme="dark"] .task-sprint-required-state,
html[data-theme="dark"] .sprint-card,
html[data-theme="dark"] .active-sprint-hero,
html[data-theme="dark"] .active-sprint-empty,
html[data-theme="dark"] .active-sprint-details section,
html[data-theme="dark"] .active-sprint-status-grid span,
html[data-theme="dark"] .sprint-health-card,
html[data-theme="dark"] .sprint-score-card {
  border-color: rgba(125, 211, 252, 0.18);
  background:
    radial-gradient(260px 140px at 100% 0, rgba(34, 211, 238, 0.09), transparent 64%),
    rgba(7, 13, 25, 0.68);
}

html[data-theme="dark"] .active-sprint-kicker,
html[data-theme="dark"] .active-sprint-meta span,
html[data-theme="dark"] .sprint-health-metrics span,
html[data-theme="dark"] .sprint-score-mini span {
  border-color: rgba(125, 211, 252, 0.16);
  background: rgba(17, 27, 45, 0.72);
  color: var(--text);
}

html[data-theme="dark"] .audit-type {
  background: rgba(8, 47, 73, 0.72);
  color: #bae6fd;
}

html[data-theme="dark"] .audit-team .audit-type {
  background: rgba(67, 30, 12, 0.76);
  color: #fed7aa;
}

html[data-theme="dark"] .sprint-progress {
  border-color: rgba(125, 211, 252, 0.18);
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .role-pill-custom {
  background: color-mix(in srgb, var(--role-color, #38bdf8) 20%, rgba(7, 13, 25, 0.86));
  color: color-mix(in srgb, var(--role-color, #38bdf8) 52%, #e5eef8);
  border-color: color-mix(in srgb, var(--role-color, #38bdf8) 46%, rgba(125, 211, 252, 0.12));
}

html[data-theme="dark"] .permission-toggle {
  color: var(--text);
}

html[data-theme="dark"] .role-summary-permissions span {
  background: color-mix(in srgb, var(--role-color, #38bdf8) 14%, rgba(7, 13, 25, 0.86));
  color: var(--text);
  border-color: color-mix(in srgb, var(--role-color, #38bdf8) 34%, rgba(125, 211, 252, 0.12));
}

html[data-theme="dark"] .role-summary-card.role-summary-authority {
  border-color: rgba(251, 146, 60, 0.52);
  background:
    radial-gradient(260px 150px at 100% 0, rgba(251, 146, 60, 0.18), transparent 64%),
    linear-gradient(90deg, rgba(249, 115, 22, 0.14), transparent 52%),
    rgba(17, 27, 45, 0.92);
  box-shadow:
    0 0 0 1px rgba(251, 146, 60, 0.12),
    0 18px 42px rgba(7, 13, 25, 0.28);
}

html[data-theme="dark"] .role-summary-card.role-summary-authority .role-summary-head strong,
html[data-theme="dark"] .role-summary-card.role-summary-authority .role-summary-head p {
  color: #fed7aa;
}

html[data-theme="dark"] .authority-badge {
  border-color: rgba(251, 146, 60, 0.36);
  background: rgba(67, 30, 12, 0.78);
  color: #fed7aa;
}

@media (max-width: 760px) {
  .setup-choice-grid,
  .permission-grid,
  .sprint-card,
  .active-sprint-hero,
  .active-sprint-details {
    grid-template-columns: 1fr;
  }

  .active-sprint-empty {
    display: grid;
  }

  .active-sprint-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-editor-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .role-editor-head .badge-soft,
  .role-editor-head button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .sprint-meta {
    justify-items: start;
  }
}

/* Complete phone viewport pass */
@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    min-width: 0;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
  }

  *,
  *::before,
  *::after {
    min-width: 0;
  }

  img,
  svg {
    max-width: 100%;
  }

  input,
  select,
  textarea {
    min-height: 46px;
    font-size: 16px;
  }

  textarea {
    min-height: 112px;
  }

  button,
  .btn-link,
  .landing-btn {
    min-height: 46px;
    touch-action: manipulation;
  }

  .page,
  .board-page {
    width: 100%;
    margin: 0;
    padding: 0.75rem 0.65rem calc(1.2rem + env(safe-area-inset-bottom));
  }

  .page-stack {
    gap: 0.78rem;
  }

  .panel,
  .card-lg,
  .project-card,
  .project-card-spacious,
  .metric-card,
  .list-item,
  .comment-card {
    border-radius: 22px;
  }

  .panel {
    padding: 1rem;
  }

  .panel-title-row,
  .project-head,
  .project-meta-row,
  .compact-title-row {
    align-items: stretch;
    flex-direction: column;
    gap: 0.7rem;
  }

  .panel-title-row > div,
  .panel-title-row .inline-tools,
  .inline-tools,
  .panel-tools,
  .form-grid,
  .team-layout,
  .workspace-grid,
  .task-details-grid,
  .filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .inline-tools > *,
  .panel-tools > *,
  .form-grid > *,
  .filter-grid > *,
  .panel-title-row button {
    width: 100%;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    width: 100%;
    min-height: 66px;
    padding: calc(0.55rem + env(safe-area-inset-top)) 0.7rem 0.55rem;
    border-radius: 0 0 22px 22px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(247, 251, 253, 0.9);
    backdrop-filter: blur(18px);
  }

  .top-left {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-lockup {
    min-width: 0;
    gap: 0.55rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }

  .brand-lockup h2,
  .top-center-title h2 {
    max-width: 44vw;
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-lockup .eyebrow,
  .top-center-title .eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
  }

  .top-actions {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 0.45rem;
  }

  .notify-btn.icon-btn,
  #settingsMenuBtn.icon-btn,
  .profile-trigger {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 14px;
  }

  .profile-dropdown,
  .settings-dropdown {
    position: fixed;
    top: calc(62px + env(safe-area-inset-top));
    right: 0.55rem;
    left: 0.55rem;
    width: auto;
    max-width: none;
    border-radius: 22px;
    padding: 0.7rem;
  }

  .drawer-overlay {
    align-items: end;
    justify-content: stretch;
  }

  .drawer {
    width: 100%;
    height: min(86dvh, 86vh);
    border-left: 0;
    border-radius: 26px 26px 0 0;
    padding: 1rem 0.9rem calc(1rem + env(safe-area-inset-bottom));
  }

  .drawer-head,
  .modal-head {
    position: sticky;
    top: -1rem;
    z-index: 3;
    margin: -1rem -0.9rem 0.75rem;
    padding: 1rem 0.9rem 0.75rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
  }

  .modal-overlay {
    place-items: end center;
    padding: 0.5rem;
  }

  .modal-card,
  .modal-card.modal-lg,
  .modal-card.modal-xl,
  .landing-auth-card,
  .filter-modal-card {
    width: 100%;
    max-height: min(92dvh, 92vh);
    overflow-y: auto;
    border-radius: 26px 26px 0 0;
    padding: 1rem 0.9rem calc(1rem + env(safe-area-inset-bottom));
  }

  .filter-search-field input {
    border-radius: 18px;
  }

  .filter-actions {
    grid-template-columns: 1fr;
  }

  .landing-shell {
    overflow-x: hidden;
  }

  .landing-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    min-height: 68px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.4rem;
    padding: calc(0.55rem + env(safe-area-inset-top)) 0.75rem 0.55rem;
  }

  .landing-nav::before {
    inset: 0;
    border-radius: 0 0 22px 22px;
  }

  .landing-nav > a:first-child {
    display: none;
  }

  .landing-logo-link {
    grid-column: 2;
  }

  .landing-logo-link img {
    width: 46px;
    height: 46px;
  }

  .landing-nav-actions {
    grid-column: 3;
    justify-self: end;
    gap: 0.35rem;
  }

  .landing-theme-toggle {
    width: 42px;
    min-width: 42px;
    padding-inline: 0;
  }

  .landing-theme-toggle span:last-child {
    display: none;
  }

  .landing-nav-login {
    min-height: 40px;
    padding: 0.55rem 0.74rem;
    font-size: 0.78rem;
  }

  .landing-hero {
    min-height: min(700px, calc(100dvh - 68px));
    padding: 3.5rem 0.75rem 9rem;
  }

  .landing-kicker {
    width: fit-content;
    max-width: calc(100vw - 2rem);
    margin-inline: auto;
    text-align: center;
  }

  .landing-hero h1 {
    display: grid;
    gap: 0;
    margin-top: 1.7rem;
    font-size: clamp(3.85rem, 19vw, 6.8rem);
    line-height: 0.88;
    text-align: center;
  }

  .landing-hero > p {
    position: relative;
    inset: auto;
    z-index: 5;
    width: min(100%, 31rem);
    margin: 1rem auto 0;
    font-size: 0.98rem;
    text-align: center;
  }

  .landing-planet {
    width: 145vw;
    bottom: -62vw;
  }

  .landing-section,
  .landing-final {
    width: calc(100% - 1.2rem);
    padding: 2.1rem 0;
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
  }

  .landing-feature-grid article,
  .landing-final {
    border-radius: 24px;
  }

  .landing-final {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
  }

  .landing-final h2 {
    font-size: clamp(1.8rem, 11vw, 2.9rem);
  }

  .landing-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .auth-wrap {
    min-height: 100dvh;
    padding: 0.75rem;
    place-items: start center;
  }

  .auth-shell {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .brand-panel,
  .card-lg {
    padding: 1rem;
    border-radius: 24px;
  }

  .brand-panel h1 {
    font-size: clamp(2.1rem, 14vw, 3.4rem);
  }

  .feature-list {
    padding-left: 1rem;
  }

  .projects-page .panel-title-row .inline-tools,
  .projects-page > .panel > .inline-tools {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .project-grid-spacious,
  #profileProjects {
    grid-template-columns: 1fr !important;
    gap: 0.85rem;
  }

  .project-card,
  .project-card-spacious {
    min-height: 0;
    padding: 1rem;
  }

  .project-card:hover {
    transform: none;
  }

  .project-card strong {
    max-width: 100%;
    font-size: 1.15rem;
  }

  .project-card .inline-tools,
  .project-card-actions {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-topbar {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .board-topbar .top-left {
    flex: none;
  }

  .board-topbar .brand-text {
    display: none;
  }

  .board-topbar .top-center-title {
    display: block;
    text-align: center;
  }

  .board-topbar .top-center-title h2 {
    max-width: none;
    margin-inline: auto;
  }

  .board-shell {
    padding: 0.7rem;
    border-radius: 26px;
  }

  .board-command-center {
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 24px;
  }

  .board-command-copy h3 {
    font-size: clamp(1.65rem, 9vw, 2.25rem);
  }

  .board-command-copy .subtitle {
    font-size: 0.92rem;
  }

  .board-command-center .board-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 52px;
    gap: 0.55rem;
    width: 100%;
  }

  .board-command-center #openCreateTaskBtn {
    grid-column: 1 / -1;
    min-height: 52px;
  }

  .board-command-center #toggleMyTasksBtn,
  .board-command-center #openFilterModalBtn {
    grid-column: auto;
    width: 100%;
  }

  .board-command-center #toggleMetricsBtn {
    grid-column: 1 / 3;
    width: 100%;
  }

  .board-command-center .settings-menu {
    grid-column: 3;
    width: 52px;
    min-width: 52px;
  }

  .board-command-center #settingsMenuBtn {
    width: 52px;
    min-width: 52px;
  }

  .metric-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(138px, 42vw);
    grid-template-columns: none !important;
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .metric-strip::-webkit-scrollbar {
    display: none;
  }

  .metric-strip .metric-card {
    min-height: 86px;
    scroll-snap-align: start;
  }

  .mobile-status-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(116px, 35vw);
    gap: 0.48rem;
    overflow-x: auto;
    padding: 0.05rem 0 0.55rem;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .mobile-status-tabs::-webkit-scrollbar {
    display: none;
  }

  .mobile-status-tab {
    scroll-snap-align: start;
  }

  .board-wrap {
    width: 100%;
    border-radius: 24px;
    padding: 0.55rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .board {
    display: grid;
    grid-template-columns: none !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(84vw, 84vw);
    min-width: 0;
    gap: 0.75rem;
  }

  .column {
    min-height: 62dvh;
    border-radius: 22px;
    padding: 0.75rem;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .column-head {
    align-items: center;
    flex-wrap: nowrap;
  }

  .column-collapse-btn {
    width: auto;
    min-width: 58px;
  }

  .task-card {
    border-radius: 20px;
    padding: 0.86rem;
  }

  .task-meta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .task-card-actions,
  .task-card .inline-tools {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-identity-wrap {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-stats {
    width: 100%;
  }

  .avatar-editor {
    align-items: center;
    text-align: center;
  }

  .avatar-xl {
    width: min(46vw, 150px);
    height: min(46vw, 150px);
  }

  .chat-fab-btn {
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    width: 52px;
    min-width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 18px;
  }

  .chat-fab-btn span:last-child,
  .chat-fab-dot {
    display: none;
  }

  .chat-popup {
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .chat-popup-head {
    padding: calc(0.8rem + env(safe-area-inset-top)) 0.85rem 0.75rem;
  }

  .chat-tabs {
    overflow-x: auto;
    padding: 0.65rem 0.85rem 0.25rem;
  }

  .chat-tools {
    grid-template-columns: 1fr;
    padding: 0.55rem 0.85rem 0.7rem;
  }

  .chat-direct-start {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .chat-direct-start select,
  .chat-direct-start button {
    width: 100%;
    min-width: 0;
  }

  .chat-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(132px, 28dvh) minmax(0, 1fr);
    min-height: 0;
  }

  .chat-conversation-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 76vw);
    gap: 0.48rem;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid #d9e3f2;
    scrollbar-width: none;
  }

  .chat-conversation-list::-webkit-scrollbar {
    display: none;
  }

  .chat-thread {
    min-height: 0;
    padding: 0.7rem;
  }

  .chat-thread-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-thread-messages {
    min-height: 0;
  }

  .chat-message {
    max-width: 94%;
  }

  .chat-compose {
    grid-template-columns: 1fr;
  }

  .chat-compose textarea {
    min-height: 58px;
    max-height: 120px;
  }

  .chat-compose button {
    width: 100%;
  }

  html[data-theme="dark"] .topbar,
  html[data-theme="dark"] .modal-head,
  html[data-theme="dark"] .drawer-head {
    background: rgba(10, 17, 30, 0.92);
  }
}

@media (max-width: 420px) {
  .page,
  .board-page {
    padding-inline: 0.5rem;
  }

  .panel {
    padding: 0.85rem;
  }

  .brand-lockup h2,
  .top-center-title h2 {
    max-width: 38vw;
    font-size: 0.92rem;
  }

  .topbar .eyebrow,
  .brand-lockup .eyebrow,
  .top-center-title .eyebrow {
    display: none;
  }

  .landing-hero h1 {
    font-size: clamp(3.3rem, 18vw, 5.2rem);
  }

  .landing-hero {
    padding-bottom: 7.5rem;
  }

  .landing-planet {
    width: 160vw;
    bottom: -72vw;
  }

  .stats-grid,
  .profile-stats {
    grid-template-columns: 1fr;
  }

  .board-command-center .board-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .board-command-center #openCreateTaskBtn,
  .board-command-center #toggleMetricsBtn,
  .board-command-center .settings-menu {
    grid-column: 1 / -1;
  }

  .board-command-center .settings-menu,
  .board-command-center #settingsMenuBtn {
    width: 100%;
    min-width: 0;
  }

  .board {
    grid-auto-columns: minmax(88vw, 88vw);
  }

  .task-meta-grid {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    grid-auto-columns: minmax(150px, 78vw);
  }

  .chat-layout {
    grid-template-rows: minmax(118px, 24dvh) minmax(0, 1fr);
  }
}

/* Final assigned-to-me task treatment: keep personal work visually dominant. */
.task-card.task-card-assigned,
.task-card.assigned-to-me,
.task-card[data-assigned="true"] {
  border-color: rgba(16, 185, 129, 0.62);
  background:
    linear-gradient(90deg, rgba(16, 185, 129, 0.4), rgba(16, 185, 129, 0.1) 10px, transparent 11px),
    radial-gradient(210px 130px at 100% 0, rgba(16, 185, 129, 0.18), transparent 62%),
    linear-gradient(180deg, rgba(240, 253, 250, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.13),
    0 18px 38px rgba(5, 150, 105, 0.15);
}

.task-card.task-card-assigned .task-assigned-tag,
.task-card.assigned-to-me .task-assigned-tag,
.task-card[data-assigned="true"] .task-assigned-tag {
  gap: 0.38rem;
  border: 1px solid rgba(16, 185, 129, 0.36);
  background:
    radial-gradient(120px 60px at 100% 0, rgba(16, 185, 129, 0.18), transparent 62%),
    rgba(236, 253, 245, 0.96);
  color: #047857;
  padding: 0.32rem 0.62rem;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(5, 150, 105, 0.11);
}

html[data-theme="dark"] .task-card.task-card-assigned,
html[data-theme="dark"] .task-card.assigned-to-me,
html[data-theme="dark"] .task-card[data-assigned="true"] {
  border-color: rgba(52, 211, 153, 0.52);
  background:
    linear-gradient(90deg, rgba(52, 211, 153, 0.34), rgba(52, 211, 153, 0.1) 10px, transparent 11px),
    radial-gradient(210px 130px at 100% 0, rgba(16, 185, 129, 0.2), transparent 62%),
    linear-gradient(180deg, rgba(6, 35, 32, 0.98), rgba(7, 13, 25, 0.96));
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.14),
    0 18px 38px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .task-card.task-card-assigned .task-assigned-tag,
html[data-theme="dark"] .task-card.assigned-to-me .task-assigned-tag,
html[data-theme="dark"] .task-card[data-assigned="true"] .task-assigned-tag {
  border-color: rgba(52, 211, 153, 0.38);
  background: rgba(6, 78, 59, 0.7);
  color: #a7f3d0;
}

/* Profile polish pass: align profile/settings pages with the project workspace aesthetic. */
.profile-page .panel,
.profile-settings-page .panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(14, 116, 144, 0.16);
  background:
    radial-gradient(460px 220px at 100% 0, rgba(34, 211, 238, 0.08), transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 253, 0.82));
}

.profile-page .panel::before,
.profile-settings-page .panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.profile-page .profile-hero {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: center;
  min-height: 250px;
  padding: clamp(1.15rem, 3vw, 1.75rem);
  background:
    radial-gradient(520px 260px at 92% -6%, rgba(34, 211, 238, 0.18), transparent 64%),
    radial-gradient(420px 220px at 5% 100%, rgba(14, 165, 233, 0.1), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 253, 0.88));
}

.profile-page .profile-identity-wrap {
  gap: 1.15rem;
}

.profile-page .profile-identity h3 {
  margin-top: 0.15rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.055em;
}

.profile-page .profile-headline {
  max-width: 680px;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.profile-page .avatar-lg {
  width: clamp(96px, 13vw, 132px);
  height: clamp(96px, 13vw, 132px);
}

.profile-page .profile-stats {
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.profile-page .metric-card {
  border-radius: 22px;
  background:
    radial-gradient(220px 120px at 100% 0, rgba(34, 211, 238, 0.11), transparent 64%),
    rgba(255, 255, 255, 0.76);
}

.profile-page .profile-bio,
.profile-page .profile-expertise {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.58);
}

.profile-page .profile-expertise {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.profile-project-card {
  min-height: 230px;
  grid-template-rows: auto 1fr auto;
  border-color: hsl(var(--project-h, 202) 72% 44% / 0.24);
}

.profile-project-card::before {
  background: linear-gradient(90deg,
      hsl(var(--project-h, 202) 84% 52% / 0.72),
      hsl(var(--project-h, 202) 82% 68% / 0.18));
}

.profile-project-body {
  display: grid;
  align-content: start;
  gap: 0.4rem;
}

.profile-project-body strong {
  max-width: none;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  letter-spacing: -0.04em;
}

.profile-project-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.profile-project-footer {
  align-items: center;
}

.profile-open-board-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 44px;
  border: 1px solid rgba(14, 116, 144, 0.22);
  border-radius: 999px;
  padding: 0.68rem 1.05rem;
  background:
    radial-gradient(120px 60px at 82% 0, rgba(255, 255, 255, 0.24), transparent 62%),
    linear-gradient(135deg, #0f766e, #0891b2);
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 16px 30px rgba(8, 145, 178, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.profile-open-board-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 145, 178, 0.38);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 20px 38px rgba(8, 145, 178, 0.3);
}

.profile-page .comment-card {
  padding: 0.9rem;
  border-radius: 20px;
  background:
    radial-gradient(220px 110px at 100% 0, rgba(34, 211, 238, 0.08), transparent 64%),
    rgba(255, 255, 255, 0.78);
}

.profile-page .comment-card p {
  color: var(--text-soft);
  line-height: 1.55;
}

.profile-settings-page {
  width: min(100% - 2rem, 1120px);
}

.profile-settings-page .panel {
  padding: clamp(1rem, 2.4vw, 1.45rem);
}

.profile-settings-page .panel-title-row h3 {
  letter-spacing: -0.035em;
}

.profile-settings-page label {
  color: var(--text-soft);
  font-weight: 850;
}

.profile-settings-page input,
.profile-settings-page textarea {
  border-radius: 18px;
}

.profile-settings-page textarea {
  min-height: 145px;
}

.profile-settings-page .avatar-editor {
  align-items: center;
  gap: 1.25rem;
}

.profile-settings-page .avatar-xl {
  width: clamp(128px, 18vw, 168px);
  height: clamp(128px, 18vw, 168px);
}

.profile-settings-page .avatar-pickable {
  border-width: 2px;
  border-color: rgba(14, 116, 144, 0.24);
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.82), transparent 28%),
    linear-gradient(135deg, #e0f2fe, #ccfbf1);
  box-shadow: 0 24px 52px rgba(14, 116, 144, 0.18);
}

.profile-settings-page .avatar-pickable::after {
  background: rgba(15, 23, 42, 0.78);
}

.profile-settings-page .avatar-pickable:hover,
.profile-settings-page .avatar-pickable:focus-visible {
  border-color: rgba(8, 145, 178, 0.58);
  box-shadow: 0 28px 62px rgba(8, 145, 178, 0.24);
}

html[data-theme="dark"] .profile-page .panel,
html[data-theme="dark"] .profile-settings-page .panel,
html[data-theme="dark"] .profile-page .profile-hero {
  border-color: rgba(56, 189, 248, 0.18);
  background:
    radial-gradient(460px 220px at 100% 0, rgba(34, 211, 238, 0.09), transparent 64%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(10, 17, 30, 0.92));
}

html[data-theme="dark"] .profile-page .metric-card,
html[data-theme="dark"] .profile-page .profile-bio,
html[data-theme="dark"] .profile-page .profile-expertise,
html[data-theme="dark"] .profile-page .comment-card {
  border-color: rgba(125, 211, 252, 0.14);
  background:
    radial-gradient(220px 120px at 100% 0, rgba(34, 211, 238, 0.07), transparent 64%),
    rgba(7, 13, 25, 0.62);
}

html[data-theme="dark"] .profile-project-card {
  border-color: hsl(var(--project-h, 202) 78% 62% / 0.28);
  background:
    radial-gradient(280px 180px at 96% 0, hsl(var(--project-h, 202) 80% 62% / 0.14), transparent 68%),
    linear-gradient(180deg, rgba(17, 27, 45, 0.94), rgba(11, 18, 32, 0.9));
}

html[data-theme="dark"] .profile-open-board-btn {
  border-color: rgba(34, 211, 238, 0.24);
  background:
    radial-gradient(120px 60px at 82% 0, rgba(255, 255, 255, 0.15), transparent 62%),
    linear-gradient(135deg, #0e7490, #22d3ee);
  color: #082f49;
  box-shadow: 0 18px 34px rgba(34, 211, 238, 0.18);
}

html[data-theme="dark"] .profile-settings-page .avatar-pickable {
  border-color: rgba(56, 189, 248, 0.28);
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.1), transparent 28%),
    linear-gradient(135deg, rgba(8, 47, 73, 0.94), rgba(13, 148, 136, 0.28));
}

/* Final form/menu polish pass. */
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 1.05rem) 50%,
    calc(100% - 0.72rem) 50%;
  background-size: 0.38rem 0.38rem, 0.38rem 0.38rem;
  background-repeat: no-repeat;
  padding-right: 2.25rem;
}

select option {
  background: #f8fbfd;
  color: #0f172a;
  font-weight: 750;
}

select option:checked {
  background: #dff7fb;
  color: #083344;
}

html[data-theme="dark"] select option {
  background: #111b2d;
  color: #e5eef8;
}

html[data-theme="dark"] select option:checked {
  background: #123346;
  color: #ffffff;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  width: 100%;
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  min-height: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  transform: translateY(-50%);
  border-radius: 999px;
  border: 1px solid rgba(14, 116, 144, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-soft);
  box-shadow: none;
}

.password-toggle.showing {
  color: var(--primary);
  background: var(--primary-soft);
}

.auth-check-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-soft);
}

.auth-check-row input {
  width: auto;
}

.chat-view-profile-link {
  border-color: rgba(14, 116, 144, 0.2);
  background:
    radial-gradient(100px 48px at 82% 0, rgba(255, 255, 255, 0.28), transparent 62%),
    linear-gradient(135deg, #0f766e, #0891b2);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(8, 145, 178, 0.18);
}

.chat-view-profile-link:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.chat-conversation-main {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.chat-conversation-date {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.chat-conversation-copy small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.due-soon,
.sprint-task-preview.out-of-sprint {
  border-color: rgba(225, 29, 72, 0.34);
  background: rgba(255, 241, 242, 0.94);
  color: #be123c;
}

html[data-theme="dark"] .password-toggle {
  border-color: rgba(125, 211, 252, 0.16);
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
}

html[data-theme="dark"] .password-toggle.showing {
  background: rgba(34, 211, 238, 0.16);
  color: #7dd3fc;
}

html[data-theme="dark"] .chat-view-profile-link {
  border-color: rgba(34, 211, 238, 0.26);
  background:
    radial-gradient(100px 48px at 82% 0, rgba(255, 255, 255, 0.15), transparent 62%),
    linear-gradient(135deg, #0e7490, #22d3ee);
  color: #082f49;
}

html[data-theme="dark"] .chat-conversation-date {
  color: #94a3b8;
}

html[data-theme="dark"] .due-soon,
html[data-theme="dark"] .sprint-task-preview.out-of-sprint {
  border-color: rgba(251, 113, 133, 0.36);
  background: rgba(76, 5, 25, 0.62);
  color: #fda4af;
}

.brand-mark,
.landing-logo-link img {
  width: 2.8rem;
  height: 2.8rem;
}

.project-image-icon {
  overflow: hidden;
}

.project-image-icon img,
.project-title-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.top-center-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
}

.project-title-image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.15rem;
  height: 3.15rem;
  border: 1px solid rgba(14, 116, 144, 0.22);
  border-radius: 999px;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.92), transparent 28%),
    linear-gradient(135deg, #e0f2fe, #ccfbf1);
  color: #075985;
  font-size: 0.82rem;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(14, 116, 144, 0.14);
}

html[data-theme="dark"] .project-title-image {
  border-color: rgba(56, 189, 248, 0.26);
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(8, 47, 73, 0.94), rgba(13, 148, 136, 0.28));
  color: #7dd3fc;
}

/* Final polish: password reveal, landing logo, project pictures, and roles modal spacing. */
.landing-nav .landing-logo-link img {
  width: clamp(4.25rem, 5.4vw, 5.25rem);
  height: clamp(4.25rem, 5.4vw, 5.25rem);
  max-height: 78px;
}

.password-field {
  display: grid;
  align-items: center;
}

.password-field input {
  grid-area: 1 / 1;
}

.password-toggle {
  position: relative;
  grid-area: 1 / 1;
  justify-self: end;
  right: auto;
  margin-right: 0.62rem;
  top: auto;
  width: 2.15rem;
  height: 2.15rem;
  min-height: 0;
  display: inline-grid;
  place-items: center;
  transform: none !important;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-soft);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  transform: none !important;
  box-shadow: 0 0 0 4px rgba(14, 116, 144, 0.12);
}

.project-picture-field {
  margin: 0.85rem 0 0.65rem;
}

.project-picture-picker {
  width: 100%;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  border: 1px dashed rgba(14, 116, 144, 0.28);
  border-radius: 24px;
  padding: 0.85rem;
  background:
    radial-gradient(260px 130px at 100% 0, rgba(34, 211, 238, 0.1), transparent 64%),
    rgba(255, 255, 255, 0.68);
  color: var(--text);
  text-align: left;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.project-picture-picker:hover,
.project-picture-picker:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(8, 145, 178, 0.48);
  box-shadow: 0 18px 38px rgba(8, 145, 178, 0.16);
}

.project-picture-preview {
  position: relative;
  width: 4.25rem;
  height: 4.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid rgba(14, 116, 144, 0.24);
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.9), transparent 28%),
    linear-gradient(135deg, #e0f2fe, #ccfbf1);
  color: #075985;
  font-weight: 950;
}

.project-picture-preview::after {
  content: "Change";
  position: absolute;
  inset: auto 0.35rem 0.35rem;
  border-radius: 999px;
  padding: 0.22rem 0.35rem;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 900;
  text-align: center;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.project-picture-picker:hover .project-picture-preview::after,
.project-picture-picker:focus-visible .project-picture-preview::after {
  opacity: 1;
  transform: translateY(0);
}

.project-picture-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-picture-picker strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.025em;
}

.project-picture-picker small {
  display: block;
  margin-top: 0.22rem;
  color: var(--text-muted);
  font-weight: 750;
}

.project-image-editable {
  position: relative;
  overflow: hidden;
}

.change-project-picture-card-btn {
  position: absolute;
  inset: auto 0.3rem 0.3rem;
  min-height: 0;
  height: 1.55rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 900;
  opacity: 0;
  transform: translateY(8px);
  box-shadow: none;
  transition: opacity 150ms ease, transform 150ms ease, background 150ms ease;
}

.project-image-editable:hover .change-project-picture-card-btn,
.project-image-editable:focus-within .change-project-picture-card-btn {
  opacity: 1;
  transform: translateY(0);
}

.change-project-picture-card-btn:hover,
.change-project-picture-card-btn:focus-visible {
  transform: translateY(0);
  background: rgba(8, 145, 178, 0.92);
  box-shadow: none;
}

#teamModal[data-mode="roles"] .team-roles-section {
  padding-bottom: 1.35rem;
}

#teamModal[data-mode="roles"] #saveRoleDefinitionsBtn {
  margin-top: 1.05rem;
}

#teamModal[data-mode="roles"] .team-roles-section > .inline-tools.end {
  padding-top: 0.8rem;
  padding-bottom: 0.3rem;
}

html[data-theme="dark"] .project-picture-picker {
  border-color: rgba(56, 189, 248, 0.22);
  background:
    radial-gradient(260px 130px at 100% 0, rgba(34, 211, 238, 0.09), transparent 64%),
    rgba(7, 13, 25, 0.68);
}

html[data-theme="dark"] .project-picture-preview {
  border-color: rgba(56, 189, 248, 0.28);
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(8, 47, 73, 0.94), rgba(13, 148, 136, 0.28));
  color: #7dd3fc;
}

@media (max-width: 720px) {
  .landing-nav .landing-logo-link img {
    width: 3.7rem;
    height: 3.7rem;
    max-height: 62px;
  }

  .project-picture-picker {
    min-height: 88px;
  }
}

.app-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 140;
  max-width: min(380px, calc(100vw - 2rem));
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 20px;
  padding: 0.9rem 1rem;
  background:
    radial-gradient(160px 80px at 100% 0, rgba(16, 185, 129, 0.18), transparent 64%),
    rgba(255, 255, 255, 0.94);
  color: #047857;
  font-weight: 900;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.16);
  animation: modal-in 180ms ease both;
}

.app-toast[hidden] {
  display: none;
}

#teamModal[data-mode="team"] .team-roles-section,
#teamModal[data-mode="roles"] .team-members-section,
#teamModal[data-mode="roles"] .team-invite-section {
  display: none;
}

html[data-theme="dark"] .app-toast {
  border-color: rgba(52, 211, 153, 0.3);
  background:
    radial-gradient(160px 80px at 100% 0, rgba(16, 185, 129, 0.18), transparent 64%),
    rgba(7, 13, 25, 0.94);
  color: #a7f3d0;
}

@media (max-width: 760px) {
  .profile-page .profile-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    text-align: left;
  }

  .profile-page .profile-identity-wrap,
  .profile-settings-page .avatar-editor {
    align-items: center;
    text-align: center;
  }

  .profile-page .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-project-card {
    min-height: 210px;
  }

  .profile-project-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-open-board-btn {
    width: 100%;
  }
}

/* Project image and auth-form fixes */
.password-field {
  position: relative;
  display: block;
}

.password-field input {
  width: 100%;
  padding-right: 3.35rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  z-index: 2;
  margin-right: 0;
  transform: translateY(-50%) !important;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  transform: translateY(-50%) !important;
}

.project-picture-preview::before,
.project-picture-preview::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
}

.project-picture-preview::before {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  transform: translate(-50%, -50%) scale(0.92);
}

.project-picture-preview::after {
  width: 1rem;
  height: 0.68rem;
  border: 2px solid #ffffff;
  border-radius: 0.18rem;
  transform: translate(-50%, -44%) scale(0.92);
  box-shadow:
    0 -0.25rem 0 -0.08rem #ffffff,
    inset 0 0 0 0.16rem rgba(255, 255, 255, 0.9);
}

.project-picture-picker:hover .project-picture-preview::before,
.project-picture-picker:focus-visible .project-picture-preview::before,
.project-picture-picker:hover .project-picture-preview::after,
.project-picture-picker:focus-visible .project-picture-preview::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.change-project-picture-card-btn {
  inset: auto;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  line-height: 1;
  transform: translate(-50%, -50%) scale(0.92);
}

.project-image-editable:hover .change-project-picture-card-btn,
.project-image-editable:focus-within .change-project-picture-card-btn,
.change-project-picture-card-btn:hover,
.change-project-picture-card-btn:focus-visible {
  transform: translate(-50%, -50%) scale(1);
}

.icon-camera {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 1rem;
  height: 0.68rem;
  box-sizing: border-box;
  border: 2px solid currentColor;
  border-radius: 0.18rem;
  transform: translateY(-0.03rem);
}

.icon-camera::before {
  content: "";
  position: absolute;
  left: 0.16rem;
  top: -0.35rem;
  width: 0.38rem;
  height: 0.22rem;
  border-radius: 0.12rem 0.12rem 0 0;
  background: currentColor;
}

.icon-camera::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

/* Keep auth password reveals from inheriting full-width button styles. */
.landing-auth-card .password-field,
.modal-card .password-field {
  position: relative;
  display: block;
  width: 100%;
}

.landing-auth-card .password-field input,
.modal-card .password-field input {
  width: 100%;
  padding-right: 3rem;
}

.landing-auth-card .password-field .password-toggle,
.modal-card .password-field .password-toggle {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  margin: 0;
  padding: 0;
  display: inline-grid;
  place-items: center;
  transform: translateY(-50%) !important;
}

.landing-auth-card .password-field .password-toggle:hover,
.landing-auth-card .password-field .password-toggle:focus-visible,
.modal-card .password-field .password-toggle:hover,
.modal-card .password-field .password-toggle:focus-visible {
  transform: translateY(-50%) !important;
}

.password-field input[type="password"],
.password-field input[type="text"] {
  background-image: none;
  padding-left: 0.8rem;
}

.password-field input::-ms-reveal,
.password-field input::-ms-clear {
  display: none;
}

.password-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

/* Targeted UI fixes */
.chat-thread-head {
  align-items: flex-start;
}

.chat-thread-title {
  min-width: 0;
  padding-top: 0.15rem;
}

.chat-view-profile-link {
  min-width: 0;
  min-height: 30px;
  padding: 0.34rem 0.58rem;
  border-radius: 999px;
  border-color: rgba(14, 116, 144, 0.24);
  background:
    radial-gradient(90px 42px at 80% 0, rgba(255, 255, 255, 0.32), transparent 62%),
    linear-gradient(135deg, #0f766e, #0891b2);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(8, 145, 178, 0.18);
}

.chat-view-profile-link::before {
  content: "";
  width: 0.48rem;
  height: 0.48rem;
  margin-right: 0.32rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0.42rem 0 -0.12rem currentColor;
  opacity: 0.9;
}

.chat-view-profile-link:hover,
.chat-view-profile-link:focus-visible {
  background:
    radial-gradient(90px 42px at 80% 0, rgba(255, 255, 255, 0.42), transparent 62%),
    linear-gradient(135deg, #0d9488, #0284c7);
  color: #ffffff;
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow:
    0 0 0 3px rgba(14, 165, 233, 0.18),
    0 10px 22px rgba(8, 145, 178, 0.22);
}

.member-row-actions {
  margin-left: auto;
  justify-content: flex-end;
}

.member-row-actions .member-role-select {
  min-width: 180px;
}

.member-remove-compact {
  min-height: 34px;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1;
}

#leaveProjectSettingsBtn {
  border-color: rgba(225, 29, 72, 0.36);
  background: #fff1f2;
  color: #be123c;
}

#leaveProjectSettingsBtn:hover,
#leaveProjectSettingsBtn:focus-visible {
  background: #ffe4e6;
  color: #9f1239;
}

.leave-project-modal-overlay,
.project-state-modal-overlay {
  place-items: center !important;
  align-items: center !important;
  justify-items: center !important;
  padding: 1rem !important;
}

.remove-member-modal-overlay {
  place-items: center !important;
  align-items: center !important;
  justify-items: center !important;
  padding: 1rem !important;
}

.leave-project-modal,
.project-state-modal,
.remove-member-modal {
  width: min(100%, 440px);
  margin: auto;
}

#projectStateModal[data-state-action="complete"] #projectStateModalLead,
#projectStateModal[data-state-action="reopen"] #projectStateModalLead {
  color: #047857;
}

#projectStateModal[data-state-action="complete"] #confirmProjectStateModalBtn,
#projectStateModal[data-state-action="reopen"] #confirmProjectStateModalBtn {
  border-color: rgba(16, 185, 129, 0.34);
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
}

#projectStateModal[data-state-action="archive"] #projectStateModalLead,
#projectStateModal[data-state-action="restore"] #projectStateModalLead {
  color: #b45309;
}

#projectStateModal[data-state-action="archive"] #confirmProjectStateModalBtn,
#projectStateModal[data-state-action="restore"] #confirmProjectStateModalBtn {
  border-color: rgba(245, 158, 11, 0.36);
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #ffffff;
}

.task-card.task-sprint-other:not(.assigned-to-me),
.task-card.out-of-active-sprint:not(.assigned-to-me) {
  border-color: rgba(225, 29, 72, 0.44);
  background:
    linear-gradient(90deg, rgba(225, 29, 72, 0.16), transparent 9px),
    radial-gradient(220px 120px at 100% 0, rgba(225, 29, 72, 0.1), transparent 62%),
    #ffffff;
}

.task-card.task-sprint-other.assigned-to-me,
.task-card.out-of-active-sprint.assigned-to-me {
  border-color: rgba(225, 29, 72, 0.58);
}

.task-card.task-sprint-other .sprint-meta-pill,
.task-card.out-of-active-sprint .sprint-meta-pill {
  border-color: rgba(225, 29, 72, 0.34);
  background: rgba(255, 241, 242, 0.94);
  color: #be123c;
}

.due-soon,
.task-meta-pill.due-soon {
  border-color: rgba(225, 29, 72, 0.34) !important;
  background: rgba(255, 241, 242, 0.94) !important;
  color: #be123c !important;
}

html[data-theme="dark"] #leaveProjectSettingsBtn {
  border-color: rgba(251, 113, 133, 0.36);
  background: rgba(127, 29, 29, 0.28);
  color: #fecdd3;
}

html[data-theme="dark"] .task-card.task-sprint-other:not(.assigned-to-me),
html[data-theme="dark"] .task-card.out-of-active-sprint:not(.assigned-to-me) {
  border-color: rgba(251, 113, 133, 0.44);
  background:
    linear-gradient(90deg, rgba(251, 113, 133, 0.16), transparent 9px),
    radial-gradient(220px 120px at 100% 0, rgba(251, 113, 133, 0.1), transparent 62%),
    rgba(15, 23, 42, 0.94);
}

html[data-theme="dark"] .task-card.task-sprint-other .sprint-meta-pill,
html[data-theme="dark"] .task-card.out-of-active-sprint .sprint-meta-pill,
html[data-theme="dark"] .due-soon,
html[data-theme="dark"] .task-meta-pill.due-soon {
  border-color: rgba(251, 113, 133, 0.36) !important;
  background: rgba(127, 29, 29, 0.3) !important;
  color: #fecdd3 !important;
}

html[data-theme="dark"] #projectStateModal[data-state-action="complete"] #projectStateModalLead,
html[data-theme="dark"] #projectStateModal[data-state-action="reopen"] #projectStateModalLead {
  color: #86efac;
}

html[data-theme="dark"] #projectStateModal[data-state-action="archive"] #projectStateModalLead,
html[data-theme="dark"] #projectStateModal[data-state-action="restore"] #projectStateModalLead {
  color: #fbbf24;
}

html[data-theme="dark"] .chat-view-profile-link:hover,
html[data-theme="dark"] .chat-view-profile-link:focus-visible {
  background:
    radial-gradient(90px 42px at 80% 0, rgba(255, 255, 255, 0.24), transparent 62%),
    linear-gradient(135deg, #67e8f9, #22d3ee);
  color: #06263a;
  box-shadow:
    0 0 0 3px rgba(103, 232, 249, 0.22),
    0 10px 24px rgba(34, 211, 238, 0.28);
}

@media (max-width: 640px) {
  .member-row-actions {
    width: 100%;
  }

  .member-row-actions .member-role-select {
    min-width: 0;
    flex: 1;
  }
}
