/* ============================================================
   Sigma Nursery — Components
   Button, card, list, badge, form, modal, toast, loading
   ============================================================ */

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn:active:not(:disabled) {
  opacity: 0.85;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:active:not(:disabled) {
  background: var(--primary-600);
  opacity: 1;
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-outline {
  background: var(--white);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:active:not(:disabled) {
  background: var(--primary-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.card-flat {
  box-shadow: none;
  border: 1px solid var(--border);
}

/* ---------- List ---------- */
.list {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
  overflow: hidden;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  width: 100%;
  transition: background var(--dur) var(--ease);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:active {
  background: var(--surface-alt);
}

.list-item .item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary-700);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.list-item .item-body {
  flex: 1;
  min-width: 0;
}

.list-item .item-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.list-item .item-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item .item-chevron {
  color: var(--muted);
  font-size: 1.2rem;
}

/* ---------- Status Badge ---------- */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-draft { background: #eef1f0; color: #4a5550; }
.badge-ready { background: var(--info-light); color: var(--info); }
.badge-submitted { background: var(--warning-light); color: var(--warning); }
.badge-under-review { background: #f3e8fd; color: #7c3aed; }
.badge-corrected { background: #e0f7fa; color: #00838f; }
.badge-approved { background: var(--primary-light); color: var(--primary-700); }
.badge-pending { background: var(--warning-light); color: var(--warning); }
.badge-syncing { background: var(--info-light); color: var(--info); }
.badge-synced { background: var(--primary-light); color: var(--primary-700); }
.badge-failed { background: var(--danger-light); color: var(--danger); }

/* ---------- Form ---------- */
.field {
  margin-bottom: 13px;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.field-control {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.95rem;
  transition: border-color var(--dur) var(--ease);
}

.field-control:focus {
  outline: none;
  border-color: var(--primary);
}

textarea.field-control {
  min-height: 84px;
  resize: vertical;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 5px;
}

/* ---------- Modal Root & Container ---------- */
#modal-root {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 300;
}

#modal-root:empty {
  display: none;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(2px);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 32px;
  overflow: hidden;
  pointer-events: auto;
  animation: fade-in 0.15s ease;
}

.modal {
  width: 100%;
  max-width: 100%;
  max-height: 88%;
  background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 20px 18px;
  padding-bottom: calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  animation: slide-up 0.2s var(--ease);
  box-shadow: var(--shadow-md);
}

.modal-overlay.modal-overlay-fullscreen {
  align-items: stretch;
  background: var(--white);
  border-radius: 32px;
  padding: 0;
}

.modal.modal-fullscreen {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  border-radius: 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  animation: fade-in 0.15s ease;
}

.modal.modal-fullscreen .modal-head {
  padding: 14px 16px 12px 16px;
  margin-bottom: 0;
  border-bottom: 1px solid #E2E8F0;
  background: #FFFFFF;
  flex-shrink: 0;
}

.modal.modal-fullscreen .modal-body {
  padding: 12px 16px 16px 16px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal.modal-fullscreen .modal-foot {
  padding: 10px 16px calc(12px + var(--safe-bottom, 0px)) 16px;
  margin-top: 0;
  border-top: 1px solid #E2E8F0;
  background: #FFFFFF;
  flex-shrink: 0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03);
}

@keyframes slide-up {
  from { transform: translateY(48px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text, #0F172A);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: calc(100% - 42px);
}

.modal-fullscreen .modal-title {
  font-size: 0.88rem;
  letter-spacing: -0.01em;
}

.modal-close {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  font-size: 1.2rem;
  color: var(--muted);
  transition: background var(--dur) var(--ease);
}

.modal-close:active {
  background: var(--surface-alt);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
}

.modal-foot {
  margin-top: 18px;
  display: flex;
  gap: 10px;
}

.modal-foot .btn {
  flex: 1;
}

/* ---------- Toast ---------- */
#toast-root,
.toast-root {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 440px;
  pointer-events: none;
}

.toast {
  background: #222222;
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: scale-in 0.18s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 9px;
}

.toast-success { background: var(--primary); }
.toast-error { background: var(--danger); }
.toast-info { background: #222222; }

/* ---------- Empty State ---------- */
.empty {
  text-align: center;
  padding: 44px 16px;
  color: var(--muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.85;
}

.empty-title {
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.empty-sub {
  font-size: 0.82rem;
}

/* ---------- Loading ---------- */
.loading-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---------- Date Filter Banner & Tabs Utility ---------- */
.date-filter-status-banner {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 12px 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* =============================================================================
   BAPB KARET DIGITAL - HARMONIZED FORM & REVIEW LAYOUT SYSTEM
   ============================================================================= */
.modal-bapb-fullscreen .modal-body {
  padding: 12px 14px 20px 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.bapb-form-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #334155;
  font-size: 0.84rem;
  line-height: 1.45;
  padding-bottom: 12px;
}

.bapb-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bapb-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 2px;
}

.bapb-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  line-height: 1.3;
}

.bapb-section-subtitle {
  font-size: 0.74rem;
  color: #64748B;
  margin-top: 1px;
  display: block;
}

.bapb-notice-box {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.78rem;
  color: #065F46;
  line-height: 1.45;
}

.bapb-return-box {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 10px 12px;
  color: #991B1B;
  line-height: 1.4;
}

.bapb-transaction-details-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bapb-date-display-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bapb-date-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748B;
}

.bapb-date-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0F172A;
}

.bapb-grid-fields,
.device-frame .bapb-grid-fields,
.device-screen .bapb-grid-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 320px) {
  .bapb-grid-fields {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.bapb-field-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bapb-field-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bapb-input-control {
  width: 100%;
  height: 38px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 0.8rem;
  color: #0F172A;
  background: #FFFFFF;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bapb-input-control:focus {
  outline: none;
  border-color: #116834;
  box-shadow: 0 0 0 3px rgba(17, 104, 52, 0.12);
}

.bapb-source-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 6px;
  background: #F8FAFC;
}

.bapb-source-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.bapb-source-item:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.bapb-source-checkbox {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #116834;
  cursor: pointer;
}

.bapb-source-content {
  flex: 1;
  min-width: 0;
}

.bapb-source-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 2px;
}

.bapb-source-docno {
  font-weight: 700;
  font-size: 0.78rem;
  color: #0F172A;
  font-family: monospace;
  word-break: break-all;
}

.bapb-source-qty {
  font-weight: 800;
  color: #DC2626;
  font-size: 0.82rem;
  white-space: nowrap;
}

.bapb-source-meta {
  font-size: 0.7rem;
  color: #64748B;
  line-height: 1.3;
}

.modal-bapb-source-selection .bapb-source-list {
  max-height: 280px;
}

.bapb-confirmed-sources-box {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px 14px;
  background: #FFFFFF;
}

.bapb-confirmed-source-card {
  display: flex;
  flex-direction: column;
}

.bapb-confirmed-source-docno {
  font-weight: 700;
  color: #0F172A;
  font-family: monospace;
  font-size: 0.86rem;
  line-height: 1.3;
}

.bapb-confirmed-source-meta {
  font-size: 0.74rem;
  color: #64748B;
  margin: 3px 0 6px 0;
  line-height: 1.4;
}

.bapb-confirmed-source-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.bapb-confirmed-source-qty {
  font-weight: 800;
  color: #DC2626;
  font-size: 1.05rem;
  line-height: 1.2;
}

.bapb-btn-change-source {
  background: transparent;
  border: none;
  color: #0284C7;
  font-size: 0.78rem;
  font-weight: 400;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
  transition: color 0.15s ease, opacity 0.15s ease;
  line-height: 1.2;
}

.bapb-btn-change-source:hover {
  color: #0369A1;
  text-decoration: underline;
  background: transparent;
  border: none;
}

.bapb-photo-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.bapb-btn-photo {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  background: #FFFFFF;
  border: 1px dashed #94A3B8;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.bapb-btn-photo:hover {
  background: #F8FAFC;
  border-color: #64748B;
  color: #1E293B;
}

.bapb-photo-counter {
  display: none !important;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 9999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.bapb-photo-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.bapb-photo-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 8px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.bapb-photo-card img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #CBD5E1;
  flex-shrink: 0;
}

.bapb-photo-card-info {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  color: #475569;
}

.bapb-photo-card-title {
  font-weight: 700;
  color: #1E293B;
  font-size: 0.76rem;
  line-height: 1.3;
}

.bapb-photo-card-meta {
  margin-top: 2px;
  font-size: 0.70rem;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bapb-btn-remove-photo {
  background: transparent;
  border: none;
  color: #DC2626;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.bapb-btn-remove-photo:hover {
  background: #FEE2E2;
  color: #B91C1C;
}

.bapb-btn-clear-sig {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  color: #94A3B8;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.bapb-btn-clear-sig:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #DC2626;
}

.bapb-sig-role-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.bapb-sig-role-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0F172A;
}

.bapb-canvas-box {
  position: relative;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  background: #F1F5F9;
  overflow: hidden;
  touch-action: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.bapb-canvas-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #64748B;
  font-size: 0.84rem;
  font-weight: 500;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.15s ease;
}

.bapb-canvas-box.is-signed .bapb-canvas-placeholder {
  opacity: 0;
}

.bapb-sig-canvas {
  display: block;
  width: 100%;
  height: 120px;
  cursor: crosshair;
  position: relative;
  z-index: 2;
  background: transparent;
}

.bapb-sig-bottom-hint {
  text-align: center;
  font-size: 0.74rem;
  color: #64748B;
  margin-top: 8px;
}

.bapb-canvas-hint {
  font-size: 0.68rem;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.25;
  margin-top: 3px;
}

.bapb-footer-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  align-items: center;
  box-sizing: border-box;
  padding-top: 4px;
}

.bapb-btn-cancel {
  flex: 0 0 100px;
  height: 46px;
  background: #F1F5F9;
  color: #0F172A;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.bapb-btn-cancel:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.bapb-btn-submit {
  flex: 1;
  min-width: 0;
  height: 46px;
  background: #2D6A4F;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  box-sizing: border-box;
  box-shadow: 0 2px 4px rgba(45, 106, 79, 0.2);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  transition: all 0.15s ease;
}

.bapb-btn-submit:hover {
  background: #20503B;
}

@media (max-width: 360px) {
  .bapb-footer-actions {
    gap: 8px;
  }
  .bapb-btn-cancel {
    flex: 0 0 84px;
    font-size: 0.84rem;
  }
  .bapb-btn-submit {
    font-size: 0.86rem;
  }
}

/* =============================================================================
   BAPB A4 PREVIEW MODAL & RESPONSIVE SHEET STYLES (FRAME HP OPTIMIZED)
   ============================================================================= */
.modal-bapb-preview-modal .modal-body {
  padding: 0 !important;
  background: #F1F5F9;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.bapb-preview-container {
  padding: 12px 10px 24px 10px;
  display: flex;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.bapb-preview-paper {
  background: #FFFFFF;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid #E2E8F0;
  overflow: hidden;
}

/* Responsive BAPB Sheet in Screen Preview Mode */
.bapb-a4-sheet.bapb-sheet-preview {
  width: 100% !important;
  max-width: 100% !important;
  min-height: auto !important;
  padding: 14px 12px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  font-size: 8pt !important;
  line-height: 1.4 !important;
}

.bapb-sheet-preview .bapb-preview-kop {
  border-bottom: 2px solid #0f172a;
  padding-bottom: 8px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.bapb-sheet-preview .bapb-preview-meta-grid,
.bapb-sheet-preview .bapb-preview-meta-container {
  display: block;
  background: transparent;
  padding: 2px 0;
  margin-bottom: 10px;
  font-size: 7.2pt;
  box-sizing: border-box;
}

.bapb-meta-table {
  width: 100%;
  border-collapse: collapse;
  border: none;
  font-size: inherit;
  line-height: 1.45;
}

.bapb-meta-table tr {
  page-break-inside: avoid;
  break-inside: avoid;
}

.bapb-meta-table .bapb-meta-label {
  vertical-align: top;
  color: #1E293B;
  font-weight: 400;
  white-space: nowrap;
}

.bapb-meta-table .bapb-meta-colon {
  vertical-align: top;
  color: #1E293B;
  text-align: center;
  white-space: nowrap;
}

.bapb-meta-table .bapb-meta-val {
  vertical-align: top;
  color: #000000;
  font-weight: 700;
  word-break: break-word;
}

.bapb-sheet-preview .bapb-preview-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 10px;
  border: 1px solid #CBD5E1;
  border-radius: 4px;
}

.bapb-sheet-preview .bapb-preview-table {
  width: 100%;
  min-width: 440px;
  border-collapse: collapse;
  font-size: 7.2pt;
}

.bapb-sheet-preview .bapb-preview-table thead tr,
.bapb-sheet-preview .bapb-preview-table th {
  background: #FFFFFF !important;
  color: #000000 !important;
  font-weight: 700 !important;
  border: 1px solid #CBD5E1 !important;
}

.bapb-sheet-preview .bapb-preview-photos {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.bapb-sheet-preview .bapb-preview-photo-item {
  flex: 1;
  max-width: 160px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 4px;
  background: #F8FAFC;
  text-align: center;
}

.bapb-sheet-preview .bapb-preview-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  text-align: center;
  margin-top: 10px;
}

.bapb-sheet-preview .bapb-preview-sig-box {
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 6px 4px;
  background: #FFFFFF;
}

/* =============================================================================
   CAMERA OVERLAY AT MODAL ROOT LEVEL
   ============================================================================= */
.modal.has-camera-active .modal-head,
.modal.has-camera-active .modal-foot {
  display: none !important;
}

.modal.has-camera-active .modal-body {
  padding: 0 !important;
  overflow: hidden !important;
}

.bapb-camera-overlay {
  position: absolute;
  inset: 0;
  background: #000000;
  z-index: 500;
  display: flex;
  flex-direction: column;
  border-radius: 32px;
  overflow: hidden;
}

/* =============================================================================
   MODAL PEMILIHAN METODE PERSETUJUAN BAPB (LANGKAH 1)
   ============================================================================= */
.modal-bapb-method-selection {
  max-width: 440px !important;
  width: calc(100% - 24px) !important;
  margin: auto !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08) !important;
}

.bapb-pre-mode-card {
  user-select: none;
  -webkit-user-select: none;
}

.bapb-pre-mode-card:hover {
  border-color: #116834 !important;
}




