/* ==========================================================================
   Checking - Precision Check Writer & Calibrator
   Design System: Neumorphic (60% Eggshell White, 30% Black, 10% #004c66)
   ========================================================================== */

:root {
  /* 60% Eggshell White Palette */
  --bg-eggshell: #f4f1ea;
  --bg-eggshell-light: #fbf9f5;
  --bg-eggshell-dark: #ebe6dc;
  --bg-eggshell-inset: #e5dfd4;
  --neu-light-shadow: #ffffff;
  --neu-dark-shadow: #d1c9bb;
  --neu-dark-shadow-deep: #b8ad9c;
  --border-eggshell: rgba(190, 180, 165, 0.4);

  /* 30% Black / Deep Charcoal Palette */
  --neu-dark-bg: #121820;
  --neu-dark-surface: #18202a;
  --neu-dark-surface-elevated: #1f2937;
  --neu-dark-border: #263342;
  --neu-dark-shadow-dark: #090d12;
  --neu-dark-shadow-light: #212c3a;
  --text-dark: #121820;
  --text-dark-muted: #5e6670;
  --text-light: #f8fafc;
  --text-light-muted: #94a3b8;

  /* 10% #004c66 Teal Accent Palette */
  --accent-primary: #004c66;
  --accent-primary-hover: #003649;
  --accent-primary-light: #006b8f;
  --accent-glow: rgba(0, 76, 102, 0.35);
  --accent-border: #006080;

  /* Sizing, Typography & Apple HIG Design System */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Monaco, Consolas, "Courier New", monospace;
  
  /* Proportional Layout Gutters (Synchronized Left & Right Margins) */
  --app-gutter: 1.5rem;

  /* Apple Squircle Continuous Curvature Radii */
  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 9999px;

  /* Apple Easing Transitions */
  --apple-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --apple-transition-fast: all 0.18s var(--apple-spring);
  --apple-transition-base: all 0.26s var(--apple-spring);
}

/* Global Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  background-color: var(--bg-eggshell);
  color: var(--text-dark);
  font-family: var(--font-sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-eggshell);
}
::-webkit-scrollbar-thumb {
  background: var(--neu-dark-shadow);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Neumorphic Surface Classes */
.neu-flat {
  background: var(--bg-eggshell);
  border-radius: var(--radius-md);
  box-shadow: 6px 6px 14px var(--neu-dark-shadow), -6px -6px 14px var(--neu-light-shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.neu-card {
  background: var(--bg-eggshell);
  border-radius: var(--radius-lg);
  box-shadow: 8px 8px 18px var(--neu-dark-shadow), -8px -8px 18px var(--neu-light-shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.neu-inset {
  background: var(--bg-eggshell-inset);
  border-radius: var(--radius-md);
  box-shadow: inset 4px 4px 8px var(--neu-dark-shadow), inset -4px -4px 8px var(--neu-light-shadow);
  border: 1px solid rgba(190, 180, 165, 0.25);
}

.neu-btn {
  background: var(--bg-eggshell);
  color: var(--text-dark);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  padding: 0.55rem 1.1rem;
  box-shadow: 4px 4px 10px var(--neu-dark-shadow), -4px -4px 10px var(--neu-light-shadow);
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  user-select: none;
}
.neu-btn:hover {
  transform: translateY(-1px);
  box-shadow: 6px 6px 14px var(--neu-dark-shadow), -6px -6px 14px var(--neu-light-shadow);
  color: var(--accent-primary);
}
.neu-btn:active, .neu-btn.active {
  box-shadow: inset 3px 3px 6px var(--neu-dark-shadow), inset -3px -3px 6px var(--neu-light-shadow);
  transform: translateY(1px);
  background: var(--bg-eggshell-dark);
}

/* Primary Accent Button (#004c66) */
.neu-btn-primary {
  background: linear-gradient(135deg, #005a7a 0%, var(--accent-primary) 100%);
  color: #ffffff !important;
  border: 1px solid var(--accent-border);
  box-shadow: 4px 4px 12px var(--accent-glow), -2px -2px 8px rgba(255, 255, 255, 0.4);
}
.neu-btn-primary:hover {
  background: linear-gradient(135deg, #006d94 0%, #003e54 100%);
  color: #ffffff !important;
  box-shadow: 5px 5px 16px var(--accent-glow), -2px -2px 10px rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}
.neu-btn-primary:active {
  background: #003649;
  box-shadow: inset 3px 3px 6px #00222e, inset -2px -2px 4px rgba(255, 255, 255, 0.2);
  transform: translateY(1px);
}

/* Dark Neumorphic Card (30% Black Structural Panels) */
.neu-dark-card {
  background: var(--neu-dark-bg);
  color: var(--text-light);
  border-radius: var(--radius-lg);
  box-shadow: 10px 10px 24px var(--neu-dark-shadow-dark), -4px -4px 14px rgba(255, 255, 255, 0.04);
  border: 1px solid var(--neu-dark-border);
  padding: 1.25rem;
}

.neu-dark-inset {
  background: #0d1217;
  border-radius: var(--radius-md);
  box-shadow: inset 3px 3px 7px #070a0d, inset -2px -2px 5px rgba(255, 255, 255, 0.05);
  border: 1px solid #1c2632;
  color: var(--text-light);
}

.neu-dark-btn {
  background: var(--neu-dark-surface);
  color: var(--text-light);
  font-weight: 500;
  border: 1px solid var(--neu-dark-border);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  box-shadow: 3px 3px 8px var(--neu-dark-shadow-dark), -2px -2px 6px var(--neu-dark-shadow-light);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}
.neu-dark-btn:hover {
  background: var(--neu-dark-surface-elevated);
  color: #38bdf8;
  border-color: #38bdf8;
}
.neu-dark-btn:active, .neu-dark-btn.active {
  background: #0c1015;
  box-shadow: inset 2px 2px 5px #05070a, inset -2px -2px 4px rgba(255, 255, 255, 0.05);
  color: #38bdf8;
}

/* Header & Top Bar Navigation (Apple Frosted Glass & Proportional Padding) */
.app-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1020;
  background-color: var(--bg-eggshell);
  border-bottom: 1px solid rgba(190, 180, 165, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  padding: 0.75rem var(--app-gutter, 1.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1rem;
  transition: background 0.28s var(--apple-spring),
              background-color 0.28s var(--apple-spring),
              backdrop-filter 0.28s ease,
              -webkit-backdrop-filter 0.28s ease,
              border-color 0.28s ease,
              box-shadow 0.28s ease,
              padding 0.2s ease;
}

/* Glass Effect when scrolling vertically: Reduced Opacity to 20% with heavy backdrop blur */
.app-header.is-scrolled-glass {
  background: rgba(244, 241, 234, 0.20) !important;
  background-color: rgba(244, 241, 234, 0.20) !important;
  backdrop-filter: blur(25px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(25px) saturate(190%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05) !important;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #005a7a, var(--accent-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.25rem;
  box-shadow: 3px 3px 8px var(--neu-dark-shadow), -3px -3px 8px var(--neu-light-shadow);
  transition: var(--apple-transition-fast);
}
.brand-icon:active {
  transform: scale(0.95);
}
.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.brand-version {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-dark-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.status-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulseGreen 2s infinite;
}
@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Nav Tabs: Apple Segmented Control */
.app-nav-tabs {
  display: flex;
  background: rgba(18, 24, 32, 0.06);
  border-radius: var(--radius-md);
  padding: 3px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  gap: 2px;
}
.nav-tab-btn {
  padding: 0.48rem 1.15rem;
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text-dark-muted);
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--apple-transition-fast);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  user-select: none;
}
.nav-tab-btn:hover {
  color: var(--text-dark);
}
.nav-tab-btn:active {
  transform: scale(0.97);
}
.nav-tab-btn.active {
  background: #ffffff;
  color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  font-weight: 700;
}

/* Dedicated Mobile Bottom Navigation Bar (Hidden by default on Desktop/Tablet) */
.mobile-bottom-nav {
  display: none;
}

/* Top Telemetry & Controls */
.top-telemetry-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.printer-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  background: var(--bg-eggshell-light);
  border-radius: var(--radius-md);
  box-shadow: inset 2px 2px 5px var(--neu-dark-shadow), inset -2px -2px 5px var(--neu-light-shadow);
  border: 1px solid rgba(190, 180, 165, 0.3);
  white-space: nowrap;
}
.printer-indicator-text {
  display: inline-block;
  white-space: nowrap;
}
.printer-mobile-icon {
  display: none;
}
.unit-switcher {
  display: flex;
  background: var(--bg-eggshell-inset);
  border-radius: var(--radius-md);
  padding: 0.2rem;
  box-shadow: inset 2px 2px 4px var(--neu-dark-shadow), inset -2px -2px 4px var(--neu-light-shadow);
}
.unit-btn {
  border: none;
  background: transparent;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-dark-muted);
  border-radius: 6px;
  cursor: pointer;
}
.unit-btn.active {
  background: #ffffff;
  color: var(--accent-primary);
  box-shadow: 2px 2px 4px var(--neu-dark-shadow);
}

/* Sub-header Telemetry Ribbon */
.telemetry-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1.5rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-dark-muted);
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(190, 180, 165, 0.25);
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.telemetry-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Main Dynamic Viewport: Synchronized Proportional Margins Matching Header */
.app-viewport {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 var(--app-gutter, 1.5rem) 2.5rem;
  box-sizing: border-box;
}

/* Active Template Selector Ribbon (Apple Layout & Proportions) */
.specimen-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
}
.specimen-title-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
  min-width: 0;
}
.specimen-icon-circle {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #005a7a, var(--accent-primary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 2px 2px 6px var(--neu-dark-shadow);
}
.specimen-title-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dark-muted);
  font-weight: 700;
  line-height: 1.2;
}
.specimen-name {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.015em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}

/* Quick Bank Pills: Native Apple App Horizontal Scrolling Strip */
.quick-bank-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.25rem 0.2rem;
  scroll-snap-type: x proximity;
  flex-grow: 1;
  justify-content: flex-end;
  max-width: calc(100% - 300px);
}
.quick-bank-bar::-webkit-scrollbar {
  display: none;
}
.bank-pill-btn {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(190, 180, 165, 0.45);
  background: var(--bg-eggshell-light);
  color: var(--text-dark);
  box-shadow: 2px 2px 6px var(--neu-dark-shadow), -2px -2px 6px var(--neu-light-shadow);
  cursor: pointer;
  transition: var(--apple-transition-fast);
  scroll-snap-align: start;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.bank-pill-btn:hover {
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 3px 3px 8px var(--neu-dark-shadow-deep), -2px -2px 6px var(--neu-light-shadow);
}
.bank-pill-btn:active {
  transform: scale(0.96);
}
.bank-pill-btn.active {
  background: var(--neu-dark-bg);
  color: #ffffff;
  border-color: var(--neu-dark-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  font-weight: 700;
}

/* Optical Drafting Canvas & Check Preview Area */
.canvas-wrapper-outer {
  position: relative;
  background: var(--bg-eggshell-light);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: inset 4px 4px 10px var(--neu-dark-shadow), inset -4px -4px 10px var(--neu-light-shadow);
  border: 1px solid rgba(190, 180, 165, 0.3);
  overflow: auto;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.canvas-top-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-dark-muted);
}
.canvas-tools-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.tool-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--bg-eggshell);
  box-shadow: 2px 2px 5px var(--neu-dark-shadow), -2px -2px 5px var(--neu-light-shadow);
  cursor: pointer;
  color: var(--text-dark);
}
.tool-icon-btn.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.4);
}

/* Ruler Axes */
.canvas-ruler-container {
  position: relative;
  display: inline-block;
  margin: 0 auto;
  padding: 24px 0 0 24px;
}
.ruler-top {
  position: absolute;
  top: 0;
  left: 24px;
  right: 0;
  height: 24px;
  background: #ece8df;
  border-bottom: 1px solid #bfb7a7;
  font-family: var(--font-mono);
  font-size: 9px;
  color: #6c757d;
  user-select: none;
  pointer-events: none;
}
.ruler-left {
  position: absolute;
  top: 24px;
  left: 0;
  bottom: 0;
  width: 24px;
  background: #ece8df;
  border-right: 1px solid #bfb7a7;
  font-family: var(--font-mono);
  font-size: 9px;
  color: #6c757d;
  user-select: none;
  pointer-events: none;
}

/* Physical Check Container */
.physical-check-plane {
  position: relative;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 6px 6px 16px rgba(0, 0, 0, 0.15), 0 0 0 1px #d5cfc1;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: width 0.2s ease, height 0.2s ease;
  user-select: none;
}

/* Background check watermark / security pattern */
.check-security-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 50% 50%, rgba(0, 76, 102, 0.03) 0%, transparent 60%),
    repeating-linear-gradient(45deg, rgba(0, 76, 102, 0.015) 0, rgba(0, 76, 102, 0.015) 2px, transparent 2px, transparent 10px),
    linear-gradient(to bottom, #fcfbf9, #f7f4ed);
  pointer-events: none;
  z-index: 1;
}

/* Custom User Scan Overlay */
.check-scan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 0.35;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease;
}

/* Check Bank Header & Default Aesthetics */
.check-static-bank-header {
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  line-height: 1.2;
  z-index: 3;
}
.check-static-bank-name {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}
.check-static-check-no {
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #334155;
  z-index: 3;
}

/* Crossing "ACCOUNT PAYEE ONLY" Watermark */
.check-crossed-watermark {
  position: absolute;
  top: 6px;
  left: 10px;
  transform: rotate(-35deg);
  border-top: 2px solid #004c66;
  border-bottom: 2px solid #004c66;
  padding: 2px 14px;
  font-size: 8.5px;
  font-family: var(--font-mono);
  font-weight: 800;
  color: #004c66;
  letter-spacing: 0.05em;
  z-index: 8;
  opacity: 0.85;
  display: none;
}
.check-crossed-watermark.visible {
  display: block;
}

/* Draggable & Configurable Check Field Boxes */
.check-field-box {
  position: absolute;
  z-index: 10;
  display: flex;
  align-items: center;
  cursor: grab;
  user-select: none;
  white-space: nowrap;
  transition: box-shadow 0.15s ease, background 0.15s ease;
  padding: 0 4px;
  border: 1px dashed transparent;
}
.check-field-box:hover {
  border-color: rgba(0, 76, 102, 0.4);
  background: rgba(0, 76, 102, 0.03);
}
.check-field-box.active-selected {
  border: 1.5px solid var(--accent-primary) !important;
  background: rgba(0, 76, 102, 0.08) !important;
  box-shadow: 0 0 0 2px rgba(0, 76, 102, 0.25);
  cursor: grabbing;
}
.check-field-tag {
  position: absolute;
  top: -14px;
  left: 0;
  right: auto;
  font-size: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--accent-primary);
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}
.check-field-box:hover .check-field-tag,
.check-field-box.active-selected .check-field-tag {
  opacity: 1;
}

/* Quick Delete Button on Hover / Selection */
.field-delete-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 18px;
  height: 18px;
  background: #dc3545;
  color: #ffffff;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.1s ease, background 0.15s ease;
  z-index: 30;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  padding: 0;
  line-height: 1;
}
.field-delete-btn:hover {
  background: #b02a37;
  transform: scale(1.15);
}
.check-field-box:hover .field-delete-btn,
.check-field-box.active-selected .field-delete-btn {
  opacity: 1;
  pointer-events: auto;
}

/* Dynamic Fields Containers */
#calib-dynamic-fields-container,
#writer-dynamic-fields-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#calib-dynamic-fields-container .check-field-box,
#writer-dynamic-fields-container .check-field-box {
  pointer-events: auto;
}

#printable-check-zone .field-delete-btn {
  display: none !important;
}

/* MICR Line */
.check-micr-line {
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 100%;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  letter-spacing: 2px;
  font-size: 13px;
  z-index: 5;
  pointer-events: none;
}

/* Canvas Bottom Telemetry */
.canvas-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-eggshell);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  flex-wrap: wrap;
  gap: 0.5rem;
  box-shadow: 2px 2px 6px var(--neu-dark-shadow), -2px -2px 6px var(--neu-light-shadow);
}
.canvas-nudge-arrows {
  display: flex;
  gap: 0.35rem;
}
.nudge-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-eggshell);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 2px 2px 5px var(--neu-dark-shadow), -2px -2px 5px var(--neu-light-shadow);
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}
.nudge-btn:active {
  box-shadow: inset 1px 1px 3px var(--neu-dark-shadow);
  transform: translateY(1px);
}

/* Feed Direction Advisory & Compliance Badge */
.feed-direction-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-eggshell);
  border-radius: var(--radius-md);
  box-shadow: 3px 3px 8px var(--neu-dark-shadow), -3px -3px 8px var(--neu-light-shadow);
  margin-top: 1rem;
  font-size: 0.85rem;
}
.compliance-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

/* Fast Check Ledger (Right Column) */
.fast-ledger-container {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.ledger-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}
.ledger-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.form-neu-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-neu-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-dark-muted);
}
.form-neu-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-eggshell-inset);
  border: 1px solid rgba(190, 180, 165, 0.35);
  border-radius: var(--radius-md);
  box-shadow: inset 3px 3px 6px var(--neu-dark-shadow), inset -3px -3px 6px var(--neu-light-shadow);
  color: var(--text-dark);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-neu-input:focus {
  border-color: var(--accent-primary);
  box-shadow: inset 3px 3px 6px var(--neu-dark-shadow), 0 0 0 2px var(--accent-glow);
}
.form-neu-select, select.form-neu-input {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23004c66' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 1rem) center;
  padding-right: 2.2rem;
}
.form-neu-select option {
  background: #f4ede3;
  color: #1e293b;
  font-weight: 500;
  padding: 0.4rem;
}

.amount-input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.currency-affix {
  position: absolute;
  left: 0.85rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-primary);
  pointer-events: none;
}
.amount-input {
  padding-left: 2rem !important;
  font-family: var(--font-mono);
  font-size: 1.15rem !important;
  font-weight: 700 !important;
}

/* Payee Quick Chips */
.payee-chips-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}
.payee-chip {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 20px;
  background: var(--bg-eggshell);
  box-shadow: 2px 2px 4px var(--neu-dark-shadow), -2px -2px 4px var(--neu-light-shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
  cursor: pointer;
  color: var(--text-dark);
  transition: all 0.15s ease;
}
.payee-chip:hover {
  color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Legal Sum Dynamic Banner */
.legal-words-box {
  padding: 0.75rem 1rem;
  background: var(--bg-eggshell-light);
  border-radius: var(--radius-md);
  box-shadow: inset 2px 2px 5px var(--neu-dark-shadow), inset -2px -2px 5px var(--neu-light-shadow);
  border: 1px solid rgba(190, 180, 165, 0.3);
}
.legal-words-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-dark-muted);
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.legal-words-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-primary);
  line-height: 1.35;
  font-style: italic;
  min-height: 22px;
}

/* Check Serial Incrementer */
.serial-box-row {
  display: flex;
  gap: 0.5rem;
}
.serial-step-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-eggshell);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 3px 3px 7px var(--neu-dark-shadow), -3px -3px 7px var(--neu-light-shadow);
  font-size: 1.25rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.serial-step-btn:active {
  box-shadow: inset 2px 2px 4px var(--neu-dark-shadow);
}

/* Inkjet Feed Calibrator (Dark Neumorphic Panel) */
.inkjet-calibrator-card {
  margin-top: 1rem;
}
.inkjet-nudge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.75rem 0;
}
.nudge-pill-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0d1217;
  border-radius: var(--radius-md);
  padding: 0.4rem 0.6rem;
  border: 1px solid #1c2632;
}
.nudge-val-display {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #38bdf8;
}

/* Big Print Button */
.btn-print-hero {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #005a7a 0%, var(--accent-primary) 100%);
  color: #ffffff;
  border: 1px solid var(--accent-border);
  box-shadow: 4px 4px 14px rgba(0, 76, 102, 0.5), -2px -2px 8px rgba(255, 255, 255, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}
.btn-print-hero:hover {
  background: linear-gradient(135deg, #006e94 0%, #003a4c 100%);
  box-shadow: 6px 6px 18px rgba(0, 76, 102, 0.6), -2px -2px 10px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}
.btn-print-hero:active {
  background: #003649;
  box-shadow: inset 3px 3px 6px #001f2b;
  transform: translateY(1px);
}

/* Template Calibrator - Optical Drafting Left Bar */
.voucher-presets-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
}
.preset-sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-eggshell);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 4px 4px 10px var(--neu-dark-shadow), -4px -4px 10px var(--neu-light-shadow);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  color: var(--text-dark);
  position: relative;
  z-index: 1;
}
.preset-sidebar-item:hover {
  transform: translateX(2px);
  color: var(--accent-primary);
  z-index: 10;
}
.preset-sidebar-item.active {
  background: var(--neu-dark-bg);
  color: #38bdf8;
  border-color: var(--neu-dark-border);
  box-shadow: inset 3px 3px 6px #080c10;
}

/* Crucial Stacking Elevation when dropdown is opened */
.preset-sidebar-item.menu-open,
.preset-sidebar-item:has(.show),
.preset-sidebar-item:has([aria-expanded="true"]) {
  z-index: 1050 !important;
  transform: none !important;
}

.preset-sidebar-item .bank-badge-currency {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-eggshell-inset);
  line-height: 1.2;
}
.preset-sidebar-item.active .bank-badge-currency {
  background: #1e293b;
  color: #38bdf8;
}

/* Kebab 3-dots Menu Button & Dropdown in Presets Sidebar */
.preset-sidebar-item .dropdown {
  position: relative;
}

.preset-kebab-btn {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-dark-muted);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s ease;
  padding: 0;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}
.preset-kebab-btn:hover,
.preset-kebab-btn:focus,
.preset-kebab-btn[aria-expanded="true"] {
  background: rgba(0, 76, 102, 0.12);
  color: var(--accent-primary);
}
.preset-sidebar-item.active .preset-kebab-btn {
  color: #94a3b8;
}
.preset-sidebar-item.active .preset-kebab-btn:hover,
.preset-sidebar-item.active .preset-kebab-btn:focus,
.preset-sidebar-item.active .preset-kebab-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.preset-sidebar-item .dropdown-menu {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  transform: none !important;
  margin-top: 6px !important;
  font-size: 0.85rem;
  padding: 0.4rem 0;
  border-radius: var(--radius-md);
  min-width: 140px;
  background: #ffffff !important;
  border: 1px solid rgba(0, 76, 102, 0.18) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22), 0 4px 10px rgba(0, 0, 0, 0.1) !important;
  z-index: 1060 !important;
}
.preset-sidebar-item .dropdown-item {
  font-size: 0.85rem;
  padding: 0.5rem 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  color: var(--text-dark);
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  transition: all 0.15s ease;
}
.preset-sidebar-item .dropdown-item:hover,
.preset-sidebar-item .dropdown-item:focus {
  background: rgba(0, 76, 102, 0.08);
  color: var(--accent-primary);
}
.preset-sidebar-item .dropdown-item.text-danger:hover,
.preset-sidebar-item .dropdown-item.text-danger:focus {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545 !important;
}

/* Field Inspector (Dark Right Panel) */
.field-inspector-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.inspector-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-light-muted);
}
.inspector-select, .inspector-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: #0d1217;
  border: 1px solid #263342;
  border-radius: var(--radius-sm);
  color: #f8fafc;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  outline: none;
}
.inspector-select:focus, .inspector-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

/* Preset Library Cards Grid */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.template-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}
.template-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.template-badge {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-eggshell-inset);
  color: var(--text-dark-muted);
}
.template-badge.certified {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.template-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
}
.template-card-subtitle {
  font-size: 0.8rem;
  color: var(--text-dark-muted);
}
.template-specs-table {
  width: 100%;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  margin: 0.75rem 0;
}
.template-specs-table td {
  padding: 0.2rem 0;
}
.template-specs-table td.label {
  color: var(--text-dark-muted);
  width: 35%;
}
.template-specs-table td.val {
  font-weight: 600;
  color: var(--text-dark);
}
.template-card-actions {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid rgba(190, 180, 165, 0.25);
  padding-top: 0.75rem;
}

/* Print Log & Transactions Table */
.transactions-table-card {
  overflow-x: auto;
}
.neu-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}
.neu-table th {
  padding: 0.6rem 0.9rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dark-muted);
  font-weight: 700;
  border-bottom: 1px solid rgba(190, 180, 165, 0.3);
}
.neu-table tbody tr {
  background: var(--bg-eggshell);
  box-shadow: 3px 3px 8px var(--neu-dark-shadow), -3px -3px 8px var(--neu-light-shadow);
  border-radius: var(--radius-md);
  transition: transform 0.15s ease;
}
.neu-table tbody tr:hover {
  transform: translateY(-1px);
}
.neu-table td {
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  vertical-align: middle;
}
.neu-table td:first-child {
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}
.neu-table td:last-child {
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
}
.status-badge.printed {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.status-badge.queued {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.status-badge.void {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Payee Quick Registry Item */
.payee-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  background: #0d1217;
  border: 1px solid #1e293b;
  margin-bottom: 0.5rem;
}
.payee-avatar-initials {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ==========================================================================
   RESPONSIVE LAYOUT SYSTEM
   Desktop, Tablet, and Mobile Bottom Navigation Bar (Apple App Shell)
   ========================================================================== */

/* Tablet & Intermediate Viewports (769px to 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
  :root {
    --app-gutter: 1.25rem;
  }
  .app-header {
    padding: 0.65rem var(--app-gutter, 1.25rem);
    gap: 0.75rem;
  }
  .app-viewport {
    padding: 0 var(--app-gutter, 1.25rem) 2rem;
  }
  .nav-tab-btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    gap: 0.35rem;
  }
  .quick-bank-bar {
    max-width: calc(100% - 240px);
  }
}

/* Mobile Screens (<= 768px): Compact Sticky Header & Fixed Bottom Navigation Bar */
@media (max-width: 768px) {
  :root {
    --app-gutter: 0.85rem;
  }

  /* Sticky Mobile Header */
  .app-header {
    padding: 0.5rem var(--app-gutter, 0.85rem);
    min-height: 52px;
    gap: 0.5rem;
    flex-wrap: nowrap;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  }

  .brand-badge {
    gap: 0.5rem;
  }
  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    border-radius: 10px;
  }
  .brand-title {
    font-size: 1.12rem;
  }

  /* Responsive Top Telemetry & Controls */
  .top-telemetry-bar {
    gap: 0.35rem;
  }
  .top-telemetry-bar .neu-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    border-radius: 10px;
  }

  /* Specimen Card Stack & Horizontal Scrolling Presets on Mobile */
  .specimen-header-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    padding: 0.85rem 1rem !important;
  }
  .specimen-title-box {
    width: 100% !important;
  }
  .quick-bank-bar {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: flex-start !important;
    padding-bottom: 0.25rem !important;
    padding-top: 0.15rem !important;
    mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
  }
  .bank-pill-btn {
    padding: 0.42rem 0.9rem;
    font-size: 0.8rem;
  }

  /* Mobile: Hide header nav tabs to keep sticky header compact */
  .app-header .app-nav-tabs {
    display: none !important;
  }

  /* Dedicated Floating Pill Bottom Navigation Bar (Apple Dynamic Island / Floating Capsule Style) */
  .mobile-bottom-nav {
    position: fixed !important;
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 1.75rem) !important;
    max-width: 400px !important;
    z-index: 1040 !important;
    margin: 0 auto !important;
    border-radius: 9999px !important;
    background: rgba(246, 243, 238, 0.90) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.14),
                0 4px 12px rgba(0, 0, 0, 0.05),
                inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
    padding: 0.35rem 0.45rem !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    gap: 0.35rem !important;
    transition: background 0.3s var(--apple-spring),
                background-color 0.3s var(--apple-spring),
                backdrop-filter 0.3s ease,
                -webkit-backdrop-filter 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease,
                transform 0.3s var(--apple-spring);
  }

  /* Glass Effect when scrolling vertically: Reduced opacity to 20% on the floating pill */
  .mobile-bottom-nav.is-scrolled-glass {
    background: rgba(246, 243, 238, 0.22) !important;
    background-color: rgba(246, 243, 238, 0.22) !important;
    backdrop-filter: blur(28px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.10),
                0 4px 12px rgba(0, 0, 0, 0.04),
                inset 0 1px 1px rgba(255, 255, 255, 0.6) !important;
  }

  .mobile-bottom-nav .nav-tab-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.42rem 0.35rem !important;
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    border-radius: 9999px !important;
    gap: 0.16rem !important;
    color: var(--text-dark-muted) !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    transition: all 0.25s var(--apple-spring) !important;
    text-align: center !important;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }

  .mobile-bottom-nav .nav-tab-btn:active {
    transform: scale(0.92) !important;
  }

  .mobile-bottom-nav .nav-tab-btn i.fa {
    font-size: 1.18rem !important;
    margin: 0 !important;
    line-height: 1 !important;
    transition: transform 0.25s var(--apple-spring), color 0.25s ease;
  }

  .mobile-bottom-nav .nav-tab-btn span {
    font-size: 0.66rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .mobile-bottom-nav .nav-tab-btn.active {
    background: var(--accent-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 12px rgba(0, 76, 102, 0.35),
                inset 0 1px 0.5px rgba(255, 255, 255, 0.3) !important;
  }

  .mobile-bottom-nav .nav-tab-btn.active i.fa {
    transform: scale(1.06) !important;
    color: #ffffff !important;
  }

  .mobile-bottom-nav .nav-tab-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.04) !important;
    color: var(--text-dark) !important;
  }

  /* Viewport and Footer Offsets to Prevent Floating Pill Obscuring Content */
  .app-viewport {
    padding-left: var(--app-gutter, 0.85rem) !important;
    padding-right: var(--app-gutter, 0.85rem) !important;
    padding-bottom: calc(5.8rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .app-footer {
    margin-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)) !important;
    padding-left: var(--app-gutter, 0.85rem) !important;
    padding-right: var(--app-gutter, 0.85rem) !important;
  }

  @media (max-width: 375px) {
    .mobile-bottom-nav {
      width: calc(100% - 1.25rem) !important;
      padding: 0.3rem 0.35rem !important;
    }
    .mobile-bottom-nav .nav-tab-btn {
      padding: 0.38rem 0.25rem !important;
    }
    .mobile-bottom-nav .nav-tab-btn i.fa {
      font-size: 1.1rem !important;
    }
    .mobile-bottom-nav .nav-tab-btn span {
      font-size: 0.62rem !important;
    }
  }
}

/* ==========================================================================
   NEUMORPHIC SWEETALERT2 & UNIFORM ROUNDED SYSTEM
   Consistent Eggshell Neumorphic Design for All Alerts, Modals & Success Info
   ========================================================================== */

.swal2-container {
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  background-color: rgba(18, 24, 32, 0.45) !important;
  z-index: 1060 !important;
}

.swal2-popup {
  background: var(--bg-eggshell) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: 16px 16px 36px var(--neu-dark-shadow), -16px -16px 36px var(--neu-light-shadow) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  padding: 2.2rem 2rem !important;
  color: var(--text-dark) !important;
  font-family: var(--font-sans) !important;
}

.swal2-title {
  color: var(--text-dark) !important;
  font-family: var(--font-sans) !important;
  font-weight: 800 !important;
  font-size: 1.35rem !important;
  letter-spacing: -0.02em !important;
  padding: 0 !important;
  margin-bottom: 0.6rem !important;
}

.swal2-html-container {
  color: var(--text-dark-muted) !important;
  font-family: var(--font-sans) !important;
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
  margin: 0 !important;
}

/* Inset Neumorphic Icon Badges */
.swal2-icon {
  width: 5rem !important;
  height: 5rem !important;
  border-radius: 50% !important;
  margin: 0.5rem auto 1.25rem !important;
  background: var(--bg-eggshell) !important;
  box-shadow: inset 3px 3px 7px var(--neu-dark-shadow), inset -3px -3px 7px var(--neu-light-shadow), 4px 4px 10px var(--neu-dark-shadow), -4px -4px 10px var(--neu-light-shadow) !important;
  border-width: 3px !important;
}

.swal2-icon.swal2-warning {
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}

.swal2-icon.swal2-success {
  border-color: #10b981 !important;
  color: #10b981 !important;
}
.swal2-icon.swal2-success .swal2-success-ring {
  border: 4px solid rgba(16, 185, 129, 0.25) !important;
}
.swal2-icon.swal2-success [class^='swal2-success-line'] {
  background-color: #10b981 !important;
}
.swal2-icon.swal2-success .swal2-success-circular-line-left,
.swal2-icon.swal2-success .swal2-success-circular-line-right,
.swal2-icon.swal2-success .swal2-success-fix {
  background: transparent !important;
}

.swal2-icon.swal2-error {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}
.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
  background-color: #ef4444 !important;
}

.swal2-icon.swal2-info,
.swal2-icon.swal2-question {
  border-color: var(--accent-primary) !important;
  color: var(--accent-primary) !important;
}

/* Action Buttons Container */
.swal2-actions {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.85rem !important;
  margin-top: 1.6rem !important;
  width: 100% !important;
}

/* Confirm Button (Primary / Danger / Success) */
.swal2-confirm {
  border-radius: var(--radius-md) !important;
  font-family: var(--font-sans) !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  padding: 0.65rem 1.45rem !important;
  border: none !important;
  outline: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

/* Primary confirm buttons */
.swal2-confirm:not([style*="background-color: rgb(221, 51, 51)"]):not([style*="background-color: rgb(211, 51, 51)"]):not([style*="background-color: #d33"]):not([style*="background-color: #ef4444"]):not(.swal2-danger-btn) {
  background: linear-gradient(135deg, #005a7a, var(--accent-primary)) !important;
  color: #ffffff !important;
  box-shadow: 4px 4px 10px rgba(0, 76, 102, 0.35), -2px -2px 6px rgba(255, 255, 255, 0.5) !important;
}
.swal2-confirm:not([style*="background-color: rgb(221, 51, 51)"]):not([style*="background-color: rgb(211, 51, 51)"]):not([style*="background-color: #d33"]):not([style*="background-color: #ef4444"]):not(.swal2-danger-btn):hover {
  transform: translateY(-1px) !important;
  box-shadow: 5px 5px 14px rgba(0, 76, 102, 0.45), -2px -2px 6px rgba(255, 255, 255, 0.6) !important;
}

/* Danger / Delete confirm buttons */
.swal2-confirm[style*="background-color: rgb(221, 51, 51)"],
.swal2-confirm[style*="background-color: rgb(211, 51, 51)"],
.swal2-confirm[style*="background-color: #d33"],
.swal2-confirm[style*="background-color: #ef4444"],
.swal2-confirm.swal2-danger-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  box-shadow: 4px 4px 10px rgba(220, 38, 38, 0.35), -2px -2px 6px rgba(255, 255, 255, 0.5) !important;
}
.swal2-confirm[style*="background-color: rgb(221, 51, 51)"]:hover,
.swal2-confirm[style*="background-color: rgb(211, 51, 51)"]:hover,
.swal2-confirm[style*="background-color: #d33"]:hover,
.swal2-confirm[style*="background-color: #ef4444"]:hover,
.swal2-confirm.swal2-danger-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 5px 5px 14px rgba(220, 38, 38, 0.45), -2px -2px 6px rgba(255, 255, 255, 0.6) !important;
}

/* Cancel Button */
.swal2-cancel,
.swal2-cancel[style] {
  border-radius: var(--radius-md) !important;
  font-family: var(--font-sans) !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  padding: 0.65rem 1.45rem !important;
  background: var(--bg-eggshell-light) !important;
  background-color: var(--bg-eggshell-light) !important;
  color: var(--text-dark) !important;
  border: 1px solid rgba(190, 180, 165, 0.45) !important;
  box-shadow: 4px 4px 10px var(--neu-dark-shadow), -4px -4px 10px var(--neu-light-shadow) !important;
  outline: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
.swal2-cancel:hover {
  color: var(--text-dark) !important;
  transform: translateY(-1px) !important;
  box-shadow: 5px 5px 12px var(--neu-dark-shadow-deep), -4px -4px 10px var(--neu-light-shadow) !important;
}
.swal2-cancel:active,
.swal2-confirm:active {
  transform: translateY(1px) !important;
}

/* Neumorphic Input Fields in SweetAlert */
.swal2-input,
.swal2-textarea,
.swal2-select,
.swal2-file {
  background: var(--bg-eggshell) !important;
  border: 1px solid rgba(190, 180, 165, 0.45) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: inset 2px 2px 5px var(--neu-dark-shadow), inset -2px -2px 5px var(--neu-light-shadow) !important;
  color: var(--text-dark) !important;
  font-family: var(--font-sans) !important;
  font-size: 0.95rem !important;
  padding: 0.65rem 0.9rem !important;
  transition: all 0.15s ease !important;
}
.swal2-input:focus,
.swal2-textarea:focus,
.swal2-select:focus,
.swal2-file:focus {
  border-color: var(--accent-primary) !important;
  outline: none !important;
  box-shadow: inset 2px 2px 5px var(--neu-dark-shadow), inset -2px -2px 5px var(--neu-light-shadow), 0 0 0 3px rgba(0, 76, 102, 0.18) !important;
}

.swal2-timer-progress-bar {
  background: var(--accent-primary) !important;
  border-radius: var(--radius-sm) !important;
}

/* Neumorphic Toast Alerts */
.swal2-toast {
  background: var(--bg-eggshell-light) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 6px 6px 18px var(--neu-dark-shadow), -6px -6px 18px var(--neu-light-shadow) !important;
  border: 1px solid rgba(190, 180, 165, 0.45) !important;
  color: var(--text-dark) !important;
  padding: 0.75rem 1.1rem !important;
}
.swal2-toast .swal2-title {
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  color: var(--text-dark) !important;
  margin: 0 !important;
}
.swal2-toast .swal2-icon {
  width: 1.8rem !important;
  height: 1.8rem !important;
  min-width: 1.8rem !important;
  margin: 0 0.5rem 0 0 !important;
  box-shadow: none !important;
  border-width: 2px !important;
}

/* =========================================================================
   PROJECT-WIDE UNIFORM ROUNDING SYSTEM
   Harmonized Radii Across All Modals, Cards, Alerts, Badges & Success Info
   ========================================================================= */

/* All Modals */
.modal-content {
  border-radius: var(--radius-xl) !important;
  background: var(--bg-eggshell) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 16px 16px 36px var(--neu-dark-shadow), -16px -16px 36px var(--neu-light-shadow) !important;
  overflow: hidden;
}
.modal-header {
  border-bottom: 1px solid rgba(190, 180, 165, 0.3) !important;
  padding: 1.25rem 1.5rem !important;
  border-top-left-radius: var(--radius-xl) !important;
  border-top-right-radius: var(--radius-xl) !important;
}
.modal-footer {
  border-top: 1px solid rgba(190, 180, 165, 0.3) !important;
  padding: 1.25rem 1.5rem !important;
  border-bottom-left-radius: var(--radius-xl) !important;
  border-bottom-right-radius: var(--radius-xl) !important;
}
.modal-body {
  padding: 1.5rem !important;
}

/* Alerts System (Uniform --radius-md) */
.alert {
  border-radius: var(--radius-md) !important;
  font-family: var(--font-sans) !important;
  padding: 0.85rem 1.15rem !important;
  border-width: 1px !important;
  box-shadow: inset 2px 2px 5px var(--neu-dark-shadow), inset -2px -2px 5px #ffffff !important;
}
.alert-success {
  background: rgba(16, 185, 129, 0.09) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #065f46 !important;
}
.alert-info {
  background: rgba(0, 76, 102, 0.09) !important;
  border-color: rgba(0, 76, 102, 0.35) !important;
  color: var(--accent-primary) !important;
}
.alert-warning {
  background: rgba(245, 158, 11, 0.09) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #92400e !important;
}
.alert-danger {
  background: rgba(239, 68, 68, 0.09) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #991b1b !important;
}

/* Badges & Success Info Chips (Uniform --radius-sm) */
.badge,
.badge.bg-success,
.badge.bg-info,
.badge.bg-warning,
.badge.bg-danger,
.badge.bg-dark,
.badge.bg-primary {
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-mono) !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  padding: 0.45rem 0.75rem !important;
}
.badge.bg-success {
  background-color: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
  box-shadow: inset 1px 1px 2px rgba(21, 128, 61, 0.15) !important;
}
.badge.bg-warning {
  background-color: #fef3c7 !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
  box-shadow: inset 1px 1px 2px rgba(180, 83, 9, 0.15) !important;
}
.badge.bg-danger {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
  box-shadow: inset 1px 1px 2px rgba(185, 28, 28, 0.15) !important;
}
.badge.bg-info {
  background-color: rgba(0, 76, 102, 0.1) !important;
  color: var(--accent-primary) !important;
  border: 1px solid rgba(0, 76, 102, 0.25) !important;
  box-shadow: inset 1px 1px 2px rgba(0, 76, 102, 0.12) !important;
}
.badge.bg-dark {
  background-color: #121820 !important;
  color: #f8fafc !important;
  border: 1px solid #263342 !important;
}

/* Status Badges */
.status-badge {
  border-radius: var(--radius-sm) !important;
}

/* Cards & Modals Containers */
.card,
.card-neu,
.neu-card {
  border-radius: var(--radius-lg) !important;
}

/* Dropdowns */
.dropdown-menu {
  border-radius: var(--radius-md) !important;
  background: var(--bg-eggshell) !important;
  border: 1px solid rgba(190, 180, 165, 0.4) !important;
  box-shadow: 8px 8px 24px var(--neu-dark-shadow), -8px -8px 24px var(--neu-light-shadow) !important;
  padding: 0.45rem !important;
}
.dropdown-item {
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-sans) !important;
  transition: all 0.15s ease !important;
}
.dropdown-item:hover {
  background: var(--bg-eggshell-light) !important;
  color: var(--accent-primary) !important;
}

/* ==========================================================================
   PRINT ENGINE (@media print)
   Strict Millimeter Inkjet Feed Alignment with Dedicated Print Portal
   Zero-Slip Support for Brother DCP-T710W & Desktop Inkjets
   ========================================================================== */

/* On screen: print portal is completely hidden */
#checkcraft-print-portal {
  display: none !important;
}

@media print {
  @page {
    size: auto;
    margin: 0mm !important;
  }

  html, body {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    margin: 0mm !important;
    padding: 0mm !important;
    background: #ffffff !important;
    color: #000000 !important;
    overflow: hidden !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    page-break-after: avoid !important;
    page-break-before: avoid !important;
    page-break-inside: avoid !important;
    break-after: avoid !important;
    break-before: avoid !important;
    break-inside: avoid !important;
  }

  /* Completely collapse and remove all screen UI elements from document flow */
  body > *:not(#checkcraft-print-portal),
  #app-preloader,
  header,
  nav,
  main,
  footer,
  .app-header,
  .mobile-bottom-nav,
  .telemetry-ribbon,
  .specimen-header-card,
  .feed-direction-box,
  .compliance-badge,
  .canvas-bottom-bar,
  .app-viewport,
  .app-body,
  .app-footer,
  .app-ad-container,
  .app-ad-banner,
  .adsbygoogle,
  ins.adsbygoogle,
  iframe[id*="google_ads"],
  .modal,
  .modal-backdrop,
  .swal2-container,
  .toast-container,
  #writer-dynamic-fields-container,
  .canvas-ruler-container,
  .physical-check-plane {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    width: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
  }

  /* Expose ONLY the dedicated print portal directly anchored to body */
  #checkcraft-print-portal {
    display: block !important;
    visibility: visible !important;
    position: absolute !important;
    top: var(--print-feed-y-offset, 0mm) !important;
    left: var(--print-feed-x-offset, 0mm) !important;
    width: var(--print-check-w, 205mm) !important;
    height: var(--print-check-h, 76mm) !important;
    max-height: var(--print-check-h, 76mm) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    overflow: hidden !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    break-before: avoid !important;
    break-after: avoid !important;
    break-inside: avoid !important;
    transform: none !important;
  }

  #checkcraft-print-portal * {
    visibility: visible !important;
  }

  /* Test alignment mode specimen frame */
  #checkcraft-print-portal.test-alignment-mode {
    border: 1px dashed #004c66 !important;
    background: rgba(0, 76, 102, 0.02) !important;
  }

  #checkcraft-print-portal .check-field-box {
    position: absolute !important;
    border: none !important;
    background: transparent !important;
    color: #000000 !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 1mm !important;
    box-sizing: border-box !important;
    word-break: break-all !important;
  }

  /* Dotted outlines on fields during Test Alignment Print */
  #checkcraft-print-portal.test-alignment-mode .check-field-box {
    border: 1px dashed rgba(0, 76, 102, 0.6) !important;
    background: rgba(0, 76, 102, 0.04) !important;
  }

  /* Account Payee Only Watermark line during print */
  #checkcraft-print-portal .check-crossed-watermark {
    display: block !important;
    position: absolute !important;
    left: 8mm !important;
    top: 6mm !important;
    font-size: 8.5pt !important;
    font-weight: 800 !important;
    color: #000000 !important;
    border-top: 2px solid #000000 !important;
    border-bottom: 2px solid #000000 !important;
    padding: 2px 6px !important;
    letter-spacing: 1px !important;
    transform: rotate(-12deg) !important;
    white-space: nowrap !important;
  }

  /* Deposit Slip Mode Lengthwise 90-Degree Clockwise Feed (Inkjet Feeder Geometry) */
  #checkcraft-print-portal.slip-lengthwise-90-mode {
    width: var(--print-feed-slot-w, 100mm) !important;
    height: var(--print-feed-slot-h, 240mm) !important;
    max-height: var(--print-feed-slot-h, 240mm) !important;
    overflow: visible !important;
  }
  #checkcraft-print-portal.slip-lengthwise-90-mode .slip-print-rotator {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: var(--print-check-w, 240mm) !important;
    height: var(--print-check-h, 100mm) !important;
    transform-origin: 0 0 !important;
    -webkit-transform-origin: 0 0 !important;
    transform: translate(var(--print-check-h, 100mm), 0) rotate(90deg) !important;
    -webkit-transform: translate(var(--print-check-h, 100mm), 0) rotate(90deg) !important;
  }

  /* Deposit Slip Mode Lengthwise 270-Degree Counter-Clockwise Feed */
  #checkcraft-print-portal.slip-lengthwise-270-mode {
    width: var(--print-feed-slot-w, 100mm) !important;
    height: var(--print-feed-slot-h, 240mm) !important;
    max-height: var(--print-feed-slot-h, 240mm) !important;
    overflow: visible !important;
  }
  #checkcraft-print-portal.slip-lengthwise-270-mode .slip-print-rotator {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: var(--print-check-w, 240mm) !important;
    height: var(--print-check-h, 100mm) !important;
    transform-origin: 0 0 !important;
    -webkit-transform-origin: 0 0 !important;
    transform: translate(0, var(--print-check-w, 240mm)) rotate(-90deg) !important;
    -webkit-transform: translate(0, var(--print-check-w, 240mm)) rotate(-90deg) !important;
  }

  /* Deposit Slip Mode Standard Horizontal Feed */
  #checkcraft-print-portal.slip-horizontal-mode .slip-print-rotator {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: var(--print-check-w, 240mm) !important;
    height: var(--print-check-h, 100mm) !important;
    transform: none !important;
    -webkit-transform: none !important;
  }
}

/* =========================================================================
   Segmented Neumorphic Button Group (Date Style Selector)
   ========================================================================= */
.btn-neu-segmented {
  background: var(--bg-eggshell);
  border: 1px solid rgba(190, 180, 165, 0.4);
  color: var(--text-dark-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  user-select: none;
}
.btn-neu-segmented:hover {
  background: var(--bg-eggshell-light);
  color: var(--accent-primary);
  border-color: rgba(0, 76, 102, 0.3);
}
.btn-neu-segmented.active {
  background: var(--accent-primary) !important;
  color: #ffffff !important;
  border-color: var(--accent-primary) !important;
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.35) !important;
}
.btn-neu-segmented:first-child {
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}
.btn-neu-segmented:last-child {
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

/* =========================================================================
   Social Authentication & Onboarding Wizard Styling
   ========================================================================= */
.neu-social-btn {
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 3px 3px 8px var(--neu-dark-shadow), -3px -3px 8px var(--neu-light-shadow);
  cursor: pointer;
}
.neu-social-btn:hover {
  transform: translateY(-1px);
  box-shadow: 4px 4px 12px var(--neu-dark-shadow), -4px -4px 12px var(--neu-light-shadow);
}
.neu-social-btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.neu-radio-card {
  transition: all 0.2s ease-in-out;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.03);
}
.neu-radio-card:hover {
  background: #fdfdfd !important;
  transform: translateY(-1px);
}
.neu-radio-card.active {
  border-color: var(--accent-primary) !important;
  background: rgba(0, 76, 102, 0.03) !important;
  box-shadow: 0 4px 12px rgba(0, 76, 102, 0.1) !important;
}

/* =========================================================================
   DEPOSIT SLIP MODULE STYLING (Optical Plane & Dynamic Composition)
   ========================================================================= */
.physical-slip-plane {
  position: relative;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 6px 6px 18px rgba(0, 0, 0, 0.12), 0 0 0 1px #d5cfc1;
  overflow: hidden;
  user-select: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  transform-origin: center center;
}

.physical-slip-plane.is-rotated-lengthwise {
  transform: rotate(90deg) scale(0.92);
  box-shadow: 8px 8px 24px rgba(0, 76, 102, 0.2), 0 0 0 2px var(--accent-primary);
}

.slip-security-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  pointer-events: none;
  z-index: 1;
}

.slip-scan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 0.45;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease;
}

#slip-dynamic-fields-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.slip-canvas-field-box {
  position: absolute;
  pointer-events: auto;
  border: 1px dashed rgba(0, 76, 102, 0.35);
  background: rgba(0, 76, 102, 0.04);
  color: #0f172a;
  font-weight: 700;
  padding: 0 4px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  font-size: 12px;
  line-height: 1.2;
  border-radius: 2px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.slip-canvas-field-box:hover,
.slip-canvas-field-box.active {
  border: 1.5px solid var(--accent-primary);
  background: rgba(0, 76, 102, 0.1);
}

.slip-check-row-card {
  background: #fbf9f5;
  border: 1px solid rgba(190, 180, 165, 0.45);
  border-radius: 10px;
  padding: 8px 10px;
  transition: all 0.2s ease;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.02);
}

.slip-check-row-card:hover {
  border-color: rgba(0, 76, 102, 0.35);
  background: #ffffff;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.04);
}

.slip-check-row-card .row-number-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 76, 102, 0.1);
  color: var(--accent-primary);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}



