
:root {
  --green: #224936;
  --cream: #f4f2ee;
  --ink: #1a1a1a;
  --surface: #222220;
  --surface-2: #292927;
  --line: rgba(244, 242, 238, 0.11);
  --muted: #aaa9a4;
  --red: #d76565;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 0%, rgba(34, 73, 54, 0.22), transparent 32rem),
    var(--ink);
  color: var(--cream);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #75a48a;
  outline-offset: 2px;
}

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

.app-shell {
  min-height: 100vh;
}

.topbar {
  height: 82px;
  padding: 0 clamp(24px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(26, 26, 26, 0.76);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  width: 144px;
  padding: 0;
  border: 0;
  background: transparent;
}

.brand img,
.login-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.topbar-meta,
.private-pill {
  display: flex;
  align-items: center;
}

.topbar-meta {
  gap: 14px;
}

.private-pill {
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.private-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #77a68c;
  box-shadow: 0 0 0 4px rgba(119, 166, 140, 0.12);
}

.logout-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: #8e8d88;
  font-size: 11px;
}

.logout-button:hover {
  color: var(--cream);
  border-color: rgba(244, 242, 238, 0.24);
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--cream);
  font-size: 10px;
  font-weight: 700;
}

.workspace {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 70px 0 76px;
}

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 42px;
}

.eyebrow,
.card-kicker {
  margin: 0 0 14px;
  color: #7fab92;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 13px;
  color: var(--cream);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.intro {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
}

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 11px;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-button {
  min-height: 47px;
  padding: 0 19px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 9px 28px rgba(0, 0, 0, 0.2);
}

.primary-button:hover {
  transform: translateY(-2px);
  background: white;
}

.primary-button > span {
  margin-right: 5px;
  font-size: 19px;
  font-weight: 400;
}

.ghost-button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.ghost-button:hover {
  color: var(--cream);
  border-color: rgba(244, 242, 238, 0.26);
}

/* Login */
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 620px) 1fr;
  background:
    linear-gradient(90deg, #1a1a1a 0 48%, rgba(26, 26, 26, 0.84)),
    radial-gradient(circle at 80% 45%, rgba(34, 73, 54, 0.62), transparent 35rem),
    #171715;
}

.login-card {
  min-height: 100vh;
  padding: clamp(38px, 7vw, 92px);
  display: flex;
  justify-content: center;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(26, 26, 26, 0.9);
}

.login-brand {
  width: 154px;
  margin-bottom: clamp(65px, 11vh, 120px);
}

.login-card h1 {
  max-width: 460px;
  margin-bottom: 18px;
  font-size: clamp(46px, 5.4vw, 76px);
}

.login-copy {
  margin-bottom: 42px;
  color: var(--muted);
  font-size: 15px;
}

.login-card form {
  width: min(100%, 430px);
  display: grid;
  gap: 18px;
}

.login-card label,
.modal form > label,
.modal fieldset legend {
  display: grid;
  gap: 9px;
  color: #aaa9a4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.login-card input,
.modal input,
.modal select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #20201e;
  color: var(--cream);
  font-size: 13px;
}

.password-field > span {
  display: block;
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  position: absolute;
  top: 5px;
  right: 5px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #777670;
}

.password-toggle:hover,
.password-toggle.active {
  background: rgba(244, 242, 238, 0.06);
  color: #b9b7b1;
}

.password-toggle span {
  font-size: 15px;
  transform: scaleX(1.3);
}

.login-button {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-button span {
  margin: 0;
}

.login-error {
  margin: -5px 0 0;
  color: #e28484;
  font-size: 12px;
}

.login-card > small {
  margin-top: 32px;
  color: #5f5e59;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.login-accent {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.login-accent span {
  position: absolute;
  right: -0.1em;
  bottom: -0.12em;
  color: rgba(244, 242, 238, 0.035);
  font-size: clamp(180px, 30vw, 460px);
  font-weight: 700;
  letter-spacing: -0.09em;
  line-height: 0.8;
}

.login-accent i {
  position: absolute;
  top: 16%;
  right: 18%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #5f9879;
  box-shadow: 0 0 60px 20px rgba(95, 152, 121, 0.14);
}

/* Dashboard */
.dashboard-workspace {
  min-height: calc(100vh - 164px);
}

.dashboard-hero {
  padding-bottom: 42px;
  border-bottom: 1px solid var(--line);
}

.date-pill {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #777670;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

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

.module-card {
  min-height: 350px;
  padding: 29px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(34, 34, 32, 0.8);
  color: var(--cream);
  text-align: left;
}

.module-card::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -110px;
  bottom: -130px;
  border: 1px solid rgba(244, 242, 238, 0.06);
  border-radius: 50%;
}

.active-module {
  background:
    linear-gradient(145deg, rgba(34, 73, 54, 0.98), rgba(27, 56, 42, 0.92)),
    var(--green);
  cursor: pointer;
  transition: transform 220ms ease, border-color 220ms ease;
}

.active-module:hover {
  transform: translateY(-5px);
  border-color: rgba(244, 242, 238, 0.22);
}

.module-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 242, 238, 0.14);
  border-radius: 50%;
  color: #d7d6d0;
  font-size: 18px;
}

.module-card p {
  margin-bottom: 14px;
  color: #8aaa99;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.future-module p {
  color: #6f6e69;
}

.module-card h2 {
  margin-bottom: 12px;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.module-card div > span {
  color: rgba(244, 242, 238, 0.57);
  font-size: 13px;
}

.module-card > strong {
  color: #d8d8d2;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.future-module {
  opacity: 0.52;
}

.coming-soon {
  position: absolute;
  top: 30px;
  right: 28px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: #898883;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Projects */
.projects-workspace {
  padding-top: 38px;
}

.back-button {
  margin-bottom: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #777670;
  font-size: 11px;
}

.back-button:hover {
  color: var(--cream);
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(34, 34, 32, 0.65);
}

.project-metrics article {
  min-height: 120px;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}

.project-metrics article + article {
  border-left: 1px solid var(--line);
}

.project-metrics span {
  color: #777670;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.project-metrics strong {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.project-grid {
  display: grid;
  gap: 18px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(34, 34, 32, 0.9);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.15);
}

.project-card-head {
  padding: 29px 30px 25px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.project-card-head .card-kicker {
  margin-bottom: 8px;
}

.project-card-head h2 {
  margin: 0;
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.delete-client {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(215, 101, 101, 0.27);
  border-radius: 8px;
  background: rgba(215, 101, 101, 0.06);
  color: #c96d6d;
  font-size: 10px;
}

.delete-client:hover {
  border-color: rgba(215, 101, 101, 0.54);
  background: rgba(215, 101, 101, 0.11);
}

.project-overview {
  padding: 24px 30px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 36px;
  border-bottom: 1px solid var(--line);
}

.project-field {
  min-width: 0;
}

.project-field > span,
.project-progress > span {
  display: block;
  margin-bottom: 12px;
  color: #777670;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.partner-selectors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.partner {
  min-height: 36px;
  padding: 0 10px 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #252523;
  color: #898883;
  font-size: 11px;
}

.partner i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #373734;
  color: #b2b0aa;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.partner b {
  color: #686762;
  font-size: 10px;
}

.partner.selected {
  border-color: #416c54;
  background: rgba(34, 73, 54, 0.48);
  color: #bcd1c4;
}

.partner.selected i {
  background: #426d55;
  color: white;
}

.partner.selected b {
  color: #83b094;
}

.status-select-wrap {
  position: relative;
}

.status-select-wrap select {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 0 11px;
  border: 1px solid;
  border-radius: 99px;
  font-size: 10px;
  white-space: nowrap;
}

.strategy {
  border-color: #535451;
  background: rgba(137, 138, 134, 0.09);
  color: #aaa9a4;
}

.design {
  border-color: #3c6080;
  background: rgba(64, 110, 149, 0.13);
  color: #83acd0;
}

.approval {
  border-color: #765436;
  background: rgba(170, 103, 43, 0.12);
  color: #d89a60;
}

.production {
  border-color: #655878;
  background: rgba(116, 91, 144, 0.12);
  color: #aa90c8;
}

.finished {
  border-color: #3c674f;
  background: rgba(57, 117, 82, 0.13);
  color: #75ad8c;
}

.project-progress {
  margin: 0;
  padding: 22px 30px 26px;
  display: block;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.project-progress > span {
  display: flex;
  justify-content: space-between;
}

.project-progress b {
  color: #a4bcae;
}

.project-progress input {
  width: 100%;
  height: 4px;
  display: block;
  position: relative;
  z-index: 2;
  opacity: 0;
}

.project-progress::after {
  content: "";
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 28px;
  height: 4px;
  border-radius: 99px;
  background: #3a3a37;
}

.project-progress > i {
  height: 4px;
  position: absolute;
  left: 30px;
  bottom: 28px;
  z-index: 1;
  border-radius: 99px;
  background: #6c9c80;
  pointer-events: none;
}

.services-heading {
  padding: 24px 30px 15px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.services-heading .card-kicker {
  margin-bottom: 6px;
}

.services-heading div > span {
  color: #666560;
  font-size: 10px;
}

.add-service-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #87aa95;
  font-size: 11px;
  font-weight: 700;
}

.add-service-button:hover {
  color: #b2caba;
}

.new-service-form {
  margin: 0 30px 14px;
  padding: 15px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(112, 158, 132, 0.24);
  border-radius: 11px;
  background: rgba(34, 73, 54, 0.1);
}

.new-service-form label {
  display: grid;
  gap: 7px;
}

.new-service-form > small {
  color: #696863;
  font-size: 10px;
}

.new-service-form label > span {
  color: #74736e;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.new-service-form select,
.service-row input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d1d1b;
  color: var(--cream);
  font-size: 12px;
}

.new-service-form select {
  padding: 0 12px;
}

.compact {
  min-height: 40px;
  padding: 0 14px;
  font-size: 11px;
}

.services-list {
  padding: 0 30px 20px;
}

.service-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr 210px 34px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.service-row:first-child {
  border-top: 0;
}

.service-row input {
  border-color: transparent;
  background: transparent;
}

.service-name {
  padding-left: 12px;
  color: #d7d5cf;
  font-size: 12px;
  font-weight: 600;
}

.service-row input:hover,
.service-row input:focus {
  border-color: var(--line);
  background: #1d1d1b;
}

.money-input {
  min-width: 0;
  display: flex;
  align-items: center;
  position: relative;
}

.money-input > span {
  position: absolute;
  left: 12px;
  z-index: 1;
  color: #74736e;
  font-size: 11px;
}

.money-input input {
  padding: 0 54px 0 27px;
  text-align: right;
}

.money-input small {
  position: absolute;
  right: 10px;
  color: #64635e;
  font-size: 9px;
  pointer-events: none;
}

.remove-service {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: #74736e;
  font-size: 17px;
}

.remove-service:hover {
  border-color: rgba(215, 101, 101, 0.35);
  color: #ce7777;
}

.no-services {
  padding: 25px 0;
  border-top: 1px solid var(--line);
  color: #74736e;
  font-size: 11px;
}

.project-total {
  min-height: 84px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  background: rgba(26, 26, 26, 0.42);
}

.project-total > span {
  color: #d8d6d0;
  font-size: 13px;
  font-weight: 700;
}

.project-total span small {
  display: block;
  margin-top: 5px;
  color: #65645f;
  font-size: 9px;
  font-weight: 400;
}

.project-total strong {
  color: #c9d8ce;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.project-total strong small {
  margin-left: 6px;
  color: #73726d;
  font-size: 9px;
  font-weight: 400;
}

.empty-projects {
  padding: 90px 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
}

.empty-projects h2 {
  margin-bottom: 25px;
  font-size: 30px;
  font-weight: 500;
}

/* Modal and footer */
footer {
  width: min(1280px, calc(100% - 48px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: #666560;
  font-size: 10px;
  letter-spacing: 0.05em;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(8, 8, 8, 0.78);
  backdrop-filter: blur(10px);
  animation: fade-in 180ms ease;
}

.modal {
  width: min(600px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid rgba(244, 242, 238, 0.16);
  border-radius: 18px;
  background: #242422;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.55);
  animation: modal-in 220ms ease;
}

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

.modal-head h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.modal-head button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
}

.modal form {
  display: grid;
  gap: 18px;
}

.modal fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.modal fieldset legend {
  margin-bottom: 10px;
}

.modal-partners {
  margin-top: 8px;
}

.range-label > span {
  display: flex;
  justify-content: space-between;
}

.range-label b {
  color: #7fab92;
}

.range-label input {
  height: auto;
  padding: 0;
  accent-color: #527963;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}

@media (max-width: 900px) {
  .module-grid {
    grid-template-columns: 1fr;
  }

  .module-card {
    min-height: 250px;
  }

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

  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-accent {
    display: none;
  }

  .login-card {
    border-right: 0;
  }
}

@media (max-width: 680px) {
  .topbar {
    height: 70px;
    padding-inline: 18px;
  }

  .brand {
    width: 120px;
  }

  .private-pill,
  .avatar {
    display: none;
  }

  .workspace {
    width: min(100% - 28px, 1280px);
    padding: 42px 0 52px;
  }

  .hero-row {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 28px;
  }

  h1 {
    font-size: 43px;
  }

  .hero-row .primary-button {
    width: 100%;
  }

  .date-pill {
    align-self: flex-start;
  }

  .dashboard-hero {
    padding-bottom: 28px;
  }

  .module-card {
    min-height: 230px;
  }

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

  .project-metrics article {
    min-height: 100px;
    padding: 16px 12px;
  }

  .project-metrics article + article {
    border-left: 1px solid var(--line);
  }

  .project-metrics span {
    font-size: 7px;
  }

  .project-metrics strong {
    font-size: 18px;
  }

  .project-card-head,
  .project-overview,
  .project-progress,
  .services-heading,
  .services-list,
  .project-total {
    padding-left: 18px;
    padding-right: 18px;
  }

  .project-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .delete-client {
    align-self: flex-start;
  }

  .project-progress::after {
    left: 18px;
    right: 18px;
  }

  .project-progress > i {
    left: 18px;
  }

  .new-service-form {
    margin-inline: 18px;
    grid-template-columns: 1fr;
  }

  .new-service-form .primary-button {
    width: 100%;
  }

  .service-row {
    padding: 13px 0;
    grid-template-columns: 1fr 34px;
  }

  .service-row > .service-name {
    grid-column: 1 / -1;
  }

  .service-row .money-input {
    grid-column: 1;
  }

  .service-row .remove-service {
    grid-column: 2;
  }

  .project-total strong {
    font-size: 20px;
  }

  .login-card {
    padding: 30px 24px;
  }

  .login-brand {
    width: 140px;
    margin-bottom: 70px;
  }

  .login-card h1 {
    font-size: 49px;
  }

  footer {
    width: min(100% - 28px, 1280px);
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
  }

  .modal {
    padding: 24px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
