/* ==========================================
   UNIVERSAL.CSS — 순백대박프로젝트 전역 스타일
   ========================================== */

/* 전역 박스 모델 안정화 */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 전체 기본 설정 */
body {
  margin: 0;
  font-family: "Pretendard", sans-serif;
  background-color: #fff;
  color: #000;
}

/* 폰트 로딩 지연으로 생기는 레이아웃 흔들림 방지 */
@font-face {
  font-family: "신라문화체";
  src: url("/static/fonts/ShillaCulture.woff2") format("woff2");
  font-display: swap;
}

/* ====== 네비바 ====== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #000;
  padding: 8px 30px;
  background: #fff;
}

.logo {
  font-family: "신라문화체", serif;
  font-size: 30px;
  margin: 0;
  line-height: 1;
}

.navbar-right { display: flex; gap: 20px; }

.nav-link {
  text-decoration: none;
  color: #000;
  font-weight: 600;
}

.nav-link.active {
  background: #000;
  color: #fff;
  border-radius: 5px;
  padding: 4px 8px;
}

/* ====== 페이지 타이틀 ====== */
.page-title-bar { padding: 0 40px; }
.page-title {
  font-family: "신라문화체", serif;
  font-size: 28px;
  margin: 0;
}

/* ====== 페이지 기본 패딩 ====== */
.page-content {
  padding: 0 40px 40px 40px;
}

/* ====== 버튼 ====== */
.btn { border: none; border-radius: 6px; font-weight: 700; padding: 6px 12px; cursor: pointer; }
.btn.blue { background: #007bff; color: white; }
.btn.green { background: #28a745; color: white; }
.btn.red { background: #d9534f; color: white; }
.btn.yellow { background: #ffb400; color: black; }

/* ====== 표 ====== */
table { border-collapse: collapse; width: 100%; }
th, td { border: 1.5px solid #000; text-align: center; padding: 4px; }
.item-table { table-layout: fixed; }

/* ==========================================
   ✅ 수량입력 — 카드 6열 고정 레이아웃
========================================== */

.cards-wrap {
  overflow-x: auto; /* 화면이 좁아도 줄바꿈하지 않고 스크롤 */
  padding-bottom: 8px;
}

.partner-grid {
  --gap: 8px;
  --minw: 260px; /* 카드 최소폭 (조절 가능) */
  display: grid;
  grid-template-columns: repeat(6, minmax(var(--minw), 1fr));
  gap: var(--gap);
  min-width: calc((var(--minw) * 6) + (var(--gap) * 5));
}

/* 거래처 카드 */
.partner-card {
  border: 2px solid #000;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
}

/* 카드 내부 */
.partner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.qty-input { width: 100%; height: 28px; text-align: right; }
.note-input { width: 100%; height: 28px; }

/* ==========================================
   🔥 체크박스 클릭성 개선 (중형 · 최적)
   ========================================== */

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  transform: scale(1.3);   /* 👈 이전 1.7 → 1.3 */
  cursor: pointer;
  margin: 4px;
}

td input[type="checkbox"] {
  vertical-align: middle;
}


/* =========================================================
   Global table row hover (Excel-like)
   사용법:
   - 테이블에 class="excel-hover" 추가
   - 또는 class="excel-table" 사용
========================================================= */
.excel-hover tbody tr:hover,
.excel-table tbody tr:hover {
  background:#fff6d6;
  transition: background .08s ease-in-out;
}

/* 합계/고정 행은 hover 제외하고 싶으면 sum-row 클래스 사용 */
.excel-hover tbody tr.sum-row:hover,
.excel-table tbody tr.sum-row:hover {
  background: inherit;
}

/* =========================
   Table row hover (global)
   ========================= */
.excel-hover tbody tr:hover{
  background:#fff6d6;
  transition:background .08s ease-in-out;
}

/* 합계/특수행은 제외하고 싶으면 sum-row 붙이면 됨 */
.excel-hover tbody tr.sum-row:hover{
  background:inherit;
}

/* =========================
   Table row hover (global)
   - 기본 hover: 연노랑
   - 상태 강조(row-overdue, row-today 등)는 hover 제외
   ========================= */
.excel-hover tbody tr:hover{
  background:#fff6d6;
  transition:background .08s ease-in-out;
}

/* 강조행은 기존 색 유지 (hover 무시) */
.excel-hover tbody tr.row-overdue:hover,
.excel-hover tbody tr.row-today:hover{
  background:inherit !important;
}

/* =========================
   Table row hover (global)
   - partners(index)와 동일한 연노랑(#fff6d6)
   - 상태 강조(row-overdue, row-today 등)는 hover 제외
   ========================= */
.excel-hover tbody tr:hover{
  background:#fff6d6;
  transition:background .08s ease-in-out;
}

/* 강조행은 기존 색 유지 (hover 무시) */
.excel-hover tbody tr.row-overdue:hover,
.excel-hover tbody tr.row-today:hover{
  background:inherit !important;
}
