/* ==========================================================================
   자반고래밥 현장용 재고 LOT 관리 시스템 스타일시트
   디자인 테마: 딥 오션 네이비 & 에메랄드 테크 다크모드 (모바일 터치 퍼스트)
   ========================================================================== */

:root {
  --bg-primary: #0a101d;
  --bg-secondary: #121c2e;
  --bg-card: rgba(22, 33, 53, 0.85);
  --bg-card-hover: rgba(30, 45, 72, 0.95);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-active: #06b6d4;
  
  --text-main: #f1f5f9;
  --text-sub: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-blue: #3b82f6;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Malgun Gothic", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 90px; /* 모바일 하단 탭 여백 */
  overflow-x: hidden;
}

/* 상단 글로벌 헤더 */
.app-header {
  background: rgba(10, 16, 29, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 18px;
}

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

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.app-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-title span {
  color: var(--accent-cyan);
}

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

.btn-icon {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-icon:hover {
  color: #fff;
  border-color: var(--text-sub);
}

/* 작업자 6인 원터치 셀렉터 바 */
.operator-bar-container {
  background: rgba(18, 28, 46, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.operator-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-sub);
}

.active-operator-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 12px;
}

.active-indicator {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.operator-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.operator-chips::-webkit-scrollbar {
  display: none;
}

.operator-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.operator-chip:hover {
  border-color: var(--accent-cyan);
  color: #fff;
}

.operator-chip.active {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  border-color: #34d399;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

/* 메인 컨테이너 */
.app-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

/* 탭 페이지 전환 */
.tab-content {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 통계 배너 */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), transparent);
}

.stat-card.emerald::before {
  background: linear-gradient(90deg, var(--accent-emerald), transparent);
}

.stat-card.amber::before {
  background: linear-gradient(90deg, var(--accent-amber), transparent);
}

.stat-label {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.stat-unit {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

/* 필터 및 검색 바 */
.toolbar-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.group-filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-btn.active, .filter-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
}

/* 유사코드 그룹 아코디언 카드 */
.group-section {
  margin-bottom: 24px;
}

.group-header {
  background: linear-gradient(90deg, rgba(30, 45, 72, 0.8), rgba(22, 33, 53, 0.4));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.group-header:hover {
  border-color: var(--accent-cyan);
}

.group-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.group-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.group-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.group-desc {
  font-size: 12px;
  color: var(--text-sub);
}

.group-summary-badge {
  text-align: right;
}

.group-total-boxes {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.group-total-weight {
  font-size: 12px;
  color: var(--text-muted);
}

/* 유사코드 서브 품목 그리드 */
.product-sub-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.product-sub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: border-color 0.2s;
}

.product-sub-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.product-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.product-code-tag {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-right: 6px;
}

.product-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.product-spec-badge {
  font-size: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
}

/* LOT 카드 목록 */
.lots-grid, .lot-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
}

.lot-card {
  background: rgba(18, 28, 46, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.lot-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
}

.lot-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.lot-num-title {
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.3px;
  font-family: monospace;
}

.lot-sub-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.lot-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lot-creator {
  font-size: 11px;
  color: var(--text-muted);
}

.lot-details-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(10, 16, 29, 0.5);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  margin-top: 4px;
}

.lot-detail-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  color: var(--text-muted);
  font-size: 10px;
}

.detail-value {
  color: #f1f5f9;
  font-weight: 600;
}

.lot-notes-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 11px;
  color: #fcd34d;
  margin-top: 6px;
}

/* 4종 사진 미니 썸네일 바 (가로 4분할 한 줄 배치, 높이 58px 제한) */
.photo-strip, .lot-photos-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 6px !important;
  margin: 8px 0 !important;
}

.photo-thumb {
  position: relative;
  width: 100%;
  height: 58px !important;
  max-height: 58px !important;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
  cursor: pointer;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.photo-thumb:hover img {
  transform: scale(1.08);
}

.photo-thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.75);
  font-size: 9px;
  color: #cbd5e1;
  text-align: center;
  padding: 1px 0;
  font-weight: 600;
  white-space: nowrap;
}

/* 재고 잔량 정보 */
.lot-stock-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: 8px 0;
}

.stock-boxes {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.stock-weight {
  font-size: 13px;
  color: var(--accent-cyan);
}

.lot-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 12px;
}

/* LOT 액션 버튼 그룹 */
.lot-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #fff;
  border: none;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #0891b2);
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-sub);
  border: 1px solid var(--border-color);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  color: #fff;
  border-color: var(--text-sub);
}

.btn-emerald {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-emerald:hover {
  background: linear-gradient(135deg, #047857, #059669);
}

/* ==========================================================================
   폼 레이아웃 (입고 등록 & 출고 차감)
   ========================================================================== */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.form-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.form-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.form-subtitle {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.form-label span.req {
  color: var(--accent-rose);
  margin-left: 2px;
}

.form-control, .form-select {
  width: 100%;
  background: rgba(10, 16, 29, 0.9);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* 4종 사진 업로드 전용 슬롯 UI (컴팩트 가로 4분할 바) */
.photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.photo-upload-guide {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11.5px;
  color: #bae6fd;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.photo-upload-guide strong {
  color: #38bdf8;
}

.photo-mode-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-pill {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-pill.active {
  background: rgba(6, 182, 212, 0.2);
  border-color: #06b6d4;
  color: #38bdf8;
}

@media (min-width: 640px) {
  .photo-upload-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.photo-slot {
  background: rgba(10, 16, 29, 0.75);
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
  min-height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.photo-slot:hover {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.05);
}

.photo-slot.filled {
  border-style: solid;
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.photo-slot-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 2;
}

.photo-slot-icon {
  font-size: 18px;
  line-height: 1;
  color: var(--text-sub);
}

.photo-slot-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.photo-slot-hint {
  font-size: 9.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.photo-slot-actions {
  display: flex;
  gap: 4px;
  width: 100%;
  margin-top: 6px;
  justify-content: center;
  z-index: 5;
}

.btn-slot-choice {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-slot-album {
  background: rgba(2, 132, 199, 0.25);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.btn-slot-album:hover {
  background: rgba(2, 132, 199, 0.5);
  color: #ffffff;
}

.btn-slot-camera {
  background: rgba(51, 65, 85, 0.6);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.btn-slot-camera:hover {
  background: rgba(71, 85, 105, 0.8);
  color: #ffffff;
}

.photo-slot-preview {
  display: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  z-index: 1;
}

.photo-slot-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-slot.filled .photo-slot-preview {
  display: block;
}

.photo-slot.filled .photo-slot-body {
  opacity: 0;
  pointer-events: none;
}

.photo-slot-meta {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  font-size: 10.5px;
  color: #34d399;
  padding: 4px 6px;
  font-weight: 600;
  align-items: center;
  justify-content: space-between;
  z-index: 6;
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

.photo-slot.filled .photo-slot-meta {
  display: flex;
}

.btn-reselect {
  background: rgba(56, 189, 248, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-reselect:hover {
  background: rgba(56, 189, 248, 0.5);
  color: #fff;
}

/* 정정 모달 사진 변경 버튼 */
.edit-photo-actions {
  display: flex;
  gap: 5px;
  margin-top: 6px;
  width: 100%;
}

.btn-edit-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 4px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-edit-action.btn-album {
  background: rgba(2, 132, 199, 0.25);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.btn-edit-action.btn-album:hover {
  background: rgba(2, 132, 199, 0.45);
  color: #ffffff;
}

.btn-edit-action.btn-camera {
  background: rgba(51, 65, 85, 0.6);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.btn-edit-action.btn-camera:hover {
  background: rgba(71, 85, 105, 0.8);
  color: #ffffff;
}

/* 출고 차감 전용 현물 대조 뷰어 (컴팩트 썸네일) */
.verification-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 18px;
}

.verification-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.verification-title h4 {
  font-size: 14px;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

.verification-photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 6px;
}

.v-photo-card {
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  height: 60px !important;
  max-height: 60px !important;
  position: relative;
  cursor: pointer;
}

.v-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v-photo-card span {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.75);
  font-size: 9px;
  color: #fff;
  text-align: center;
  padding: 1px 0;
  font-weight: 600;
}

.verification-check {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.1);
  padding: 10px;
  border-radius: var(--radius-sm);
  color: #38bdf8;
  font-size: 13px;
  font-weight: 500;
}

.verification-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-cyan);
}

/* ==========================================================================
   작업 감사 이력 (Audit History) 타임라인
   ========================================================================== */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.history-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.history-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.history-badge.inbound {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.history-badge.haedong {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.history-badge.susi {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.history-badge.switch {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.history-operator {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.history-details {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 3px;
}

.history-time {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ==========================================================================
   고객 상세페이지 공개 위젯 미리보기
   ========================================================================== */
.customer-preview-box {
  background: #ffffff;
  color: #1e293b;
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.customer-preview-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cp-header {
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cp-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.cp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9999px;
  letter-spacing: -0.3px;
}

.cp-badge.public {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.cp-badge.internal {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.cp-header-date {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.cp-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  letter-spacing: -0.5px;
}

.cp-subtitle {
  font-size: 12.5px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cp-subtitle strong {
  color: #0f172a;
}

.cp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 6px 0;
}

@media (max-width: 580px) {
  .cp-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.cp-photo-card {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cp-photo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  border-color: #0284c7;
}

.cp-img-wrap {
  position: relative;
  width: 100%;
  height: 115px;
  background: #0f172a;
  overflow: hidden;
}

.cp-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.cp-photo-card:hover .cp-img-wrap img {
  transform: scale(1.08);
}

.cp-zoom-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.cp-photo-info {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.cp-photo-info .cp-step-title {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-photo-info .cp-step-desc {
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.cp-meta-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  width: 32%;
  white-space: nowrap;
}

.cp-meta-table td {
  padding: 9px 14px;
  color: #1e293b;
  font-weight: 500;
  border-bottom: 1px solid #e2e8f0;
}

.cp-meta-table tr:last-child th,
.cp-meta-table tr:last-child td {
  border-bottom: none;
}

.cp-footer-trust {
  margin-top: 8px;
  padding: 12px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 11.5px;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

/* ==========================================================================
   하단 모바일 탭 네비게이션
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 16, 29, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 90;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 12px;
  transition: all 0.2s;
  min-width: 64px;
}

.nav-icon {
  font-size: 20px;
}

.nav-item:hover, .nav-item.active {
  color: var(--accent-cyan);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
}

/* 모달 팝업 */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 24px;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
}

/* ==========================================================================
   입고 등록 전용 품목 계층 선택 & 어종 칩 스타일
   ========================================================================== */
.product-selection-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.species-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.species-chip {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-sub);
  padding: 5px 11px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.species-chip:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #fff;
  border-color: rgba(6, 182, 212, 0.4);
}

.species-chip.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(14, 165, 233, 0.25));
  border-color: var(--accent-cyan);
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
  font-weight: 700;
}

/* ==========================================================================
   보안 모드 및 4자리 PIN 관리 스타일
   ========================================================================== */
.btn-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-security-badge:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
}

.btn-security-badge.locked {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.btn-security-badge.locked:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #f87171;
}

.sec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.sec-dot.red {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

.btn-edit {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

/* ==========================================================================
   보유재고 정정 & 4종 사진 매칭 모달 스타일
   ========================================================================== */
.modal-mode-banner {
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.modal-mode-banner.free {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.modal-mode-banner.locked {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.edit-photos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 640px) {
  .edit-photos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.edit-photo-card {
  background: rgba(10, 16, 29, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.edit-photo-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  text-align: center;
}

.edit-photo-preview-wrap {
  width: 100%;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-photo-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.btn-photo-upload {
  width: 100%;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  display: block;
  transition: all 0.2s;
}

.btn-photo-upload:hover {
  background: rgba(56, 189, 248, 0.3);
  color: #fff;
}

/* 공급처 퀵 배지 (모바일 원터치 선택용) */
.supplier-quick-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.sup-badge {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.sup-badge:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: #fff;
}

.sup-badge.active {
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}



