@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --success: #15803d;
  --success-soft: #dcfce7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  --radius: 18px;
  --font-family: "Vazirmatn", "Segoe UI", Tahoma, "Iranian Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 100% 0, rgba(37, 99, 235, 0.09), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-family);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  text-decoration: underline;
}

button,
input,
textarea,
select {
  font: inherit;
}

.container {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

.page {
  flex: 1;
  padding-block: 2.5rem 3rem;
}

.site-header {
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1.08rem;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.28);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.user-email {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  padding-block: 1rem;
}

.site-footer .container {
  display: flex;
  justify-content: center;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

h1,
h2 {
  line-height: 1.35;
  margin: 0;
}

h1 {
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
}

.muted {
  color: var(--muted);
  margin: 0.45rem 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.7rem 1.15rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-soft);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-danger:hover {
  background: #fecaca;
}

.btn-small {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

.stack {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-size: 0.88rem;
  font-weight: 700;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 0.75rem 0.9rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

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

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.alert {
  margin-top: 1.15rem;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.alert-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #fecaca;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 1.5rem;
  align-items: stretch;
  max-width: 940px;
  margin-inline: auto;
}

.auth-card {
  padding: clamp(1.5rem, 4vw, 2.6rem);
}

.auth-card .muted {
  margin-top: 0.5rem;
}

.switch {
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.auth-aside {
  background: linear-gradient(145deg, #0f172a, #1e3a8a 70%, #1d4ed8);
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.6rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

.auth-aside::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border: 30px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  bottom: -90px;
  left: -70px;
}

.auth-aside h2 {
  font-size: 1.55rem;
  color: #fff;
  margin-bottom: 0.55rem;
}

.auth-aside p {
  color: #cbd5e1;
  margin: 0;
}

.aside-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #dbeafe;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.feature-list li {
  padding-right: 1.6rem;
  position: relative;
  font-size: 0.9rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0.55em;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

.tasks-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stats {
  display: flex;
  gap: 0.6rem;
}

.stat {
  min-width: 82px;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
}

.stat-label {
  color: var(--muted);
  font-size: 0.75rem;
}

.stat-success .stat-value {
  color: var(--success);
}

.task-form {
  padding: 1.25rem;
  margin-bottom: 1.35rem;
}

.task-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.task-form .btn {
  align-self: end;
}

.tabs {
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
  overflow-x: auto;
}

.tab {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab:hover {
  color: var(--text);
  text-decoration: none;
}

.tab span {
  display: inline-block;
  min-width: 1.4rem;
  margin-right: 0.15rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 0.75rem;
  text-align: center;
}

.tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab.is-active span {
  background: var(--primary-soft);
}

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.task-card {
  padding: 1rem 1.1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.task-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
}

.task-main {
  display: flex;
  gap: 0.85rem;
  min-width: 0;
}

.check-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.check-button:hover {
  border-color: var(--primary);
}

.check-mark {
  width: 12px;
  height: 7px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
}

.is-done .check-button {
  background: var(--success);
  border-color: var(--success);
}

.is-done .check-mark {
  opacity: 1;
}

.task-content {
  min-width: 0;
  padding-top: 0.2rem;
}

.task-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.task-heading h2 {
  font-size: 1rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.is-done .task-heading h2 {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.badge {
  display: inline-block;
  background: var(--surface-soft);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-success {
  background: var(--success-soft);
  border-color: #bbf7d0;
  color: var(--success);
}

.task-description {
  margin: 0.3rem 0 0;
  color: #475569;
  font-size: 0.9rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.task-meta {
  margin: 0.5rem 0 0;
  color: #94a3b8;
  font-size: 0.75rem;
}

.task-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  flex-shrink: 0;
}

.edit-panel {
  position: relative;
}

.edit-panel summary {
  list-style: none;
  user-select: none;
}

.edit-panel summary::-webkit-details-marker {
  display: none;
}

.edit-form {
  position: absolute;
  z-index: 5;
  top: calc(100% + 0.5rem);
  left: 0;
  width: min(360px, calc(100vw - 3rem));
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.edit-form .btn {
  justify-self: start;
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
}

.empty-mark {
  display: inline-block;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: 2px dashed #bfdbfe;
  background: var(--primary-soft);
  margin-bottom: 1rem;
  position: relative;
}

.empty-mark::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 9px;
  border-right: 3px solid var(--primary);
  border-bottom: 3px solid var(--primary);
  transform: rotate(45deg);
  top: 18px;
  left: 18px;
}

.empty-state h2 {
  font-size: 1.15rem;
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

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

  .auth-aside {
    min-height: 240px;
  }

  .tasks-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .task-form-grid {
    grid-template-columns: 1fr;
  }

  .task-card {
    flex-direction: column;
  }

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

  .edit-form {
    left: auto;
    right: 0;
  }
}

@media (max-width: 560px) {
  .user-email {
    display: none;
  }

  .stats {
    width: 100%;
  }

  .stat {
    flex: 1;
  }

  .page {
    padding-block: 1.5rem 2rem;
  }
}

.header-nav {
  display: flex;
  gap: 0.35rem;
  margin-inline-start: auto;
}

.nav-link {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
}

.nav-link:hover {
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
}

.badge-owner {
  background: var(--primary-soft);
  border-color: #bfdbfe;
  color: var(--primary-dark);
}

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

.project-card {
  display: block;
  padding: 1.15rem;
  color: var(--text);
}

.project-card:hover {
  text-decoration: none;
  border-color: #cbd5e1;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.project-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.project-card-head h2 {
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.project-description {
  margin-top: 0.6rem;
  font-size: 0.88rem;
}

.project-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.back-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.35rem;
  position: relative;
  text-align: right;
}

.board-head-text {
  min-width: 0;
}

.board-head h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.head-edit {
  flex-shrink: 0;
}

.head-edit .edit-form {
  position: static;
  left: auto;
  top: auto;
  width: min(340px, calc(100vw - 3rem));
  margin-top: 0.5rem;
}

.head-edit form[data-confirm] {
  width: min(340px, calc(100vw - 3rem));
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.head-edit form[data-confirm] .btn {
  width: 100%;
}

.board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
}

.board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
  align-items: start;
  padding-bottom: 0.75rem;
}

.board-column {
  min-width: 0;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.8rem;
  position: relative;
}

.board-column-new {
  background: transparent;
  border-style: dashed;
}

.board-column-new h2 {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

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

.board-column-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.board-column-title h2 {
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.column-count {
  min-width: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.icon-btn {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  width: 30px;
  height: 30px;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.column-menu .edit-form {
  top: calc(100% + 0.45rem);
  left: 0;
  right: auto;
  width: min(260px, calc(100vw - 3rem));
}

.card-list {
  display: grid;
  gap: 0.55rem;
  min-height: 40px;
}

.card-mini {
  display: grid;
  gap: 0.4rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  box-shadow: none;
  cursor: grab;
}

.card-mini.dragging {
  opacity: 0.5;
}

.card-mini-title {
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.card-mini-title:hover {
  color: var(--primary);
}

.card-mini-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.due-badge {
  align-self: flex-start;
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.due-badge.is-soon {
  background: #fef9c3;
  border-color: #fde68a;
  color: #92400e;
}

.due-badge.is-overdue {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger);
}

.due-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.due-summary {
  margin-top: -0.25rem;
}


.avatars {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #1d4ed8);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

.add-card-form {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.add-card-form input {
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  font-size: 0.85rem;
}

.board-side {
  display: grid;
  gap: 1rem;
}

.side-card {
  padding: 1rem;
}

.side-card h2 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

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

.member-info {
  display: grid;
  min-width: 0;
  flex: 1;
}

.member-info strong {
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.member-info span {
  color: var(--muted);
  font-size: 0.74rem;
}

.add-member-form {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.check-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.check-line input {
  width: auto;
}

.card-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
}

.assignee-field {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
}

.assignee-field legend {
  font-size: 0.85rem;
  font-weight: 700;
  padding-inline: 0.35rem;
}

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

.detail-list {
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-weight: 700;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: #fff;
  color: var(--text);
  padding: 0.75rem 2.25rem 0.75rem 0.9rem;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.9rem center;
  background-size: 12px;
  cursor: pointer;
}

select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

@media (max-width: 980px) {
  .board-layout,
  .card-detail {
    grid-template-columns: 1fr;
  }

  .board-side {
    order: 2;
  }
}

@media (max-width: 820px) {
  .board-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-nav {
    margin-inline-start: 0;
  }

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

  .board-column {
    width: 100%;
  }
}

.modal {
  width: min(520px, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
  color: var(--text);
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.modal .stack {
  padding: 1.5rem;
  margin-top: 0;
}

.modal .form-actions {
  margin-top: 0.25rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-body h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.settings-form {
  display: grid;
  gap: 0.9rem;
}

.danger-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.progress {
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-soft);
  accent-color: var(--primary);
}

.progress::-webkit-progress-bar {
  background: var(--surface-soft);
  border-radius: 999px;
}

.progress::-webkit-progress-value {
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  border-radius: 999px;
}

.progress::-moz-progress-bar {
  background: var(--primary);
  border-radius: 999px;
}

.project-progress {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.9rem;
}

.progress-text {
  color: var(--muted);
  font-size: 0.78rem;
}

.board-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.board-progress .progress {
  flex: 1;
}

.board-progress .progress-text {
  white-space: nowrap;
}

.color-blue { --project-color: #2563eb; --project-soft: #e6efff; }
.color-green { --project-color: #16a34a; --project-soft: #e5f6ec; }
.color-purple { --project-color: #7c3aed; --project-soft: #efe7fe; }
.color-orange { --project-color: #ea580c; --project-soft: #ffefe3; }
.color-rose { --project-color: #e11d48; --project-soft: #ffe7ee; }
.color-teal { --project-color: #0d9488; --project-soft: #e0f5f2; }
.color-slate { --project-color: #475569; --project-soft: #eceff3; }

.project-card.card {
  display: flex;
  flex-direction: column;
  background: var(--project-soft, var(--surface));
  border-color: color-mix(in srgb, var(--project-color, var(--line)) 22%, #ffffff);
}

.project-card-head {
  align-items: flex-start;
}

.project-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.project-card .project-progress {
  margin-top: auto;
  padding-top: 0.9rem;
}

.project-card-foot {
  margin-top: 0.75rem;
}

.project-card.card:hover {
  border-color: var(--project-color, #cbd5e1);
}

.badge-mine {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.done-filter {
  margin-bottom: 1rem;
}

.switch-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.switch-line input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-box {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.18s ease;
  flex-shrink: 0;
}

.switch-box::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.switch-line input:checked + .switch-box {
  background: var(--primary);
}

.switch-line input:checked + .switch-box::after {
  transform: translateX(-16px);
}

.switch-line input:focus-visible + .switch-box {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.project-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--project-color, var(--primary));
  flex-shrink: 0;
}

.progress {
  --project-color: var(--primary);
}

.progress::-webkit-progress-value {
  background: var(--project-color);
}

.progress::-moz-progress-bar {
  background: var(--project-color);
}

.badge.priority-low {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

.badge.priority-normal {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.badge.priority-high {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.badge.priority-urgent {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger);
}

.card-mini-top {
  display: flex;
}

.card-mini-creator {
  color: var(--muted);
  font-size: 0.72rem;
}

.add-card-button {
  width: 100%;
  margin-top: 0.6rem;
}

.color-choices {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
}

.color-choices legend {
  font-size: 0.85rem;
  font-weight: 700;
  padding-inline: 0.35rem;
}

.color-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.color-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.color-choice input {
  width: auto;
}

.color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  background: var(--project-color, var(--primary));
}

.color-name {
  color: var(--muted);
}

.my-task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.my-task-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
}

.my-task-main {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

.my-task-title {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.my-task-title:hover {
  color: var(--primary);
}

.my-task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.my-task-row.is-done .my-task-title {
  color: var(--muted);
  text-decoration: line-through;
}

.field-error {
  margin: 0.35rem 0 0;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
}

.notif {
  position: relative;
}

.notif-bell {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0 0.6rem;
  width: auto;
  font-size: 0.82rem;
  font-weight: 700;
}

.notif-count {
  min-width: 1.2rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  line-height: 1.4;
  text-align: center;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  width: min(320px, calc(100vw - 2rem));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  padding: 0.6rem;
  z-index: 70;
}

.notif-head {
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.2rem 0.4rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.2rem;
}

.notif-item:last-child {
  border-bottom: 0;
}

.notif-item a {
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
}

.notif-item.is-unread a::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  margin-inline-end: 0.4rem;
  vertical-align: middle;
}

.notif-body {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.notif-empty {
  padding: 0.7rem 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.notif-enable {
  margin-top: 0.5rem;
  width: 100%;
}

.notif-hint {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.7;
}

form.has-error .assignee-field {
  border-color: #fecaca;
  background: #fff5f5;
}
