.mmco-inv-inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  margin: 4px;
  background: #064e3b;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(6, 78, 59, .18);
}
.mmco-inv-inline-btn:hover { transform: translateY(-1px); }
html.mmco-inv-open { overflow: hidden; }
.mmco-inv-modal[hidden] { display: none !important; }
.mmco-inv-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.mmco-inv-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, .62);
  backdrop-filter: blur(6px);
}
.mmco-inv-dialog {
  position: relative;
  width: min(980px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 28px;
  border: 1px solid #d1fae5;
  box-shadow: 0 28px 90px rgba(3, 7, 18, .32);
}
.mmco-inv-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px;
  background: linear-gradient(135deg, #064e3b, #047857);
  color: #ecfdf5;
}
.mmco-inv-head p {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 900;
  opacity: .86;
}
.mmco-inv-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1;
  color: #fff;
}
.mmco-inv-head span {
  display: block;
  max-width: 720px;
  margin-top: 10px;
  color: #d1fae5;
  font-size: 14px;
}
.mmco-inv-x {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.mmco-inv-form {
  padding: 26px 28px 30px;
}
.mmco-inv-form label {
  display: block;
  margin: 0 0 16px;
  color: #064e3b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.mmco-inv-form input,
.mmco-inv-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 7px;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  background: #fff;
  color: #111827;
  padding: 13px 14px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.mmco-inv-form textarea { resize: vertical; }
.mmco-inv-grid {
  display: grid;
  gap: 14px;
}
.mmco-inv-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mmco-inv-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mmco-inv-balance {
  padding: 18px;
  border: 2px solid #047857;
  border-radius: 22px;
  background: #ecfdf5;
}
.mmco-inv-balance::before {
  content: attr(data-balance-label);
  display: block;
  margin-bottom: 8px;
  color: #065f46;
  font-size: 18px;
  font-weight: 1000;
  letter-spacing: normal;
  text-transform: none;
}
.mmco-inv-check {
  display: inline-flex !important;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  margin: 0 auto 0 0 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: #374151 !important;
}
.mmco-inv-check input {
  width: auto;
  margin: 0;
}
.mmco-inv-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.mmco-inv-primary,
.mmco-inv-secondary {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 950;
  cursor: pointer;
}
.mmco-inv-primary {
  background: #047857;
  color: #fff;
  box-shadow: 0 12px 26px rgba(4, 120, 87, .22);
}
.mmco-inv-secondary {
  background: #f0fdf4;
  color: #065f46;
  border: 1px solid #bbf7d0;
}
.mmco-inv-message {
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: 16px;
  font-weight: 800;
}
.mmco-inv-message.is-ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #bbf7d0;
}
.mmco-inv-message.is-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.mmco-inv-message a {
  color: #047857;
  font-weight: 950;
}
.mmco-inv-settings-modal .mmco-inv-dialog { width: min(860px, 96vw); }
@media (max-width: 760px) {
  .mmco-inv-modal { padding: 12px; align-items: stretch; }
  .mmco-inv-dialog { max-height: 96vh; border-radius: 22px; }
  .mmco-inv-head, .mmco-inv-form { padding: 20px; }
  .mmco-inv-grid.two,
  .mmco-inv-grid.four { grid-template-columns: 1fr; }
  .mmco-inv-actions { justify-content: stretch; }
  .mmco-inv-primary,
  .mmco-inv-secondary { width: 100%; }
  .mmco-inv-check { width: 100%; }
}


/* v1.1.1 Brad patch: keep the invoice settings modal centred and make logo/terms controls clearer. */
.mmco-inv-modal {
  align-items: center !important;
  justify-content: center !important;
  overflow: auto !important;
}
.mmco-inv-dialog {
  max-height: min(92vh, 860px) !important;
  margin: auto !important;
}
.mmco-inv-settings-modal .mmco-inv-dialog {
  width: min(920px, 96vw) !important;
}
.mmco-inv-form input[name="logo_url"] {
  background: #ffffff !important;
}
.mmco-inv-form textarea[name="terms"] {
  min-height: 132px !important;
}
