:root {
  --ink: #1f2430;
  --muted: #747a88;
  --line: #e3e6eb;
  --paper: #f4f6f8;
  --white: #fff;
  --nav: #20222b;
  --purple: #6557d8;
  --purple2: #5143bb;
  --orange: #e9772b;
  --lav: #ece9ff;
  --mint: #dff5e8;
  --green: #24764c;
  --amber: #fff0ce;
  --coral: #ffe4df;
  --red: #b94035;
  --shadow: 0 12px 38px rgba(35, 38, 48, .08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}

body {
  margin: 0;
  color: var(--ink);
  font: 14px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
}

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

button,
a {
  transition: .18s ease;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1 {
  font-size: 34px;
  line-height: 1.13;
  letter-spacing: -1.1px;
  margin-bottom: 8px;
}

h2 {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -.35px;
  margin-bottom: 5px;
}

h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.logo > img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.muted,
.page-head p,
.section-head p {
  color: var(--muted);
}

.logo {
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 18px;
}

.logo > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #7c6de6, #5547be);
  font-weight: 850;
  box-shadow: 0 6px 15px rgba(102, 87, 217, .24);
}

.btn {
  border: 1px solid #d9dce2;
  background: #fff;
  color: #383c46;
  border-radius: 10px;
  min-height: 40px;
  padding: 9px 15px;
  font-weight: 680;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:hover {
  border-color: #bcb8d1;
  transform: translateY(-1px);
}

.btn.primary {
  background: #ff6c07;
  border-color: #ff6c07;
  color: #fff;
  box-shadow: 0 6px 17px rgba(232, 174, 112, 0.18);
}

.btn.primary:hover {
  background: #ff9c19;
}

.btn.full {
  width: 100%;
}

.btn.small {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  letter-spacing: .02em;
  font-weight: 700;
  color: #414652;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #daddE4;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
  font-size: 14px;
}

input,
select {
  min-height: 42px;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(102, 87, 217, .1);
}

input[readonly],
textarea[readonly] {
  background: #f8f7f4;
  color: #586073;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.step,
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 850;
  color: #000000;
  margin-bottom: 11px;
}

.eyebrow.dark {
  color: #747786;
}

.auth-page {
  min-height: 100vh;
  background: #ff6c07;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(420px, .85fr);
}

.auth-intro {
  padding: clamp(50px, 9vw, 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgb(0, 0, 0), transparent 28%),
    radial-gradient(circle at 85% 80%, rgb(0, 0, 0), transparent 30%);
}

.auth-intro h1 {
  font-size: clamp(48px, 6vw, 78px);
  line-height: 1.03;
  letter-spacing: -3.5px;
  max-width: 750px;
}

.auth-intro h1 em {
  color: #000000;
  font-style: normal;
}

.auth-intro > p {
  font-size: 17px;
  line-height: 1.7;
  color: #fefdff;
  max-width: 530px;
}

.auth-feature {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 25px;
  margin-top: 30px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.auth-feature > span {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  background: rgba(170, 158, 248, .16);
  color: #b9affa;
  border-radius: 50%;
  font-weight: 900;
}

.auth-feature div {
  display: grid;
}

.auth-feature small {
  color: #aaa8b5;
}

.auth-card {
  background: #fbfbf9;
  padding: clamp(45px, 7vw, 100px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card .logo {
  margin-bottom: 55px;
}

.auth-card h2 {
  font-size: 30px;
}

.auth-card > p.muted {
  margin-bottom: 26px;
}

.auth-card form {
  display: grid;
  gap: 15px;
  max-width: 460px;
}

.alert {
  padding: 11px 13px;
  border-radius: 9px;
  margin-bottom: 15px;
}

.alert.error {
  color: #92382e;
  background: #ffe9e5;
  border: 1px solid #ffd1ca;
}

.app-page {
  padding-left: 248px;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  background: var(--nav);
  color: #e9e8ef;
  padding: 27px 18px 18px;
  display: flex;
  flex-direction: column;
  z-index: 30;
}

.sidebar-logo {
  padding: 0 10px 30px;
}

.sidebar nav p {
  color: #858591;
  font-size: 10px;
  letter-spacing: 1.4px;
  font-weight: 800;
  margin: 11px 12px 8px;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 9px;
  color: #aaa9b4;
  margin: 3px 0;
  font-weight: 650;
}

.sidebar nav a > span {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.sidebar nav a > b {
  margin-left: auto;
  color: #ff6c07;
  background: #31313c;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  color: #fff;
  background: #30313d;
}

.sidebar nav a.active {
  box-shadow: inset 3px 0 #ff6c07;
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid #383943;
  padding: 18px 7px 0;
  display: flex;
  gap: 10px;
  align-items: center;
}

.sidebar-foot > div:nth-child(2) {
  display: grid;
  min-width: 0;
}

.sidebar-foot strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 115px;
}

.sidebar-foot small {
  color: #8f8e99;
  font-size: 11px;
}

.sidebar-foot form {
  margin-left: auto;
}

.sidebar-foot button {
  border: 0;
  background: transparent;
  color: #aaa9b3;
  font-size: 19px;
}

.avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e7e3ff;
  color: #5b4dc6;
  font-weight: 850;
}

.avatar.large {
  width: 48px;
  height: 48px;
  font-size: 17px;
}

.avatar.tiny {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.avatar.micro {
  width: 23px;
  height: 23px;
  font-size: 9px;
}

.workspace {
  padding: 38px clamp(24px, 4vw, 58px) 80px;
  max-width: 1560px;
  margin: auto;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
}

.page-head p:last-child {
  margin-bottom: 0;
}

.toast {
  position: fixed;
  right: 25px;
  top: 22px;
  z-index: 100;
  padding: 13px 15px;
  border-radius: 10px;
  background: #24252c;
  color: #fff;
  box-shadow: var(--shadow);
  display: flex;
  gap: 20px;
  align-items: center;
  max-width: 390px;
}

.toast.success {
  border-left: 4px solid #63cd8d;
}

.toast.error {
  border-left: 4px solid #f2796d;
}

.toast button {
  border: 0;
  background: none;
  color: #fff;
  font-size: 19px;
}

.password-banner {
  background: #fff4d8;
  border: 1px solid #ecd58e;
  padding: 12px 14px;
  border-radius: 11px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.stats-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.stats-grid article > div {
  display: grid;
}

.stats-grid strong {
  font-size: 27px;
  line-height: 1.1;
}

.stats-grid small {
  color: var(--muted);
}

.stat-icon {
  width: 43px;
  height: 43px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
}

.lavender {
  background: var(--lav);
  color: #6657d9;
}

.amber {
  background: var(--amber);
  color: #a96700;
}

.coral {
  background: var(--coral);
  color: var(--red);
}

.mint {
  background: var(--mint);
  color: var(--green);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head h2,
.section-head p {
  margin-bottom: 0;
}

.section-head > a,
.back-link {
  color: #ff6c07;
  font-weight: 750;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}

.project-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #d6d1ed;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.client-monogram {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eeeaff, #ddd6ff);
  color: #5b4dc4;
  font-size: 12px;
  font-weight: 850;
}

.client-monogram.big {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  font-size: 18px;
}

.project-card h3 {
  font-size: 17px;
}

.project-card > p {
  height: 42px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 20px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.status-onboarding {
  background: #fff0ce;
  color: #8d5700;
}

.status-active {
  background: #e1f5e9;
  color: #21744b;
}

.status-paused,
.status-blocked {
  background: #ffe7e2;
  color: #a63f34;
}

.status-completed,
.status-done {
  background: #ececf0;
  color: #55565d;
}

.priority-low {
  background: #edf0f4;
  color: #626873;
}

.priority-medium {
  background: #e9e7fb;
  color: #6156ad;
}

.priority-high {
  background: #fff0cc;
  color: #9a5c00;
}

.priority-urgent {
  background: #ffe1dc;
  color: #b2372e;
}

.role-admin {
  background: #eae6ff;
  color: #5a4ac3;
}

.role-worker {
  background: #e6f1ff;
  color: #376da6;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin: 16px 0 7px;
  color: var(--muted);
}

.progress-label b {
  color: #45464c;
}

.progress {
  height: 6px;
  border-radius: 10px;
  background: #ebeaf0;
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7566de, #8e80ec);
  border-radius: 10px;
}

.project-card footer {
  border-top: 1px solid #f0efec;
  margin-top: 17px;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  color: #85858b;
  font-size: 11px;
}

.empty-card {
  grid-column: 1/-1;
  border: 1px dashed #cfccd6;
  border-radius: var(--radius);
  padding: 50px 25px;
  text-align: center;
  background: #fff;
}

.empty-card > span {
  font-size: 32px;
  color: #8a7ee8;
}

.empty-card p {
  color: var(--muted);
}

.filter-row {
  display: flex;
  gap: 12px;
  margin-bottom: 17px;
}

.search-input {
  max-width: 420px;
}

.filter-row select {
  width: 210px;
}

.project-list {
  display: grid;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.project-list > a {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto minmax(150px, .6fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 17px 19px;
  border-bottom: 1px solid #efeeeb;
}

.project-list > a:last-child {
  border-bottom: 0;
}

.project-list > a:hover {
  background: #faf9ff;
}

.list-main h3,
.list-main p {
  margin: 0;
}

.list-main p {
  color: var(--muted);
  font-size: 12px;
}

.list-progress {
  display: flex;
  align-items: center;
  gap: 9px;
}

.list-progress > span {
  height: 5px;
  flex: 1;
  background: #ecebf0;
  border-radius: 8px;
  overflow: hidden;
}

.list-progress i {
  display: block;
  background: var(--purple);
  height: 100%;
}

.list-progress b {
  font-size: 11px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.member-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 20px;
}

.member-card.disabled {
  opacity: .58;
}

.member-top {
  display: flex;
  justify-content: space-between;
}

.member-card h3 {
  margin: 15px 0 1px;
}

.member-card > p {
  color: var(--muted);
  font-size: 12px;
}

.member-stats {
  display: flex;
  gap: 24px;
  background: #f7f7f5;
  border-radius: 10px;
  padding: 11px 13px;
  margin: 17px 0;
}

.member-stats span {
  display: grid;
  color: var(--muted);
  font-size: 11px;
}

.member-stats b {
  font-size: 16px;
  color: var(--ink);
}

.member-card footer {
  border-top: 1px solid var(--line);
  padding-top: 13px;
  display: flex;
  justify-content: space-between;
}

.member-card footer form {
  margin: 0;
}

.link-btn {
  padding: 2px;
  border: 0;
  background: none;
  color: #ff6c07;
  font-weight: 750;
  font-size: 12px;
}

.danger-link {
  color: var(--red) !important;
}

.project-head {
  margin-bottom: 18px;
}

.back-link {
  display: inline-block;
  margin-bottom: 22px;
}

.project-title {
  display: flex;
  gap: 17px;
  align-items: center;
}

.project-title > div {
  min-width: 0;
}

.project-title h1 {
  margin: 4px 0;
}

.project-title p {
  color: var(--muted);
  margin: 0;
}

.project-title > .btn {
  margin-left: auto;
}

.title-badges {
  display: flex;
  gap: 6px;
}

.project-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 5px;
  background: rgba(244, 246, 248, .94);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  margin-bottom: 13px;
}

.project-nav a {
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
  color: #686d79;
}

.project-nav a:hover {
  background: #fff;
  color: #ff6c07;
}

.project-nav span {
  background: #fff1e7;
  color: #ff6c07;
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 3px;
}

.project-summary {
  display: grid;
  grid-template-columns: 1.3fr .8fr .8fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 18px;
}

.project-summary > div {
  padding: 19px 22px;
  border-right: 1px solid var(--line);
  display: grid;
  align-content: center;
}

.project-summary > div:last-child {
  border: 0;
}

.project-summary span {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #85848b;
  font-weight: 850;
}

.project-summary strong {
  font-size: 17px;
  margin: 5px 0;
}

.project-summary small {
  color: var(--muted);
}

.project-summary .progress.large {
  height: 7px;
  margin: 3px 0 6px;
}

.summary-action {
  width: max-content;
  margin-top: 6px;
}

.client-form {
  display: grid;
  gap: 17px;
}

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 25px;
  margin-bottom: 17px;
  scroll-margin-top: 70px;
}

.form-card.soft {
  background: #fafbfc;
}

.form-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 23px;
}

.form-card-head > span {
  width: 37px;
  height: 37px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #fff1e6;
  color: var(--orange);
  border: 1px solid #ffdcc4;
  font-weight: 850;
}

.form-card-head > div {
  flex: 1;
}

.form-card-head h2,
.form-card-head p {
  margin: 0;
}

.form-card-head p {
  color: var(--muted);
  font-size: 12px;
}

.form-card-head > .btn {
  margin-left: auto;
}

.fields {
  display: grid;
  gap: 15px;
}

.fields.three {
  grid-template-columns: repeat(3, 1fr);
}

.fields.two {
  grid-template-columns: repeat(2, 1fr);
}

.fields label {
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: 10px;
}

.fields input,
.fields textarea {
  margin-top: 1px;
  text-transform: none;
  letter-spacing: normal;
}

.access-table {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}

.access-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr .75fr 70px;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.access-row:last-child {
  border: 0;
}

.access-head {
  min-height: 34px;
  background: #f4f6f8;
  text-transform: uppercase;
  color: #858997;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
}

.access-row form {
  margin: 0;
}

.empty-row {
  padding: 25px;
  text-align: center;
  color: var(--muted);
}

.checklist-section {
  margin-top: 23px;
  scroll-margin-top: 70px;
}

.progress-total {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-total .progress {
  width: 150px;
}

.progress-total strong {
  color: var(--orange);
  font-size: 20px;
}

.phase-summary {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 7px;
  margin-bottom: 15px;
}

.phase-summary a {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phase-summary a:hover {
  border-color: #aaa1e2;
}

.phase-summary span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #fff1e7;
  color: var(--orange);
  font-weight: 850;
}

.phase-summary small {
  color: var(--muted);
}

.phase-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
  scroll-margin-top: 70px;
}

.phase-head {
  padding: 17px 19px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phase-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phase-head h3,
.phase-head p {
  margin: 0;
}

.phase-head p {
  color: var(--muted);
  font-size: 11px;
}

.phase-num {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #fff1e7;
  color: var(--orange);
  font-weight: 850;
}

.phase-progress {
  display: flex;
  gap: 9px;
  align-items: center;
}

.phase-progress .progress {
  width: 105px;
}

.phase-progress b {
  font-size: 11px;
}

.task-list {
  padding: 10px;
  display: grid;
  gap: 7px;
}

.task-item {
  border: 1px solid var(--line);
  border-left: 3px solid #c7c9d1;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.status-line-doing {
  border-left-color: #7768dc;
}

.status-line-blocked {
  border-left-color: #dd6256;
}

.status-line-done {
  border-left-color: #53ae78;
  background: #fbfefc;
}

.task-row {
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.status-form select {
  /* Cambia a auto o fit-content para que el texto quepa */
  width: auto; /* o width: fit-content; */
  min-height: 32px;
  /* Aumenta el padding horizontal (derecha/izquierda) para que el texto respire */
  padding: 4px 12px; 
  /* Cambia el 50% por un valor en px para tener esquinas suavemente redondeadas */
  border-radius: 8px; 
  /* Opcional: Alinear a la izquierda suele verse mejor con texto e íconos */
  text-align: left; 
  font-weight: 600; /* 850 puede ser demasiado grueso, pero puedes mantenerlo si lo prefieres */
}

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

.task-copy h4 {
  font-size: 13px;
  margin: 0;
}

.status-line-done .task-copy h4 {
  text-decoration: line-through;
  color: #898c94;
}

.task-copy > p {
  color: var(--muted);
  font-size: 11px;
  margin: 2px 0 6px;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7a7e88;
  font-size: 10px;
}

.task-meta .badge {
  padding: 2px 7px;
  font-size: 9px;
}

.overdue {
  color: var(--red) !important;
  font-weight: 750;
}

.assignee-chip {
  width: 175px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 1px solid var(--line);
  padding-left: 13px;
}

.assignee-chip > div {
  display: grid;
  min-width: 0;
}

.assignee-chip small {
  font-size: 8px;
  letter-spacing: .09em;
  color: #9295a0;
  font-weight: 800;
}

.assignee-chip strong {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-actions {
  display: flex;
  align-items: center;
}

.task-actions form {
  margin: 0;
}

.icon-action {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  color: #777b87;
  font-size: 16px;
}

.icon-action:hover {
  background: #efeff5;
  color: var(--purple);
}

.subtasks {
  border-top: 1px solid #efeeeb;
  background: #fafbfc;
  padding: 4px 11px 5px 48px;
}

.subtask {
  min-height: 37px;
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr) 175px 32px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #eceef1;
  font-size: 11px;
}

.subtask:last-child {
  border: 0;
}

.subtask select {
  min-height: 26px;
  width: 27px;
  font-size: 10px;
  padding: 0;
}

.sub-assignee {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #707580;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.done-text {
  text-decoration: line-through;
  color: #8c8f97;
}

.phase-footer {
  padding: 9px 18px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
}

.notes-card textarea {
  width: 100%;
}

dialog {
  border: 0;
  padding: 0;
  border-radius: 18px;
  box-shadow: 0 25px 80px rgba(28, 27, 38, .25);
  width: min(550px, calc(100% - 30px));
  max-height: 90vh;
}

dialog::backdrop {
  background: rgba(24, 24, 31, .55);
  backdrop-filter: blur(3px);
}

.modal-card {
  padding: 25px;
  display: grid;
  gap: 15px;
  background: #fff;
  overflow: auto;
  max-height: 90vh;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-head h2,
.modal-head p {
  margin-bottom: 0;
}

.modal-head > button {
  border: 0;
  background: #f1f0ed;
  border-radius: 50%;
  width: 31px;
  height: 31px;
  font-size: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 17px;
  margin-top: 5px;
}

.modal-note {
  padding: 11px 12px;
  border-radius: 9px;
  background: #f0edff;
  color: #5548ae;
  font-size: 12px;
}

.member-checks {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}

.member-checks form {
  margin: 0;
}

.member-checks label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-bottom: 1px solid var(--line);
}

.member-checks form:last-child label {
  border: 0;
}

.member-checks label > span:nth-child(2) {
  display: grid;
  flex: 1;
}

.member-checks label small {
  font-weight: 400;
  color: var(--muted);
}

.member-checks input {
  width: 19px;
  height: 19px;
  min-height: 0;
}

.fields .span-all {
  grid-column: 1/-1;
}

@media (max-width: 1150px) {
  .project-grid,
  .team-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .fields.three {
    grid-template-columns: 1fr 1fr;
  }

  .phase-summary {
    grid-template-columns: repeat(5, 1fr);
  }

  .project-list > a {
    grid-template-columns: auto 1fr auto auto;
  }

  .project-list .list-progress,
  .project-list .badge[class*=priority] {
    display: none;
  }
}

@media (max-width: 850px) {
  .assignee-chip {
    width: 145px;
  }

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

  .task-copy {
    min-width: 55%;
  }

  .assignee-chip {
    border-left: 0;
    padding-left: 43px;
  }

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

  .project-summary {
    grid-template-columns: 1fr;
  }

  .project-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .access-row {
    grid-template-columns: 1fr 1fr;
  }

  .access-head {
    display: none;
  }

  .access-row > span:nth-child(4),
  .access-row > span:nth-child(5) {
    justify-self: start;
  }

  .project-nav {
    overflow-x: auto;
  }
}

@media (max-width: 760px) {
  .app-page {
    padding-left: 0;
    padding-bottom: 70px;
  }

  .sidebar {
    inset: auto 0 0 0;
    width: auto;
    height: 64px;
    padding: 7px 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .sidebar-logo,
  .sidebar nav p,
  .sidebar-foot {
    display: none;
  }

  .sidebar nav {
    display: flex;
    width: 100%;
    justify-content: space-around;
  }

  .sidebar nav a {
    flex-direction: column;
    gap: 0;
    font-size: 10px;
    padding: 5px 12px;
    margin: 0;
  }

  .sidebar nav a > span {
    font-size: 17px;
  }

  .sidebar nav a > b {
    display: none;
  }

  .workspace {
    padding: 25px 14px 45px;
  }

  .page-head {
    align-items: flex-start;
    gap: 12px;
  }

  .page-head h1 {
    font-size: 28px;
  }

  .stats-grid {
    gap: 8px;
  }

  .stats-grid article {
    padding: 13px;
    gap: 9px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
  }

  .stats-grid strong {
    font-size: 22px;
  }

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

  .project-list > a {
    grid-template-columns: auto 1fr auto;
    padding: 14px;
    gap: 11px;
  }

  .project-list > a > .badge {
    display: none;
  }

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

  .project-title > .btn {
    margin: 0;
  }

  .client-monogram.big {
    width: 48px;
    height: 48px;
  }

  .form-card {
    padding: 17px;
  }

  .form-card-head {
    flex-wrap: wrap;
  }

  .form-card-head > .btn {
    margin-left: 51px;
  }

  .phase-summary {
    grid-template-columns: repeat(5, 1fr);
  }

  .phase-progress {
    display: none;
  }

  .task-row {
    align-items: flex-start;
  }

  .task-copy {
    min-width: calc(100% - 50px);
  }

  .assignee-chip {
    width: calc(100% - 44px);
    padding-left: 43px;
  }

  .task-actions {
    margin-left: auto;
  }

  .subtasks {
    padding-left: 25px;
  }

  .subtask {
    grid-template-columns: 30px 1fr 32px;
  }

  .sub-assignee {
    display: none;
  }

  .auth-wrap {
    grid-template-columns: 1fr;
  }

  .auth-intro {
    display: none;
  }

  .auth-card {
    min-height: 100vh;
    padding: 35px 25px;
  }

  .auth-card .logo {
    margin-bottom: 55px;
  }

  .filter-row {
    flex-direction: column;
  }

  .filter-row select,
  .search-input {
    max-width: none;
    width: 100%;
  }

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

  .progress-total .progress {
    width: 95px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 1.2cm 1cm;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    line-height: 1.45;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .sidebar,
  .btn,
  .toast,
  .project-nav,
  .phase-footer,
  .task-actions,
  .icon-action,
  .password-banner,
  .filter-row,
  .project-list > a > strong:last-child,
  .summary-action,
  .back-link,
  .modal,
  dialog,
  dialog::backdrop {
    display: none !important;
  }

  .app-page {
    padding: 0 !important;
  }

  .workspace {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .page-head {
    margin-bottom: 12pt !important;
    padding-bottom: 6pt;
    border-bottom: 1px solid #ccc;
  }

  .page-head h1 {
    font-size: 22pt !important;
    letter-spacing: -0.5px !important;
    margin-bottom: 0;
  }

  .page-head p:last-child {
    margin-bottom: 0;
    color: #555 !important;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6pt !important;
    margin-bottom: 18pt !important;
  }

  .stats-grid article {
    padding: 8pt 10pt !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .stat-icon {
    width: 28pt !important;
    height: 28pt !important;
    border-radius: 5pt !important;
    font-size: 13pt !important;
    border: 1px solid rgba(0, 0, 0, .08);
  }

  .stats-grid strong {
    font-size: 16pt !important;
  }

  .section-head {
    margin-bottom: 8pt !important;
    padding-top: 4pt;
  }

  .section-head h2 {
    font-size: 15pt !important;
    margin-bottom: 0;
  }

  .section-head a {
    display: none !important;
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8pt !important;
  }

  .project-card {
    padding: 10pt !important;
    border: 1px solid #bbb !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .card-top {
    margin-bottom: 7pt !important;
  }

  .client-monogram {
    width: 28pt !important;
    height: 28pt !important;
    font-size: 9pt !important;
    border: 1px solid rgba(0, 0, 0, .08);
  }

  .project-card > p {
    height: auto !important;
    margin-bottom: 8pt;
  }

  .progress-label {
    margin: 7pt 0 4pt !important;
  }

  .progress {
    height: 4pt !important;
    background: #ddd !important;
  }

  .project-card footer {
    margin-top: 8pt !important;
    padding-top: 6pt !important;
    border-top: 1px solid #ddd !important;
  }

  .project-list {
    border: 1px solid #bbb !important;
    background: #fff !important;
  }

  .project-list > a {
    padding: 8pt 10pt !important;
    border-bottom: 1px solid #ddd !important;
    text-decoration: none !important;
  }

  .project-list > a:hover {
    background: #fff !important;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8pt !important;
  }

  .member-card {
    padding: 10pt !important;
    border: 1px solid #bbb !important;
    background: #fff !important;
  }

  .member-card footer {
    display: none !important;
  }

  .member-stats {
    padding: 6pt 8pt !important;
    margin: 8pt 0 !important;
    background: #f4f4f4 !important;
  }

  .project-summary {
    grid-template-columns: repeat(3, 1fr) !important;
    border: 1px solid #bbb !important;
    background: #fff !important;
    margin-bottom: 14pt !important;
  }

  .project-summary > div {
    padding: 10pt 12pt !important;
  }

  .project-summary strong {
    font-size: 13pt !important;
  }

  .project-title {
    gap: 10pt !important;
  }

  .client-monogram.big {
    width: 44pt !important;
    height: 44pt !important;
    border-radius: 10pt !important;
    font-size: 14pt !important;
  }

  .project-title h1 {
    font-size: 20pt !important;
    margin: 0 !important;
  }

  .project-head,
  .project-title {
    margin-bottom: 10pt !important;
  }

  .title-badges {
    margin-bottom: 3pt;
  }

  .badge {
    padding: 2pt 6pt !important;
    font-size: 7.5pt !important;
    border: 1px solid rgba(0, 0, 0, .08) !important;
  }

  .avatar {
    border: 1px solid rgba(0, 0, 0, .08) !important;
  }

  .form-card {
    border: 1px solid #bbb !important;
    background: #fff !important;
    padding: 12pt 14pt !important;
    margin-bottom: 10pt !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .form-card-head {
    margin-bottom: 10pt !important;
    padding-bottom: 6pt;
    border-bottom: 1px solid #ddd;
  }

  .form-card-head h2 {
    font-size: 13pt !important;
  }

  .form-card-head > span {
    width: 24pt !important;
    height: 24pt !important;
    font-size: 11pt !important;
    border-width: 1px;
  }

  .fields {
    gap: 6pt 10pt !important;
  }

  .fields label {
    font-size: 7.5pt !important;
    letter-spacing: 0.08em !important;
  }

  .fields input,
  .fields textarea {
    background: #fff !important;
    border: 1px solid #bbb !important;
    border-radius: 3pt !important;
    padding: 5pt 7pt !important;
    font-size: 10.5pt !important;
    min-height: 0 !important;
    height: auto !important;
    color: #000 !important;
  }

  .fields textarea {
    min-height: 40pt !important;
  }

  input,
  select,
  textarea {
    box-shadow: none !important;
    -webkit-appearance: none !important;
  }

  select {
    background-image: none !important;
  }

  .access-table {
    border: 1px solid #bbb !important;
  }

  .access-row {
    min-height: auto !important;
    padding: 6pt 9pt !important;
    border-bottom: 1px solid #ddd !important;
    font-size: 10pt !important;
  }

  .access-head {
    background: #eee !important;
  }

  .checklist-section {
    margin-top: 14pt !important;
  }

  .progress-total strong {
    font-size: 14pt !important;
    color: #000 !important;
  }

  .progress-total .progress {
    width: 110pt !important;
  }

  .phase-summary {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 4pt !important;
    margin-bottom: 10pt !important;
  }

  .phase-summary a {
    padding: 5pt !important;
    border: 1px solid #ccc !important;
    text-decoration: none !important;
    background: #fff !important;
  }

  .phase-summary span {
    width: 20pt !important;
    height: 20pt !important;
    border-radius: 4pt !important;
    font-size: 10pt !important;
  }

  .phase-card {
    border: 1px solid #bbb !important;
    background: #fff !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .phase-head {
    padding: 8pt 11pt !important;
    border-bottom: 1px solid #ddd !important;
    background: #fafafa !important;
  }

  .phase-num {
    width: 24pt !important;
    height: 24pt !important;
    font-size: 10pt !important;
    border-radius: 5pt !important;
    border: 1px solid rgba(0, 0, 0, .08);
  }

  .phase-head h3 {
    font-size: 12pt !important;
  }

  .phase-progress {
    display: flex !important;
    gap: 5pt !important;
  }

  .phase-progress .progress {
    width: 70pt !important;
  }

  .task-list {
    padding: 4pt !important;
    gap: 3pt !important;
  }

  .task-item {
    border: 1px solid #ddd !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .task-row {
    padding: 6pt 7pt !important;
    gap: 7pt !important;
  }

  .status-form select,
  .subtask select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: #fff !important;
    border: 1px solid #aaa !important;
    color: #000 !important;
    font-size: 9pt !important;
  }

  .task-copy h4 {
    font-size: 10.5pt !important;
  }

  .task-copy > p {
    font-size: 9.5pt !important;
  }

  .task-meta {
    font-size: 8pt !important;
    gap: 5pt !important;
  }

  .assignee-chip {
    border-left: 1px solid #ddd !important;
    padding-left: 8pt !important;
    width: 120pt !important;
  }

  .subtasks {
    padding: 2pt 6pt 2pt 32pt !important;
    background: #fafafa !important;
  }

  .subtask {
    grid-template-columns: 22pt minmax(0, 1fr) 120pt !important;
    min-height: auto !important;
    padding: 3pt 0 !important;
    border-bottom: 1px solid #eee !important;
    font-size: 9pt !important;
    gap: 6pt !important;
  }

  .subtask .sub-assignee {
    display: flex !important;
  }

  .notes-card textarea {
    min-height: 90pt !important;
  }

  .progress i {
    background: #666 !important;
  }

  .section-head p,
  .muted,
  .phase-head p,
  .page-head p,
  .member-stats span {
    color: #444 !important;
  }

  .empty-card {
    border: 1px solid #bbb !important;
    background: #fff !important;
  }

  h1,
  h2,
  h3,
  h4,
  strong {
    color: #000 !important;
  }
}
