/* ===== 기본 설정 ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
  font-weight: normal;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  color: #333;
}

/* ===== 서체 크기 5가지 ===== */
.text-1 { font-size: 12px; }  /* 최소 */
.text-2 { font-size: 14px; }  /* 작은 본문 */
.text-3 { font-size: 16px; }  /* 기본 본문 */
.text-4 { font-size: 18px; }  /* 부제목 */
.text-5 { font-size: 24px; }  /* 제목 */

.text-bold { font-weight: bold; }

/* ===== 레이아웃 ===== */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 헤더 */
.site-header {
  padding: 16px 24px;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none;
}

.site-header h1 {
  font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
  font-size: 24px;
  font-weight: bold;
  margin: 0;
}

.site-header nav {
  margin-top: 8px;
}

.site-header nav a {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  text-decoration: none;
  margin-right: 16px;
}

.site-header nav a:hover {
  text-decoration: underline;
}

.site-header nav .nav-disabled {
  font-size: 14px;
  font-weight: bold;
  color: #999;
  margin-right: 16px;
  cursor: not-allowed;
}

/* 헤더 하단 컬러 스트라이프 */
.header-stripe-wrap {
  width: 100%;
  height: 12px;
  margin-top: 8px;
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
  border: none !important;
  border-bottom: none !important;
  outline: none;
  line-height: 0;
  background-repeat: repeat-x;
  background-size: 120px 12px;
  background-position: left center;
}
.header-stripe-wrap::after {
  display: none;
}


/* 메인 콘텐츠 */
.site-main {
  flex: 1;
  padding: 3px 24px 24px 24px;
}

/* 푸터 */
.site-footer {
  padding: 24px;
  border: none;
  box-shadow: none;
}
.site-footer::before {
  content: '';
  display: block;
  border-top: 1px solid #ddd;
  margin-bottom: 24px;
}

.site-footer p {
  font-size: 12px;
  font-weight: normal;
  color: #666;
  margin: 0;
}

.site-footer .brand-cmyk {
  background: linear-gradient(135deg, #0095D6 0%, #E6007E 35%, #FFD400 65%, #000000 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 헤더 로고 링크 */
/* CMYK 타이틀 - 사선 그라데이션 */
.site-title-cmyk a {
  background: linear-gradient(135deg, #0095D6 0%, #E6007E 35%, #FFD400 65%, #000000 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
}

.site-title-cmyk a:hover {
  opacity: 0.9;
}

.site-header h1 a:hover {
  text-decoration: none;
}

/* ===== 폼 스타일 ===== */
.form-inline-dup {
  display: flex;
  gap: 8px;
  align-items: center;
}
.form-inline-dup input {
  flex: 1;
  min-width: 0;
}

.form-join {
  max-width: 400px;
  margin-top: 24px;
}

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

.form-group label {
  display: block;
  margin-bottom: 4px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="tel"] {
  width: 100%;
  padding: 8px;
  font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
  font-size: 14px;
  border: 1px solid #ddd;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  width: 100%;
  padding: 8px;
  font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
  font-size: 14px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

.form-group input[type="password"]:focus {
  outline: 1px solid #333;
  outline-offset: 0;
}

.form-options {
  display: flex;
  gap: 16px;
}

.form-options label,
.form-checkboxes label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.form-checkboxes {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.form-group-role p {
  margin: 4px 0 0 0;
  color: #666;
}

.form-actions {
  margin-top: 24px;
  display: flex;
  gap: 8px;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
  border: 1px solid #333;
  background: #fff;
  color: #333;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: #f5f5f5;
}

.btn-danger {
  border-color: #999;
  color: #666;
}

.btn-danger:hover {
  border-color: #c00;
  color: #c00;
}

.btn-outline {
  border: 1px solid #ddd;
  background: #fff;
}

/* 회원정보 페이지 */
.member-info {
  margin: 24px 0;
}

.member-actions {
  margin-top: 24px;
  display: flex;
  gap: 8px;
}

.login-bottom-actions {
  margin-top: 24px;
  display: flex;
  gap: 8px;
}

.login-bottom-actions .btn {
  text-decoration: none;
}

.backup-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
}

/* 게시판 */
.board-actions {
  margin: 16px 0;
}

/* 인쇄발주목록 검색·정렬 툴바 */
.order-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 16px;
  padding: 16px;
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 4px;
}
.order-list-toolbar label {
  display: block;
  margin-bottom: 4px;
  font-weight: bold;
}
.order-list-search input {
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  font-size: 14px;
}
.order-list-search-field select,
.order-list-sort select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  font-size: 14px;
  min-width: 140px;
}
.order-list-sort select:first-of-type {
  margin-right: 4px;
}
.order-list-toolbar .order-list-actions {
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0;
}

.table-list {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.table-list th,
.table-list td {
  padding: 10px 12px;
  border: 1px solid #ddd;
  text-align: left;
  font-size: 14px;
}

.table-list thead th {
  background: #f5f5f5;
  font-weight: bold;
}

.table-list tbody tr:hover {
  background: #fafafa;
}

.board-list .col-no { width: 60px; text-align: center; }
.board-list .col-title { width: auto; min-width: 0; }
.board-list .col-author { width: 100px; }
.board-list .col-date { width: 165px; white-space: nowrap; word-break: keep-all; }

.board-list tbody td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-list .col-title a {
  display: inline;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-list td a {
  color: #333;
  text-decoration: none;
}

.board-list td a:hover {
  text-decoration: underline;
}

.order-list-actions {
  margin: 16px 0;
}

.order-list-table .col-no { width: 50px; text-align: center; }

/* 발주목록 상태 표시 */
.text-status-missed { color: #c00; font-weight: 500; }
.text-status-remaining { color: #0066b3; }

.board-list .badge-notice {
  display: inline-block;
  padding: 2px 6px;
  margin-right: 6px;
  font-size: 11px;
  font-weight: bold;
  background: #333;
  color: #fff;
}

.board-view-meta {
  margin: 12px 0;
  color: #666;
}

.board-view-meta span {
  margin-right: 16px;
}

.board-view-content {
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

.board-view-actions {
  margin-top: 16px;
}

.comment-list {
  margin-top: 24px;
}

.comment-item {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.comment-meta {
  color: #666;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: bold;
  margin-right: 8px;
}

.comment-date {
  margin-right: 12px;
}

.btn-reply {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
}

.btn-reply:hover {
  text-decoration: underline;
}

.comment-form .form-group {
  display: flex;
  gap: 8px;
}

.comment-form .form-group input[type="text"]:first-of-type {
  width: 120px;
}

.comment-form .form-group input[type="text"]:last-of-type {
  flex: 1;
  min-width: 200px;
}

.comment-reply-form input[type="text"] {
  padding: 6px;
  font-size: 14px;
  border: 1px solid #ddd;
  margin-right: 4px;
}

/* ===== 인쇄발주작성 세로형 폼 ===== */
.order-form-vertical {
  max-width: 480px;
}

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

.order-form-vertical .form-group label {
  display: block;
  margin-bottom: 4px;
}

.order-form-vertical .form-group input,
.order-form-vertical .form-group select {
  width: 100%;
  padding: 8px;
  font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
  font-size: 14px;
  border: 1px solid #ddd;
  background: #fff;
  box-sizing: border-box;
}

.order-form-vertical .form-group select {
  cursor: pointer;
}

.order-card {
  border: 1px solid #ddd;
  padding: 20px;
  margin-bottom: 24px;
  background: #fafafa;
}

.order-card-title {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: bold;
}

.order-quote-section {
  border: 1px solid #ddd;
  padding: 20px;
  margin-bottom: 24px;
  background: #fafafa;
}

.order-quote-section .order-card-title {
  margin-bottom: 16px;
}

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

.order-quote-input {
  min-width: 320px;
  box-sizing: border-box;
}

.order-datetime-input {
  min-width: 360px;
  margin-top: 4px;
  box-sizing: border-box;
}

.order-bottom-actions {
  margin-top: 24px;
  margin-bottom: 0;
  padding-top: 20px;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.order-actions-top {
  margin-bottom: 24px;
}

.order-submit-buttons {
  display: flex;
  gap: 8px;
}

.order-capture-buttons {
  display: flex;
  gap: 8px;
}

/* 발주목록 상태 표시 */
.text-status-missed { color: #c00; font-weight: 500; }
.text-status-remaining { color: #0066b3; }

/* ===== 인쇄발주목록 스프레드시트 (legacy) ===== */
.order-actions {
  margin: 16px 0;
  display: flex;
  gap: 8px;
}

.order-table-wrap {
  overflow-x: auto;
  border: 1px solid #ddd;
  margin-top: 12px;
}

.order-sheet {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 1100px;
}

.order-sheet th,
.order-sheet td {
  border: 1px solid #ddd;
  padding: 0;
  vertical-align: middle;
}

.order-sheet thead th {
  background: #f5f5f5;
  font-weight: bold;
  font-size: 13px;
  padding: 8px 6px;
  text-align: center;
  white-space: nowrap;
}

.order-sheet tbody td {
  padding: 0;
}

.order-sheet input,
.order-sheet select {
  width: 100%;
  min-width: 70px;
  padding: 6px 8px;
  border: none;
  font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
  font-size: 13px;
  background: #fff;
  box-sizing: border-box;
}

.order-sheet select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}

.order-sheet input:focus,
.order-sheet select:focus {
  outline: 2px solid #333;
  outline-offset: -2px;
  z-index: 1;
  position: relative;
}

.order-sheet .col-no {
  width: 44px;
  min-width: 44px;
  text-align: center;
  background: #f9f9f9;
  padding: 8px !important;
}

.order-sheet .col-del {
  width: 44px;
  text-align: center;
  padding: 4px !important;
}

.btn-del-row {
  width: 28px;
  height: 28px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #666;
  border-radius: 2px;
  padding: 0;
}

.btn-del-row:hover {
  background: #fee;
  border-color: #c00;
  color: #c00;
}

.order-sheet th:nth-child(2) { width: 120px; }
.order-sheet th:nth-child(3) { width: 80px; }
.order-sheet th:nth-child(4) { width: 60px; }
.order-sheet th:nth-child(5) { width: 70px; }
.order-sheet th:nth-child(6) { width: 80px; }
.order-sheet th:nth-child(7) { width: 80px; }
.order-sheet th:nth-child(8) { width: 60px; }
.order-sheet th:nth-child(9) { width: 80px; }
.order-sheet th:nth-child(10) { width: 130px; }
.order-sheet th:nth-child(11) { width: 90px; }
.order-sheet th:nth-child(12) { width: 90px; }

.autocomplete-panel {
  position: absolute;
  z-index: 1000;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-height: 200px;
  overflow-y: auto;
}

.autocomplete-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.autocomplete-panel li {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

.autocomplete-panel li:hover {
  background: #f5f5f5;
}

/* ===== 날짜 선택 캘린더 ===== */
.date-picker-panel {
  z-index: 1001;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 12px;
}

.date-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: bold;
}

.date-picker-prev,
.date-picker-next {
  width: 28px;
  height: 28px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  line-height: 1;
}

.date-picker-prev:hover,
.date-picker-next:hover {
  background: #f5f5f5;
}

.date-picker-table {
  border-collapse: collapse;
  font-size: 13px;
}

.date-picker-table th,
.date-picker-table td {
  border: 1px solid #eee;
  padding: 4px;
  text-align: center;
}

.date-picker-table th {
  background: #f9f9f9;
}

.date-picker-day {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

.date-picker-day:hover {
  background: #f0f0f0;
}

/* 운영자 대시보드 카드 */
.admin-card:hover {
  border-color: #0066cc !important;
  background: #f9fbff;
}
