:root {
  --ma-purple: #6713e9;
  --ma-purple-deep: #32106f;
  --ma-purple-soft: #f3edff;
  --ma-blue: #087fc1;
  --ma-ink: #18142a;
  --ma-muted: #69647a;
  --ma-line: #e7e1ef;
  --ma-surface: #ffffff;
  --ma-success: #16764d;
  --ma-danger: #b42338;
  --ma-warning: #8a5200;
}

.ma-portal,
.ma-portal * {
  box-sizing: border-box;
}

.ma-portal [hidden] {
  display: none !important;
}

.ma-portal {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 7.5rem 1.25rem 4rem;
  color: var(--ma-ink);
  background:
    radial-gradient(circle at 8% 15%, rgba(103, 19, 233, 0.12), transparent 28rem),
    radial-gradient(circle at 92% 72%, rgba(8, 127, 193, 0.12), transparent 28rem),
    #f9f8fc;
  font-family: "Nunito", Arial, sans-serif;
}

.ma-portal button,
.ma-portal input,
.ma-portal select,
.ma-portal textarea {
  font: inherit;
}

.ma-portal__glow {
  position: absolute;
  z-index: -1;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.72;
  pointer-events: none;
}

.ma-portal__glow--one {
  top: 12rem;
  left: -15rem;
  border: 1px solid rgba(103, 19, 233, 0.2);
  box-shadow: 0 0 0 4rem rgba(103, 19, 233, 0.025), 0 0 0 8rem rgba(103, 19, 233, 0.02);
}

.ma-portal__glow--two {
  right: -13rem;
  bottom: 5rem;
  border: 1px solid rgba(8, 127, 193, 0.2);
  box-shadow: 0 0 0 5rem rgba(8, 127, 193, 0.025), 0 0 0 9rem rgba(8, 127, 193, 0.018);
}

.ma-portal__container {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.ma-portal__intro {
  width: min(900px, 100%);
  margin: 0 auto 3.25rem;
  text-align: center;
}

.ma-portal__eyebrow,
.ma-dashboard__eyebrow,
.ma-portal-state-label,
.ma-auth__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--ma-purple);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ma-portal__eyebrow::before {
  width: 1.9rem;
  height: 2px;
  content: "";
  background: var(--ma-purple);
}

.ma-portal__intro h1 {
  max-width: 850px;
  margin: 0 auto 1.15rem;
  color: var(--ma-ink);
  font-family: "Orbitron", "Nunito", sans-serif;
  font-size: clamp(2rem, 4.6vw, 3.65rem);
  font-weight: 700;
  line-height: 1.09;
  letter-spacing: -0.045em;
}

.ma-portal__intro > p {
  max-width: 730px;
  margin: 0 auto;
  color: var(--ma-muted);
  font-size: clamp(1.03rem, 1.6vw, 1.22rem);
  line-height: 1.7;
}

.ma-portal__assurances {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.65rem;
}

.ma-portal__assurances span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(103, 19, 233, 0.12);
  border-radius: 999px;
  color: #4f475f;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  font-weight: 700;
}

.ma-portal__assurances i {
  display: grid;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ma-purple);
  font-size: 0.7rem;
  font-style: normal;
}

.ma-portal-app {
  min-height: 12rem;
}

.ma-portal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 12rem;
  color: var(--ma-muted);
  font-weight: 700;
}

.ma-portal-spinner {
  width: 1.45rem;
  height: 1.45rem;
  border: 3px solid #e2d8f3;
  border-top-color: var(--ma-purple);
  border-radius: 50%;
  animation: ma-spin 0.75s linear infinite;
}

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

.ma-portal-unavailable {
  width: min(660px, 100%);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.6rem);
  border: 1px solid rgba(103, 19, 233, 0.14);
  border-radius: 1.75rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 28px 80px rgba(49, 25, 85, 0.1);
  text-align: center;
}

.ma-portal-state-icon {
  display: grid;
  width: 4.2rem;
  height: 4.2rem;
  margin: 0 auto 1.2rem;
  place-items: center;
  border: 1px solid rgba(103, 19, 233, 0.2);
  border-radius: 1.25rem;
  color: var(--ma-purple);
  background: var(--ma-purple-soft);
  font-family: "Orbitron", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
}

.ma-portal-unavailable h2,
.ma-empty-workspaces h3 {
  margin: 0 0 0.9rem;
  color: var(--ma-ink);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 900;
  line-height: 1.18;
}

.ma-portal-unavailable p,
.ma-empty-workspaces p {
  margin: 0 auto 1.6rem;
  color: var(--ma-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.ma-button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
  cursor: pointer;
}

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

.ma-button:focus-visible,
.ma-auth-tabs button:focus-visible,
.ma-auth-back:focus-visible,
.ma-auth-link:focus-visible,
.ma-modal__close:focus-visible,
.ma-account-menu summary:focus-visible,
.ma-account-menu__panel button:focus-visible,
.ma-field input:focus-visible,
.ma-field select:focus-visible,
.ma-field textarea:focus-visible,
.ma-legal-checks input:focus-visible,
.ma-legal-gate input:focus-visible {
  outline: 3px solid rgba(103, 19, 233, 0.2);
  outline-offset: 2px;
}

.ma-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.ma-button--primary {
  color: #fff !important;
  background: var(--ma-purple);
  box-shadow: 0 12px 24px rgba(103, 19, 233, 0.22);
}

.ma-button--primary:hover:not(:disabled) {
  background: #5710ca;
  box-shadow: 0 16px 30px rgba(103, 19, 233, 0.27);
}

.ma-button--secondary {
  color: var(--ma-purple) !important;
  border-color: rgba(103, 19, 233, 0.2);
  background: #fff;
}

.ma-button--quiet {
  color: #4d4262 !important;
  border-color: var(--ma-line);
  background: #fff;
  box-shadow: none;
}

.ma-button--danger,
.ma-button--danger-quiet {
  color: #fff !important;
  background: var(--ma-danger);
}

.ma-button--danger {
  box-shadow: 0 12px 24px rgba(180, 35, 56, 0.2);
}

.ma-button--danger-quiet {
  color: var(--ma-danger) !important;
  border-color: rgba(180, 35, 56, 0.23);
  background: #fff7f8;
}

.ma-button--full {
  width: 100%;
}

.ma-button--small {
  min-height: 2.25rem;
  padding: 0.48rem 0.72rem;
  font-size: 0.72rem;
}

.ma-auth {
  display: grid;
  grid-template-columns: minmax(18rem, 0.86fr) minmax(26rem, 1.14fr);
  overflow: hidden;
  border: 1px solid rgba(103, 19, 233, 0.12);
  border-radius: 2rem;
  background: var(--ma-surface);
  box-shadow: 0 35px 100px rgba(48, 21, 86, 0.13);
}

.ma-auth__aside {
  position: relative;
  overflow: hidden;
  padding: clamp(2.1rem, 4vw, 4.1rem);
  color: rgba(255, 255, 255, 0.9);
  background:
    radial-gradient(circle at 0 100%, rgba(23, 155, 220, 0.45), transparent 20rem),
    linear-gradient(145deg, #25104d 0%, #4d129e 58%, #6713e9 100%);
}

.ma-auth__aside::after {
  position: absolute;
  right: -8rem;
  bottom: -8rem;
  width: 19rem;
  height: 19rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 3rem rgba(255, 255, 255, 0.025), 0 0 0 6rem rgba(255, 255, 255, 0.02);
  content: "";
}

.ma-auth__badge {
  position: relative;
  z-index: 1;
  padding: 0.42rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  letter-spacing: 0.08em;
}

.ma-auth__aside h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 1rem;
  color: #fff;
  font-family: "Orbitron", "Nunito", sans-serif;
  font-size: clamp(1.65rem, 2.8vw, 2.55rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.ma-auth__aside > p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
}

.ma-auth__steps {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.15rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.ma-auth__steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.ma-auth__steps li > span {
  display: grid;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0.6rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 900;
}

.ma-auth__steps strong,
.ma-auth__steps small {
  display: block;
}

.ma-auth__steps strong {
  color: #fff;
  font-size: 0.96rem;
}

.ma-auth__steps small {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  line-height: 1.45;
}

.ma-auth__aside > a {
  position: relative;
  z-index: 1;
  color: #fff !important;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 0.22rem;
}

.ma-auth__card {
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.ma-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin-bottom: 2rem;
  padding: 0.3rem;
  border-radius: 0.85rem;
  background: #f4f1f7;
}

.ma-auth-tabs button {
  min-height: 2.75rem;
  border: 0;
  border-radius: 0.64rem;
  color: #6c6378;
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.ma-auth-tabs button[aria-selected="true"] {
  color: var(--ma-purple);
  background: #fff;
  box-shadow: 0 4px 14px rgba(41, 24, 64, 0.08);
}

.ma-auth-heading {
  margin-bottom: 1.4rem;
}

.ma-auth-heading > span {
  color: var(--ma-purple);
  font-size: 0.77rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ma-auth-heading h3 {
  margin: 0.35rem 0 0.45rem;
  color: var(--ma-ink);
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  font-weight: 900;
  line-height: 1.2;
}

.ma-auth-heading p {
  margin: 0;
  color: var(--ma-muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.ma-auth-form {
  animation: ma-panel-in 180ms ease-out;
  overflow-anchor: none;
}

@keyframes ma-panel-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.ma-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.ma-field-grid.ma-field--wide {
  grid-column: 1 / -1;
}

.ma-field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.ma-field--wide {
  grid-column: 1 / -1;
}

.ma-field > span {
  color: #403849;
  font-size: 0.84rem;
  font-weight: 900;
}

.ma-field input,
.ma-field select,
.ma-field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #dcd5e4;
  border-radius: 0.72rem;
  outline: none;
  color: var(--ma-ink);
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ma-phone-control {
  display: grid;
  grid-template-columns: minmax(11rem, 0.75fr) minmax(0, 1.25fr);
  gap: 0.6rem;
}

.ma-phone-control select,
.ma-phone-control input {
  min-width: 0;
}

.ma-password-field {
  align-self: start;
}

.ma-field textarea {
  min-height: 6rem;
  resize: vertical;
}

.ma-field input:hover,
.ma-field select:hover,
.ma-field textarea:hover {
  border-color: #bcaecb;
}

.ma-field input:focus,
.ma-field select:focus,
.ma-field textarea:focus {
  border-color: var(--ma-purple);
  box-shadow: 0 0 0 3px rgba(103, 19, 233, 0.09);
}

.ma-field small {
  color: var(--ma-muted);
  font-size: 0.76rem;
}

.ma-field .ma-required-note,
.ma-legal-checks .ma-required-note {
  display: block;
  margin-top: -0.28rem;
  color: #8a5b00;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.2;
}

.ma-field input[aria-invalid="true"],
.ma-field select[aria-invalid="true"],
.ma-field textarea[aria-invalid="true"],
.ma-custom-choices[aria-invalid="true"] {
  border-color: #bc1f3a;
  box-shadow: 0 0 0 3px rgba(188, 31, 58, 0.1);
}

.ma-field-error {
  display: block;
  margin-top: -0.22rem;
  color: #a51630;
  font-size: 0.73rem;
  font-weight: 800;
  line-height: 1.3;
}

.ma-custom-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  min-height: 3rem;
  padding: 0.65rem 0;
}

.ma-custom-choices label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: #4e4659;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.ma-custom-choices input[type="radio"],
.ma-custom-choices input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 auto;
  width: 1.05rem !important;
  min-height: 0;
  height: 1.05rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  accent-color: var(--ma-purple);
  animation: none !important;
  opacity: 1;
}

.ma-form-section-title {
  display: grid;
  gap: 0.15rem;
  margin: 0.25rem 0 0.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ma-line);
}

.ma-form-section-title strong {
  color: var(--ma-ink);
  font-size: 0.92rem;
  font-weight: 900;
}

.ma-form-section-title span {
  color: var(--ma-muted);
  font-size: 0.78rem;
}

.ma-notification-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.15rem 0 1rem;
  color: #4e4659;
  cursor: pointer;
}

.ma-notification-choice input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.16rem;
  accent-color: var(--ma-purple);
}

.ma-notification-choice > span {
  display: grid;
  gap: 0.08rem;
}

.ma-notification-choice strong {
  font-size: 0.84rem;
}

.ma-notification-choice small {
  color: var(--ma-muted);
  font-size: 0.75rem;
}

.ma-hosting-trust {
  display: grid;
  gap: 0.3rem;
  margin: 0.2rem 0 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(103, 19, 233, 0.14);
  border-radius: 0.85rem;
  background: #f8f5ff;
  color: #4f4659;
  font-size: 0.76rem;
  line-height: 1.48;
}

.ma-hosting-trust strong {
  color: var(--ma-purple);
  font-size: 0.8rem;
}

.ma-field--code input {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.34em;
  text-align: center;
}

.ma-auth-back {
  margin: -0.3rem 0 1.5rem;
  padding: 0;
  border: 0;
  color: var(--ma-purple);
  background: transparent;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.ma-legal-checks,
.ma-legal-gate form {
  display: grid;
  gap: 0.75rem;
  margin: 0.4rem 0 1.2rem;
}

.ma-legal-checks label,
.ma-legal-gate label {
  display: flex;
  align-items: flex-start;
  gap: 0.62rem;
  margin: 0;
  color: #544c60;
  font-size: 0.84rem;
  line-height: 1.45;
  cursor: pointer;
}

.ma-legal-checks input,
.ma-legal-gate input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.12rem;
  accent-color: var(--ma-purple);
}

.ma-legal-checks a,
.ma-legal-gate a {
  color: var(--ma-purple) !important;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 0.16rem;
}

.ma-turnstile {
  min-height: 0;
  margin: 0.4rem 0 1rem;
}

.ma-turnstile:not(:empty) {
  min-height: 4.1rem;
}

.ma-auth-footnote {
  margin: 0.9rem 0 0;
  color: #797183;
  font-size: 0.76rem;
  line-height: 1.45;
  text-align: center;
}

.ma-auth-link {
  display: block;
  margin: 0.85rem auto 0;
  padding: 0.15rem;
  border: 0;
  color: var(--ma-purple);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
  cursor: pointer;
}

.ma-auth-notice,
.ma-dashboard-alert {
  margin-bottom: 1.15rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(180, 35, 56, 0.15);
  border-radius: 0.7rem;
  color: var(--ma-danger);
  background: #fff4f5;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.45;
}

.ma-auth-notice[data-kind="success"] {
  border-color: rgba(22, 118, 77, 0.16);
  color: var(--ma-success);
  background: #f1fbf6;
}

.ma-auth-notice[data-kind="info"] {
  border-color: rgba(8, 127, 193, 0.16);
  color: #075f8e;
  background: #eef8fd;
}

.ma-dashboard {
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(103, 19, 233, 0.12);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 90px rgba(48, 21, 86, 0.12);
}

.ma-dashboard__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--ma-line);
}

.ma-dashboard__eyebrow {
  margin-bottom: 0.35rem;
}

.ma-dashboard__header h2 {
  margin: 0;
  color: var(--ma-ink);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.ma-dashboard__header p {
  margin: 0.35rem 0 0;
  color: var(--ma-muted);
}

.ma-dashboard__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.ma-account-menu {
  position: relative;
  z-index: 12;
}

.ma-account-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.ma-account-menu summary::-webkit-details-marker {
  display: none;
}

.ma-account-menu summary > span {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.14rem) rotate(45deg);
  transition: transform 160ms ease;
}

.ma-account-menu[open] summary > span {
  transform: translateY(0.14rem) rotate(225deg);
}

.ma-account-menu__panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  display: grid;
  width: max-content;
  min-width: 13.5rem;
  padding: 0.45rem;
  border: 1px solid var(--ma-line);
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 18px 48px rgba(34, 20, 53, 0.18);
}

.ma-account-menu__panel button {
  width: 100%;
  padding: 0.72rem 0.8rem;
  border: 0;
  border-radius: 0.58rem;
  color: #4d4262;
  background: transparent;
  font-size: 0.79rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.ma-account-menu__panel button:hover {
  color: var(--ma-purple);
  background: #f7f2ff;
}

.ma-account-menu__panel .ma-account-menu__danger {
  margin-top: 0.25rem;
  border-top: 1px solid rgba(180, 35, 56, 0.12);
  border-radius: 0.2rem 0.2rem 0.58rem 0.58rem;
  color: var(--ma-danger);
}

.ma-account-menu__panel .ma-account-menu__danger:hover {
  color: var(--ma-danger);
  background: #fff4f5;
}

.ma-modal {
  width: min(34rem, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100vh - 2rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 1.35rem;
  color: var(--ma-ink);
  background: #fff;
  box-shadow: 0 32px 100px rgba(28, 12, 51, 0.3);
}

.ma-modal--wide {
  width: min(46rem, calc(100% - 2rem));
}

.ma-modal::backdrop {
  background: rgba(20, 12, 31, 0.62);
  backdrop-filter: blur(3px);
}

.ma-modal__surface {
  background: #fff;
}

.ma-modal__header {
  position: relative;
  padding: 1.6rem 4rem 1.25rem 1.6rem;
  border-bottom: 1px solid var(--ma-line);
  background: linear-gradient(135deg, #faf7ff, #f1f9fd);
}

.ma-modal__header > div > span {
  color: var(--ma-purple);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ma-modal__header h3 {
  margin: 0.35rem 0 0.45rem;
  color: var(--ma-ink);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.2;
}

.ma-modal__header p {
  margin: 0;
  color: var(--ma-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.ma-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(103, 19, 233, 0.14);
  border-radius: 50%;
  color: #554861;
  background: rgba(255, 255, 255, 0.9);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.ma-modal__form {
  padding: 1.5rem 1.6rem 1.65rem;
}

.ma-modal__fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ma-email-change-verification > p:first-child {
  margin: 0 0 1.15rem;
  color: var(--ma-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.ma-email-change-verification > p:first-child strong {
  color: var(--ma-ink);
  overflow-wrap: anywhere;
}

.ma-modal__complete {
  display: grid;
  gap: 1.2rem;
  padding: 1.7rem 1.6rem;
}

.ma-modal__complete p {
  margin: 0;
  padding: 1rem;
  border: 1px solid rgba(22, 118, 77, 0.18);
  border-radius: 0.8rem;
  color: var(--ma-success);
  background: #f1fbf6;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.55;
  text-align: center;
}

.ma-modal.is-complete .ma-modal__header,
.ma-modal.is-complete .ma-modal__form {
  display: none;
}

.ma-deletion-summary {
  margin-bottom: 1.1rem;
  padding: 1rem;
  border: 1px solid rgba(180, 35, 56, 0.18);
  border-radius: 0.85rem;
  color: #584c5d;
  background: #fff7f8;
  font-size: 0.82rem;
  line-height: 1.5;
}

.ma-deletion-summary > strong {
  color: var(--ma-danger);
}

.ma-deletion-summary ul {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;
}

.ma-deletion-summary li + li {
  margin-top: 0.5rem;
}

.ma-deletion-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 1rem;
  color: #4e4659;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.45;
  cursor: pointer;
}

.ma-deletion-confirmation input {
  flex: 0 0 auto;
  width: 1.08rem;
  height: 1.08rem;
  margin-top: 0.14rem;
  accent-color: var(--ma-danger);
}

.ma-modal__buttons {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
}

.ma-modal__form .ma-field:last-of-type {
  margin-bottom: 1.15rem;
}

.ma-modal__notice {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(8, 127, 193, 0.16);
  border-radius: 0.7rem;
  color: #075f8e;
  background: #eef8fd;
  font-size: 0.79rem;
  font-weight: 800;
  line-height: 1.45;
}

.ma-modal__notice[data-kind="success"] {
  border-color: rgba(22, 118, 77, 0.16);
  color: var(--ma-success);
  background: #f1fbf6;
}

.ma-modal__notice[data-kind="error"] {
  border-color: rgba(180, 35, 56, 0.15);
  color: var(--ma-danger);
  background: #fff4f5;
}

.ma-dashboard-alert {
  display: grid;
  gap: 0.16rem;
  margin: 1.25rem 0 0;
  border-color: rgba(138, 82, 0, 0.18);
  color: var(--ma-warning);
  background: #fff8ea;
}

.ma-dashboard-alert span {
  color: #775f36;
  font-weight: 600;
}

.ma-email-verification {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem 1.25rem;
}

.ma-email-verification > div {
  display: grid;
  gap: 0.16rem;
}

.ma-email-verification form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.ma-email-verification form label {
  margin: 0;
}

.ma-email-verification form input {
  width: 6.2rem;
  min-height: 2.65rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(138, 82, 0, 0.28);
  border-radius: 0.65rem;
  color: var(--ma-ink);
  background: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-align: center;
}

.ma-email-verification form input:focus {
  border-color: var(--ma-purple);
  outline: none;
  box-shadow: 0 0 0 3px rgba(103, 19, 233, 0.09);
}

.ma-email-verification form .ma-button {
  min-height: 2.65rem;
  padding: 0.62rem 0.85rem;
}

.ma-email-verification > p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
}

.ma-email-verification > p[data-kind="success"] {
  color: var(--ma-success);
}

.ma-email-verification > p[data-kind="error"] {
  color: var(--ma-danger);
}

.ma-legal-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.9fr);
  gap: 2rem;
  margin: 1.25rem 0;
  padding: 1.4rem;
  border: 1px solid rgba(103, 19, 233, 0.18);
  border-radius: 1rem;
  background: var(--ma-purple-soft);
}

.ma-legal-gate > div > span {
  color: var(--ma-purple);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ma-legal-gate h3 {
  margin: 0.35rem 0;
  color: var(--ma-ink);
  font-size: 1.25rem;
  font-weight: 900;
}

.ma-legal-gate p {
  margin: 0;
  color: var(--ma-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.ma-legal-gate form {
  align-content: start;
  margin: 0;
}

.ma-commerce-return {
  margin: 1.25rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(8, 127, 193, 0.18);
  border-radius: 0.8rem;
  color: #075f8e;
  background: #eef8fd;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.5;
}

.ma-commerce-return[data-kind="success"] {
  border-color: rgba(22, 118, 77, 0.18);
  color: var(--ma-success);
  background: #f1fbf6;
}

.ma-commerce-return[data-kind="error"] {
  border-color: rgba(180, 35, 56, 0.16);
  color: var(--ma-danger);
  background: #fff4f5;
}

.ma-commerce-return__action {
  display: inline-flex;
  margin-left: 0.75rem;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
  font-weight: 950;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
  cursor: pointer;
}

.ma-pending-payments {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
}

.ma-pending-payment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(180, 35, 56, 0.16);
  border-radius: 0.85rem;
  color: var(--ma-danger);
  background: #fff4f5;
}

.ma-pending-payment > div {
  display: grid;
  gap: 0.18rem;
}

.ma-pending-payment strong {
  font-size: 0.86rem;
  font-weight: 950;
}

.ma-pending-payment span {
  color: #6e5360;
  font-size: 0.76rem;
  line-height: 1.45;
}

.ma-pending-payment .ma-button {
  flex: 0 0 auto;
}

.ma-workspaces__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.4rem;
}

.ma-workspaces__header span {
  color: var(--ma-purple);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ma-workspaces__header p {
  margin: 0.2rem 0 0;
  color: var(--ma-muted);
  font-size: 0.84rem;
}

.ma-commerce-dialog {
  width: min(68rem, calc(100% - 2rem));
}

.ma-commerce-loading {
  display: grid;
  min-height: 13rem;
  padding: 3rem 1.5rem;
  place-items: center;
  align-content: center;
  gap: 0.8rem;
  color: var(--ma-muted);
  text-align: center;
}

.ma-commerce-loading p {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
}

.ma-commerce-item-form,
.ma-commerce-cart {
  padding: 1.45rem 1.6rem;
}

.ma-commerce-item-form {
  display: grid;
  gap: 1.2rem;
  border-bottom: 1px solid var(--ma-line);
}

.ma-commerce-section {
  padding: 1rem;
  border: 1px solid var(--ma-line);
  border-radius: 1rem;
  background: #fff;
}

.ma-commerce-section__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ma-commerce-section__heading > div > span {
  color: var(--ma-purple);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ma-commerce-section__heading h4 {
  margin: 0.18rem 0 0;
  color: var(--ma-ink);
  font-size: 1.12rem;
  font-weight: 900;
}

.ma-commerce-section__heading p {
  max-width: 27rem;
  margin: 0;
  color: var(--ma-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: right;
}

.ma-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.ma-plan-choice {
  position: relative;
  display: grid;
  min-height: 11rem;
  padding: 1rem;
  border: 1px solid var(--ma-line);
  border-radius: 0.9rem;
  background: #fbfafd;
  cursor: pointer;
}

.ma-plan-choice:hover {
  border-color: rgba(103, 19, 233, 0.35);
}

.ma-plan-choice:has(input:checked) {
  border-color: var(--ma-purple);
  background: #f7f2ff;
  box-shadow: 0 0 0 3px rgba(103, 19, 233, 0.08);
}

.ma-plan-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ma-plan-choice__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.ma-plan-choice__top strong {
  color: var(--ma-ink);
  font-size: 0.94rem;
  line-height: 1.3;
}

.ma-plan-choice__top em {
  padding: 0.22rem 0.4rem;
  border-radius: 999px;
  color: var(--ma-purple);
  background: var(--ma-purple-soft);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.ma-plan-choice__price {
  align-self: center;
  margin: 0.8rem 0;
  color: var(--ma-purple-deep);
  font-size: 1.35rem;
  font-weight: 950;
}

.ma-plan-choice__features {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  color: #5d5368;
  font-size: 0.72rem;
  list-style: none;
}

.ma-plan-choice__features li::before {
  margin-right: 0.35rem;
  color: var(--ma-success);
  content: "✓";
  font-weight: 900;
}

.ma-plan-choice__features li.ma-plan-choice__note::before {
  color: var(--ma-purple);
  content: "*";
}

.ma-cycle-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.ma-commerce-trial-note {
  margin: 0.8rem 0 0;
  padding: 0.72rem 0.85rem;
  border-left: 3px solid var(--ma-purple);
  border-radius: 0.45rem;
  color: var(--ma-muted);
  background: #f8f4ff;
  font-size: 0.78rem;
  line-height: 1.5;
}

.ma-cycle-choice,
.ma-payment-choice {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.62rem 0.75rem;
  border: 1px solid var(--ma-line);
  border-radius: 0.7rem;
  color: #554b61;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.ma-cycle-choice:has(input:checked),
.ma-payment-choice:has(input:checked) {
  border-color: var(--ma-purple);
  color: var(--ma-purple-deep);
  background: #f7f2ff;
}

.ma-cycle-choice input,
.ma-payment-choice input {
  accent-color: var(--ma-purple);
}

.ma-payment-choice > span {
  display: grid;
  gap: 0.08rem;
}

.ma-payment-choice strong {
  color: inherit;
  font-size: 0.78rem;
  line-height: 1.15;
}

.ma-payment-choice small {
  color: var(--ma-purple);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.15;
}

.ma-commerce-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.ma-commerce-stamps {
  grid-column: 1 / -1;
  max-width: calc(50% - 0.4rem);
}

.ma-commerce-cart {
  display: grid;
  gap: 1rem;
  background: #fbfafd;
}

.ma-commerce-cart__items {
  display: grid;
  gap: 0.65rem;
}

.ma-commerce-cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--ma-line);
  border-radius: 0.8rem;
  background: #fff;
}

.ma-commerce-cart-item strong,
.ma-commerce-cart-item span {
  display: block;
}

.ma-commerce-cart-item strong {
  color: var(--ma-ink);
  font-size: 0.86rem;
}

.ma-commerce-cart-item span {
  margin-top: 0.15rem;
  color: var(--ma-muted);
  font-size: 0.72rem;
}

.ma-commerce-cart-item__amount {
  color: var(--ma-purple-deep);
  font-size: 0.9rem;
  font-weight: 900;
  white-space: nowrap;
}

.ma-commerce-cart-item button {
  padding: 0.35rem 0.55rem;
  border: 0;
  color: var(--ma-danger);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.ma-commerce-summary {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid rgba(103, 19, 233, 0.16);
  border-radius: 0.85rem;
  background: #fff;
}

.ma-commerce-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ma-muted);
  font-size: 0.8rem;
}

.ma-commerce-summary__total {
  margin-top: 0.2rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--ma-line);
  color: var(--ma-ink) !important;
  font-size: 1rem !important;
  font-weight: 900;
}

.ma-commerce-summary small,
.ma-commerce-payments small {
  color: var(--ma-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.ma-commerce-payments {
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--ma-line);
  border-radius: 0.85rem;
  background: #fff;
}

.ma-commerce-payments legend {
  padding: 0 0.25rem;
  color: var(--ma-ink);
  font-size: 0.82rem;
  font-weight: 900;
}

#ma-commerce-payment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.ma-bank-transfer {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(103, 19, 233, 0.16);
  border-radius: 0.9rem;
  background: #fff;
}

.ma-bank-transfer__instructions {
  padding: 1rem;
  border-left: 3px solid var(--ma-purple);
  border-radius: 0.55rem;
  color: #554b61;
  background: #f8f4ff;
  font-size: 0.8rem;
  line-height: 1.55;
}

.ma-bank-transfer__reference,
.ma-bank-transfer__amount {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--ma-line);
  border-radius: 0.8rem;
  background: #fbfafd;
}

.ma-bank-transfer__reference > div,
.ma-bank-transfer__amount {
  flex: 1 1 auto;
}

.ma-bank-transfer__reference span,
.ma-bank-transfer__amount span {
  display: block;
  color: var(--ma-muted);
  font-size: 0.7rem;
  font-weight: 850;
}

.ma-bank-transfer__reference strong,
.ma-bank-transfer__amount strong {
  display: block;
  margin-top: 0.12rem;
  color: var(--ma-purple-deep);
  font-size: 1rem;
  font-weight: 950;
}

.ma-bank-transfer__accounts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.ma-bank-account {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  border: 1px solid var(--ma-line);
  border-radius: 0.8rem;
  background: #fff;
}

.ma-bank-account__title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ma-ink);
  font-size: 0.88rem;
  font-weight: 950;
}

.ma-bank-account__title img {
  width: 2.2rem;
  height: 2.2rem;
  object-fit: contain;
}

.ma-bank-account__line {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  color: #51475d;
  font-size: 0.72rem;
}

.ma-bank-account__line span {
  color: var(--ma-muted);
  font-weight: 850;
}

.ma-bank-account__line strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ma-bank-account__line button {
  padding: 0;
  border: 0;
  color: var(--ma-purple);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
}

.ma-bank-transfer__form {
  display: grid;
  gap: 0.85rem;
}

.ma-bank-transfer__form > p:first-child {
  margin: 0;
  color: var(--ma-danger);
  font-size: 0.76rem;
  font-weight: 850;
}

.ma-empty-workspaces {
  padding: 3rem 1rem 1rem;
  text-align: center;
}

.ma-empty-workspaces .ma-portal-state-icon {
  width: 4.5rem;
  font-size: 0.85rem;
}

.ma-workspace-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.6rem 1rem;
  margin-top: 1.25rem;
}

.ma-workspace-filters label {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  color: var(--ma-ink);
  font-size: 0.85rem;
  font-weight: 700;
}

.ma-workspace-filters input,
.ma-workspace-filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 2.8rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--ma-line);
  border-radius: 0.6rem;
  color: var(--ma-ink);
  background: #fff;
  font: inherit;
  font-weight: 400;
}

.ma-workspace-filters p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.8rem;
  color: var(--ma-muted);
}

.ma-workspace-status {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.ma-workspace-status[data-kind="error"] { color: var(--ma-danger); }
.ma-workspace-status[data-kind="success"] { color: var(--ma-success); }

.ma-workspace-favorite {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: var(--ma-muted);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.ma-workspace-favorite__star { font-size: 1.3rem; line-height: 1; }
.ma-workspace-favorite[aria-pressed="true"] { color: var(--ma-purple); background: #f4edff; }
.ma-workspace-favorite:hover:not(:disabled),
.ma-workspace-favorite:focus-visible { border-color: var(--ma-purple); color: var(--ma-purple); }
.ma-workspace-favorite:disabled { cursor: default; opacity: 0.6; }

@media (max-width: 600px) {
  .ma-workspace-filters { grid-template-columns: minmax(0, 1fr); }
}

.ma-workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.ma-workspace-card {
  position: relative;
  overflow: hidden;
  padding: 1.35rem;
  border: 1px solid var(--ma-line);
  border-radius: 1rem;
  background: #fff;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.ma-workspace-card:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 19, 233, 0.3);
  box-shadow: 0 14px 32px rgba(55, 32, 78, 0.08);
}

.ma-workspace-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  content: "";
  background: var(--ma-purple);
}

.ma-workspace-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.ma-workspace-card__rfc {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ma-purple);
  font-family: "Orbitron", monospace;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ma-workspace-card h3 {
  margin: 0;
  color: var(--ma-ink);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.3;
}

.ma-workspace-card__status {
  flex: 0 0 auto;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: var(--ma-success);
  background: #eaf8f0;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ma-workspace-card__status-column {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.ma-workspace-upgrade {
  min-height: 1.9rem;
  padding: 0.32rem 0.68rem;
  border: 1px solid var(--ma-purple);
  border-radius: 999px;
  color: #fff;
  background: var(--ma-purple);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(103, 19, 233, 0.18);
}

.ma-workspace-upgrade:hover:not(:disabled),
.ma-workspace-upgrade:focus-visible:not(:disabled) {
  border-color: #5710c8;
  background: #5710c8;
}

.ma-workspace-upgrade:disabled {
  border-color: #d8d2de;
  color: #82798c;
  background: #eeeaf1;
  cursor: default;
  box-shadow: none;
}

.ma-workspace-upgrade__icon {
  font-size: 0.9rem;
}

.ma-workspace-card__status[data-status="inactive"],
.ma-workspace-card__status[data-status="cancelled"],
.ma-workspace-card__status[data-status="suspended"] {
  color: var(--ma-danger);
  background: #fff0f2;
}

.ma-workspace-card__status[data-status="pending"] {
  color: #8a5900;
  background: #fff6df;
}

.ma-workspace-card__status[data-status="configuring"] {
  color: #096b9f;
  background: #eaf7fd;
}

.ma-workspace-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1.1rem 0;
  padding: 0.9rem;
  border-radius: 0.75rem;
  background: #f8f6fa;
}

.ma-workspace-card__meta span {
  display: block;
  color: #82798c;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ma-workspace-card__meta strong {
  display: block;
  margin-top: 0.18rem;
  color: #403749;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.ma-workspace-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ma-workspace-card__features span {
  padding: 0.3rem 0.5rem;
  border: 1px solid rgba(8, 127, 193, 0.14);
  border-radius: 999px;
  color: #096b9f;
  background: #f0f9fd;
  font-size: 0.7rem;
  font-weight: 800;
}

.ma-workspace-card__benefits {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
  margin-bottom: 1rem;
}

.ma-workspace-card__included {
  display: grid;
  justify-items: end;
  gap: 0.38rem;
  margin-left: auto;
}

.ma-workspace-card__included > strong {
  color: #82798c;
  font-size: 0.68rem;
  font-weight: 850;
}

.ma-workspace-stamps {
  flex: 0 0 auto;
  min-height: 1.9rem;
  padding: 0.32rem 0.68rem;
  border: 1px solid var(--ma-purple);
  border-radius: 999px;
  color: #fff;
  background: var(--ma-purple);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(103, 19, 233, 0.18);
}

.ma-workspace-stamps:hover:not(:disabled),
.ma-workspace-stamps:focus-visible:not(:disabled) {
  border-color: #5710c8;
  background: #5710c8;
}

.ma-workspace-stamps:disabled {
  border-color: #d8d2de;
  color: #82798c;
  background: #eeeaf1;
  cursor: default;
  box-shadow: none;
}

.ma-workspace-card .ma-button {
  width: 100%;
}

.ma-rfc-prerequisites {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(8, 127, 193, 0.15);
  border-radius: 0.85rem;
  background: #f4fbff;
}

.ma-rfc-prerequisites p {
  margin: 0;
  color: #536576;
  font-size: 0.8rem;
  line-height: 1.55;
}

.ma-rfc-prerequisites a,
.ma-config-block a {
  color: #096b9f;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

.ma-workspace-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.ma-workspace-card .ma-workspace-card__actions .ma-button {
  min-width: 0;
}

.ma-button--configuration:not(:disabled) {
  border-color: #096b9f;
  color: #fff !important;
  background: #096b9f;
}

.ma-button--configuration:not(:disabled):hover {
  border-color: #075b87;
  background: #075b87;
}

.ma-button--work-ready:not(:disabled),
.ma-button--work-ready:not(:disabled):hover {
  border-color: var(--ma-purple);
  color: #fff !important;
  background: var(--ma-purple);
  box-shadow: 0 12px 24px rgba(103, 19, 233, 0.22);
}

.ma-rfc-tools {
  margin-top: 1.4rem;
}

.ma-rfc-tools__header,
.ma-rfc-tool-panel__header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ma-line);
}

.ma-rfc-tools__header > .ma-button,
.ma-rfc-tool-panel__header > .ma-button,
.ma-rfc-tool-panel__actions {
  justify-self: end;
}

.ma-rfc-tool-panel__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.ma-rfc-tools__header > div > span,
.ma-rfc-tool-panel__header > div > span {
  color: var(--ma-purple);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ma-rfc-tools__header h3,
.ma-rfc-tool-panel__header h4 {
  margin: 0.18rem 0 0;
  color: var(--ma-ink);
  font-weight: 950;
}

.ma-rfc-tools__header p,
.ma-rfc-tool-panel__header p {
  margin: 0.3rem 0 0;
  color: var(--ma-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.ma-rfc-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.ma-rfc-tool-card {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  min-height: 6.4rem;
  padding: 0.95rem;
  border: 1px solid rgba(103, 19, 233, 0.17);
  border-radius: 0.9rem;
  color: var(--ma-ink);
  background: linear-gradient(145deg, #fff, #faf7ff);
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.ma-rfc-tool-card:hover:not(:disabled),
.ma-rfc-tool-card:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(103, 19, 233, 0.4);
  outline: none;
  box-shadow: 0 12px 25px rgba(55, 32, 78, 0.09);
}

.ma-rfc-tool-card:disabled {
  border-color: #e3dee7;
  color: #7d7485;
  background: #f7f5f8;
  cursor: default;
}

.ma-rfc-tool-card__icon {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 0.75rem;
  color: #fff;
  background: linear-gradient(145deg, var(--ma-purple), #4d0caf);
  font-size: 1.05rem;
  box-shadow: 0 8px 18px rgba(103, 19, 233, 0.18);
}

.ma-rfc-tool-card:disabled .ma-rfc-tool-card__icon {
  color: #81768a;
  background: #e9e4ec;
  box-shadow: none;
}

.ma-rfc-tool-card__copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.ma-rfc-tool-card__copy strong {
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1.25;
}

.ma-rfc-tool-card__copy small {
  color: var(--ma-muted);
  font-size: 0.71rem;
  font-weight: 700;
  line-height: 1.35;
}

.ma-rfc-tool-panel__status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.3rem;
  margin-top: 0.8rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.7rem;
  color: #536576;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.45;
}

.ma-rfc-tool-panel__status[data-kind="error"] {
  color: var(--ma-danger);
  background: #fff4f5;
}

.ma-rfc-tool-panel__status[data-kind="warning"] {
  color: #8a5900;
  background: #fff8e8;
}

.ma-rfc-tool-panel {
  margin-top: 1rem;
}

.ma-invoice-workspace {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(15rem, 0.65fr);
  align-items: start;
  gap: 1rem;
}

.ma-invoice-form,
.ma-invoice-drafts {
  min-width: 0;
  border: 1px solid var(--ma-line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.86);
}

.ma-invoice-form {
  overflow: hidden;
  overflow-anchor: none;
}

.ma-invoice-capture {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

#ma-invoice-demo-notice,
.ma-invoice-demo-result {
  margin: 1rem;
}

.ma-invoice-demo-result {
  padding: 1rem;
  border: 1px solid var(--ma-line);
  border-radius: 0.8rem;
  overflow-wrap: anywhere;
}

.ma-invoice-demo-result p { white-space: pre-line; }
.ma-invoice-demo-result__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }

.ma-invoice-section {
  padding: 1rem;
  border-bottom: 1px solid var(--ma-line);
}

.ma-invoice-section__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.ma-invoice-section__heading span,
.ma-invoice-drafts__heading span {
  display: block;
  color: var(--ma-purple);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ma-invoice-section__heading h5,
.ma-invoice-drafts__heading h5 {
  margin: 0.12rem 0 0;
  color: var(--ma-ink);
  font-size: 0.9rem;
  font-weight: 950;
}

.ma-invoice-section__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.ma-invoice-general-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ma-invoice-general-grid > .ma-field,
.ma-invoice-item__grid > .ma-field,
.ma-invoice-item__supplement-grid > .ma-field {
  min-width: 0;
  align-self: start;
  align-content: start;
}

.ma-invoice-item__grid > .ma-field > span,
.ma-invoice-item__supplement-grid > .ma-field > span {
  display: flex;
  min-height: 3.15rem;
  align-items: flex-end;
  line-height: 1.25;
}

.ma-invoice-item__grid > .ma-field input,
.ma-invoice-item__grid > .ma-field select,
.ma-invoice-item__supplement-grid > .ma-field input,
.ma-invoice-item__supplement-grid > .ma-field select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.ma-invoice-notes-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ma-invoice-options,
.ma-invoice-local-taxes {
  display: grid;
  gap: 0.75rem;
}

.ma-invoice-option {
  min-width: 0;
  border: 1px solid #e7dfeb;
  border-radius: 0.65rem;
  background: #fbf9fc;
}

.ma-invoice-option__toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.8rem 0.35rem;
  color: var(--ma-ink);
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.ma-invoice-option__toggle:has(input:disabled) {
  cursor: default;
}

.ma-invoice-option__toggle input {
  flex: 0 0 1rem;
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--ma-purple);
}

.ma-invoice-option__help {
  margin: 0;
  color: var(--ma-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.ma-invoice-option > .ma-invoice-option__help {
  padding: 0 0.8rem 0.7rem;
}

.ma-invoice-option__fields {
  min-width: 0;
  margin: 0;
  padding: 0.25rem 0.8rem 0.8rem;
  border: 0;
}

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

.ma-invoice-option__fields > .ma-invoice-option__help:last-child {
  margin-top: 0.65rem;
}

.ma-invoice-global-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ma-invoice-option__fields .ma-field {
  min-width: 0;
  align-self: start;
  align-content: start;
}

.ma-invoice-option__fields input,
.ma-invoice-option__fields select,
.ma-invoice-option__fields textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.ma-invoice-local-tax {
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid #e7dfeb;
  border-radius: 0.6rem;
  background: #fff;
}

.ma-invoice-local-tax__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0.65rem;
}

.ma-invoice-local-tax__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.ma-invoice-items {
  display: grid;
  gap: 0.75rem;
}

.ma-invoice-item-add {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.ma-invoice-series-display {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 3rem;
  overflow: hidden;
  border: 1px solid #dcd5e4;
  border-radius: 0.72rem;
  background: #fff;
}

.ma-invoice-series-display > div {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 0.1rem;
  padding: 0.42rem 0.72rem;
}

.ma-invoice-series-display > div + div {
  border-left: 1px solid #e6dfeb;
}

.ma-invoice-series-display small {
  overflow: hidden;
  color: var(--ma-muted);
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ma-invoice-series-display strong {
  overflow-wrap: anywhere;
  color: var(--ma-purple);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.2;
}

.ma-invoice-item {
  overflow: hidden;
  border: 1px solid #e8e1ed;
  border-radius: 0.75rem;
  background: #fbf9fc;
}

.ma-invoice-item__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.65rem;
  padding: 0.75rem;
  border-bottom: 1px solid #eee8f1;
}

.ma-invoice-item__header .ma-field {
  margin: 0;
}

.ma-invoice-item__remove {
  min-height: 2.5rem;
}

.ma-invoice-item__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 0.65rem;
  padding: 0.75rem;
}

.ma-invoice-item__comments {
  grid-column: span 2;
}

.ma-invoice-item__supplements {
  display: grid;
  gap: 0.6rem;
  padding: 0 0.75rem 0.75rem;
}

.ma-invoice-item__supplement {
  overflow: hidden;
  border: 1px solid #e7dfeb;
  border-radius: 0.65rem;
  background: #fff;
}

.ma-invoice-item__toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  color: var(--ma-ink);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.ma-invoice-item__toggle input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--ma-purple);
}

.ma-invoice-item__supplement-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 0.65rem;
  padding: 0 0.75rem 0.75rem;
}

.ma-invoice-item__supplement-wide {
  grid-column: span 2;
}

.ma-invoice-item__result {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 0 0.75rem 0.75rem;
  color: var(--ma-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.ma-invoice-item__result strong {
  color: var(--ma-ink);
}

.ma-invoice-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 1rem;
  background: #f8f5fb;
}

.ma-invoice-summary > div {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.ma-invoice-summary span {
  color: var(--ma-muted);
  font-size: 0.65rem;
  font-weight: 850;
  text-transform: uppercase;
}

.ma-invoice-summary strong {
  overflow-wrap: anywhere;
  color: var(--ma-ink);
  font-size: 0.88rem;
}

.ma-invoice-summary__total strong {
  color: var(--ma-purple);
  font-size: 1rem;
}

.ma-invoice-actions {
  margin: 0;
  padding: 0 1rem 1rem;
}

.ma-invoice-drafts {
  position: sticky;
  top: 6.5rem;
  padding: 0.9rem;
}

.ma-invoice-drafts__empty {
  margin: 0.75rem 0 0;
  color: var(--ma-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.ma-invoice-drafts__list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.ma-invoice-draft-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem;
  border: 1px solid #e8e1ed;
  border-radius: 0.7rem;
  background: #fff;
}

.ma-invoice-draft-card strong,
.ma-invoice-draft-card span,
.ma-invoice-draft-card small {
  overflow-wrap: anywhere;
}

.ma-invoice-draft-card strong {
  color: var(--ma-ink);
  font-size: 0.78rem;
}

.ma-invoice-draft-card span,
.ma-invoice-draft-card small {
  color: var(--ma-muted);
  font-size: 0.68rem;
}

.ma-invoice-draft-card__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
}

.ma-invoice-draft-card__actions button {
  min-height: 2.1rem;
  padding: 0.42rem 0.55rem;
  font-size: 0.68rem;
}

.ma-rfc-units-table-wrap,
.ma-rfc-products-table-wrap,
.ma-rfc-clients-table-wrap {
  margin-top: 0.9rem;
  overflow-x: auto;
  border: 1px solid var(--ma-line);
  border-radius: 0.85rem;
}

.ma-rfc-units-table,
.ma-rfc-products-table,
.ma-rfc-clients-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.78rem;
}

.ma-rfc-units-table th,
.ma-rfc-units-table td,
.ma-rfc-products-table th,
.ma-rfc-products-table td,
.ma-rfc-clients-table th,
.ma-rfc-clients-table td {
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid #eeeaf1;
  color: #554b5c;
  text-align: left;
  vertical-align: middle;
}

.ma-rfc-units-table th,
.ma-rfc-products-table th,
.ma-rfc-clients-table th {
  color: #6f6577;
  background: #f8f6fa;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.ma-rfc-units-table tbody tr:last-child td,
.ma-rfc-products-table tbody tr:last-child td,
.ma-rfc-clients-table tbody tr:last-child td {
  border-bottom: 0;
}

.ma-rfc-unit-status {
  display: inline-flex;
  padding: 0.24rem 0.48rem;
  border-radius: 999px;
  color: var(--ma-success);
  background: #eaf8f0;
  font-size: 0.66rem;
  font-weight: 900;
}

.ma-rfc-unit-status[data-active="false"] {
  color: #7d7485;
  background: #eeeaf1;
}

.ma-rfc-unit-edit {
  min-height: 2.2rem;
  padding: 0.45rem 0.72rem;
  border: 1px solid rgba(103, 19, 233, 0.24);
  border-radius: 999px;
  color: var(--ma-purple);
  background: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
}

.ma-rfc-unit-edit:hover,
.ma-rfc-unit-edit:focus-visible {
  border-color: var(--ma-purple);
  outline: none;
  background: #f7f0ff;
}

.ma-rfc-cell-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ma-rfc-row-toggle {
  display: none;
}

.ma-rfc-unit-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ma-rfc-products-table {
  min-width: 59rem;
  table-layout: fixed;
}

.ma-rfc-products-table th,
.ma-rfc-products-table td {
  overflow-wrap: anywhere;
}

.ma-rfc-products-table th:nth-child(2),
.ma-rfc-products-table td:nth-child(2) {
  width: 16rem;
  white-space: normal;
  word-break: break-word;
}

.ma-rfc-products-table th:nth-child(1),
.ma-rfc-products-table td:nth-child(1) { width: 6rem; }

.ma-rfc-products-table th:nth-child(3),
.ma-rfc-products-table td:nth-child(3) { width: 5.5rem; }

.ma-rfc-products-table th:nth-child(4),
.ma-rfc-products-table td:nth-child(4) { width: 6rem; }

.ma-rfc-products-table th:nth-child(5),
.ma-rfc-products-table td:nth-child(5) { width: 5.5rem; }

.ma-rfc-products-table th:nth-child(6),
.ma-rfc-products-table td:nth-child(6) { width: 9rem; }

.ma-rfc-products-table th:nth-child(7),
.ma-rfc-products-table td:nth-child(7),
.ma-rfc-products-table th:nth-child(8),
.ma-rfc-products-table td:nth-child(8) { width: 5.5rem; }

.ma-rfc-products-table th:nth-child(9),
.ma-rfc-products-table td:nth-child(9),
.ma-rfc-products-table th:nth-child(10),
.ma-rfc-products-table td:nth-child(10) { width: 5.5rem; }

.ma-rfc-clients-table {
  min-width: 63.5rem;
  table-layout: fixed;
}

.ma-rfc-clients-table th,
.ma-rfc-clients-table td {
  overflow-wrap: anywhere;
}

.ma-rfc-clients-table th:nth-child(1),
.ma-rfc-clients-table td:nth-child(1) {
  width: 9.5rem;
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
}

.ma-rfc-clients-table th:nth-child(2),
.ma-rfc-clients-table td:nth-child(2) { width: 15rem; }

.ma-rfc-clients-table th:nth-child(3),
.ma-rfc-clients-table td:nth-child(3) { width: 10.5rem; }

.ma-rfc-clients-table th:nth-child(4),
.ma-rfc-clients-table td:nth-child(4) { width: 5rem; }

.ma-rfc-clients-table th:nth-child(5),
.ma-rfc-clients-table td:nth-child(5) { width: 12.5rem; }

.ma-rfc-clients-table th:nth-child(6),
.ma-rfc-clients-table td:nth-child(6),
.ma-rfc-clients-table th:nth-child(7),
.ma-rfc-clients-table td:nth-child(7) { width: 5.5rem; }

.ma-rfc-catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 25rem) minmax(8rem, 11rem);
  align-items: end;
  gap: 1rem;
  margin-top: 0.9rem;
}

.ma-rfc-client-status-filter {
  min-width: 0;
}

.ma-rfc-catalog-toolbar .ma-field {
  width: 100%;
}

.ma-rfc-catalog-note {
  margin: 0 0 0.2rem;
  color: var(--ma-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.ma-rfc-product-form-grid,
.ma-rfc-client-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.ma-rfc-client-status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.ma-rfc-product-form-grid > .ma-field,
.ma-rfc-client-form-grid > .ma-field {
  align-content: start;
}

#ma-rfc-product-form .ma-rfc-product-form-grid > .ma-field > span,
#ma-rfc-product-form .ma-rfc-product-form-grid > .ma-field > label,
#ma-rfc-client-form .ma-rfc-client-form-grid > .ma-field > span,
.ma-product-tax-row > .ma-field > span {
  min-height: 2.6em;
  display: flex;
  align-items: end;
}

.ma-product-taxes { margin: 1rem 0 1.3rem; }
.ma-product-taxes h4 { font-size: 1rem; color: var(--ma-purple); }
.ma-product-taxes p { font-size: .85rem; }
.ma-product-tax-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem 1rem;
  padding: .8rem;
  margin: .7rem 0;
  border: 1px solid var(--ma-line);
  border-radius: .8rem;
}
.ma-product-tax-row .ma-field { min-width: 0; align-content: start; }
.ma-product-tax-row .ma-field[hidden] { display: none !important; }
.ma-product-tax-row > button { justify-self: start; align-self: end; height: auto; }
.ma-product-pagination { display: flex; gap: .8rem; align-items: center; justify-content: end; margin-top: .8rem; flex-wrap: wrap; }
.ma-product-pagination[hidden] { display: none; }
@media (max-width: 575px) {
  .ma-product-tax-row { grid-template-columns: minmax(0, 1fr); }
  #ma-rfc-product-form .ma-rfc-product-form-grid > .ma-field > span,
  #ma-rfc-product-form .ma-rfc-product-form-grid > .ma-field > label,
  .ma-product-tax-row > .ma-field > span { min-height: 0; }
}

.ma-rfc-product-advanced,
.ma-rfc-client-advanced,
.ma-rfc-client-section {
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--ma-line);
  border-radius: 0.8rem;
  background: #faf8fc;
}

.ma-rfc-product-advanced summary,
.ma-rfc-client-advanced summary {
  color: var(--ma-purple);
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.ma-rfc-client-section h4 {
  color: var(--ma-purple);
  font-size: 0.8rem;
  font-weight: 900;
}

.ma-rfc-product-advanced[open] summary,
.ma-rfc-client-advanced[open] summary,
.ma-rfc-client-section h4 {
  margin-bottom: 0.85rem;
}

.ma-rfc-configuration {
  margin-top: 1.4rem;
}

.ma-rfc-configuration__header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ma-line);
}

.ma-rfc-configuration__header > .ma-button {
  justify-self: end;
}

.ma-config-operational {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(18, 132, 84, 0.18);
  border-radius: 0.85rem;
  color: var(--ma-success);
  background: #f1fbf6;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.55;
  white-space: pre-line;
}

.ma-rfc-configuration__header > div > span,
.ma-config-block__heading > div > span {
  color: var(--ma-purple);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ma-rfc-configuration__header h3,
.ma-config-block__heading h4 {
  margin: 0.18rem 0 0;
  color: var(--ma-ink);
  font-weight: 950;
}

.ma-rfc-configuration__header p {
  margin: 0.3rem 0 0;
  color: var(--ma-muted);
  font-size: 0.82rem;
}

.ma-rfc-configuration__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 12rem;
  color: var(--ma-muted);
  font-size: 0.85rem;
  font-weight: 800;
}

#ma-rfc-configuration-content {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.ma-config-block {
  margin: 0;
  padding: 1.15rem;
  border: 1px solid var(--ma-line);
  border-radius: 1rem;
  background: #fff;
}

.ma-config-block__heading,
.ma-config-subsection__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ma-config-block__heading > p {
  max-width: 30rem;
  margin: 0;
  color: var(--ma-muted);
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: right;
}

.ma-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

#ma-rfc-contact-form .ma-config-grid {
  align-items: start;
}

.ma-commerce-item-form input[readonly] {
  color: #62596c;
  background: #f1eef4;
  cursor: not-allowed;
}

.ma-config-grid--documents {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ma-config-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.ma-config-status {
  margin: 0;
  color: var(--ma-muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.ma-config-status[data-kind="success"] {
  color: var(--ma-success);
}

.ma-config-status[data-kind="error"] {
  color: var(--ma-danger);
}

.ma-config-block > .ma-config-validation-note {
  margin: 1.2rem 0 0;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid #096b9f;
  color: #526578;
  background: #f4fbff;
  font-size: 0.75rem;
  line-height: 1.5;
}

#ma-rfc-sharing-owner > p {
  margin: 0 0 0.85rem;
  color: var(--ma-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.ma-sharing-email-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 0.7rem;
}

.ma-sharing-email-row > .ma-field {
  margin-bottom: 0;
}

.ma-sharing-email-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0;
}

.ma-sharing-status {
  display: inline-flex;
  min-height: 2.35rem;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(8, 127, 193, 0.2);
  border-radius: 999px;
  color: #096b9f;
  background: #f0f9fd;
  font-size: 0.72rem;
  font-weight: 900;
}

.ma-sharing-status[data-status="confirmed"] {
  border-color: rgba(18, 132, 84, 0.2);
  color: var(--ma-success);
  background: #f1fbf6;
}

.ma-sharing-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.ma-sharing-actions > .ma-button {
  width: 100%;
}

.ma-sharing-guest {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(8, 127, 193, 0.15);
  border-radius: 0.85rem;
  color: var(--ma-muted);
  background: #f4fbff;
  font-size: 0.82rem;
}

.ma-sharing-guest strong {
  color: var(--ma-ink);
  overflow-wrap: anywhere;
}

.ma-logo-config-grid,
.ma-manifest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ma-logo-config-grid p,
.ma-config-block > p {
  margin: 0 0 0.45rem;
  color: var(--ma-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.ma-logo-preview {
  display: grid;
  min-height: 11rem;
  padding: 1rem;
  border: 1px dashed rgba(103, 19, 233, 0.25);
  border-radius: 0.9rem;
  place-items: center;
  color: var(--ma-muted);
  background: #faf8fd;
  font-size: 0.78rem;
}

.ma-logo-preview img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 10rem;
  object-fit: contain;
}

.ma-config-subsection {
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--ma-line);
}

.ma-config-block > .ma-config-subsection:first-of-type {
  border-top: 0;
}

.ma-config-subsection__heading {
  align-items: center;
  margin-bottom: 0.8rem;
}

.ma-config-subsection__heading h5,
.ma-config-subsection__heading h6,
.ma-series-assignments h6 {
  margin: 0;
  color: var(--ma-ink);
  font-size: 0.94rem;
  font-weight: 900;
}

.ma-config-subsection__heading h5 small {
  color: var(--ma-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.ma-config-subsection__heading--nested {
  margin-top: 0.25rem;
}

.ma-repeat-list {
  display: grid;
  gap: 0.65rem;
}

.ma-repeat-add {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.65rem;
}

.ma-repeat-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1.65fr) minmax(8rem, 1fr) auto auto;
  align-items: end;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--ma-line);
  border-radius: 0.8rem;
  background: #fbfafd;
}

.ma-commerce-complete p {
  white-space: pre-line;
}

.ma-repeat-row--series {
  grid-template-columns: minmax(10rem, 1.4fr) minmax(7rem, 0.8fr) minmax(7rem, 0.7fr) auto;
}

.ma-repeat-row .ma-field {
  margin: 0;
}

.ma-repeat-row__primary {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 0.4rem;
  color: var(--ma-ink);
  font-size: 0.75rem;
  font-weight: 850;
}

.ma-repeat-row__remove {
  align-self: center;
  padding: 0.45rem 0.55rem;
  border: 0;
  color: var(--ma-danger);
  background: transparent;
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.ma-series-assignments {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--ma-line);
}

.ma-series-assignments h6 {
  margin-bottom: 0.75rem;
}

.ma-series-assignments > p {
  margin: -0.35rem 0 0.85rem;
  color: var(--ma-muted);
  font-size: 0.77rem;
  line-height: 1.5;
}

.ma-manifest-grid .ma-config-subsection {
  padding: 0.9rem;
  border: 1px solid var(--ma-line);
  border-radius: 0.85rem;
  background: #fbfafd;
}

.ma-manifest-badge {
  margin: 0;
  padding: 0.28rem 0.7rem;
  border: 1px solid rgba(180, 35, 56, 0.2);
  border-radius: 999px;
  color: var(--ma-danger);
  background: #fff4f5;
  font-size: 0.72rem;
  font-weight: 900;
}

.ma-manifest-badge[data-signed="true"] {
  border-color: rgba(18, 132, 84, 0.2);
  color: var(--ma-success);
  background: #f1fbf6;
}

.ma-facturapi-manifest {
  margin-top: 1rem;
}

.ma-facturapi-manifest__availability {
  margin: 0 0 0.85rem;
  color: var(--ma-ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.ma-facturapi-manifest iframe {
  display: block;
  width: 100%;
  min-height: 512px;
  border: 1px solid var(--ma-line);
  border-radius: 0.9rem;
  background: #fff;
}

.ma-facturapi-manifest iframe[hidden] {
  display: none;
}

.ma-facturapi-manifest__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.85rem;
}

.ma-facturapi-manifest__actions .ma-button {
  width: auto;
}

.ma-config-completion {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(180, 35, 56, 0.16);
  border-radius: 0.85rem;
  color: var(--ma-danger);
  background: #fff4f5;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.5;
}

.ma-config-completion[data-complete="true"] {
  border-color: rgba(18, 132, 84, 0.18);
  color: var(--ma-success);
  background: #f1fbf6;
}

@media (max-width: 1240px) {
  .ma-rfc-units-table-wrap,
  .ma-rfc-products-table-wrap,
  .ma-rfc-clients-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .ma-rfc-units-table,
  .ma-rfc-products-table,
  .ma-rfc-clients-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
    background: transparent;
  }

  .ma-rfc-units-table thead,
  .ma-rfc-products-table thead,
  .ma-rfc-clients-table thead {
    display: none;
  }

  .ma-rfc-units-table tbody,
  .ma-rfc-products-table tbody,
  .ma-rfc-clients-table tbody {
    display: grid;
    gap: 0.72rem;
  }

  .ma-rfc-units-table tbody tr,
  .ma-rfc-products-table tbody tr,
  .ma-rfc-clients-table tbody tr {
    display: grid;
    grid-template-columns: minmax(7rem, 0.65fr) minmax(0, 1.35fr);
    overflow: hidden;
    border: 1px solid var(--ma-line);
    border-radius: 0.82rem;
    background: #fff;
  }

  .ma-rfc-clients-table tbody tr {
    grid-template-columns: minmax(9rem, 0.75fr) minmax(0, 1.25fr);
  }

  .ma-rfc-units-table tbody tr > td:nth-child(n),
  .ma-rfc-products-table tbody tr > td:nth-child(n),
  .ma-rfc-clients-table tbody tr > td:nth-child(n) {
    display: none;
    width: auto;
    min-width: 0;
    padding: 0.72rem 0.8rem;
    border: 0;
    vertical-align: top;
  }

  .ma-rfc-units-table tbody tr > td:nth-child(1),
  .ma-rfc-units-table tbody tr > td:nth-child(2),
  .ma-rfc-products-table tbody tr > td:nth-child(1),
  .ma-rfc-products-table tbody tr > td:nth-child(2),
  .ma-rfc-clients-table tbody tr > td:nth-child(1),
  .ma-rfc-clients-table tbody tr > td:nth-child(2) {
    display: grid;
    align-content: start;
    gap: 0.24rem;
  }

  .ma-rfc-units-table tbody tr > td:nth-child(1),
  .ma-rfc-products-table tbody tr > td:nth-child(1),
  .ma-rfc-clients-table tbody tr > td:nth-child(1) {
    border-right: 1px solid #eeeaf1;
  }

  .ma-rfc-units-table tbody td::before,
  .ma-rfc-products-table tbody td::before,
  .ma-rfc-clients-table tbody td::before {
    content: attr(data-label);
    color: #766b7d;
    font-size: 0.63rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .ma-rfc-row-toggle {
    display: inline-flex;
    justify-self: start;
    margin-top: 0.28rem;
    padding: 0.28rem 0.55rem;
    border: 1px solid rgba(103, 19, 233, 0.22);
    border-radius: 999px;
    color: var(--ma-purple);
    background: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    line-height: 1.2;
    cursor: pointer;
  }

  .ma-rfc-row-toggle:hover,
  .ma-rfc-row-toggle:focus-visible {
    border-color: var(--ma-purple);
    outline: none;
    background: #f7f0ff;
  }

  .ma-rfc-units-table tbody tr[data-expanded="true"] > td:nth-child(n + 3),
  .ma-rfc-products-table tbody tr[data-expanded="true"] > td:nth-child(n + 3),
  .ma-rfc-clients-table tbody tr[data-expanded="true"] > td:nth-child(n + 3) {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(7rem, 0.42fr) minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid #eeeaf1;
  }

  .ma-rfc-units-table tbody tr[data-expanded="true"] .ma-rfc-unit-edit,
  .ma-rfc-products-table tbody tr[data-expanded="true"] .ma-rfc-unit-edit,
  .ma-rfc-clients-table tbody tr[data-expanded="true"] .ma-rfc-unit-edit,
  .ma-rfc-units-table tbody tr[data-expanded="true"] .ma-rfc-unit-status,
  .ma-rfc-products-table tbody tr[data-expanded="true"] .ma-rfc-unit-status,
  .ma-rfc-clients-table tbody tr[data-expanded="true"] .ma-rfc-unit-status {
    justify-self: start;
  }
}

@media (max-width: 900px) {
  .ma-portal {
    padding: 6rem 1rem 3rem;
  }

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

  .ma-auth__aside {
    padding: 2rem;
  }

  .ma-rfc-catalog-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .ma-auth__steps li {
    display: block;
  }

  .ma-auth__steps li > span {
    margin-bottom: 0.55rem;
  }

  .ma-legal-gate {
    grid-template-columns: 1fr;
  }

  .ma-email-verification {
    grid-template-columns: 1fr;
  }

  .ma-email-verification form {
    justify-content: flex-start;
  }

  .ma-plan-grid {
    grid-template-columns: 1fr;
  }

  .ma-plan-choice {
    min-height: 0;
  }

  .ma-repeat-row,
  .ma-repeat-row--series {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ma-invoice-workspace {
    grid-template-columns: 1fr;
  }

  .ma-invoice-drafts {
    position: static;
  }

  .ma-invoice-item__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ma-invoice-item__supplement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ma-invoice-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .ma-portal {
    padding: 4.5rem 0.75rem 2.25rem;
  }

  .ma-portal__intro {
    margin-bottom: 2.2rem;
  }

  .ma-portal__intro h1 {
    font-size: clamp(1.9rem, 10vw, 2.65rem);
  }

  .ma-portal__assurances {
    display: grid;
    justify-content: stretch;
  }

  .ma-portal__assurances span {
    justify-content: flex-start;
  }

  .ma-auth,
  .ma-dashboard,
  .ma-portal-unavailable {
    border-radius: 1.25rem;
  }

  .ma-auth__aside {
    padding: 1.65rem 1.35rem;
  }

  .ma-auth__steps {
    grid-template-columns: 1fr;
  }

  .ma-auth__steps li {
    display: flex;
  }

  .ma-auth__steps li > span {
    margin-bottom: 0;
  }

  .ma-auth__card {
    padding: 1.25rem;
  }

  .ma-field-grid,
  .ma-workspace-grid,
  .ma-rfc-tools-grid,
  .ma-config-grid,
  .ma-config-grid--documents,
  .ma-logo-config-grid,
  .ma-manifest-grid,
  .ma-repeat-row,
  .ma-repeat-row--series {
    grid-template-columns: 1fr;
  }

  .ma-sharing-email-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .ma-sharing-email-controls {
    width: 100%;
    margin-bottom: 0;
  }

  .ma-sharing-email-controls > .ma-button,
  .ma-sharing-email-controls > .ma-sharing-status {
    flex: 1 1 100%;
    width: 100%;
  }

  .ma-sharing-actions {
    grid-template-columns: 1fr;
  }

  .ma-facturapi-manifest iframe {
    min-height: 576px;
  }

  .ma-facturapi-manifest__actions,
  .ma-facturapi-manifest__actions .ma-button {
    width: 100%;
  }

  .ma-workspace-card__actions {
    grid-template-columns: 1fr;
  }

  .ma-rfc-configuration__header,
  .ma-rfc-tools__header,
  .ma-rfc-tool-panel__header,
  .ma-config-block__heading,
  .ma-config-subsection__heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .ma-config-block__heading > p {
    max-width: none;
    text-align: left;
  }

  .ma-rfc-tools__header > .ma-button,
  .ma-rfc-tool-panel__header > .ma-button,
  .ma-rfc-tool-panel__actions {
    justify-self: start;
  }

  .ma-rfc-tool-panel__actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .ma-rfc-unit-form-grid,
  .ma-rfc-product-form-grid,
  .ma-rfc-client-form-grid,
  .ma-rfc-client-status-grid {
    grid-template-columns: 1fr;
  }

  .ma-invoice-general-grid,
  .ma-invoice-notes-grid,
  .ma-invoice-global-grid,
  .ma-invoice-local-tax__grid,
  .ma-invoice-item__grid,
  .ma-invoice-item__supplement-grid,
  .ma-invoice-summary {
    grid-template-columns: 1fr;
  }

  .ma-invoice-item__header {
    grid-template-columns: 1fr;
  }

  .ma-invoice-item__comments {
    grid-column: auto;
  }

  .ma-invoice-item__grid > .ma-field > span,
  .ma-invoice-item__supplement-grid > .ma-field > span {
    min-height: 0;
  }

  .ma-invoice-item__supplement-wide {
    grid-column: auto;
  }

  .ma-invoice-item__result {
    justify-content: space-between;
  }

  .ma-invoice-section__heading {
    align-items: stretch;
    flex-direction: column;
  }

  .ma-invoice-section__buttons {
    justify-content: stretch;
  }

  .ma-invoice-section__buttons .ma-button {
    flex: 1 1 100%;
  }

  .ma-invoice-item-add .ma-button {
    width: 100%;
  }

  .ma-config-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ma-phone-control {
    grid-template-columns: 1fr;
  }

  .ma-dashboard__header {
    display: grid;
  }

  .ma-dashboard__header .ma-button {
    width: auto;
  }

  .ma-dashboard__actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
    gap: 0.4rem;
  }

  .ma-dashboard__actions > .ma-button,
  .ma-dashboard__actions .ma-account-menu summary {
    min-height: 2.65rem;
    padding: 0.6rem 0.7rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .ma-modal__buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ma-account-menu,
  .ma-account-menu summary {
    width: auto;
  }

  .ma-account-menu__panel {
    right: auto;
    left: 0;
    width: max-content;
    min-width: min(13.5rem, calc(100vw - 1.5rem));
  }

  .ma-pending-payment {
    align-items: stretch;
    flex-direction: column;
  }

  .ma-pending-payment .ma-button {
    width: fit-content;
  }

  .ma-bank-transfer__reference {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .ma-bank-transfer__accounts {
    grid-template-columns: 1fr;
  }

  .ma-modal {
    width: calc(100% - 1.1rem);
    max-height: calc(100vh - 1.1rem);
    border-radius: 1rem;
  }

  .ma-modal__header {
    padding: 1.35rem 3.7rem 1.1rem 1.25rem;
  }

  .ma-modal__form {
    padding: 1.25rem;
  }

  .ma-email-verification form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ma-email-verification form input,
  .ma-email-verification form .ma-button {
    width: 100%;
  }

  .ma-workspace-card__top {
    display: grid;
  }

  .ma-workspace-card__status {
    width: fit-content;
  }

  .ma-workspace-card__status-column {
    align-items: flex-start;
  }

  .ma-workspace-card__benefits {
    align-items: flex-start;
    flex-direction: column;
  }

  .ma-workspace-card__included {
    justify-items: start;
    margin-left: 0;
  }

  .ma-workspaces__header,
  .ma-commerce-section__heading {
    display: grid;
  }

  .ma-workspaces__header .ma-button {
    width: 100%;
  }

  .ma-commerce-section__heading p {
    max-width: none;
    text-align: left;
  }

  .ma-commerce-item-form,
  .ma-commerce-cart {
    padding: 1rem;
  }

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

  .ma-commerce-stamps {
    grid-column: auto;
    max-width: none;
  }

  .ma-commerce-cart-item {
    grid-template-columns: 1fr auto;
  }

  .ma-commerce-cart-item__amount {
    grid-column: 1;
  }

  .ma-commerce-cart-item button {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ma-portal *,
  .ma-portal *::before,
  .ma-portal *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Explicit SAT results: readable codes, all provider matches and keyboard navigation. */
.ma-sat-picker { min-width: 0; width: 100%; }
.ma-sat-picker__note { display: block; color: #436078; overflow-wrap: anywhere; }
.ma-sat-picker__list { max-height: 16rem; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #b8cbdc; border-radius: 8px; background: #fff; margin-top: .4rem; }
.ma-sat-picker__list [role="option"] { padding: .55rem .7rem; color: #153656; cursor: pointer; overflow-wrap: anywhere; border-bottom: 1px solid #e9eff5; font-size: .88rem; line-height: 1.4; }
.ma-sat-picker__list [role="option"]:hover, .ma-sat-picker__list [aria-selected="true"] { background: #e9e1fc; color: #49138f; }
.ma-sat-picker .ma-button { margin-top: .4rem; height: auto; }
.ma-field > label { margin: 0; color: #403849; font-size: .84rem; font-weight: 900; }
.ma-fpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
.ma-fpi-grid .ma-field { display: flex; flex-direction: column; align-self: start; min-width: 0; }
.ma-fpi-grid .ma-field > span, .ma-fpi-grid .ma-field > label { min-height: 2.7em; display: flex; align-items: end; }
.ma-fpi-grid input, .ma-fpi-grid select, .ma-fpi-grid textarea { width: 100%; min-width: 0; }
.ma-fpi-item { border: 1px solid #d8e3ec; border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.ma-fpi-item__heading { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.ma-fpi-item__taxes { color: #436078; font-size: .88rem; margin: .6rem 0 0; overflow-wrap: anywhere; }
.ma-fpi-drafts { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); gap: .7rem; }
.ma-fpi-draft { text-align: left; padding: .8rem; border-radius: 10px; border: 1px solid #d8e3ec; background: #f8fafc; color: #19395b; cursor: pointer; overflow-wrap: anywhere; }
.ma-fpi-issued-filters { display:grid; grid-template-columns:minmax(14rem,1fr) minmax(7rem,.28fr) minmax(9rem,.34fr); align-items:end; gap:.75rem; margin-bottom:1rem; }
.ma-fpi-issued-filters .ma-field { margin:0; }
.ma-fpi-header-actions,.ma-fpi-document-actions { display:flex; gap:.65rem; flex-wrap:wrap; align-items:flex-start; }
.ma-fpi-header-actions .ma-button,.ma-fpi-document-actions .ma-button { height:auto; min-height:2.7rem; white-space:normal; }
.ma-fpi-delivery { margin-top:1.5rem; }
.ma-fpi-delivery > h5 { margin-top:0; }
.ma-fpi-delivery .ma-field { max-width:28rem; margin-top:.7rem; }
.ma-fpi-delete-actions { margin-top:1.5rem; padding-top:1rem; border-top:1px solid #e2dce9; }
.ma-fpi-list-search { max-width:34rem; margin-bottom:1rem; }
.ma-document-dialog { width:min(900px,calc(100vw - 2rem)); max-height:88dvh; padding:0; border:1px solid #d8cbea; border-radius:14px; color:#26384c; background:#fff; }
.ma-document-dialog::backdrop { background:rgba(24,16,40,.62); }
.ma-document-dialog__head { position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1rem 1.2rem; background:#fff; border-bottom:1px solid #e4ddea; }
.ma-document-dialog__head h3 { margin:0; }
.ma-document-dialog__body { padding:1.2rem; overflow:auto; }
.ma-fpi-draft__actions { display:flex; gap:.5rem; flex-wrap:wrap; margin-top:.7rem; }
.ma-fpi-actions-label { flex-basis:100%; margin-top:.35rem; color:#52677d; font-weight:700; }
.ma-fpi-draft-card { padding:.9rem; border:1px solid #d8e3ec; border-radius:10px; background:#f8fafc; min-width:0; overflow-anchor:none; }
.ma-fpi-draft-card > p { margin:.3rem 0; overflow-wrap:anywhere; }
.ma-fpi-operation-group { margin-top:.65rem; border:1px solid #d8e3ec; border-radius:.7rem; background:#fff; overflow-anchor:none; }
.ma-fpi-operation-group > summary { padding:.58rem .72rem; color:#24658d; font-size:.78rem; font-weight:900; cursor:pointer; user-select:none; }
.ma-fpi-operation-group > summary:hover,
.ma-fpi-operation-group > summary:focus-visible { color:#6713e9; outline:none; background:#f8f3ff; }
.ma-fpi-operation-group[open] > summary { border-bottom:1px solid #e5eaf0; }
.ma-fpi-operation-group .ma-fpi-draft__actions { margin:0; padding:.72rem; }
.ma-fpi-operation-group--original { background:#fafbfd; }
.ma-fpi-quotes-view { margin-top:1rem; }
#ma-fpi-result { white-space: pre-line; margin-top: 1rem; }
#ma-fpi-form { overflow-anchor: none; }
#ma-facturapi-invoice { container-type: inline-size; container-name: ma-invoice; }
#ma-rfc-product-form { container-type: inline-size; container-name: ma-invoice; overflow-anchor: none; }
#ma-product-tax-editor { margin-bottom: 1.5rem; }
.ma-fpi-grid.ma-fpi-grid--three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.ma-fpi-tax-basics { margin-top: 1rem; }
.ma-fpi-saved-section { margin-top: 2rem; }
#ma-fpi-next-folio { font: inherit; font-weight: 700; }
#ma-fpi-next-folio[hidden] { display: none; }
#ma-rfc-product-form .ma-product-description { margin-top: -1rem; }
@media (max-width: 680px) { #ma-rfc-product-form .ma-product-description { margin-top: -.5rem; } }
@media (max-width: 720px) {
  .ma-fpi-issued-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ma-fpi-issued-filters .ma-fpi-list-search { grid-column:1 / -1; }
}
@container ma-invoice (max-width: 760px) { .ma-fpi-grid.ma-fpi-grid--three { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@container ma-invoice (max-width: 520px) { .ma-fpi-grid.ma-fpi-grid--three { grid-template-columns: minmax(0,1fr); } }
.ma-product-picker { position: relative; min-width: 0; }
.ma-product-picker__input { display: flex; align-items: stretch; min-width: 0; }
.ma-product-picker__input input { flex: 1; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ma-product-picker__input .ma-button { flex: 0 0 2.8rem; width: 2.8rem; min-width: 0; margin: 0; padding: .5rem; border: 1px solid #b8cbdc; border-left: 0; border-radius: 0 8px 8px 0; }
.ma-product-picker__panel { position: absolute; inset: 100% 0 auto; z-index: 8; padding: .35rem; border: 1px solid #b8cbdc; border-radius: 8px; box-shadow: 0 8px 20px #17375926; background: #fff; }
.ma-product-picker__panel[hidden] { display: none; }
.ma-product-picker__list { max-height: min(16rem,40vh); overflow-y: auto; overscroll-behavior: contain; }
.ma-product-picker__list [role="option"] { padding: .6rem; line-height: 1.4; font-size: .9rem; overflow-wrap: anywhere; color: #153656; cursor: pointer; border-bottom: 1px solid #e9eff5; }
.ma-product-picker__list [role="option"]:hover, .ma-product-picker__list [aria-selected="true"] { background: #e9e1fc; color: #49138f; }
.ma-product-picker__note { display: block; margin: .3rem; overflow-wrap: anywhere; color: #436078; }
.ma-fpi-tax-editor { margin-top: 1rem; border-top: 1px solid #d8e3ec; }
.ma-fpi-tax-editor > summary { padding: .8rem 0; cursor: pointer; color: #19395b; font-weight: 700; }
.ma-fpi-tax-editor__body { padding: 0 .15rem .5rem; }
.ma-fpi-tax-editor__body h4 { font-size: .95rem; margin: 1rem 0 .5rem; color: #19395b; }
.ma-fpi-tax-editor__body .ma-button { height: auto; min-height: 2.5rem; align-self: start; margin-top: .5rem; }
.ma-fpi-tax-row { padding: .7rem; margin-bottom: .65rem; border-radius: 8px; border: 1px solid #d8e3ec; background: #f8fafc; }
.ma-fpi-tax-editor .ma-field[hidden] { display: none; }
@media (max-width: 640px) { .ma-fpi-grid { grid-template-columns: minmax(0,1fr); } .ma-fpi-grid .ma-field > span, .ma-fpi-grid .ma-field > label { min-height: 0; } }
