/* 
  브랜드 및 디자인 가이드 (DESIGN.md) 반영 
  컨셉: 깔끔하고 따뜻한 카페 스타일
*/
:root {
  /* 주요 색상 설정 */
  --color-primary: #006241; /* 진한 녹색 (메인 색상) */
  --color-primary-hover: #004b31; 
  --color-bg: #F9F9F6; /* 연한 크림색/흰색 (배경 색상) */
  --color-surface: #FFFFFF; /* 카드 배경 */
  --color-accent: #C28E61; /* 따뜻한 갈색 (포인트 색상) */
  --color-text-main: #2C2C2C; /* 짙은 잿빛 (다크 그레이) */
  --color-text-muted: #6C6C6C;
  --color-border: #E0E0E0;
  
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 4px;
}

body {
  margin: 0;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.5;
}

/* 헤더 */
.app-header {
  background: linear-gradient(135deg, #006241, #004b31);
  color: white;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: center; /* 로고 가운데 정렬 복원 */
  align-items: center;
  position: relative; /* 우측 사용자 정보 절대 배치를 위한 부모 설정 */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.app-header .logo {
  font-size: 1.8rem; /* 폰트 크기 키움 (기존 1.4rem) */
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 프린터 서버 연결상태 플로팅 배지 */
.header-printer-status {
  position: fixed;
  top: 38px;
  left: 10px;
  z-index: 9999;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  color: white;
}

.header-printer-status.connected {
  background: rgba(45, 164, 78, 0.95); /* 불투명 초록색 */
}

.header-printer-status.connected .status-dot {
  background-color: #39ff14;
  box-shadow: 0 0 6px #39ff14;
}

.header-printer-status.disconnected {
  background: rgba(207, 34, 46, 0.95); /* 불투명 빨간색 */
}

.header-printer-status.disconnected .status-dot {
  background-color: #ff4d4d;
  box-shadow: 0 0 6px #ff4d4d;
  animation: headerDotBlink 1.5s infinite;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

@keyframes headerDotBlink {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.app-header .user-info {
  position: absolute; /* 절대 배치로 우측에 고정하여 로고 중앙 정렬 보존 */
  right: 2rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
}

#manualBtn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 14px rgba(245, 124, 0, 0.45) !important;
}

#manualBtn:active {
  transform: translateY(1px) scale(0.98);
}

/* 메인 */
.app-main {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* 화면 전환용 클래스 */
.screen-section {
  display: none;
}
.screen-section.active {
  display: block;
}

/* 로그인 박스 */
.login-box {
  background: var(--color-surface);
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  max-width: 400px;
  margin: 4rem auto;
  text-align: center;
}

.login-box h2 {
  margin-top: 0;
  color: var(--color-primary);
}

.login-box p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group input {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus {
  border-color: var(--color-primary);
}

/* 버튼 스타일 (큰 버튼 위주) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.primary-btn {
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 10px rgba(0, 98, 65, 0.15);
}
.primary-btn:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 98, 65, 0.25);
}
.primary-btn:active {
  transform: translateY(0);
}

.outline-btn {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  width: auto;
  padding: 0.5rem 1rem;
}
.outline-btn:hover {
  background-color: var(--color-primary);
  color: white;
}

.danger-btn {
  background-color: transparent;
  color: var(--color-text-muted);
  width: auto;
  padding: 0.5rem 1rem;
}
.danger-btn:hover {
  color: #D32F2F;
}

.hidden {
  display: none !important;
}

/* 네비게이션 */
.dashboard-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 2rem;
  padding: 6px;
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  flex-wrap: wrap;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.dashboard-nav .btn {
  width: auto;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  white-space: nowrap; /* 한 글자 단위 줄바꿈 완전히 차단 */
  background-color: #F4F4F0;
  color: var(--color-text-main);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  gap: 6px;
}

.dashboard-nav .btn:hover {
  background-color: rgba(0, 98, 65, 0.08);
  border-color: rgba(0, 98, 65, 0.2) !important;
  color: var(--color-primary);
  transform: translateY(-1px);
}

.dashboard-nav .btn.active {
  background: linear-gradient(135deg, #006241, #004b31) !important;
  border-color: transparent !important;
  color: white !important;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 98, 65, 0.2) !important;
  transform: translateY(-1px);
}

.dashboard-nav .danger-btn {
  background-color: #FFF5F5;
  border: 1px solid #FFE3E3 !important;
  color: #D32F2F;
  font-weight: 600;
}
.dashboard-nav .danger-btn:hover {
  background-color: #FFE3E3;
  border-color: #FFA8A8 !important;
  color: #D32F2F;
}

.content-area {
  background: var(--color-surface);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.02);
  min-height: 400px;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.emoji-btn {
  background: #f1f3f5;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.emoji-btn:hover {
  background: #e9ecef;
  border-color: #ced4da;
  transform: scale(1.15);
}
.emoji-btn:active {
  transform: scale(0.95);
}

/* --- 모바일 반응형 웹 최적화 (화면 가로폭 768px 이하) --- */
@media screen and (max-width: 768px) {
  .app-header {
    padding: 1rem 12px !important;
    flex-direction: column !important;
    gap: 10px !important;
    text-align: center !important;
  }

  .app-header .logo {
    font-size: 1.5rem !important;
  }

  .app-header .user-info {
    position: static !important;
  }

  .app-main {
    margin: 1rem auto !important;
    padding: 0 10px !important;
  }

  .login-box {
    padding: 2rem 1.2rem !important;
    margin: 2rem auto !important;
  }

  .dashboard-nav {
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 8px !important;
  }

  .dashboard-nav .btn {
    flex: 1 1 45% !important;
    max-width: 48% !important;
    font-size: 0.85rem !important;
    padding: 10px 8px !important;
    justify-content: center !important;
    margin: 0 !important;
  }
  
  .dashboard-nav .danger-btn {
    flex: 1 1 100% !important; /* 로그아웃은 단독 행 */
    max-width: 100% !important;
  }

  .content-area {
    padding: 1.5rem 12px !important;
    border-radius: var(--radius-md) !important;
  }

  /* 테이블 가로 스크롤 활성화 */
  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
  }

  /* 라벨 인쇄 및 정보 패널 그리드 */
  #scanUI div[style*="display:grid"], 
  #scanUI div[style*="display: grid"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
  }

  /* 입력창 및 검색 버튼 모바일 대응 */
  .input-group,
  div[style*="display:flex; gap:10px"] {
    flex-wrap: wrap !important;
  }

  /* 자유게시판 모바일 조율 */
  #boardUI select, 
  #boardUI button {
    font-size: 0.85rem !important;
  }
}

/* 모바일 카메라 비디오가 iOS Safari에서 축소/숨김되는 현상 강제 방지 */
#scannerReader video {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: cover !important;
  border-radius: 8px;
}

/* 초성 검색 자동완성 드롭다운 스타일 */
.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 10000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}
.autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f1f3f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s ease;
  text-align: left;
}
.autocomplete-item:last-child {
  border-bottom: none;
}
.autocomplete-item:hover {
  background: #f1f3f5;
}
.autocomplete-item .item-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.autocomplete-item .item-name {
  font-weight: 700;
  color: #212529;
  font-size: 0.95rem;
}
.autocomplete-item .item-barcode {
  font-size: 0.78rem;
  color: #868e96;
}
.autocomplete-item .item-price {
  font-size: 0.88rem;
  color: var(--color-primary);
  font-weight: 800;
}

/* 🏢 지마켓 스타일 푸터 */
.app-footer {
  background-color: #f7f9fa;
  border-top: 1px solid #e5e8eb;
  padding: 30px 40px;
  font-family: inherit;
  color: #666;
  font-size: 0.8rem;
  line-height: 1.6;
  box-sizing: border-box;
  width: 100%;
  margin-top: 50px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  border-bottom: 1px solid #eaebee;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.footer-links a {
  text-decoration: none;
  color: #666;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #111;
}

.footer-links a::after {
  content: " |";
  color: #d1d5db;
  margin-left: 15px;
}

.footer-links a:last-child::after {
  content: "";
}

.footer-body {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 25px;
}

.footer-info, .footer-cs {
  flex: 1;
  min-width: 300px;
}

.footer-info h4, .footer-cs h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #333;
  font-size: 0.88rem;
  font-weight: 700;
}

.footer-info p, .footer-cs p {
  margin: 4px 0;
  color: #777;
}

.footer-cs strong {
  font-size: 0.95rem;
  color: #333;
}

.footer-bottom {
  border-top: 1px solid #eaebee;
  padding-top: 15px;
}

.footer-bottom .disclaimer {
  color: #999;
  font-size: 0.72rem;
  margin-bottom: 10px;
  line-height: 1.5;
}

.footer-bottom .copyright {
  color: #666;
  font-weight: bold;
  margin: 0;
  font-size: 0.75rem;
}

/* ==========================================
   🏢 홈페이지형 기업 정보관 스타일 (#corporateScreen)
   ========================================== */
#corporateScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f4f6f8;
  z-index: 10005; /* 모든 요소보다 위에 표시 */
  padding: 0;
  display: none; /* 스크립트로 활성화 */
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

#corporateScreen.active {
  display: flex !important;
}

/* 기업 정보 헤더 */
.corp-header {
  background-color: white;
  border-bottom: 1px solid #e1e4e6;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.corp-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.corp-return-btn {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  color: white;
  border: none;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 98, 65, 0.2);
  transition: all 0.2s ease;
}

.corp-return-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 98, 65, 0.3);
}

/* 메인 프레임 컨테이너 */
.corp-container {
  display: flex;
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 30px auto;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  overflow: hidden;
  border: 1px solid #eef0f2;
}

/* 좌측 사이드바 탭 메뉴 */
.corp-sidebar {
  width: 240px;
  background-color: #f8f9fb;
  border-right: 1px solid #eef0f2;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}

.corp-tab-btn {
  background: transparent;
  border: none;
  text-align: left;
  padding: 15px 25px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #4a5568;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.corp-tab-btn:hover {
  background-color: #edf2f7;
  color: #1a202c;
}

.corp-tab-btn.active {
  background-color: white;
  color: var(--color-primary);
  font-weight: 800;
}

.corp-tab-btn.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--color-primary);
}

/* 우측 메인 콘텐츠 영역 */
.corp-main-content {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
}

.corp-tab-panel {
  display: none;
}

.corp-tab-panel.active {
  display: block !important;
  animation: fadeIn 0.3s ease;
}

/* 리파이 소개 (About) & 가이드 페이지네이션 레이아웃 */
.about-page, .guide-page {
  display: none;
}

.about-page.active, .guide-page.active {
  display: block !important;
  animation: fadeIn 0.3s ease;
}

.about-chapter-badge, .guide-page-badge {
  display: inline-block;
  background-color: #e6fffa;
  color: var(--color-primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 12px;
  border: 1px solid #b2f5ea;
}

/* 챕터별 삽화 이미지 그리드 */
.about-images-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 25px 0;
}

.about-img-card {
  background-color: #fcfdfe;
  border: 1px solid #eef1f4;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  text-align: center;
  transition: transform 0.2s ease;
}

.about-img-card:hover {
  transform: translateY(-2px);
}

.about-img-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #eaeaea;
}

.about-img-card p {
  margin: 10px 0 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a5568;
}

/* 강조 상자 */
.about-highlight-box, .guide-tip-box {
  background-color: #f7fafc;
  border-left: 4px solid var(--color-primary);
  padding: 20px;
  border-radius: 0 8px 8px 0;
  margin: 25px 0;
}

.about-highlight-box h5, .guide-tip-box h5 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: #2d3748;
  font-weight: 700;
}

.about-highlight-box ul, .guide-tip-box ul {
  padding-left: 20px;
  margin-bottom: 0;
  line-height: 1.7;
}

/* 가이드 스텝 카드 */
.guide-step-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.01);
}

.guide-step-card h5 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 0.98rem;
  color: var(--color-primary);
  font-weight: 700;
}

.guide-step-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #4a5568;
}

/* 페이지네이션 컨트롤러 */
.corp-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 35px;
  border-top: 1px solid #eaebee;
  padding-top: 20px;
}

.corp-pagination span {
  font-weight: bold;
  color: #4a5568;
  font-size: 0.9rem;
}

/* 이용약관 및 개인정보처리방침 (들여쓰기 및 서체 프리미엄 규칙) */
.policy-wrapper {
  max-width: 800px;
  margin: 0 auto;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  line-height: 1.8;
  font-size: 0.92rem;
  color: #2d3748; /* 더 깊이 있는 프리미엄 차콜색 */
}

.policy-last-updated {
  font-size: 0.82rem;
  color: #718096;
  font-style: italic;
  margin-top: -10px;
  margin-bottom: 15px;
  text-align: right;
}

.policy-section {
  margin-top: 22px;
  margin-bottom: 22px;
}

.policy-section h4 {
  font-size: 1.05rem;
  color: #1a202c;
  margin-top: 24px;
  margin-bottom: 10px;
  font-weight: 700;
  border-left: 3.5px solid var(--color-primary);
  padding-left: 8px;
}

.policy-para {
  line-height: 1.8;
  color: #2d3748;
  margin-bottom: 12px;
  font-size: 0.92rem;
  font-weight: 400;
  text-align: justify;
}

/* 들여쓰기 헬퍼 */
.policy-indent-1 {
  padding-left: 20px;
  text-indent: -20px;
  margin: 6px 0;
  font-weight: 400;
  color: #2d3748;
}

.policy-indent-2 {
  padding-left: 35px;
  text-indent: -15px;
  margin: 4px 0;
  font-weight: 400;
  color: #4a5568;
}

/* 고객센터 (CS) 2열 정렬 */
.cs-layout-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
}

.cs-hours-highlight-card {
  background: linear-gradient(135deg, #f7fafc, #edf2f7);
  border-left: 4px solid var(--color-accent);
  padding: 20px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.cs-hours-highlight-card h5 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1rem;
  color: #2d3748;
}

.hours-badge {
  display: inline-block;
  background-color: var(--color-accent);
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.hours-details-list {
  padding-left: 20px;
  margin: 0;
  line-height: 1.6;
  font-size: 0.88rem;
  color: #4a5568;
}

.cs-contact-list-card {
  background-color: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.01);
}

.cs-contact-list-card h5 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: #2d3748;
}

.cs-contact-list-card p {
  margin: 8px 0;
  font-size: 0.88rem;
  color: #4a5568;
}

.cs-map-card {
  text-align: center;
}

.cs-map-card h5 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: #2d3748;
  text-align: left;
}

.map-img-wrapper {
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.map-img-wrapper img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.map-caption {
  font-size: 0.8rem;
  color: #718096;
  margin-top: 10px;
  font-weight: 600;
}

/* 페이드인 키프레임 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 반응형 처리 */
@media (max-width: 992px) {
  .corp-container {
    flex-direction: column;
    margin: 15px;
  }
  .corp-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #eef0f2;
    flex-direction: row;
    overflow-x: auto;
    padding: 10px 0;
  }
  .corp-tab-btn {
    padding: 10px 20px;
    white-space: nowrap;
  }
  .corp-tab-btn.active::before {
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: auto;
    height: 3px;
  }
  .about-images-grid {
    grid-template-columns: 1fr;
  }
  .cs-layout-grid {
    grid-template-columns: 1fr;
  }
}


/* === RE;fy UI Redesign v3.10 === */
:root {
  --color-danger: #c62828;
  --color-success: #2e7d32;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0, 98, 65, 0.08);
  --radius-xl: 16px;
  --touch-min: 48px;
}

.app-main {
  max-width: 1200px;
}

.dashboard-shell {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
}

.dashboard-nav {
  flex-direction: column;
  flex-wrap: nowrap;
  width: 220px;
  min-width: 200px;
  position: sticky;
  top: 12px;
  margin-bottom: 0;
  padding: var(--space-3);
  gap: 6px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.dashboard-nav .btn {
  width: 100%;
  justify-content: flex-start;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  min-height: 44px;
}

.dashboard-nav .nav-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  padding: 10px 8px 4px;
  margin-top: 4px;
}

.dashboard-nav .danger-btn {
  width: 100%;
  margin-top: 8px;
  justify-content: center;
  background-color: #FFF5F5;
  border: 1px solid #FFE3E3 !important;
  color: #D32F2F;
}

.dashboard-shell .content-area {
  flex: 1;
  min-width: 0;
  padding: var(--space-5);
}

.app-header {
  padding: 0.9rem 1.5rem;
}

.header-right {
  position: absolute;
  right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

#manualBtn {
  background: var(--color-accent) !important;
  color: white !important;
  font-weight: 700 !important;
  border: none !important;
  padding: 6px 14px !important;
  border-radius: 20px !important;
  font-size: 0.85rem !important;
  box-shadow: none !important;
}

.header-printer-status {
  top: auto;
  bottom: 16px;
  left: 16px;
  font-size: 0.7rem;
  opacity: 0.95;
  z-index: 50;
}

.sys-status-dot {
  position: fixed;
  bottom: 16px;
  right: 72px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.2);
  z-index: 50;
  opacity: 0.85;
}

.home-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
  margin: var(--space-5) 0;
}

.home-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 20px 18px;
  min-height: 120px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  font-family: inherit;
  color: inherit;
}

.home-tile:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.home-tile.primary-tile {
  background: linear-gradient(145deg, #e8f5ef 0%, #f9f9f6 100%);
  border-color: rgba(0, 98, 65, 0.25);
}

.home-tile .tile-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.home-tile .tile-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-primary);
}

.home-tile .tile-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  margin: var(--space-5) 0;
}

.stat-card {
  background: var(--color-bg);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  text-align: center;
}

.stat-card strong {
  font-size: 1.5rem;
  color: var(--color-primary);
  display: block;
  margin-top: 4px;
}

.help-panel {
  background: #fdfaf7;
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid #f0e4d8;
  margin-top: var(--space-5);
}

.help-panel h4 {
  margin-top: 0;
  color: #8b5e3c;
}

.help-panel ul {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.7;
  color: #444;
  font-size: 0.92rem;
}

#scanUI .page-title {
  color: var(--color-primary);
  margin: 0 0 var(--space-4);
  font-size: 1.35rem;
  font-weight: 800;
}

.product-card-main {
  background: var(--color-bg);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
}

.product-title-lg {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--color-text-main);
}

.product-meta {
  margin: 0 0 12px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.price-xl {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-danger);
  letter-spacing: -0.5px;
  margin: 8px 0 0;
}

.price-online {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.scan-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btn-quiet {
  background: #f4f4f0 !important;
  color: var(--color-text-main) !important;
  border: 1px solid var(--color-border) !important;
  width: auto !important;
  padding: 8px 14px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.btn-quiet:hover {
  background: #ebebe6 !important;
}

.scan-print-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.btn-lg {
  min-height: 56px;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  width: 100%;
  border-radius: var(--radius-lg) !important;
}

.scan-advanced {
  margin: var(--space-4) 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.scan-advanced > summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 700;
  color: var(--color-primary);
  background: #f7f7f4;
  user-select: none;
  list-style: none;
}

.scan-advanced > summary::-webkit-details-marker {
  display: none;
}

.scan-advanced > summary::before {
  content: "▸ ";
}

.scan-advanced[open] > summary::before {
  content: "▾ ";
}

.scan-advanced-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: var(--color-bg);
}

.label-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--space-4);
  padding: var(--space-5);
  border: 1px dashed var(--color-border);
  background: #fafaf8;
  border-radius: var(--radius-lg);
}

@media screen and (max-width: 900px) {
  .dashboard-shell {
    flex-direction: column;
  }
  .dashboard-nav {
    width: 100%;
    min-width: 0;
    position: static;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: auto;
  }
  .dashboard-nav .btn {
    width: auto;
    flex: 1 1 auto;
    min-width: 120px;
    justify-content: center;
  }
  .dashboard-nav .nav-section-label {
    width: 100%;
  }
  .price-xl {
    font-size: 1.65rem;
  }
}


/* === RE;fy Mobile + Admin v3.10.1 === */

/* Admin / tables */
.page-title {
  color: var(--color-primary);
  font-weight: 800;
  font-size: 1.3rem;
  margin: 0 0 12px;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.data-table,
#adminUsersUI table,
#adminDataUI table,
#adminPaymentUI table,
#adminDuplicateUI table,
#marketSettlementUI table,
#boardUI table,
#usersTableBody,
table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

#adminUsersUI table th,
#adminDataUI table th,
#adminPaymentUI table th,
#adminDuplicateUI table th,
#marketSettlementUI table th,
#boardUI table th,
.data-table th {
  background: #f4f4f0;
  color: var(--color-text-main);
  font-weight: 700;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

#adminUsersUI table td,
#adminDataUI table td,
#adminPaymentUI table td,
#adminDuplicateUI table td,
#marketSettlementUI table td,
#boardUI table td,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0ec;
  vertical-align: middle;
}

#adminUsersUI table tr:hover td,
#adminDataUI table tr:hover td,
#marketSettlementUI table tr:hover td {
  background: #fafaf8;
}

.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Modal polish */
.modal-content {
  text-align: left;
  max-height: min(90vh, 720px);
  overflow-y: auto;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  flex-wrap: wrap;
}

.modal-actions .btn {
  width: auto;
  min-width: 100px;
}

/* —— Smartphone / tablet (≤768px) —— */
@media screen and (max-width: 768px) {
  body {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .app-header {
    padding: 10px 12px !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    text-align: left !important;
    position: sticky;
    top: 0;
    z-index: 300;
  }

  .app-header .logo {
    gap: 8px !important;
  }

  .app-header .logo img {
    height: 30px !important;
  }

  .app-header .logo > div > div:first-child span:first-child {
    font-size: 0.95rem !important;
  }

  .app-header .logo > div > span:last-child {
    display: none !important; /* BARCODE SYSTEM 자막 숨김 */
  }

  .header-right {
    position: static !important;
    right: auto !important;
    gap: 6px !important;
  }

  .app-header .user-info {
    position: static !important;
    font-size: 0.72rem !important;
    padding: 4px 8px !important;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #manualBtn {
    padding: 5px 10px !important;
    font-size: 0.75rem !important;
  }

  #appVersionDisplay {
    display: none !important;
  }

  .app-main {
    margin: 0.75rem auto !important;
    padding: 0 10px !important;
    max-width: 100% !important;
  }

  .login-box {
    margin: 1.5rem auto !important;
    padding: 1.75rem 1.25rem !important;
    width: 100%;
    box-sizing: border-box;
  }

  .login-box .btn,
  .login-box input {
    min-height: 48px;
    font-size: 16px !important; /* iOS zoom 방지 */
  }

  /* 하단 탭 네비로 전환 (기존 사이드 네비 재사용) */
  .dashboard-shell {
    flex-direction: column !important;
    gap: 0 !important;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .dashboard-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    z-index: 400 !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 4px !important;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 16px 16px 0 0 !important;
    border: 1px solid var(--color-border) !important;
    border-bottom: none !important;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08) !important;
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-nav .nav-section-label {
    display: none !important;
  }

  .dashboard-nav .btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 68px !important;
    max-width: none !important;
    min-height: 52px !important;
    padding: 6px 10px !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 2px !important;
    border-radius: 12px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    text-align: center !important;
  }

  .dashboard-nav .btn.active {
    transform: none !important;
  }

  .dashboard-nav .danger-btn {
    flex: 0 0 auto !important;
    min-width: 64px !important;
    max-width: none !important;
    margin-top: 0 !important;
    order: 99;
  }

  .dashboard-shell .content-area,
  .content-area {
    padding: 16px 12px !important;
    border-radius: 12px !important;
    min-height: 50vh;
    box-shadow: none !important;
  }

  .home-tiles {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .home-tile {
    min-height: 100px !important;
    padding: 14px 12px !important;
  }

  .home-tile .tile-title {
    font-size: 0.95rem !important;
  }

  .home-tile .tile-desc {
    font-size: 0.75rem !important;
  }

  .stat-cards {
    grid-template-columns: 1fr !important;
  }

  .price-xl {
    font-size: 1.75rem !important;
  }

  .product-title-lg {
    font-size: 1.1rem !important;
  }

  .btn-lg {
    min-height: 52px !important;
    font-size: 1.05rem !important;
  }

  /* 스캔 검색 줄 세로 스택 */
  #scanUI .input-group {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #scanUI .input-group > * {
    width: 100% !important;
    flex: none !important;
    max-width: 100% !important;
  }

  #scanUI #searchBtn,
  #scanUI #scanCameraBtn,
  #scanUI #scanModeToggleBtn {
    height: 48px !important;
    min-height: 48px !important;
  }

  #barcodeInput {
    font-size: 16px !important;
    min-height: 48px;
  }

  .scan-actions-row .btn {
    flex: 1 1 45%;
    justify-content: center !important;
  }

  /* 프린터/시스템 배지 하단 탭과 겹치지 않게 */
  .header-printer-status {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
    left: 10px !important;
    font-size: 0.65rem !important;
  }

  .sys-status-dot {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
    right: 12px !important;
  }

  #chatFloatingBtn {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
    right: 12px !important;
  }

  /* 테이블: 카드형 스크롤 */
  .table-wrap,
  #adminUsersUI,
  #adminDataUI,
  #adminPaymentUI,
  #adminDuplicateUI,
  #marketSettlementUI,
  #boardUI {
    max-width: 100%;
  }

  #adminUsersUI table,
  #adminDataUI table,
  #adminPaymentUI table,
  #adminDuplicateUI table,
  #marketSettlementUI table,
  #boardUI table {
    display: table !important;
    min-width: 520px;
  }

  .modal-content {
    width: 94% !important;
    max-width: 94% !important;
    padding: 1.25rem !important;
    max-height: 85vh;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn {
    width: 100% !important;
  }

  /* 구 768 규칙 중 사이드 네비 2열 깨짐 덮어쓰기 완료 — danger 100% 방지 */
  .dashboard-nav .danger-btn {
    flex: 0 0 auto !important;
    max-width: none !important;
  }
}

/* 매우 좁은 화면 */
@media screen and (max-width: 380px) {
  .home-tiles {
    grid-template-columns: 1fr !important;
  }
  .dashboard-nav .btn {
    min-width: 60px !important;
    font-size: 0.62rem !important;
  }
}


/* === Legal & Footer v3.13 === */
.app-footer {
  background: #f4f4f0;
  border-top: 1px solid #e0e0e0;
  padding: 28px 24px 20px;
  margin-top: 40px;
  color: #555;
  font-size: 0.82rem;
  line-height: 1.65;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  justify-content: center;
  border-bottom: 1px solid #e8e8e4;
  padding-bottom: 14px;
  margin-bottom: 20px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.footer-links a {
  text-decoration: none;
  color: #555;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 4px 14px;
  border-right: 1px solid #d8d8d4;
  transition: color 0.15s;
}

.footer-links a:last-child { border-right: none; }
.footer-links a::after { content: none !important; }
.footer-links a:hover { color: #006241; }
.footer-links a.is-strong {
  color: #1a1a1a;
  font-weight: 800;
}

.footer-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto 20px;
}

.footer-info, .footer-cs {
  min-width: 0;
  background: #fff;
  border: 1px solid #e8e8e4;
  border-radius: 12px;
  padding: 16px 18px;
}

.footer-info h4, .footer-cs h4 {
  margin: 0 0 12px;
  color: #006241;
  font-size: 0.95rem;
  font-weight: 800;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8f5ef;
}

.footer-info p, .footer-cs p {
  margin: 5px 0;
  color: #666;
  font-size: 0.8rem;
}

.footer-info .fi-label,
.footer-cs .fi-label {
  display: inline-block;
  min-width: 7.5em;
  color: #888;
  font-weight: 600;
  font-size: 0.78rem;
}

.footer-info .fi-val,
.footer-cs .fi-val {
  color: #333;
  font-weight: 600;
}

.footer-cs .fi-em {
  color: #006241;
  font-weight: 800;
  font-size: 0.95rem;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid #e8e8e4;
  padding-top: 14px;
  text-align: center;
}

.footer-bottom .disclaimer {
  color: #999;
  font-size: 0.72rem;
  line-height: 1.55;
  margin: 0 0 8px;
}

.footer-bottom .copyright {
  color: #555;
  font-weight: 800;
  font-size: 0.78rem;
  margin: 0;
}

@media (max-width: 768px) {
  .footer-body { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .footer-links a {
    border-right: none;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e8e8e4;
    border-radius: 8px;
    margin: 3px;
  }
}

/* Legal modal shell */
.legal-modal-shell {
  max-width: 820px !important;
  width: 94% !important;
  max-height: 88vh !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 16px !important;
  text-align: left !important;
}

.legal-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #006241, #004b31);
  color: #fff;
  flex-shrink: 0;
}

.legal-modal-head h3 {
  margin: 0 !important;
  color: #fff !important;
  font-size: 1.15rem !important;
  font-weight: 800;
}

.legal-modal-head .legal-close {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.legal-modal-body {
  overflow-y: auto;
  padding: 20px 22px;
  flex: 1;
  min-height: 0;
  background: #F9F9F6;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
}

.legal-modal-foot {
  padding: 12px 18px;
  border-top: 1px solid #e8e8e4;
  background: #fff;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Policy document */
.policy-wrapper {
  max-width: none;
  margin: 0;
  background: #fff;
  border: 1px solid #e8e8e4;
  border-radius: 14px;
  padding: 22px 24px 28px;
  line-height: 1.85;
  font-size: 0.93rem;
  color: #2c2c2c;
}

.policy-doc-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #006241;
  margin: 0 0 6px;
  text-align: center;
}

.policy-company-bar {
  background: #e8f5ef;
  border: 1px solid rgba(0,98,65,0.15);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 18px;
  font-size: 0.85rem;
  color: #004b31;
  line-height: 1.55;
}

.policy-company-bar strong {
  color: #006241;
  font-weight: 800;
}

.policy-wrapper h4,
.policy-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 22px 0 10px;
  padding: 10px 12px;
  background: #f4f4f0;
  border-left: 4px solid #006241;
  border-radius: 0 8px 8px 0;
}

.policy-para {
  margin: 0 0 10px;
  text-align: justify;
  color: #333;
  font-weight: 400;
  line-height: 1.85;
  font-size: 0.92rem;
}

.policy-indent-1 {
  margin: 6px 0 6px 8px;
  padding-left: 1.1em;
  text-indent: -1.1em;
  color: #333;
  line-height: 1.75;
}

.policy-indent-2 {
  margin: 4px 0 4px 28px;
  padding-left: 1em;
  text-indent: -1em;
  color: #555;
  line-height: 1.7;
  font-size: 0.9rem;
}

.policy-mark {
  font-weight: 800;
  color: #006241;
}

.policy-last-updated {
  text-align: right;
  font-size: 0.82rem;
  color: #888;
  margin: 16px 0 0;
  font-style: italic;
}

/* About page */
.corp-container.corp-about-shell {
  max-width: 920px;
  margin: 24px auto;
  height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8e8e4;
  box-shadow: 0 10px 32px rgba(0,0,0,0.06);
  overflow: hidden;
}

.corp-main-content.corp-about-body {
  padding: 32px 36px 40px;
  overflow-y: auto;
  flex: 1;
}

.corp-hero {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.corp-hero h2 {
  color: #006241;
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.4px;
}

.corp-hero p {
  color: #666;
  font-size: 0.98rem;
  margin: 0 auto;
  max-width: 560px;
  line-height: 1.55;
}

.corp-hero-line {
  width: 64px;
  height: 3px;
  background: #006241;
  margin: 16px auto 0;
  border-radius: 2px;
}

.about-section {
  margin-bottom: 40px;
}

.about-section h3 {
  color: #1a1a1a;
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8f5ef;
}

.about-section p {
  color: #444;
  font-size: 0.92rem;
  line-height: 1.75;
  margin: 0 0 12px;
  text-align: justify;
}

.about-section p strong {
  color: #006241;
  font-weight: 800;
}

.about-images-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0;
}

.about-img-card {
  background: #fafaf8;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}

.about-img-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.about-img-card p {
  margin: 10px 0 0 !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #555 !important;
  text-align: center !important;
}

.about-highlight-box {
  background: #e8f5ef;
  border-left: 4px solid #006241;
  padding: 16px 18px;
  border-radius: 0 12px 12px 0;
  margin-top: 14px;
}

.about-highlight-box h5 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: #004b31;
  font-weight: 800;
}

.about-highlight-box ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #333;
  font-size: 0.88rem;
  line-height: 1.7;
}

.about-highlight-box p {
  margin: 0 !important;
  color: #333 !important;
}

.corp-info-card {
  margin-top: 8px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.corp-info-card h3 {
  margin: 0 0 14px;
  color: #006241;
  font-size: 1.1rem;
  font-weight: 800;
  border-bottom: 2px solid #e8f5ef;
  padding-bottom: 10px;
}

.corp-info-grid {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 8px 12px;
  font-size: 0.88rem;
  align-items: baseline;
}

.corp-info-grid .k {
  color: #888;
  font-weight: 700;
}

.corp-info-grid .v {
  color: #222;
  font-weight: 600;
  line-height: 1.45;
}

.corp-info-grid .v em {
  font-style: normal;
  color: #006241;
  font-weight: 800;
}

/* Guide homepage */
.guide-page-wrap { font-family: 'Pretendard', 'Noto Sans KR', sans-serif; }
.guide-badge {
  display: inline-block;
  background: #e8f5ef;
  color: #006241;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.guide-page-wrap h4 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #1a1a1a;
}
.guide-page-wrap > p.lead {
  margin: 0 0 16px;
  color: #666;
  font-size: 0.88rem;
  line-height: 1.55;
}
.guide-card {
  background: #fff;
  border: 1px solid #e8e8e4;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.guide-card h5 {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #006241;
}
.guide-card p {
  margin: 0;
  font-size: 0.85rem;
  color: #444;
  line-height: 1.55;
}
.guide-card.guide-warn {
  background: #fff8f0;
  border-color: #f0e0c8;
}
.guide-card.guide-warn h5 { color: #8b5e3c; }
.guide-pager {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.guide-pager button {
  width: auto;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: #e8f5ef;
  color: #006241;
  font-family: inherit;
}
.guide-pager span {
  font-weight: 800;
  color: #666;
  font-size: 0.9rem;
}

.cs-layout-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
}
@media (max-width: 700px) {
  .cs-layout-grid { grid-template-columns: 1fr; }
  .about-images-grid { grid-template-columns: 1fr; }
  .corp-info-grid { grid-template-columns: 1fr; }
  .corp-info-grid .k { margin-top: 6px; }
}

/* ========== v3.22 초보자 UX · 일관 디자인 ========== */
.role-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e8f5ef 0%, #f7faf8 100%);
  border: 1px solid #cfe8dc;
  margin-bottom: 18px;
}
.role-banner .role-emoji {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}
.role-banner h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary);
}
.role-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.step-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.step-flow li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-main);
}
.step-flow .step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.page-lead {
  margin: -6px 0 16px;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}
.home-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.home-tile {
  text-align: left;
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  font-family: inherit;
  color: inherit;
}
.home-tile:hover {
  border-color: #9dcfb8;
  box-shadow: 0 8px 20px rgba(0, 98, 65, 0.08);
  transform: translateY(-1px);
}
.home-tile.primary-tile {
  border-color: #006241;
  background: linear-gradient(180deg, #f3fbf7 0%, #fff 55%);
  box-shadow: 0 4px 12px rgba(0, 98, 65, 0.1);
}
.home-tile .tile-step {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  background: var(--color-primary);
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 8px;
}
.home-tile .tile-icon { font-size: 1.5rem; display: block; margin-bottom: 6px; }
.home-tile .tile-title { display: block; font-size: 1.02rem; font-weight: 800; margin-bottom: 4px; }
.home-tile .tile-desc { display: block; font-size: 0.82rem; color: var(--color-text-muted); line-height: 1.4; }
.help-panel {
  margin-top: 20px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 14px 16px;
}
.help-panel h4 {
  margin: 0 0 8px;
  color: var(--color-primary);
  font-size: 0.95rem;
}
.help-panel ul { margin: 0; padding-left: 18px; color: #555; font-size: 0.88rem; }
.help-panel li { margin-bottom: 4px; }
.dashboard-nav .btn {
  justify-content: flex-start;
  text-align: left;
  border-radius: 10px;
  font-weight: 700;
}
.dashboard-nav .btn.active {
  background: var(--color-primary) !important;
  color: #fff !important;
}
.nav-section-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #8a8a8a;
  margin: 12px 8px 6px;
  text-transform: none;
}
.work-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.scan-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.btn-quiet {
  background: #fff !important;
  border: 1px solid var(--color-border) !important;
  color: #444 !important;
  font-weight: 700 !important;
}
.price-xl {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--color-primary);
  margin: 8px 0 0;
}
.product-card-main {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 12px;
}
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card strong {
  font-size: 1.35rem;
  color: var(--color-primary);
}
/* 매뉴얼 삽화 */
.man-illust {
  background: #f3fbf7;
  border: 1px dashed #9dcfb8;
  border-radius: 12px;
  padding: 14px;
  margin: 10px 0;
  text-align: center;
}
.man-illust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 8px 0;
}
.man-illust-box {
  background: #fff;
  border: 2px solid #006241;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  font-size: 0.85rem;
  color: #006241;
  min-width: 90px;
}
.man-illust-arrow {
  font-size: 1.2rem;
  color: #C28E61;
  font-weight: 900;
}
.man-callout {
  background: #fff8f0;
  border-left: 4px solid #C28E61;
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  font-size: 0.88rem;
  margin: 10px 0;
}
.man-callout.ok {
  background: #e8f5ef;
  border-left-color: #006241;
}

/* ===== 수기 라벨 인쇄기 디자인 폴리싱 ===== */
#labelPrinterUI .lp-shell {
  max-width: 1120px;
  margin: 0 auto;
  background: var(--color-surface);
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--color-border);
}

#labelPrinterUI .lp-header-title {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--color-bg);
}

#labelPrinterUI .lp-header-title h2 {
  color: var(--color-primary);
  margin: 0 0 6px 0;
  font-size: 1.45rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

#labelPrinterUI .lp-intro-desc {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.5;
  word-break: keep-all;
}

#labelPrinterUI .lp-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#labelPrinterUI .lp-card {
  background: #FAFAF7;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#labelPrinterUI .lp-card:hover {
  border-color: #CBD5E1;
}

#labelPrinterUI .lp-card h3 {
  margin-top: 0;
  margin-bottom: 14px;
  color: var(--color-primary);
  font-size: 1.08rem;
  font-weight: 700;
  border-bottom: 1.5px solid var(--color-border);
  padding-bottom: 8px;
}

#labelPrinterUI .lp-card-header-with-toggles {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid var(--color-border);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

#labelPrinterUI .lp-grid-2 {
  display: flex;
  gap: 20px;
  align-items: stretch;
  flex-wrap: wrap;
}

#labelPrinterUI .lp-col {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#labelPrinterUI .lp-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  background: white;
  color: var(--color-text-main);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#labelPrinterUI .lp-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 98, 65, 0.12);
}

#labelPrinterUI .lp-input.text-center {
  text-align: center;
}

#labelPrinterUI .lp-text-item {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 14px;
  transition: border-color 0.15s ease;
}

#labelPrinterUI .lp-text-item:focus-within {
  border-color: var(--color-primary);
}

#labelPrinterUI .lp-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

#labelPrinterUI .lp-item-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--color-text-main);
}

#labelPrinterUI .lp-item-toggles {
  display: flex;
  gap: 8px;
  align-items: center;
}

#labelPrinterUI .lp-toggle-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: #475569;
  background: #F1F5F9;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #E2E8F0;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

#labelPrinterUI .lp-toggle-badge:hover {
  background: #E2E8F0;
}

#labelPrinterUI .lp-toggle-badge input[type="checkbox"] {
  accent-color: var(--color-primary);
  cursor: pointer;
  margin: 0;
}

/* 템플릿 이름 + 저장: 세로 스택 (가로 flex + .btn{width:100%} 충돌 방지) */
#labelPrinterUI .lp-template-save-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

#labelPrinterUI .lp-template-name-input {
  width: 100% !important;
  min-height: 46px;
  font-size: 1rem;
  padding: 12px 14px;
  box-sizing: border-box;
}

#labelPrinterUI .lp-template-save-row .btn {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 1rem;
  white-space: nowrap;
}

#labelPrinterUI .lp-preview-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background: #F8FAFC;
  border: 1.5px dashed #CBD5E1;
  border-radius: var(--radius-md);
  box-sizing: border-box;
  /* 캔버스를 강제로 늘리지 않음 */
  min-height: 0;
  overflow: hidden;
}

#labelPrinterUI #lpCanvas {
  touch-action: none;
  cursor: grab;
  border-radius: 4px;
  /* 표시 크기는 JS fitLabelCanvasDisplay 전용 — CSS max-width:100% 로 가로만 줄이지 말 것 */
  flex-shrink: 0;
  align-self: center;
  display: block;
  object-fit: contain;
}

/* 상품 찾기 라벨 미리보기 캔버스도 동일 */
.label-preview-box {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.label-preview-box #labelCanvas {
  flex-shrink: 0;
  align-self: center;
  display: block;
  object-fit: contain;
}

#labelPrinterUI .lp-hint {
  font-size: 0.84rem;
  line-height: 1.5;
  margin: 0 0 12px 0;
  word-break: keep-all;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

#labelPrinterUI .lp-code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: start;
}

#labelPrinterUI .lp-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#labelPrinterUI .lp-field-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #475569;
}

#labelPrinterUI .lp-sliders-box {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#labelPrinterUI .lp-range-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#labelPrinterUI .lp-range-label {
  font-size: 0.8rem;
  color: #64748B;
  font-weight: 600;
  min-width: 5rem;
}

#labelPrinterUI .lp-slider {
  flex: 1;
  height: 5px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

#labelPrinterUI .lp-range-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 32px;
  text-align: right;
}

#labelPrinterUI .lp-sub-hint {
  margin: 12px 0 0 0;
  font-size: 0.78rem;
  color: #64748B;
  line-height: 1.4;
}

#labelPrinterUI .lp-print-dims-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

#labelPrinterUI .lp-print-opts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 640px) {
  #labelPrinterUI .lp-print-dims-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  #labelPrinterUI .lp-print-opts-grid {
    grid-template-columns: 1fr;
  }
}

#labelPrinterUI .lp-print-main-btn {
  width: 100%;
  padding: 14px;
  font-size: 1.1rem;
  font-weight: 800;
  margin-top: 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 98, 65, 0.2);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

#labelPrinterUI .lp-print-main-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 98, 65, 0.3);
}
