/* reset.css */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

ol,
ul,
li {
  list-style: none;
  padding: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  vertical-align: top;
  -webkit-user-drag: none;
  user-select: none;
}

:root {
  /* 컬러 */
  --color-primary: #1976d2; /* 포인트 컬러 */
  --color-secondary: #287ed8; /* 서브 컬러 */
  --color-red: #d82828;
  --color-orange: #f5b041;
  --color-black: #333333; /* 기본 텍스트 */
  --color-white: #ffffff; /* 반전 텍스트(화이트) */
  --color-gray: #aaaaaa; /* 연한 회색 텍스트 */
  --color-border: #e0e0e0; /* 선 색상 */
  --color-bg: #f0f3f7; /* 전체 배경 */

  /* 그림자 */
  --box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);

  /* 폰트 사이즈 */
  --font-size-base: 14px; /* 본문 기본 */
  --font-size-sm: 12px; /* 작은 텍스트, 설명 */
  --font-size-md: 16px; /* 일반 UI 텍스트 */
  --font-size-lg: 20px; /* 타이틀, 버튼 */
  --font-size-xl: 24px; /* 큰 제목 */

  /* 폰트 */
  --font-family-default: 'Noto Sans KR', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

  /* 기타 */
  --border-radius-base20: 20px;
  --border-radius-base10: 10px;
  --border-radius-base5: 5px;
}

body {
  width: 100%;
  height: 100vh;
  display: flex;
  color: var(--color-black);
  background-color: var(--color-bg);
  font-family: var(--font-family-default);
}

/* 공통 input/textarea/select 기본 스타일 */
input[type='text'],
input[type='password'],
input[type='email'],
textarea,
select {
  border: 1px solid var(--color-border, #ccc);
  transition: none;
}

input[readonly],
textarea[readonly],
select[readonly] {
  cursor: pointer;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
  border-color: transparent;
}

input,
textarea,
select {
  border: none;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: none;
}

input[readonly]:focus,
textarea[readonly]:focus,
select[readonly]:focus {
  outline: none !important;
  box-shadow: none !important;
}

.no-anim * {
  transition: none !important;
  animation: none !important;
}
/* Desktop ------------------------------------------ */

.Desktop {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.StockCast {
  position: absolute;
  left: 130px;
  top: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.StockCast a {
  width: 60px;
  height: 60px;
  background: linear-gradient(146deg, #0d47a1, #1976d2, #42a5f5);
  border-radius: var(--border-radius-base10);
  padding: 5px;
  text-align: center;
}

.StockCast img {
  width: 90%;
  object-fit: cover;
}

.StockCast span,
ul.difultImg li span {
  color: var(--color-white);
  font-size: var(--font-size-md);
}

ul.difultImg {
  position: absolute;
  left: 20px;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

ul.difultImg li {
  width: 70px;
  display: flex;
  flex-direction: column;
  text-align: center;
}

ul li.difultImg img {
  width: 100%;
  object-fit: cover;
  padding: 5px;
}

/* login ------------------------------------------------- */

.login,
.join-container {
  position: absolute;
  left: 50%;
  top: 20%;
  transform: translateX(-50%);
}

.login .logo,
.join-container .logo {
  width: 320px;
  margin: 10px auto;
}

.login .logo img,
.join-container .logo img {
  width: 100%;
  object-fit: cover;
}

.login .login-text,
.join-container .join-text {
  width: 500px;
  background-color: white;
  padding: 50px;
  border-radius: var(--border-radius-base10);
  box-shadow: var(--box-shadow);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.login input[type='text'],
.login input[type='password'],
.join-container input[type='text'],
.join-container input[type='password'] {
  width: 100%;
  height: 52px;
  padding: 25px 20px;
  margin-bottom: 20px;
  text-align: left;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-base5);
  font-size: var(--font-size-md);
  box-sizing: border-box;
}

.login .btn,
.join-container .btn {
  width: 100%;
  margin: 0;
  padding: 15px;
  font-size: var(--font-size-md);
}

input[type='text']:focus:not([readonly]),
input[type='email']:focus:not([readonly]),
input[type='password']:focus:not([readonly]),
textarea:focus {
  border-color: var(--color-primary);
  outline: none;
}

.login-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--color-gray);
  font-size: 14px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-gray);
  margin: 0 12px;
}

.social-login {
  margin-bottom: 20px;
}

.google-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  background-color: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s;
}

.google-login img {
  width: 20px;
  height: 20px;
}

.login-links {
  text-align: center;
  font-size: 14px;
}

.login-links .forgot {
  display: block;
  margin: 12px 0 8px;
  color: var(--color-primary);
  text-decoration: none;
}

.login-links .forgot:hover {
  text-decoration: underline;
}

.login-links .join {
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.login-links .join:hover {
  text-decoration: underline;
}

.error-msg {
  margin-top: -18px;
  margin-left: 5px;
  font-size: var(--font-size-sm);
  color: var(--color-red);
}

/* modal ------------------------------------------------- */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
}

.modal-content {
  position: absolute;
  top: 27%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  width: 480px;
  padding: 20px;
  /* margin: 100px auto; */
  border-radius: var(--border-radius-base10);
  text-align: center;
}

.modal-content .modal-title {
  /* position: relative; */
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.modal-content .modal-title img {
  width: 25px;
  /* position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 70px; */
  object-fit: cover;
}

.modal-content .low-stock-name {
  width: 40%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-content .stock-count {
  width: 55%;
}

.modal-content .closeBtn {
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: var(--font-size-xl);
  position: absolute;
  right: 25px;
  top: 20px;
}

.lowStockList-box {
  height: 300px;
  padding: 10px;
  margin-top: 20px;
  border-radius: var(--border-radius-base10);
  border: 1px solid var(--color-border);
  overflow-y: auto;
}

ul.stock-card-list {
  overflow: hidden;
}

ul.stock-card-list li {
  border-bottom: 1px solid var(--color-border);
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

ul.stock-card-list li p:nth-child(1) {
  font-weight: 500;
}

ul.stock-card-list li p span {
  color: #d9534f;
}

/* -header : 헤더 메인 ------------------------------------------------ */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background-color: var(--color-primary);
  color: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  z-index: 999;
}

header .logo {
  height: 10%;
}

header .logo img {
  width: 100%;
  padding: 10px 0;
}

header .admin {
  width: 100%;
  height: 10%;
  border-bottom: 1px solid var(--color-white);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-md);
  margin-bottom: 20px;
}

header .admin h2 {
  width: 70px;
  text-align: right;
  font-size: var(--font-size-md);
}

header .admin .alert {
  position: relative;
  width: 25px;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

header .admin .alert .alert-count {
  width: 18px;
  height: 18px;
  position: absolute;
  right: -8px;
  top: -8px;
  background-color: var(--color-white);
  color: var(--color-primary);
  border-radius: 50%;
  line-height: 18px;
  font-size: var(--font-size-sm);
}

header .admin .alert img {
  width: 100%;
  object-fit: cover;
  transition: filter 0.4s ease-in-out;
}

header .admin .alert:hover img {
  filter: drop-shadow(0 0 5px #42a5f5) drop-shadow(0 0 10px #42a5f5) drop-shadow(0 0 15px #1976d2)
    drop-shadow(0 0 20px #42a5f5) drop-shadow(0 0 25px #1565c0);
}

header nav {
  height: 65%;
}

header nav > ul {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

header nav ul li.main-menu.on > a {
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-radius: var(--border-radius-base10);
}

header nav ul li.main-menu > a,
header nav ul li.main-menu > div {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  padding: 10px;
}

header nav ul li.main-menu > a img {
  width: 30px;
  object-fit: cover;
}

header nav ul .sub-menu {
  display: none;
}

header nav ul .sub-menu li {
  font-size: var(--font-size-md);
  padding: 10px;
  color: rgba(255, 255, 255, 0.5);
  transition: background-color 0.35s ease, color 0.35s ease;
}

header nav ul .sub-menu li.on {
  color: var(--color-white);
  display: block;
}

header nav ul .sub-menu li:hover {
  color: var(--color-white);
}

header .userContext {
  height: 15%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: var(--font-size-md);
  color: rgba(255, 255, 255, 0.5);
}

header .userContext .on {
  color: var(--color-white);
}

/* container : 헤더 오른쪽 화면 ------------------------------------------------- */
.container {
  padding: 50px 80px;
  margin-left: 220px;
  flex: 1;
  height: 100vh;
  overflow: hidden;
}

.containerAuto {
  padding: 50px 80px;
  margin-left: 220px;
  flex: 1;
  height: 100%;
  overflow-y: auto;
}

/* button ------------------------------------------------- */
.btn {
  padding: 5px 10px;
  font-size: var(--font-size-base);
  background-color: transparent;
  border: none;
  border-radius: var(--border-radius-base5);
  cursor: pointer !important;
  transition: 0.35s;
  /* height: 30.5px; */
}

.submit-btn {
  padding: 7px 12px;
  background-color: var(--color-secondary);
  color: var(--color-white);
  transition: background-color 0.35s ease;
  border: none;
}

.submit-btn:hover {
  background-color: #1f6cb8;
}

.cencle-btn {
  border: 1px solid var(--color-border);
  color: var(--color-gray);
  transition: 0.35s ease;
}

.cencle-btn:hover {
  border: 1px solid var(--color-secondary);
  color: var(--color-secondary);
}

.btn-box {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-blue {
  border: 1px solid var(--color-secondary);
  color: var(--color-secondary);
}

.btn-blue:hover {
  border: 1px solid var(--color-secondary);
  background-color: var(--color-secondary);
  color: var(--color-white);
}

/* 발주서 진행상황 button ------------------------------------------------- */
.statusBtn {
  display: inline-block;
  width: 56px;
  padding: 5px 0;
  text-align: center;
  font-size: var(--font-size-base);
  background-color: transparent;
  border-radius: var(--border-radius-base5);
}

.btn-red {
  border: 1px solid var(--color-red);
  color: var(--color-red);
}

.btn-red:hover {
  background-color: var(--color-red);
  color: var(--color-white);
}

.btn-blue-b {
  border: 1px solid var(--color-secondary);
  background-color: var(--color-secondary);
  color: var(--color-white);
}

.btn-red-b {
  border: 1px solid var(--color-red);
  background-color: var(--color-red);
  color: var(--color-white);
}

.btn-orange-b {
  border: 1px solid var(--color-orange);
  background-color: var(--color-orange);
  color: var(--color-white);
}

/* title ------------------------------------------------- */

.title-box .title {
  font-size: var(--font-size-xl);
}

.title-box .sub-title {
  font-size: var(--font-size-md);
  color: var(--color-gray);
}

/* 제목 영역 높이 고정 */
.title-box {
  height: 15%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

/* main page ------------------------------------------------- */
.section1,
.section2 {
  display: flex;
  gap: 32px;
  height: 50%;
}

.section1 .weather-box,
.section1 .traffic-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--color-white);
  border-radius: var(--border-radius-base10);
  box-shadow: var(--box-shadow);
  padding: 30px 50px;
  overflow: hidden;
}

.section2 .sales-chart-box,
.section2 .ranking-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--color-white);
  border-radius: var(--border-radius-base10);
  box-shadow: var(--box-shadow);
  padding: 30px;
  overflow: hidden;
}

.section1 .weather-box,
.section1 .traffic-box {
  width: 50%;
}

.section2 .sales-chart-box {
  width: 70%;
}

.section2 .ranking-box {
  width: 30%;
}

.weather-box .weather-content,
.traffic-box .traffic-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60%;
}

.weather-box .weather-content img,
.traffic-box .traffic-content img {
  width: 130px;
  height: auto;
  object-fit: cover;
}

.temperature {
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.temperature .box-title {
  font-size: var(--font-size-lg);
}

.temperature strong {
  font-size: 38px;
  font-weight: 500;
}

.recommend-banner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 40%;
}

.banner-title {
  font-size: var(--font-size-md);
  font-weight: 600;
}

.recommend-text {
  font-size: var(--font-size-lg);
  line-height: 1.5;
}

.recommend-text span {
  color: var(--color-primary);
}

.banner-buttons {
  display: flex;
  gap: 10px;
}

.banner-buttons button {
  width: 50%;
  padding: 10px;
}

/* chart, ranking */
.sales-chart-box .title,
.ranking-box .title {
  font-size: var(--font-size-xl);
  text-align: center;
  height: 15%;
  font-weight: 500;
}

ul.ranking {
  width: 100%;
  height: 85%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: var(--font-size-lg);
}

ul.ranking li {
  display: flex;
  gap: 15px;
  background-color: var(--color-bg);
  border-radius: var(--border-radius-base5);
  padding: 12px;
}

ul.ranking li span {
  width: 28px;
  height: 28px;
  text-align: center;
  background-color: var(--color-gray);
  color: var(--color-white);
  border-radius: 50%;
  line-height: 25px;
  font-size: var(--font-size-md);
}

ul.ranking li:nth-child(1) span,
ul.ranking li:nth-child(2) span,
ul.ranking li:nth-child(3) span {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

/* 수익. 비용 통계 차트  -------------------------------------*/
.sales-chart-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sales-chart-box .chart-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
}

.sales-chart-box .chart-box {
  width: 100%;
}
.sales-chart-box #moneyChart {
  margin-top: 20px;
  width: 100% !important;
  height: 240px !important;
}

.sales-chart-box .chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  font-size: 14px;
}

.sales-chart-box .chart-legend .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
}

.sales-chart-box .chart-legend .revenue {
  background-color: var(--color-primary);
}

.sales-chart-box .chart-legend .expense {
  background-color: var(--color-red);
}

/* 아래 영역(검색+테이블+페이징) -------------------------------------*/
.section-wrap {
  height: auto;
  display: flex;
  flex-direction: column;
}

.section-wrap100 {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.section-wrap85 {
  height: 85%;
  display: flex;
  flex-direction: column;
}

.section-wrap80 {
  height: 80%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 테이블 ------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  background-color: var(--color-white);
}

.table-container {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  height: calc(100% - 80px);
  min-height: 600px;
}

th,
td {
  height: 55px;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-md);
}

th {
  background-color: var(--color-secondary);
  color: var(--color-white);
  font-weight: bold;
}

/* 상품 테이블 ------------------------------------------------- */
.product-table th input,
.product-table td input,
.product-table td select {
  width: 100% !important;
  text-align: center;
}

.product-table th:nth-child(1),
.product-table td:nth-child(1) {
  width: 15%;
  max-width: 150px;
}

.product-table th:nth-child(2),
.product-table td:nth-child(2) {
  width: 13%;
  max-width: 130px;
}

.product-table th:nth-child(3),
.product-table td:nth-child(3) {
  width: 13%;
  max-width: 130px;
}

.product-table th:nth-child(4),
.product-table td:nth-child(4) {
  width: 5%;
  max-width: 50px;
}

.product-table th:nth-child(5),
.product-table td:nth-child(5) {
  width: 18%;
  max-width: 180px;
}

.product-table th:nth-child(6),
.product-table td:nth-child(6) {
  width: 10%;
  max-width: 100px;
}

.product-table th:nth-child(7),
.product-table td:nth-child(7) {
  width: 5%;
  max-width: 50px;
}

.product-table th:nth-child(8),
.product-table td:nth-child(8) {
  width: 10%;
  max-width: 100px;
}

.product-table th:nth-child(9),
.product-table td:nth-child(9) {
  width: 11%;
  max-width: 110px;
}

/* 상품 카테고리 테이블 ------------------------------------------------- */
.productCategory-table th:nth-child(1),
.productCategory-table td:nth-child(1),
.productCategory-table th:nth-child(2),
.productCategory-table td:nth-child(2),
.productCategory-table th:nth-child(3),
.productCategory-table td:nth-child(3) {
  width: 33.33%;
  min-width: 70px;
  word-break: keep-all;
}

.cat-modal {
  width: 900px;
  max-width: calc(100vw - 40px);
  max-height: 82vh;
  padding: 20px 20px 16px;
  border-radius: var(--border-radius-base20);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  box-shadow: none;
}

.cat-modal__columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  min-height: 380px;
}

.cat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  row-gap: 10px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 12px;
  min-height: 320px;
}

.cat-panel__head {
  background: var(--color-bg);
  border: none !important;
  box-shadow: none !important;
  border-radius: var(--border-radius-base5);
  padding: 8px 12px;
  font-weight: 500;
}

.cat-panel__head > span {
  line-height: 1.2;
}

.cat-panel__list {
  overflow-y: auto;
  max-height: calc(70vh - 220px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.category-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-base5);
  background: var(--color-white);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
  box-shadow: none !important;
  color: var(--color-black);
}

.category-button .name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-button .arrow {
  font-size: 18px;
  opacity: 0.55;
}

.category-button:hover,
.category-button:focus,
.category-button:focus-visible {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  outline: none;
  background: var(--color-white);
}
.category-button.active {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  background: var(--color-white);
  box-shadow: none;
}

.cat-panel__input {
  margin-top: 0;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-base5);
  font-size: var(--font-size-base);
  background: var(--color-white);
  color: var(--color-black);
}

.cat-panel__input:focus {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  outline: none;
  box-shadow: none;
}

.cat-panel__input:disabled {
  background: var(--color-bg);
  color: var(--color-gray);
}

.cat-modal__footer {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 10px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}
.cat-modal__footer .category-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-white);
  color: var(--color-black);
}
.cat-modal__footer .category-input:disabled {
  background: var(--color-bg);
  color: var(--color-gray);
}
.cat-modal__footer .category-input:focus {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  outline: none;
  box-shadow: none;
}

.cat-modal__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-modal__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-modal__close {
  width: 34px;
  height: 34px;
  font-size: 22px;
  line-height: 1;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
}
.cat-modal__close:hover {
  background: var(--color-bg);
}

/* 반응형 */
@media (max-width: 960px) {
  .cat-modal__columns {
    grid-template-columns: 1fr;
  }
}

/* 재고현황 목록 테이블 ------------------------------------------------- */

.stock-table th,
.stock-table td {
  border: 1px solid var(--color-border);
}

.stock-table {
  table-layout: fixed;
  width: 100%;
}

/* 대분류, 중분류, 상품명 */
.stock-table th:nth-child(1),
.stock-table td:nth-child(1), /* 대분류 */
.stock-table th:nth-child(2),
.stock-table td:nth-child(2), /* 중분류 */
.stock-table th:nth-child(4),
.stock-table td:nth-child(4) /* 상품명 */ {
  width: 2%;
  min-width: 70px;
  word-break: keep-all;
}

/* 상품코드 + 모든 수량*/
.stock-table th:nth-child(3),
.stock-table td:nth-child(3), /* 상품코드 */
 /* 입고 수량 */
.stock-table th:nth-child(11),
.stock-table td:nth-child(11), /* 출고 수량 */
.stock-table th:nth-child(14),
.stock-table td:nth-child(14) /* 기말 재고수량 */ {
  width: 1%;
  min-width: 20px;
}

/* 모든 단가·금액 */
.stock-table th:nth-child(5),
.stock-table td:nth-child(5), /* 기초 재고수량 */
.stock-table th:nth-child(8),
.stock-table td:nth-child(8),
.stock-table th:nth-child(6),
.stock-table td:nth-child(6), /* 기초 재고단가 */
.stock-table th:nth-child(7),
.stock-table td:nth-child(7), /* 기초 재고금액 */
.stock-table th:nth-child(9),
.stock-table td:nth-child(9), /* 입고 단가 */
.stock-table th:nth-child(10),
.stock-table td:nth-child(10), /* 입고 금액 */
.stock-table th:nth-child(12),
.stock-table td:nth-child(12), /* 출고 단가 */
.stock-table th:nth-child(13),
.stock-table td:nth-child(13), /* 출고 금액 */
.stock-table th:nth-child(15),
.stock-table td:nth-child(15), /* 기말 재고단가 */
.stock-table th:nth-child(16),
.stock-table td:nth-child(16) /* 기말 재고금액 */ {
  width: 3%;
  max-width: 70px;
}

/* 발주 현황 테이블 ------------------------------------------------- */
.orderStmt-table th:nth-child(1),
.orderStmt-table td:nth-child(1) {
  width: 8%; /* 발주번호 */
  max-width: 80px;
}

.orderStmt-table th:nth-child(2),
.orderStmt-table td:nth-child(2) {
  width: 12%; /* 발주일자 */
  max-width: 120px;
}

.orderStmt-table th:nth-child(3),
.orderStmt-table td:nth-child(3) {
  width: 15%; /* 거래처명 */
  max-width: 150px;
}

.orderStmt-table th:nth-child(4),
.orderStmt-table td:nth-child(4) {
  width: 8%; /* 수량 */
  max-width: 80px;
}

.orderStmt-table th:nth-child(5),
.orderStmt-table td:nth-child(5) {
  width: 12%; /* 총금액 */
  max-width: 120px;
}

.orderStmt-table th:nth-child(6),
.orderStmt-table td:nth-child(6) {
  width: 10%; /* 상태 */
  max-width: 100px;
}

.orderStmt-table th:nth-child(7),
.orderStmt-table td:nth-child(7) {
  width: 10%; /* 발주서 버튼 */
  max-width: 100px;
}

/* 입고관리  테이블 ------------------------------------------------- */
.saleStmt-table th:nth-child(1),
.saleStmt-table td:nth-child(1) {
  width: 8%;
}

.saleStmt-table th:nth-child(2),
.saleStmt-table td:nth-child(2) {
  width: 12%;
}

.saleStmt-table th:nth-child(3),
.saleStmt-table td:nth-child(3) {
  width: 15%;
}

.saleStmt-table th:nth-child(4),
.saleStmt-table td:nth-child(4) {
  width: 8%;
}

.saleStmt-table th:nth-child(5),
.saleStmt-table td:nth-child(5) {
  width: 12%;
}

.saleStmt-table th:nth-child(6),
.saleStmt-table td:nth-child(6) {
  width: 10%;
}

/* 거래처관리 테이블 ------------------------------------------------- */
.client-table th:nth-child(1),
.client-table td:nth-child(1) {
  width: 6%;
  max-width: 60px;
}

.client-table th:nth-child(2),
.client-table td:nth-child(2) {
  width: 12%;
  max-width: 120px;
}

.client-table th:nth-child(3),
.client-table td:nth-child(3) {
  width: 15%;
  max-width: 150px;
}

.client-table th:nth-child(4),
.client-table td:nth-child(4) {
  width: 6%;
  max-width: 60px;
}

.client-table th:nth-child(5),
.client-table td:nth-child(5) {
  width: 15%;
  max-width: 150px;
}

.client-table th:nth-child(6),
.client-table td:nth-child(6) {
  width: 12%;
  max-width: 120px;
}

.client-table th:nth-child(7),
.client-table td:nth-child(7) {
  width: 12%;
  max-width: 120px;
}

.client-table th:nth-child(8),
.client-table td:nth-child(8) {
  width: 15%;
  max-width: 150px;
}

/* form 태그 ------------------------------------------------- */
.form-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dateForm,
.searchForm {
  display: flex;
  align-items: center;
  gap: 5px;
}

input[type='date'],
input[type='text'],
input[type='number'],
input[readonly],
select {
  font-size: var(--font-size-md);
  text-align: center;
  color: var(--color-black);
  background-color: var(--color-white);
  outline: none;
  box-shadow: none;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: none;
}

/* 달력 인풋 & 텍스트 인풋 ------------------------------------------------- */
.form-container input[type='date'],
.form-container input[type='text'] {
  padding: 5px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-base5);
  font-size: var(--font-size-base);
}

.form-container input[type='date'] {
  padding: 5px 20px;
}

/* 페이징 ------------------------------------------------- */
.paging {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.paging a,
.paging span {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--border-radius-base5);
  border: 1px solid var(--color-border);
  background-color: var(--color-white);
  color: var(--color-black);
  font-size: var(--font-size-md);
  text-decoration: none;
  transition: all 0.35s ease;
  cursor: pointer;
}

.paging a:hover {
  border-color: var(--color-secondary);
  color: var(--color-primary);
}

/* 현재 페이지 */
.paging .page {
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-color: var(--color-secondary);
  cursor: default;
}

.paging span.disabled {
  color: var(--color-gray);
  border-color: var(--color-border);
  background-color: var(--color-bg);
  cursor: not-allowed;
}

/* 거래명세서 css ------------------------------------------------- */

.detail-header {
  display: flex;
  justify-content: flex-end;
}

.clientsName {
  width: 50%;
}

.clientsName th {
  width: 25%;
}

/* 발주서 css ------------------------------------------------- */
.orderSummary {
  margin-top: 20px;
  border: 1px solid var(--color-border);
}

.orderSummary th {
  width: 12.5%;
}

.orderItems tr {
  border: 1px solid var(--color-border);
}

.orderItems {
  width: 100%;
  table-layout: fixed !important;
  border: 1px solid var(--color-border);
  border-collapse: collapse;
}

.orderItems th,
.orderItems td {
  border: 1px solid var(--color-border);
  text-align: center;
  vertical-align: middle;
  padding: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orderItems th:nth-child(1),
.orderItems td:nth-child(1) {
  min-width: 50px;
  width: 5%;
}

.orderItems th:nth-child(2),
.orderItems td:nth-child(2) {
  min-width: 200px;
  width: 25%;
}

.orderItems th:nth-child(3),
.orderItems td:nth-child(3) {
  min-width: 120px;
  width: 15%;
}

.orderItems th:nth-child(4),
.orderItems td:nth-child(4) {
  min-width: 80px;
  width: 10%;
}

.orderItems th:nth-child(5),
.orderItems td:nth-child(5) {
  min-width: 150px;
  width: 20%;
}

.clientsName select,
.clientsName input,
.orderItems select,
.orderItems input {
  width: 100% !important;
  box-sizing: border-box;
}

table.orderSummary td,
table.orderItems td {
  text-align: center;
  vertical-align: middle;
}

.item-select,
.count-input {
  cursor: pointer;
}

input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.order-detail-box {
  height: 300px;
}

.order-items-box {
  height: 500px;
}

/* 발주 상세페이지 ------------------------------------------------- */
.section-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px;
}

.section-box {
  background-color: var(--color-white);
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
  font-size: var(--font-size-base);
  padding-bottom: 10px;
}

.section-box1 {
  height: 310px;
  min-height: 310px;
}

.section-box2 {
  height: calc(100% - 350px);
  min-height: 310px;
}

.section-header {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 20px;
  font-size: var(--font-size-md);
  font-weight: bold;
}

.section-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-body .row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.section-body .col {
  width: 30%;
}

.section-body .label {
  font-weight: 500;
  padding: 10px 0;
  font-size: var(--font-size-md);
}

.section-body .value {
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
}

.accountNum {
  margin-bottom: 20px;
}

/* 발주서, 거래명세서, 마이페이지 아래 표 */
.order-item.header,
.sale-item.header,
.mypage-item.header {
  font-weight: 500;
}

.order-items,
.sale-items {
  overflow: hidden;
  height: calc(100% - 63px);
  overflow-y: auto;
  padding: 10px 20px;
}

.mypage-items {
  overflow: hidden;
  height: calc(100% - 63px);
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
}

.order-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-md);
}

.sale-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-md);
}

.mypage-item {
  display: grid;
  grid-template-columns:
    minmax(70px, 0.5fr)
    minmax(140px, 1fr)
    minmax(420px, 1.9fr)
    minmax(160px, 1fr)
    minmax(220px, 1fr)
    minmax(90px, 0.6fr);
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-md);
  cursor: pointer;
}

.mypage-item input[type='text'],
.mypage-item input[type='email'] {
  width: 100%;
  min-width: 0;
}

.order-item:last-child,
.sale-item:last-child,
.mypage-item:last-child {
  border-bottom: none;
}

.store-focus {
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-radius: var(--border-radius-base5);
}

.mypage-item {
  cursor: pointer;
}

/* 발주서 작성 ----------------------------------------- */

/* 체크박스 */
.orderItems th:nth-child(1),
.orderItems td:nth-child(1) {
  width: 5%;
  max-width: 50px;
}

/* 대분류, 중분류, 상품명 */
.orderItems th:nth-child(2),
.orderItems td:nth-child(2),
.orderItems th:nth-child(3),
.orderItems td:nth-child(3),
.orderItems th:nth-child(4),
.orderItems td:nth-child(4) {
  width: 20%;
  max-width: 200px;
}

/* 구매단가 */
.orderItems th:nth-child(5),
.orderItems td:nth-child(5) {
  width: 12%;
  max-width: 120px;
}

/* 수량 */
.orderItems th:nth-child(6),
.orderItems td:nth-child(6) {
  width: 10%;
  max-width: 100px;
}

/* 총 금액 */
.orderItems th:nth-child(7),
.orderItems td:nth-child(7) {
  width: 15%;
  max-width: 150px;
}

/* scrollbar -------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
  margin: 5px 0;
}

::-webkit-scrollbar-thumb {
  background-color: var(--color-secondary);
  border-radius: 10px;
  border: 2px solid transparent; /* thumb 내부 여백 */
  background-clip: padding-box; /* border 공간 확보 */
  cursor: pointer;
}

/* select 디자인 ----------------------------------------------------------------------------------- */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
  cursor: pointer;
}

/* 판매 실적 그래프  ---------------------------------------------------------------------------------------- */
/* ho */
.Year-select {
  padding: 5px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-base5);
  font-size: var(--font-size-base);
}

.search-period-info {
  text-align: left;
  height: 20px;
  font-size: var(--font-size-base);
  color: var(--color-black);
}

.chart-container {
  display: flex;
  justify-content: center; /* 가로 중앙 */
  align-items: center; /* 세로 중앙 */
  gap: 20px;
  height: 90%;
}

.chart-card canvas {
  height: 80%;
  width: auto !important;
  max-height: 350px !important;
}

.chart-legend {
  /* height: 20%; */
  display: flex;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: var(--font-size-lg);
  justify-content: center;
}

.dot-0 {
  background: rgba(25, 118, 210, 0.85);
}
.dot-1 {
  background: rgba(40, 126, 216, 0.85);
}
.dot-2 {
  background: rgba(66, 165, 245, 0.85);
}
.dot-3 {
  background: rgba(100, 181, 246, 0.85);
}
.dot-4 {
  background: rgba(144, 202, 249, 0.85);
}
.dot-5 {
  background: rgba(179, 229, 252, 0.85);
}
.dot-6 {
  background: rgba(2, 136, 209, 0.85);
}
.dot-7 {
  background: rgba(3, 155, 229, 0.85);
}
.dot-8 {
  background: rgba(21, 101, 192, 0.85);
}

.line-main {
  background: rgba(25, 118, 210, 1);
}

/*  회계 관리  ---------------------------------------------------------------------------------------- */
.ac-point {
  font-weight: 500;
}

/* 고객 분석  ---------------------------------------------------------------------------------------- */
.chart-box {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.chart-card {
  width: 50%;
  min-width: 500px;
  height: 100%;
  background-color: var(--color-white);
  border-radius: var(--border-radius-base20);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  gap: 20px;
  box-shadow: var(--box-shadow);
}

.chart-title {
  font-size: var(--font-size-xl);
  font-weight: 500;
  height: 10%;
}

.chart-legend {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  font-size: var(--font-size-lg);
}

.chart-legend .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 5px;
}

.chart-card canvas {
  width: auto !important;
  max-height: 350px !important;
}

/* 색상 매칭 */
.dot.male {
  background: rgba(25, 118, 210, 0.8);
}
.dot.female {
  background: rgba(240, 98, 146, 0.8);
}
.dot.age10 {
  background: rgba(25, 118, 210, 0.8);
}
.dot.age20 {
  background: rgba(66, 165, 245, 0.8);
}
.dot.age30 {
  background: rgba(100, 181, 246, 0.8);
}
.dot.age40 {
  background: rgba(144, 202, 249, 0.8);
}

/* 거래처 ---------------------------------------------------------------------------------------------------*/
.client-container {
  position: relative;
}

.modal-content {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 22px;
}

.modal-content label {
  display: block;
  margin-top: 10px;
}

.modal-content input {
  width: 100%;
  padding: 7px 8px;
  margin-top: 5px;
  box-sizing: border-box;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.client-container select {
  width: 170px;
}

.client-container .submit-btn {
  margin: 15px 0 0 0;
}

.client-container .btn-box {
  margin: 15px 0 0 0;
}

.client-container .btn-box .btn {
  width: 50%;
  margin: 0;
}

select {
  padding: 5px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-base5);
}
