:root {
  --pwa-accent: #2563eb;
  --pwa-accent-light: #60a5fa;
  --pwa-accent-dark: #1d4ed8;
  --pwa-accent-soft: #dbeafe;
  --pwa-primary: var(--pwa-accent);
  --pwa-primary-dark: var(--pwa-accent-dark);
  --pwa-primary-soft: color-mix(in srgb, var(--pwa-accent-soft), #ffffff 46%);
  --pwa-primary-border: color-mix(in srgb, var(--pwa-accent-soft), var(--pwa-accent) 20%);
  --pwa-primary-ring: color-mix(in srgb, var(--pwa-accent-soft), #ffffff 20%);
  --pwa-bg: #eef2f7;
  --pwa-surface: #ffffff;
  --pwa-surface-muted: #f8fafc;
  --pwa-surface-alt: #f1f5f9;
  --pwa-border: #e2e8f0;
  --pwa-border-strong: #e5e7eb;
  --pwa-text: #0f172a;
  --pwa-text-soft: #334155;
  --pwa-muted-dark: #475569;
  --pwa-muted: #64748b;
  --pwa-muted-light: #94a3b8;
  --pwa-glow: color-mix(in srgb, var(--pwa-accent), transparent 84%);
  --pwa-input-bg: var(--pwa-surface);
  --pwa-input-text: var(--pwa-text);
  --pwa-placeholder: #64748b;
  --pwa-button-text: #ffffff;
  --pwa-disabled-text: #94a3b8;
  --pwa-badge-text: var(--pwa-text);
  --pwa-notification-text: var(--pwa-text);
}

html[data-theme='dark'] {
  --pwa-primary: var(--pwa-accent);
  --pwa-primary-dark: color-mix(in srgb, var(--pwa-accent-light), #ffffff 10%);
  --pwa-primary-soft: color-mix(in srgb, var(--pwa-accent), #111827 78%);
  --pwa-primary-border: color-mix(in srgb, var(--pwa-accent), #111827 50%);
  --pwa-primary-ring: color-mix(in srgb, var(--pwa-accent), transparent 70%);
  --pwa-bg: #111820;
  --pwa-surface: #222a33;
  --pwa-surface-muted: #182028;
  --pwa-surface-alt: #2b3440;
  --pwa-border: #39424d;
  --pwa-border-strong: #4b5563;
  --pwa-text: #f8fafc;
  --pwa-text-soft: #e7edf5;
  --pwa-muted-dark: #dbe4ee;
  --pwa-muted: #cbd5e1;
  --pwa-muted-light: #94a3b8;
  --pwa-glow: color-mix(in srgb, var(--pwa-accent), transparent 82%);
  --pwa-input-bg: #182028;
  --pwa-input-text: #f8fafc;
  --pwa-placeholder: #aab6c5;
  --pwa-disabled-text: #8a97a8;
  --pwa-badge-text: #f8fafc;
  --pwa-notification-text: #f8fafc;
}

html[data-accent='default'],
html[data-accent='gray'] {
  --pwa-accent: #2563eb;
  --pwa-accent-light: #60a5fa;
  --pwa-accent-dark: #1d4ed8;
  --pwa-accent-soft: #dbeafe;
}

html[data-accent='charcoal'],
html[data-accent='slate'] {
  --pwa-accent: #111827;
  --pwa-accent-light: #374151;
  --pwa-accent-dark: #030712;
  --pwa-accent-soft: #e5e7eb;
}

html[data-accent='blue'] {
  --pwa-accent: #2563eb;
  --pwa-accent-light: #60a5fa;
  --pwa-accent-dark: #1d4ed8;
  --pwa-accent-soft: #dbeafe;
}

html[data-accent='purple'] {
  --pwa-accent: #7c3aed;
  --pwa-accent-light: #a78bfa;
  --pwa-accent-dark: #6d28d9;
  --pwa-accent-soft: #ede9fe;
}

html[data-accent='green'] {
  --pwa-accent: #16a34a;
  --pwa-accent-light: #4ade80;
  --pwa-accent-dark: #15803d;
  --pwa-accent-soft: #dcfce7;
}

html[data-accent='amber'],
html[data-accent='yellow'] {
  --pwa-accent: #d97706;
  --pwa-accent-light: #fbbf24;
  --pwa-accent-dark: #b45309;
  --pwa-accent-soft: #fef3c7;
}

html[data-accent='roseGold'],
html[data-accent='red'] {
  --pwa-accent: #be5f6d;
  --pwa-accent-light: #fb7185;
  --pwa-accent-dark: #9f4252;
  --pwa-accent-soft: #ffe4e6;
}

.pwa-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, var(--pwa-glow), transparent 34%),
    linear-gradient(180deg, var(--pwa-surface-muted) 0%, var(--pwa-bg) 100%);
  color: var(--pwa-text);
  padding: max(1rem, env(safe-area-inset-top)) 1rem calc(6.5rem + env(safe-area-inset-bottom));
}

.pwa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 560px;
  margin: 0 auto 1rem;
}

.pwa-header-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pwa-header-brand > img {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.2);
}

.pwa-header span,
.pwa-eyebrow {
  color: var(--pwa-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.pwa-header h1 {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
}

.pwa-avatar {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--pwa-surface);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
  color: var(--pwa-primary);
  font-weight: 800;
  overflow: hidden;
  text-decoration: none;
  flex: 0 0 auto;
}

.pwa-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.pwa-header-icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--pwa-surface);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
  color: var(--pwa-primary);
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--pwa-border), transparent 34%);
}

.pwa-header-notification-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--pwa-primary);
  border: 2px solid var(--pwa-surface);
  box-shadow: 0 0 0 3px var(--pwa-primary-ring);
}

.pwa-header-notification-badge.count {
  top: 3px;
  left: -3px;
  min-width: 18px;
  width: auto;
  height: 18px;
  padding: 0 0.26rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.pwa-avatar .pwa-profile-avatar.header {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  box-shadow: none;
}

.pwa-avatar .pwa-profile-avatar.header b {
  font-size: 1rem;
}

.pwa-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pwa-main {
  max-width: 560px;
  margin: 0 auto;
}

.pwa-home {
  display: grid;
  gap: 1rem;
}

.pwa-tasks-page,
.pwa-task-detail,
.pwa-projects-page,
.pwa-project-detail,
.pwa-sprint-page,
.pwa-notifications-page,
.pwa-profile-page {
  display: grid;
  gap: 1rem;
}

.pwa-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pwa-page-head span {
  color: var(--pwa-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.pwa-page-head h1 {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
  color: var(--pwa-text);
}

.pwa-page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

.pwa-page-head button,
.pwa-page-actions button,
.pwa-comment-form button,
.pwa-upload-button {
  min-height: 42px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--pwa-primary);
  color: #ffffff;
  padding: 0 0.9rem;
  font-weight: 900;
}

.pwa-search-field {
  min-height: 48px;
  border: 1px solid var(--pwa-border);
  border-radius: 18px;
  background: var(--pwa-surface);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.85rem;
  color: var(--pwa-muted);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.pwa-search-field input {
  flex: 1;
  border: 0;
  background: transparent;
  min-width: 0;
  color: var(--pwa-text);
  font: inherit;
}

.pwa-search-field input::placeholder,
.pwa-field input::placeholder,
.pwa-field textarea::placeholder,
.pwa-comment-form textarea::placeholder {
  color: var(--pwa-placeholder);
  opacity: 1;
}

.pwa-filter-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
}

.pwa-filter-row::-webkit-scrollbar {
  display: none;
}

.pwa-filter-row button {
  min-height: 38px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: var(--pwa-surface);
  border: 1px solid var(--pwa-border);
  color: var(--pwa-muted-dark);
  padding: 0 0.85rem;
  font-weight: 900;
}

.pwa-filter-row button.active {
  background: var(--pwa-text);
  border-color: var(--pwa-text);
  color: #ffffff;
}

.pwa-hero-card,
.pwa-card-section,
.pwa-manager-card,
.pwa-state-card,
.pwa-placeholder {
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

html[data-theme='dark'] .pwa-hero-card,
html[data-theme='dark'] .pwa-card-section,
html[data-theme='dark'] .pwa-manager-card,
html[data-theme='dark'] .pwa-state-card,
html[data-theme='dark'] .pwa-placeholder {
  border-color: var(--pwa-border);
  background: color-mix(in srgb, var(--pwa-surface), transparent 5%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.pwa-hero-card {
  min-height: 150px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  overflow: hidden;
}

.pwa-hero-card h1 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.55rem;
}

.pwa-hero-card p {
  margin: 0;
  color: var(--pwa-muted-dark);
}

.pwa-role-pill,
.pwa-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 0.7rem;
  background: var(--pwa-primary-soft);
  color: var(--pwa-primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.pwa-section-head,
.pwa-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pwa-section-head h2,
.pwa-section-title h2 {
  margin: 0;
  font-size: 1rem;
}

.pwa-section-head span,
.pwa-section-title span {
  color: var(--pwa-muted);
  font-size: 0.78rem;
}

.pwa-section-head button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  background: var(--pwa-surface);
  color: var(--pwa-primary);
  padding: 0 0.8rem;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--pwa-primary), transparent 88%);
  font-weight: 800;
}

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

.pwa-stat-card {
  min-height: 112px;
  border-radius: 22px;
  background: var(--pwa-surface);
  border: 1px solid var(--pwa-border);
  padding: 0.9rem;
  display: grid;
  gap: 0.35rem;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.pwa-stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--pwa-surface-alt);
  color: var(--pwa-primary);
}

.pwa-stat-card strong {
  font-size: 1.55rem;
  color: var(--pwa-text);
}

.pwa-stat-card small {
  color: var(--pwa-muted);
  font-weight: 700;
}

.pwa-stat-card.danger .pwa-stat-icon { background: #fef2f2; color: #dc2626; }
.pwa-stat-card.notice .pwa-stat-icon { background: #fffbeb; color: #d97706; }
.pwa-stat-card.active .pwa-stat-icon { background: #ecfdf5; color: #059669; }

html[data-theme='dark'] .pwa-stat-card.danger .pwa-stat-icon,
html[data-theme='dark'] .pwa-chip.priority-urgent,
html[data-theme='dark'] .pwa-chip.priority-high,
html[data-theme='dark'] .pwa-form-error {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

html[data-theme='dark'] .pwa-stat-card.notice .pwa-stat-icon {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}

html[data-theme='dark'] .pwa-stat-card.active .pwa-stat-icon {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

.pwa-card-section,
.pwa-manager-card {
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
}

.pwa-task-list,
.pwa-notification-list,
.pwa-project-list {
  display: grid;
  gap: 0.7rem;
}

.pwa-notification-list {
  overflow: visible;
}

.pwa-task-card,
.pwa-notification,
.pwa-project-card {
  border: 1px solid var(--pwa-border-strong);
  border-radius: 18px;
  background: var(--pwa-surface);
  padding: 0.9rem;
}

.pwa-task-swipe {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  touch-action: pan-y;
  background: rgba(15, 23, 42, 0.92);
}

.pwa-task-action-rail {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 176px;
  max-width: 54%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 0.42rem;
  padding: 0.65rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
  filter: blur(calc((1 - var(--task-rail-reveal, 0)) * 10px));
  opacity: var(--task-rail-reveal, 0);
  transform: translateX(calc((1 - var(--task-rail-reveal, 0)) * 12px)) scale(calc(0.96 + (var(--task-rail-reveal, 0) * 0.04)));
  transition: opacity 0.22s ease, filter 0.22s ease, transform 0.22s ease;
  z-index: 0;
}

.pwa-task-swipe.open .pwa-task-action-rail,
.pwa-task-swipe.dragging .pwa-task-action-rail {
  filter: blur(0);
  opacity: 1;
  transform: translateX(0) scale(1);
}

.pwa-task-action-rail button {
  min-width: 0;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  place-items: center;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 0.24rem;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.35;
}

.pwa-task-action-rail button:disabled {
  color: rgba(255, 255, 255, 0.48);
  opacity: 0.72;
}

.pwa-task-swipe .pwa-task-card {
  position: relative;
  z-index: 1;
  transform: translateX(var(--task-card-translate-x, 0));
  transition: transform 0.24s cubic-bezier(0.2, 0.85, 0.2, 1), filter 0.22s ease, opacity 0.22s ease;
  will-change: transform, filter, opacity;
}

.pwa-task-swipe.dragging .pwa-task-card {
  transition: filter 0.18s ease, opacity 0.18s ease;
}

.pwa-task-swipe.open .pwa-task-card,
.pwa-task-swipe.dragging .pwa-task-card {
  filter: blur(calc(var(--task-rail-reveal, 1) * 1.8px));
  opacity: calc(1 - (var(--task-rail-reveal, 1) * 0.18));
}

.pwa-task-card,
.pwa-project-card {
  display: grid;
  gap: 0.75rem;
}

.pwa-project-swipe {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  touch-action: pan-y;
  background: rgba(15, 23, 42, 0.92);
}

.pwa-project-action-rail {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 132px;
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 0.42rem;
  padding: 0.65rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
  filter: blur(calc((1 - var(--project-rail-reveal, 0)) * 10px));
  opacity: var(--project-rail-reveal, 0);
  transform: translateX(calc((1 - var(--project-rail-reveal, 0)) * 12px)) scale(calc(0.96 + (var(--project-rail-reveal, 0) * 0.04)));
  transition: opacity 0.22s ease, filter 0.22s ease, transform 0.22s ease;
  z-index: 0;
}

.pwa-project-swipe.open .pwa-project-action-rail,
.pwa-project-swipe.dragging .pwa-project-action-rail {
  filter: blur(0);
  opacity: 1;
  transform: translateX(0) scale(1);
}

.pwa-project-action-rail button {
  min-width: 0;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  place-items: center;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 0.28rem;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.35;
}

.pwa-project-swipe .pwa-project-card {
  position: relative;
  z-index: 1;
  transform: translateX(var(--project-card-translate-x, 0));
  transition: transform 0.24s cubic-bezier(0.2, 0.85, 0.2, 1), filter 0.22s ease, opacity 0.22s ease;
  will-change: transform, filter, opacity;
}

.pwa-project-swipe.dragging .pwa-project-card {
  transition: filter 0.18s ease, opacity 0.18s ease;
}

.pwa-project-swipe.open .pwa-project-card,
.pwa-project-swipe.dragging .pwa-project-card {
  filter: blur(calc(var(--project-rail-reveal, 1) * 1.8px));
  opacity: calc(1 - (var(--project-rail-reveal, 1) * 0.18));
}

.pwa-project-card-head,
.pwa-project-card-foot,
.pwa-project-meta,
.pwa-project-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pwa-project-card-head h3 {
  margin: 0;
  color: var(--pwa-text);
  font-size: 1rem;
  line-height: 1.7;
}

.pwa-project-progress {
  display: grid;
  gap: 0.4rem;
}

.pwa-project-progress span {
  color: var(--pwa-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.pwa-project-progress strong {
  color: var(--pwa-text);
  font-size: 0.9rem;
}

.pwa-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--pwa-border);
  overflow: hidden;
}

.pwa-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--pwa-primary);
}

.pwa-project-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.pwa-project-stats div {
  border-radius: 14px;
  background: var(--pwa-surface-muted);
  padding: 0.55rem;
  display: grid;
  gap: 0.15rem;
}

.pwa-project-stats span,
.pwa-project-meta span {
  color: var(--pwa-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.pwa-project-stats strong {
  color: var(--pwa-text);
  font-size: 1rem;
}

.pwa-project-meta {
  align-items: flex-start;
  flex-wrap: wrap;
}

.pwa-member-stack {
  display: flex;
  align-items: center;
  padding-right: 0.4rem;
}

.pwa-member-stack span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  margin-right: -0.4rem;
  display: grid;
  place-items: center;
  background: var(--pwa-primary-soft);
  color: var(--pwa-primary);
  font-size: 0.78rem;
  font-weight: 900;
  overflow: hidden;
}

.pwa-member-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pwa-project-card-foot button,
.pwa-project-actions button {
  min-height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: var(--pwa-primary-soft);
  color: var(--pwa-primary);
  padding: 0 0.75rem;
  font-weight: 900;
}

.pwa-swipe-hint {
  color: var(--pwa-muted-light);
  font-size: 0.74rem;
  font-weight: 800;
}

.pwa-project-actions {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.pwa-project-actions::-webkit-scrollbar {
  display: none;
}

.pwa-project-actions button {
  flex: 0 0 auto;
}

.pwa-project-members,
.pwa-project-task-preview,
.pwa-project-activity-list {
  display: grid;
  gap: 0.55rem;
}

.pwa-project-members article,
.pwa-project-task-preview button,
.pwa-project-activity-list article {
  border: 1px solid var(--pwa-border);
  border-radius: 16px;
  background: var(--pwa-surface-muted);
  padding: 0.75rem;
}

.pwa-project-members article {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pwa-project-members article > span {
  width: 38px;
  height: 38px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--pwa-primary-soft);
  color: var(--pwa-primary);
  font-weight: 900;
  overflow: hidden;
}

.pwa-project-members img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pwa-project-members div,
.pwa-project-task-preview button,
.pwa-project-activity-list article {
  display: grid;
  gap: 0.18rem;
  text-align: right;
}

.pwa-project-members strong,
.pwa-project-task-preview strong,
.pwa-project-activity-list strong {
  color: var(--pwa-text);
  font-size: 0.88rem;
}

.pwa-project-members small,
.pwa-project-task-preview span,
.pwa-project-task-preview small,
.pwa-project-activity-list span {
  color: var(--pwa-muted);
  font-size: 0.76rem;
}

.pwa-advanced-note {
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  color: var(--pwa-muted);
  padding: 0.8rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
}

html[data-theme='dark'] .pwa-advanced-note,
html[data-theme='dark'] .pwa-notification-preferences {
  border-color: var(--pwa-border);
  background: var(--pwa-surface-muted);
  color: var(--pwa-muted);
}

.pwa-task-card h3 {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.8;
}

.pwa-task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.pwa-task-card-head h3 {
  min-width: 0;
}

.pwa-task-project {
  margin: 0.15rem 0 0;
  color: var(--pwa-muted-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.pwa-task-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.pwa-task-info span {
  min-width: 0;
  border-radius: 14px;
  background: var(--pwa-surface-muted);
  color: var(--pwa-muted);
  padding: 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.pwa-task-comment {
  border-right: 3px solid var(--pwa-primary-border);
  border-radius: 12px;
  background: var(--pwa-primary-soft);
  color: var(--pwa-text-soft) !important;
  padding: 0.55rem 0.65rem;
  line-height: 1.7;
}

.pwa-task-meta,
.pwa-task-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pwa-chip.priority-urgent,
.pwa-chip.priority-high {
  background: #fef2f2;
  color: #dc2626;
}

.pwa-task-footer span {
  color: var(--pwa-muted);
  font-size: 0.8rem;
}

.pwa-task-footer button {
  height: 34px;
  border-radius: 999px;
  background: var(--pwa-primary-soft);
  color: var(--pwa-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.75rem;
  font-weight: 800;
}

.pwa-status-options {
  display: grid;
  gap: 0.55rem;
}

.pwa-status-options button {
  min-height: 50px;
  border-radius: 16px;
  background: var(--pwa-surface-muted);
  color: var(--pwa-text-soft);
  font-weight: 900;
  text-align: right;
  padding: 0 0.9rem;
}

.pwa-status-options button.active {
  background: var(--pwa-primary-soft);
  color: var(--pwa-primary-dark);
  box-shadow: inset 0 0 0 1px var(--pwa-primary-border);
}

.pwa-comment-form {
  display: grid;
  gap: 0.55rem;
}

.pwa-comment-form textarea {
  width: 100%;
  border: 1px solid var(--pwa-border);
  border-radius: 16px;
  background: var(--pwa-surface-muted);
  color: var(--pwa-text);
  padding: 0.8rem;
  font: inherit;
  resize: vertical;
}

.pwa-comment-form small {
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 800;
}

.pwa-detail-card,
.pwa-detail-info {
  border: 1px solid var(--pwa-border);
  background: var(--pwa-surface);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.pwa-detail-card {
  border-radius: 24px;
  padding: 1rem;
  display: grid;
  gap: 0.7rem;
}

.pwa-detail-card h1 {
  margin: 0;
  color: var(--pwa-text);
  font-size: 1.25rem;
  line-height: 1.7;
}

.pwa-detail-card p {
  margin: 0;
  color: var(--pwa-muted-dark);
  line-height: 1.8;
}

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

.pwa-detail-info {
  border-radius: 18px;
  padding: 0.75rem;
  display: grid;
  gap: 0.2rem;
}

.pwa-detail-info span {
  color: var(--pwa-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.pwa-detail-info strong {
  color: var(--pwa-text);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.pwa-comment-list,
.pwa-file-list {
  display: grid;
  gap: 0.55rem;
}

.pwa-comment-item,
.pwa-file-item,
.pwa-empty-inline {
  border-radius: 16px;
  background: var(--pwa-surface-muted);
  border: 1px solid var(--pwa-border);
  padding: 0.75rem;
}

.pwa-comment-item {
  display: grid;
  gap: 0.25rem;
}

.pwa-comment-item strong {
  color: var(--pwa-text);
  font-size: 0.88rem;
}

.pwa-comment-item p {
  margin: 0;
  color: var(--pwa-text-soft);
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pwa-comment-item small,
.pwa-empty-inline {
  color: var(--pwa-muted);
  font-size: 0.78rem;
}

.pwa-upload-button {
  width: fit-content;
  position: relative;
  overflow: hidden;
}

.pwa-upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.pwa-file-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-align: right;
  color: var(--pwa-primary);
  font-weight: 850;
  overflow: hidden;
}

.pwa-file-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pwa-notification {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: right;
}

.pwa-notification > span {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--pwa-surface-alt);
  color: var(--pwa-muted-dark);
  flex: 0 0 auto;
}

.pwa-notification.unread > span {
  background: var(--pwa-primary-soft);
  color: var(--pwa-primary);
}

.pwa-notification strong {
  color: var(--pwa-text);
  font-size: 0.9rem;
}

.pwa-notification p {
  margin: 0.2rem 0;
  color: var(--pwa-muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.pwa-notification small {
  color: var(--pwa-muted-light);
}

.pwa-notification-head-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.pwa-notification-head-actions > button,
.pwa-mark-all-read {
  min-height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: var(--pwa-surface);
  color: var(--pwa-primary);
  padding: 0 0.75rem;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--pwa-primary), transparent 88%);
  font-weight: 900;
}

.pwa-mark-all-read:disabled,
.pwa-notification-head-actions > button:disabled {
  opacity: 0.55;
}

.pwa-notification-swipe {
  position: relative;
  border-radius: 20px;
  overflow: visible;
  touch-action: pan-y;
  isolation: isolate;
}

.pwa-notification-swipe-action {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  opacity: 0;
  filter: blur(calc(var(--notification-swipe-progress, 0) * 3px));
  transition: opacity 0.24s cubic-bezier(0.2, 0.85, 0.2, 1), filter 0.24s cubic-bezier(0.2, 0.85, 0.2, 1);
  border-radius: 20px;
  z-index: 0;
  overflow: hidden;
}

.pwa-notification-swipe-action.remind,
.pwa-notification-swipe-action.archive {
  justify-content: flex-start;
  background: linear-gradient(90deg, #059669, rgba(5, 150, 105, 0.7));
}

.pwa-notification-swipe-action.dismiss,
.pwa-notification-swipe-action.delete {
  justify-content: flex-end;
  background: linear-gradient(270deg, #dc2626, rgba(220, 38, 38, 0.7));
}

.pwa-notification-swipe.remind .pwa-notification-swipe-action.remind,
.pwa-notification-swipe.dismiss .pwa-notification-swipe-action.dismiss,
.pwa-notification-swipe.archive .pwa-notification-swipe-action.archive,
.pwa-notification-swipe.delete .pwa-notification-swipe-action.delete {
  opacity: calc(0.92 - (var(--notification-swipe-progress, 0) * 0.42));
  filter: blur(calc(var(--notification-swipe-progress, 0) * 2.4px));
}

.pwa-notification-card {
  border: 1px solid var(--pwa-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
  overflow: hidden;
  transform: translate3d(var(--notification-card-translate-x, 0), 0, 0) scale(calc(1 - (var(--notification-swipe-progress, 0) * 0.012)));
  transition: transform 0.28s cubic-bezier(0.16, 0.92, 0.22, 1), opacity 0.24s ease, filter 0.24s ease;
  position: relative;
  z-index: 1;
  will-change: transform, opacity, filter;
}

html[data-theme='dark'] .pwa-notification-card {
  background: color-mix(in srgb, var(--pwa-surface), transparent 4%);
  border-color: var(--pwa-border);
}

.pwa-notification-card.unread {
  border-color: var(--pwa-primary-border);
  background: var(--pwa-surface);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--pwa-primary), transparent 86%);
}

.pwa-notification-card-main {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem;
  text-align: right;
}

.pwa-notification-swipe.dragging .pwa-notification-card {
  transition: none;
}

.pwa-notification-swipe.exiting .pwa-notification-card {
  opacity: 0.58;
  filter: blur(0.5px);
  transition: transform 0.38s cubic-bezier(0.16, 0.92, 0.18, 1), opacity 0.3s ease, filter 0.3s ease;
}

.pwa-notification-swipe.settling .pwa-notification-card {
  transition: transform 0.24s cubic-bezier(0.2, 0.85, 0.2, 1);
}

.pwa-notification-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--pwa-primary-soft);
  color: var(--pwa-primary);
}

.pwa-notification-card.read .pwa-notification-card-icon {
  background: var(--pwa-surface-alt);
  color: var(--pwa-muted);
}

.pwa-notification-card-copy {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.pwa-notification-card-copy small,
.pwa-notification-card-copy em {
  color: var(--pwa-muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.pwa-notification-card-copy strong {
  color: var(--pwa-text);
  font-size: 0.92rem;
}

.pwa-notification-card-copy span {
  color: var(--pwa-text-soft);
  font-size: 0.82rem;
  line-height: 1.65;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pwa-notification-card.read .pwa-notification-card-copy {
  opacity: 0.74;
}

.pwa-notification-card-main i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--pwa-primary);
  box-shadow: 0 0 0 4px var(--pwa-primary-ring);
}

.pwa-notification-unread-btn {
  width: 100%;
  min-height: 36px;
  border-top: 1px solid var(--pwa-border);
  color: var(--pwa-primary);
  font-size: 0.78rem;
  font-weight: 900;
}

.pwa-notification-detail {
  display: grid;
  gap: 0.65rem;
}

.pwa-notification-detail > span {
  color: var(--pwa-muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.pwa-notification-detail h2 {
  margin: 0;
  color: var(--pwa-text);
  font-size: 1.08rem;
}

.pwa-notification-detail p {
  margin: 0;
  color: var(--pwa-text-soft);
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pwa-notification-detail small {
  color: var(--pwa-muted);
}

.pwa-notification-preferences {
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.85rem;
  display: grid;
  gap: 0.25rem;
}

.pwa-notification-preferences strong {
  color: var(--pwa-text);
  font-size: 0.88rem;
}

.pwa-notification-preferences span {
  color: var(--pwa-muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

.pwa-empty-card,
.pwa-state-card,
.pwa-placeholder {
  min-height: 160px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.45rem;
  padding: 1.25rem;
  color: var(--pwa-muted);
}

.pwa-empty-card strong,
.pwa-state-card strong,
.pwa-placeholder h2 {
  color: var(--pwa-text);
}

.pwa-theme-panel {
  align-items: stretch;
  justify-items: stretch;
}

.pwa-theme-panel .theme-mode-toggle,
.pwa-theme-panel .theme-accent-picker {
  width: 100%;
  justify-content: center;
}

.pwa-theme-panel .theme-accent-picker {
  justify-items: center;
}

.pwa-profile-hero {
  border: 1px solid var(--pwa-border);
  border-radius: 26px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--pwa-primary-soft), transparent 18%), var(--pwa-surface) 68%);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  overflow: hidden;
}

.pwa-profile-avatar {
  border-radius: 999px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--pwa-primary-soft);
  color: var(--pwa-primary);
  border: 3px solid var(--pwa-surface);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--pwa-primary), transparent 78%);
  overflow: hidden;
}

.pwa-profile-avatar.lg {
  width: 82px;
  height: 82px;
}

.pwa-profile-avatar.sm {
  width: 46px;
  height: 46px;
}

.pwa-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pwa-profile-avatar b {
  font-size: 1.35rem;
}

.pwa-profile-hero div {
  min-width: 0;
}

.pwa-profile-hero span,
.pwa-profile-note {
  color: var(--pwa-muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.8;
}

.pwa-profile-hero h2 {
  margin: 0.08rem 0;
  color: var(--pwa-text);
  font-size: 1.2rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.pwa-profile-hero p {
  margin: 0;
  color: var(--pwa-muted-dark);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.pwa-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.pwa-profile-badges em,
.pwa-access-admin,
.pwa-access-list span {
  min-height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--pwa-primary-soft);
  color: var(--pwa-primary);
  padding: 0 0.65rem;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 900;
}

.pwa-profile-info-list,
.pwa-settings-list,
.pwa-toggle-list,
.pwa-install-grid,
.pwa-access-list {
  display: grid;
  gap: 0.55rem;
}

.pwa-profile-info-row,
.pwa-settings-list button,
.pwa-toggle-row,
.pwa-install-grid span {
  min-height: 52px;
  border: 1px solid var(--pwa-border);
  border-radius: 16px;
  background: var(--pwa-surface-muted);
  display: grid;
  grid-template-columns: auto minmax(78px, 0.55fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem;
  text-align: right;
}

.pwa-profile-info-row svg,
.pwa-settings-list svg,
.pwa-toggle-row svg,
.pwa-install-grid svg {
  color: var(--pwa-primary);
}

.pwa-profile-info-row span,
.pwa-settings-list small {
  color: var(--pwa-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.pwa-profile-info-row strong,
.pwa-settings-list span {
  min-width: 0;
  color: var(--pwa-text);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

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

.pwa-access-list span {
  border-radius: 14px;
  justify-content: flex-start;
  min-height: 38px;
}

.pwa-access-admin {
  border-radius: 16px;
  justify-content: center;
  min-height: 42px;
}

.pwa-segmented {
  min-height: 44px;
  border: 1px solid var(--pwa-border);
  border-radius: 16px;
  background: var(--pwa-surface-muted);
  padding: 0.2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.2rem;
}

.pwa-segmented button {
  border-radius: 13px;
  color: var(--pwa-muted-dark);
  font-weight: 900;
}

.pwa-segmented button.active {
  background: var(--pwa-primary);
  color: #ffffff;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--pwa-primary), transparent 74%);
}

.pwa-toggle-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.pwa-toggle-row > span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--pwa-text);
  font-weight: 900;
}

.pwa-toggle-row input {
  width: 46px;
  height: 26px;
  appearance: none;
  border-radius: 999px;
  background: var(--pwa-border);
  position: relative;
  transition: background 0.2s ease;
}

.pwa-toggle-row input::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--pwa-surface);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.16);
  transition: transform 0.2s ease;
}

.pwa-toggle-row input:checked {
  background: var(--pwa-primary);
}

.pwa-toggle-row input:checked::after {
  transform: translateX(-20px);
}

.pwa-profile-action,
.pwa-logout-card button {
  min-height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--pwa-primary);
  color: #ffffff;
  font-weight: 900;
  padding: 0 0.9rem;
}

.pwa-logout-card button {
  width: 100%;
  background: #dc2626;
}

.pwa-install-grid span {
  grid-template-columns: auto minmax(0, 1fr);
  color: var(--pwa-text-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.pwa-state-card button {
  height: 38px;
  border-radius: 999px;
  background: var(--pwa-primary);
  color: #ffffff;
  padding: 0 1rem;
  font-weight: 800;
}

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

.pwa-manager-grid .pwa-stat-card {
  min-height: 92px;
}

.pwa-sprint-line {
  border-radius: 18px;
  background: var(--pwa-surface-muted);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem;
}

.pwa-sprint-line span { color: var(--pwa-muted); }
.pwa-sprint-line strong { color: var(--pwa-text); }

.pwa-sprint-selector {
  min-height: 54px;
  border: 1px solid var(--pwa-border);
  border-radius: 18px;
  background: var(--pwa-surface);
  padding: 0.7rem 0.85rem;
  display: grid;
  gap: 0.35rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.pwa-sprint-selector span {
  color: var(--pwa-muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.pwa-sprint-selector select {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--pwa-text);
  font: inherit;
  font-weight: 900;
  outline: none;
}

.pwa-sprint-summary-card {
  border: 1px solid var(--pwa-border);
  border-radius: 26px;
  background: var(--pwa-surface);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  padding: 1rem;
  display: grid;
  gap: 0.9rem;
}

.pwa-sprint-summary-head {
  display: grid;
  gap: 0.28rem;
}

.pwa-sprint-summary-head span,
.pwa-sprint-summary-head p {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--pwa-muted);
  font-size: 0.8rem;
  font-weight: 850;
  margin: 0;
}

.pwa-sprint-summary-head span {
  color: var(--pwa-primary);
}

.pwa-sprint-summary-head h2 {
  margin: 0;
  color: var(--pwa-text);
  font-size: 1.18rem;
  line-height: 1.7;
}

.pwa-sprint-progress {
  display: grid;
  gap: 0.45rem;
}

.pwa-sprint-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pwa-sprint-progress span {
  color: var(--pwa-muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.pwa-sprint-progress strong {
  color: var(--pwa-text);
  font-size: 0.95rem;
}

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

.pwa-sprint-summary-grid div {
  min-width: 0;
  border-radius: 16px;
  background: var(--pwa-surface-muted);
  border: 1px solid var(--pwa-border);
  padding: 0.7rem;
  display: grid;
  gap: 0.18rem;
}

.pwa-sprint-summary-grid svg {
  color: var(--pwa-primary);
}

.pwa-sprint-summary-grid span {
  color: var(--pwa-muted);
  font-size: 0.75rem;
  font-weight: 850;
}

.pwa-sprint-summary-grid strong {
  color: var(--pwa-text);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.pwa-sprint-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(82%, 1fr);
  gap: 0.85rem;
  overflow-x: auto;
  padding: 0.1rem 0 0.4rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.pwa-sprint-board::-webkit-scrollbar {
  display: none;
}

.pwa-sprint-column {
  scroll-snap-align: start;
  border: 1px solid var(--pwa-border);
  border-radius: 24px;
  background: color-mix(in srgb, var(--pwa-surface), transparent 5%);
  padding: 0.85rem;
  display: grid;
  align-content: start;
  gap: 0.75rem;
  min-height: 260px;
}

.pwa-sprint-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pwa-sprint-column-head h3 {
  margin: 0;
  color: var(--pwa-text);
  font-size: 0.95rem;
}

.pwa-sprint-column-head span {
  min-width: 28px;
  height: 26px;
  border-radius: 999px;
  background: var(--pwa-primary-soft);
  color: var(--pwa-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 950;
}

.pwa-sprint-column-tasks {
  display: grid;
  gap: 0.65rem;
}

.pwa-sprint-task-card {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

html[data-theme='dark'] .pwa-sprint-summary-card,
html[data-theme='dark'] .pwa-sprint-selector,
html[data-theme='dark'] .pwa-sprint-column {
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

.pwa-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(94vw, 520px);
  min-height: 68px;
  border-radius: 28px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  gap: 0.2rem;
  padding: 0.5rem 0.45rem;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(18px);
  z-index: 30;
}

.pwa-nav-item {
  position: relative;
  height: 52px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.04rem;
  color: #cbd5e1;
  font-size: 0.62rem;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.2s ease, color 0.2s ease;
  isolation: isolate;
}

.pwa-nav-item.active {
  color: var(--pwa-primary);
}

.pwa-nav-item.active::before {
  content: '';
  position: absolute;
  inset: 0 5%;
  border-radius: inherit;
  background: var(--pwa-surface);
  z-index: -1;
}

.pwa-nav-icon-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.pwa-nav-badge {
  position: absolute;
  top: -9px;
  left: -13px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #ffffff;
  border: 2px solid var(--pwa-text);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  padding: 0 0.24rem;
}

.pwa-nav-item.active .pwa-nav-badge {
  border-color: #ffffff;
}

.pwa-nav-create {
  height: 52px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.04rem;
  background: var(--pwa-primary);
  color: #ffffff;
  box-shadow: 0 16px 32px color-mix(in srgb, var(--pwa-primary), transparent 66%);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.2;
}

.pwa-nav-spacer {
  height: 52px;
}

.pwa-fab {
  position: fixed;
  left: 1.25rem;
  bottom: calc(5.8rem + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--pwa-primary);
  color: #ffffff;
  box-shadow: 0 18px 40px color-mix(in srgb, var(--pwa-primary), transparent 68%);
  z-index: 25;
}

.pwa-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  z-index: 40;
}

.pwa-action-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, var(--sheet-offset-y, 0));
  width: min(100%, 560px);
  border-radius: 28px 28px 0 0;
  background: var(--pwa-surface);
  padding: 0.75rem 1rem calc(1rem + env(safe-area-inset-bottom));
  box-shadow: 0 -22px 60px rgba(15, 23, 42, 0.22);
  z-index: 45;
  animation: pwaSheetIn 0.26s cubic-bezier(0.2, 0.85, 0.2, 1);
  transition: transform 0.24s cubic-bezier(0.2, 0.85, 0.2, 1);
  will-change: transform;
  touch-action: none;
  user-select: none;
}

.pwa-action-sheet.dragging,
.pwa-bottom-sheet.dragging {
  transition: none;
}

.pwa-action-sheet.closing,
.pwa-bottom-sheet.closing {
  transition: transform 0.17s ease-in;
}

.pwa-sheet-handle {
  width: 46px;
  height: 5px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 0 auto 1rem;
  cursor: grab;
}

.pwa-sheet-handle:active {
  cursor: grabbing;
}

.pwa-action-sheet h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.pwa-action-list {
  display: grid;
  gap: 0.6rem;
}

.pwa-action-list button {
  min-height: 58px;
  border-radius: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.7rem;
  align-items: center;
  text-align: right;
  background: var(--pwa-surface-muted);
  padding: 0.75rem;
}

.pwa-action-list svg {
  grid-row: span 2;
  color: var(--pwa-primary);
}

.pwa-action-list span {
  color: var(--pwa-text);
  font-weight: 800;
}

.pwa-action-list small {
  color: var(--pwa-muted);
}

.pwa-bottom-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, var(--sheet-offset-y, 0));
  width: min(100%, 560px);
  max-height: min(88vh, 760px);
  border-radius: 28px 28px 0 0;
  background: var(--pwa-surface);
  box-shadow: 0 -24px 70px rgba(15, 23, 42, 0.24);
  z-index: 45;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pwaSheetIn 0.26s cubic-bezier(0.2, 0.85, 0.2, 1);
  transition: transform 0.24s cubic-bezier(0.2, 0.85, 0.2, 1);
  will-change: transform;
  touch-action: none;
  user-select: none;
}

.pwa-bottom-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem 0.75rem;
}

.pwa-bottom-sheet-head h2 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--pwa-text);
}

.pwa-bottom-sheet-head button {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--pwa-surface-alt);
  color: var(--pwa-muted-dark);
}

.pwa-bottom-sheet-content {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 1rem 1rem;
}

.pwa-bottom-sheet-footer {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 0.7rem;
  padding: 0.8rem 1rem calc(0.9rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, color-mix(in srgb, var(--pwa-surface), transparent 14%), var(--pwa-surface) 35%);
  border-top: 1px solid var(--pwa-border);
}

.pwa-sheet-cancel,
.pwa-sheet-submit {
  min-height: 48px;
  border-radius: 16px;
  font-weight: 900;
}

.pwa-sheet-cancel {
  background: var(--pwa-surface-alt);
  color: var(--pwa-muted-dark);
}

.pwa-sheet-submit {
  background: var(--pwa-primary);
  color: #ffffff;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--pwa-primary), transparent 76%);
}

.pwa-sheet-submit.danger {
  background: #dc2626;
}

.pwa-sheet-submit:disabled,
.pwa-sheet-cancel:disabled {
  opacity: 0.58;
  color: var(--pwa-disabled-text);
  cursor: not-allowed;
}

.pwa-task-form {
  display: grid;
  gap: 0.82rem;
}

.pwa-field {
  display: grid;
  gap: 0.42rem;
  color: var(--pwa-text);
  font-weight: 850;
}

.pwa-field > span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.86rem;
}

.pwa-field b {
  color: #dc2626;
}

.pwa-field input,
.pwa-field select,
.pwa-field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--pwa-border);
  border-radius: 16px;
  background: var(--pwa-input-bg);
  color: var(--pwa-input-text);
  padding: 0.75rem 0.85rem;
  font: inherit;
  outline: none;
  resize: vertical;
}

.pwa-field input:focus,
.pwa-field select:focus,
.pwa-field textarea:focus {
  border-color: var(--pwa-primary);
  background: var(--pwa-surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pwa-primary), transparent 86%);
}

.pwa-field small,
.pwa-field-note,
.pwa-form-error {
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.7;
}

.pwa-field-note {
  color: var(--pwa-muted);
  font-style: normal;
}

.pwa-form-error,
.pwa-form-loading {
  border-radius: 18px;
  padding: 0.85rem;
  background: #fef2f2;
  text-align: center;
}

.pwa-form-loading {
  background: var(--pwa-surface-muted);
  color: var(--pwa-muted);
  font-weight: 800;
}

.pwa-priority-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.pwa-priority-options button {
  min-height: 42px;
  border-radius: 14px;
  background: var(--pwa-surface-alt);
  color: var(--pwa-muted-dark);
  font-weight: 900;
}

.pwa-priority-options button.active {
  background: var(--pwa-primary-soft);
  color: var(--pwa-primary-dark);
  box-shadow: inset 0 0 0 1px var(--pwa-primary-border);
}

.pwa-action-empty {
  border-radius: 18px;
  background: var(--pwa-surface-muted);
  color: var(--pwa-muted);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 1rem;
  text-align: center;
}

.pwa-in-app-notification {
  position: fixed;
  top: calc(0.65rem + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 520px);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(18px);
  z-index: 70;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  overflow: hidden;
  animation: pwaNotifyIn 0.28s ease-out;
}

html[data-theme='dark'] .pwa-in-app-notification {
  background: color-mix(in srgb, var(--pwa-surface), transparent 3%);
  border-color: var(--pwa-border);
}

.pwa-notification-body {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.72rem;
  text-align: right;
  background: transparent;
}

.pwa-notification-symbol {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--pwa-primary-soft);
  color: var(--pwa-primary);
}

.pwa-in-app-notification.success .pwa-notification-symbol {
  background: #ecfdf5;
  color: #059669;
}

.pwa-in-app-notification.error .pwa-notification-symbol {
  background: #fef2f2;
  color: #dc2626;
}

.pwa-notification-copy {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.pwa-notification-copy small,
.pwa-notification-copy em {
  color: var(--pwa-muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.pwa-notification-copy strong {
  color: var(--pwa-text);
  font-size: 0.9rem;
}

.pwa-notification-copy span {
  color: var(--pwa-text-soft);
  font-size: 0.8rem;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pwa-notification-action {
  color: var(--pwa-primary);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

@keyframes pwaSheetIn {
  from { transform: translate(-50%, 110%); opacity: 0.72; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes pwaNotifyIn {
  from { transform: translate(-50%, -16px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.pwa-skeleton {
  border-radius: 22px;
  background: linear-gradient(90deg, var(--pwa-border), var(--pwa-surface-muted), var(--pwa-border));
  background-size: 220% 100%;
  animation: pwaSkeleton 1.2s infinite linear;
}

.pwa-skeleton.hero { height: 150px; }
.pwa-skeleton.stat { height: 112px; }
.pwa-skeleton.row { height: 92px; }
.pwa-skeleton.task-card { height: 184px; }
.pwa-skeleton.project-card { height: 220px; }
.pwa-skeleton.notification-card { height: 92px; }
.pwa-skeleton.detail { height: 360px; }

@keyframes pwaSkeleton {
  from { background-position: 0 0; }
  to { background-position: -220% 0; }
}

@media (max-width: 390px) {
  .pwa-shell { padding-inline: 0.75rem; }
  .pwa-stat-grid,
  .pwa-manager-grid { gap: 0.55rem; }
  .pwa-manager-grid { grid-template-columns: 1fr; }
  .pwa-nav-item span { font-size: 0.62rem; }
  .pwa-bottom-nav { width: 96vw; min-height: 64px; padding: 0.42rem 0.36rem; gap: 0.12rem; }
  .pwa-nav-item,
  .pwa-nav-create,
  .pwa-nav-spacer { height: 49px; border-radius: 17px; }
  .pwa-nav-item span:last-child,
  .pwa-nav-create span { font-size: 0.56rem; }
  .pwa-priority-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pwa-notification-body { grid-template-columns: 38px minmax(0, 1fr); }
  .pwa-notification-card-main { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .pwa-notification-action { display: none; }
  .pwa-task-info,
  .pwa-detail-grid,
  .pwa-project-stats,
  .pwa-access-list,
  .pwa-sprint-summary-grid { grid-template-columns: 1fr; }
  .pwa-sprint-board { grid-auto-columns: minmax(90%, 1fr); }
  .pwa-profile-hero { align-items: flex-start; }
  .pwa-profile-info-row { grid-template-columns: auto minmax(0, 1fr); }
  .pwa-profile-info-row strong { grid-column: 2; }
}
