:root {
  --bg: #0a0c10;
  --bg-2: #121720;
  --surface: #10151fcc;
  --panel: #141b26;
  --text: #f3f7ff;
  --muted: #95a4b8;
  --line: #2a3444;
  --brand: #1d8dff;
  --brand-2: #5aa8ff;
  --danger: #ff4f5e;
  --success: #22d66f;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 0%, color-mix(in srgb, var(--brand) 32%, transparent), transparent 42%),
    radial-gradient(circle at 88% 14%, color-mix(in srgb, #4f5f75 26%, transparent), transparent 40%),
    linear-gradient(160deg, var(--bg), var(--bg-2));
}

.bg-orb {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.35;
  animation: floaty 11s ease-in-out infinite alternate;
}

.orb-1 {
  width: 280px;
  height: 280px;
  left: -100px;
  top: 10%;
  background: color-mix(in srgb, var(--brand) 75%, #79cfff);
}

.orb-2 {
  width: 340px;
  height: 340px;
  right: -110px;
  bottom: 6%;
  background: #3e5a78;
  animation-delay: 0.8s;
}

@keyframes floaty {
  from {
    transform: translateY(0px) scale(1);
  }
  to {
    transform: translateY(-22px) scale(1.05);
  }
}

#app {
  width: 100%;
  margin: 0;
  padding: 1rem 1.4rem 1.4rem;
}

.glass {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.auth-card {
  width: min(450px, 92vw);
  margin: 4rem auto;
  border-radius: 26px;
  padding: 2rem;
  animation: reveal 0.55s ease;
}

.brand-inline {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  line-height: 1;
}

#brandHomeBtn {
  cursor: pointer;
}

.logo-raw {
  display: block;
  height: 112px;
  width: auto;
  max-width: 420px;
  object-fit: contain;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.auth-card h1 {
  font-size: 2.1rem;
  letter-spacing: -0.03em;
}

.auth-card p {
  color: var(--muted);
  margin: 0.55rem 0 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--text);
  padding: 0.76rem 0.88rem;
  font-family: inherit;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent);
  border-color: color-mix(in srgb, var(--brand) 62%, var(--line));
}

.stack {
  display: grid;
  gap: 0.78rem;
}

.error {
  color: var(--danger);
  min-height: 1rem;
}

.hint {
  text-align: center;
  color: var(--muted);
}

.btn {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  color: var(--text);
  border-radius: 13px;
  padding: 0.64rem 0.94rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 650;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  border: none;
  background: linear-gradient(125deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 40%, transparent);
}

.hidden {
  display: none !important;
}

.topbar {
  border-radius: 0;
  padding: 0.35rem 0.15rem 0.55rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 40;
  background:
    radial-gradient(110% 120% at 20% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 52%),
    color-mix(in srgb, var(--surface) 76%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-radius: 14px;
}

.brand {
  display: grid;
  gap: 0.2rem;
}

.brand span {
  font-size: 0.86rem;
  color: var(--muted);
}

#currentUserLabel {
  display: none;
}

.topnav-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0 0.35rem;
}

.mobile-menu-btn {
  display: none;
}

.layout {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.8rem;
}

.content {
  border-radius: 14px;
  padding: 0.55rem;
  animation: reveal 0.4s ease;
}

.nav-btn {
  width: auto;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  text-align: center;
  border-radius: 999px;
  background: transparent;
  border-color: color-mix(in srgb, var(--line) 40%, transparent);
}

.nav-btn.active {
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  border-color: color-mix(in srgb, var(--brand) 36%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 24%, transparent);
}

.nav-btn.due-alert {
  border-color: rgba(255, 84, 84, 0.78);
  box-shadow: 0 0 0 1px rgba(255, 84, 84, 0.45);
  animation: dueMenuPulse 1.45s ease-in-out infinite;
}

.user-menu {
  position: relative;
  z-index: 60;
  margin-right: 36px;
}

.presence-wrap {
  position: relative;
  z-index: 60;
  margin-left: auto;
  margin-right: 10px;
}

.online-btn {
  position: relative;
  border-radius: 999px;
  padding: 0.45rem 0.8rem 0.45rem 1.75rem;
  font-weight: 700;
}

.online-btn span {
  display: inline-block;
  margin-left: 0.25rem;
  color: #cfe3ff;
}

.online-btn::before {
  content: '';
  position: absolute;
  left: 0.72rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #37d266;
  transform: translateY(-50%);
  box-shadow: 0 0 10px rgba(55, 210, 102, 0.7);
  animation: onlinePulse 1.7s ease-out infinite;
}

.user-btn {
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.user-btn .user-avatar {
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  border-width: 2px;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  gap: 0.4rem;
  min-width: 150px;
  padding: 0.55rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  z-index: 80;
}

.online-list {
  display: grid;
  gap: 0.5rem;
}

.online-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--panel) 86%, transparent);
}

.badge {
  min-width: 20px;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-open {
  background: #27ba68;
  color: #fff;
}

.badge-due {
  background: #ff4f5e;
  color: #fff;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  padding: 1rem;
  animation: reveal 0.35s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: -2px -30% auto -30%;
  height: 90px;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--brand) 20%, transparent), transparent 70%);
  opacity: 0.68;
  pointer-events: none;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border-top: 1px solid color-mix(in srgb, #ffffff 16%, transparent);
  pointer-events: none;
}

/* Visible flare sweep for modern panel highlights */
.card .flare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.card .flare::before {
  content: '';
  position: absolute;
  top: -35%;
  left: -45%;
  width: 38%;
  height: 170%;
  transform: rotate(18deg);
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, #ffffff 20%, transparent) 48%,
    transparent 100%
  );
  opacity: 0.26;
  animation: flareSweep 9s ease-in-out infinite;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.row.wrap {
  flex-wrap: wrap;
}

.row > * {
  flex: 1;
}

.row .fixed {
  flex: 0 0 auto;
}

.list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.66rem 0.74rem;
  background: color-mix(in srgb, var(--panel) 92%, #1a2940 8%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.tiny {
  color: var(--muted);
  font-size: 0.82rem;
}

.todo-done {
  text-decoration: line-through;
  opacity: 0.65;
}

.whatsnew-stage {
  padding: 0.3rem;
  border-radius: 24px;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Avoid nested/double frame effect on slideshow container */
.whatsnew-stage::before,
.whatsnew-stage::after {
  display: none;
}

.whatsnew-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.whatsnew-slideshow {
  min-height: min(76vh, 820px);
  position: relative;
  overflow: hidden;
}

.whatsnew-slideshow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 9;
}

.whatsnew-slideshow.blackout::after {
  animation: blackoutPulse 1.8s ease both;
}

.wn-slide {
  position: relative;
  position: absolute;
  inset: 0;
  min-height: min(72vh, 760px);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  background: #0a121d;
  box-shadow: inset 0 -120px 140px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transform: translateZ(0);
  transition: none;
  z-index: 0;
}

.wn-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.wn-slide.leaving {
  opacity: 0;
  z-index: 1;
}

.wn-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) saturate(0.72) contrast(1.08) brightness(0.6);
  transform: scale(1.02);
  transition: filter 2.3s ease, transform 2.3s ease;
}

.wn-slide.active .wn-bg {
  animation: heroPan 7s ease both;
  filter: grayscale(0) saturate(1.14) contrast(1.14) brightness(0.88);
}

.wn-obj-canvas {
  background:
    radial-gradient(120% 90% at 50% 90%, rgba(35, 82, 165, 0.32), rgba(8, 16, 28, 0.88) 58%),
    linear-gradient(165deg, rgba(11, 18, 30, 0.95), rgba(6, 10, 18, 0.98));
}

.wn-obj-fail {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(120, 164, 235, 0.35);
  background: rgba(5, 10, 20, 0.66);
  color: #d7e7ff;
  font-size: 0.84rem;
  backdrop-filter: blur(3px);
}

.wn-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 120% at 50% 100%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 58%),
    linear-gradient(to bottom, rgba(8, 12, 20, 0.34), rgba(6, 10, 16, 0.6) 58%, rgba(4, 7, 12, 0.88));
  display: grid;
  align-items: end;
  justify-items: start;
  padding: 1.4rem;
}

.wn-copy {
  width: min(560px, 64%);
  text-align: left;
  background: transparent;
  padding: 0.2rem 0.1rem;
  margin-left: clamp(6px, 4vw, 52px);
  margin-bottom: clamp(18px, 6vh, 80px);
  will-change: opacity, transform;
}

.wn-slide.active .wn-copy {
  animation: copyIn 3.6s cubic-bezier(0.12, 0.76, 0.18, 1) both;
  animation-delay: 1.95s;
}

.wn-kicker {
  margin: 0;
  color: #87bbff;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.wn-copy h2 {
  margin: 0.2rem 0 0.75rem;
  font-size: clamp(1.9rem, 5.2vw, 4.3rem);
  line-height: 1.1;
  padding-bottom: 0.12em;
  letter-spacing: -0.045em;
  color: #ecf6ff;
  background: linear-gradient(90deg, #f2f8ff 0%, #c9dcff 42%, #77afff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

.wn-copy p {
  max-width: 560px;
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: clamp(0.92rem, 1.32vw, 1.08rem);
  color: #b8c7da;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
}

.wn-copy .tiny {
  margin-top: 0.9rem;
  display: block;
  color: #889cb5;
}

.wn-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  background: color-mix(in srgb, #000 42%, transparent);
  color: #dbe7f8;
  font-size: 1.45rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.22s ease;
  z-index: 12;
}

.wn-arrow:hover {
  background: color-mix(in srgb, var(--brand) 32%, #000 68%);
}

.whatsnew-slideshow:hover .wn-arrow {
  opacity: 1;
  pointer-events: auto;
}

.wn-arrow-left {
  left: 12px;
}

.wn-arrow-right {
  right: 12px;
}

.chat-shell {
  padding: 0;
  overflow: hidden;
}

.chat-header {
  padding: 0.88rem 1rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 16%, transparent), transparent 72%);
}

.chat-thread {
  min-height: 430px;
  max-height: 58vh;
  overflow-y: auto;
  padding: 1rem;
  display: grid;
  gap: 0.48rem;
  background:
    radial-gradient(circle at 15% 6%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 40%),
    radial-gradient(circle at 90% 80%, color-mix(in srgb, #445872 14%, transparent), transparent 40%),
    #0f1621;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.82rem;
  border-top: 1px solid var(--line);
}

.wa-row {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
}

.wa-row.mine {
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  --wa-readers-width: min(72vw, 260px);
}

.wa-bubble {
  max-width: min(72%, 560px);
  border-radius: 16px;
  padding: 0.58rem 0.72rem;
}

.wa-bubble.other {
  border-top-left-radius: 6px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, #243248 8%);
}

.wa-bubble.mine {
  border-top-right-radius: 6px;
  border: none;
  color: #fff;
  background: linear-gradient(130deg, var(--brand), var(--brand-2));
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  position: relative;
  z-index: 2;
}

.wa-bubble.pop-in {
  animation: bubblePop 0.42s cubic-bezier(0.2, 0.9, 0.22, 1) both;
}

.wa-name {
  font-size: 0.74rem;
  font-weight: 700;
  opacity: 0.85;
  margin-bottom: 0.2rem;
}

.wa-meta {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  opacity: 0.75;
  text-align: right;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  justify-content: flex-end;
}

.wa-read-checks {
  font-size: 0.78rem;
  letter-spacing: -0.14em;
  color: #5f7288;
  opacity: 1;
  transform: translateY(-0.5px);
}

.wa-read-checks.all-read {
  color: #5db2ff;
  text-shadow: 0 0 10px rgba(93, 178, 255, 0.45);
}

.wa-readers-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--wa-readers-width);
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  background: color-mix(in srgb, #0f1a27 94%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  padding: 0.36rem 0.45rem;
  z-index: 1;
  display: grid;
  gap: 0.3rem;
  align-content: center;
}

.wa-readers-drawer > small {
  font-size: 0.65rem;
  color: #9db1c9;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wa-readers-list {
  display: grid;
  gap: 0.28rem;
  max-height: 90px;
  overflow: auto;
}

.wa-reader-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.28rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 58%, transparent);
  background: color-mix(in srgb, #111f31 70%, transparent);
}

.wa-reader-item span {
  font-size: 0.73rem;
  color: #d5e5f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-reader-item .avatar {
  width: 22px;
  height: 22px;
}

.wa-row.mine.readers-open .wa-readers-drawer {
  transform: translateX(0);
}

.wa-row.mine.readers-open .wa-bubble.mine {
  transform: translateX(calc(-1 * var(--wa-readers-width) + 8px));
}

@media (min-width: 981px) {
  .wa-readers-drawer {
    display: none;
  }

  .wa-row.mine.readers-open .wa-bubble.mine {
    transform: none;
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.74rem;
}

.gallery-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.45rem;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
}

.gallery-item img {
  width: 100%;
  height: 122px;
  border-radius: 8px;
  object-fit: cover;
}

.due-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(5px);
}

.due-modal-card {
  position: relative;
  width: min(520px, 96vw);
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, var(--panel) 90%, #0b1018 10%);
  padding: 1rem;
}

.due-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, #0f1724 90%, transparent);
  color: #c9d8ea;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.due-close-btn:hover {
  color: #ffffff;
  border-color: color-mix(in srgb, #8fbdf2 45%, transparent);
}

.timeline-card {
  padding-bottom: 1.2rem;
}

.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.timeline-zoom {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.timeline-zoom .btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1;
}

.timeline-scroll {
  margin-top: 0.85rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 14px;
  background: linear-gradient(180deg, #0f1623, #0b121c);
  display: block;
}

.timeline-track {
  position: relative;
  min-height: 280px;
  padding: 2.2rem 1rem 2.8rem;
}

.timeline-line {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 56px);
  transform: none;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2b3d55, #60a5f4, #2b3d55);
  opacity: 0.95;
}

.timeline-now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #7ec2ff, #2e7ad2);
  box-shadow: 0 0 20px rgba(58, 142, 229, 0.9);
  z-index: 3;
}

.timeline-now-label {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: #d0e6ff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(11, 20, 32, 0.75);
  border: 1px solid rgba(88, 152, 226, 0.45);
  border-radius: 999px;
  padding: 0.14rem 0.45rem;
}

.timeline-item {
  position: absolute;
  transform: none;
  min-width: 62px;
  min-height: 36px;
  overflow: hidden;
  animation: reveal 0.35s ease both;
}

.timeline-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, #223248 58%, #101824 42%);
  overflow: hidden;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.35);
}

.timeline-progress {
  height: 100%;
  border-radius: inherit;
  transition: width 0.5s ease;
  background: linear-gradient(90deg, #4e8ed7, #7ab7ff);
}

.timeline-item.done .timeline-progress {
  background: linear-gradient(90deg, #2fa26a, #62db9f);
}

.timeline-item.overdue .timeline-bar {
  border-color: rgba(255, 94, 94, 0.7);
  box-shadow: 0 0 16px rgba(255, 74, 74, 0.38), inset 0 0 14px rgba(0, 0, 0, 0.35);
  animation: overduePulse 1.55s ease-in-out infinite;
}

.timeline-label {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: #c3d2e6;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
  text-shadow: 0 5px 14px rgba(0, 0, 0, 0.45);
}

.timeline-overdue {
  border-color: rgba(255, 94, 94, 0.65);
  box-shadow: 0 0 18px rgba(255, 60, 60, 0.2);
}

.overview-progress-wrap {
  display: grid;
  gap: 0.35rem;
}

.overview-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, #182334 70%, transparent);
  overflow: hidden;
}

.overview-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2a85ec, #66b3ff);
  transition: width 0.35s ease;
}

.timeline-countdown {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #95c2f5;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, #3a5f88 55%, transparent);
  background: color-mix(in srgb, #12253a 58%, transparent);
}

.timeline-countdown.tick {
  animation: countdownTick 1s linear;
}

.timeline-countdown.due-soon {
  color: #ffd2d2;
  border-color: rgba(255, 86, 86, 0.68);
  background: color-mix(in srgb, #3a1218 62%, transparent);
  animation: countdownDangerPulse 1.2s ease-in-out infinite;
}

.timeline-task-left {
  flex: 1 1 auto;
  min-width: 280px;
}

.timeline-task-right {
  flex: 0 0 320px;
  max-width: 320px;
  display: grid;
  gap: 0.6rem;
  align-items: start;
}

.timeline-task-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.timeline-participants {
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 10px;
  padding: 0.5rem;
  background: color-mix(in srgb, #132031 60%, transparent);
  display: grid;
  gap: 0.45rem;
}

.timeline-response-controls {
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 10px;
  padding: 0.5rem;
  background: color-mix(in srgb, #0f1b2a 68%, transparent);
  display: grid;
  gap: 0.45rem;
}

.tl-attend-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1;
}

.tl-attend-btn.active.tl-attend-yes {
  background: color-mix(in srgb, #2dd17a 38%, #11281c 62%);
  border-color: rgba(45, 209, 122, 0.75);
  color: #ddffe9;
}

.tl-attend-btn.active.tl-attend-no {
  background: color-mix(in srgb, #ff5a64 36%, #2a1216 64%);
  border-color: rgba(255, 90, 100, 0.75);
  color: #ffe2e5;
}

.timeline-person {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  border-radius: 10px;
  padding: 0.35rem;
  background: color-mix(in srgb, #111a27 72%, transparent);
}

.timeline-person-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-width: 2px;
}

.timeline-person.read .timeline-person-avatar {
  border-color: #4ea4ff;
  box-shadow: 0 0 0 2px rgba(78, 164, 255, 0.25);
}

.timeline-person.accepted .timeline-person-avatar {
  border-color: #2dd17a;
  box-shadow: 0 0 0 2px rgba(45, 209, 122, 0.22);
}

.timeline-person.rejected .timeline-person-avatar {
  border-color: #ff5a64;
  box-shadow: 0 0 0 2px rgba(255, 90, 100, 0.22);
}

.timeline-person-meta {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.timeline-person-meta strong {
  font-size: 0.8rem;
  line-height: 1.1;
  color: #e8f2ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-person-meta small {
  font-size: 0.7rem;
  color: #9fb4cf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-tooltip {
  position: absolute;
  z-index: 10;
  min-width: 240px;
  max-width: 320px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  background: color-mix(in srgb, #0d1420 92%, transparent);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(6px);
  padding: 0.58rem 0.7rem;
  pointer-events: none;
  display: grid;
  gap: 0.24rem;
}

.timeline-tooltip strong {
  color: #e9f3ff;
  font-size: 0.86rem;
}

.timeline-tooltip div {
  color: #bccde2;
  font-size: 0.79rem;
  line-height: 1.35;
}

.timeline-tooltip small {
  color: #8ea8c6;
  font-size: 0.73rem;
}

.timeline-ticks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: auto;
  height: 34px;
}

.timeline-tick {
  position: absolute;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.2rem;
}

.timeline-tick-mark {
  width: 1px;
  height: 9px;
  background: #547297;
  opacity: 0.8;
}

.timeline-tick-label {
  font-size: 0.66rem;
  color: #8fa8c6;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.timeline-list-item {
  align-items: flex-start;
}

.timeline-form-dates label,
.timeline-edit-dates label {
  min-width: 0;
}

.timeline-tick.today .timeline-tick-mark {
  width: 2px;
  height: 12px;
  background: #8bc8ff;
  box-shadow: 0 0 10px rgba(98, 177, 255, 0.7);
}

.timeline-tick.today .timeline-tick-label {
  color: #d6ebff;
  font-weight: 700;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroPan {
  from {
    opacity: 0.88;
    transform: scale(1.07) translateX(-1.5%);
  }
  to {
    opacity: 1;
    transform: scale(1.01) translateX(0%);
  }
}

@keyframes copyIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  55% {
    opacity: 0.35;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blackoutPulse {
  0% {
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  65% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes bubblePop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.86);
  }
  70% {
    opacity: 1;
    transform: translateY(0) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes onlinePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(55, 210, 102, 0.55), 0 0 10px rgba(55, 210, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(55, 210, 102, 0), 0 0 14px rgba(55, 210, 102, 0.45);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(55, 210, 102, 0), 0 0 10px rgba(55, 210, 102, 0.7);
  }
}

@keyframes flareSweep {
  0% {
    transform: translateX(0) rotate(18deg);
    opacity: 0;
  }
  15% {
    opacity: 0.24;
  }
  45% {
    transform: translateX(340%) rotate(18deg);
    opacity: 0.2;
  }
  60% {
    opacity: 0;
  }
  100% {
    transform: translateX(340%) rotate(18deg);
    opacity: 0;
  }
}

@keyframes overduePulse {
  0% {
    box-shadow: 0 0 10px rgba(255, 74, 74, 0.2), inset 0 0 14px rgba(0, 0, 0, 0.35);
  }
  50% {
    box-shadow: 0 0 24px rgba(255, 74, 74, 0.45), inset 0 0 14px rgba(0, 0, 0, 0.35);
  }
  100% {
    box-shadow: 0 0 10px rgba(255, 74, 74, 0.2), inset 0 0 14px rgba(0, 0, 0, 0.35);
  }
}

@keyframes dueMenuPulse {
  0% {
    box-shadow: 0 0 0 1px rgba(255, 84, 84, 0.32), 0 0 8px rgba(255, 84, 84, 0.18);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(255, 84, 84, 0.6), 0 0 18px rgba(255, 84, 84, 0.45);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(255, 84, 84, 0.32), 0 0 8px rgba(255, 84, 84, 0.18);
  }
}

@keyframes countdownTick {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  35% {
    transform: translateY(-1px) scale(1.01);
    filter: brightness(1.1);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes countdownDangerPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 84, 84, 0.18);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(255, 84, 84, 0), 0 0 16px rgba(255, 84, 84, 0.36);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 84, 84, 0.18);
  }
}

@media (max-width: 980px) {
  #app {
    padding: 0.8rem;
  }

  .topbar {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem;
    position: relative;
    overflow: visible;
  }

  .mobile-menu-btn {
    display: inline-flex;
    margin-left: auto;
    border-radius: 999px;
    padding: 0.48rem 0.8rem;
    font-size: 0.84rem;
  }

  .topnav-header {
    order: 4;
    width: auto;
    max-width: none;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0.25rem;
    right: 0.25rem;
    max-height: min(72vh, 520px);
    overflow-y: auto;
    overflow-x: clip;
    opacity: 0;
    transform: translateY(10px);
    transform-origin: top center;
    visibility: hidden;
    pointer-events: none;
    padding: 0.65rem;
    margin-top: 0;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
    z-index: 95;
    will-change: transform, opacity;
    transition:
      opacity 0.26s ease,
      transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear 0.3s;
  }

  #dashboard.mobile-nav-open .topnav-header {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition:
      opacity 0.26s ease,
      transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear 0s;
  }

  .nav-btn {
    white-space: normal;
    min-width: 0;
    width: 100%;
    flex: 0 0 auto;
    justify-content: center;
    font-size: 0.84rem;
    padding: 0.58rem 0.72rem;
  }

  .brand .logo-raw {
    height: 72px;
    max-width: 220px;
  }

  .presence-wrap {
    margin-left: 0;
    margin-right: auto;
  }

  .online-btn {
    padding: 0.42rem 0.72rem 0.42rem 1.6rem;
    font-size: 0.83rem;
  }

  .user-menu {
    margin-right: 0;
  }

  .user-btn {
    width: 58px;
    height: 58px;
  }

  .user-btn .user-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  .content {
    padding: 0.4rem;
  }

  .card {
    padding: 0.8rem;
  }

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

  .whatsnew-slideshow,
  .wn-slide {
    min-height: 68vh;
  }

  .wn-copy {
    width: min(92vw, 680px);
    margin-left: 0;
    margin-bottom: 16px;
  }

  .wn-copy h2 {
    font-size: clamp(1.8rem, 8.5vw, 3.2rem);
  }

  .chat-thread {
    min-height: 360px;
    max-height: 52vh;
    padding: 0.75rem;
  }

  .wa-bubble {
    max-width: 88%;
  }

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

  .timeline-zoom {
    width: 100%;
    justify-content: flex-start;
  }

  .item {
    align-items: flex-start;
  }

  .item .row.fixed {
    flex-wrap: wrap;
  }

  .timeline-task-right {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .timeline-task-actions {
    justify-content: flex-start;
  }

  .timeline-form-dates,
  .timeline-edit-dates {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .timeline-form-dates > label,
  .timeline-edit-dates > label {
    width: 100%;
  }

  .timeline-list-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .timeline-participants,
  .timeline-response-controls {
    padding: 0.58rem;
  }

  .timeline-person {
    align-items: flex-start;
  }

  .timeline-person-meta strong,
  .timeline-person-meta small {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .wn-arrow {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 980px) and (prefers-reduced-motion: reduce) {
  .topnav-header,
  #dashboard.mobile-nav-open .topnav-header {
    transition: none;
    transform: none;
  }
}

@media (max-width: 700px) {
  .auth-card {
    margin: 1.4rem auto;
    padding: 1.2rem;
    border-radius: 18px;
  }

  .logo-raw {
    height: 64px;
    max-width: 200px;
  }

  .topbar {
    border-radius: 12px;
  }

  .whatsnew-top {
    margin-bottom: 0.55rem;
  }

  .whatsnew-slideshow,
  .wn-slide {
    min-height: 60vh;
    border-radius: 14px;
  }

  .wn-overlay {
    padding: 0.9rem;
  }

  .wn-copy {
    width: 100%;
    margin-left: 0;
    margin-bottom: 10px;
  }

  .wn-copy h2 {
    font-size: clamp(1.35rem, 7.2vw, 2.2rem);
    line-height: 1.12;
  }

  .wn-copy p {
    font-size: 0.9rem;
    line-height: 1.4;
  }

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

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

  .due-modal-card {
    width: min(96vw, 560px);
    padding: 0.9rem;
  }

  .timeline-tooltip {
    display: none;
  }

  .timeline-track {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .timeline-label {
    font-size: 0.72rem;
  }

  .timeline-tick-label {
    font-size: 0.61rem;
    letter-spacing: 0.01em;
  }

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

@media (max-width: 460px) {
  #app {
    padding: 0.55rem;
  }

  .topbar {
    padding: 0.34rem;
  }

  .brand .logo-raw {
    height: 56px;
    max-width: 168px;
  }

  .online-btn {
    padding: 0.38rem 0.66rem 0.38rem 1.48rem;
    font-size: 0.79rem;
  }

  .user-btn {
    width: 52px;
    height: 52px;
  }

  .user-btn .user-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .card {
    border-radius: 12px;
    padding: 0.72rem;
  }

  .topnav-header {
    grid-template-columns: 1fr;
  }

  .nav-btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.66rem;
  }

  .badge {
    font-size: 0.68rem;
    padding: 0.08rem 0.35rem;
  }

  .whatsnew-slideshow,
  .wn-slide {
    min-height: 56vh;
  }

  .wn-copy h2 {
    font-size: clamp(1.2rem, 6.6vw, 1.8rem);
  }

  .timeline-zoom .btn {
    width: 30px;
    height: 30px;
  }

  .timeline-countdown {
    font-size: 0.76rem;
    padding: 0.25rem 0.45rem;
  }
}
