:root {
  --ink: #17211f;
  --muted: #708078;
  --soft: #f3f5f0;
  --paper: #faf9f4;
  --white: #ffffff;
  --line: #e3e8df;
  --deep: #111c18;
  --green: #496b5a;
  --green-rgb: 73, 107, 90;
  --green-2: #dfe9df;
  --copper: #b5793c;
  --copper-rgb: 181, 121, 60;
  --hover-opacity: 14%;
  --hover-alpha: 0.14;
  --green-hover: color-mix(in srgb, var(--green), #000 var(--hover-opacity));
  --copper-hover: color-mix(in srgb, var(--copper), #000 var(--hover-opacity));
  --app-sidebar-bg: #111c18;
  --app-sidebar-text: #ffffff;
  --app-sidebar-logo: #496b5a;
  --app-sidebar-active: #496b5a;
  --app-sidebar-badge: #b5793c;
  --site-nav-bg: #111c18;
  --site-nav-text: #ffffff;
  --site-nav-accent: #b5793c;
  --site-page-bg: #faf9f4;
  --site-card-bg: #ffffff;
  --site-hero-overlay: #111c18;
  --blue: #335f73;
  --danger: #a84137;
  --success: #2c7a53;
  --shadow: 0 20px 60px rgba(17, 28, 24, 0.10);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  overflow-x: clip;
}

.public-site {
  background: var(--site-page-bg);
}

.is-hidden {
  display: none !important;
}

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

img {
  display: block;
  max-width: 100%;
}

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 5vw, 64px);
  color: var(--site-nav-text);
  background: color-mix(in srgb, var(--site-nav-bg) 82%, transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
}

.brand,
.print-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: auto;
  min-width: 42px;
  max-width: 92px;
  height: 42px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--copper);
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong,
.brand small,
.print-brand small {
  display: block;
}

.brand small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.site-header .brand-mark {
  color: var(--site-nav-text);
  background: var(--site-nav-accent);
}

.site-header .brand small {
  color: color-mix(in srgb, var(--site-nav-text) 72%, transparent);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: color-mix(in srgb, var(--site-nav-text) 84%, transparent);
  font-size: 0.94rem;
}

.main-nav a:hover {
  color: var(--site-nav-text);
}

.menu-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 3px 0;
  background: var(--white);
  transition: transform 180ms ease, opacity 180ms ease;
}

.site-header .menu-toggle {
  border-color: color-mix(in srgb, var(--site-nav-text) 24%, transparent);
  background: color-mix(in srgb, var(--site-nav-text) 10%, transparent);
}

.site-header .menu-toggle span {
  background: var(--site-nav-text);
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-admin {
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--site-nav-text) 24%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--site-nav-accent) 18%, transparent);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--site-hero-overlay) 86%, transparent), color-mix(in srgb, var(--site-hero-overlay) 54%, transparent) 42%, color-mix(in srgb, var(--site-hero-overlay) 6%, transparent)),
    linear-gradient(0deg, color-mix(in srgb, var(--site-hero-overlay) 42%, transparent), transparent 42%);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 92vw);
  padding: 124px clamp(18px, 5vw, 64px) 76px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--copper);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  line-height: 1.01;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.12rem;
}

.hero-actions,
.button-row,
.topbar-actions,
.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions,
.button-row {
  margin-top: 22px;
}

.document-form .button-row {
  align-items: flex-start;
  gap: 12px;
}

.document-form .button-row .button {
  flex: 0 1 auto;
  min-width: 144px;
}

.save-action {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.button-primary {
  color: var(--white);
  background: var(--green);
}

.button-primary:hover {
  background: var(--green-hover);
}

.button-secondary,
.button-light {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
}

.button-secondary:hover,
.button-light:hover {
  border-color: rgba(var(--green-rgb), 0.28);
  background: rgba(var(--green-rgb), var(--hover-alpha));
}

.button-danger {
  color: var(--white);
  background: var(--danger);
}

.button-danger:hover {
  background: #7f2c25;
}

.button-whatsapp {
  color: var(--white);
  background: #1f7a55;
}

.text-link {
  color: var(--green);
  font-weight: 700;
}

.quick-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: color-mix(in srgb, var(--site-nav-accent) 16%, var(--line));
}

.quick-proof span {
  padding: 18px clamp(18px, 5vw, 64px);
  background: var(--site-card-bg);
  color: var(--green);
  font-weight: 700;
}

.section {
  padding: clamp(54px, 8vw, 96px) clamp(18px, 5vw, 64px);
}

.compact-section,
.quote-request {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.section-title h2,
.request-copy h2,
.contact-band h2 {
  max-width: 640px;
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.service-list article {
  min-height: 116px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--site-card-bg);
  box-shadow: 0 10px 30px rgba(17, 28, 24, 0.04);
}

.service-list strong,
.service-list span {
  display: block;
}

.service-list span,
.request-copy p,
.muted,
.empty-state {
  color: var(--muted);
}

.quote-request {
  position: relative;
  background: var(--site-nav-bg);
  color: var(--white);
  gap: clamp(36px, 7vw, 88px);
  padding-top: clamp(72px, 10vw, 124px);
  padding-bottom: clamp(72px, 10vw, 124px);
}

.quote-request .request-copy p {
  max-width: 480px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.72);
}

.request-form,
.login-card,
.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.request-form {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 4vw, 30px);
  color: var(--ink);
  background: var(--site-card-bg);
}

.quote-form-page {
  min-height: 100vh;
}

.quote-form-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.quote-form-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 32px;
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--site-card-bg);
  box-shadow: 0 28px 80px rgba(17, 28, 24, 0.11);
}

.quote-form-intro .brand-mark {
  display: inline-flex;
  width: 56px;
  min-width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  border-radius: var(--radius);
  color: var(--site-nav-text);
  background: var(--site-nav-accent);
  font-weight: 800;
}

.quote-form-intro h1 {
  max-width: 520px;
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.quote-form-intro p {
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

label span {
  color: var(--muted);
  font-weight: 500;
}

.field-hint {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea {
  resize: vertical;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

fieldset:disabled {
  opacity: 0.72;
}

.document-edit-fieldset {
  display: grid;
  gap: 20px;
  min-width: 0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(73, 107, 90, 0.12);
}

input[type="range"] {
  padding: 0;
}

.notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 700;
}

.notice.success {
  color: var(--success);
  background: rgba(40, 114, 79, 0.10);
}

.notice.error {
  color: var(--danger);
  background: rgba(162, 58, 50, 0.10);
}

.notice.warning {
  color: #8a541a;
  background: #fff5e6;
}

.compact-notice {
  margin-top: 14px;
  margin-bottom: 0;
  font-size: 0.86rem;
  line-height: 1.35;
}

.notice.muted-notice {
  color: var(--muted);
  background: #f5f7f2;
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: var(--white);
}

.contact-actions {
  display: grid;
  gap: 8px;
  color: var(--green);
  font-weight: 700;
  text-align: right;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(18px, 5vw, 64px);
  color: rgba(255, 255, 255, 0.68);
  background: var(--deep);
}

.parallax-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  grid-template-rows: repeat(2, minmax(220px, 28vw));
  gap: clamp(18px, 3vw, 30px);
  padding: clamp(34px, 6vw, 82px);
  background: linear-gradient(180deg, var(--paper), #eef2ec);
  overflow: hidden;
}

.parallax-card {
  position: relative;
  min-height: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--white);
  background: var(--deep);
  box-shadow: var(--shadow);
  transform: translateY(var(--lift, 0));
  transition: transform 120ms linear;
}

.parallax-card.is-large {
  grid-row: span 2;
  min-height: 520px;
}

.parallax-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 36%, rgba(17, 28, 24, 0.72)),
    linear-gradient(90deg, rgba(17, 28, 24, 0.36), transparent 50%);
}

.parallax-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  transition: transform 120ms linear;
}

.parallax-card div {
  position: absolute;
  left: clamp(18px, 3vw, 30px);
  right: clamp(18px, 3vw, 30px);
  bottom: clamp(18px, 3vw, 30px);
  z-index: 1;
}

.parallax-card span,
.parallax-card strong {
  display: block;
}

.parallax-card span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.parallax-card strong {
  max-width: 360px;
  margin-top: 6px;
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  line-height: 1.08;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(var(--green-rgb), 0.9), rgba(var(--copper-rgb), 0.42)),
    url("/assets/jera-renovation-hero.png") center / cover;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
}

.login-card .brand {
  color: var(--ink);
}

.login-card .brand small {
  color: var(--muted);
}

.admin-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  background: #f5f6f2;
  transition: grid-template-columns 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-sidebar-collapsed-ready .admin-body,
.admin-body.is-sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.admin-menu-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 60;
  border-color: rgba(17, 28, 24, 0.16);
  background: var(--deep);
  box-shadow: var(--shadow);
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 264px;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  overflow: hidden;
  color: var(--app-sidebar-text);
  background: var(--app-sidebar-bg);
  transition:
    width 260ms cubic-bezier(0.22, 1, 0.36, 1),
    padding 260ms cubic-bezier(0.22, 1, 0.36, 1),
    gap 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-brand .brand-mark {
  color: var(--app-sidebar-text);
  background: var(--app-sidebar-logo);
}

.admin-sidebar-collapsed-ready .admin-brand .brand-mark,
.admin-body.is-sidebar-collapsed .admin-brand .brand-mark {
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  padding: 0 6px;
}

.admin-brand {
  min-width: 0;
}

.admin-brand strong,
.admin-brand small {
  color: var(--app-sidebar-text);
}

.admin-brand small {
  opacity: 0.72;
}

.brand-collapse-toggle {
  flex: 0 0 auto;
  border: 0;
  cursor: pointer;
  font: inherit;
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-collapse-toggle:hover,
.brand-collapse-toggle:focus-visible {
  background: color-mix(in srgb, var(--app-sidebar-logo), #000 var(--hover-opacity));
  box-shadow: 0 10px 24px rgba(17, 28, 24, 0.22);
  transform: translateY(-1px);
}

.brand-text,
.nav-label {
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  white-space: nowrap;
  transition:
    opacity 170ms ease,
    max-width 260ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-text {
  max-width: 160px;
}

.nav-label {
  max-width: 170px;
}

.nav-group summary {
  max-height: 24px;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity 170ms ease,
    max-height 260ms cubic-bezier(0.22, 1, 0.36, 1),
    margin 260ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-nav {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  scrollbar-width: none;
}

.admin-nav::-webkit-scrollbar {
  display: none;
}

.nav-group {
  display: grid;
  gap: 5px;
  padding: 6px 0;
}

.nav-group summary {
  margin: 4px 8px;
  color: color-mix(in srgb, var(--app-sidebar-text) 46%, transparent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "+";
  float: right;
  color: color-mix(in srgb, var(--app-sidebar-text) 58%, transparent);
}

.nav-group[open] summary::after {
  content: "-";
}

.admin-nav a,
.logout-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: color-mix(in srgb, var(--app-sidebar-text) 78%, transparent);
  line-height: 1.2;
}

.admin-nav a .nav-label,
.logout-link .nav-label {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-nav a:hover,
.logout-link:hover,
.admin-nav a.is-active,
.logout-link.is-active {
  color: var(--app-sidebar-text);
  background: color-mix(in srgb, var(--app-sidebar-active) 26%, transparent);
}

.admin-nav a.is-active,
.logout-link.is-active {
  box-shadow: inset 4px 0 0 var(--app-sidebar-badge);
}

.admin-nav a em {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--white);
  background: var(--app-sidebar-badge);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.logout-link {
  margin-top: auto;
  flex-shrink: 0;
}

.admin-sidebar-collapsed-ready .admin-sidebar,
.admin-body.is-sidebar-collapsed .admin-sidebar {
  width: 76px;
  gap: 8px;
  padding: 10px 10px;
  align-items: center;
  overflow: visible;
}

.admin-sidebar-collapsed-ready .brand-collapse-toggle,
.admin-body.is-sidebar-collapsed .brand-collapse-toggle {
  transform: scale(0.96);
}

.admin-sidebar-collapsed-ready .admin-brand,
.admin-body.is-sidebar-collapsed .admin-brand {
  justify-content: center;
  width: 100%;
}

.admin-sidebar-collapsed-ready .brand-text,
.admin-sidebar-collapsed-ready .nav-label,
.admin-body.is-sidebar-collapsed .brand-text,
.admin-body.is-sidebar-collapsed .nav-label {
  max-width: 0;
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
}

.admin-sidebar-collapsed-ready .nav-group summary,
.admin-body.is-sidebar-collapsed .nav-group summary {
  max-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
}

.admin-sidebar-collapsed-ready .admin-nav,
.admin-sidebar-collapsed-ready .nav-group,
.admin-body.is-sidebar-collapsed .admin-nav,
.admin-body.is-sidebar-collapsed .nav-group {
  width: 100%;
  gap: 2px;
  overflow: visible;
}

.admin-sidebar-collapsed-ready .admin-nav,
.admin-body.is-sidebar-collapsed .admin-nav {
  flex: 1 1 auto;
  align-content: start;
}

.admin-sidebar-collapsed-ready .nav-group,
.admin-body.is-sidebar-collapsed .nav-group {
  padding: 1px 0;
}

.admin-sidebar-collapsed-ready .admin-nav a,
.admin-sidebar-collapsed-ready .logout-link,
.admin-body.is-sidebar-collapsed .admin-nav a,
.admin-body.is-sidebar-collapsed .logout-link {
  position: relative;
  justify-content: center;
  width: 46px;
  height: 34px;
  padding: 0;
}

.admin-sidebar-collapsed-ready .admin-nav a.is-active,
.admin-body.is-sidebar-collapsed .admin-nav a.is-active {
  background: color-mix(in srgb, var(--app-sidebar-active) 32%, transparent);
  box-shadow: inset 0 0 0 1px var(--app-sidebar-badge);
}

.admin-sidebar-collapsed-ready .admin-nav a,
.admin-body.is-sidebar-collapsed .admin-nav a {
  margin-bottom: 2px;
}

.admin-sidebar-collapsed-ready .logout-link,
.admin-body.is-sidebar-collapsed .logout-link {
  margin-top: 4px;
  padding-top: 4px;
  height: 40px;
  border-top: 1px solid color-mix(in srgb, var(--app-sidebar-text) 14%, transparent);
  border-radius: 0 0 var(--radius) var(--radius);
}

.admin-sidebar-collapsed-ready .admin-nav a::after,
.admin-sidebar-collapsed-ready .logout-link::after,
.admin-body.is-sidebar-collapsed .admin-nav a::after,
.admin-body.is-sidebar-collapsed .logout-link::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  z-index: 100;
  width: max-content;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid rgba(73, 107, 90, 0.18);
  border-radius: 8px;
  color: var(--ink);
  background: #fffdf8;
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate(-6px, -50%);
  transition: opacity 140ms ease, transform 140ms ease;
  white-space: nowrap;
}

.admin-sidebar-collapsed-ready .admin-nav a::before,
.admin-sidebar-collapsed-ready .logout-link::before,
.admin-body.is-sidebar-collapsed .admin-nav a::before,
.admin-body.is-sidebar-collapsed .logout-link::before {
  content: "";
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  z-index: 101;
  width: 10px;
  height: 10px;
  border-left: 1px solid rgba(73, 107, 90, 0.18);
  border-bottom: 1px solid rgba(73, 107, 90, 0.18);
  background: #fffdf8;
  opacity: 0;
  pointer-events: none;
  transform: translate(-6px, -50%) rotate(45deg);
  transition: opacity 140ms ease, transform 140ms ease;
}

.admin-sidebar-collapsed-ready .admin-nav a:hover::after,
.admin-sidebar-collapsed-ready .admin-nav a:focus-visible::after,
.admin-sidebar-collapsed-ready .logout-link:hover::after,
.admin-sidebar-collapsed-ready .logout-link:focus-visible::after,
.admin-sidebar-collapsed-ready .admin-nav a:hover::before,
.admin-sidebar-collapsed-ready .admin-nav a:focus-visible::before,
.admin-sidebar-collapsed-ready .logout-link:hover::before,
.admin-sidebar-collapsed-ready .logout-link:focus-visible::before,
.admin-body.is-sidebar-collapsed .admin-nav a:hover::after,
.admin-body.is-sidebar-collapsed .admin-nav a:focus-visible::after,
.admin-body.is-sidebar-collapsed .logout-link:hover::after,
.admin-body.is-sidebar-collapsed .logout-link:focus-visible::after,
.admin-body.is-sidebar-collapsed .admin-nav a:hover::before,
.admin-body.is-sidebar-collapsed .admin-nav a:focus-visible::before,
.admin-body.is-sidebar-collapsed .logout-link:hover::before,
.admin-body.is-sidebar-collapsed .logout-link:focus-visible::before {
  opacity: 1;
  transform: translate(0, -50%);
}

.admin-sidebar-collapsed-ready .admin-nav a em,
.admin-body.is-sidebar-collapsed .admin-nav a em {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.62rem;
}

.admin-sidebar-collapsed-ready .nav-icon,
.admin-body.is-sidebar-collapsed .nav-icon {
  width: 20px;
  height: 20px;
}

.admin-main {
  grid-column: 2;
  min-width: 0;
  max-width: 100%;
  padding: 26px;
  overflow-x: clip;
}

.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  min-width: 0;
}

.admin-topbar > div:first-child {
  min-width: 0;
}

.topbar-actions {
  flex: 0 1 auto;
  justify-content: flex-end;
  min-width: 0;
}

.admin-topbar h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  letter-spacing: 0;
}

.notification-popover {
  position: relative;
}

.onboarding-help-button svg,
.notification-bell svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.onboarding-overlay,
.onboarding-spotlight,
.onboarding-bubble {
  position: fixed;
  z-index: 5000;
}

.onboarding-overlay[hidden],
.onboarding-spotlight[hidden],
.onboarding-bubble[hidden] {
  display: none;
}

.onboarding-overlay {
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.onboarding-scrim {
  position: absolute;
  inset: 0;
}

.onboarding-spotlight {
  top: var(--spot-top);
  left: var(--spot-left);
  width: var(--spot-width);
  height: var(--spot-height);
  border: 2px solid var(--copper);
  border-radius: 14px;
  box-shadow:
    0 0 0 9999px rgba(9, 16, 13, 0.62),
    0 0 0 8px rgba(var(--copper-rgb), 0.14),
    0 18px 55px rgba(0, 0, 0, 0.26);
  pointer-events: none;
  transition:
    top 180ms ease,
    left 180ms ease,
    width 180ms ease,
    height 180ms ease;
}

.onboarding-target {
  position: relative;
  z-index: 5002 !important;
  animation: onboardingPulse 1600ms ease-in-out infinite;
}

.admin-nav a.onboarding-target,
.logout-link.onboarding-target,
.notification-bell.onboarding-target,
.brand-collapse-toggle.onboarding-target,
.quick-create-toggle.onboarding-target {
  color: var(--white) !important;
  background: rgba(var(--green-rgb), 0.72) !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22) !important;
  opacity: 1 !important;
  filter: none !important;
  animation: onboardingIconReveal 420ms ease both;
}

.admin-nav a.onboarding-target .nav-icon,
.logout-link.onboarding-target .nav-icon,
.notification-bell.onboarding-target svg,
.brand-collapse-toggle.onboarding-target,
.quick-create-toggle.onboarding-target svg {
  color: var(--white) !important;
  opacity: 1 !important;
  stroke: currentColor !important;
}

.admin-nav a.onboarding-target .nav-label,
.logout-link.onboarding-target .nav-label {
  color: var(--white) !important;
  opacity: 1 !important;
}

.onboarding-bubble {
  padding: 18px;
  border: 1px solid rgba(var(--green-rgb), 0.22);
  border-radius: 12px;
  color: var(--ink);
  background: #fffdf8;
  box-shadow: 0 22px 70px rgba(17, 28, 24, 0.28);
  transition:
    top 180ms ease,
    left 180ms ease,
    transform 180ms ease;
}

.onboarding-bubble h2 {
  margin: 4px 0 8px;
  font-size: 1.2rem;
  line-height: 1.18;
}

.onboarding-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.onboarding-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.onboarding-progress {
  margin-top: 12px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 800;
}

.onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.onboarding-actions .button {
  width: auto;
}

.onboarding-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@keyframes onboardingPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.015);
  }
}

@keyframes onboardingIconReveal {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.notification-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
}

.notification-bell svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-create {
  position: relative;
  z-index: 32;
  flex: 0 0 auto;
}

.quick-create-toggle {
  border-color: var(--green);
  color: var(--white);
  background: var(--green);
  transition: transform 0.24s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.quick-create-toggle svg {
  width: 21px;
  height: 21px;
}

.quick-create:hover .quick-create-toggle,
.quick-create:focus-within .quick-create-toggle {
  transform: rotate(135deg);
  background: var(--green-hover);
  box-shadow: 0 14px 28px rgba(17, 28, 24, 0.16);
}

.quick-create-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: grid;
  gap: 8px;
  width: 228px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.22s ease;
}

.quick-create-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 16px;
  width: 12px;
  height: 12px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: var(--white);
  transform: rotate(45deg);
}

.quick-create:hover .quick-create-menu,
.quick-create:focus-within .quick-create-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.quick-create-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fbfcf8;
  box-shadow: none;
  opacity: 1;
  text-decoration: none;
  transform: translateY(-3px);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.quick-create:hover .quick-create-action,
.quick-create:focus-within .quick-create-action {
  transform: translateY(0);
}

.quick-create-action:hover,
.quick-create-action:focus-visible {
  border-color: rgba(var(--green-rgb), 0.45);
  background: rgba(var(--green-rgb), var(--hover-alpha));
  transform: translateX(-2px);
}

.quick-create-action svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.quick-create-action span {
  font-weight: 800;
  white-space: nowrap;
}

.notification-bell span {
  position: absolute;
  top: -7px;
  right: -7px;
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--white);
  background: var(--copper);
  font-size: 0.72rem;
  font-weight: 800;
}

.notification-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(360px, 88vw);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.notification-popover:hover .notification-menu,
.notification-popover:focus-within .notification-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.notification-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 16px;
  width: 12px;
  height: 12px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: var(--white);
  transform: rotate(45deg);
}

.notification-menu-head,
.notification-menu-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-menu-head {
  margin-bottom: 10px;
}

.notification-menu-head small {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  color: var(--white);
  background: var(--green);
}

.notification-menu-list {
  display: grid;
  gap: 8px;
  max-height: 310px;
  overflow: auto;
}

.notification-menu-list a {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.notification-menu-list a.is-unread {
  border-color: rgba(181, 121, 60, 0.45);
  background: #fffaf1;
  box-shadow: inset 3px 0 0 var(--copper);
}

.notification-menu-list a.is-read {
  opacity: 0.68;
  background: #f5f7f2;
}

.notification-menu-list span,
.notification-menu-list small {
  color: var(--muted);
  font-size: 0.84rem;
}

.notification-menu-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.notification-menu-actions button {
  padding: 0;
  border: 0;
  color: var(--danger);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: var(--radius);
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(17, 28, 24, 0.94), rgba(73, 107, 90, 0.88)),
    url("/assets/landing-interior.png") center / cover;
  box-shadow: var(--shadow);
}

.dashboard-hero h2 {
  max-width: 650px;
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3.3rem);
  line-height: 1.05;
}

.dashboard-grid,
.editor-layout,
.document-layout,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.68fr);
  gap: clamp(18px, 3vw, 30px);
  align-items: start;
}

.project-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 26vw, 420px);
  gap: clamp(18px, 3vw, 30px);
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.project-main-column,
.project-form {
  display: grid;
  gap: 16px;
  min-width: 0;
  width: 100%;
}

.project-main-column > .admin-card,
.project-form > .admin-card {
  width: 100%;
  min-width: 0;
}

.document-layout {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.52fr);
}

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

.stats-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 26px rgba(17, 28, 24, 0.05);
}

.stats-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.stats-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.kpi-card {
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-height: 142px;
}

.kpi-card strong {
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.05;
}

.kpi-card small {
  color: var(--muted);
  line-height: 1.35;
}

.kpi-card-strong {
  color: var(--white);
  background: linear-gradient(135deg, var(--green), var(--green-hover)) !important;
}

.kpi-card-strong span,
.kpi-card-strong small {
  color: rgba(255, 255, 255, 0.78);
}

.kpi-card-alert {
  border-color: rgba(var(--copper-rgb), 0.28) !important;
  background: rgba(var(--copper-rgb), 0.08) !important;
}

.dashboard-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.insight-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 0;
}

.insight-card strong {
  display: block;
  margin-bottom: 4px;
}

.insight-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.insight-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), var(--copper));
  box-shadow: 0 0 0 5px rgba(var(--green-rgb), 0.12);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-chart-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-wide-chart {
  grid-column: span 2;
}

.chart-card {
  display: grid;
  gap: 10px;
}

.bar-chart {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(98px, 0.72fr) minmax(90px, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 0.88rem;
}

.bar-row span {
  min-width: 0;
  color: var(--muted);
}

.bar-row div {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--green-2);
}

.bar-row i {
  display: block;
  min-width: 4px;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.bar-row strong {
  white-space: nowrap;
}

.month-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 176px;
  padding-top: 10px;
}

.month-bar {
  display: grid;
  grid-template-rows: minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
  text-align: center;
}

.month-bar i {
  display: block;
  width: min(12px, 58%);
  min-height: 2px;
  margin-inline: auto;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, var(--copper), var(--green));
}

.month-bar span {
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.compact-list {
  gap: 8px;
}

.line-chart-card {
  display: grid;
  gap: 10px;
}

.line-chart {
  width: 100%;
  min-height: 174px;
  overflow: visible;
}

.line-chart-grid {
  fill: none;
  stroke: rgba(17, 28, 24, 0.08);
  stroke-width: 1;
}

.line-chart-area {
  fill: rgba(var(--green-rgb), 0.1);
}

.line-chart-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-chart-point {
  fill: var(--white);
  stroke: var(--copper);
  stroke-width: 3;
}

.line-chart-label {
  fill: var(--muted);
  font-size: 0.72rem;
  text-anchor: middle;
}

.line-chart-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.line-chart-summary span {
  color: var(--muted);
}

.finance-chart,
.status-donut-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.radial-gauge,
.status-donut {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  width: 126px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--value) * 1%), var(--green-2) 0);
}

.radial-gauge::after,
.status-donut::after {
  position: absolute;
  inset: 13px;
  content: "";
  border-radius: inherit;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
}

.radial-gauge strong,
.radial-gauge span,
.status-donut strong,
.status-donut span {
  position: relative;
  z-index: 1;
  text-align: center;
}

.radial-gauge strong,
.status-donut strong {
  font-size: 1.55rem;
  line-height: 1;
}

.radial-gauge span,
.status-donut span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.metric-legend,
.status-legend {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.metric-legend div,
.status-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.metric-legend div:last-child,
.status-legend-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.metric-legend span,
.status-legend-row span {
  min-width: 0;
  color: var(--muted);
}

.metric-legend strong,
.status-legend-row strong {
  white-space: nowrap;
}

.status-legend-row::before {
  width: 9px;
  height: 9px;
  content: "";
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--green);
}

.status-legend-row span {
  margin-right: auto;
}

.status-dot-1::before { background: var(--copper); }
.status-dot-2::before { background: rgba(var(--green-rgb), 0.55); }
.status-dot-3::before { background: rgba(var(--copper-rgb), 0.42); }
.status-dot-4::before { background: rgba(17, 28, 24, 0.18); }

.funnel-chart {
  display: grid;
  gap: 12px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.funnel-row > span {
  color: var(--muted);
  font-size: 0.9rem;
}

.funnel-row i {
  position: relative;
  display: block;
  width: var(--w);
  min-width: 54px;
  height: 28px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 10px 50%);
  background: linear-gradient(90deg, var(--green), var(--copper));
}

.funnel-row em {
  position: absolute;
  right: 14px;
  top: 50%;
  color: var(--white);
  font-style: normal;
  font-weight: 800;
  transform: translateY(-50%);
}

.funnel-rate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.funnel-rate strong {
  font-size: 1.5rem;
}

.funnel-rate span {
  color: var(--muted);
}

.finance-chart,
.status-donut-card {
  display: block;
}

.finance-chart .radial-gauge,
.status-donut-card .status-donut {
  display: none;
}

.metric-legend,
.status-legend {
  gap: 0;
}

.metric-legend div,
.status-legend-row {
  min-height: 42px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.metric-legend span,
.status-legend-row span,
.funnel-row > span {
  font-size: 0.92rem;
}

.status-legend-row::before {
  width: 7px;
  height: 7px;
}

.funnel-chart {
  gap: 9px;
}

.funnel-row {
  grid-template-columns: minmax(96px, 0.72fr) minmax(100px, 1fr) 28px;
  gap: 12px;
}

.funnel-row i {
  width: 100%;
  min-width: 0;
  display: flex;
  height: auto;
  min-height: 22px;
  gap: 8px;
  align-items: center;
  clip-path: none;
  border-radius: 0;
  background: transparent;
}

.funnel-row i::before {
  display: block;
  width: var(--w);
  max-width: calc(100% - 22px);
  height: 5px;
  content: "";
  border-radius: 2px;
  background: var(--green);
}

.funnel-row em {
  position: static;
  color: var(--ink);
  text-align: right;
  transform: none;
}

.funnel-rate {
  margin-top: 8px;
  padding-top: 12px;
}

.funnel-rate strong {
  font-size: 1.2rem;
}

.admin-card {
  padding: 18px;
  margin-bottom: 16px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.card-head h2,
.admin-card h2 {
  margin-bottom: 0;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.table-wrap {
  overflow-x: auto;
}

.list-toolbar,
.project-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: flex-start;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(var(--green-rgb), .06), rgba(var(--copper-rgb), .04)),
    #fbfcf8;
}

.list-toolbar label,
.project-filter-bar label {
  display: grid;
  flex: 0 1 106px;
  gap: 7px;
  min-width: 0;
}

.list-toolbar .list-search,
.project-filter-bar .list-search {
  flex: 1 1 210px;
}

.list-toolbar label span,
.project-filter-bar label span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.list-toolbar input,
.list-toolbar select,
.project-filter-bar input,
.project-filter-bar select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-weight: 500;
}

.list-toolbar input:focus,
.list-toolbar select:focus,
.project-filter-bar input:focus,
.project-filter-bar select:focus {
  outline: 2px solid rgba(var(--green-rgb), .18);
  border-color: rgba(var(--green-rgb), .45);
}

.list-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: end;
  justify-content: flex-end;
  min-width: max-content;
}

.list-toolbar-actions .button {
  min-height: 46px;
  padding-inline: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.workflow-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
}

.workflow-hero h2 {
  font-size: clamp(1.28rem, 2vw, 1.65rem);
  line-height: 1.12;
}

.workflow-hero p {
  margin-top: 4px;
  font-size: .95rem;
  line-height: 1.35;
}

.workflow-hero .eyebrow {
  margin-bottom: 4px;
}

.workflow-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.workflow-kpis .admin-card {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 12px;
  margin-bottom: 0;
}

.workflow-kpis span,
.workflow-meta,
.workflow-email-list p,
.workflow-email-status small {
  color: var(--muted);
}

.workflow-kpis strong {
  color: var(--ink);
  font-size: clamp(1.18rem, 1.9vw, 1.55rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.workflow-kpis article:nth-child(4) strong {
  font-size: clamp(1rem, 1.5vw, 1.28rem);
}

.workflow-map-card {
  overflow: hidden;
}

.workflow-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  grid-template-rows: auto auto;
  align-items: stretch;
  gap: 32px 42px;
  overflow: hidden;
  padding: 8px 8px 12px;
}

.workflow-node {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-height: 96px;
  padding: 12px 10px;
  border: 1px solid rgba(var(--green-rgb), .18);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f8faf5);
  text-align: center;
  box-shadow: 0 12px 28px rgba(17, 28, 24, .07);
  transition: opacity 160ms ease, filter 160ms ease, border-color 160ms ease, background 160ms ease;
}

.workflow-node.is-future {
  border-color: rgba(108, 122, 116, .18);
  background: #f7f8f6;
  box-shadow: none;
  opacity: .62;
}

.workflow-node.is-future .workflow-node-icon {
  color: #6f7d77;
  background: #dfe5df;
  box-shadow: 0 0 0 5px rgba(108, 122, 116, .08);
}

.workflow-node.is-future strong,
.workflow-node.is-future small {
  color: #6f7d77;
}

.workflow-node.is-waiting {
  border-color: rgba(var(--copper-rgb), .28);
  background: linear-gradient(180deg, rgba(var(--copper-rgb), .08), #fff);
}

.workflow-node.is-waiting .workflow-node-icon {
  background: var(--copper);
  box-shadow: 0 0 0 5px rgba(var(--copper-rgb), .12);
}

.workflow-node.is-done {
  border-color: rgba(var(--green-rgb), .26);
}

.workflow-node strong {
  color: var(--ink);
  font-size: .9rem;
  line-height: 1.15;
}

.workflow-node small {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.25;
}

.workflow-node-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(var(--green-rgb), .1);
}

.workflow-node-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workflow-node-start .workflow-node-icon,
.workflow-node-success .workflow-node-icon {
  background: #2d875c;
}

.workflow-node-decision .workflow-node-icon,
.workflow-node-wait .workflow-node-icon {
  background: var(--copper);
  box-shadow: 0 0 0 6px rgba(var(--copper-rgb), .13);
}

.workflow-node-end .workflow-node-icon {
  background: var(--ink);
}

.workflow-node.is-future.workflow-node-end .workflow-node-icon,
.workflow-node.is-future.workflow-node-success .workflow-node-icon,
.workflow-node.is-future.workflow-node-decision .workflow-node-icon,
.workflow-node.is-future.workflow-node-wait .workflow-node-icon {
  background: #dfe5df;
}

.workflow-link {
  display: none;
}

.workflow-node-start {
  grid-column: 1;
  grid-row: 1;
}

.workflow-node-send {
  grid-column: 2;
  grid-row: 1;
}

.workflow-node-decision {
  grid-column: 3;
  grid-row: 1;
}

.workflow-node-success {
  grid-column: 4;
  grid-row: 1;
}

.workflow-node-wait {
  grid-column: 3;
  grid-row: 2;
}

.workflow-node-reminder {
  grid-column: 2;
  grid-row: 2;
}

.workflow-node-end {
  grid-column: 4;
  grid-row: 2;
}

.workflow-node-start::after,
.workflow-node-send::after,
.workflow-node-decision::after {
  content: "";
  position: absolute;
  z-index: 2;
}

.workflow-node-start::after,
.workflow-node-send::after,
.workflow-node-decision::after {
  top: 50%;
  right: -30px;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--green);
  border-right: 2px solid var(--green);
  transform: translateY(-50%) rotate(45deg);
}

.workflow-node.is-future::after,
.workflow-node.is-future::before {
  opacity: .35;
  filter: grayscale(1);
}

.workflow-node-decision::before,
.workflow-node-wait::before {
  content: "";
  position: absolute;
  z-index: 1;
  background: rgba(var(--copper-rgb), .55);
}

.workflow-node-decision::before {
  left: 50%;
  bottom: -31px;
  width: 2px;
  height: 31px;
  transform: translateX(-50%);
}

.workflow-node-wait::before {
  top: 50%;
  left: -42px;
  width: 42px;
  height: 2px;
  transform: translateY(-50%);
}

.workflow-node-wait::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  left: -43px;
  width: 9px;
  height: 9px;
  border-bottom: 2px solid var(--copper);
  border-left: 2px solid var(--copper);
  transform: translateY(-50%) rotate(45deg);
}

.workflow-node-reminder::after {
  content: "retour vers consultation";
  position: absolute;
  top: -23px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #f5f7f2;
  font-size: .7rem;
  white-space: nowrap;
}

.workflow-branch {
  display: none;
}

.workflow-toolbar label {
  flex-basis: 142px;
}

.workflow-toolbar .list-search {
  flex-basis: 260px;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.workflow-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.workflow-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--green-rgb), .28);
  box-shadow: 0 16px 34px rgba(17, 28, 24, .08);
}

.workflow-card.needs-reminder {
  border-color: rgba(var(--copper-rgb), .38);
  background: linear-gradient(180deg, rgba(var(--copper-rgb), .07), #fff 42%);
}

.workflow-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.workflow-card h3,
.workflow-email-list h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
}

.workflow-card-head p,
.workflow-card-actions,
.workflow-email-list p {
  margin: 4px 0 0;
}

.workflow-badge,
.workflow-email-status span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(var(--green-rgb), .12);
  font-size: .82rem;
}

.needs-reminder .workflow-badge {
  color: #8a541a;
  background: rgba(var(--copper-rgb), .16);
}

.workflow-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .88rem;
}

.workflow-meta span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f5f7f2;
}

.workflow-next-reminder {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid rgba(var(--green-rgb), .14);
  border-radius: var(--radius);
  background: rgba(var(--green-rgb), .045);
}

.workflow-next-reminder span {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.workflow-next-reminder strong {
  color: var(--ink);
  font-size: 1rem;
}

.workflow-next-reminder small {
  color: var(--muted);
  line-height: 1.35;
}

.workflow-next-reminder.is-due {
  border-color: rgba(var(--copper-rgb), .35);
  background: rgba(var(--copper-rgb), .1);
}

.workflow-next-reminder.is-due strong {
  color: var(--copper);
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-steps li {
  position: relative;
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.workflow-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 18px;
  right: 0;
  height: 2px;
  background: var(--line);
}

.workflow-steps li.is-done:not(:last-child)::after {
  background: rgba(var(--green-rgb), .45);
}

.workflow-steps li > span {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.workflow-steps li.is-done > span {
  border-color: var(--green);
  background: var(--green);
}

.workflow-steps div {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--ink);
  font-size: .82rem;
}

.workflow-steps small {
  overflow: hidden;
  color: var(--muted);
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-email-list {
  display: grid;
  gap: 10px;
}

.workflow-email-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.workflow-email-type {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--copper);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.workflow-email-status {
  display: grid;
  gap: 5px;
  justify-items: end;
  min-width: 210px;
  text-align: right;
}

.workflow-email-status .is-failed {
  color: var(--danger);
  background: rgba(162, 58, 50, .12);
}

.workflow-empty {
  grid-column: 1 / -1;
  margin: 0;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  color: var(--muted);
  font-weight: 600;
}

.pagination-bar > div {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pagination-link,
.pagination-ellipsis {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--green);
  background: var(--white);
  font-weight: 700;
}

.pagination-link.is-active {
  color: var(--white);
  border-color: var(--green);
  background: var(--green);
}

.pagination-link.is-disabled {
  pointer-events: none;
  color: rgba(17, 28, 24, .32);
  background: rgba(255,255,255,.55);
}

.pagination-ellipsis {
  min-width: auto;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.live-row-added td {
  animation: liveRowPulse 2.6s ease;
}

@keyframes liveRowPulse {
  0% { background: #fff4df; }
  100% { background: transparent; }
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

td small,
.list-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

td a {
  color: var(--blue);
  font-weight: 700;
}

.status {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(73, 107, 90, 0.12);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 700;
}

.status-in_progress {
  color: var(--blue);
  background: rgba(51, 95, 115, 0.12);
}

.status-viewed {
  color: var(--blue);
  background: rgba(51, 95, 115, 0.12);
}

.status-signed {
  color: var(--copper);
  background: rgba(181, 121, 60, 0.15);
}

.status-completed,
.status-paid,
.status-won {
  color: var(--success);
  background: rgba(44, 122, 83, 0.12);
}

.status-cancelled,
.status-lost {
  color: var(--danger);
  background: rgba(168, 65, 55, 0.12);
}

.stack-list {
  display: grid;
  gap: 8px;
}

.client-map-card {
  overflow: hidden;
}

.client-graph {
  position: relative;
  min-height: clamp(460px, 42vw, 560px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at center, rgba(var(--green-rgb), 0.1), transparent 34%),
    #fbfcf8;
}

.client-graph-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.client-graph-lines line {
  stroke: rgba(var(--green-rgb), 0.26);
  stroke-width: 0.18;
  vector-effect: non-scaling-stroke;
}

.client-node,
.project-node {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 4px;
  min-width: 170px;
  max-width: 230px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 14px 30px rgba(17, 28, 24, 0.09);
}

.client-node {
  left: 50%;
  top: 50%;
  color: var(--white);
  background: var(--green);
  transform: translate(-50%, -50%);
}

.project-node {
  left: var(--x);
  top: var(--y);
  color: inherit;
  text-decoration: none;
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.project-node:hover {
  border-color: rgba(var(--green-rgb), 0.45);
  transform: translate(-50%, -50%) scale(1.03);
}

.client-node small,
.project-node small {
  color: inherit;
  opacity: 0.75;
}

.project-node em {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(var(--green-rgb), 0.12);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
}

.client-graph-status {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 4;
  display: inline-grid;
  place-items: center;
  min-width: 92px;
  padding: 5px 8px;
  border: 1px solid rgba(var(--green-rgb), 0.18);
  border-radius: 999px;
  color: var(--green);
  background: #fffdf8;
  box-shadow: 0 8px 18px rgba(17, 28, 24, 0.08);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.list-row:hover,
.project-card:hover {
  border-color: rgba(73, 107, 90, 0.38);
}

.list-row em {
  align-self: flex-start;
  color: var(--green);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 700;
}

.detail-list {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 10px 18px;
  margin-top: 18px;
}

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

.form-panel,
.document-form,
.inline-form {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.side-panel,
.document-preview {
  position: sticky;
  top: 24px;
  max-width: 100%;
}

.project-side-panel {
  position: sticky;
  top: 26px;
  align-self: start;
}

.line-editor {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.line-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 4px;
}

.line-editor-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.line-editor-head span {
  color: var(--ink);
  font-weight: 700;
}

.line-editor-head small {
  color: var(--muted);
}

.ai-suggest-button {
  flex: 0 0 auto;
}

.ai-suggestion-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: var(--radius);
  background: rgba(var(--accent-rgb), 0.06);
}

.ai-suggestion-head,
.ai-suggestion-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.ai-suggestion-head > div,
.ai-suggestion-card > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ai-suggestion-head small,
.ai-suggestion-card span,
.ai-suggestion-card small,
.ai-suggestion-card p {
  color: var(--muted);
}

.ai-suggestion-list {
  display: grid;
  gap: 10px;
}

.ai-suggestion-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.ai-suggestion-card strong,
.ai-suggestion-card p {
  overflow-wrap: anywhere;
}

.ai-suggestion-card p {
  margin: 0;
}

.document-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "type title title title"
    "qty price tva remove"
    "description description description description";
  gap: 16px;
  align-items: start;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.document-line > label {
  min-width: 0;
}

.document-line input,
.document-line select,
.document-line textarea,
.document-form select {
  min-width: 0;
}

.document-line > label:nth-child(1) {
  grid-area: type;
}

.document-line .line-title {
  grid-area: title;
}

.document-line > label:nth-child(3) {
  grid-area: qty;
}

.document-line > label:nth-child(4) {
  grid-area: price;
}

.document-line > label:nth-child(5) {
  grid-area: tva;
}

.line-description {
  grid-area: description;
}

.document-line .icon-button {
  grid-area: remove;
  align-self: end;
  justify-self: start;
  width: 54px;
  height: 44px;
}

.document-line[data-type="section"],
.document-line[data-type="subsection"] {
  grid-template-areas:
    "type title title remove"
    "description description description description";
  background: #f5f8f3;
}

.document-line[data-type="section"] .line-money,
.document-line[data-type="subsection"] .line-money {
  display: none;
}

.line-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  min-width: 0;
  margin-top: 6px;
  margin-bottom: 18px;
}

.line-actions .button {
  width: 100%;
  min-width: 0;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.icon-button:hover {
  border-color: rgba(168, 65, 55, 0.35);
  color: var(--danger);
}

.action-stack,
.document-actions {
  display: grid;
  gap: 10px;
}

.action-stack .button,
.document-actions .button {
  width: 100%;
}

.invoice-workflow {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 14px;
  margin-bottom: 18px;
}

.invoice-option {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.invoice-option strong,
.source-list strong {
  color: var(--ink);
}

.invoice-option span,
.source-list small {
  display: block;
  color: var(--muted);
}

.quote-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.quote-search label {
  min-width: 0;
}

.quote-search-help {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.source-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.source-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.source-list a:hover {
  border-color: rgba(73, 107, 90, 0.35);
  background: var(--soft);
}

.source-list a > span {
  min-width: 0;
}

.source-list strong {
  white-space: nowrap;
}

.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--white);
  font-weight: 800;
}

.tab-nav a.is-active {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.settings-section-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1fr);
  gap: 18px;
}

.settings-subsection {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.settings-subsection h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

.color-setting-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.color-setting-grid label {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.color-setting-grid label span {
  color: var(--muted);
  font-weight: 500;
}

.color-setting-grid input[type="color"] {
  width: 44px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.theme-preview {
  display: grid;
  grid-template-columns: 74px 1fr;
  min-height: 210px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--site-page-bg);
}

.theme-preview-sidebar {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 12px;
  padding: 14px 10px;
  color: var(--app-sidebar-text);
  background: var(--app-sidebar-bg);
}

.theme-preview-sidebar span {
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--app-sidebar-logo);
  font-weight: 800;
  overflow: hidden;
}

.theme-preview-sidebar i {
  display: block;
  width: 36px;
  height: 26px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--app-sidebar-text) 14%, transparent);
}

.theme-preview-sidebar i.is-active {
  background: color-mix(in srgb, var(--app-sidebar-active) 34%, transparent);
  box-shadow: inset 3px 0 0 var(--app-sidebar-badge);
}

.theme-preview-content {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
}

.theme-preview-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
  color: var(--site-nav-text);
  background: var(--site-nav-bg);
}

.theme-preview-nav span {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--site-nav-accent);
}

.theme-preview-nav strong {
  font-size: 0.92rem;
}

.theme-preview-card {
  height: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--site-card-bg);
}

.theme-preview-card.is-small {
  width: 72%;
}

.subscription-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 22px 24px;
  border: 1px solid rgba(var(--green-rgb), .16);
  border-radius: 14px;
  background:
    radial-gradient(circle at 8% 12%, rgba(var(--copper-rgb), .16), transparent 30%),
    linear-gradient(135deg, rgba(var(--green-rgb), .11), rgba(var(--green-rgb), 0) 58%),
    #fbfcf8;
}

.subscription-hero h2 {
  max-width: 720px;
  margin: 0 0 8px;
  font-size: clamp(27px, 2.8vw, 38px);
  line-height: 1.04;
}

.subscription-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.subscription-current {
  display: grid;
  min-width: 150px;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(var(--green-rgb), .15);
  box-shadow: 0 16px 34px rgba(14,31,25,.08);
}

.subscription-current span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.subscription-current strong {
  font-size: 22px;
}

.subscription-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.subscription-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-height: 455px;
  padding: 22px;
  border: 1px solid rgba(var(--green-rgb), .16);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94)),
    #fff;
  cursor: pointer;
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.subscription-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--green), var(--copper));
  opacity: .28;
}

.subscription-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--green-rgb), .32);
  box-shadow: 0 22px 44px rgba(14,31,25,.1);
}

.subscription-card.is-current {
  border-color: var(--green);
  box-shadow: 0 24px 54px rgba(var(--green-rgb), .16);
}

.subscription-card.is-featured {
  background:
    linear-gradient(180deg, rgba(var(--green-rgb), .09), rgba(var(--green-rgb), 0) 40%),
    #fff;
}

.subscription-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.subscription-check {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(var(--green-rgb), .24);
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 7px #fff;
}

.subscription-card input:checked + .subscription-check {
  border-color: var(--green);
  background: var(--green);
}

.subscription-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  padding-right: 42px;
}

.subscription-card-top em,
.subscription-tier {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.subscription-tier {
  color: var(--copper);
  background: rgba(var(--copper-rgb), .11);
}

.subscription-card-top em {
  color: #fff;
  background: var(--green);
}

.subscription-card h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.08;
}

.subscription-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.subscription-fit {
  padding: 12px;
  border: 1px solid rgba(var(--copper-rgb), .16);
  border-left: 4px solid var(--copper);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(var(--copper-rgb), .08);
  font-weight: 800;
  line-height: 1.35;
}

.subscription-benefits {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.subscription-benefits li {
  position: relative;
  padding-left: 24px;
  color: var(--ink);
  font-weight: 800;
}

.subscription-benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(var(--green-rgb), .12);
}

.subscription-modules {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.subscription-modules > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.subscription-modules div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.subscription-modules b {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid rgba(var(--green-rgb), .12);
  border-radius: 999px;
  color: var(--green);
  background: rgba(var(--green-rgb), .07);
  font-size: 13px;
  line-height: 1;
}

.subscription-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.subscription-footer small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.subscription-footer strong {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  white-space: nowrap;
}

.subscription-card:not(.is-current) .subscription-footer strong {
  color: var(--green);
  background: #fff;
  border: 1px solid rgba(var(--green-rgb), .22);
}

.subscription-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.subscription-actions span {
  color: var(--muted);
}

.subscription-current small {
  color: var(--muted);
  line-height: 1.35;
}

.license-message {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.inline-actions .button {
  min-height: 42px;
  padding: 10px 14px;
}

.editor-body {
  min-height: 100vh;
  margin: 0;
  background: #f3f4ef;
  color: var(--ink);
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.editor-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #101c18;
  color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.editor-brand {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-brand span {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--copper);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.editor-brand strong {
  font-size: 1.05rem;
}

.editor-sidebar nav {
  display: grid;
  gap: 8px;
}

.editor-sidebar nav a,
.editor-logout {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  padding: 13px 14px;
  border-radius: var(--radius);
  font-weight: 750;
}

.editor-sidebar nav a:hover,
.editor-sidebar nav a.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.editor-logout {
  margin-top: auto;
}

.editor-main {
  padding: 34px;
  min-width: 0;
}

.editor-topbar,
.editor-hero,
.editor-card,
.editor-kpis article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px;
  margin-bottom: 22px;
}

.editor-topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.editor-user {
  background: #eef4ed;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
}

.editor-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 30px;
  margin-bottom: 18px;
}

.editor-hero h2 {
  max-width: 760px;
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.editor-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.editor-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.editor-kpis article {
  padding: 22px;
  display: grid;
  gap: 12px;
}

.editor-kpis span,
.editor-client-row small {
  color: var(--muted);
}

.editor-kpis strong {
  font-size: 2.2rem;
}

.editor-card {
  padding: 24px;
  margin-bottom: 18px;
}

.editor-client-list {
  display: grid;
  gap: 10px;
}

.editor-client-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 160px;
  gap: 16px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.editor-client-row:hover {
  border-color: rgba(var(--green-rgb), 0.35);
  background: rgba(var(--green-rgb), 0.04);
}

.editor-client-row span:first-child {
  display: grid;
  gap: 4px;
}

.editor-client-row em {
  justify-self: start;
  font-style: normal;
  border-radius: 999px;
  background: #eef4ed;
  padding: 7px 10px;
  font-weight: 800;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.editor-filter {
  margin: 18px 0;
}

.license-key-box {
  display: block;
  padding: 14px;
  border-radius: var(--radius);
  background: #101c18;
  color: #fff;
  overflow-wrap: anywhere;
}

.license-details {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.license-details dt {
  color: var(--muted);
}

.license-details dd {
  margin: 0;
  font-weight: 800;
}

.deployment-hero {
  margin-bottom: 18px;
}

.deployment-form {
  margin-bottom: 18px;
}

.deployment-token {
  display: block;
  margin-top: 6px;
  max-width: 260px;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.deploy-log {
  white-space: pre-wrap;
  margin: 0;
  font: 0.92rem/1.45 Consolas, Monaco, monospace;
}

.deploy-console {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 0%, rgba(70, 113, 88, 0.28), transparent 28%),
    linear-gradient(145deg, #07110d, #101613 62%, #050706);
  color: #eef7f1;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.deploy-console-result {
  margin-bottom: 18px;
}

.deploy-console-result.is-failed {
  border-color: rgba(210, 77, 67, 0.55);
}

.deploy-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.deploy-console-kicker {
  display: block;
  margin-bottom: 4px;
  color: #82d19f;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deploy-console-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.deploy-console-status {
  min-width: 48px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(46, 139, 87, 0.22);
  color: #9cf2bf;
  font-weight: 900;
  text-align: center;
}

.deploy-console-result.is-failed .deploy-console-status {
  background: rgba(210, 77, 67, 0.20);
  color: #ffb7ae;
}

.deploy-console-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  min-height: 320px;
}

.deploy-step-list {
  border-right: 1px solid rgba(255, 255, 255, 0.10);
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.deploy-step {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 11px 12px;
  color: rgba(238, 247, 241, 0.72);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 750;
}

.deploy-step-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  flex: 0 0 auto;
}

.deploy-step.is-ok {
  color: #dfffea;
  background: rgba(46, 139, 87, 0.18);
}

.deploy-step.is-ok .deploy-step-dot {
  border-color: #7ee0a0;
  background: #2fc16b;
  box-shadow: 0 0 0 4px rgba(47, 193, 107, 0.14);
}

.deploy-step.is-ko {
  color: #ffe1dc;
  background: rgba(210, 77, 67, 0.18);
}

.deploy-step.is-ko .deploy-step-dot {
  border-color: #ff9c91;
  background: #d24d43;
  box-shadow: 0 0 0 4px rgba(210, 77, 67, 0.14);
}

.deploy-step.is-running .deploy-step-dot {
  border-color: #d5aa63;
  border-top-color: transparent;
  animation: deploy-spin 0.9s linear infinite;
}

.deploy-step.is-pending {
  opacity: 0.62;
}

.deploy-terminal {
  margin: 0;
  padding: 18px 20px 22px;
  min-height: 320px;
  max-height: 520px;
  overflow: auto;
  color: #d8f8dc;
  background: rgba(0, 0, 0, 0.34);
  white-space: pre-wrap;
  font: 0.9rem/1.55 Consolas, Monaco, "Courier New", monospace;
}

.deploy-console-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(2, 7, 5, 0.74);
  backdrop-filter: blur(7px);
}

.deploy-console-overlay.is-visible {
  display: flex;
}

.deploy-console-live {
  width: min(1040px, 100%);
  animation: deploy-console-in 0.22s ease-out both;
}

.deploy-live-loader {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.24);
  border-top-color: #86d99f;
  animation: deploy-spin 0.8s linear infinite;
}

@keyframes deploy-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes deploy-console-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.deployment-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.deployment-flow article {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #fbfcf9;
  display: grid;
  gap: 10px;
}

.deployment-flow article:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -12px;
  width: 12px;
  height: 1px;
  background: rgba(var(--green-rgb), 0.42);
}

.deployment-flow strong {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
}

.deployment-flow span {
  color: var(--muted);
  line-height: 1.35;
}

@media (max-width: 900px) {
  .editor-body,
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .editor-sidebar {
    position: static;
    height: auto;
  }

  .editor-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-hero,
  .editor-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .deployment-flow {
    grid-template-columns: 1fr;
  }

  .deployment-flow article::after {
    display: none;
  }

  .deploy-console-grid {
    grid-template-columns: 1fr;
  }

  .deploy-step-list {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  }
}

.range-setting {
  display: grid;
  gap: 8px;
}

.range-setting input[type="range"] {
  width: 100%;
}

.range-setting small,
.small-muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-builder-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.site-builder-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.site-builder-card.is-dragging {
  border-color: rgba(var(--green-rgb), 0.42);
  box-shadow: var(--shadow);
  transform: scale(0.99);
}

.site-builder-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-builder-card-head .check-row {
  flex: 1 1 auto;
  margin: 0;
}

.drag-handle {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--white);
  cursor: grab;
  font-weight: 900;
  letter-spacing: 1px;
}

.site-builder-add {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  color: var(--ink);
  font-weight: 700;
}

.media-setting-row {
  display: grid;
  grid-template-columns: 92px minmax(180px, 1fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.media-setting-row + .media-setting-row {
  margin-top: 10px;
}

.media-setting-row img {
  width: 92px;
  aspect-ratio: 1.25;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--green-2);
}

.onboarding-list {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.help-actions {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(220px, 1fr) minmax(170px, 0.75fr);
  gap: 12px;
  align-items: stretch;
  max-width: 920px;
  margin: 18px 0 22px;
}

.help-actions .button {
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin: 0;
  text-align: center;
}

.onboarding-list li {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.onboarding-list span {
  color: var(--muted);
}

.table-actions {
  white-space: nowrap;
}

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

.project-grid-filtered .project-card {
  animation: projectCardIn 260ms ease both;
}

.project-grid-filtered .project-card:nth-child(2) { animation-delay: 35ms; }
.project-grid-filtered .project-card:nth-child(3) { animation-delay: 70ms; }
.project-grid-filtered .project-card:nth-child(4) { animation-delay: 105ms; }
.project-grid-filtered .project-card:nth-child(5) { animation-delay: 140ms; }
.project-grid-filtered .project-card:nth-child(n + 6) { animation-delay: 175ms; }

.project-grid-filtered.is-filtering {
  opacity: .72;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

@keyframes projectCardIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.project-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.project-card h3 {
  margin-bottom: 0;
}

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

.project-card-head,
.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.project-meta strong {
  color: var(--ink);
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--green-2);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--copper));
}

.progress-track.big {
  height: 12px;
  margin: 18px 0;
}

.project-task-panel {
  width: 100%;
  max-width: none;
}

.planning-card {
  width: 100%;
  max-width: none;
}

.planning-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
  margin: 18px 0 20px;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcf8;
}

.segmented-control label {
  min-width: 0;
}

.segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: flex;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.segmented-control .active span,
.segmented-control input:checked + span {
  color: #fff;
  background: var(--green);
}

.planning-project-select {
  flex: 1 1 320px;
  max-width: 520px;
  position: relative;
  display: grid;
  gap: 6px;
}

.planning-project-select > span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.planning-project-select.disabled {
  opacity: 0.55;
}

.multi-select {
  position: relative;
}

.multi-select-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 12px 44px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.multi-select-toggle::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
}

.multi-select.disabled .multi-select-toggle {
  cursor: not-allowed;
}

.multi-select-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  display: none;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.multi-select.open .multi-select-panel {
  display: block;
}

.multi-select-search {
  width: 100%;
  margin-bottom: 8px;
}

.multi-select-options {
  display: grid;
  gap: 6px;
  max-height: 250px;
  overflow: auto;
  padding-right: 4px;
}

.multi-select-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.multi-select-option[hidden] {
  display: none;
}

.multi-select-option:hover,
.multi-select-option:has(input:checked) {
  border-color: rgba(73, 107, 90, 0.18);
  background: #f5f8f3;
}

.multi-select-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.multi-select-option span,
.multi-select-option strong,
.multi-select-option small {
  display: block;
  min-width: 0;
}

.multi-select-option strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-select-option small {
  color: var(--muted);
}

.multi-select-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.task-form,
.task-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(120px, 0.7fr));
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.project-task-panel .task-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.project-task-panel .task-form label,
.project-task-panel .task-row label {
  min-width: 0;
}

.project-task-panel .task-form label:nth-of-type(1) {
  grid-column: 1 / -1;
}

.project-task-panel .task-form label:nth-of-type(2),
.project-task-panel .task-form label:nth-of-type(3),
.project-task-panel .task-form label:nth-of-type(4),
.project-task-panel .task-form label:nth-of-type(5) {
  grid-column: auto;
}

.project-task-panel .task-form .task-description {
  grid-column: 1 / 4;
}

.project-task-panel .task-form > button {
  grid-column: 4 / 5;
  align-self: end;
  min-width: 0;
  white-space: normal;
}

.project-task-panel .task-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.project-task-panel .task-row label:nth-of-type(1) {
  grid-column: 1 / -1;
}

.project-task-panel .task-row label:nth-of-type(2),
.project-task-panel .task-row label:nth-of-type(3),
.project-task-panel .task-row label:nth-of-type(4),
.project-task-panel .task-row label:nth-of-type(5) {
  grid-column: auto;
}

.project-task-panel .task-row .task-description,
.project-task-panel .task-row .task-progress,
.project-task-panel .task-row .task-actions {
  grid-column: 1 / -1;
}

.task-form {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.task-description {
  grid-column: 1 / -2;
}

.task-list {
  display: grid;
  gap: 12px;
}

.task-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.task-progress {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.task-progress span {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--green-2);
}

.task-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.task-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gantt-wrap {
  --gantt-label-width: clamp(220px, 20vw, 300px);
  display: grid;
  grid-template-columns: var(--gantt-label-width) minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  overflow: hidden;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.gantt-label-column {
  position: relative;
  z-index: 2;
  min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--white);
  box-shadow: 10px 0 18px rgba(17, 28, 24, 0.06);
}

.gantt-timeline-scroll {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fbfcf8;
}

.gantt-timeline {
  width: max(100%, var(--timeline-width));
  min-width: var(--timeline-width);
}

.gantt-label {
  display: grid;
  align-content: center;
  min-height: 84px;
  contain: paint;
  min-width: 0;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.gantt-label-head {
  min-height: 56px;
  border-top: 0;
  color: var(--muted);
  background: #f5f8f3;
  font-size: 0.82rem;
  font-weight: 700;
}

.gantt-label[title] {
  cursor: help;
}

.gantt-label strong,
.gantt-label span,
.gantt-label small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-label small {
  color: var(--muted);
}

.gantt-scale {
  display: grid;
  grid-template-columns: repeat(var(--days), minmax(0, 1fr));
  width: 100%;
  min-width: var(--timeline-width);
  min-height: 56px;
  background-color: #f5f8f3;
}

.gantt-scale span {
  display: flex;
  align-items: center;
  padding-left: 8px;
  color: var(--ink);
  font-weight: 800;
}

.task-gantt-label {
  padding-left: 28px;
  background: #fbfcf8;
}

.gantt-lane {
  position: relative;
  width: 100%;
  min-width: var(--timeline-width);
  min-height: 84px;
  border-top: 1px solid var(--line);
  background-color: #fbfcf8;
  background-image:
    repeating-linear-gradient(90deg, transparent 0, transparent calc((100% / var(--days)) - 1px), rgba(223, 232, 221, 0.7) calc((100% / var(--days)) - 1px), rgba(223, 232, 221, 0.7) calc(100% / var(--days)));
}

.gantt-bar {
  position: absolute;
  left: var(--left);
  top: 15px;
  width: var(--width);
  height: 24px;
  overflow: visible;
  border-radius: 999px;
  background: rgba(73, 107, 90, 0.2);
  box-shadow: inset 0 0 0 1px rgba(73, 107, 90, 0.2);
  cursor: help;
  touch-action: none;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.gantt-bar i {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.gantt-bar:hover {
  z-index: 4;
}

.task-bar {
  cursor: grab;
}

.task-bar.status-disabled {
  opacity: 0.36;
  filter: grayscale(1);
}

.task-bar.is-editing {
  z-index: 6;
  cursor: grabbing;
  box-shadow: 0 8px 18px rgba(17, 28, 24, 0.2), inset 0 0 0 1px rgba(73, 107, 90, 0.28);
}

.task-bar.is-saved {
  animation: liveRowPulse 1.2s ease;
}

.gantt-handle {
  position: absolute;
  top: 3px;
  z-index: 2;
  width: 12px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  opacity: 0;
  transition: opacity 0.16s ease;
}

.gantt-handle.left {
  left: 4px;
  cursor: ew-resize;
}

.gantt-handle.right {
  right: 4px;
  cursor: ew-resize;
}

.task-bar:hover .gantt-handle,
.task-bar.is-editing .gantt-handle {
  opacity: 1;
}

.gantt-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2000;
  width: max-content;
  max-width: min(340px, calc(100vw - 28px));
  padding: 10px 12px;
  border: 1px solid rgba(73, 107, 90, 0.22);
  border-radius: 8px;
  color: var(--ink);
  background: #fffdf8;
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  white-space: pre-line;
}

.gantt-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.context-menu {
  position: fixed;
  z-index: 90;
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.context-menu.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.context-menu button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.context-menu button:hover {
  background: var(--soft);
}

.context-menu button.danger {
  color: var(--danger);
}

.gantt-tooltip.is-live {
  border-color: rgba(181, 121, 60, 0.42);
  background: #fff5e6;
}

.project-bar {
  height: 28px;
  top: 13px;
  background: rgba(181, 121, 60, 0.2);
}

.project-bar i {
  background: var(--copper);
}

.status-blocked i,
.status-cancelled i {
  background: var(--danger);
}

.status-done i,
.status-completed i {
  background: var(--success);
}

.payment-panel {
  width: 100%;
}

.payment-summary {
  display: grid;
  gap: 3px;
  min-width: 190px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.payment-summary span {
  color: var(--muted);
  font-size: 0.9rem;
}

.payment-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(140px, 0.8fr) minmax(150px, 0.9fr) minmax(180px, 1.2fr) auto;
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.payment-form label {
  min-width: 0;
}

.payment-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.payment-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.payment-list small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
  min-height: 0;
}

.delivery-panel {
  width: 100%;
}

.document-chat-panel {
  width: 100%;
}

.chat-thread {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.public-chat-panel .chat-thread,
.document-chat-panel .chat-thread,
.conversation-detail .chat-thread {
  min-height: 210px;
  border-bottom: 0;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.chat-message {
  position: relative;
  display: grid;
  gap: 6px;
  max-width: min(78%, 720px);
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.chat-message.from-admin {
  justify-self: end;
  border-color: rgba(var(--green-rgb), 0.24);
  color: var(--white);
  background: var(--green);
  border-bottom-right-radius: 4px;
}

.chat-message.from-client {
  justify-self: start;
  border-bottom-left-radius: 4px;
}

.chat-message::before {
  content: "";
  position: absolute;
  bottom: 10px;
  width: 14px;
  height: 14px;
  border: inherit;
  background: inherit;
  transform: rotate(45deg);
}

.chat-message.from-client::before {
  left: -7px;
  border-top: 0;
  border-right: 0;
}

.chat-message.from-admin::before {
  right: -7px;
  border-left: 0;
  border-bottom: 0;
}

.chat-message div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.chat-message small {
  color: var(--muted);
  font-size: 0.78rem;
}

.chat-message.from-admin small {
  color: rgba(255, 255, 255, 0.72);
}

.chat-message p {
  position: relative;
  z-index: 1;
  margin: 0;
  white-space: pre-wrap;
}

.message-receipt {
  position: relative;
  z-index: 1;
  justify-self: end;
  font-size: 0.74rem !important;
}

.chat-message.from-client .message-receipt {
  color: var(--muted);
}

.message-email-warning {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(var(--copper-rgb), 0.24);
  border-radius: 10px;
  color: var(--copper) !important;
  background: rgba(var(--copper-rgb), 0.10);
  font-size: 0.78rem !important;
  line-height: 1.35;
}

.message-email-warning span {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: var(--white);
  background: var(--copper);
  font-size: 0.78rem;
  font-weight: 900;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.chat-composer {
  margin-top: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: #fbfcf8;
}

.chat-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px 40px;
  gap: 8px;
  align-items: end;
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.chat-input-wrap:focus-within {
  border-color: rgba(var(--green-rgb), 0.55);
  box-shadow: 0 0 0 4px rgba(var(--green-rgb), 0.1);
}

.chat-input-wrap textarea {
  width: 100%;
  min-height: 24px;
  max-height: 130px;
  padding: 8px 6px;
  border: 0;
  outline: 0;
  resize: none;
  overflow-y: auto;
  background: transparent;
  font: inherit;
  line-height: 1.45;
}

.chat-composer.is-expanded .chat-input-wrap {
  align-items: end;
}

.chat-file-button,
.chat-send-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--green-2);
  color: var(--green);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.chat-file-button:hover,
.chat-send-button:hover {
  transform: translateY(-1px);
}

.chat-send-button:disabled {
  cursor: progress;
  opacity: 0.65;
  transform: none;
}

.chat-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.chat-send-button {
  border-color: var(--green);
  color: var(--white);
  background: var(--green);
}

.chat-send-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.chat-file-name,
.chat-typing {
  display: block;
  margin-top: 6px;
}

.chat-attachment {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--green-rgb), 0.18);
  border-radius: 8px;
  color: inherit;
  background: rgba(255, 255, 255, 0.18);
  text-decoration: none;
}

.chat-message.from-client .chat-attachment {
  background: var(--green-2);
}

.chat-attachment span,
.chat-attachment small {
  font-size: 0.76rem;
}

.discussions-page {
  width: min(100%, 1240px);
}

.discussions-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.38fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.conversation-list-panel,
.conversation-detail,
.conversation-empty {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.conversation-list-panel {
  overflow: hidden;
}

.conversation-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.conversation-list-head small,
.conversation-title em {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--white);
  background: var(--copper);
  font-style: normal;
  font-weight: 800;
}

.conversation-list {
  display: grid;
  max-height: 640px;
  overflow: auto;
}

.conversation-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.conversation-row:hover,
.conversation-row.is-active {
  background: var(--white);
}

.conversation-row.is-active {
  box-shadow: inset 4px 0 0 var(--green);
}

.conversation-row.is-unread {
  background: #fffaf1;
}

.conversation-row.is-unread .conversation-excerpt {
  color: var(--ink);
  font-weight: 700;
}

.conversation-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--green);
  font-weight: 800;
}

.conversation-main,
.conversation-title,
.conversation-meta,
.conversation-excerpt,
.conversation-row small {
  min-width: 0;
}

.conversation-main {
  display: grid;
  gap: 4px;
}

.conversation-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.conversation-meta,
.conversation-excerpt,
.conversation-row small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-meta span {
  margin-left: 8px;
}

.conversation-detail,
.conversation-empty {
  padding: 16px;
}

.conversation-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.conversation-detail-head h3 {
  margin: 9px 0 4px;
}

.conversation-detail-head p {
  margin: 0;
  color: var(--muted);
}

.conversation-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.conversation-thread {
  max-height: 520px;
}

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

.conversation-empty {
  min-height: 320px;
  display: grid;
  place-content: center;
  text-align: center;
}

.share-link-box {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.share-link-box span,
.delivery-row small {
  color: var(--muted);
}

.share-link-box a {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--green);
  font-weight: 700;
}

.delivery-list {
  display: grid;
  gap: 10px;
}

.delivery-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.delivery-row strong,
.delivery-row small {
  display: block;
}

.delivery-status {
  display: grid;
  justify-items: end;
  gap: 4px;
}

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

.signature-log {
  margin-top: 16px;
}

.autosave-indicator {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.25;
}

.document-timeline-panel {
  width: 100%;
}

.timeline-list {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.timeline-item > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--green);
  font-weight: 800;
}

.timeline-item p {
  margin: 4px 0;
  color: var(--muted);
}

.timeline-item small {
  color: var(--muted);
}

.public-document {
  width: min(1120px, calc(100% - 28px));
  margin: 24px auto;
}

.public-document-frame {
  width: 100%;
  min-height: 900px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.public-sign-card h1 {
  margin-bottom: 0;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.notification-row.is-unread {
  border-color: rgba(181, 121, 60, 0.45);
  background: #fffaf1;
  box-shadow: inset 4px 0 0 var(--copper);
}

.notification-row.is-read {
  opacity: 0.72;
  background: #f5f7f2;
}

.notification-row.is-read .notification-icon {
  background: var(--muted);
}

.notification-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--green);
  font-weight: 800;
}

.notification-row p {
  margin: 4px 0;
  color: var(--muted);
}

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

.notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.signature-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.signature-pane {
  display: grid;
  gap: 10px;
}

.signature-pane.is-hidden {
  display: none;
}

.signature-canvas {
  width: 100%;
  min-height: 180px;
  border: 1px dashed var(--green);
  border-radius: var(--radius);
  background: #fff;
  touch-action: none;
}

.button-row.compact {
  margin-top: 0;
}

.document-preview {
  overflow: hidden;
  padding: 0;
}

.document-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f8faf6;
}

.print-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--deep), var(--green));
}

.print-nav > span {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.print-brand small {
  color: rgba(255, 255, 255, 0.68);
}

.print-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px 16px;
}

.print-head h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
}

.print-head span,
.print-client span,
.print-lines small {
  display: block;
  color: var(--muted);
}

.document-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 18px;
  padding: 22px 24px 8px;
}

.company-block {
  display: grid;
  gap: 3px;
  color: var(--muted);
}

.company-block strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.company-block span {
  display: block;
}

.issued-block {
  align-self: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.issued-block span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.issued-block strong {
  display: block;
  margin-top: 4px;
}

.print-client {
  display: grid;
  gap: 3px;
  margin: 0 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.preview-table-wrap {
  margin: 0 clamp(14px, 3vw, 24px);
  padding: 16px 0;
  overflow-x: auto;
}

.preview-table {
  min-width: 620px;
  font-size: 0.9rem;
  border: 1px solid var(--line);
}

.preview-table th {
  background: var(--deep);
  color: var(--white);
  border-bottom: 0;
}

.preview-table th,
.preview-table td {
  padding: 10px 8px;
  border-right: 1px solid var(--line);
}

.preview-table th:last-child,
.preview-table td:last-child {
  border-right: 0;
}

.preview-table td:nth-child(3),
.preview-table td:nth-child(4),
.preview-table td:nth-child(5) {
  white-space: nowrap;
}

.preview-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.preview-section-row td {
  color: var(--white);
  background: var(--green);
  font-weight: 700;
  text-transform: uppercase;
}

.preview-subsection-row td {
  color: var(--ink);
  background: var(--green-2);
  font-weight: 700;
}

.preview-subtotal-row td {
  background: #f4efe6;
  font-weight: 700;
}

.preview-subtotal-row td:nth-child(4) {
  color: var(--copper);
  text-transform: uppercase;
}

.document-preview .detail-list {
  margin: 0 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.print-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 24px 20px;
  padding: 11px 14px;
  border-radius: var(--radius);
  color: var(--ink);
  background: #f4efe6;
  border: 1px solid rgba(181, 121, 60, 0.35);
}

.print-total span {
  font-weight: 700;
  text-transform: uppercase;
}

.print-total strong {
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  line-height: 1;
}

.print-notes {
  margin: 0 24px 24px;
  padding: 16px;
  border-left: 4px solid var(--green);
  background: #f4f6f1;
}

.print-notes p {
  margin: 6px 0 0;
  color: var(--muted);
}

.company-preview {
  color: var(--muted);
}

.company-preview h2 {
  color: var(--ink);
}

.signature-admin-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.signature-admin-preview span {
  color: var(--muted);
  font-size: 0.88rem;
}

.signature-admin-preview img,
.company-stamp-preview {
  max-width: 220px;
  max-height: 100px;
  object-fit: contain;
}

@media (max-width: 1360px) {
  .document-layout {
    display: flex;
    flex-direction: column;
  }

  .document-preview {
    order: 2;
    width: 100%;
    position: static;
  }

  .document-form {
    order: 1;
  }
}

@media (max-width: 1120px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-insights {
    grid-template-columns: 1fr;
  }

  .dashboard-wide-chart {
    grid-column: 1 / -1;
  }

  .project-grid,
  .chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-form,
  .task-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-section-grid,
  .subscription-grid,
  .media-setting-row {
    grid-template-columns: 1fr;
  }

  .list-toolbar,
  .project-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .list-search {
    grid-column: 1 / -1;
  }

  .list-toolbar-actions {
    justify-content: flex-start;
  }

  .subscription-hero {
    flex-direction: column;
  }

  .subscription-current {
    width: 100%;
  }

  .subscription-card {
    min-height: auto;
  }

  .task-description {
    grid-column: 1 / -1;
  }

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

@media (max-width: 980px) {
  .compact-section,
  .quote-request,
  .quote-form-card,
  .parallax-showcase,
  .dashboard-grid,
  .project-page-layout,
  .editor-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .document-layout {
    display: flex;
    flex-direction: column;
  }

  .invoice-workflow,
  .quote-search,
  .payment-form {
    grid-template-columns: 1fr;
  }

  .document-preview {
    order: 2;
    width: 100%;
  }

  .document-form {
    order: 1;
  }

  .parallax-showcase {
    grid-template-rows: none;
    gap: 18px;
  }

  .parallax-card.is-large {
    grid-row: auto;
  }

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

  .workflow-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-chart-grid {
    grid-template-columns: 1fr;
  }

  .finance-chart,
  .status-donut-card {
    grid-template-columns: 1fr;
  }

  .radial-gauge,
  .status-donut {
    justify-self: center;
  }

  .side-panel,
  .document-preview {
    position: static;
  }

  .workflow-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .workflow-node,
  .workflow-node-start,
  .workflow-node-send,
  .workflow-node-decision,
  .workflow-node-wait,
  .workflow-node-reminder,
  .workflow-node-success,
  .workflow-node-end {
    grid-column: auto;
    grid-row: auto;
  }

  .workflow-node::before,
  .workflow-node::after {
    display: none;
  }
}

@media (max-width: 760px) {
  .help-actions {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .site-header {
    position: fixed;
  }

  .menu-toggle {
    display: grid;
  }

  .main-nav {
    position: fixed;
    top: 78px;
    left: 14px;
    right: 14px;
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--site-nav-text) 16%, transparent);
    border-radius: var(--radius);
    background: var(--site-nav-bg);
    box-shadow: var(--shadow);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    padding: 12px;
    border-radius: var(--radius);
  }

  .main-nav a:hover {
    background: color-mix(in srgb, var(--site-nav-text) 10%, transparent);
  }

  .hero {
    min-height: 78vh;
  }

  .hero-panel {
    padding-top: 104px;
    padding-bottom: 42px;
  }

  .hero h1 {
    font-size: 2.7rem;
  }

  .quick-proof,
  .service-list,
  .form-grid,
  .color-setting-grid,
  .parallax-showcase,
  .document-identity,
  .stats-grid,
  .chart-grid,
  .project-grid,
  .list-toolbar,
  .project-filter-bar {
    grid-template-columns: 1fr;
  }

  .list-toolbar-actions,
  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .list-toolbar-actions .button,
  .pagination-bar > div,
  .pagination-link {
    width: 100%;
  }

  .kpi-grid,
  .dashboard-insights,
  .dashboard-chart-grid,
  .workflow-kpis {
    grid-template-columns: 1fr;
  }

  .workflow-hero,
  .workflow-email-list article,
  .workflow-card-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .workflow-steps {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .workflow-steps li {
    grid-template-columns: 18px 1fr;
    align-items: start;
  }

  .workflow-steps li:not(:last-child)::after {
    top: 18px;
    bottom: -10px;
    left: 7px;
    width: 2px;
    height: auto;
    right: auto;
  }

  .workflow-email-status {
    justify-items: start;
    min-width: 0;
    text-align: left;
  }

  .month-chart {
    gap: 5px;
    min-height: 150px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .month-bar {
    min-width: 34px;
  }

  .funnel-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .funnel-row i {
    max-width: 100%;
  }

  .document-line {
    grid-template-columns: 1fr;
    grid-template-areas:
      "type"
      "title"
      "qty"
      "price"
      "tva"
      "remove"
      "description";
  }

  .document-line[data-type="section"],
  .document-line[data-type="subsection"] {
    grid-template-areas:
      "type"
      "title"
      "remove"
      "description";
  }

  .document-line .icon-button {
    justify-self: stretch;
    width: 100%;
  }

  .line-actions {
    grid-template-columns: 1fr;
  }

  .parallax-showcase {
    padding: 28px 18px;
  }

  .parallax-card,
  .parallax-card.is-large {
    min-height: 300px;
  }

  .quote-request {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .request-copy h2 {
    margin-bottom: 14px;
  }

  .document-actions {
    grid-template-columns: 1fr 1fr;
  }

  .source-list a,
  .delivery-row,
  .notification-row,
  .payment-list > div,
  .discussions-layout,
  .chat-form,
  .public-chat-panel .chat-form,
  .conversation-chat-form,
  .task-form,
  .task-row {
    grid-template-columns: 1fr;
  }

  .conversation-detail-head,
  .conversation-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .conversation-list {
    max-height: 380px;
  }

  .conversation-thread {
    max-height: 430px;
  }

  .delivery-status {
    justify-items: start;
  }

  .notification-actions {
    justify-content: stretch;
  }

  .source-list a {
    display: grid;
  }

  .payment-summary,
  .payment-form .button {
    width: 100%;
  }

  .preview-table-wrap {
    margin: 0 12px;
  }

  .contact-band,
  .site-footer,
  .admin-topbar,
  .card-head,
  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-actions {
    text-align: left;
  }

  .notification-menu {
    left: auto;
    right: 0;
  }

  .button {
    width: 100%;
  }

  .admin-body {
    display: block;
  }

  .admin-menu-toggle {
    display: grid;
  }

  .brand-collapse-toggle {
    pointer-events: none;
  }

  .admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(310px, 86vw);
    height: 100dvh;
    overflow: hidden;
    transform: translateX(-105%);
    transition: transform 200ms ease;
    box-shadow: var(--shadow);
  }

  .admin-sidebar-collapsed-ready .admin-sidebar,
  .admin-body.is-sidebar-collapsed .admin-sidebar {
    width: min(310px, 86vw);
    gap: 26px;
    padding: 20px;
    align-items: stretch;
  }

  .admin-sidebar-collapsed-ready .brand-text,
  .admin-sidebar-collapsed-ready .nav-label,
  .admin-sidebar-collapsed-ready .nav-group summary,
  .admin-body.is-sidebar-collapsed .brand-text,
  .admin-body.is-sidebar-collapsed .nav-label,
  .admin-body.is-sidebar-collapsed .nav-group summary {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .admin-sidebar-collapsed-ready .admin-nav a,
  .admin-sidebar-collapsed-ready .logout-link,
  .admin-body.is-sidebar-collapsed .admin-nav a,
  .admin-body.is-sidebar-collapsed .logout-link {
    justify-content: flex-start;
    width: 100%;
    height: auto;
    padding: 11px 12px;
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .admin-main {
    grid-column: auto;
    padding: 72px 18px 18px;
  }
}

@media (max-width: 920px) {
  .project-task-panel .task-form,
  .project-task-panel .task-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-task-panel .task-form label:nth-of-type(1),
  .project-task-panel .task-row label:nth-of-type(1),
  .project-task-panel .task-form .task-description,
  .project-task-panel .task-row .task-description,
  .project-task-panel .task-form > button,
  .project-task-panel .task-row .task-progress,
  .project-task-panel .task-row .task-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .project-task-panel .task-form,
  .project-task-panel .task-row {
    grid-template-columns: 1fr;
  }
}

@media print {
  .admin-sidebar,
  .admin-topbar,
  .document-form,
  .button-row,
  .no-print {
    display: none !important;
  }

  .admin-body,
  .admin-main,
  .document-layout {
    display: block;
    padding: 0;
    background: #fff;
  }

  .document-preview {
    position: static;
    box-shadow: none;
    border: 0;
    overflow: visible;
  }

  .print-nav,
  .print-total {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
