/* electrify.tw Invoice Calculator - style.css (Clean White, Taiwan Blue Ink, Full Fluid RWD) */

:root {
  --bg-page: #f8fafc;
  --bg-panel: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-light: #e2e8f0;
  --border-focus: #0285C7;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;

  --accent-blue: #193E75;
  --accent-hover: #0285C7;
  --danger-red: #dc2626;
  --success-green: #16a34a;

  /* Paper Invoice Theme */
  --inv-bg: #ffffff;
  --inv-print-black: #0f172a;      /* 實體發票印刷黑墨 */
  --inv-line-border: #1e293b;      /* 實體主框線（深黑灰） */
  --inv-line-gray: #e2e8f0;        /* 內部欄位淺灰細線 */
  --inv-line-guide: #cbd5e1;       /* 地址與留白手寫引導線 */
  --inv-handwrite-blue: #163863;   /* 正統油性原子筆深藍墨色（墨水藍） */
  --inv-stamp-red: #c8102e;        /* 發票專用章印泥紅 */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

.mono {
  font-family: 'IBM Plex Mono', monospace !important;
  font-variant-numeric: tabular-nums;
}

/* Container */
.invoice-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* Page Header */
.page-header {
  margin-bottom: 28px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin-bottom: 8px;
}

.page-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 760px;
}

/* Main Workspace Grid */
.workspace-grid {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 36px;
  align-items: start;
}

@media (max-width: 1080px) {
  .workspace-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .invoice-container {
    padding: 16px 12px 48px;
  }
  .page-title {
    font-size: 22px;
  }
  .preview-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .toolbar-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* Left Control Panel */
.control-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Segmented Buttons */
.type-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 8px;
}

.segment-btn {
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.segment-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Panel Sections */
.panel-section {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
}

.section-header-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-header-between .section-title {
  margin-bottom: 0;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 14px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: 9px 12px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 133, 199, 0.15);
}

.mono-input {
  font-family: 'IBM Plex Mono', monospace !important;
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.inline-btn {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: var(--text-soft);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.inline-btn:hover {
  color: var(--text-main);
}

.taxid-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.taxid-badge.valid {
  background: #dcfce7;
  color: var(--success-green);
}

.taxid-badge.invalid {
  background: #fee2e2;
  color: var(--danger-red);
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Preset Pills */
.demo-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.demo-label {
  font-size: 11px;
  color: var(--text-soft);
}

.demo-pill {
  font-size: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.demo-pill:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

/* Calculation Mode Tabs */
.calc-tab-wrap {
  display: flex;
  background: #e2e8f0;
  border-radius: 6px;
  padding: 2px;
}

.tab-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
}

.tab-btn.active {
  background: #ffffff;
  color: var(--text-main);
}

/* Items Table */
.items-table-wrap {
  overflow-x: auto;
  margin-bottom: 8px;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
}

.items-table th {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  padding: 6px 4px;
  border-bottom: 1px solid var(--border-light);
}

.items-table td {
  padding: 6px 3px;
}

.items-table input {
  padding: 6px 8px;
  font-size: 12px;
}

.items-subtotal {
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  padding-right: 4px;
}

.btn-del-item {
  background: transparent;
  border: none;
  color: var(--text-soft);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
}

.btn-del-item:hover {
  color: var(--danger-red);
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.btn-add-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  background: transparent;
  border: 1px dashed #93c5fd;
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-add-line:hover {
  background: #eff6ff;
}

.items-count {
  font-size: 11px;
  color: var(--text-soft);
}

.quick-tip {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Right Column: Preview Sticky */
.preview-sticky {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding-bottom: 20px;
}

@media (max-width: 1080px) {
  .preview-sticky {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* Toolbar */
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.toolbar-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-indicator {
  width: 6px;
  height: 6px;
  background: var(--success-green);
  border-radius: 50%;
}

.toolbar-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pill:hover {
  border-color: var(--border-focus);
  color: var(--accent-blue);
}

.btn-reset {
  padding: 5px 6px;
}

/* ===================================================
   REALISTIC PAPER INVOICE (Fluid RWD & Taiwan Blue Ink)
   =================================================== */

.paper-invoice {
  background: var(--inv-bg);
  border: 1.5px solid var(--inv-line-border);
  color: var(--inv-print-black);
  padding: 18px 22px 14px;
  border-radius: 2px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  font-family: 'Noto Sans TC', sans-serif;
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Blue handwriting ink class */
.hand-write-blue {
  color: var(--inv-handwrite-blue) !important;
  font-weight: 700;
}

/* 1. Header (SN, Title, Period) */
.inv-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-end;
  border-bottom: 1.5px solid var(--inv-line-border);
  padding-bottom: 10px;
  margin-bottom: 8px;
}

.inv-head-left {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.inv-sn-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--inv-print-black);
}

.inv-sn-line {
  display: inline-block;
  width: 80px;
  border-bottom: 1px solid var(--inv-line-guide);
}

.inv-head-center {
  text-align: center;
}

.inv-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.25em;
  line-height: 1.1;
  color: var(--inv-print-black);
}

.inv-type-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--inv-print-black);
}

.inv-head-right {
  text-align: right;
}

.inv-period-box {
  font-size: 14px;
  font-weight: 800;
  color: var(--inv-print-black);
}

.period-year,
.period-month {
  padding: 0 2px;
  color: var(--inv-print-black);
}

.period-unit {
  font-size: 12px;
  font-weight: 600;
}

/* 2. Buyer Row */
.inv-buyer-box {
  margin-bottom: 8px;
  font-size: 13px;
}

.inv-buyer-meta-line {
  margin-bottom: 6px;
}

.inv-buyer-name-group {
  display: flex;
  align-items: center;
}

.inv-lbl {
  font-weight: 800;
  color: var(--inv-print-black);
  white-space: nowrap;
}

.inv-buyer-name {
  font-size: 14px;
}

.inv-buyer-middle-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.inv-taxid-group {
  display: flex;
  align-items: center;
}

.taxid-cells {
  display: inline-flex;
  gap: 2px;
}

.taxid-cells span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 22px;
  border: 1px solid #94a3b8;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 800;
  color: var(--inv-handwrite-blue);
  background: #fff;
}

.inv-date-group {
  font-size: 13px;
  font-weight: 700;
  color: var(--inv-print-black);
}

.date-prefix {
  margin-right: 4px;
}

.date-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  padding: 0 2px;
}

.date-unit {
  font-size: 12px;
  margin-right: 4px;
  color: var(--inv-print-black);
}

/* Address Line (Real Blank Invoice style: hand-written underlines without boxes) */
.inv-address-line {
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.address-blank-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  font-size: 11px;
  color: var(--inv-print-black);
  font-weight: 600;
}

.addr-seg {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
}

.addr-seg .line {
  display: inline-block;
  border-bottom: 1px solid var(--inv-line-guide);
  height: 12px;
}

.line-wide { width: 34px; }
.line-mid { width: 24px; }
.line-sm { width: 16px; }

/* 3. Main Layout: Left Main & Right Aside */
.inv-main-layout {
  display: grid;
  grid-template-columns: 1fr 150px;
  border: 1.5px solid var(--inv-line-border);
}

.inv-layout-left {
  border-right: 1.5px solid var(--inv-line-border);
}

/* Left Table */
.inv-paper-table {
  width: 100%;
  border-collapse: collapse;
}

.inv-paper-table th {
  border-bottom: 1.5px solid var(--inv-line-border);
  border-right: 1px solid var(--inv-line-gray);
  padding: 5px 6px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  color: var(--inv-print-black);
  background: #f8fafc;
}

.inv-paper-table th:last-child {
  border-right: none;
}

.inv-paper-table td {
  border-bottom: 1px solid var(--inv-line-gray);
  border-right: 1px solid var(--inv-line-gray);
  padding: 4px 6px;
  font-size: 12px;
  height: 25px;
}

.inv-paper-table td:last-child {
  border-right: none;
}

.col-name { width: 44%; }
.col-qty { width: 14%; text-align: center; }
.col-price { width: 20%; text-align: right; }
.col-amount { width: 22%; text-align: right; }

.td-name { font-weight: 600; }
.td-qty { text-align: center; font-family: 'IBM Plex Mono', monospace; }
.td-price, .td-amount { text-align: right; font-family: 'IBM Plex Mono', monospace; font-weight: 700; }

/* Financial Calculation Rows */
.inv-calc-block {
  border-top: 1.5px solid var(--inv-line-border);
}

.inv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--inv-line-gray);
  padding: 5px 8px;
}

.inv-row-lbl {
  font-size: 12px;
  font-weight: 800;
  color: var(--inv-print-black);
}

.inv-row-val {
  font-size: 13px;
  font-weight: 800;
  text-align: right;
  width: 120px;
}

.vat-split {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tax-options {
  display: flex;
  gap: 10px;
}

.chk-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--inv-print-black);
  opacity: 0.7;
}

.chk-item.active {
  opacity: 1;
  font-weight: 800;
}

.chk-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1px solid var(--inv-line-border);
  font-size: 11px;
  line-height: 1;
}

.total-row {
  border-bottom: none;
  background: #f8fafc;
}

.total-lbl {
  font-weight: 900;
}

.total-val {
  font-size: 15px;
  font-weight: 900;
}

/* Right Aside: Remarks & Stamp */
.inv-layout-right {
  display: flex;
  flex-direction: column;
}

.inv-remarks-box {
  flex: 1;
  border-bottom: 1.5px solid var(--inv-line-border);
  padding: 6px 8px;
  min-height: 90px;
}

.remarks-header {
  font-size: 12px;
  font-weight: 800;
  color: var(--inv-print-black);
}

.inv-stamp-box {
  height: 106px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed var(--inv-stamp-red);
  margin: 6px;
  border-radius: 3px;
  text-align: center;
}

.stamp-caption {
  font-size: 10px;
  font-weight: 700;
  color: var(--inv-stamp-red);
  margin-bottom: 4px;
}

.stamp-inner-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--inv-stamp-red);
  opacity: 0.85;
}

/* 4. Chinese Capital Bar (Row with 9 seamless grid cells) */
.inv-chinese-bar {
  display: flex;
  border: 1.5px solid var(--inv-line-border);
  border-top: none;
  align-items: center;
  padding: 6px 10px;
  background: #ffffff;
  gap: 12px;
}

.chinese-title-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.main-txt {
  font-size: 12px;
  font-weight: 900;
  color: var(--inv-print-black);
}

.sub-txt {
  font-size: 11px;
  font-weight: normal;
  color: var(--text-muted);
  white-space: nowrap;
}

.chinese-cells-container {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  flex: 1;
  border-left: 1px solid var(--inv-line-gray);
}

.c-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  border-right: 1px solid var(--inv-line-gray);
}

.c-cell:last-child {
  border-right: none;
}

.c-char {
  height: 22px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: var(--inv-handwrite-blue);
  position: relative;
}

/* Seamless Anti-Tamper Strike Line (Inline) */
.strike-dash {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--inv-handwrite-blue);
}

.c-unit {
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--inv-print-black);
  border-top: 1px solid var(--inv-line-gray);
  padding-top: 2px;
}

/* 5. Bottom Instructions */
.inv-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  font-size: 10px;
  color: var(--text-muted);
}

.bottom-legal-note {
  flex: 1;
}

.bottom-copy-info {
  font-weight: 700;
}

/* ===================================================
   MOBILE FLUID RWD (< 768px) - 真正流暢自適應
   =================================================== */

@media (max-width: 768px) {
  .invoice-container {
    padding: 12px 8px 40px !important;
  }

  .paper-invoice {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 8px 8px !important;
  }

  /* 手機端表頭採清晰二層：左上 SN、右上期別、中央大標題 */
  .inv-head {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas:
      "left right"
      "center center" !important;
    row-gap: 2px !important;
    align-items: center !important;
    border-bottom: 1.5px solid var(--inv-line-border);
    padding-bottom: 6px;
    margin-bottom: 6px;
  }

  .inv-head-left {
    grid-area: left;
    justify-self: start;
    font-size: 12px;
  }

  .inv-head-right {
    grid-area: right;
    justify-self: end;
  }

  .inv-head-center {
    grid-area: center;
    text-align: center;
    margin-top: 2px;
  }

  .inv-title {
    font-size: 18px !important;
    letter-spacing: 0.15em;
  }

  .inv-type-label {
    font-size: 12px;
  }

  .inv-sn-line {
    width: 45px;
  }

  .inv-period-box {
    font-size: 11px;
  }

  .inv-buyer-middle-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .taxid-cells span {
    width: 16px;
    height: 19px;
    font-size: 11.5px;
  }

  .inv-address-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .address-blank-wrap {
    flex-wrap: wrap;
    gap: 4px;
    font-size: 10px;
  }

  .line-wide { width: 20px; }
  .line-mid { width: 15px; }
  .line-sm { width: 10px; }

  /* 雙欄主體在手機縮小右側 */
  .inv-main-layout {
    grid-template-columns: 1fr 78px !important;
  }

  .inv-paper-table {
    table-layout: fixed;
    width: 100%;
  }

  .inv-remarks-box {
    min-height: 70px;
    padding: 4px;
  }

  .remarks-header {
    font-size: 11px;
  }

  .inv-stamp-box {
    height: 76px;
    margin: 3px;
    padding: 3px;
  }

  .stamp-caption {
    font-size: 8px;
    line-height: 1.1;
    margin-bottom: 2px;
  }

  .stamp-inner-text {
    font-size: 8.5px;
    line-height: 1.1;
  }

  .col-name { width: 38%; }
  .col-qty { width: 14%; }
  .col-price { width: 24%; font-size: 11px; }
  .col-amount { width: 24%; font-size: 11px; }

  .inv-paper-table th {
    padding: 4px 2px;
    font-size: 11px;
  }

  .inv-paper-table td {
    padding: 3px 2px;
    font-size: 11px;
    height: 22px;
  }

  .inv-row {
    padding: 4px 4px;
  }

  .inv-row-lbl {
    font-size: 11px;
  }

  .inv-row-val {
    width: auto;
    font-size: 12px;
  }

  .vat-split {
    gap: 4px;
  }

  .tax-options {
    gap: 4px;
  }

  .chk-item {
    font-size: 9.5px;
    gap: 2px;
  }

  .chk-box {
    width: 11px;
    height: 11px;
    font-size: 9px;
  }

  /* 手機端大寫欄位改為垂直兩層：上方清晰標題、下方滿版 9 格防偽線條 */
  .inv-chinese-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 5px 6px;
  }

  .chinese-title-group {
    justify-content: flex-start;
    gap: 4px;
  }

  .main-txt {
    font-size: 11px;
    font-weight: 800;
  }

  .sub-txt {
    font-size: 10px;
  }

  .chinese-cells-container {
    width: 100%;
    border-left: 1px solid var(--inv-line-gray);
    border-top: 1px solid var(--inv-line-gray);
  }

  .c-char {
    font-size: 13px;
    height: 20px;
  }

  .c-unit {
    font-size: 9.5px;
    padding-top: 1px;
  }

  .bottom-copy-info {
    display: none; /* 手機端底部精簡文字 */
  }
}

/* Guidelines Section */
.guidelines-section {
  margin-top: 48px;
  border-top: 1px solid var(--border-light);
  padding-top: 32px;
}

.guidelines-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
}

.guidelines-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.guide-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 18px;
}

.guide-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.guide-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

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

.guide-text strong {
  color: var(--text-main);
}

.guide-text code {
  background: var(--bg-subtle);
  padding: 2px 4px;
  border-radius: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
}

/* Print Styles */
@media print {
  body {
    background: #ffffff !important;
  }

  .etw-bar,
  .page-header,
  .control-panel,
  .preview-toolbar,
  .guidelines-section,
  #etw-footer {
    display: none !important;
  }

  .invoice-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .workspace-grid {
    display: block !important;
  }

  .preview-sticky {
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .paper-invoice {
    border: 1.5px solid #000000 !important;
    box-shadow: none !important;
    max-width: 100% !important;
    padding: 8mm !important;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  @page {
    size: A4;
    margin: 10mm;
  }
}
