/* Extracted feature surface polish layer from styles.css. Keep this file loaded after styles-workbench.css. */

/* Screenshot feedback polish: Store Task cards, Audit Log safe details, Ordering form */
.task-summary-card { align-content: start; }
.task-summary-card h3 { font-size: 22px; letter-spacing: 0; }
.task-summary-list { margin-top: 12px; border: 1px solid #f1e7ea; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.72); }
.task-summary-list div { grid-template-columns: 120px minmax(0, 1fr); padding: 10px 12px; border-top: 1px solid #f1e7ea; }
.task-summary-list div:first-child { border-top: 0; }
.task-summary-list dd { font-size: 15px; line-height: 1.25; }
.task-qr-actions { margin-top: 14px; padding: 12px; background: #fffdfb; }
.qr-code-grid { width: min(170px, 100%); }
.qr-code-card img { width: 116px; height: 116px; }
.task-card .tabs.task-action-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
.task-action-panel .btn { min-height: 40px; }
.task-danger-zone { margin-top: 2px; grid-template-columns: minmax(0, 1fr) 104px; align-items: center; }
.task-delete-reason textarea { min-height: 58px; }
.audit-summary-cell { max-width: 420px; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.audit-detail-row pre { max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-word; background: #fff; border-radius: 14px; }
.ordering-card { max-width: 1120px; margin-inline: auto; }
.ordering-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid #f1e4e8; }
.ordering-hero p { max-width: 760px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.ordering-form { gap: 14px; }
.ordering-step-card { padding: 18px; background: #fffdfb; }
.ordering-basic-card { gap: 14px; }
.ordering-step-card h3 { font-size: 17px; }
.compact-readonly-grid { align-items: start; }
.compact-readonly-grid .locked-field { padding: 0; background: transparent; border: 0; }
.ordering-kcode-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(230px, .85fr); gap: 12px; align-items: stretch; padding: 12px; border: 1px solid #eadbdd; border-radius: 18px; background: linear-gradient(145deg, #fff, #fff8fb); }
.ordering-kcode-row .field { margin: 0; align-content: start; }
.ordering-kcode-field { min-width: 0; }
.kcode-combo { display: grid; grid-template-columns: 48px minmax(90px, .25fr) minmax(0, 1fr); align-items: stretch; gap: 0; min-height: 54px; border: 1px solid #d9c4ca; border-radius: 17px; background: #fff; overflow: hidden; }
.kcode-combo span { min-height: 54px; display: grid; place-items: center; background: var(--soft-accent-bg); color: var(--brand); font-weight: 950; font-size: 19px; border-right: 1px solid #eadbdd; }
.kcode-combo input { border: 0; border-radius: 0; min-height: 54px; box-shadow: none; font-size: 18px; font-weight: 850; }
.kcode-combo b { min-width: 0; display: flex; align-items: center; padding: 0 14px; color: var(--ink); font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ordering-date-box { display: grid; align-items: center; min-height: 54px; border: 1px solid #d9c4ca; border-radius: 17px; background: #fff; overflow: hidden; }
.ordering-date-box input { min-height: 54px; border: 0; border-radius: 0; box-shadow: none; padding-inline: 14px; }
.ordering-arrival-field { min-width: 0; }
.ordering-detail-ticket { display: grid; grid-template-columns: minmax(160px, .8fr) minmax(250px, 1fr) minmax(170px, .9fr) minmax(170px, .9fr); gap: 12px; align-items: stretch; margin: 10px 0 14px; padding: 12px; border: 1px solid #eadbdd; border-radius: 18px; background: linear-gradient(145deg, #fff, #fff8fb); }
.ordering-detail-ticket .field { margin: 0; align-content: start; }
.ordering-detail-ticket input, .ordering-detail-ticket select { min-height: 54px; }
.ordering-detail-ticket .hidden { display: none; }
.ordering-detail-ticket .invoice-number-control { min-height: 54px; }
.ordering-detail-ticket .invoice-digit-row { min-height: 54px; padding: 4px; align-content: center; }
.ordering-detail-ticket .invoice-lock-window, .ordering-detail-ticket .invoice-lock-window .invoice-digit { min-height: 44px !important; }
.ordering-detail-ticket .invoice-lock-window .invoice-digit { font-size: 24px; }
.ordering-item-editor { margin-top: 12px; }
.ordering-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-areas: "kcode desc desc desc" "type size quantity doc"; gap: 12px; align-items: start; }
.ordering-detail-grid .field { margin-top: 0; }
.ordering-detail-kcode-field { grid-area: kcode; }
.ordering-detail-description-field { grid-area: desc; }
.ordering-detail-description-field textarea { min-height: 48px; }
.ordering-detail-type-field { grid-area: type; }
.ordering-detail-size-field { grid-area: size; }
.ordering-detail-quantity-field { grid-area: quantity; }
.ordering-item-doc-field { grid-area: doc; }
.ordering-item-editor.hidden { display: none; }
.ordering-item-editor.has-locked-store-item-fields .ordering-detail-description-field,
.ordering-item-editor.has-locked-store-item-fields .ordering-detail-type-field,
.ordering-item-editor.has-locked-store-item-fields .ordering-detail-size-field,
.ordering-photo-field.is-store-item-locked {
  border: 1px dashed #d7c3c9;
  border-radius: 16px;
  padding: 8px;
  background: repeating-linear-gradient(135deg, #fbf6f7, #fbf6f7 8px, #f4ecef 8px, #f4ecef 16px);
}
.ordering-item-editor.has-locked-store-item-fields textarea:disabled,
.ordering-item-editor.has-locked-store-item-fields select:disabled {
  background: rgba(255,255,255,.72);
  color: var(--ink);
  opacity: 1;
  cursor: not-allowed;
}
.ordering-store-item-lock-note {
  margin: 4px 0 0;
  padding: 6px 9px;
  border: 1px solid #eadbdd;
  border-radius: 12px;
  background: #fffaf7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.3;
}

.ordering-ticket-preview { display: grid; gap: 7px; align-content: start; }
.ordering-ticket-preview span { color: var(--muted); font-size: 13px; font-weight: 800; }
.ordering-ticket-preview b { min-height: 54px; display: flex; align-items: center; padding: 0 14px; border: 1px solid #d9c4ca; border-radius: 17px; background: var(--sales-bg); color: var(--sales); font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-kcode-combo { display: grid; grid-template-columns: minmax(44px, auto) minmax(0, 1fr); min-height: 48px; border: 1px solid #d9c4ca; border-radius: 15px; background: #fff; overflow: hidden; }
.item-kcode-combo:has(.ordering-store-item-create),
.item-kcode-combo.has-store-item-create { grid-template-columns: minmax(44px, auto) minmax(0, 1fr) 38px; }
.item-kcode-combo span { display: grid; place-items: center; padding: 0 12px; background: var(--soft-accent-bg); color: var(--brand); font-weight: 950; border-right: 1px solid #eadbdd; white-space: nowrap; }
.item-kcode-combo input { border: 0; border-radius: 0; min-height: 48px; font-weight: 850; }
.ordering-store-item-create { width: 38px; min-width: 38px; border: 0; border-left: 1px solid var(--line); background: var(--soft-accent-bg); color: var(--brand); font-size: 20px; font-weight: 950; cursor: pointer; }
.ordering-add-item { width: min(220px, 100%); margin: 4px 0 10px; }
.ordering-add-item-card, .ordering-action-card { width: min(160px, 100%); min-height: 122px; border: 1px dashed var(--brand-2); border-radius: 18px; background: rgba(255,255,255,.86); color: var(--ink); display: grid; justify-items: center; align-content: center; gap: 6px; padding: 12px; text-align: center; box-shadow: 0 8px 22px rgba(42,31,34,.06); }
.ordering-add-item-card span { width: 42px; height: 42px; border-radius: 16px; display: grid; place-items: center; background: var(--soft-accent-bg); color: var(--brand); font-size: 26px; font-weight: 950; }
.ordering-add-item-card b { font-size: 17px; line-height: 1.05; }
.ordering-add-item-card small { color: var(--muted); font-size: 12px; font-weight: 850; line-height: 1.15; max-width: 130px; }
.ordering-items-list { display: grid; gap: 8px; }
.ordering-item-editor-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.ordering-profile-suggestion { display: grid; gap: 8px; margin: 10px 0; padding: 10px; border: 1px solid #eadbdd; border-radius: 16px; background: #fff8ef; }
.ordering-profile-suggestion > b { color: var(--brand); font-size: 13px; }
.ordering-profile-suggestion > p { margin: 0; font-size: 12px; line-height: 1.35; }
.ordering-store-item-guard { min-width: 0; display: grid; gap: 8px; margin: 10px 0; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-size: 12px; line-height: 1.35; }
.ordering-store-item-guard.is-found { border-color: #d8ead6; background: #f7fff7; color: #315c34; }
.ordering-store-item-guard.is-missing { border-color: #f0d5a8; background: #fff8e8; color: #744b00; }
.ordering-store-item-guard b { font-weight: 950; }
.ordering-store-item-guard span,
.ordering-store-item-guard small { min-width: 0; overflow-wrap: anywhere; }
.ordering-store-item-suggestions { min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; }
.ordering-store-item-suggestions .btn { min-width: 0; justify-content: start; text-align: left; }
.ordering-store-item-suggestions .btn b,
.ordering-store-item-suggestions .btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ordering-store-item-actions { display: flex; justify-content: flex-end; }
.ordering-profile-option { border: 1px solid #eadbdd; border-radius: 14px; background: #fff; overflow: hidden; }
.ordering-profile-option summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 9px; cursor: pointer; }
.ordering-profile-option summary span { min-width: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 950; color: var(--ink); }
.ordering-profile-option .task-summary-list { padding: 0 10px 10px; }
.ordering-item-editor-actions .btn { min-width: 140px; }
.ordering-custom-hint { display: inline-flex; margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: #fff8ef; color: var(--brand); font-weight: 850; }
.ordering-task-items { display: grid; gap: 8px; margin: 10px 0; }
.ordering-task-item-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.ordering-item-compact-card { display: grid; gap: 6px; min-width: 0; padding: 10px; border: 1px solid #eadbdd; border-radius: 14px; background: #fff; }
.ordering-item-compact-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--brand); font-size: 12px; font-weight: 950; }
.ordering-item-compact-card strong { overflow-wrap: anywhere; font-size: 15px; }
.ordering-item-compact-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
.ordering-item-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.ordering-item-meta span, .ordering-item-photo-pill { border-radius: 999px; padding: 3px 7px; background: var(--soft-accent-bg); color: var(--brand); font-size: 11px; font-weight: 900; }
.ordering-pdf-btn { margin: 6px 0 10px; width: max-content; }
.ordering-bulk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff8fb; }
.ordering-bulk-actions span { color: var(--brand); font-size: 12px; font-weight: 950; }
.ordering-item-check { width: 28px; height: 28px; display: grid; place-items: center; margin: 0; }
.ordering-item-check input { inline-size: 18px; block-size: 18px; padding: 0; }
.ordering-photo-field { width: min(360px, 100%); margin: 8px 0 0; }
.ordering-photo-field .photo-card-grid { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); }
.ordering-photo-field .photo-add-card, .ordering-photo-field .photo-preview-card { width: min(160px, 100%); min-height: 122px; }
.ordering-photo-field .photo-list { display: none; }

.store-db-shell { display: grid; gap: 12px; }
.store-db-head { align-items: end; }
.store-db-manual-entry,
.store-db-import-entry,
.store-db-batch-photo-panel { min-width: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.store-db-manual-entry { border-color: #cfe5e1; background: linear-gradient(145deg, rgba(233, 248, 246, .94), rgba(238, 245, 255, .9)); }
.store-db-import-entry,
.store-db-batch-photo-panel { background: linear-gradient(145deg, #fff, #fff8fb); }
.store-db-manual-entry > summary,
.store-db-import-entry > summary,
.store-db-batch-photo-panel > summary { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 11px 12px; cursor: pointer; color: var(--ink); }
.store-db-manual-entry > summary::marker,
.store-db-import-entry > summary::marker,
.store-db-batch-photo-panel > summary::marker { content: ''; }
.store-db-manual-entry > summary::-webkit-details-marker,
.store-db-import-entry > summary::-webkit-details-marker,
.store-db-batch-photo-panel > summary::-webkit-details-marker { display: none; }
.store-db-manual-entry > summary span,
.store-db-import-entry > summary span,
.store-db-batch-photo-panel > summary span { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--store-bg); color: var(--store); font-size: 24px; font-weight: 950; }
.store-db-manual-entry > summary b,
.store-db-manual-entry > summary small,
.store-db-import-entry > summary b,
.store-db-import-entry > summary small,
.store-db-batch-photo-panel > summary b,
.store-db-batch-photo-panel > summary small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-db-manual-entry > summary b,
.store-db-import-entry > summary b,
.store-db-batch-photo-panel > summary b { font-size: 15px; font-weight: 950; }
.store-db-manual-entry > summary small,
.store-db-import-entry > summary small,
.store-db-batch-photo-panel > summary small { justify-self: end; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: none; }
.store-db-manual-form { display: grid; gap: 10px; padding: 0 12px 12px; }
.store-db-manual-entry .store-db-manual-form,
.store-db-edit-form,
.shared-store-item-form { border-radius: 0 0 16px 16px; background: rgba(247, 252, 255, .58); }
.store-db-manual-grid { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.store-db-manual-grid .field,
.store-db-manual-photo-field { margin: 0; min-width: 0; }
.store-db-manual-grid input,
.store-db-manual-grid textarea,
.store-db-manual-grid select { min-width: 0; min-height: 46px; }
.store-db-manual-grid textarea { resize: vertical; }
.store-db-kcode-field,
.store-db-content-field,
.store-db-remark-field,
.store-db-branch-allocation-field { grid-column: span 2; }
.store-db-left-field,
.store-db-right-field { grid-column: auto; }
.store-db-manual-photo-field .photo-card-grid { grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 8px; }
.store-db-manual-photo-field .photo-add-card,
.store-db-manual-photo-field .photo-preview-card { width: min(150px, 100%); min-height: 112px; }
.store-db-manual-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.store-db-edit-modal,
.shared-store-item-modal { width: min(980px, calc(100vw - 24px)); background: linear-gradient(145deg, rgba(244, 251, 250, .98), rgba(246, 249, 255, .97)); }
.shared-store-item-modal .modal-head { margin-bottom: 10px; }
.shared-store-item-modal .modal-head p { min-width: 0; overflow-wrap: anywhere; font-weight: 850; }
.store-db-edit-modal .modal-head { margin-bottom: 10px; }
.store-db-edit-modal .modal-head p { min-width: 0; overflow-wrap: anywhere; font-weight: 850; }
.store-db-edit-grid input[readonly] { background: #eef7f5; color: #496b64; cursor: default; }
.store-db-stock-locked,
.store-db-stock-locked[readonly],
.store-db-stock-locked[aria-readonly="true"] {
  border-color: #b9d8d2 !important;
  background: rgba(229, 242, 239, .9) !important;
  color: #42675f !important;
  cursor: not-allowed;
}
.store-db-edit-photo-policy { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid #eadbdd; border-radius: 14px; background: #fffaf7; }
.store-db-edit-photo-policy > div { min-width: 0; display: grid; gap: 5px; }
.store-db-edit-photo-policy b { color: var(--brand); font-size: 11px; font-weight: 950; text-transform: none; }
.store-db-edit-existing-photos { min-width: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.store-db-edit-existing-photos span { min-width: 0; max-width: 180px; padding: 3px 7px; border-radius: 999px; background: var(--soft-accent-bg); color: var(--brand); font-size: 10px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-db-edit-replace-toggle { min-width: 180px; margin: 0; justify-content: center; }
.store-db-edit-replace-toggle span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-db-import-controls { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 10px; align-items: end; padding: 0 12px 10px; }
.store-db-import-controls .field { margin: 0; min-width: 0; }
.store-db-import-preview { display: grid; gap: 10px; padding: 0 12px 12px; }
.store-db-import-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; }
.store-db-import-summary > div { min-width: 0; display: grid; gap: 2px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fffaf7; }
.store-db-import-summary span { min-width: 0; color: var(--muted); font-size: 10px; font-weight: 950; text-transform: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-db-import-summary b { color: var(--brand); font-size: 16px; line-height: 1.05; }
.store-db-import-policy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid #ead6d3; border-radius: 14px; background: rgba(255,255,255,.82); }
.store-db-import-policy div { min-width: 0; display: grid; gap: 3px; }
.store-db-import-policy b { color: var(--brand); font-size: 12px; font-weight: 950; }
.store-db-import-policy span { min-width: 0; color: var(--ink); font-size: 12px; line-height: 1.35; overflow-wrap: break-word; }
.store-db-batch-photo-controls {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) repeat(3, auto);
  gap: 8px;
  align-items: center;
  padding: 0 12px 10px;
}
.store-db-file-button { position: relative; overflow: hidden; justify-content: center; }
.store-db-file-button input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.store-db-batch-photo-status {
  margin: 0 12px 10px;
  padding: 8px 10px;
  border: 1px solid #eadbdd;
  border-radius: 12px;
  background: rgba(255,255,255,.82);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}
.store-db-batch-photo-list {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 0 12px 12px;
}
.store-db-batch-photo-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(120px, 1.2fr) minmax(110px, .75fr) minmax(150px, 1fr) auto minmax(160px, 1.05fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.9);
}
.store-db-batch-photo-row.is-matched { border-color: #cfe5e1; background: rgba(245,252,250,.94); }
.store-db-batch-photo-row.is-done { border-color: #bde3d1; background: rgba(239,250,243,.95); }
.store-db-batch-photo-row.is-unmatched,
.store-db-batch-photo-row.is-missing,
.store-db-batch-photo-row.is-blocked { border-color: #f2c8c1; background: rgba(255,246,244,.95); }
.store-db-batch-photo-row input { inline-size: 18px; block-size: 18px; }
.store-db-product-asset-row {
  grid-template-columns: 28px minmax(120px, 1.2fr) minmax(100px, .7fr) minmax(140px, 1fr) auto minmax(74px, auto) minmax(88px, auto) minmax(90px, .7fr);
}
.store-db-product-order,
.store-db-product-primary {
  min-width: 0;
  display: inline-grid;
  grid-auto-flow: column;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.store-db-product-order input[type="number"] {
  inline-size: 52px;
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.9);
  font: inherit;
  font-size: 12px;
}
.store-db-product-primary input[type="checkbox"] {
  inline-size: 16px;
  block-size: 16px;
}
.store-db-batch-file,
.store-db-batch-item,
.store-db-batch-target,
.store-db-batch-photo-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store-db-batch-file,
.store-db-batch-item {
  color: var(--ink);
  font-weight: 950;
}
.store-db-batch-target {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.store-db-batch-photo-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.store-db-deleted-section,
.calendar-deleted-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
}
.store-db-deleted-section > summary,
.calendar-deleted-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 248, 244, .9);
  cursor: pointer;
  list-style: none;
}
.store-db-deleted-section > summary::-webkit-details-marker,
.calendar-deleted-section > summary::-webkit-details-marker {
  display: none;
}
.store-db-deleted-section > summary span,
.calendar-deleted-section > summary span {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.store-db-deleted-section > summary small,
.calendar-deleted-section > summary small {
  color: var(--brand);
  font-size: 10px;
  font-weight: 950;
}
.store-db-deleted-section > summary b,
.calendar-deleted-section > summary b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store-db-deleted-section > summary em,
.calendar-deleted-section > summary em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.store-db-deleted-list {
  display: grid;
  gap: 8px;
  max-height: min(520px, 58vh);
  overflow: auto;
  padding-right: 2px;
}
.store-db-deleted-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(170px, .9fr) minmax(0, 1.8fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.9);
}
.store-db-deleted-row > div:first-child,
.store-db-deleted-row dl {
  min-width: 0;
}
.store-db-deleted-row > div:first-child {
  display: grid;
  gap: 2px;
}
.store-db-deleted-row > div:first-child b,
.store-db-deleted-row > div:first-child span,
.store-db-deleted-row > div:first-child small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store-db-deleted-row > div:first-child b {
  color: var(--brand);
  font-weight: 950;
}
.store-db-deleted-row > div:first-child small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.store-db-deleted-row dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}
.store-db-deleted-row dl > div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(143,79,95,.16);
  border-radius: 10px;
  background: rgba(255,250,248,.78);
}
.store-db-deleted-row dt,
.store-db-deleted-row dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store-db-deleted-row dt {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 950;
}
.store-db-deleted-row dd {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}
.calendar-deleted-item {
  background: rgba(255,255,255,.9);
}
.calendar-deleted-item .calendar-day-copy small {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .store-db-deleted-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .store-db-deleted-row dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .store-db-deleted-row .store-db-actions {
    justify-content: flex-end;
  }
}
body.mobile-preview-mode .store-db-deleted-row {
  grid-template-columns: 1fr;
  align-items: stretch;
}
body.mobile-preview-mode .store-db-deleted-row dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.store-db-import-policy .btn[disabled] { opacity: .72; cursor: not-allowed; }
.store-db-import-applied,
.store-db-result-limit { min-width: 0; padding: 9px 10px; border: 1px solid #d8ead6; border-radius: 12px; background: #f7fff7; color: #315c34; font-size: 12px; font-weight: 850; line-height: 1.35; overflow-wrap: break-word; }
.store-db-import-warning { min-width: 0; padding: 9px 10px; border: 1px solid #f0d5a8; border-radius: 12px; background: #fff8e8; color: #744b00; font-size: 12px; font-weight: 850; line-height: 1.35; overflow-wrap: break-word; }
.store-db-import-applied { display: grid; gap: 3px; }
.store-db-import-applied b { color: #315c34; font-size: 11px; font-weight: 950; text-transform: none; }
.store-db-import-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.store-db-import-groups section { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: rgba(255,255,255,.8); }
.store-db-import-groups .store-db-import-wide { grid-column: 1 / -1; }
.store-db-import-groups h4 { margin: 0 0 8px; color: var(--brand); font-size: 13px; line-height: 1.15; }
.store-db-import-rows { min-width: 0; display: grid; gap: 6px; }
.store-db-import-row { min-width: 0; display: grid; grid-template-columns: 104px 68px minmax(0, 1fr); gap: 8px; align-items: center; padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.store-db-import-row b,
.store-db-import-row span,
.store-db-import-row em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-db-import-row b { color: var(--brand); font-size: 12px; }
.store-db-import-row span { color: var(--muted); font-size: 11px; font-weight: 950; text-transform: none; }
.store-db-import-row em { color: var(--ink); font-style: normal; font-size: 12px; font-weight: 850; }
.store-db-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.store-db-stat-grid > button { min-width: 0; display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fffaf7; text-align: left; cursor: pointer; }
.store-db-stat-grid > button:hover { border-color: rgba(157,74,96,.45); box-shadow: 0 8px 18px rgba(157,74,96,.09); }
.store-db-stat-grid span { min-width: 0; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-db-stat-grid b { color: var(--brand); font-size: 20px; line-height: 1.05; }
.store-db-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.store-db-toolbar > input { flex: 1 1 260px; }
.store-db-toolbar :is(select, .store-db-multi-filter) { flex: 1 1 132px; min-width: 112px; }
.store-db-toolbar :is(input, select, button, .store-db-multi-filter) { min-width: 0; }
.store-db-toolbar .icon-btn { flex: 0 0 44px; }
.store-db-empty-state {
  gap: 5px;
  min-height: 116px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fffaf7;
}
.store-db-empty-state b {
  color: var(--brand);
  font-size: 15px;
  line-height: 1.15;
}
.store-db-empty-state span {
  max-width: 720px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}
.store-db-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(282px, 1fr)); gap: 10px; align-items: stretch; }
.store-db-item-card { min-width: 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.92); box-shadow: 0 10px 28px rgba(42,31,34,.06); }
.store-db-photo { width: 112px; min-height: 126px; max-height: 152px; border: 1px solid var(--line); border-radius: 14px; background: #fff7fa; overflow: hidden; display: grid; place-items: center; color: var(--muted); font-size: 11px; font-weight: 900; text-align: center; }
button.store-db-photo { padding: 0; cursor: zoom-in; }
.store-db-photo:hover { border-color: var(--brand); box-shadow: 0 10px 22px rgba(157,79,104,.14); }
.store-db-photo img { width: 100%; height: 112px; object-fit: cover; display: block; background: #f3f0f1; }
.store-db-photo small { width: 100%; padding: 5px 6px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-db-photo.is-empty { padding: 10px; border-style: dashed; }
.store-db-item-body { min-width: 0; display: grid; align-content: start; gap: 8px; }
.store-db-item-head { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.store-db-item-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.store-db-item-head .status-badge { min-width: 0; max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; justify-self: end; }
.store-db-card-qty { justify-self: end; display: grid; gap: 1px; min-width: 60px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 10px; background: #fffaf7; text-align: right; }
.store-db-card-qty em { color: var(--muted); font-style: normal; font-size: 9px; font-weight: 950; }
.store-db-card-qty b { font-size: 12px; }
.store-db-card-details { min-width: 0; display: grid; gap: 7px; }
.store-db-card-details > summary { justify-self: end; display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 10px; background: #fffaf7; color: var(--ink); font-weight: 950; cursor: pointer; list-style: none; }
.store-db-card-details > summary::-webkit-details-marker { display: none; }
.store-db-card-details[open] > summary { transform: rotate(180deg); }
.store-db-card-details-body { min-width: 0; display: grid; gap: 7px; }
.store-db-item-body p { margin: 0; min-width: 0; color: var(--ink); font-size: 13px; font-weight: 750; line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.store-db-card-meta { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.store-db-card-meta span { min-width: 0; padding: 4px 6px; border: 1px solid #eadbdd; border-radius: 9px; background: #fffaf7; color: var(--muted); font-size: 10px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-db-card-meta b { color: var(--ink); font-weight: 950; }
.store-db-item-flags { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.store-db-item-flags span { min-width: 0; max-width: 100%; padding: 3px 7px; border-radius: 999px; background: #fff1bf; color: #805300; font-size: 10px; font-weight: 950; text-transform: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-db-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; }
.store-db-facts > div { min-width: 0; padding: 6px 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.store-db-facts dt { margin: 0 0 2px; color: var(--muted); font-size: 10px; font-weight: 950; text-transform: none; }
.store-db-facts dd { margin: 0; min-width: 0; color: var(--ink); font-size: 12px; font-weight: 850; line-height: 1.2; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.store-db-actions { display: flex; justify-content: flex-end; gap: 6px; min-width: 0; }
.store-db-actions .store-db-icon-action,
.store-db-profile-actions .store-db-icon-action { width: 30px; min-width: 30px; height: 30px; padding: 0; display: inline-grid; place-items: center; font-weight: 950; }
.store-db-profile { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #fffaf7; overflow: hidden; }
.store-db-profile > summary { min-width: 0; display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 7px; align-items: center; padding: 7px 8px; list-style: none; cursor: pointer; }
.store-db-profile > summary::-webkit-details-marker { display: none; }
.store-db-profile > summary span,
.store-db-profile > summary b,
.store-db-profile > summary em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-db-profile > summary span { color: var(--brand); font-size: 11px; font-weight: 950; text-transform: none; }
.store-db-profile > summary b { padding: 2px 7px; border-radius: 999px; background: var(--soft-accent-bg); color: var(--brand); font-size: 11px; font-weight: 950; }
.store-db-profile > summary em { color: var(--muted); font-style: normal; font-size: 11px; font-weight: 850; }
.store-db-profile-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 8px; border-top: 1px solid var(--line); }
.store-db-profile-facts > div { min-width: 0; padding: 6px 7px; border: 1px solid #eadbdd; border-radius: 10px; background: #fff; }
.store-db-profile-facts dt { margin: 0 0 2px; color: var(--muted); font-size: 9.5px; font-weight: 950; text-transform: none; }
.store-db-profile-facts dd { margin: 0; min-width: 0; color: var(--ink); font-size: 11.5px; font-weight: 850; line-height: 1.25; overflow-wrap: anywhere; }
.store-db-profile-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding: 0 8px 8px; }
.store-db-section-title { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 8px; color: var(--brand); }
.store-db-section-title span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 950; text-transform: none; }
.store-db-section-title b { flex: 0 0 auto; min-width: 28px; border-radius: 999px; padding: 3px 8px; background: var(--soft-accent-bg); text-align: center; font-size: 12px; }
.store-db-set-section,
.store-db-item-section { min-width: 0; display: grid; gap: 8px; }
.store-db-set-grid { min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 10px; }
.store-db-set-card { min-width: 0; display: grid; gap: 9px; padding: 11px; border: 1px solid rgba(143,79,95,.18); border-radius: 16px; background: linear-gradient(145deg, #fffaf7, #fff); box-shadow: 0 10px 26px rgba(42,31,34,.06); }
.store-db-set-head { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.store-db-set-head h3 { margin: 1px 0 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; line-height: 1.15; }
.store-db-set-head .status-badge { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; justify-self: end; }
.store-db-set-summary { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.store-db-set-summary > div { min-width: 0; display: grid; gap: 2px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.store-db-set-summary span { color: var(--muted); font-size: 9.5px; font-weight: 950; text-transform: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-db-set-summary b { min-width: 0; color: var(--ink); font-size: 12px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-db-set-components { min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
.store-db-set-components li { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.88); }
.store-db-set-mini-photo { width: 42px; height: 42px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--soft-accent-bg); color: var(--brand); font-size: 12px; font-weight: 950; }
.store-db-set-mini-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-db-set-component-main { min-width: 0; display: grid; gap: 2px; }
.store-db-set-component-main b,
.store-db-set-component-main span,
.store-db-set-component-main small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-db-set-component-main b { color: var(--ink); font-size: 12px; font-weight: 950; }
.store-db-set-component-main span { color: var(--ink); font-size: 11px; font-weight: 850; }
.store-db-set-component-main small { color: var(--muted); font-size: 10px; font-weight: 850; }
.store-db-set-components .status-badge { max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; justify-self: end; }
.store-db-set-foot { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.store-db-set-foot span { min-width: 0; color: var(--muted); font-size: 11px; font-weight: 850; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ordering-item-summary summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; }
.ordering-item-summary summary span { color: var(--muted); font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ordering-item-summary .task-summary-list { padding: 0 12px 12px; }
.ordering-items-empty { padding: 14px; border: 1px dashed var(--line); border-radius: 16px; background: #fff8ef; }
.ordering-note { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.ordering-note b { white-space: nowrap; }
.ordering-submit { width: min(520px, 100%); justify-self: center; }
@media (max-width: 760px) {
  .task-summary-list div { grid-template-columns: 1fr; gap: 3px; }
  .task-card .tabs.task-action-panel, .task-danger-zone { grid-template-columns: 1fr; }
  .task-danger-zone .btn.danger { width: 100%; }
  .ordering-hero { display: grid; }
  .ordering-kcode-row, .ordering-detail-ticket, .ordering-item-summary summary { grid-template-columns: 1fr; }
  .ordering-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "kcode kcode" "desc desc" "type size" "quantity doc"; }
  .ordering-add-item-card { width: 100%; min-height: 122px; }
  .ordering-photo-field, .ordering-photo-field .photo-add-card { width: 100%; min-height: 122px; }
  .kcode-combo { grid-template-columns: 42px minmax(80px, .35fr) minmax(0, 1fr); }
  .ordering-profile-option summary { grid-template-columns: 1fr; }
  .ordering-profile-option summary .btn { width: 100%; }
  .ordering-submit { position: sticky; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 20; width: 100%; min-height: 54px; box-shadow: 0 14px 28px rgba(143,72,80,.22); }
  .qr-scan-form { grid-template-columns: 1fr; }
  .qr-scan-form .btn { width: 100%; }
  .qr-image-tools { grid-template-columns: 1fr; }
  .qr-image-tools .btn { width: 100%; }
  .store-db-import-controls,
  .store-db-import-groups,
  .store-db-import-policy { grid-template-columns: 1fr; }
  .store-db-import-row { grid-template-columns: 90px 54px minmax(0, 1fr); gap: 6px; }
  .store-db-import-row b,
  .store-db-import-row span,
  .store-db-import-row em { font-size: 11px; }
}


/* Detail rows: scroll inside details on phone */
.details-row td { padding: 10px; }
@media (max-width: 760px) {
  .details-row .detail-panel { max-height: 68vh; overflow: auto; }
  .compact-table table { min-width: 720px; }
}
/* Audit log balanced card layout */
.audit-log-list { display: grid; gap: 10px; }
.audit-log-item { display: grid; grid-template-columns: minmax(220px, .32fr) minmax(0, 1fr); gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.82); }
.audit-log-meta { display: grid; grid-template-columns: 1fr; gap: 6px; align-content: start; min-width: 0; }
.audit-log-meta time { color: var(--brand); font-weight: 950; }
.audit-log-meta span, .audit-log-meta em, .audit-log-meta small { min-width: 0; overflow-wrap: anywhere; font-style: normal; font-weight: 850; }
.audit-log-meta b { display: inline-flex; margin-left: 4px; border-radius: 999px; padding: 3px 7px; background: var(--soft-accent-bg); color: var(--brand); font-size: 11px; }
.audit-log-main { display: grid; gap: 8px; min-width: 0; }
.audit-log-main strong { overflow-wrap: anywhere; line-height: 1.35; }
.audit-inline-details { min-width: 0; max-width: 100%; }
.audit-inline-details pre { margin: 0; max-height: 280px; overflow: auto; white-space: pre-wrap; word-break: break-word; background: #fff; border: 1px solid #f1e7ea; border-radius: 14px; padding: 10px; font-size: 12px; }
@media (max-width: 760px) {
  .audit-log-item { grid-template-columns: 1fr; }
  .audit-inline-details pre { max-height: 220px; }
}

/* Basic entry: keep Prefix / Invoice No. / Scheduled Time on one row when space allows */
.basic-entry-grid { display: grid; grid-template-columns: minmax(120px, .42fr) minmax(210px, .72fr) minmax(280px, 1fr); gap: 12px; align-items: start; padding: 14px; border: 1px solid #eadbdd; border-radius: 18px; background: linear-gradient(145deg, #fff, #fff8fb); }
.basic-entry-grid .field { margin: 0; align-content: start; }
.basic-entry-grid input, .basic-entry-grid select { min-height: 56px; }
.basic-entry-grid > .field > select,
.basic-entry-grid > .field > input,
.basic-entry-grid .invoice-digit-row { margin-top: 0; }
.basic-entry-grid .invoice-digit-row { min-height: 56px; padding: 4px; align-content: center; }
.basic-entry-grid .invoice-lock-window, .basic-entry-grid .invoice-lock-window .invoice-digit { min-height: 46px !important; }
.basic-entry-grid .invoice-lock-window .invoice-digit { font-size: 25px; }
.mobile-bottom-nav { display: none; }
.mobile-hub-shell, .mobile-more-sheet { display: grid; gap: 14px; }
.mobile-hub-hero, .mobile-more-head { padding: 18px; border: 1px solid #ead8d2; border-radius: 24px; background: linear-gradient(145deg,#fff,#fff7f4); box-shadow: 0 12px 30px rgba(87,50,40,.08); }
.mobile-hub-hero h2, .mobile-more-head h2 { margin: 8px 0 6px; font-size: clamp(24px, 5vw, 34px); letter-spacing: 0; }
.mobile-hub-hero p, .mobile-more-head p { margin: 0; color: var(--muted); font-weight: 750; line-height: 1.45; }
.mobile-hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.mobile-hub-card { width: 100%; border: 1px solid #ead8d0; border-radius: 20px; background: #fff; padding: 14px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left; color: var(--ink); box-shadow: 0 10px 24px rgba(87,50,40,.07); cursor: pointer; }
.mobile-hub-card .mobile-hub-icon { width: 42px; height: 42px; border-radius: 16px; display: grid; place-items: center; background: var(--soft-accent-bg); font-size: 20px; }
.mobile-hub-copy { min-width: 0; }
.mobile-hub-card b { display: block; font-size: 15px; font-weight: 950; margin-bottom: 3px; }
.mobile-hub-card small { display: block; color: var(--muted); font-size: 12px; font-weight: 750; line-height: 1.35; }
.mobile-hub-count { justify-self: end; min-width: 58px; max-width: 82px; display: grid; justify-items: center; gap: 1px; border-radius: 14px; background: #f1e4e0; color: #7c514e; padding: 6px 8px; }
.mobile-hub-count b { margin: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 1; }
.mobile-hub-count small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #7c514e; font-size: 9.5px; font-weight: 950; line-height: 1.1; text-transform: none; letter-spacing: 0; }
.mobile-hub-card.module-sales { border-left: 5px solid var(--sales); }
.mobile-hub-card.module-store { border-left: 5px solid var(--store); }
.mobile-hub-card.module-system { border-left: 5px solid var(--system); }
.mobile-hub-card.module-payment { border-left: 5px solid var(--payment); }
.mobile-hub-card.module-qr { border-left: 5px solid var(--qr); }
.mobile-hub-card.module-audit { border-left: 5px solid var(--brand); }
.mobile-hub-card.module-sales .mobile-hub-icon, .mobile-hub-card.module-sales .mobile-hub-count { background: var(--sales-bg); color: var(--sales); }
.mobile-hub-card.module-store .mobile-hub-icon, .mobile-hub-card.module-store .mobile-hub-count { background: var(--store-bg); color: var(--store); }
.mobile-hub-card.module-system .mobile-hub-icon, .mobile-hub-card.module-system .mobile-hub-count { background: var(--system-bg); color: var(--system); }
.mobile-hub-card.module-payment .mobile-hub-icon, .mobile-hub-card.module-payment .mobile-hub-count { background: var(--payment-bg); color: var(--payment); }
.mobile-hub-card.module-qr .mobile-hub-icon, .mobile-hub-card.module-qr .mobile-hub-count { background: var(--qr-bg); color: var(--qr); }
.mobile-hub-card.module-audit .mobile-hub-icon, .mobile-hub-card.module-audit .mobile-hub-count { background: var(--soft-accent-bg); color: var(--brand); }
.mobile-hub-card.module-sales .mobile-hub-count small,
.mobile-hub-card.module-store .mobile-hub-count small,
.mobile-hub-card.module-system .mobile-hub-count small,
.mobile-hub-card.module-payment .mobile-hub-count small,
.mobile-hub-card.module-qr .mobile-hub-count small,
.mobile-hub-card.module-audit .mobile-hub-count small { color: currentColor; opacity: .72; }
.mobile-more-sheet { border: 1px solid #ead8d2; border-radius: 28px; padding: 14px; background: linear-gradient(180deg,#fffaf7,#fff); box-shadow: 0 18px 42px rgba(57,34,25,.12); }
.mobile-more-handle { width: 50px; height: 5px; border-radius: 999px; background: #d8c4bc; justify-self: center; }
.mobile-more-group { display: grid; gap: 9px; }
.mobile-more-group h3 { margin: 4px 0 0; font-size: 15px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.mobile-more-module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.invoice-number-control { display: grid; gap: 4px; min-width: 0; }
.invoice-number-hidden,
.amount-number-hidden {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  width: 1px !important;
  min-width: 0 !important;
  max-width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  max-height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
}
.invoice-lock-control { max-width: 100%; }
.invoice-digit-row { display: grid; grid-template-columns: repeat(5, minmax(34px, 1fr)); gap: 7px; min-height: 76px; padding: 7px; border: 1px solid #d9c4ca; border-radius: 19px; background: linear-gradient(180deg, #fff, #f7efee); }
.invoice-lock-window { position: relative; min-width: 0; min-height: 62px; border-radius: 16px; overflow: hidden; background: linear-gradient(180deg, #efe3e0 0%, #fff 48%, #efe3e0 100%); border: 1px solid #dec9c7; box-shadow: inset 0 8px 12px rgba(89,54,49,.06); }
.invoice-lock-window::before,
.invoice-lock-window::after { content: ''; position: absolute; left: 0; right: 0; height: 20px; pointer-events: none; background: linear-gradient(180deg, rgba(247,238,236,.95), rgba(247,238,236,0)); z-index: 1; }
.invoice-lock-window::before { top: 0; }
.invoice-lock-window::after { bottom: 0; transform: rotate(180deg); }
.invoice-lock-window .invoice-digit { position: relative; z-index: 2; width: 100%; height: 100%; min-height: 62px !important; padding: 0; border: 0; border-radius: 16px; background: transparent; color: var(--ink); text-align: center; font-size: 28px; font-weight: 950; letter-spacing: 0; caret-color: var(--brand); }
.invoice-lock-window .invoice-digit:focus { outline: 2px solid rgba(155,100,112,.36); outline-offset: -2px; background: rgba(255,248,251,.52); }
.invoice-number-control.is-soft-locked .invoice-digit-row { border-color: #c9968f; background: #fff4f0; box-shadow: inset 0 0 0 1px rgba(143,72,80,.12); }
.invoice-number-control.is-soft-locked .invoice-lock-window { border-color: #c9968f; background: linear-gradient(180deg, #ead6d0 0%, #fff7f3 48%, #ead6d0 100%); }
.invoice-number-control.is-soft-locked .invoice-digit { color: #8f4850; }
.invoice-digit::-webkit-inner-spin-button,
.invoice-digit::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.amount-number-control { display: grid; gap: 4px; min-width: 0; }
.amount-quick-fill { min-height: 34px; padding: 6px 10px; border: 1px solid #ead2cf; border-radius: 12px; background: #fffdfb; font-size: 13px; font-weight: 850; }
.amount-digit-wrap { display: block; min-width: 0; }
.amount-digit-row { grid-template-columns: repeat(5, minmax(30px, 1fr)) 6px repeat(2, minmax(22px, .7fr)); align-items: stretch; min-height: 46px; padding: 4px; }
.amount-lock-window, .amount-lock-window .amount-digit, .amount-lock-window .amount-cent-digit { min-height: 38px !important; }
.amount-lock-window .amount-digit, .amount-lock-window .amount-cent-digit { font-size: 24px; }
.amount-decimal-dot { display: grid; place-items: center; min-width: 6px; color: var(--ink); font-size: 22px; font-weight: 950; line-height: 1; }
.amount-cent-window { min-width: 22px; }
.amount-number-control.is-locked .amount-digit-row { border-color: #d2aaa4; background: #fff8f5; }
.amount-number-control.is-locked .amount-lock-window { border-color: #cfaaa5; background: linear-gradient(180deg, #ead9d4 0%, #fff8f5 48%, #ead9d4 100%); }
.customer-payment-details-panel { display: grid; gap: 14px; }
.customer-payment-details-head { display: grid; grid-template-columns: minmax(160px, 220px) minmax(150px, 180px) 1fr auto; align-items: end; gap: 12px; }
.customer-payment-quantity,
.customer-payment-date { margin: 0; }
.customer-payment-reset { justify-self: end; align-self: end; min-height: 34px; width: auto; padding: 6px 9px; border-radius: 999px; font-size: 12px; }
.customer-payment-rows { display: grid; gap: 12px; }
.customer-payment-row-card,
.customer-payment-extra-row,
.customer-payment-primary-grid { display: grid; grid-template-columns: 92px minmax(220px, .85fr) minmax(220px, .85fr) minmax(280px, 1fr) minmax(280px, 1fr); gap: 10px; align-items: start; padding: 12px; border: 1px dashed var(--line); border-radius: 18px; background: rgba(255,255,255,.72); }
.customer-payment-primary-grid { border-color: transparent; padding: 0; background: transparent; }
.customer-payment-row-title { grid-column: 1; grid-row: 1; align-self: start; padding-top: 31px; color: var(--brand); font-size: 10.5px; line-height: 1.15; white-space: normal; }
.customer-payment-row-card .field { margin: 0; min-width: 0; }
.customer-payment-primary-grid > .field,
.customer-payment-row-card > .field,
.customer-payment-style-stack .field { display: grid; grid-template-rows: 18px 52px; gap: 6px; align-content: start; }
.customer-payment-primary-grid > .field > span,
.customer-payment-row-card > .field > span,
.customer-payment-style-stack .field > span { min-height: 18px; line-height: 18px; display: flex; align-items: center; }
.customer-payment-primary-grid select,
.customer-payment-row-card select,
.customer-payment-style-stack select,
.customer-payment-style-stack input,
.customer-payment-other-style-field input { height: 52px; min-height: 52px; padding-top: 0; padding-bottom: 0; }
.customer-payment-style-stack { grid-column: 3; display: grid; gap: 8px; align-self: start; }
.customer-payment-type-field { grid-column: 2; }
.customer-payment-deposit-field { grid-column: 4; }
.customer-payment-full-field { grid-column: 4 / -1; }
.customer-payment-other-style-field { grid-column: 3; grid-row: 2; align-self: start; }
.customer-payment-row-card-fields { grid-column: 2 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; padding: 10px; border: 1px solid #f0dedb; border-radius: 14px; background: #fff9f6; }
.customer-payment-row-card-fields .field { display: grid; grid-template-rows: 18px 48px; gap: 5px; }
.customer-payment-row-card-fields .field:first-child { grid-column: 1; }
.customer-payment-row-card-fields #otherBankField,
.customer-payment-row-card-fields [data-row-other-bank-field],
.customer-payment-row-card-fields [data-edit-row-other-bank-field] { grid-column: auto; }
.customer-payment-row-card-fields select,
.customer-payment-row-card-fields input { min-height: 48px; height: 48px; }
.customer-payment-row-card.is-deposit .customer-payment-deposit-field,
.customer-payment-primary-grid.is-deposit #depositAmountField { grid-column: 4; grid-row: 1; }
.customer-payment-row-card.is-deposit .customer-payment-full-field,
.customer-payment-primary-grid.is-deposit #fullAmountField { grid-column: 5; grid-row: 1; }
.customer-payment-linked-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 7px 0; }
.customer-payment-linked-stats span { display: grid; gap: 2px; padding: 7px 8px; border: 1px solid #f0dedb; border-radius: 10px; background: #fff9f6; font-size: 11px; }
.customer-payment-linked-stats b { font-size: 12px; }
.customer-payment-linked-stats small { color: #8f4850; font-weight: 850; }
.customer-payment-linked-stats .is-negative { border-color: #f1b8b0; background: #fff1ee; color: #9b342c; }
.customer-payment-linked-warning { display: inline-block; margin-top: 4px; color: #9b342c; font-style: normal; font-weight: 900; }
.customer-payment-compact-invoice { display: grid; grid-template-columns: 140px minmax(220px, 340px); gap: 12px; align-items: end; }
.customer-payment-compact-invoice .field { margin: 0; }
.customer-payment-invoice-no,
.customer-payment-so-number { position: relative; }
.customer-payment-field-action { position: absolute; right: 8px; top: 0; min-width: 30px; min-height: 30px; padding: 0 8px; border: 1px solid #d9c4ca; border-radius: 999px; background: #fffaf8; color: var(--brand); font-size: 14px; font-weight: 950; box-shadow: 0 4px 14px rgba(64,32,35,.08); }
.customer-payment-field-action:hover { border-color: #bd8f8d; background: #fff1ef; }
.customer-payment-field-action.is-hidden { display: none; }
.step-form.is-customer-payment-review-only .customer-payment-details-panel {
  border-color: #d2aaa4;
  background: #fff8f5;
}
.step-form.is-customer-payment-review-only .customer-payment-details-panel input[readonly],
.step-form.is-customer-payment-review-only .customer-payment-details-panel select:disabled,
.step-form.is-customer-payment-review-only #recordRemark[readonly],
.step-form.is-customer-payment-review-only [data-photo-uploader] input[type="file"]:disabled {
  cursor: not-allowed;
}
.step-form.is-customer-payment-review-only .photo-add-card {
  opacity: .58;
}
.linked-photo-preview { margin-top: 10px; }
.linked-photo-preview:empty { display: none; }
.linked-photo-preview-note { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 850; }
.customer-payment-compact-invoice select { min-height: 44px; padding: 10px 12px; }
.customer-payment-compact-invoice .invoice-digit-row { min-height: 44px; padding: 4px; gap: 5px; }
.customer-payment-compact-invoice .invoice-lock-window,
.customer-payment-compact-invoice .invoice-lock-window .invoice-digit { min-height: 34px !important; }
.customer-payment-compact-invoice .invoice-lock-window .invoice-digit { font-size: 20px; }
.customer-payment-card-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; align-items: end; padding-top: 2px; }
.customer-payment-linked-so { display: grid; grid-template-columns: 120px minmax(220px, 320px) minmax(260px, 1fr); gap: 12px; align-items: stretch; padding: 10px 12px; border: 1px dashed #d8bbb8; border-radius: 16px; background: #fff9f6; }
.customer-payment-linked-so .field { margin: 0; display: grid; grid-template-rows: auto 1fr; }
.customer-payment-linked-so .readonly-field,
.customer-payment-linked-so .invoice-number-control,
.customer-payment-linked-so .invoice-digit-row { height: 52px; min-height: 52px; }
.customer-payment-linked-so .invoice-digit-row { padding: 4px; gap: 5px; }
.customer-payment-linked-so .invoice-lock-window,
.customer-payment-linked-so .invoice-lock-window .invoice-digit { min-height: 34px !important; }
.customer-payment-linked-so .invoice-lock-window .invoice-digit { font-size: 18px; }
.customer-payment-linked-summary-stack { display: grid; gap: 8px; min-width: 0; align-self: stretch; }
.customer-payment-linked-summary { align-self: stretch; min-height: 44px; padding: 9px 12px; border: 1px solid #ead2cf; border-radius: 14px; background: #fff; font-size: 12px; color: #6f5a58; }
.customer-payment-linked-summary b { color: #3a2828; }
.customer-payment-linked-summary ul { margin: 6px 0; padding-left: 16px; }
.customer-payment-linked-summary li { margin: 2px 0; }
.customer-payment-summary-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 8px; }
.customer-payment-summary-title { color: #3a2828; font-weight: 900; }
.customer-payment-summary-so-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f4e2e8;
  color: #9f5065;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.customer-payment-linked-balance { display: inline-flex; gap: 6px; align-items: center; margin-top: 3px; font-weight: 900; color: #8f4850; }
.customer-payment-amount-field { min-width: 0; }
.customer-payment-amount-field .amount-number-control { width: 100%; }
.customer-payment-amount-field .amount-digit-wrap { min-height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.customer-payment-amount-field .amount-digit-row { width: 100%; min-width: 0; grid-template-columns: repeat(5, minmax(20px, 1fr)) 5px repeat(2, minmax(20px, 1fr)); min-height: 44px; padding: 4px; gap: 3px; border: 1px solid #d9c4ca; border-radius: 19px; background: linear-gradient(180deg, #fff 0%, #fff8f6 100%); overflow: hidden; }
.customer-payment-amount-field .amount-lock-window { min-width: 0; border-color: #eadbdd; border-radius: 13px; }
.customer-payment-amount-field .amount-lock-window,
.customer-payment-amount-field .amount-lock-window .amount-digit,
.customer-payment-amount-field .amount-lock-window .amount-cent-digit { min-height: 34px !important; }
.customer-payment-amount-field .amount-lock-window .amount-digit,
.customer-payment-amount-field .amount-lock-window .amount-cent-digit { font-size: 19px; }
.customer-payment-amount-field .amount-decimal-dot { min-width: 5px; font-size: 19px; }
.customer-payment-amount-field .amount-number-control.is-locked .amount-digit-row { border-color: #c9968f; background: #fff3ef; box-shadow: inset 0 0 0 1px rgba(143,72,80,.12); }
.customer-payment-amount-field .amount-number-control.is-locked .amount-lock-window { border-color: #c9968f; background: linear-gradient(180deg, #ead5d0 0%, #fff7f3 48%, #ead5d0 100%); }
.customer-payment-amount-field .amount-number-control.is-locked .amount-digit,
.customer-payment-amount-field .amount-number-control.is-locked .amount-cent-digit { color: #8f4850; cursor: not-allowed; }
.customer-payment-service-charge-row {
  display: grid;
  grid-template-columns: 42px minmax(220px, 320px);
  align-items: end;
  justify-content: start;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  padding: 9px 11px;
  border: 1px dashed #ead2cf;
  border-radius: 16px;
  background: #fff9f6;
}
.customer-payment-service-charge-row:not([open]) {
  grid-template-columns: 42px;
  padding: 8px;
}
.customer-payment-service-charge-row > summary {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #d9c4ca;
  border-radius: 999px;
  background: #f6e2e9;
  color: var(--brand);
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}
.customer-payment-service-charge-row > summary::-webkit-details-marker { display: none; }
.customer-payment-service-charge-row > summary::marker { content: ''; }
.customer-payment-service-charge-field { margin: 0; min-width: 0; }
.customer-payment-service-charge-row:not([open]) .customer-payment-service-charge-field { display: none; }
.modal-card #editRecordForm { display: grid; gap: 10px; }
.modal-card .customer-payment-details-panel { gap: 10px; }
.modal-card .customer-payment-details-head { grid-template-columns: repeat(2, minmax(140px, 220px)); align-items: end; }
.modal-card .customer-payment-rows { gap: 8px; }
.modal-card [data-edit-customer-payment-row].customer-payment-row-card {
  grid-template-columns: 72px minmax(150px, .95fr) minmax(132px, .78fr) minmax(172px, 1fr) minmax(172px, 1fr);
  padding: 9px;
  gap: 8px;
  border-radius: 14px;
}
.modal-card [data-edit-customer-payment-row] .customer-payment-row-title {
  padding-top: 27px;
  font-size: 10px;
}
.modal-card [data-edit-customer-payment-row] .field,
.modal-card [data-edit-customer-payment-row] .customer-payment-style-stack .field {
  margin: 0;
}
.modal-card [data-edit-customer-payment-row] .customer-payment-primary-grid > .field,
.modal-card [data-edit-customer-payment-row] > .field,
.modal-card [data-edit-customer-payment-row] .customer-payment-style-stack .field {
  grid-template-rows: 16px 44px;
  gap: 4px;
}
.modal-card [data-edit-customer-payment-row] select,
.modal-card [data-edit-customer-payment-row] input,
.modal-card [data-edit-customer-payment-row] .customer-payment-style-stack select,
.modal-card [data-edit-customer-payment-row] .customer-payment-style-stack input {
  min-height: 44px;
  height: 44px;
  padding: 8px 10px;
  font-size: 14px;
}
.modal-card [data-edit-customer-payment-row] .customer-payment-row-card-fields {
  grid-template-columns: repeat(4, minmax(126px, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
}
.modal-card [data-edit-customer-payment-row] .customer-payment-row-card-fields .field {
  grid-template-rows: 16px 40px;
  gap: 4px;
}
.modal-card [data-edit-customer-payment-row] .customer-payment-row-card-fields select,
.modal-card [data-edit-customer-payment-row] .customer-payment-row-card-fields input {
  min-height: 40px;
  height: 40px;
}
.modal-card [data-edit-customer-payment-row] .customer-payment-amount-field .amount-digit-row {
  min-height: 44px;
  padding: 4px;
}
.modal-card [data-edit-customer-payment-row] .customer-payment-amount-field .amount-lock-window,
.modal-card [data-edit-customer-payment-row] .customer-payment-amount-field .amount-lock-window .amount-digit,
.modal-card [data-edit-customer-payment-row] .customer-payment-amount-field .amount-lock-window .amount-cent-digit {
  min-height: 34px !important;
}
.modal-card [data-edit-customer-payment-row] .customer-payment-amount-field .amount-lock-window .amount-digit,
.modal-card [data-edit-customer-payment-row] .customer-payment-amount-field .amount-lock-window .amount-cent-digit {
  font-size: 19px;
}
.modal-card #editLinkedSOField { grid-template-columns: 120px minmax(220px, 320px) minmax(260px, 1fr); padding: 10px 12px; }
.amount-cent-digit { text-align: center; font: inherit; font-weight: 950; color: inherit; }
@media (min-width: 761px) and (max-width: 1240px) {
  .customer-payment-row-card,
  .customer-payment-extra-row,
  .customer-payment-primary-grid {
    grid-template-columns: 98px minmax(0, 1fr) minmax(0, 1fr);
  }
  .customer-payment-row-title {
    grid-row: 1 / span 2;
  }
  .customer-payment-style-stack {
    grid-column: 3;
    grid-row: 1;
  }
  .customer-payment-type-field {
    grid-column: 2;
    grid-row: 1;
  }
  .customer-payment-deposit-field {
    grid-column: 2;
    grid-row: 2;
  }
  .customer-payment-full-field {
    grid-column: 2 / -1;
    grid-row: 2;
  }
  .customer-payment-row-card-fields {
    grid-column: 2 / -1;
    grid-row: 3;
  }
  .customer-payment-other-style-field {
    grid-column: 2 / -1;
    grid-row: 3;
  }
  .customer-payment-row-card.is-deposit .customer-payment-deposit-field,
  .customer-payment-primary-grid.is-deposit #depositAmountField {
    grid-column: 2;
    grid-row: 2;
  }
  .customer-payment-row-card.is-deposit .customer-payment-full-field,
  .customer-payment-primary-grid.is-deposit #fullAmountField {
    grid-column: 3;
    grid-row: 2;
  }
}
