:root {
  --ink: #111114;
  --muted: #77777d;
  --line: #e7e7ea;
  --paper: #f5f5f7;
  --panel: #ffffff;
  --accent: #fa233b;
  --accent-dark: #d4142b;
  --paid: #118959;
  --paid-soft: #eaf6f2;
  --warn: #a86614;
  --danger: #b42318;
  --soft: #f2f2f5;
  --ready-header-offset: 84px;
  --ready-tabs-height: 58px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
a.primary-button,
a.secondary-button,
.partner-product-card,
.card,
.order-card,
.subtab,
.tab,
.icon-action,
.icon-button,
input,
select,
textarea {
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background-color 0.16s ease,
    color 0.16s ease,
    opacity 0.16s ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(250, 35, 59, 0.2);
  outline-offset: 2px;
}

button.is-responding,
a.is-responding,
select.is-responding,
input.is-responding,
textarea.is-responding {
  transform: scale(0.985);
}

button:disabled,
select:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-view.partner-area-mode {
  width: 100%;
  max-width: 1240px;
  grid-template-columns: minmax(0, 760px) minmax(340px, 420px);
  align-items: start;
  justify-content: center;
  gap: 20px;
  place-items: start stretch;
  margin: 0 auto;
}

.login-view.customer-project-mode {
  place-items: start center;
  padding: 22px clamp(14px, 2vw, 32px);
  background: #fff;
}

.customer-project-public-header {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  width: 100%;
  padding: 2px 0 8px;
}

.customer-project-header-logo {
  grid-column: 1;
  display: inline-flex;
  justify-self: center;
  border-radius: 0;
  background: #fff;
  text-decoration: none;
}

.customer-project-header-logo img {
  display: block;
  width: min(330px, 68vw);
  max-height: 112px;
  object-fit: contain;
  background: #fff;
}

.customer-project-gate-card {
  align-self: start;
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 28px;
  background: var(--panel);
  padding: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.08);
}

.login-panel.customer-project-panel {
  width: min(100%, calc(100vw - 28px));
  max-width: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.login-view.customer-project-mode .customer-project-panel {
  width: min(100%, 1760px);
}

.login-view.customer-project-mode .customer-project-shell {
  grid-template-columns: minmax(360px, 460px) minmax(0, 1fr);
}

.login-view.customer-project-mode .customer-catalog-list {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}

.login-panel .secondary-button {
  width: 100%;
}

.partner-signup-panel {
  width: min(980px, 100%);
}

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

.minimal-button {
  justify-self: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  min-height: 40px;
  cursor: pointer;
  padding: 6px 10px;
}

.minimal-button:hover {
  color: var(--ink);
}

.minimal-link {
  justify-self: center;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
  padding: 4px 10px;
}

.minimal-link:hover {
  color: var(--ink);
}

.subtle-login-link {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.78;
  padding: 0 8px;
}

.join-delpiano-button {
  width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(20, 20, 24, 0.08);
  border-radius: 999px;
  background: #f1f2f4;
  color: #1f2024;
  font: inherit;
  font-weight: normal;
  text-decoration: none;
  opacity: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  padding: 0 16px;
}

.join-delpiano-button:hover {
  background: #e8e9ed;
  color: var(--ink);
}

.link-account-button {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 2px 10px;
  border-radius: 999px;
  color: #8a8b91;
  text-decoration: none;
  font-size: 12px;
  font-weight: 750;
}

.link-account-button:hover {
  color: var(--ink);
  background: #f3f3f5;
}

.link-account-button svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.3;
}

.login-shop-link {
  justify-self: center;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  padding: 0 14px;
}

.login-shop-link:hover {
  background: #f1f2f4;
  color: var(--ink);
}

.login-shop-link svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.partner-area-panel {
  width: min(480px, 100%);
}

.partner-area-mode .partner-signup-panel,
.partner-area-mode .partner-area-panel {
  width: 100%;
}

.partner-area-mode .partner-signup-panel {
  order: 1;
  padding: 42px;
  border-radius: 34px;
}

.partner-area-mode .partner-area-panel {
  order: 2;
  gap: 18px;
  padding: 28px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(18px);
}

.partner-signup-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  margin: -12px 0 4px;
  padding: 4px;
  border: 1px solid rgba(20, 20, 24, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(22px);
}

.partner-back-icon,
.partner-shop-link {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}

.partner-back-icon {
  width: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 38px;
}

.partner-shop-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.partner-back-icon:hover,
.partner-shop-link:hover {
  background: #f1f2f4;
  color: var(--ink);
}

.partner-back-icon svg,
.partner-shop-link svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.partner-area-mode .partner-signup-panel .login-logo {
  width: min(330px, 72%);
  justify-self: center;
  margin-bottom: 10px;
}

.partner-area-mode .partner-area-panel .login-logo {
  display: none;
}

.partner-area-heading {
  display: grid;
  gap: 8px;
  text-align: center;
}

.partner-area-heading strong {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.05;
}

.partner-area-heading span {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.partner-area-panel .partner-area-heading {
  text-align: left;
}

.partner-area-panel .partner-area-heading strong {
  font-size: 24px;
  letter-spacing: 0;
}

.partner-area-panel .partner-area-heading span {
  max-width: 32ch;
}

.signup-panel-heading {
  margin-bottom: 2px;
}

.tracking-box {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f7f7f9;
  padding: 16px;
}

.contact-link-box {
  background: rgba(247, 247, 249, 0.72);
  border-color: rgba(0, 0, 0, 0.06);
}

.partner-area-panel .contact-link-box {
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px;
  background: linear-gradient(180deg, #fbfbfc, #f4f4f6);
}

.partner-area-panel .contact-link-box > strong {
  display: none;
}

.compact-phone {
  padding: 0;
  border: 0;
  background: transparent;
}

.partner-area-panel .compact-phone {
  grid-template-columns: 1fr;
  gap: 12px;
}

.partner-area-panel .phone-capture select,
.partner-area-panel .phone-capture input,
.partner-area-panel .phone-entry {
  width: 100%;
  min-width: 0;
}

.partner-area-panel .phone-entry {
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
}

.partner-area-panel .phone-entry input {
  min-width: 0;
}

.partner-area-panel .secondary-button {
  min-height: 52px;
  border-radius: 999px;
  background: #fff;
}

.compact-result {
  padding: 12px;
}

.tracking-result {
  display: grid;
  gap: 10px;
}

.tracking-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

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

.tracking-grid span,
.tracking-items article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px;
}

.tracking-grid small,
.tracking-items small {
  display: block;
  color: var(--muted);
}

.tracking-items {
  display: grid;
  gap: 8px;
}

.tracking-items article {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
}

.tracking-note textarea {
  background: #fff4cf;
  border-color: #ead995;
}

.tracking-notes {
  display: grid;
  gap: 6px;
}

.tracking-notes p {
  margin: 0;
  border: 1px solid #ead995;
  border-radius: 8px;
  background: #fff4cf;
  padding: 8px;
  white-space: pre-wrap;
}

.brand-logo {
  display: block;
  width: clamp(154px, 15vw, 210px);
  height: auto;
  background: transparent;
}

.login-logo {
  width: min(320px, 78vw);
  justify-self: center;
  margin: 0 auto 8px;
}

.signup-heading {
  text-align: center;
}

.signup-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f1f2f4;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}

.signup-heading h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.1;
}

.signup-heading p,
.signup-legal {
  margin: 8px 0 0;
  color: var(--muted);
}

.signup-fields {
  display: grid;
  gap: 12px;
}

.signup-step {
  display: grid;
  gap: 14px;
}

.signup-step > strong {
  font-size: 22px;
  line-height: 1.2;
}

.signup-step > p {
  margin: -6px 0 0;
  color: var(--muted);
}

.signup-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f4f5f6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 26px rgba(0, 0, 0, 0.06);
}

.signup-progress span {
  position: relative;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e3e5e8;
}

.signup-progress span i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #111318, #34383f);
  transition: width 220ms ease;
}

.signup-progress span.active i {
  width: 100%;
}

.signup-progress span.active {
  background: #d8dbe0;
}

.partner-invite-message {
  padding: 14px 16px;
  border: 1px solid rgba(250, 35, 59, 0.18);
  border-radius: 18px;
  background: #fff5f6;
  color: #7d1c26;
  font-weight: 750;
  line-height: 1.35;
}

.partner-invite-message a {
  color: #111114;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.partner-contact-link {
  justify-self: center;
  color: #77777d;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
}

.partner-contact-link:hover {
  color: #111114;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ready-onboarding {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.ready-onboarding-visual {
  margin: 14px 0 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(17, 17, 20, 0.08);
}

.ready-onboarding-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.ready-onboarding::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 52px;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(250, 35, 59, 0.36), rgba(250, 35, 59, 0.36) 5px, transparent 5px, transparent 11px);
}

.ready-onboarding article {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  min-height: 212px;
  padding: 14px 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.ready-onboarding article svg {
  width: 50px;
  height: 50px;
  padding: 11px;
  border-radius: 50%;
  background: #f5f1ea;
  color: #111114;
  stroke-width: 1.6;
}

.ready-onboarding article span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.ready-onboarding article strong {
  font-size: 14px;
  line-height: 1.18;
}

.ready-onboarding article small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 650;
}

.ready-onboarding article.highlight {
  border-color: rgba(250, 35, 59, 0.42);
  box-shadow: 0 16px 40px rgba(250, 35, 59, 0.08);
}

.ready-onboarding article.highlight svg {
  background: #fff5f6;
  color: var(--accent-dark);
}

.ready-principle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 4px;
  padding: 16px;
  border-radius: 22px;
  background: #f6f2ec;
  color: #303036;
  text-align: center;
  font-weight: 760;
}

.ready-principle span {
  padding: 4px 12px;
}

.ready-principle span + span {
  border-left: 1px solid rgba(0, 0, 0, 0.12);
}

.signup-progress span:first-child::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  z-index: 1;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #fff;
  transform: translateY(-50%);
}

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

.partner-type-card {
  min-height: 104px;
  display: grid;
  gap: 8px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 16px;
  color: var(--ink);
  cursor: pointer;
}

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

.partner-type-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.partner-type-card:hover,
.partner-type-card.selected {
  border-color: var(--ink);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.signup-actions {
  display: flex;
  gap: 10px;
}

.signup-actions .primary-button,
.signup-actions .secondary-button {
  flex: 1;
  min-height: 52px;
}

.signup-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f7f7f9;
  padding: 14px 16px;
}

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

.signup-fields input,
.signup-fields select {
  min-height: 60px;
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
}

.signup-fields label {
  display: grid;
  gap: 8px;
  font-weight: 500;
}

.phone-capture {
  display: grid;
  grid-template-columns: minmax(230px, 0.95fr) minmax(180px, 1.05fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7f7f8);
}

.phone-capture label {
  gap: 6px;
}

.phone-capture label span {
  padding-left: 4px;
  color: var(--muted);
  font-size: 12px;
}

.phone-capture select,
.phone-capture input {
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.phone-entry {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 52px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.phone-entry strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 100%;
  padding: 0 14px;
  border-right: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  background: #f7f7f8;
}

.phone-entry input {
  box-shadow: none;
}

.phone-capture select:focus,
.phone-capture input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--ink), 0 10px 24px rgba(0, 0, 0, 0.08);
}

.phone-entry:focus-within {
  box-shadow: inset 0 0 0 2px var(--ink), 0 10px 24px rgba(0, 0, 0, 0.08);
}

.phone-entry input:focus {
  box-shadow: none;
}

.signup-fields .primary-button {
  min-height: 56px;
  border-radius: 8px;
  margin-top: 2px;
}

.signup-legal {
  display: block;
  text-align: center;
  font-size: 12px;
}

.brand-lockup {
  display: flex;
  align-items: center;
}

.brand-home-button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 14px 28px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-left {
  justify-self: start;
}

.brand-home-button {
  justify-self: center;
}

.topbar-actions {
  justify-self: end;
}

.topbar-actions .connection-pill,
.topbar-actions .role-pill,
.topbar-actions .shop-link {
  display: none;
}

.header-menu-button {
  background: #fff;
}

.header-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 28px;
  z-index: 40;
  min-width: 230px;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(17, 17, 20, 0.16);
  backdrop-filter: blur(22px);
}

.profile-menu-panel {
  right: 28px;
  left: auto;
}

.header-menu-panel button,
.header-menu-panel a {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.header-menu-panel button:hover,
.header-menu-panel a:hover {
  background: #f2f2f4;
}

.header-menu-panel svg {
  width: 18px;
  height: 18px;
}

.profile-menu-status {
  display: grid;
  gap: 2px;
  margin: 4px 4px 8px;
  padding: 12px;
  border-radius: 16px;
  background: #f6f6f7;
}

.profile-menu-status span {
  font-weight: 950;
}

.profile-menu-status small {
  color: var(--muted);
  font-weight: 760;
}

.profile-menu-email {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #111114;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 28px; }
h2 { font-size: 20px; }

main { padding: 20px 28px 36px; }

main.is-loading {
  cursor: progress;
}

.loading-overlay {
  position: fixed;
  inset: auto 20px 20px auto;
  z-index: 30;
  pointer-events: none;
}

.loader-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 54px rgba(17, 17, 20, 0.16);
  padding: 10px 14px;
  font-weight: 900;
  backdrop-filter: blur(14px);
}

.loader-spinner,
.inline-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(17, 17, 20, 0.16);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.inline-spinner {
  width: 16px;
  height: 16px;
  display: inline-block;
}

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

.toolbar, .dialog-actions, .tabs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tabs {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.icon-button, .primary-button, .secondary-button, .action-button, .danger-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

.icon-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled),
.action-button:hover:not(:disabled),
.tab:hover:not(.active),
.subtab:hover:not(.active) {
  border-color: #d7d7dc;
  background: #fbfbfc;
  box-shadow: 0 10px 24px rgba(17, 17, 20, 0.06);
  transform: translateY(-1px);
}

.icon-button {
  width: 42px;
  display: inline-grid;
  place-items: center;
}

.action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-weight: 800;
  text-decoration: none;
}

.action-button:disabled {
  background: var(--soft);
}

.action-button.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.icon-action {
  width: 40px;
  min-width: 40px;
  padding: 0;
  justify-content: center;
}

.icon-action svg {
  width: 20px;
  height: 20px;
}

.quick-contact-button {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  gap: 0;
  justify-content: center;
  padding: 0;
  background: #ff253f;
  border-color: #ff253f;
  color: #fff;
  font-weight: 860;
  box-shadow: 0 12px 28px rgba(255, 37, 63, 0.22);
}

.quick-contact-button:hover:not(:disabled) {
  background: #e71932;
  border-color: #e71932;
  transform: translateY(-1px);
}

.quick-contact-button span {
  display: none;
}

.quick-contact-button svg {
  width: 18px;
  height: 18px;
}

.partner-header-link {
  min-height: 40px;
  gap: 8px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.74);
  font-weight: 850;
}

.partner-header-link.active {
  background: #111114;
  border-color: #111114;
  color: #fff;
  box-shadow: 0 10px 26px rgba(17, 17, 20, 0.14);
}

.partner-header-link svg {
  width: 17px;
  height: 17px;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 760;
}

.connection-pill span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.connection-pill.connected span { background: #108548; }
.connection-pill.disconnected span { background: var(--danger); }

.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(250, 35, 59, 0.08);
  color: var(--accent-dark);
  padding: 0 11px;
  font-size: 13px;
  font-weight: 760;
}

.role-pill.admin {
  background: #f7f3eb;
  color: #6f4d11;
}

.primary-button, .secondary-button { padding: 0 16px; }
.primary-button { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 12px 28px rgba(250, 35, 59, 0.16); }
.primary-button:hover:not(:disabled) { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 16px 34px rgba(250, 35, 59, 0.22); }
.danger-button { padding: 0 16px; background: #fff4f2; border-color: #f0b6ae; color: var(--danger); font-weight: 800; }

input, select, textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  color: var(--ink);
  font-size: 16px;
  padding: 8px 10px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #d7d7dc;
  background: #fafafa;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(250, 35, 59, 0.48);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(250, 35, 59, 0.08);
}

textarea { resize: vertical; }

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

.metric {
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 18px;
  background: var(--panel);
  padding: 14px;
  box-shadow: 0 10px 28px rgba(17, 17, 20, 0.035);
}

.metric span { color: var(--muted); }
.metric strong { display: block; margin-top: 6px; font-size: 24px; }

.toolbar {
  justify-content: space-between;
  margin: 10px 0 18px;
  position: sticky;
  top: calc(var(--ready-header-offset) + var(--ready-tabs-height) + 8px);
  z-index: 23;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 26px;
  background: rgba(245, 245, 247, 0.94);
  box-shadow: 0 18px 40px rgba(17, 17, 20, 0.055);
  backdrop-filter: blur(20px);
  transition: max-height 180ms ease, padding 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.toolbar.filters-collapsed {
  display: flex;
  justify-content: flex-end;
  width: max-content;
  margin-left: auto;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(17, 17, 20, 0.06);
}

.products-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto repeat(5, minmax(130px, 0.5fr));
  align-items: center;
  gap: 8px;
}

.products-toolbar.filters-collapsed {
  display: flex;
}

.toolbar .search {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.filter-toggle {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(17, 17, 20, 0.055);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.filter-toggle:hover {
  background: #fff;
  box-shadow: 0 12px 26px rgba(17, 17, 20, 0.085);
}

.filter-toggle[aria-expanded="true"] {
  background: #111114;
  border-color: #111114;
  color: #fff;
}

.filter-toggle svg {
  width: 18px;
  height: 18px;
}

.toolbar.filters-collapsed .search,
.toolbar.filters-collapsed select,
.products-toolbar.filters-collapsed .product-filter-control {
  display: none;
}

.toolbar select {
  flex: 0 0 220px;
  min-height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.tabs {
  position: sticky;
  top: var(--ready-header-offset);
  z-index: 24;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: visible;
  margin-bottom: 0;
  border-bottom: 0;
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, 0.045);
  border-radius: 999px;
  background: #ededf0;
  box-shadow: 0 10px 26px rgba(17, 17, 20, 0.045);
}

.subtabs {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 4px;
}

.subtab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 900;
}

.subtab.active,
.subtab-settings.active {
  background: var(--ink);
  color: #fff;
}

.order-mode-tabs {
  margin: -4px 0 16px;
}

.tab {
  flex: 1 1 0;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 860;
  cursor: pointer;
  padding: 0 14px;
  justify-content: center;
  white-space: nowrap;
}

.tabs .filter-toggle {
  flex: 0 0 44px;
  margin-left: 6px;
}

.tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(17, 17, 20, 0.10), inset 0 0 0 1px rgba(0, 0, 0, 0.035);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 14px;
}

.search input { border: 0; padding-left: 0; }
.search input:focus { outline: 0; }

.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.delivered-section {
  margin-top: 18px;
}

.section-title {
  margin: 0 0 10px;
  font-size: 16px;
}

.delivered-table {
  display: grid;
  gap: 8px;
}

.delivered-row {
  display: grid;
  grid-template-columns: 110px minmax(180px, 1fr) minmax(160px, 1fr) 120px 140px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 10px 12px;
  text-align: left;
}

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

.delivered-row small,
.delivered-row span {
  color: var(--muted);
}

.catalog,
.clients,
.partners {
  display: grid;
  gap: 10px;
}

.product-row {
  display: grid;
  grid-template-columns: 56px minmax(220px, 1.8fr) 88px minmax(110px, 1fr) 112px 120px 110px minmax(130px, 1fr) 80px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 18px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  padding: 10px 12px;
  text-align: left;
}

.product-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.partner-product-guide {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 46px 14px 16px;
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 17, 20, 0.035);
}

.partner-product-guide-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.partner-product-guide-mini span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.product-guide-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.partner-product-guide h2 {
  margin: 0;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0;
}

.partner-product-guide p:not(.eyebrow) {
  max-width: 620px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.35;
}

.partner-product-guide-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.partner-product-guide-steps article {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 22px;
  background: #fff;
}

.compact-help-steps span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f6f6f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.guide-mini-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.guide-text-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  padding: 0;
  text-decoration: none;
}

.guide-text-link:hover {
  text-decoration: underline;
}

.partner-product-guide-steps strong {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #111114;
  color: #fff;
}

.partner-product-guide-steps span {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.partner-product-guide-steps small {
  color: var(--muted);
  font-weight: 760;
}

.partner-product-guide-steps.compact-help-steps span {
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f6f6f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.partner-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 16px;
}

.product-results-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.product-results-status span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.product-results-status strong {
  color: var(--ink);
  margin-right: 4px;
}

.partner-product-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  gap: 14px;
  min-width: 0;
  min-height: 720px;
  height: 100%;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(17, 17, 20, 0.045);
}

.partner-product-card:hover {
  border-color: rgba(17, 17, 20, 0.1);
  box-shadow: 0 22px 62px rgba(17, 17, 20, 0.07);
  transform: translateY(-1px);
}

.partner-product-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 0;
  border-radius: 22px;
  overflow: hidden;
  background: var(--soft);
}

.partner-product-cover img,
.partner-product-cover .product-thumb {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 22px;
  object-fit: cover;
}

.partner-product-body {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.partner-product-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.partner-product-title span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.partner-product-title strong {
  overflow-wrap: anywhere;
}

.partner-product-title small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.partner-earn-pill {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f4fff8;
  color: #147a43;
  font-size: 13px;
  white-space: nowrap;
}

.contact-first-pill {
  background: #f7f7f8;
  color: var(--ink);
}

.partner-product-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.4;
}

.partner-product-copy strong {
  color: var(--ink);
}

.partner-product-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.partner-product-actions .primary-button,
.partner-product-actions .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding-inline: 18px;
  text-decoration: none;
  white-space: nowrap;
}

.partner-product-actions .secondary-button {
  gap: 8px;
}

.partner-share-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: fit-content;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(17, 17, 20, 0.04);
}

.partner-share-mini svg {
  width: 15px;
  height: 15px;
}

.partner-share-mini:hover {
  border-color: rgba(250, 35, 59, 0.32);
  color: var(--accent);
  transform: translateY(-1px);
}

.partner-card-variant-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.045);
  border-radius: 18px;
  background: #fbfbfc;
}

.partner-card-variant-filters label {
  gap: 5px;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.partner-card-variant-filters select {
  min-height: 36px;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  font-weight: 850;
}

.partner-card-visible-count {
  display: block;
  width: fit-content;
  min-height: 0;
  margin-top: -2px;
  padding: 0 2px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.1;
  opacity: 0.62;
}

.partner-variant-list {
  display: grid;
  align-content: start;
  gap: 8px;
  height: 300px;
  min-height: 300px;
  max-height: 300px;
  overflow: auto;
  padding-right: 2px;
}

.partner-variant-line {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.045);
  border-radius: 18px;
  background: #fbfbfc;
}

.partner-variant-line span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.partner-variant-line small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.partner-variant-line strong {
  overflow-wrap: anywhere;
}

.partner-variant-money {
  justify-items: end;
  text-align: right;
  white-space: nowrap;
}

.partner-variant-money strong {
  color: #147a43;
  font-size: 14px;
}

.partner-variant-more {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7f7f8;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.partner-variant-empty {
  display: block;
  padding: 18px 12px;
  border-radius: 16px;
  background: #f7f7f8;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.client-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.3fr) minmax(120px, 0.8fr) minmax(220px, 1.5fr) 90px 110px 100px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 12px;
}

.partner-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(140px, 1fr) 150px 110px 80px 110px 150px 130px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 12px;
}

.ready-partner-row {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  align-items: end;
  border-radius: 22px;
  padding: 14px;
}

.partner-admin-overview {
  display: grid;
  gap: 12px;
}

.partner-admin-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.partner-admin-summary article {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
}

.partner-admin-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.partner-admin-summary strong {
  font-size: 24px;
}

.partner-admin-grid {
  display: grid;
  gap: 10px;
}

.partner-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.partner-card-actions .secondary-button {
  min-height: 42px;
  padding-inline: 18px;
}

.icon-button.danger {
  color: #b42318;
  background: #fff5f4;
  border-color: rgba(180, 35, 24, 0.12);
}

.icon-button.danger:hover {
  background: #ffe7e5;
}

.ready-partner-row > span:first-child {
  grid-column: span 2;
}

.ready-partner-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ready-partner-row input,
.ready-partner-row select {
  min-height: 42px;
  border-radius: 14px;
  font-size: 14px;
}

.ready-rule-grid,
.ready-network-list {
  display: grid;
  gap: 10px;
}

.ready-rule-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.ready-rule-grid article,
.ready-network-row {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 14px;
}

.ready-rule-grid article {
  display: grid;
  gap: 6px;
}

.ready-rule-grid span,
.ready-network-row small {
  color: var(--muted);
  font-weight: 800;
}

.ready-rule-grid strong {
  font-size: 28px;
}

.ready-network,
.ready-network-list {
  margin-bottom: 14px;
}

.ready-network-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) repeat(4, minmax(120px, 1fr));
  gap: 12px;
  align-items: center;
}

.partner-network-progress {
  grid-template-columns: minmax(180px, 1.3fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) minmax(180px, 1.4fr);
}

.partner-network-progress .progress-bar {
  margin-top: 8px;
}

.partner-invite-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.partner-invite-panel.locked {
  background: #fbfbfc;
}

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

.partner-invite-row {
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

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

.partner-invite-preview {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  background: linear-gradient(180deg, #fbfbfc, #fff);
}

.compact-preview-recipients {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.compact-preview-recipients article {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.compact-email-preview {
  min-height: 360px;
}

.compact-email-preview .email-preview-frame {
  min-height: 360px;
}

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

.partner-admin-invite {
  margin-bottom: 14px;
}

.partner-admin-invite-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.partner-admin-invite-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.partner-admin-invite-grid textarea {
  min-height: 92px;
  resize: vertical;
}

.partner-admin-invite-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.compact-invite-list {
  margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.pending-invites-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #fbfbfc);
}

.pending-invites-card.compact {
  margin-top: 14px;
}

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

.pending-invite-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(140px, auto) auto auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(246, 246, 247, 0.72);
}

.pending-invite-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.pending-invite-row strong,
.pending-invite-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-invite-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.invite-status-pill {
  justify-self: start;
  padding: 8px 11px;
  border-radius: 999px;
  background: #fff6df;
  color: #8a5a00;
  font-size: 12px;
  font-weight: 900;
  text-transform: capitalize;
}

.partner-preview-panel {
  text-align: left;
}

.partner-profile {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.partner-guide-card {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 17, 20, 0.035);
}

.partner-guide-copy {
  display: grid;
  gap: 5px;
  max-width: 660px;
}

.partner-guide-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.partner-guide-toggle {
  flex: 0 0 auto;
}

.partner-guide-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.partner-guide-mini span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.partner-guide-mini .secondary-button {
  min-height: 34px;
  padding-inline: 14px;
  font-size: 13px;
}

.compact-guide-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  box-shadow: none;
}

.compact-guide-toggle svg {
  width: 15px;
  height: 15px;
}

.compact-guide-close {
  width: 34px;
  min-height: 34px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

.partner-guide-copy h2 {
  margin: 0;
  max-width: 620px;
  font-size: 19px;
  line-height: 1.16;
  letter-spacing: 0;
}

.partner-guide-copy p:not(.eyebrow),
.partner-guide-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.35;
}

.partner-guide-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.partner-guide-steps article {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px 8px;
  min-height: 0;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 999px;
  background: #f6f6f7;
}

.partner-guide-steps strong {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #111114;
  color: #fff;
  font-size: 11px;
}

.partner-guide-network .partner-guide-steps strong {
  background: #ff253f;
}

.partner-guide-revenue .partner-guide-steps strong {
  background: #147a43;
}

.partner-guide-steps span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.partner-guide-steps small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.partner-guide-note {
  padding-top: 2px;
  font-size: 14px;
}

.partner-profile-form,
.partner-documents {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 16px;
}

.partner-code-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.partner-code-card span {
  color: var(--muted);
  font-weight: 800;
}

.partner-code-card strong {
  overflow-wrap: anywhere;
  font-size: 26px;
}

.revenue-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.7fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}

.revenue-hero > div,
.revenue-hero > article,
.revenue-split article {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  padding: 22px;
  box-shadow: 0 18px 50px rgba(17, 17, 20, 0.045);
}

.revenue-hero h2 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 0.95;
  letter-spacing: 0;
}

.revenue-hero span,
.revenue-hero small,
.revenue-split small,
.revenue-card small {
  color: var(--muted);
  font-weight: 750;
}

.revenue-hero article {
  align-content: center;
}

.revenue-hero article strong {
  font-size: clamp(28px, 4vw, 42px);
}

.revenue-dashboard {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  margin-bottom: 12px;
}

.revenue-card {
  border-radius: 22px;
  min-height: 132px;
}

.primary-revenue {
  background: linear-gradient(180deg, #ffffff, #f4fff8);
  border-color: rgba(20, 160, 86, 0.16);
}

.network-revenue {
  background: linear-gradient(180deg, #ffffff, #f7f5ff);
  border-color: rgba(87, 70, 210, 0.12);
}

.revenue-progress-card {
  grid-column: span 2;
}

.revenue-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.revenue-split strong {
  font-size: 32px;
}

.revenue-table .commission-row {
  grid-template-columns: minmax(190px, 1.4fr) repeat(4, minmax(120px, 1fr));
  border-radius: 18px;
  padding: 14px;
}

.revenue-table .commission-row span small,
.revenue-table .commission-row span strong {
  display: block;
}

.revenue-table .commission-row span small {
  color: var(--muted);
  font-weight: 850;
  font-size: 12px;
}

.commission-settings,
.commission-table {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.commission-period-filters {
  display: grid;
  grid-template-columns: 180px repeat(3, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
}

.commission-kid-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.commission-kid-summary article {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 22px;
  background: #fff;
}

.commission-kid-summary span,
.commission-kid-summary small {
  color: var(--muted);
  font-weight: 800;
}

.commission-kid-summary strong {
  font-size: clamp(24px, 3vw, 34px);
}

.partner-commission-groups {
  display: grid;
  gap: 10px;
}

.partner-commission-group {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
}

.partner-commission-group summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(120px, 0.8fr));
  gap: 12px;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

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

.partner-commission-group summary span {
  display: grid;
  gap: 4px;
}

.partner-commission-group small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.partner-commission-lines {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.partner-commission-line {
  grid-template-columns: minmax(160px, 1.3fr) repeat(4, minmax(96px, 0.8fr)) minmax(120px, 0.8fr);
  border-radius: 16px;
  background: #fbfbfc;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h3 {
  margin: 0;
  font-size: 18px;
}

.section-heading span {
  color: var(--muted);
  font-weight: 800;
}

.tier-grid {
  display: grid;
  gap: 8px;
}

.tier-row,
.commission-row {
  display: grid;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px 12px;
}

.tier-row {
  grid-template-columns: repeat(3, minmax(120px, 1fr)) 110px;
}

.commission-row {
  grid-template-columns: minmax(160px, 1.3fr) 120px 120px 90px 120px 130px 90px;
}

.payout-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 130px minmax(220px, 1.2fr) minmax(180px, 1fr) 90px minmax(220px, auto);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 12px;
}

.commission-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.check-label {
  align-self: end;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
}

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

.progress-card {
  grid-column: span 2;
}

.progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ece9;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.partner-whatsapp {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

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

.document-row {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

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

.partner-contact-form,
.partner-contact-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr)) minmax(250px, 1.08fr) minmax(280px, 1.18fr) minmax(210px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.contact-drafts {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.contact-draft-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr)) minmax(250px, 1.08fr) minmax(280px, 1.18fr);
  align-items: end;
  gap: 10px;
}

.partner-contact-form {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8f8fa;
}

.partner-contacts-list {
  display: grid;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.contact-table {
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}

.contact-table-head,
.contact-table .contact-manage-row {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(0, 1.24fr) minmax(132px, 0.72fr) minmax(124px, 0.62fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.contact-table-head {
  padding: 0 10px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.partner-contact-row,
.contact-manage-row {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.contact-manage-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.04);
  max-width: 100%;
  min-width: 0;
}

.partner-contact-form input,
.partner-contact-form select,
.contact-draft-row input,
.contact-draft-row select,
.contact-manage-row input,
.contact-manage-row select {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.15;
}

.contact-manage-row,
.partner-contact-form {
  font-size: 13px;
}

.contact-main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.contact-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.contact-phone-cell {
  min-width: 0;
}

.contact-phone-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 0.78fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.contact-phone-line select,
.contact-phone-line input {
  width: 100%;
  min-width: 0;
}

.contact-phone-entry {
  min-width: 0;
  background: #f7f7f8;
}

.contact-phone-entry strong {
  min-width: 56px;
  padding-inline: 10px;
  font-size: 13px;
  white-space: nowrap;
}

.contact-phone-entry input {
  min-width: 0;
  background: #fff;
}

.contact-phone-main {
  grid-template-columns: 1fr;
}

.contact-person-cell {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 0.75fr) minmax(0, 1.35fr);
  align-items: center;
  min-width: 0;
}

.contact-person-cell .contact-email {
  grid-column: auto;
}

.contact-email-cell small {
  color: var(--muted);
  font-weight: 750;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.2;
}

.contact-email-cell {
  align-content: center;
  gap: 4px;
}

.contact-main label,
.contact-cell label {
  display: grid;
  gap: 6px;
}

.contact-main label span,
.contact-cell label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.contact-row-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-top: 2px;
}

.contact-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.contact-actions .secondary-button {
  min-height: 34px;
  padding-inline: 10px;
  font-size: 13px;
}

.email-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.email-status.sent {
  background: var(--paid-soft);
  color: var(--paid);
}

.email-status.pending {
  background: #fff6df;
  color: #8a5a00;
}

.email-status.error {
  background: #fff0ee;
  color: var(--danger);
}

.email-status.muted {
  background: var(--soft);
  color: var(--muted);
}

.contact-email-settings-card {
  background: #fff;
}

.contact-email-studio {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.contact-email-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.email-editor-panel,
.email-preview-panel {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px;
  background: #fff;
}

.email-editor-panel {
  padding: 18px;
}

.email-preview-panel {
  padding: 14px;
  background: linear-gradient(180deg, #f7f7f9 0%, #fff 48%);
}

.email-editor-topline,
.email-editor-actions,
.email-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.email-editor-actions {
  justify-content: flex-end;
}

.email-preview-toolbar {
  padding: 2px 4px;
  color: var(--muted);
  font-weight: 900;
}

.email-preview-toolbar strong {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.email-preview-card {
  min-height: 520px;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.email-preview-meta {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.email-preview-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.email-preview-meta strong {
  font-size: 18px;
}

.email-preview-body {
  padding: 26px;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow: auto;
}

.email-preview-body img {
  max-width: 100%;
  height: auto;
}

.email-preview-body a {
  color: #0071e3;
}

.email-preview-frame {
  width: 100%;
  min-height: 520px;
  border: 0;
  background: #f6f4ef;
}

.partner-finder {
  display: grid;
  gap: 16px;
}

.finder-tabs {
  margin: -4px 0 10px;
}

.finder-hero,
.finder-card,
.finder-detail {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.06);
}

.finder-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 24px;
}

.finder-hero h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0;
}

.finder-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.finder-health {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
  min-width: 230px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8f8fa;
  font-weight: 850;
}

.finder-health span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d93025;
}

.finder-health span.good {
  background: #0f9d58;
}

.finder-card {
  padding: 20px;
}

.finder-search-card {
  display: grid;
  gap: 14px;
}

.finder-search-minimal {
  margin-bottom: 14px;
  padding: 16px;
}

.finder-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.finder-search-head h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.finder-search-minimal .form-grid {
  grid-template-columns: 1.2fr 0.55fr 0.7fr 0.65fr 0.65fr 1.3fr;
  gap: 8px;
}

.finder-search-minimal .form-grid label {
  font-size: 12px;
}

.finder-search-minimal input,
.finder-search-minimal select {
  min-height: 42px;
  border-radius: 16px;
  font-size: 14px;
}

.finder-category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.finder-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f7f9;
  font-size: 13px;
  font-weight: 850;
  color: var(--muted);
  cursor: pointer;
}

.finder-chip.selected {
  color: #111114;
  border-color: rgba(255, 34, 66, 0.24);
  background: rgba(255, 34, 66, 0.08);
}

.finder-search-button {
  justify-self: end;
  min-width: 180px;
  min-height: 44px;
}

.finder-filter-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 12px;
}

.finder-filter-row label {
  width: min(320px, 100%);
  font-size: 12px;
}

.finder-filter-row select {
  min-height: 42px;
  border-radius: 16px;
  font-size: 14px;
}

.finder-batches,
.finder-detail-grid,
.finder-settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.finder-batches article,
.finder-detail-grid article,
.finder-settings-grid article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8f8fa;
}

.finder-batches span,
.finder-batches small,
.finder-detail-grid span,
.finder-settings-grid span,
.finder-settings-grid small {
  color: var(--muted);
  font-weight: 750;
}

.finder-table {
  display: grid;
  gap: 8px;
}

.finder-workspace {
  position: relative;
  display: grid;
}

.finder-main {
  min-width: 0;
}

.finder-workspace.detail-open .finder-main {
  padding-right: min(440px, 34vw);
}

.finder-bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8f8fa;
}

.finder-bulk-bar label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}

.finder-bulk-bar .primary-button {
  min-height: 40px;
  padding-inline: 18px;
}

.finder-select-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.finder-select-line input,
.finder-bulk-bar input {
  width: 18px;
  height: 18px;
}

.finder-table-head,
.finder-row {
  display: grid;
  grid-template-columns: minmax(250px, 1.35fr) minmax(150px, 0.8fr) minmax(120px, 0.55fr) minmax(170px, 0.65fr) auto;
  gap: 12px;
  align-items: center;
}

.finder-table-head {
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.finder-row.selected {
  border-color: rgba(255, 34, 66, 0.28);
  box-shadow: 0 16px 44px rgba(255, 34, 66, 0.08);
}

.finder-row div {
  min-width: 0;
}

.finder-row strong,
.finder-row span,
.finder-row small,
.finder-row a {
  display: block;
  overflow-wrap: anywhere;
}

.finder-row small {
  color: var(--muted);
  font-weight: 650;
}

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

.finder-actions .secondary-button {
  min-height: 38px;
  padding-inline: 14px;
}

.finder-status {
  min-height: 42px;
  border-radius: 14px;
  font-size: 15px;
}

.finder-detail {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  width: min(440px, 92vw);
  height: 100vh;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
  border-radius: 28px 0 0 28px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(22px);
  box-shadow: -18px 0 54px rgba(15, 23, 42, 0.16);
}

.finder-notes {
  min-height: 100px;
  background: #fffaf0;
}

.finder-analysis {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: #f8f8fa;
}

.finder-analysis h3,
.finder-analysis p,
.finder-analysis ul {
  margin: 0;
}

.finder-sidebar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.toggle-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.compact-email-settings textarea {
  min-height: 156px;
  resize: vertical;
}

#adminContactEmailHtmlBody {
  min-height: 240px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.45;
}

.partner-contact-form .primary-button {
  min-height: 44px;
  font-size: 15px;
}

.contact-permission {
  grid-column: 1 / -2;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.contact-permission input {
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  margin-top: 1px;
}

.contact-page-heading {
  margin-bottom: 12px;
  padding: 0 6px;
}

.contact-side-panel .contact-panel-intro {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 22px;
  background: #f6f6f7;
}

.contact-side-panel .contact-panel-intro strong {
  font-size: 19px;
  font-weight: 950;
}

.contact-side-panel .contact-panel-intro span {
  color: var(--muted);
  font-weight: 760;
  line-height: 1.35;
}

.contact-side-panel .contact-panel-form,
.contact-side-panel .contact-draft-row {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.contact-side-panel .contact-draft-row {
  position: relative;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.contact-draft-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.contact-draft-controls .icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
  box-shadow: none;
}

.contact-draft-controls .contact-draft-add {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.contact-draft-controls .contact-draft-remove {
  background: #f4f4f6;
  color: var(--muted);
}

.contact-side-panel .contact-permission {
  grid-column: auto;
}

.contact-side-panel .contact-panel-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.contact-side-panel .primary-button,
.contact-side-panel .secondary-button {
  width: 100%;
}

.contact-whatsapp-queue {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d6eadf;
  border-radius: 22px;
  background: #f4fbf7;
}

.contact-whatsapp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.contact-whatsapp-head strong {
  font-size: 14px;
  font-weight: 900;
}

.contact-whatsapp-head .secondary-button {
  width: auto;
  min-height: 34px;
  padding-inline: 14px;
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

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

.contact-whatsapp-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dfe3e8;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.contact-whatsapp-link:hover {
  border-color: #25d366;
  color: #128c4a;
}

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

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

.product-row img,
.product-thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--soft);
}

.product-thumb {
  display: inline-grid;
  place-items: center;
  color: var(--accent-dark);
}

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

.product-row small,
.product-row span {
  color: var(--muted);
}

.variant-strip {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.variant-strip img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.sheet-link {
  display: grid;
  gap: 8px;
}

.sheet-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-item .sheet-button {
  flex: 1;
}

.column {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  padding: 10px;
  scroll-snap-align: start;
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.column-header h2 { margin: 0; font-size: 15px; }

.count {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e9ece7;
  color: var(--muted);
  font-weight: 800;
}

.card {
  width: 100%;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  overflow: hidden;
}

.payment-unpaid-card {
  border-color: rgba(180, 35, 24, 0.24);
  background: linear-gradient(90deg, rgba(180, 35, 24, 0.08), rgba(255, 255, 255, 0.96) 18%);
}

.payment-paid-card {
  border-color: rgba(17, 137, 89, 0.24);
  background: linear-gradient(90deg, rgba(17, 137, 89, 0.08), rgba(255, 255, 255, 0.96) 18%);
}

.card-payment-status {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-weight: 900;
}

.payment-unpaid-card .card-payment-status {
  background: #fff0ee;
  color: var(--danger);
}

.payment-paid-card .card-payment-status {
  background: var(--paid-soft);
  color: var(--paid);
}

.card:hover { border-color: rgba(250, 35, 59, 0.28); }
.payment-paid-card:hover { border-color: rgba(17, 137, 89, 0.34); }
.payment-unpaid-card:hover { border-color: rgba(180, 35, 24, 0.34); }

.estimated-overdue-card {
  box-shadow: inset 3px 0 0 var(--danger);
}

.estimated-alert {
  width: fit-content;
  border-radius: 999px;
  background: #fff0ee;
  color: var(--danger);
  padding: 3px 8px;
  font-weight: 900;
}

.estimated-alert-panel {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-radius: 14px;
  background: #fff7f5;
  color: var(--danger);
  padding: 12px 14px;
  margin-bottom: 14px;
}

.estimated-alert-panel span {
  color: #8f2d25;
  font-weight: 760;
}

.card-open {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.accept-card-button {
  width: calc(100% - 24px);
  min-height: 38px;
  margin: 0 12px 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.accept-card-button:hover {
  background: var(--accent-dark);
}

.empty-state {
  color: var(--muted);
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 850;
  line-height: 1.35;
}

.clear-empty {
  grid-column: 1 / -1;
  min-height: 160px;
  display: grid;
  place-items: center;
  text-align: center;
}

.app-notice {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 60;
  transform: translate(-50%, 18px);
  max-width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
  padding: 11px 16px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  backdrop-filter: blur(16px);
}

.app-notice.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.app-notice[data-tone="bad"] {
  background: #fff4f2;
  color: var(--danger);
}

.app-notice[data-tone="busy"] {
  background: #f7f7f9;
  color: var(--muted);
}

.card-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.card-title strong { overflow-wrap: anywhere; }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 8px;
  background: #fff1f3;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.meta {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.margin-good { color: var(--accent); }
.margin-risk { color: var(--warn); }
.margin-bad { color: var(--danger); }

dialog {
  width: min(920px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 14px 38px rgba(30, 37, 43, 0.18);
}

dialog::backdrop { background: rgba(30, 37, 43, 0.36); }

.dialog-body { padding: 20px; }
.dialog-body.small { width: min(480px, calc(100vw - 28px)); }

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 120;
  width: min(560px, 100vw);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: var(--panel);
  box-shadow: -34px 0 100px rgba(17, 17, 20, 0.24);
}

.side-panel .dialog-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 22px;
}

.side-panel .dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: -22px -22px 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

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

.side-panel .dialog-actions {
  position: sticky;
  bottom: 0;
  margin: 18px -22px -22px;
  padding: 14px 22px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 -14px 28px rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

#productDialog .primary-button {
  min-width: 150px;
}

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

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

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

.user-create .primary-button {
  min-width: 150px;
}

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

.user-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.2fr) 150px minmax(140px, .8fr) auto;
  align-items: end;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.user-row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.variant-costs {
  display: grid;
  gap: 8px;
}

.variant-costs h3 {
  margin: 0;
  font-size: 15px;
}

.variant-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.variant-row label {
  grid-column: 1 / -1;
  min-width: 0;
}

.variant-margin {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: start;
  font-weight: 800;
  font-size: 13px;
}

.apply-variant-group {
  grid-column: 1 / -1;
  justify-self: stretch;
  min-height: 36px;
}

.product-variant-heading {
  margin-bottom: 2px;
}

.product-sidebar-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.product-sidebar-filters:empty {
  display: none;
}

.product-sidebar-filter {
  min-width: 0;
}

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

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

.variant-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  object-fit: cover;
  background: #edf5f2;
  color: var(--accent-dark);
}

.sheet-link {
  min-height: 40px;
}

.sheet-button {
  width: fit-content;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--accent-dark);
  padding: 0 12px;
  font-weight: 800;
  text-decoration: none;
}

.muted-line {
  color: var(--muted);
  font-size: 13px;
}

.order-details {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

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

.order-info-grid article,
.order-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.order-info-grid span,
.order-line small {
  color: var(--muted);
}

.order-info-grid strong,
.order-info-grid small {
  display: block;
}

.order-lines {
  display: grid;
  gap: 8px;
}

.order-board-notes {
  display: grid;
  gap: 12px;
}

.order-board-heading {
  align-items: center;
  padding: 0 2px;
}

.order-board-heading h3 {
  font-size: 20px;
  letter-spacing: 0;
}

.note-board {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  background: #fff;
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.order-board-input textarea {
  min-height: 112px;
  border-color: rgba(0, 0, 0, 0.08);
  background: #fff;
}

.order-board-input {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  background: #fbfbfd;
  padding: 14px;
}

.order-board-input label {
  display: grid;
  gap: 8px;
}

.order-board-input .secondary-button {
  justify-self: end;
}

.note-entry {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  background: #f5f5f7;
  padding: 12px 14px;
}

.note-entry.admin {
  background: #fff5f6;
  border-color: rgba(250, 35, 59, 0.12);
}

.note-entry.workshop {
  background: #f5f5f7;
}

.note-entry.partner {
  background: #f4f8ff;
  border-color: rgba(0, 122, 255, 0.10);
}

.note-entry.client {
  background: #fff9e8;
  border-color: rgba(234, 217, 149, 0.45);
}

.note-entry span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.note-entry p {
  margin: 0;
  color: var(--ink);
  line-height: 1.42;
  white-space: pre-wrap;
}

.note-entry small {
  color: var(--muted);
}

.order-margin-board,
.accounting-book {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

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

.money-lines span,
.accounting-summary article {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.money-lines small,
.accounting-summary span,
.accounting-summary small,
.accounting-row small {
  color: var(--muted);
}

.margin-result {
  grid-column: 1 / -1;
}

.accounting {
  display: grid;
  gap: 14px;
}

.accounting-filters {
  display: grid;
  grid-template-columns: 180px repeat(3, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
}

.accounting-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
}

.accounting-summary strong {
  font-size: 22px;
}

.accounting-book {
  overflow-x: auto;
}

.margin-calculation {
  display: grid;
  gap: 10px;
}

.expense-row {
  display: grid;
  grid-template-columns: 140px 170px minmax(180px, 1fr) 140px 130px 46px;
  gap: 10px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding: 10px 8px;
  min-width: 860px;
}

.expense-editor {
  border-top: 0;
  align-items: end;
  background: #fbfbfd;
}

.accounting-row.is-expense {
  background: #fff;
}

.accounting-row.is-expense.is-paid {
  background: #fbfbfd;
}

.accounting-row input,
.accounting-row select {
  min-height: 36px;
  border-radius: 12px;
}

.accounting-head,
.accounting-row {
  display: grid;
  gap: 10px;
  align-items: center;
}

.admin-accounting-head,
.admin-accounting-row {
  grid-template-columns: minmax(150px, 1.5fr) repeat(9, minmax(116px, 1fr));
  min-width: 980px;
}

.workshop-accounting-head,
.workshop-accounting-row {
  grid-template-columns: minmax(160px, 1.5fr) repeat(4, minmax(120px, 1fr));
  min-width: 680px;
}

.accounting-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 0 8px 8px;
  text-transform: uppercase;
}

.accounting-row {
  border-top: 1px solid var(--line);
  padding: 10px 8px;
}

.accounting-row.is-paid {
  background: rgba(234, 246, 242, 0.72);
}

.accounting-row > span {
  min-width: 0;
}

.payment-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900;
}

.payment-pill.pending {
  background: #fff6df;
  color: #8a5a00;
}

.payment-pill.paid {
  background: var(--soft);
  color: var(--accent);
}

.accounting-mini-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.accounting-mini-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.order-line {
  display: grid;
  grid-template-columns: 52px 1fr 80px 110px 130px;
  align-items: center;
  gap: 10px;
}

.order-line > span {
  min-width: 0;
}

.line-cost {
  min-width: 0;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.wide { grid-column: 1 / -1; }
.dialog-actions { justify-content: flex-end; padding: 0; margin: 18px 0 0; }
.hidden { display: none !important; }

@media (max-width: 1180px) {
  .contact-table-head {
    display: none;
  }

  .contact-table .contact-manage-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .contact-person-cell {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contact-phone-line {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 0.8fr);
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .login-view.partner-area-mode {
    grid-template-columns: minmax(0, 680px);
    align-content: start;
    max-width: 720px;
  }
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .topbar-left,
  .topbar-actions {
    gap: 6px;
  }
  .brand-home-button {
    grid-column: 2;
    justify-self: center;
  }
  .topbar-actions {
    grid-column: 3;
    grid-row: 1;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    overflow: visible;
  }
  .topbar-left {
    grid-column: 1;
    grid-row: 1;
  }
  .quick-contact-button {
    min-height: 36px;
    width: 36px;
    min-width: 36px;
    padding: 0;
  }
  .quick-contact-button span { display: none; }
  .topbar-actions .role-pill {
    display: none;
  }
  .topbar-actions .connection-pill,
  .topbar-actions .shop-link,
  .partner-header-link {
    display: none;
  }
  .connection-pill {
    grid-column: 1;
    width: 38px;
    min-width: 38px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }
  .partner-header-link {
    width: 38px;
    min-width: 38px;
    padding: 0;
    justify-content: center;
  }
  .partner-header-link span {
    display: none;
  }
  .header-menu-panel {
    top: calc(100% + 8px);
    left: 14px;
    right: auto;
    min-width: min(260px, calc(100vw - 28px));
    border-radius: 20px;
  }
  .profile-menu-panel {
    right: 14px;
    left: auto;
  }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar {
    gap: 8px;
    margin-top: -8px;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.055);
    border-radius: 24px;
    background: rgba(245, 245, 247, 0.94);
    backdrop-filter: blur(18px);
  }
  .toolbar.filters-collapsed {
    align-items: center;
    margin-left: auto;
    padding: 6px;
  }
  .products-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .products-toolbar.filters-collapsed {
    display: flex;
  }
  .products-toolbar .product-filter-control {
    grid-column: 1 / -1;
  }
  .toolbar select {
    flex-basis: auto;
    min-height: 38px;
    border-radius: 999px;
    font-size: 14px;
    background: #fff;
  }
  .tabs {
    top: var(--ready-header-offset);
    display: flex;
    border-radius: 999px;
  }
  .topbar-actions select { flex: 1; }
  .user-create, .user-row, .variant-row, .order-info-grid, .order-line, .client-row, .partner-row, .partner-profile, .partner-guide-steps, .partner-product-guide, .partner-product-card, .revenue-hero, .revenue-dashboard, .revenue-split, .ready-network-row, .partner-invite-form, .partner-admin-invite-grid, .partner-invite-row, .pending-invite-row, .document-upload, .document-row, .delivered-row, .tier-row, .commission-row, .revenue-table .commission-row, .partner-commission-line, .partner-commission-group summary, .payout-row, .expense-row, .partner-contact-form, .partner-contact-row, .contact-draft-row { grid-template-columns: 1fr; min-width: 0; }
  .commission-kid-summary { grid-template-columns: 1fr; }
  .revenue-progress-card { grid-column: auto; }
  .ready-partner-row > span:first-child { grid-column: auto; }
  .contact-main,
  .contact-row-footer {
    grid-template-columns: 1fr;
  }
  .contact-side-panel .contact-panel-actions {
    grid-template-columns: 1fr;
  }
  .partner-product-grid {
    grid-template-columns: 1fr;
  }
  .partner-product-card {
    min-height: 0;
  }
  .partner-variant-list {
    height: 260px;
    min-height: 260px;
    max-height: 260px;
  }
  .partner-product-guide-steps,
  .partner-product-actions {
    grid-template-columns: 1fr;
  }
  .partner-variant-line {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }
  .contact-table-head {
    display: none;
  }
  .contact-table .contact-manage-row,
  .contact-person-cell {
    grid-template-columns: 1fr;
  }
  .contact-phone-line {
    grid-template-columns: 1fr;
  }
  .finder-hero,
  .finder-search-minimal .form-grid,
  .finder-batches,
  .finder-detail-grid,
  .finder-settings-grid,
  .finder-table-head,
  .finder-row {
    grid-template-columns: 1fr;
  }
  .finder-table-head {
    display: none;
  }
  .finder-workspace.detail-open .finder-main {
    padding-right: 0;
  }
  .finder-detail {
    width: 100vw;
    border-radius: 0;
  }
  .finder-bulk-bar,
  .finder-sidebar-actions {
    grid-template-columns: 1fr;
  }
  .finder-bulk-bar {
    display: grid;
  }
  .finder-search-head,
  .finder-filter-row {
    display: grid;
    justify-content: stretch;
  }
  .finder-filter-row label {
    width: 100%;
  }
  .finder-actions {
    justify-content: stretch;
  }
  .finder-actions .secondary-button,
  .finder-search-button {
    width: 100%;
  }
  .contact-email-grid {
    grid-template-columns: 1fr;
  }
  .email-preview-card {
    min-height: 420px;
  }
  .email-preview-frame {
    min-height: 460px;
  }
  .email-editor-actions .primary-button,
  .email-editor-actions .secondary-button {
    flex: 1;
  }
  .contact-person-cell .contact-email {
    grid-column: auto;
  }
  .contact-actions {
    justify-content: stretch;
  }
  .contact-actions .secondary-button {
    flex: 1;
  }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(3, 82vw); scroll-snap-type: x mandatory; }
  .product-row {
    grid-template-columns: 52px 1fr;
    align-items: start;
  }
  .product-row > span:nth-child(n + 3) {
    grid-column: 2;
  }
  .side-panel { width: 100vw; border-left: 0; }
  .accounting-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accounting-filters,
  .commission-period-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  main, .topbar { padding-left: 14px; padding-right: 14px; }
  .login-view { padding: 14px; }
  .login-view.partner-area-mode { gap: 12px; }
  .partner-area-mode .partner-signup-panel,
  .partner-area-mode .partner-area-panel,
  .partner-area-panel,
  .partner-signup-panel {
    border-radius: 22px;
    padding: 22px;
  }
  .partner-area-mode .partner-signup-panel .login-logo {
    width: min(260px, 82%);
  }
  .partner-signup-nav { margin-top: -8px; }
  .partner-area-heading { text-align: left; }
  .signup-panel-heading { text-align: center; }
  .partner-type-grid { grid-template-columns: 1fr; }
  .ready-onboarding {
    grid-template-columns: 1fr;
  }
  .ready-onboarding::before {
    display: none;
  }
  .ready-onboarding article {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
    min-height: 0;
    padding: 14px;
  }
  .ready-onboarding article svg {
    grid-row: span 3;
    width: 44px;
    height: 44px;
  }
  .ready-principle {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .ready-principle span + span {
    border-left: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }
  .phone-capture { grid-template-columns: 1fr; }
  .signup-actions { display: grid; }
  .tabs {
    top: var(--ready-header-offset);
    margin-left: 0;
    margin-right: 0;
    padding: 7px;
    display: flex;
  }
  .tab {
    min-height: 38px;
    padding-inline: 8px;
    font-size: 14px;
  }
  .tabs .filter-toggle {
    flex-basis: 38px;
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    margin-left: 4px;
  }
  .brand-logo { width: 132px; }
  .topbar-actions .connection-pill,
  .topbar-actions .role-pill {
    min-height: 36px;
    font-size: 13px;
    padding-inline: 10px;
  }
  .topbar-actions .icon-action {
    min-height: 36px;
    width: 36px;
    min-width: 36px;
    padding: 0;
  }
  .quick-contact-button,
  .partner-header-link {
    min-height: 36px;
    padding-inline: 0;
    font-size: 13px;
  }
  .quick-contact-button span,
  .partner-header-link span {
    display: none;
  }
  .partner-header-link span {
    display: none;
  }
  .topbar-actions .connection-pill {
    width: 36px;
    min-width: 36px;
    padding: 0;
    font-size: 0;
  }
  .metrics, .form-grid { grid-template-columns: 1fr; }
  .metrics { gap: 8px; }
  .metric { padding: 12px; }
  .metric strong { font-size: 21px; }
  .tab { min-height: 36px; padding-inline: 12px; }
  .board { grid-template-columns: repeat(3, 88vw); gap: 10px; }
  .column { min-height: calc(100dvh - 260px); padding: 12px; }
  .side-panel .dialog-body { padding: 18px; }
  .side-panel .dialog-header { margin: -18px -18px 16px; padding: 16px 18px; }
  .side-panel .dialog-actions { margin: 16px -18px -18px; padding: 12px 18px max(12px, env(safe-area-inset-bottom)); }
  #productDialog .dialog-actions .primary-button,
  #orderDialog .dialog-actions .primary-button {
    width: 100%;
    min-height: 48px;
  }
  .variant-row label,
  .order-line > * {
    min-width: 0;
  }
  .product-sidebar-filters {
    grid-template-columns: 1fr;
  }
  .money-lines { grid-template-columns: 1fr; }
  .accounting-summary { grid-template-columns: 1fr; }
  .accounting-filters,
  .commission-period-filters { grid-template-columns: 1fr; }
  .partner-guide-header {
    align-items: start;
  }
  .partner-guide-mini {
    border-radius: 18px;
  }
}

/* Public project workspace */
.login-view.customer-project-mode {
  width: 100%;
  min-height: 100dvh;
  background: #fff;
}

.login-view.customer-project-mode .customer-project-panel {
  width: min(100%, 1760px);
}

.customer-project-public-header {
  grid-template-columns: 1fr;
  padding: 0 0 14px;
}

.customer-project-header-logo {
  grid-column: 1;
  justify-self: center;
  padding: 0;
  background: #fff;
}

.customer-project-header-logo img {
  display: block;
  width: min(340px, 72vw);
  max-height: 122px;
  object-fit: contain;
  background: #fff;
}

.login-view.customer-project-mode .customer-project-shell {
  grid-template-columns: minmax(360px, 470px) minmax(0, 1fr);
  width: 100%;
}

.customer-project-gate-shell .customer-project-main,
.customer-project-gate-shell .customer-project-catalog {
  min-height: 0;
}

.customer-project-gate-shell .customer-project-catalog {
  min-height: min(700px, calc(100dvh - 170px));
}

.customer-catalog-card,
.customer-project-item,
.customer-catalog-add {
  min-width: 0;
}

.customer-catalog-card strong,
.customer-project-item strong,
.customer-project-item small,
.customer-catalog-add span {
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .login-view.customer-project-mode {
    padding: 16px 12px;
  }

  .login-view.customer-project-mode .customer-project-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .customer-project-main,
  .customer-project-catalog {
    border-radius: 24px;
    padding: 16px;
  }

  .customer-project-catalog {
    position: static;
    max-height: none;
  }

  .customer-catalog-list {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  }
}

@media (max-width: 560px) {
  .login-view.customer-project-mode {
    padding: 12px 10px;
  }

  .customer-project-header-logo img {
    width: min(270px, 78vw);
  }

  .customer-project-main,
  .customer-project-catalog {
    padding: 14px;
    border-radius: 22px;
  }

  .customer-project-head {
    text-align: left;
  }

  .customer-project-head h1 {
    font-size: clamp(30px, 11vw, 42px);
    line-height: 1.02;
  }

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

  .customer-catalog-list {
    grid-template-columns: 1fr;
  }

  .customer-project-item {
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .customer-project-item img,
  .customer-project-thumb {
    width: 62px;
    height: 62px;
  }

  .customer-project-item .project-qty-control {
    grid-column: 2 / 4;
    width: 100%;
  }

  .customer-project-item .minimal-icon-button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

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

  .customer-catalog-add {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }
}

.projects {
  display: grid;
  gap: 18px;
}

.projects-shell {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.project-create-card,
.project-card {
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(17, 17, 20, 0.06);
}

.project-create-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 18px;
  padding: 18px;
  align-items: end;
}

.project-create-card h2 {
  margin: 4px 0 8px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.project-create-card p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

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

.project-address-field {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 8px 12px;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 16px;
  background: #f0f0f2;
}

.project-address-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.project-address-field select,
.project-address-field input {
  width: 100%;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.project-country-field {
  grid-column: 1 / -1;
}

.project-form .primary-button {
  grid-column: 1 / -1;
}

.project-new-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.project-new-contact svg {
  width: 18px;
  height: 18px;
}

.project-contact-preview {
  grid-column: 1 / -1;
  min-height: 46px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 16px;
  background: #f7f7f8;
  color: var(--muted);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 750;
}

.project-control-card {
  position: relative;
  overflow: hidden;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 16px;
  min-width: 0;
}

.project-card {
  padding: 14px;
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.project-card-head,
.project-card-actions,
.project-share-line {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.project-card-head > span:first-child {
  min-width: 0;
}

.project-card-head strong {
  display: block;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.project-card-head small,
.project-activity small {
  color: var(--muted);
}

.project-identifier-line {
  margin-top: 5px;
  font-size: 11px;
}

.project-identifier-line b {
  display: inline-block;
  max-width: min(100%, 220px);
  margin-left: 4px;
  overflow: hidden;
  color: #111114;
  font-weight: 850;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.project-code {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #f2f8f5;
  color: #087348;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 850;
}

.project-info-strip,
.project-contact-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.project-info-strip span,
.project-contact-card span {
  min-width: 0;
  border: 1px solid rgba(17, 17, 20, 0.07);
  border-radius: 14px;
  background: #fbfbfc;
  padding: 9px 10px;
}

.project-info-strip small,
.project-contact-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.project-info-strip strong,
.project-contact-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  font-size: 13px;
}

.project-cart {
  min-height: 132px;
  max-height: 246px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 10px;
  border-radius: 18px;
  background: #f7f7f8;
  padding: 10px;
}

.project-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.project-section-title strong {
  font-size: 13px;
}

.project-section-title small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.project-cart-title {
  grid-column: 1 / -1;
}

.project-cart > span {
  position: relative;
  display: grid;
  grid-template-rows: 78px auto auto auto;
  gap: 7px;
  align-content: start;
  min-height: 174px;
  border: 1px solid rgba(17, 17, 20, 0.07);
  border-radius: 16px;
  background: #fff;
  padding: 8px;
}

.project-cart img,
.project-cart-image-placeholder {
  width: 100%;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
  background: #ededf0;
}

.project-cart-image-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.project-cart strong,
.project-cart small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-cart strong {
  white-space: nowrap;
  font-size: 13px;
}

.project-cart small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.project-remove-item {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(17, 17, 20, 0.08);
}

.project-remove-item svg {
  width: 14px;
  height: 14px;
}

.project-qty-control {
  display: grid;
  grid-template-columns: 30px minmax(38px, 1fr) 30px;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 999px;
  background: #f7f7f8;
  padding: 3px;
}

.project-qty-control button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.project-qty-control input {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.minimal-icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.project-history {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(17, 17, 20, 0.08);
  padding-top: 10px;
}

.project-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(17, 17, 20, 0.07);
  border-radius: 14px;
  background: #fafafa;
  padding: 10px 12px;
}

.project-history-row span,
.project-history-row strong,
.project-history-row small {
  min-width: 0;
}

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

.project-card-actions select {
  min-width: 0;
  flex: 1 1 170px;
}

.project-card-actions input {
  min-width: 0;
  flex: 1 1 112px;
}

.project-card-actions .secondary-button,
.project-card-actions .primary-button {
  min-height: 44px;
  white-space: nowrap;
}

.project-card-actions {
  flex-wrap: wrap;
  align-items: stretch;
}

.project-action-group {
  flex: 1 1 260px;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(17, 17, 20, 0.07);
  border-radius: 18px;
  background: #fbfbfc;
  padding: 10px;
}

.project-service-action-group {
  grid-template-columns: minmax(0, 1.2fr) minmax(82px, 0.35fr) minmax(0, 0.9fr) minmax(120px, 0.55fr) auto;
}

.project-action-group > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-action-group select,
.project-action-group input {
  width: 100%;
}

.project-card-actions .project-add-item,
.project-card-actions .project-add-service {
  flex: 0 0 auto;
}

.project-card-actions .project-service-description {
  flex: 2 1 190px;
}

.project-card-actions .project-checkout {
  flex: 1 1 180px;
  min-width: min(100%, 220px);
}

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

.project-service-list > small {
  color: var(--muted);
}

.project-service-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 16px;
  background: #fff;
  padding: 9px;
}

.project-service-row img,
.project-service-row .project-cart-image-placeholder {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
}

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

.project-service-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

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

.project-totals span,
.customer-project-breakdown span {
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 14px;
  background: #f8f8fa;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.project-totals strong,
.customer-project-breakdown strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 15px;
}

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

.service-admin-panel article,
.work-order-card {
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(17, 17, 20, 0.05);
  padding: 16px;
}

.service-admin-catalog-card {
  grid-column: 1 / -1;
}

.service-admin-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.service-admin-service-form {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.service-admin-form button {
  grid-column: 1 / -1;
}

.service-admin-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.service-admin-list span {
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 999px;
  background: #f7f7f8;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 850;
}

.service-admin-list small {
  margin-left: 6px;
  color: var(--muted);
}

.work-order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

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

.work-order-card h3 {
  margin: 4px 0;
  font-size: 20px;
}

.work-order-card p,
.work-order-card small {
  margin: 0;
  color: var(--muted);
}

.project-share-line {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.project-share-line a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.project-activity {
  display: grid;
  gap: 4px;
}

.project-edit-panel {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8f8fa);
  padding: 12px;
}

.project-edit-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.project-edit-heading strong {
  font-size: 16px;
}

.project-edit-heading small {
  color: var(--muted);
  font-weight: 750;
}

.project-edit-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-edit-form .project-edit-address,
.project-edit-form .project-edit-area,
.project-edit-form .project-save-details {
  grid-column: 1 / -1;
}

.project-earning-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(17, 137, 89, 0.14);
  border-radius: 16px;
  background: #f2faf6;
  color: #087348;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 850;
}

.project-earning-line span {
  color: #637b70;
}

.customer-project-panel {
  width: min(1760px, 100%);
  min-height: calc(100vh - 48px);
  align-self: stretch;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  gap: 24px;
}

.customer-project-panel .login-logo {
  width: min(320px, 62vw);
  margin: 0 auto 4px;
}

.customer-project-shell {
  display: grid;
  grid-template-columns: minmax(360px, 460px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.customer-project-main,
.customer-project-catalog {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.customer-project-main {
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 30px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 22px 70px rgba(17, 17, 20, 0.06);
}

.customer-project-catalog {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 30px;
  background: #f7f7f8;
  padding: 18px;
  box-shadow: 0 22px 70px rgba(17, 17, 20, 0.05);
}

.customer-project-gate-shell .customer-project-catalog {
  min-height: min(720px, calc(100vh - 150px));
}

.customer-project-head {
  display: grid;
  gap: 8px;
  text-align: center;
}

.customer-project-head h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

.customer-project-head p {
  margin: 0 auto;
  max-width: 520px;
  color: var(--muted);
  line-height: 1.45;
}

.customer-project-offer {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, #f7f7f8);
  padding: 16px;
  box-shadow: 0 18px 50px rgba(17, 17, 20, 0.05);
}

.customer-project-offer span {
  color: #6f7178;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-project-offer strong {
  font-size: 20px;
  line-height: 1.15;
}

.customer-project-offer small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.customer-project-offer b {
  color: #111114;
}

.customer-project-offer-amounts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.customer-project-offer-amounts span {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(17, 17, 20, 0.07);
  border-radius: 15px;
  background: #fff;
  padding: 10px 12px;
}

.customer-project-offer-amounts small {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
}

.customer-project-offer-amounts strong {
  font-size: 18px;
  line-height: 1.05;
}

.customer-project-items {
  display: grid;
  gap: 10px;
}

.customer-catalog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
}

.customer-catalog-head strong,
.customer-catalog-head small {
  display: block;
}

.customer-catalog-head strong {
  font-size: 22px;
}

.customer-catalog-head small,
.customer-catalog-body small,
.customer-catalog-body p {
  color: var(--muted);
  font-size: 13px;
}

.customer-catalog-search {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 18px;
  background: #fff;
  padding: 0 14px;
}

.customer-catalog-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}

.customer-catalog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.customer-catalog-card {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 11px;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 24px;
  background: #fff;
  padding: 10px;
  overflow: hidden;
  min-width: 0;
}

.customer-catalog-cover img,
.customer-catalog-cover .customer-project-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  object-fit: cover;
  background: #f0f0f2;
}

.customer-catalog-body {
  display: grid;
  gap: 9px;
  min-width: 0;
  align-content: start;
}

.customer-catalog-body strong,
.customer-catalog-body small {
  display: block;
}

.customer-catalog-body p {
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.customer-catalog-variants {
  display: grid;
  gap: 8px;
  max-height: 178px;
  overflow: auto;
  padding-right: 2px;
}

.customer-catalog-empty {
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
  padding: 16px;
  text-align: center;
}

.customer-project-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 128px 42px;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 18px;
  background: #fff;
  padding: 10px;
}

.customer-project-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.customer-project-add select {
  width: 100%;
  min-width: 0;
}

.customer-catalog-add {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 14px;
  background: #f7f7f8;
  padding: 7px 9px;
  text-align: left;
  cursor: pointer;
}

.customer-catalog-add:hover {
  background: #fff;
}

.customer-catalog-add.is-busy {
  opacity: 0.65;
}

.customer-catalog-add img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  background: #ededee;
}

.customer-catalog-add span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #303036;
  font-size: 13px;
}

.customer-catalog-add strong {
  font-size: 13px;
  white-space: nowrap;
}

.customer-catalog-mini-placeholder {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ededee;
  color: var(--muted);
}

.customer-project-item img,
.customer-project-thumb {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  background: #f0f0f2;
}

.customer-project-thumb {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.customer-project-item strong,
.customer-project-item small {
  display: block;
}

.customer-project-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.customer-project-total,
.customer-project-code,
.loader-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 18px;
  background: #f7f7f8;
  padding: 14px 16px;
}

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

.customer-project-code {
  justify-content: center;
  color: #087348;
  background: #f2faf6;
  font-weight: 850;
}

.customer-project-email {
  display: grid;
  gap: 8px;
}

.customer-project-email span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.customer-project-email input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 18px;
  background: #f7f7f8;
  padding: 0 16px;
  font-size: 16px;
}

.customer-project-error {
  margin: 0;
  border-radius: 16px;
  background: #fff1f2;
  color: var(--danger);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 850;
}

.customer-project-gate-message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 20px;
  background: #fbfbfc;
  padding: 14px;
  box-shadow: 0 16px 45px rgba(17, 17, 20, 0.05);
}

.customer-project-gate-message i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
}

.customer-project-gate-message strong,
.customer-project-gate-message small {
  display: block;
  min-width: 0;
}

.customer-project-gate-message strong {
  font-size: 15px;
  line-height: 1.2;
}

.customer-project-gate-message small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.customer-project-gate-message a {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 999px;
  background: #fff;
  color: #111114;
  font-weight: 850;
  text-decoration: none;
}

.loader-card {
  justify-content: center;
  min-height: 110px;
}

@media (max-width: 820px) {
  .customer-project-public-header {
    grid-template-columns: 1fr;
    padding: 4px 0 2px;
  }

  .customer-project-header-logo,
  .customer-project-public-header nav {
    grid-column: 1;
    justify-self: center;
  }

  .customer-project-public-header nav {
    justify-content: center;
  }

  .customer-project-header-logo img {
    width: min(260px, 74vw);
  }

  .project-create-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }

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

  .project-info-strip,
  .project-contact-card,
  .project-edit-form {
    grid-template-columns: 1fr;
  }

  .project-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card-actions input,
  .project-card-actions select,
  .project-card-actions button {
    width: 100%;
  }

  .project-card-actions .project-checkout {
    grid-column: 1 / -1;
  }

  .project-card-actions .project-variant-select,
  .project-card-actions .project-service-select,
  .project-card-actions .project-service-description {
    grid-column: 1 / -1;
  }

  .project-action-group,
  .project-service-action-group {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .project-service-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .project-service-row > strong,
  .project-service-row .minimal-button {
    grid-column: 2;
    justify-self: start;
  }

  .project-totals,
  .customer-project-breakdown,
  .service-admin-panel,
  .service-admin-form,
  .service-admin-service-form {
    grid-template-columns: 1fr;
  }

  .customer-project-panel {
    width: 100%;
    padding: 0;
  }

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

  .customer-project-catalog {
    position: static;
    max-height: none;
    padding: 12px;
    border-radius: 24px;
  }

  .customer-project-item {
    grid-template-columns: 58px minmax(0, 1fr) 108px;
  }

  .customer-project-item img,
  .customer-project-thumb {
    width: 58px;
    height: 58px;
  }

  .customer-project-item > strong {
    grid-column: 2;
    font-size: 13px;
  }

  .customer-project-item .minimal-icon-button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .customer-project-add,
  .project-history-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .customer-catalog-card {
    grid-template-columns: 1fr;
  }

  .customer-catalog-cover img,
  .customer-catalog-cover .customer-project-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .customer-project-item {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .customer-project-item .project-qty-control,
  .customer-project-item .minimal-icon-button {
    grid-column: 2;
    justify-self: start;
  }
}

/* Final public project overrides */
.login-view.customer-project-mode {
  width: 100%;
  min-height: 100dvh;
  background: #fff;
}

.login-view.customer-project-mode .customer-project-panel {
  width: min(100%, 1760px);
}

.login-view.customer-project-mode .customer-project-public-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
  padding: 0 0 18px;
}

.login-view.customer-project-mode .customer-project-header-logo {
  grid-column: 2;
  justify-self: center;
  background: #fff;
}

.customer-project-store-back {
  grid-column: 1;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(17, 17, 20, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #111114;
  text-decoration: none;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.customer-project-store-back:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 17, 20, 0.22);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

.customer-project-store-back svg {
  width: 20px;
  height: 20px;
}

.customer-project-login-link {
  display: none;
}

.customer-project-login-link:hover {
  color: inherit;
}

.login-project-back {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(17, 17, 20, 0.08);
  border-radius: 999px;
  background: #fff;
  color: #111114;
  text-decoration: none;
}

.login-project-back + .login-logo {
  margin-top: -8px;
}

.login-view.customer-project-mode .customer-project-header-logo img {
  display: block;
  width: min(340px, 72vw);
  max-height: 122px;
  object-fit: contain;
  background: #fff;
}

.login-view.customer-project-mode .customer-project-shell {
  grid-template-columns: minmax(360px, 470px) minmax(0, 1fr);
  width: 100%;
}

.login-view.customer-project-mode .customer-project-gate-shell .customer-project-catalog {
  min-height: min(700px, calc(100dvh - 170px));
}

.login-view.customer-project-mode .customer-catalog-card,
.login-view.customer-project-mode .customer-project-item,
.login-view.customer-project-mode .customer-catalog-add {
  min-width: 0;
}

.login-view.customer-project-mode .customer-catalog-card strong,
.login-view.customer-project-mode .customer-project-item strong,
.login-view.customer-project-mode .customer-project-item small,
.login-view.customer-project-mode .customer-catalog-add span {
  overflow-wrap: anywhere;
}

.customer-project-footer {
  display: grid;
  justify-items: start;
  width: 100%;
  max-width: 1760px;
  margin: 70px auto 0;
  padding: 78px clamp(22px, 7vw, 150px) 34px;
  color: #111114;
  background: #fff;
}

.customer-project-footer a {
  color: #111114;
  text-decoration: none;
}

.customer-project-footer a:hover {
  color: #6f7178;
}

.customer-project-footer-links {
  display: grid;
  align-content: start;
  gap: 7px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 500;
}

.customer-project-footer-links strong {
  margin-bottom: 8px;
  font-weight: 500;
}

@media (max-width: 980px) {
  .login-view.customer-project-mode {
    padding: 16px 12px;
  }

  .login-view.customer-project-mode .customer-project-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .login-view.customer-project-mode .customer-project-main,
  .login-view.customer-project-mode .customer-project-catalog {
    border-radius: 24px;
    padding: 16px;
  }

  .login-view.customer-project-mode .customer-project-catalog {
    position: static;
    max-height: none;
  }

  .login-view.customer-project-mode .customer-catalog-list {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  }

  .customer-project-footer {
    margin-top: 42px;
    padding: 54px 22px 30px;
  }
}

@media (max-width: 560px) {
  .login-view.customer-project-mode {
    padding: 12px 10px;
  }

  .login-view.customer-project-mode .customer-project-header-logo img {
    width: min(270px, 78vw);
  }

  .login-view.customer-project-mode .customer-project-public-header {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
  }

  .customer-project-store-back {
    width: 40px;
    height: 40px;
  }

  .login-view.customer-project-mode .customer-project-header-logo img {
    width: min(230px, 58vw);
  }

  .login-view.customer-project-mode .customer-project-main,
  .login-view.customer-project-mode .customer-project-catalog {
    padding: 14px;
    border-radius: 22px;
  }

  .login-view.customer-project-mode .customer-project-head {
    text-align: left;
  }

  .login-view.customer-project-mode .customer-project-head h1 {
    font-size: clamp(30px, 11vw, 42px);
    line-height: 1.02;
  }

  .login-view.customer-project-mode .customer-project-offer strong {
    font-size: 18px;
  }

  .login-view.customer-project-mode .customer-catalog-list {
    grid-template-columns: 1fr;
  }

  .login-view.customer-project-mode .customer-project-item {
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .login-view.customer-project-mode .customer-project-item img,
  .login-view.customer-project-mode .customer-project-thumb {
    width: 62px;
    height: 62px;
  }

  .login-view.customer-project-mode .customer-project-item .project-qty-control {
    grid-column: 2 / 4;
    width: 100%;
  }

  .login-view.customer-project-mode .customer-project-item .minimal-icon-button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .customer-project-footer {
    margin-top: 34px;
    padding: 42px 10px 26px;
  }

  .customer-project-footer-links {
    font-size: 13px;
  }

}
