/* ========================================================
   JustGooStudio v2.0.8 - AI Passport Photo Studio Stylesheet
   ======================================================== */

:root {
  --bg-deep: #080d12;
  --bg-main: #0c131a;
  --bg-panel: #111a22;
  --bg-card: #15222c;
  --bg-card-hover: #1a2a37;
  --bg-input: #0e171f;

  --border-subtle: #1c2b36;
  --border-card: #233544;
  --border-hover: #334b5f;

  --accent-orange: #ff7315;
  --accent-orange-hover: #ff8833;
  --accent-orange-glow: rgba(255, 115, 21, 0.25);
  --accent-blue: #0284c7;
  --accent-green: #10b981;
  --accent-purple: #818cf8;

  --text-white: #ffffff;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dark: #0f172a;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body.studio-dark-theme {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 13.5px;
  line-height: 1.45;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #253949;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #3b556b;
}

/* Utility Hidden */
.hidden {
  display: none !important;
}

/* ========================================================
   HEADER / TOP NAVBAR
   ======================================================== */
.app-header {
  height: 56px;
  background-color: var(--bg-main);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: relative;
  z-index: 100;
}

/* Brand */
.header-left {
  display: flex;
  align-items: center;
}
.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: var(--transition);
}
.brand-logo-link:hover {
  opacity: 0.92;
  transform: translateY(-0.5px);
}
.main-brand-logo-img {
  height: 30px;
  width: auto;
  max-width: 195px;
  object-fit: contain;
  display: block;
}
.brand-text-group {
  display: flex;
  flex-direction: column;
}
.brand-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.version-badge {
  font-size: 10px;
  font-weight: 600;
  background-color: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(2, 132, 199, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
}
.user-sub-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent-orange);
  margin-top: -2px;
}
.user-sub-badge span {
  color: #fdba74;
  font-weight: 500;
}

/* Header Center Search / Switcher */
.header-center {
  flex: 1;
  max-width: 480px;
  margin: 0 20px;
}
.studio-selector-bar {
  display: flex;
  align-items: center;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.studio-selector-bar:hover {
  border-color: var(--border-card);
  background-color: var(--bg-card);
}
.search-icon {
  color: var(--text-muted);
}
.studio-pill-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: rgba(255, 115, 21, 0.15);
  border: 1px solid rgba(255, 115, 21, 0.25);
  color: var(--accent-orange);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}
.studio-search-input-wrap {
  flex: 1;
  font-size: 12px;
  color: var(--text-muted);
}
.blinking-cursor {
  color: var(--accent-orange);
  font-weight: bold;
  animation: blink 1s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.chevron-icon {
  color: var(--text-muted);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.security-status-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  color: var(--accent-green);
}
.security-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.sec-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.sec-subtitle {
  font-size: 9px;
  color: #6ee7b7;
}
.trial-pill-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(2, 132, 199, 0.3);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.icon-nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-nav-btn:hover {
  background-color: var(--bg-card);
  color: var(--accent-orange);
}
.user-avatar-pill {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid var(--accent-orange);
  cursor: pointer;
}
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================================
   MAIN 3-COLUMN STUDIO LAYOUT
   ======================================================== */
.studio-layout {
  display: grid;
  grid-template-columns: 280px 1fr 340px;
  height: calc(100vh - 56px);
  background-color: var(--bg-deep);
  overflow: hidden;
}

.studio-col {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.studio-col-left {
  background-color: var(--bg-main);
  border-right: 1px solid var(--border-subtle);
  padding: 12px 14px;
}

.studio-col-center {
  background-color: var(--bg-deep);
  display: flex;
  flex-direction: column;
  position: relative;
}

.studio-col-right {
  background-color: var(--bg-main);
  border-left: 1px solid var(--border-subtle);
  padding: 12px 14px;
  overflow-y: auto;
}

/* Common Header Row */
.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.panel-title-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-orange);
}
.panel-main-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #fff;
}
.panel-sub-count {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: -2px;
}
.header-action-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}
.small-icon-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.small-icon-btn:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}
.phone-qr-pill-btn {
  background: linear-gradient(135deg, rgba(255, 115, 21, 0.15) 0%, rgba(255, 115, 21, 0.25) 100%);
  border: 1px solid rgba(255, 115, 21, 0.4);
  color: var(--accent-orange);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: var(--transition);
}
.phone-qr-pill-btn:hover {
  background-color: var(--accent-orange);
  color: #fff;
}

/* ========================================================
   COLUMN 1: PRESET SELECTION
   ======================================================== */
.preset-section-container {
  margin-bottom: 12px;
  position: relative;
}
.preset-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.preset-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-orange);
}
.preset-dimension-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}
.custom-select-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}
.custom-select-card:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-card);
}
.select-card-content {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}
.select-flag-icon {
  color: var(--accent-orange);
  flex-shrink: 0;
}
.select-card-texts {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.preset-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preset-description {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropdown-chevron {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
}

/* Preset Dropdown Menu */
.preset-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  margin-top: 4px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.preset-dropdown-menu.show {
  display: block;
}
.preset-menu-item {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}
.preset-menu-item:last-child {
  border-bottom: none;
}
.preset-menu-item:hover, .preset-menu-item.active {
  background-color: var(--bg-card);
}
.preset-menu-item.active .item-title {
  color: var(--accent-orange);
}
.item-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
}
.item-desc {
  font-size: 9.5px;
  color: var(--text-muted);
}

/* ========================================================
   COLUMN 1: EMPTY UPLOAD STATE (Screenshot 1)
   ======================================================== */
.queue-empty-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.upload-dropzone-card {
  border: 1.5px dashed var(--border-card);
  background-color: rgba(17, 26, 34, 0.4);
  border-radius: var(--radius-lg);
  padding: 30px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition);
}
.upload-dropzone-card.drag-over {
  border-color: var(--accent-orange);
  background-color: rgba(255, 115, 21, 0.05);
}
.device-phone-icon {
  width: 52px;
  height: 52px;
  background-color: rgba(255, 115, 21, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-orange);
  margin-bottom: 14px;
}
.upload-headline {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.upload-subtext {
  font-size: 11px;
  color: var(--text-muted);
  max-width: 200px;
  margin-bottom: 18px;
}
.upload-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.demo-samples-bar {
  margin-top: 18px;
  width: 100%;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}
.sample-label {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}
.demo-chips {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.demo-chip-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}
.demo-chip-btn:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

/* ========================================================
   COLUMN 1: POPULATED QUEUE LIST (Screenshot 2)
   ======================================================== */
.queue-list-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.queue-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}
.custom-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
  cursor: pointer;
}
.custom-checkbox-label input[type="checkbox"] {
  display: none;
}
.custom-chk-box {
  width: 15px;
  height: 15px;
  border: 1px solid var(--accent-orange);
  background-color: var(--accent-orange);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: var(--transition);
}
.custom-checkbox-label input[type="checkbox"]:not(:checked) + .custom-chk-box {
  background-color: transparent;
  border-color: var(--border-card);
  color: transparent;
}
.clear-queue-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition);
}
.clear-queue-btn:hover {
  background-color: rgba(239, 68, 68, 0.15);
}
.queue-items-scroll-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 2px;
}
.queue-item-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.queue-item-card:hover {
  border-color: var(--border-hover);
}
.queue-item-card.active {
  border-color: var(--accent-orange);
  background-color: rgba(255, 115, 21, 0.08);
}
.queue-item-thumb {
  width: 34px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.queue-item-details {
  flex: 1;
  overflow: hidden;
}
.queue-filename {
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-filesize {
  font-size: 10px;
  color: var(--text-muted);
}
.queue-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}
.queue-delete-btn:hover {
  color: #ef4444;
  background-color: rgba(239, 68, 68, 0.1);
}
.queue-bottom-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

/* Column 1 Bottom Footer Status */
.col-footer-status {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-status-icon {
  color: var(--accent-orange);
}
.footer-status-texts {
  display: flex;
  flex-direction: column;
}
.status-primary-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.status-secondary-info {
  font-size: 9.5px;
  color: var(--text-muted);
}

/* ========================================================
   BUTTONS (Buttons used across the app)
   ======================================================== */
.primary-orange-btn {
  background: linear-gradient(135deg, #ff7315 0%, #ea580c 100%);
  color: #fff;
  border: none;
  font-family: var(--font-family);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px var(--accent-orange-glow);
}
.primary-orange-btn:hover {
  background: linear-gradient(135deg, #ff8833 0%, #f97316 100%);
  box-shadow: 0 4px 14px rgba(255, 115, 21, 0.4);
  transform: translateY(-1px);
}
.primary-orange-btn:active {
  transform: translateY(0);
}

.dark-pill-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.dark-pill-btn:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: #fff;
}
.full-w {
  width: 100%;
}

/* ========================================================
   COLUMN 2: CENTER WORKSPACE CANVAS
   ======================================================== */
.workspace-top-bar {
  height: 42px;
  background-color: rgba(12, 19, 26, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
}
.ws-preset-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}
.ws-preset-tag svg {
  color: var(--accent-orange);
}
.ws-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ws-tool-btn {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: var(--transition);
}
.ws-tool-btn:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  background-color: var(--bg-card);
}
.zoom-pill-controls {
  display: flex;
  align-items: center;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 2px 6px;
  gap: 4px;
}
.zoom-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: bold;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 12px;
}
.zoom-btn:hover {
  color: #fff;
}
.zoom-level-text {
  font-size: 10.5px;
  color: var(--text-muted);
  min-width: 32px;
  text-align: center;
}

/* Workspace Viewport Stage */
.workspace-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #090e13;
  background-image: radial-gradient(#15222e 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Empty Workspace Prompt */
.workspace-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
}
.empty-camera-circle {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 115, 21, 0.1);
  border: 1.5px dashed var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-orange);
  margin-bottom: 16px;
}
.ws-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.ws-empty-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 320px;
}

/* Interactive Crop Stage (Screenshot 2) */
.crop-stage-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  user-select: none;
}
.crop-image-layer-wrapper {
  position: relative;
  display: inline-block;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}
.crop-source-img {
  max-width: 70vw;
  max-height: 65vh;
  display: block;
  pointer-events: none;
  border-radius: 4px;
}

/* Draggable & Resizable Interactive Crop Box */
.crop-box {
  position: absolute;
  border: 2px solid var(--accent-orange);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  cursor: move;
  touch-action: none;
  z-index: 10;
}

/* Top-Left Dimension Pill Badge on Crop Frame */
.crop-badge-pill {
  position: absolute;
  top: 6px;
  left: 6px;
  background-color: var(--accent-orange);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 15;
}

/* Rule of Thirds & Passport Face Guides */
.crop-grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.grid-line-h {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
}
.grid-line-h.h-1 { top: 33.333%; }
.grid-line-h.h-2 { top: 66.666%; }
.grid-line-v {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.25);
}
.grid-line-v.v-1 { left: 33.333%; }
.grid-line-v.v-2 { left: 66.666%; }

/* Biometric Passport Head/Eye/Chin Guides */
.passport-face-guides {
  position: absolute;
  inset: 0;
}
.guide-crown {
  position: absolute;
  top: 14%;
  left: 15%;
  right: 15%;
  height: 1px;
  border-top: 1px dashed rgba(255, 115, 21, 0.5);
}
.guide-eyes {
  position: absolute;
  top: 42%;
  left: 15%;
  right: 15%;
  height: 1px;
  border-top: 1px dashed rgba(56, 189, 248, 0.6);
}
.guide-chin {
  position: absolute;
  top: 75%;
  left: 20%;
  right: 20%;
  height: 1px;
  border-top: 1px dashed rgba(255, 115, 21, 0.5);
}

/* Crop Handles (Exact styling from Screenshot 2) */
.crop-handle {
  position: absolute;
  background-color: #ffffff;
  border: 2px solid var(--accent-orange);
  z-index: 20;
}
/* Corner handles: round circles */
.crop-handle.handle-nw,
.crop-handle.handle-ne,
.crop-handle.handle-sw,
.crop-handle.handle-se {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.crop-handle.handle-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.crop-handle.handle-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.crop-handle.handle-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.crop-handle.handle-se { bottom: -6px; right: -6px; cursor: nwse-resize; }

/* Side handles: rounded pill bars */
.crop-handle.handle-n,
.crop-handle.handle-s {
  width: 24px;
  height: 8px;
  border-radius: 4px;
  left: 50%;
  transform: translateX(-50%);
}
.crop-handle.handle-n { top: -5px; cursor: ns-resize; }
.crop-handle.handle-s { bottom: -5px; cursor: ns-resize; }

.crop-handle.handle-w,
.crop-handle.handle-e {
  width: 8px;
  height: 24px;
  border-radius: 4px;
  top: 50%;
  transform: translateY(-50%);
}
.crop-handle.handle-w { left: -5px; cursor: ew-resize; }
.crop-handle.handle-e { right: -5px; cursor: ew-resize; }

/* Bottom Workspace Bar */
.workspace-bottom-bar {
  height: 52px;
  background-color: var(--bg-main);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 20px;
}
.print-cta-btn {
  padding: 9px 24px;
  font-size: 13.5px;
}

/* ========================================================
   COLUMN 3: RIGHT SIDEBAR INSPECTOR
   ======================================================== */
.sparkle-accent-icon {
  color: var(--accent-orange);
}
.hold-compare-btn {
  background-color: rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(2, 132, 199, 0.3);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: var(--transition);
}
.hold-compare-btn:hover {
  background-color: #0284c7;
  color: #fff;
}
.hold-compare-btn.active-holding {
  background-color: #0284c7;
  color: #fff;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.5);
}

/* Live Preview Card */
.live-preview-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}
.preview-empty-state {
  width: 100%;
}
.preview-dashed-frame {
  border: 1.5px dashed var(--border-card);
  border-radius: 8px;
  padding: 40px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
}
.preview-empty-text {
  font-size: 11px;
}

/* Active Preview Canvas Wrapper */
.preview-active-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.photo-render-frame {
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  display: inline-block;
  background-color: #ffffff;
  transition: border 0.15s ease;
}
#outputPreviewCanvas {
  display: block;
  max-height: 200px;
  width: auto;
  border-radius: 1px;
}
#compareCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.compare-hidden {
  opacity: 0;
  pointer-events: none;
}

/* AI Cutout Processing Overlay (Screenshot 3) */
.ai-processing-overlay {
  position: absolute;
  inset: -12px;
  background-color: rgba(17, 26, 34, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  border-radius: var(--radius-md);
}
.spinner-circle-pulse {
  color: var(--accent-orange);
  margin-bottom: 12px;
}
.rotating-loader-svg {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  100% { transform: rotate(360deg); }
}
.proc-text-headline {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.proc-percentage-badge {
  background-color: rgba(255, 115, 21, 0.18);
  border: 1px solid rgba(255, 115, 21, 0.4);
  color: #fdba74;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}
.proc-percentage-badge span {
  color: var(--accent-orange);
  font-weight: 700;
}

/* Inspector Tool Accordion Cards */
.inspector-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  padding: 10px 12px;
  transition: var(--transition);
}
.card-header-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
}
.tool-icon-orange {
  color: var(--accent-orange);
}
.enhance-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Modern iOS-Style Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 19px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #273746;
  border-radius: 20px;
  transition: 0.25s;
}
.toggle-slider::before {
  position: absolute;
  content: "";
  height: 13px;
  width: 13px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: 0.25s;
}
.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-orange);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(15px);
}

.card-collapsible-content {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

/* Background Replacement Controls (Screenshot 4) */
.bg-action-btn-wrap {
  margin-top: 4px;
}
.remove-bg-btn {
  padding: 9px;
  font-size: 12.5px;
}
.swatches-palette-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.swatches-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.swatch-btn {
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  outline: none;
}
.swatch-btn:hover {
  transform: scale(1.1);
}
.swatch-btn.active {
  box-shadow: 0 0 0 2px var(--accent-orange), 0 0 6px var(--accent-orange-glow);
  transform: scale(1.05);
}
.eyedropper-btn {
  background-color: var(--accent-orange);
  color: #fff;
}
.bg-gradient-options-row {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.mini-chip-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  flex: 1;
  text-align: center;
  transition: var(--transition);
}
.mini-chip-btn:hover, .mini-chip-btn.active {
  border-color: var(--accent-orange);
  color: #fff;
  background-color: rgba(255, 115, 21, 0.15);
}

/* Enhancement Mode Pills: LOW, MED, HIGH */
.mode-pills-group {
  display: flex;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1px;
}
.mode-pill {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: var(--transition);
}
.mode-pill.active {
  background-color: var(--accent-orange);
  color: #fff;
}

/* Enhancement Preset Filter Buttons (Screenshot 4) */
.filter-presets-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}
.filter-preset-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 9.5px;
  cursor: pointer;
  transition: var(--transition);
}
.filter-preset-btn:hover {
  border-color: var(--border-hover);
  color: #fff;
}
.filter-preset-btn.active {
  border-color: var(--accent-orange);
  background-color: rgba(255, 115, 21, 0.12);
  color: #fff;
}

/* Range Sliders with custom thumb & tracks (Screenshot 4) */
.slider-control-group {
  margin-bottom: 10px;
}
.slider-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.slider-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-secondary);
}
.slider-val-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}
.custom-range-slider {
  width: 100%;
  height: 5px;
  border-radius: 3px;
  appearance: none;
  background-color: #20313f;
  outline: none;
}
.custom-range-slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
}
.custom-range-slider.orange-track::-webkit-slider-thumb {
  background-color: var(--accent-orange);
}
.custom-range-slider.blue-track::-webkit-slider-thumb {
  background-color: var(--accent-blue);
}
.custom-range-slider.purple-track::-webkit-slider-thumb {
  background-color: var(--accent-purple);
}

/* Border Controls */
.border-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.control-sublabel {
  font-size: 11px;
  color: var(--text-muted);
}
.border-width-pills, .border-color-chips {
  display: flex;
  gap: 5px;
}
.chip-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
}
.chip-btn.active {
  border-color: var(--accent-orange);
  color: #fff;
  background-color: rgba(255, 115, 21, 0.15);
}
.border-color-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
}
.border-color-circle.active {
  border-color: var(--accent-orange);
  transform: scale(1.15);
}
.mt-2 {
  margin-top: 8px;
}

/* ========================================================
   MODAL 1: PRINT PASSPORT PHOTO SHEET (Screenshot 5)
   ======================================================== */
.modal-backdrop-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(3, 7, 10, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.print-modal-container {
  background-color: #0d151c;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 95vw;
  max-width: 1080px;
  height: 90vh;
  max-height: 820px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

/* Modal Header */
.modal-header-row {
  height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-main);
}
.modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-printer-badge {
  width: 36px;
  height: 36px;
  background-color: rgba(255, 115, 21, 0.12);
  border: 1px solid rgba(255, 115, 21, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-orange);
}
.modal-header-titles {
  display: flex;
  flex-direction: column;
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.modal-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}
.modal-close-x-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close-x-btn:hover {
  background-color: var(--bg-card);
  color: #fff;
}

/* Modal Columns */
.modal-body-columns {
  flex: 1;
  display: grid;
  grid-template-columns: 360px 1fr;
  overflow: hidden;
}

/* Left Configuration */
.modal-col-config {
  background-color: var(--bg-main);
  border-right: 1px solid var(--border-subtle);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
.config-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.paper-formats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.paper-format-card {
  background-color: var(--bg-panel);
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.paper-format-card:hover {
  border-color: var(--border-hover);
}
.paper-format-card.active {
  border-color: var(--accent-orange);
  background-color: rgba(255, 115, 21, 0.15);
}
.format-card-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
}
.paper-format-card.active .format-card-title {
  color: var(--accent-orange);
}
.format-card-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Copies Item Card */
.copies-item-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.copies-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.copies-thumb-img {
  width: 32px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}
.copies-info {
  display: flex;
  flex-direction: column;
}
.copies-filename {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}
.copies-count-label {
  font-size: 10.5px;
  color: var(--text-muted);
}
.copies-stepper-control {
  display: flex;
  align-items: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
}
.step-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  width: 26px;
  height: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}
.step-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--accent-orange);
}
.copies-number-input {
  width: 36px;
  text-align: center;
  background: none;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  outline: none;
}
.quick-preset-chips {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.quick-chip {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  flex: 1;
}
.quick-chip:hover, .quick-chip.active {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  background-color: rgba(255, 115, 21, 0.1);
}

/* Sheet Capacity Progress Bar (Screenshot 5) */
.sheet-capacity-container {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.capacity-labels-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.capacity-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.capacity-count {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-orange);
}
.capacity-progress-track {
  width: 100%;
  height: 7px;
  background-color: #1e2c38;
  border-radius: 4px;
  overflow: hidden;
}
.capacity-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff7315 0%, #f97316 100%);
  border-radius: 4px;
  box-shadow: 0 0 10px var(--accent-orange-glow);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal Action Footer */
.modal-footer-action-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.print-cta-action {
  flex: 1;
  padding: 10px;
}

/* Right Live Print Sheet Preview (Screenshot 5) */
.modal-col-preview {
  background-color: #080d12;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  overflow: hidden;
}
.preview-header-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.paper-simulation-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 10px;
}

/* Realistic White Photo Paper simulation */
.sheet-paper-element {
  background-color: #ffffff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 24px;
  transition: var(--transition);
  position: relative;
}
.sheet-paper-element.a4-aspect {
  width: 440px;
  height: 622px; /* A4 aspect ratio 1:1.414 */
}
.sheet-paper-element.photo-4x6-aspect {
  width: 540px;
  height: 360px; /* 4x6 aspect ratio 3:2 landscape or 2:3 portrait */
}

/* Photos Grid on Paper */
.sheet-photos-grid {
  display: grid;
  gap: 8px;
  width: 100%;
  height: 100%;
}
.sheet-photos-grid.grid-cols-6 {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(7, 1fr);
}
.sheet-photos-grid.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(7, 1fr);
}
.sheet-photos-grid.grid-4x6 {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.sheet-photo-tile {
  background-color: #fff;
  border: 1px solid #000;
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  display: flex;
}
.sheet-photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Optional Cutting Marks */
.sheet-photo-tile.with-cutting-marks::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px dashed #cbd5e1;
  pointer-events: none;
}

/* ========================================================
   MODAL 2: WEBCAM CAMERA MODAL
   ======================================================== */
.webcam-modal-container, .qr-modal-container {
  background-color: #0d151c;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 90vw;
  max-width: 580px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.webcam-viewport-wrap {
  position: relative;
  background-color: #000;
  width: 100%;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#webcamVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Mirror camera */
}
.camera-biometric-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.face-oval-stencil {
  width: 180px;
  height: 240px;
  border: 2px dashed rgba(255, 115, 21, 0.85);
  border-radius: 50% 50% 48% 48%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
}
.eye-guide-line {
  position: absolute;
  top: 42%;
  width: 140px;
  border-top: 1.5px dashed rgba(56, 189, 248, 0.7);
}
.camera-hint-text {
  position: absolute;
  bottom: 14px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}
.camera-countdown {
  position: absolute;
  font-size: 80px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 20px var(--accent-orange);
  animation: pulseCount 0.9s infinite;
}
@keyframes pulseCount {
  0% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.3; }
}
.camera-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background-color: var(--bg-main);
  border-top: 1px solid var(--border-subtle);
}
.capture-btn {
  padding: 10px 24px;
}

/* ========================================================
   MODAL 3: QR CODE PHONE SYNC
   ======================================================== */
.qr-content-body {
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: center;
}
.qr-code-box {
  background-color: #fff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.qr-instructions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qr-instructions h4 {
  font-size: 14px;
  color: #fff;
}
.qr-instructions p {
  font-size: 12px;
  color: var(--text-muted);
}
.qr-url-pill {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-orange);
}
.copy-url-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
}
.qr-instant-test {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

/* ========================================================
   PRINT-ONLY STYLES (Exact 100% Physical Print Calibration)
   ======================================================== */
@media screen {
  .print-only-sheet {
    display: none !important;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 3mm;
  }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body * {
    visibility: hidden;
  }

  .print-only-sheet, .print-only-sheet * {
    visibility: visible;
  }

  .print-only-sheet {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 6mm 0 0 0 !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    page-break-inside: avoid !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    break-inside: avoid !important;
    break-after: avoid !important;
    overflow: hidden !important;
  }

  .print-grid-container {
    display: grid !important;
    justify-content: center !important;
    align-content: start !important;
    margin: 0 auto !important;
    page-break-inside: avoid !important;
    page-break-after: avoid !important;
    break-inside: avoid !important;
    break-after: avoid !important;
  }

  .print-photo-item {
    border: 0.2mm solid #000000 !important;
    box-sizing: border-box !important;
    page-break-inside: avoid !important;
    page-break-after: avoid !important;
    break-inside: avoid !important;
    break-after: avoid !important;
    overflow: hidden !important;
    display: block !important;
  }

  .print-photo-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }
}
