/*
 * Soda ZW Classic Invoice Restoration
 * Restores the earlier, approved invoice and quotation treatment without
 * changing Finance Centre, security, Paynow logic or accounting workflows.
 */

body.sodazw-v10.sodazw-v12 {
  --doc-ink: #082846;
  --doc-muted: #667b90;
  --doc-line: #d9e4ed;
  --doc-ice: #f4f8fb;
  --doc-orange: #ff5a14;
}

/* Creation studio */
body.sodazw-v10.sodazw-v12 .document-studio-heading {
  align-items: center;
  gap: 16px;
  margin-bottom: 19px;
  padding: 23px 25px;
  border: 1px solid var(--sz-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--sz-shadow-sm);
}
body.sodazw-v10.sodazw-v12 .document-studio-heading h1,
body.sodazw-v10.sodazw-v12 .document-studio-heading h2 {
  margin: 6px 0;
  color: var(--sz-navy-950);
  font-size: clamp(26px,3vw,39px);
  font-weight: 900;
  letter-spacing: -.055em;
}
body.sodazw-v10.sodazw-v12 .document-studio-heading > div:first-child > p {
  max-width: none;
  margin: 0;
  color: var(--sz-muted);
}
body.sodazw-v10.sodazw-v12 .studio-version,
body.sodazw-v10.sodazw-v12 .studio-heading-badges { display: none; }
body.sodazw-v10.sodazw-v12 .document-type-switch {
  padding: 5px;
  border: 1px solid var(--sz-line);
  border-radius: 13px;
  background: #f3f7f9;
}
body.sodazw-v10.sodazw-v12 .document-type-switch a {
  min-height: 39px;
  padding: 9px 13px;
  border-radius: 9px;
  color: var(--sz-navy-800);
}
body.sodazw-v10.sodazw-v12 .document-type-switch a.active {
  background: #fff;
  color: var(--sz-orange-dark);
  box-shadow: var(--sz-shadow-sm);
}
body.sodazw-v10.sodazw-v12 .studio-section {
  overflow: hidden;
  padding: 0 0 20px !important;
  border: 1px solid var(--sz-line) !important;
  border-radius: 18px !important;
  background: #fff;
  box-shadow: var(--sz-shadow-sm) !important;
}
body.sodazw-v10.sodazw-v12 .studio-section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 19px 21px 16px;
  border-bottom: 1px solid #e5ecf1;
}
body.sodazw-v10.sodazw-v12 .studio-section-head h2 {
  margin: 2px 0 3px;
  color: var(--sz-navy-950);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
}
body.sodazw-v10.sodazw-v12 .studio-section-head p { margin: 0; color: var(--sz-muted); }
body.sodazw-v10.sodazw-v12 .studio-summary {
  position: sticky !important;
  top: 99px;
  overflow: hidden;
  padding: 0 0 20px !important;
  border: 1px solid var(--sz-line) !important;
  border-top: 5px solid var(--sz-orange) !important;
  border-radius: 19px !important;
  background: #fff !important;
  color: var(--sz-ink) !important;
  box-shadow: var(--sz-shadow) !important;
}
body.sodazw-v10.sodazw-v12 .studio-summary::before { display: none; content: none; }
body.sodazw-v10.sodazw-v12 .studio-summary-top {
  margin: 0 !important;
  padding: 20px 21px;
  border: 0;
  background: linear-gradient(135deg,var(--sz-navy-950),var(--sz-navy-800));
}
body.sodazw-v10.sodazw-v12 .studio-summary-top h2 { margin: 2px 0 0; color: #fff; font-size: 20px; }
body.sodazw-v10.sodazw-v12 .studio-summary-top .section-kicker { color: #ff9a70; }
body.sodazw-v10.sodazw-v12 .summary-document-icon { background: var(--sz-orange); color: #fff; }
body.sodazw-v10.sodazw-v12 .studio-summary > :not(.studio-summary-top) { margin-left: 21px; margin-right: 21px; }
body.sodazw-v10.sodazw-v12 .studio-summary > p {
  min-height: 0;
  margin-top: 16px;
  margin-bottom: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--sz-ink);
  font-weight: 700;
}
body.sodazw-v10.sodazw-v12 .studio-summary .studio-total {
  margin: 6px 0 0;
  padding: 16px 0;
  border-radius: 0;
  border-bottom: 0;
  background: transparent;
  color: var(--sz-navy-950);
}
body.sodazw-v10.sodazw-v12 .studio-summary .studio-total dt,
body.sodazw-v10.sodazw-v12 .studio-summary .studio-total dd { color: var(--sz-navy-950); }
body.sodazw-v10.sodazw-v12 .studio-assurance { border: 1px solid #cee6da; background: var(--sz-green-soft); }
body.sodazw-v10.sodazw-v12 .studio-assurance span { color: #4f7161; }
body.sodazw-v10.sodazw-v12 .studio-summary .button { width: calc(100% - 42px); margin-right: 21px; margin-left: 21px; }

/* Staff invoice and quotation */
body.sodazw-v10.sodazw-v12 .paynow-readiness,
body.sodazw-v10.sodazw-v12 .paynow-invoice-panel,
body.sodazw-v10.sodazw-v12 .document-state-actions,
body.sodazw-v10.sodazw-v12 article.document-card,
body.sodazw-v10.sodazw-v12 article.document-card + .panel {
  width: auto;
  margin-left: 0;
  margin-right: 0;
}
body.sodazw-v10.sodazw-v12 .paynow-readiness {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 24px;
  margin: 0 0 18px;
  padding: 19px 21px 19px 84px;
  overflow: hidden;
  border: 1px solid #dbe6ee;
  border-radius: 18px;
  background: linear-gradient(120deg,#fff 0%,#fff 68%,#f4f8fb 100%);
  box-shadow: 0 12px 34px rgba(8,40,70,.075);
}
body.sodazw-v10.sodazw-v12 .paynow-readiness::before {
  content: "$";
  position: absolute;
  top: 50%;
  left: 22px;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 14px;
  background: var(--doc-ink);
  color: #fff;
  font: 900 18px/1 var(--sz-font);
  transform: translateY(-50%);
  box-shadow: 0 8px 20px rgba(8,40,70,.18);
}
body.sodazw-v10.sodazw-v12 .paynow-readiness::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--doc-orange);
}
body.sodazw-v10.sodazw-v12 .paynow-readiness strong { margin: 0; color: var(--doc-ink); font-size: 17px; font-weight: 900; }
body.sodazw-v10.sodazw-v12 .paynow-readiness small { color: var(--doc-muted); font-size: 11px; }
body.sodazw-v10.sodazw-v12 .paynow-invoice-panel { margin-top: 0; margin-bottom: 20px; padding: 24px 26px; }
body.sodazw-v10.sodazw-v12 .document-state-actions {
  position: sticky;
  top: 82px;
  z-index: 12;
  margin: 0 0 20px;
  padding: 11px;
  border: 1px solid rgba(201,216,227,.95);
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 30px rgba(8,40,70,.09);
}
body.sodazw-v10.sodazw-v12 .document-state-actions::before {
  content: "DOCUMENT ACTIONS";
  margin: 0 7px 0 4px;
  color: #74879a;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .15em;
}
body.sodazw-v10.sodazw-v12 article.document-card {
  position: relative;
  width: min(100%,1040px);
  margin: 0 auto 30px;
  padding: clamp(28px,4.2vw,54px);
  overflow: hidden;
  border: 1px solid #d6e1e9;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(8,40,70,.11);
}
body.sodazw-v10.sodazw-v12 article.document-card .document-head { padding-bottom: 30px; }
body.sodazw-v10.sodazw-v12 article.document-card .document-head img { width: auto; max-width: 142px; max-height: 88px; margin-bottom: 14px; }
body.sodazw-v10.sodazw-v12 article.document-card .document-head p { font-size: 10px; line-height: 1.6; }
body.sodazw-v10.sodazw-v12 article.document-card .document-title > strong { font-size: clamp(22px,3vw,36px); line-height: 1.05; }
body.sodazw-v10.sodazw-v12 article.document-card .status { min-height: 28px; padding: 5px 11px; border-width: 0; border-radius: 999px; }
body.sodazw-v10.sodazw-v12 article.document-card .document-meta { grid-template-columns: minmax(0,1fr) minmax(230px,.7fr); gap: 34px; margin: 28px 0 30px; }
body.sodazw-v10.sodazw-v12 article.document-card .document-meta > div { padding: 18px 20px; border-radius: 14px; background: #f7fafc; }
body.sodazw-v10.sodazw-v12 article.document-card .document-items { border-radius: 14px; }
body.sodazw-v10.sodazw-v12 article.document-card .document-items th { padding: 13px 14px; font-size: 8px; letter-spacing: .12em; }
body.sodazw-v10.sodazw-v12 article.document-card .document-items td { padding: 15px 14px; font-size: 10px; }
body.sodazw-v10.sodazw-v12 article.document-card .document-items tbody tr:nth-child(even) td { background: #f8fafc; }
body.sodazw-v10.sodazw-v12 article.document-card .document-summary { width: min(100%,390px); margin: 24px 0 28px auto; padding: 12px 18px; border-radius: 14px; }
body.sodazw-v10.sodazw-v12 article.document-card .document-summary .total { margin: 5px -18px; padding: 13px 18px; }

@media (max-width: 760px) {
  body.sodazw-v10.sodazw-v12 .document-studio-heading { align-items: stretch; flex-direction: column; padding: 19px; }
  body.sodazw-v10.sodazw-v12 .studio-summary { position: static !important; }
  body.sodazw-v10.sodazw-v12 .paynow-readiness { grid-template-columns: 1fr; padding: 18px 18px 18px 71px; gap: 13px; }
  body.sodazw-v10.sodazw-v12 .document-state-actions { position: static; }
  body.sodazw-v10.sodazw-v12 article.document-card { padding: 28px 18px; border-radius: 17px; overflow-x: auto; }
  body.sodazw-v10.sodazw-v12 article.document-card .document-head { grid-template-columns: 1fr; gap: 22px; }
  body.sodazw-v10.sodazw-v12 article.document-card .document-title { text-align: left; }
  body.sodazw-v10.sodazw-v12 article.document-card .document-meta { grid-template-columns: 1fr; gap: 12px; }
  body.sodazw-v10.sodazw-v12 article.document-card .document-items { min-width: 610px; }
}

@media print {
  body.sodazw-v10.sodazw-v12 .paynow-readiness,
  body.sodazw-v10.sodazw-v12 .paynow-invoice-panel,
  body.sodazw-v10.sodazw-v12 .document-state-actions { display: none !important; }
  body.sodazw-v10.sodazw-v12 article.document-card { width: 100%; margin: 0; padding: 28px; border: 0; border-radius: 0; box-shadow: none; }
}
