@font-face {
  font-family: "IRANYekanX";
  src: url("../fonts/IRANYekanXFaNum-Regular-NJOSFezJ.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanX";
  src: url("../fonts/IRANYekanXFaNum-Medium-DtIGUAVZ.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanX";
  src: url("../fonts/IRANYekanXFaNum-DemiBold-DOu07JpD.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanX";
  src: url("../fonts/IRANYekanXFaNum-Bold-DnKohisb.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #080b12;
  --surface: #101625;
  --surface-2: #151d31;
  --surface-3: #1b2540;
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.15);
  --text: #f6f7ff;
  --muted: #9aa6c7;
  --muted-2: #7682a5;
  --primary: #8b7cff;
  --primary-2: #6255ef;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #38bdf8;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  --font: "IRANYekanX", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  background:
    radial-gradient(circle at top right, rgba(139, 124, 255, 0.16), transparent 30%),
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.1), transparent 26%),
    linear-gradient(180deg, #080b12, #0b0f19);
  color: var(--text);
  padding: 24px 0 48px;
  line-height: 1.8;
}

button,
input,
textarea {
  font-family: var(--font);
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0b1020;
}

::-webkit-scrollbar-thumb {
  background: #2b3555;
  border-radius: 999px;
  border: 2px solid #0b1020;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a4670;
}

.app {
  width: min(1480px, calc(100% - 28px));
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(25, 33, 56, 0.96), rgba(51, 43, 112, 0.9));
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -120px auto auto -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.13);
  filter: blur(24px);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: #dcd7ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.hero__info h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
}

.hero__info p {
  margin: 0;
  max-width: 870px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.project-name {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  min-width: min(100%, 430px);
}

.project-name input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(8, 11, 18, 0.55);
  color: var(--text);
  outline: none;
  padding: 0 14px;
  font-size: 14px;
}

.project-name input:focus,
.search:focus,
.note textarea:focus {
  border-color: rgba(139, 124, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(139, 124, 255, 0.12);
}

.badges {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.badges span {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 600;
}

.dashboard {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  margin-top: 18px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(17, 23, 38, 0.96), rgba(12, 17, 29, 0.96));
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.28);
  padding: 22px;
}

.card__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.card__head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.card__head strong {
  font-size: 20px;
  color: #dcd7ff;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.progress {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #101827;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress__bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #4f7cff, var(--info));
  transition: width 0.25s ease;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.stat {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.stat strong {
  font-size: 28px;
  line-height: 1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  transition: 0.2s ease;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 10px 24px rgba(139, 124, 255, 0.25);
}

.btn--soft {
  color: #dfe5ff;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
}

.btn--success {
  color: #9df2b9;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.btn--danger {
  color: #ffaaa9;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.22);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.toolbar {
  display: grid;
  grid-template-columns: 1.35fr repeat(4, minmax(155px, 185px));
  gap: 12px;
  margin-top: 18px;
}

.search {
  width: 100%;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(15, 20, 33, 0.92);
  color: var(--text);
  outline: none;
  padding: 0 16px;
  font-size: 14px;
}

.search::placeholder,
.note textarea::placeholder {
  color: var(--muted-2);
}

/* Custom Select */

.custom-select {
  position: relative;
  user-select: none;
  min-width: 150px;
}

.custom-select__button {
  width: 100%;
  height: 52px;
  border-radius: 17px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 33, 0.92);
  color: var(--text);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.custom-select__button::after {
  content: "";
  width: 9px;
  height: 9px;
  border-left: 2px solid #aab4d7;
  border-bottom: 2px solid #aab4d7;
  transform: rotate(-45deg) translateY(-2px);
  transition: 0.2s ease;
  flex: 0 0 9px;
}

.custom-select.is-open .custom-select__button {
  border-color: rgba(139, 124, 255, 0.48);
  box-shadow: 0 0 0 4px rgba(139, 124, 255, 0.1);
}

.custom-select.is-open .custom-select__button::after {
  transform: rotate(135deg) translateY(-2px);
}

.custom-select__menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  right: 0;
  width: 100%;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--border-2);
  background: #111827;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
  display: none;
}

.custom-select.is-open .custom-select__menu {
  display: block;
}

.custom-select__option {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  padding: 0 11px;
  background: transparent;
  color: #dbe2ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  text-align: right;
}

.custom-select__option:hover {
  background: rgba(255, 255, 255, 0.07);
}

.custom-select__option.is-selected {
  background: rgba(139, 124, 255, 0.14);
  color: #ffffff;
}

.custom-select__option.is-selected::after {
  content: "✓";
  color: #bfb7ff;
  font-weight: 700;
}

.custom-select--small {
  min-width: 155px;
}

.custom-select--small .custom-select__button {
  height: 38px;
  border-radius: 12px;
  font-size: 12px;
  padding-inline: 11px;
}

/* Phases */

.phases {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.phase {
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(14, 19, 31, 0.98), rgba(10, 14, 23, 0.98));
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.24);
}

.phase__head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.phase__title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.phase__number {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #4f7cff);
}

.phase__title h2 {
  margin: 0;
  font-size: 17px;
}

.phase__title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.phase__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.phase__body {
  padding: 18px 20px 20px;
}

.phase-progress {
  margin-bottom: 16px;
}

.tasks {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.018);
  transition: 0.2s ease;
}

.task:hover {
  border-color: rgba(139, 124, 255, 0.22);
}

.task.is-done {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.055);
}

.task__main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.task__title {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}

.task.is-done .task__title {
  color: #a8efbe;
  text-decoration: line-through;
  text-decoration-color: rgba(168, 239, 190, 0.45);
}

.task__meta {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.tag {
  min-width: 58px;
  display: inline-flex;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.tag--required {
  color: #ffb4c2;
  background: rgba(251, 113, 133, 0.11);
  border: 1px solid rgba(251, 113, 133, 0.2);
}

.tag--sale {
  color: #a2f2be;
  background: rgba(34, 197, 94, 0.11);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.tag--tech {
  color: #9ce4ff;
  background: rgba(56, 189, 248, 0.11);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.tag--design {
  color: #ccc5ff;
  background: rgba(139, 124, 255, 0.11);
  border: 1px solid rgba(139, 124, 255, 0.2);
}

.tag--content {
  color: #ffd79c;
  background: rgba(245, 158, 11, 0.11);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.tag--qa {
  color: #c4f1ff;
  background: rgba(14, 165, 233, 0.11);
  border: 1px solid rgba(14, 165, 233, 0.22);
}

.tag--ops {
  color: #e8d5ff;
  background: rgba(168, 85, 247, 0.11);
  border: 1px solid rgba(168, 85, 247, 0.22);
}

/* Checkbox */

.checkbox {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.045);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.checkbox::after {
  content: "";
  width: 6px;
  height: 11px;
  border-left: 2px solid #fff;
  border-top: 2px solid #fff;
  transform: rotate(-135deg) scale(0);
  opacity: 0;
  transition: 0.18s ease;
  margin-top: -2px;
}

.checkbox:hover {
  border-color: rgba(139, 124, 255, 0.65);
  background: rgba(139, 124, 255, 0.12);
}

.checkbox.is-checked {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(139, 124, 255, 0.25);
}

.checkbox.is-checked::after {
  opacity: 1;
  transform: rotate(-135deg) scale(1);
}

/* Note */

.note-toggle {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  color: #dfe5ff;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 800;
}

.note-toggle.has-note {
  color: #d8d1ff;
  background: rgba(139, 124, 255, 0.13);
  border-color: rgba(139, 124, 255, 0.24);
}

.note {
  display: none;
  padding: 0 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.note.is-open {
  display: block;
}

.note label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin: 12px 0 8px;
  font-weight: 700;
}

.note textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(8, 11, 18, 0.56);
  color: var(--text);
  outline: none;
  padding: 13px;
  font-size: 14px;
  line-height: 1.9;
}

.note__footer {
  display: flex;
  justify-content: flex-end;
  color: var(--muted-2);
  font-size: 12px;
  margin-top: 6px;
}

.empty-state {
  display: none;
  margin-top: 20px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
}

/* Toast */

.toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 120;
  min-width: 240px;
  max-width: min(420px, calc(100% - 48px));
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  background: rgba(15, 23, 42, 0.96);
  color: #d9ffe7;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: 0.22s ease;
  font-size: 13px;
  font-weight: 700;
}

.toast.is-show {
  transform: translateY(0);
  opacity: 1;
}

/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 7, 18, 0.68);
  backdrop-filter: blur(10px);
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  width: min(460px, 100%);
  border: 1px solid var(--border-2);
  border-radius: 24px;
  background: linear-gradient(180deg, #151d31, #0f172a);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  padding: 20px;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.modal__head h3 {
  margin: 0;
  font-size: 18px;
}

.modal__close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.modal__message {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.hidden-file {
  display: none;
}

@media (max-width: 1180px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .toolbar {
    grid-template-columns: 1fr;
  }

  .phase__head {
    grid-template-columns: 1fr;
  }

  .phase__tools {
    justify-content: flex-start;
  }

  .task__main {
    grid-template-columns: auto 1fr;
  }

  .task__meta {
    grid-column: 2;
    justify-content: flex-start;
  }

  .custom-select,
  .custom-select--small {
    min-width: 100%;
  }
}

@media (max-width: 560px) {
  body {
    padding-top: 12px;
  }

  .app {
    width: min(100% - 14px, 1480px);
  }

  .hero,
  .card,
  .phase__head,
  .phase__body {
    padding-inline: 14px;
  }

  .project-name {
    width: 100%;
    flex-direction: column;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .modal__actions {
    flex-direction: column-reverse;
  }

  .modal__actions .btn {
    width: 100%;
  }
}
