/* AwoSign Global v2.1.1 PWA — Multi-Language (10 Languages + CJK + RTL Arabic) — 100% Free Forever (GPL-2.0-or-later) */
html,
body {
  margin: 0;
  padding: 0;
  background: #09131f;
  overflow-x: hidden;
}

#awosign-root {
  --brand: #172e49;
  --accent: #e7b52e;
  --as-bg: #09131f;
  --as-panel: #182a3e;
  --as-panel-border: #304963;
  --as-stage: #101e2e;
  --as-stage-border: #4c6680;
  --as-input-bg: #102032;
  --as-input-border: #47617a;
  --as-text: #eaf2fc;
  --as-muted: #91abc5;
  --as-hint: #b9cee3;
  --as-header-bg: #172b43;
  --as-font-multi: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans", "Malgun Gothic", "Segoe UI Arabic", "Tahoma", Arial, sans-serif;
  font-family: var(--as-font-multi);
  color-scheme: dark;
  margin: 0 auto;
  max-width: 1520px;
  min-height: 100vh;
  background: var(--as-bg);
  color: var(--as-text);
  border-radius: 0;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Light Mode: Explicit or Automatic via System/Page */
#awosign-root[data-theme="light"],
html:not(.dark):not([data-theme="dark"]) body:not(.dark):not(.dark-mode):not(.wp-dark-mode-active) #awosign-root[data-theme="auto"] {
  --as-bg: #edf2f8;
  --as-panel: #ffffff;
  --as-panel-border: #d2dfed;
  --as-stage: #f3f6fa;
  --as-stage-border: #b8c9dc;
  --as-input-bg: #ffffff;
  --as-input-border: #bdcad9;
  --as-text: #172e49;
  --as-muted: #526477;
  --as-hint: #3b536e;
  --as-header-bg: #102438;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  #awosign-root[data-theme="auto"] {
    --as-bg: #09131f;
    --as-panel: #182a3e;
    --as-panel-border: #304963;
    --as-stage: #101e2e;
    --as-stage-border: #4c6680;
    --as-input-bg: #102032;
    --as-input-border: #47617a;
    --as-text: #eaf2fc;
    --as-muted: #91abc5;
    --as-hint: #b9cee3;
    --as-header-bg: #172b43;
    color-scheme: dark;
  }
}

#awosign-root * {
  box-sizing: border-box;
}

#awosign-root header {
  background: var(--as-header-bg);
  color: #ffffff;
  padding: 18px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

#awosign-root header h1 {
  margin: 0;
  font-size: 24px;
  color: #ffffff;
}

#awosign-root header small {
  color: #b8c8dc;
  display: block;
  margin-top: 4px;
}

#awosign-root header label {
  color: #ffffff;
  margin-top: 0;
}

#awosign-root header select {
  background: #102032;
  color: #ffffff;
  border-color: #47617a;
}

#awosign-root .as-header-controls {
  min-width: min(460px, 100%);
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

#awosign-root main {
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

#awosign-root .panel {
  background: var(--as-panel);
  border: 1px solid var(--as-panel-border);
  border-radius: 14px;
  padding: 22px;
}

#awosign-root h2 {
  font-size: 18px;
  margin: 0 0 14px;
  color: inherit;
}

#awosign-root h3 {
  font-size: 14px;
  margin: 16px 0 9px;
  color: inherit;
}

#awosign-root label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin: 11px 0 5px;
}

#awosign-root .as-inline-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 10px 0;
}

#awosign-root input,
#awosign-root select,
#awosign-root textarea {
  width: 100%;
  border: 1px solid var(--as-input-border);
  border-radius: 7px;
  background: var(--as-input-bg);
  color: var(--as-text);
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
}

#awosign-root input[type="color"] {
  height: 40px;
  padding: 3px;
  cursor: pointer;
}

#awosign-root input[type="checkbox"] {
  width: auto;
  accent-color: #e7b52e;
}

#awosign-root input[type="file"] {
  font-size: 12px;
}

#awosign-root .two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

#awosign-root .social label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  margin: 0;
  background: var(--as-input-bg);
  border: 1px solid var(--as-input-border);
  border-radius: 7px;
  padding: 8px 10px;
  cursor: pointer;
}

#awosign-root .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

#awosign-root button {
  border: 1px solid #415e7c;
  background: #1d3b5a;
  color: #ffffff;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s ease;
}

#awosign-root button:hover {
  background: #2b527a;
}

#awosign-root button.as-btn-primary {
  background: #1a633f;
  border-color: #237d50;
}

#awosign-root button.as-btn-primary:hover {
  background: #237d50;
}

#awosign-root button.as-btn-accent {
  background: #9a6f15;
  border-color: #b5831a;
}

#awosign-root button.as-btn-accent:hover {
  background: #b5831a;
}

#awosign-root button.active {
  background: #e7b52e;
  color: #102032;
  border-color: #e7b52e;
}

#awosign-root button:focus-visible,
#awosign-root input:focus-visible,
#awosign-root select:focus-visible,
#awosign-root textarea:focus-visible {
  outline: 3px solid #e7b52e;
  outline-offset: 2px;
}

#awosign-root .stage {
  background: var(--as-stage);
  border: 1px dashed var(--as-stage-border);
  border-radius: 12px;
  padding: 24px;
  overflow: auto;
}

#awosign-root .stage h3 {
  margin: 0 0 13px;
}

#awosign-root .signature {
  background: #ffffff;
  color: #15263c;
  width: 600px;
  max-width: 100%;
  padding: 18px;
  border-radius: 4px;
  font-family: Arial, Helvetica, sans-serif;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

#awosign-root .sigrow {
  display: flex;
  align-items: center;
  gap: 20px;
}

#awosign-root .siglogo {
  width: 170px;
  min-width: 170px;
  text-align: center;
}

#awosign-root .siglogo img {
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
}

#awosign-root .siglogo div {
  overflow-wrap: anywhere;
}

#awosign-root .siginfo {
  border-left: 2px solid var(--accent);
  padding-left: 17px;
  line-height: 1.55;
  font-size: 12px;
}

#awosign-root .siginfo strong {
  font-size: 19px;
}

#awosign-root .sigaddress {
  font-size: 11px;
  margin-top: 12px;
  border-top: 1px solid #dddddd;
  padding-top: 9px;
}

/* 85 x 55 mm Exact Business Cards (Front & Back) */
#awosign-root .cards {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}

#awosign-root .cardwrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#awosign-root .card,
#as-print-host .card {
  width: 85mm;
  height: 55mm;
  box-sizing: border-box;
  border-radius: 0;
  overflow: hidden;
  padding: 5.5mm;
  position: relative;
  font-family: Arial, Helvetica, sans-serif;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

#awosign-root .card.show-crop-guide {
  outline: 1px dashed #7f95ab;
  outline-offset: -0.2mm;
}

#awosign-root .front,
#as-print-host .front {
  background: var(--brand, #172e49);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-top: 1.5mm solid var(--accent, #e7b52e);
}

#awosign-root .front img,
#as-print-host .front img {
  max-width: 46mm;
  max-height: 22mm;
  object-fit: contain;
}

#awosign-root .front strong,
#as-print-host .front strong {
  font-size: 13pt;
  margin-top: 2.5mm;
}

#awosign-root .front small,
#as-print-host .front small {
  font-size: 7.5pt;
  color: #dbe7f5;
  margin-top: 1mm;
}

#awosign-root .back,
#as-print-host .back {
  background: #ffffff;
  color: #15263c;
  border-left: 1.8mm solid var(--accent, #e7b52e);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3mm;
}

#awosign-root .back .details,
#as-print-host .back .details {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 7.4pt;
  line-height: 1.38;
}

#awosign-root .back strong,
#as-print-host .back strong {
  font-size: 11.5pt;
  color: #102032;
}

#awosign-root .qr,
#as-print-host .qr {
  background: #ffffff;
  padding: 1mm;
  border-radius: 1mm;
  border: 0.2mm solid #d8e0e8;
  width: 22mm;
  height: 22mm;
  object-fit: contain;
  flex-shrink: 0;
}

#awosign-root .socialicons,
#as-print-host .socialicons {
  display: flex;
  gap: 1.2mm;
  flex-wrap: wrap;
  margin-top: 1.8mm;
}

#awosign-root .socialicons span,
#as-print-host .socialicons span {
  background: var(--brand, #172e49);
  color: #ffffff;
  font-size: 6.5pt;
  padding: 0.8mm 1.5mm;
  border-radius: 0.8mm;
  font-weight: bold;
  display: inline-block;
}

#awosign-root .digital {
  width: 540px;
  max-width: 100%;
  background: var(--brand);
  color: #ffffff;
  border-top: 5px solid var(--accent);
  padding: 24px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 290px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

#awosign-root .digital img.logo {
  width: 110px;
  max-height: 70px;
  object-fit: contain;
}

#awosign-root .digital strong {
  font-size: 22px;
}

#awosign-root .digital .details {
  line-height: 1.65;
  font-size: 13px;
  overflow-wrap: anywhere;
}

#awosign-root .digital .qr {
  width: 108px;
  height: 108px;
}

/* Print & Bulk Duplication Panel */
#awosign-root .as-staff-bar {
  background: var(--as-input-bg);
  border: 1px solid var(--as-input-border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}

#awosign-root .as-staff-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

#awosign-root .as-staff-header h2 {
  margin: 0;
  font-size: 15px;
}

#awosign-root .as-badge {
  background: #e7b52e;
  color: #102032;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
}

#awosign-root .as-shortcode-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--as-input-border);
}

#awosign-root .as-shortcode-row,
#awosign-root .as-logo-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

#awosign-root .as-shortcode-row input {
  font-family: monospace;
  font-size: 12px;
}

#awosign-root .as-logo-row button,
#awosign-root .as-shortcode-row button {
  white-space: nowrap;
  flex-shrink: 0;
}

#awosign-root .as-file-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid #415e7c;
  background: #1d3b5a;
  color: #ffffff;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  margin: 0;
}

#awosign-root .as-print-panel {
  background: var(--as-input-bg);
  border: 1px solid var(--as-input-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 16px;
}

#awosign-root .as-print-panel h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

#awosign-root .as-print-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(130px, 1fr);
  gap: 12px;
  align-items: end;
}

#awosign-root .hint {
  font-size: 12px;
  color: var(--as-hint);
  margin-top: 10px;
}

#awosign-root .muted {
  color: var(--as-muted);
  font-size: 12px;
  margin-top: 14px;
}

#awosign-root #as-status {
  font-size: 13px;
  font-weight: 600;
  min-height: 18px;
  margin-top: 10px;
  color: #e7b52e;
}

#awosign-root .hidden {
  display: none !important;
}

#awosign-root .buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}

#awosign-root a {
  color: inherit;
}

#awosign-root .privacy {
  padding: 12px 22px;
  background: #102032;
  color: #d7e4f5;
  margin: 0;
  font-size: 12.5px;
}

/* In-Page Print Host (Replaces popup window.open) */
#as-print-host {
  display: none;
}

#as-print-host .as-a4-sheet {
  width: 210mm;
  height: 297mm;
  box-sizing: border-box;
  padding: 11mm 20mm;
  background: #ffffff;
  display: grid;
  grid-template-columns: repeat(2, 85mm);
  grid-template-rows: repeat(5, 55mm);
  gap: 0;
  break-after: page;
  page-break-after: always;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

#as-print-host .as-a4-sheet:last-child {
  break-after: auto;
  page-break-after: auto;
}

#as-print-host .as-a4-cell {
  width: 85mm;
  height: 55mm;
  position: relative;
  box-sizing: border-box;
}

#as-print-host .as-a4-cell.has-crop-lines {
  outline: 0.15mm dashed #9aa8b6;
}

#as-print-host .as-bleed-sheet {
  width: 97mm;
  height: 67mm;
  padding: 6mm;
  box-sizing: border-box;
  background: #ffffff;
  position: relative;
  break-after: page;
  page-break-after: always;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

#as-print-host .as-bleed-sheet:last-child {
  break-after: auto;
  page-break-after: auto;
}

#as-print-host .as-bleed-sheet .card {
  position: relative;
  z-index: 2;
  box-shadow: none !important;
}

#as-print-host .as-bleed-bg-front {
  position: absolute;
  top: 3mm;
  left: 3mm;
  width: 91mm;
  height: 61mm;
  background: var(--brand, #172e49);
  border-top: 4.5mm solid var(--accent, #e7b52e);
  z-index: 1;
}

#as-print-host .as-bleed-bg-back {
  position: absolute;
  top: 3mm;
  left: 3mm;
  width: 91mm;
  height: 61mm;
  background: #ffffff;
  border-left: 4.8mm solid var(--accent, #e7b52e);
  z-index: 1;
}

#as-print-host .as-crop-mark {
  position: absolute;
  background: #000000;
  z-index: 3;
}

#as-print-host .as-crop-tl-h { top: 6mm; left: 0.5mm; width: 4mm; height: 0.2mm; }
#as-print-host .as-crop-tr-h { top: 6mm; right: 0.5mm; width: 4mm; height: 0.2mm; }
#as-print-host .as-crop-bl-h { bottom: 6mm; left: 0.5mm; width: 4mm; height: 0.2mm; }
#as-print-host .as-crop-br-h { bottom: 6mm; right: 0.5mm; width: 4mm; height: 0.2mm; }

#as-print-host .as-crop-tl-v { top: 0.5mm; left: 6mm; width: 0.2mm; height: 4mm; }
#as-print-host .as-crop-tr-v { top: 0.5mm; right: 6mm; width: 0.2mm; height: 4mm; }
#as-print-host .as-crop-bl-v { bottom: 0.5mm; left: 6mm; width: 0.2mm; height: 4mm; }
#as-print-host .as-crop-br-v { bottom: 0.5mm; right: 6mm; width: 0.2mm; height: 4mm; }

/* CR80 Vertical (54 x 86 mm) Staff ID Badge Studio */
#awosign-root .as-cr80-card,
#as-print-host .as-cr80-card {
  width: 54mm;
  height: 86mm;
  background: #ffffff;
  color: #0f172a;
  border-radius: 2.5mm;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  position: relative;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

#awosign-root .as-cr80-card.show-crop-guide,
#as-print-host .as-cr80-card.show-crop-guide {
  outline: 0.25mm dashed #64748b;
  border-radius: 0;
}

#awosign-root .as-cr80-slot,
#as-print-host .as-cr80-slot {
  width: 12mm;
  height: 2.2mm;
  background: #e2e8f0;
  border-radius: 2mm;
  margin: 0 auto 1.4mm;
  border: 0.2mm solid #94a3b8;
}

#awosign-root .as-cr80-photo,
#as-print-host .as-cr80-photo {
  width: 22mm;
  height: 22mm;
  border-radius: 50%;
  border: 0.8mm solid var(--accent, #e7b52e);
  margin: 1.5mm auto;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14pt;
  color: var(--brand, #172e49);
  overflow: hidden;
}

#awosign-root .as-cr80-photo img,
#as-print-host .as-cr80-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#as-print-host .as-a4-badge-sheet {
  width: 210mm;
  height: 297mm;
  padding: 12mm 10mm;
  background: #ffffff;
  display: grid;
  grid-template-columns: repeat(3, 54mm);
  grid-template-rows: repeat(3, 86mm);
  gap: 5mm 8mm;
  justify-content: center;
  align-content: center;
  box-sizing: border-box;
  break-after: page;
  page-break-after: always;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Company Invoice & Bank / IBAN Cards Studio */
#awosign-root .as-bank-item-box {
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid var(--as-input-border);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

#awosign-root .as-billing-card,
#as-print-host .as-billing-card {
  width: 85mm;
  height: 55mm;
  box-sizing: border-box;
  background: var(--brand, #172e49);
  color: #ffffff;
  border-top: 1.6mm solid var(--accent, #e7b52e);
  padding: 4.2mm 4.8mm;
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

#awosign-root .as-billing-row,
#as-print-host .as-billing-row {
  display: flex;
  justify-content: space-between;
  gap: 2mm;
  font-size: 6.4pt;
  line-height: 1.32;
  border-bottom: 0.15mm solid rgba(255, 255, 255, 0.12);
  padding: 0.45mm 0;
}

#awosign-root .as-billing-row span:first-child,
#as-print-host .as-billing-row span:first-child {
  color: #b8c8dc;
  flex-shrink: 0;
}

#awosign-root .as-billing-row strong,
#as-print-host .as-billing-row strong {
  text-align: right;
  color: #ffffff;
  overflow-wrap: anywhere;
}

/* Multi-Script (CJK Chinese/Japanese/Korean & RTL Arabic) Card & Signature Support */
#awosign-root .signature,
#awosign-root .card,
#as-print-host .card,
#awosign-root .as-cr80-card,
#as-print-host .as-cr80-card,
#awosign-root .as-billing-card,
#as-print-host .as-billing-card {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans", "Malgun Gothic", "Tahoma", Arial, sans-serif;
}

#awosign-root .as-lang-preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 14px;
  padding: 10px 12px;
  background: rgba(231, 181, 46, 0.09);
  border: 1px dashed rgba(231, 181, 46, 0.45);
  border-radius: 9px;
  align-items: center;
}

#awosign-root .as-lang-preset-btn {
  padding: 5px 10px;
  font-size: 11.5px;
  border-radius: 6px;
  background: var(--as-input-bg);
  border: 1px solid var(--as-input-border);
  color: var(--as-text);
  cursor: pointer;
  font-weight: 700;
}

#awosign-root .as-lang-preset-btn:hover {
  border-color: #e7b52e;
  background: #243f5d;
}

#awosign-root .as-alt-sub {
  display: block;
  font-size: 0.85em;
  opacity: 0.88;
  font-weight: 600;
  margin-top: 1px;
}

/* RTL (Arabic) Card & Signature Layout Adjustments */
#awosign-root[data-card-dir="rtl"] .back,
#as-print-host[data-card-dir="rtl"] .back {
  direction: rtl;
  text-align: right;
  border-left: none;
  border-right: 1.8mm solid var(--accent, #e7b52e);
}

#awosign-root[data-card-dir="rtl"] .digital {
  direction: rtl;
  text-align: right;
}

#awosign-root[data-card-dir="rtl"] .as-billing-card,
#as-print-host[data-card-dir="rtl"] .as-billing-card {
  direction: rtl;
  text-align: right;
}

#awosign-root[data-card-dir="rtl"] .as-billing-row strong,
#as-print-host[data-card-dir="rtl"] .as-billing-row strong {
  text-align: left;
}

/* WCAG 2.2 AA Keyboard Focus Ring (AWO-QS-11) */
#awosign-root button:focus-visible,
#awosign-root input:focus-visible,
#awosign-root select:focus-visible,
#awosign-root textarea:focus-visible,
#awosign-root .as-file-btn:focus-visible {
  outline: 2.5px solid #e7b52e;
  outline-offset: 2px;
}

#awosign-root .as-storage-notice {
  margin: 10px 0 4px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(231, 181, 46, 0.12);
  border: 1px solid rgba(231, 181, 46, 0.45);
  color: var(--as-text);
  font-size: 11.8px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

#awosign-root .signature {
  overflow-x: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#awosign-root .signature table {
  max-width: 100% !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 980px) {
  #awosign-root main {
    grid-template-columns: 1fr;
  }
  #awosign-root .as-print-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 680px) {
  #awosign-root header {
    padding: 12px 14px;
  }
  #awosign-root header h1 {
    font-size: 18px;
    overflow-wrap: anywhere;
  }
  #awosign-root header > .two,
  #awosign-root .as-header-controls {
    min-width: 0 !important;
    width: 100%;
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
  #awosign-root main {
    padding: 10px;
    gap: 12px;
  }
  #awosign-root .panel {
    padding: 12px;
    min-width: 0;
    max-width: 100%;
  }
  #awosign-root .stage {
    padding: 10px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
  }
  #awosign-root .two,
  #awosign-root .social {
    grid-template-columns: 1fr;
  }
  #awosign-root .as-logo-row,
  #awosign-root .as-shortcode-row {
    flex-wrap: wrap;
  }
  #awosign-root .digital {
    padding: 14px;
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
    max-width: 100%;
  }
  #awosign-root .cardwrap {
    max-width: 100%;
    min-width: 0;
  }
  #awosign-root .card,
  #awosign-root .as-billing-card,
  #awosign-root .as-cr80-card {
    max-width: 100%;
  }
}

@media print {
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  body > *:not(#as-print-host),
  #wpadminbar,
  #adminmenumain,
  #adminmenuback,
  #adminmenuwrap,
  #wpfooter {
    display: none !important;
  }

  body #as-print-host {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #as-print-host > .card {
    width: 85mm;
    height: 55mm;
    margin: 0;
    box-shadow: none !important;
    break-after: page;
    page-break-after: always;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #as-print-host > .card:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  #as-print-host .card,
  #as-print-host .as-cr80-card,
  #as-print-host .as-billing-card {
    box-shadow: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ==========================================================================
   AwoSign Mobile Pilot v0.2.0 — Wallet Bar, Fullscreen QR Pass & Bottom Nav
   ========================================================================== */
#awosign-root .mobile-pilot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px;
  background: linear-gradient(90deg, #0b192c 0%, #132a46 100%);
  border-bottom: 2px solid #e7b52e;
  color: #f8fafc;
}
#awosign-root .pilot-brand-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#awosign-root .pilot-ver-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(231, 181, 46, 0.18);
  color: #e7b52e;
}
#awosign-root .pilot-plan-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: #3b82f6;
  color: #ffffff;
  letter-spacing: 0.4px;
}
#awosign-root .pilot-plan-pill.is-pro {
  background: #10b981;
  color: #052e16;
}
#awosign-root .pilot-ios-install-pill {
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  color: #09131f;
  border: 1px solid #cbd5e1;
  cursor: pointer;
}
#awosign-root header {
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}
#awosign-root .pilot-quick-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
#awosign-root .pilot-ctrl-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
#awosign-root .pilot-ctrl-item label {
  margin: 0;
  font-size: 12px;
  color: #cbd5e1;
  white-space: nowrap;
}
#awosign-root .mobile-pilot select {
  width: auto;
  max-width: 210px;
  padding: 6px 10px;
  font-size: 12.5px;
  background: #09131f;
  color: #f8fafc;
  border: 1px solid #334e6f;
  border-radius: 8px;
}
#awosign-root .pilot-action-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
#awosign-root .pilot-btn-qr,
#awosign-root .pilot-btn-qr-inline {
  background: #e7b52e !important;
  color: #09131f !important;
  font-weight: 800 !important;
  border: 1px solid #f59e0b !important;
  box-shadow: 0 3px 10px rgba(231, 181, 46, 0.25);
}
#awosign-root .pilot-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
#awosign-root .pilot-badge-camera-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(15, 33, 55, 0.72);
  border: 1px dashed #e7b52e;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
#awosign-root .pilot-badge-cam-hint {
  width: 100%;
  font-size: 12px;
  color: #cbd5e1;
  margin-top: 2px;
}
#awosign-root #badgeFront .as-cr80-photo {
  cursor: pointer;
  position: relative;
}
#awosign-root .pilot-locked,
#awosign-root button:disabled {
  opacity: 0.68;
  position: relative;
}
#awosign-root .pilot-locked::after {
  content: " ★ PRO";
  font-size: 10px;
  font-weight: 800;
  color: #e7b52e;
  margin-left: 4px;
}

/* Fullscreen QR Pass & Pro Upgrade Modals */
#awosign-root .pilot-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(6, 12, 21, 0.85);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
#awosign-root .pilot-modal-card {
  width: min(500px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #0f2137;
  color: #f8fafc;
  border: 2px solid #e7b52e;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}
#awosign-root .pilot-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
#awosign-root .pilot-modal-close {
  background: #1e3a5f;
  color: #ffffff;
  border: 1px solid #3b5980;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 16px;
  cursor: pointer;
}
#awosign-root .pilot-qr-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
#awosign-root .pilot-qr-mode-switch button {
  padding: 10px 8px;
  font-size: 13px;
  border-radius: 10px;
  background: #162d49;
  color: #cbd5e1;
  border: 1px solid #2b486b;
}
#awosign-root .pilot-qr-mode-switch button.active {
  background: #e7b52e;
  color: #09131f;
  font-weight: 800;
  border-color: #e7b52e;
}
#awosign-root .pilot-qr-lang-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #091524;
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}
#awosign-root .pilot-qr-lang-bar label {
  margin: 0;
  font-size: 12.5px;
  color: #e2e8f0;
}
#awosign-root .pilot-qr-lang-bar select {
  width: auto;
  min-width: 150px;
  padding: 6px 10px;
}
#awosign-root .pilot-qr-stage {
  background: #09131f;
  border: 1px solid #243e5c;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
#awosign-root .pilot-pass-qr-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 14px;
  border-radius: 14px;
  margin: 4px auto 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
#awosign-root .pilot-pass-qr-box img {
  width: 210px;
  height: 210px;
  display: block;
}
#awosign-root .pilot-pass-meta h3 {
  margin: 4px 0;
  font-size: 19px;
  color: #ffffff;
}
#awosign-root .pilot-pass-role {
  margin: 2px 0;
  font-size: 14px;
  color: #e7b52e;
  font-weight: 700;
}
#awosign-root .pilot-pass-company {
  margin: 2px 0 6px;
  font-size: 14px;
  color: #dbeafe;
  font-weight: 600;
}
#awosign-root .pilot-pass-contact {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: #94a3b8;
  word-break: break-word;
}
#awosign-root .pilot-pass-iban-box {
  text-align: left;
  background: #10233a;
  border: 1px solid #2b4a6f;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: #f1f5f9;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 8px 0 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
#awosign-root .pilot-bank-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 10px;
}
#awosign-root .pilot-bank-pills button {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #172e49;
}
#awosign-root .pilot-bank-pills button.active {
  background: #e7b52e;
  color: #09131f;
}
#awosign-root .pilot-qr-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
#awosign-root .pilot-qr-actions button {
  flex: 1 1 180px;
}
#awosign-root .pilot-qr-hint {
  display: block;
  margin-top: 10px;
  font-size: 11.5px;
  color: #94a3b8;
  text-align: center;
}
#awosign-root .pilot-pro-reason {
  background: rgba(231, 181, 46, 0.14);
  border: 1px solid rgba(231, 181, 46, 0.45);
  color: #fde68a;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin: 0 0 12px;
}
#awosign-root .pilot-pro-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
#awosign-root .pilot-pro-col {
  background: #091524;
  border: 1px solid #243e5c;
  border-radius: 12px;
  padding: 12px;
}
#awosign-root .pilot-pro-col.pilot-pro-highlight {
  border-color: #e7b52e;
  background: #10243d;
}
#awosign-root .pilot-pro-col h4 {
  margin: 0 0 8px;
  font-size: 13.5px;
  color: #e7b52e;
}
#awosign-root .pilot-pro-col ul {
  margin: 0;
  padding-left: 16px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #e2e8f0;
}
#awosign-root .pilot-qs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}
#awosign-root .pilot-qs-grid label {
  margin: 0 0 4px;
  font-size: 12px;
  color: #cbd5e1;
}
#awosign-root .pilot-lead-form {
  background: #091524;
  border: 1px solid #243e5c;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}
#awosign-root .pilot-lead-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}
#awosign-root .pilot-lead-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #091524;
  border: 1px solid #2b486b;
  border-radius: 12px;
  padding: 10px;
}
#awosign-root .pilot-lead-thumb {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e7b52e;
  flex-shrink: 0;
}
#awosign-root .pilot-lead-body {
  flex: 1;
  min-width: 0;
  font-size: 13px;
}
#awosign-root .pilot-lead-sub {
  color: #93c5fd;
  font-size: 12.5px;
  margin-top: 2px;
}
#awosign-root .pilot-lead-note {
  color: #fde68a;
  font-size: 12px;
  margin-top: 3px;
}
#awosign-root .pilot-lead-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
#awosign-root .pilot-lead-actions button {
  padding: 5px 10px;
  font-size: 11.5px;
  min-height: 32px !important;
}

/* Sticky Mobile Bottom Navigation Bar */
#awosign-root .pilot-bottom-nav {
  display: none;
}

@media screen and (min-width: 681px) {
  #awosign-root #pilotEdit,
  #awosign-root #pilotOutputs {
    display: none;
  }
}

@media screen and (max-width: 680px) {
  #awosign-root {
    padding-bottom: 74px;
  }
  #awosign-root .pilot-collapsed {
    display: none !important;
  }
  #awosign-root .mobile-pilot {
    padding: 10px 12px;
    gap: 8px;
  }
  #awosign-root .pilot-quick-controls {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  #awosign-root .pilot-ctrl-item:first-child {
    grid-column: 1 / -1;
  }
  #awosign-root .pilot-ctrl-item select {
    width: 100%;
    max-width: 100%;
  }
  #awosign-root .pilot-action-group {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  #awosign-root .pilot-action-group #pilotQrPassBtn {
    grid-column: 1 / -1;
  }
  #awosign-root .mobile-pilot button,
  #awosign-root .stage .buttons button {
    min-height: 44px;
  }
  #awosign-root #pilotTabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding: 2px 2px 8px;
    margin-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #awosign-root #pilotTabs::-webkit-scrollbar {
    display: none;
  }
  #awosign-root #pilotTabs button {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 38px;
    padding: 7px 12px;
    font-size: 12.5px;
    border-radius: 999px;
  }
  #awosign-root .pilot-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9990;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: #09131f;
    border-top: 2px solid #233c59;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.45);
  }
  #awosign-root .pilot-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px;
    min-height: 48px;
    border-radius: 10px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 10.5px;
    font-weight: 700;
  }
  #awosign-root .pilot-bottom-nav button.active {
    background: #172e49;
    color: #ffffff;
  }
  #awosign-root .pilot-bottom-nav button.pilot-nav-qr-fab {
    background: #e7b52e;
    color: #09131f;
    font-weight: 800;
  }
  #awosign-root .pilot-nav-ico {
    font-size: 16px;
    line-height: 1;
  }
}

@media print {
  #awosign-root .mobile-pilot,
  #awosign-root .pilot-bottom-nav,
  #awosign-root .pilot-modal {
    display: none !important;
  }
}
