/* ===== CSS RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Noto Sans KR', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(to bottom, #1e3c72, #2a5298);
  color: white;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  border: none;
  outline: none;
  background: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ===== 메뉴바 스타일 ===== */
.navbar {
  background-color: #142b4f;
  padding: 0 20px;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 50px;
  align-items: center;
}

.nav-item {
  margin-right: 20px;
}

.nav-item a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 12px 8px;
  display: block;
  transition: color 0.3s;
}

.nav-item a:hover {
  color: #00f5ff;
}

.nav-item.active a {
  color: #00f5ff;
  border-bottom: 2px solid #00f5ff;
}

  
/* ===== CUSTOM STYLES ===== */
  .container {
    padding: 20px;
  }
  
  h1 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  
  .dropdown, .search-box {
    background-color: #2a3e5f;
    border: 1px solid #465f87;
    padding: 8px 12px;
    color: white;
    border-radius: 4px;
    margin-right: 10px;
  }
  
  .filters {
    display: flex;
    align-items: center;
  }
  
  .btn {
    background: #2866c7;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
  }

  .btn-xs {
    font-size: 12px;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
  }  
  
  .btn.secondary {
    background: #1e3c72;
    border: 1px solid #3f6db3;
  }
  
  table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1c2c44;
    margin-top: 10px;
    border-radius: 6px;
    overflow: hidden;
  }
  
  th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #2d3e58;
    color: white;
  }
  
  th {
    background-color: #243a5c;
  }
  
  tr:nth-child(even) {
    background-color: #223652;
  }
  
  tr.selected {
    background-color: #2a6dbb;
  }

  th:first-child, td:first-child {
    width: 40px;
    text-align: center;
  }

  th:last-child, td:last-child {
    width: 125px;
    text-align: center;
    text-align: center;
    vertical-align: middle;
  }
  
  .status-complete {
    color: #00aaff;
    font-weight: bold;
  }
  
  .status-pending {
    color: #ff4d4d;
    font-weight: bold;
  }
  
  /* === 버튼 컬러 유틸 === */
  .btn-excel {
    background-color: #217346; /* Excel 색상 */
    color: white;
    border: none;
  }

  .btn-excel:hover {
    background-color: #1a5c3a;
  }

  /* 등록 버튼: 어두운 파랑 */
  .btn-success {
    background-color: #2d7fbf;
    color: white;
    border: none;
  }

  .btn-success:hover {
    background-color: #256ba3;
  }

  /* 삭제 버튼: 어두운 빨강 */
  .btn-danger {
    background-color: #c0392b;
    color: white;
    border: none;
  }

  .btn-danger:hover {
    background-color: #a93226;
  }
  

  /* style.css에 추가 */  
  .info-panel {
    margin-top: 20px;
    background: linear-gradient(to bottom, #1d2e44, #0e2c3e);
    padding: 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
  }

  .info-item {
    margin-bottom: 10px;
  }
  
  .label {
    color: #00f5ff;
    font-weight: bold;
    display: inline-block;
    width: 90px;
  }
  
  .footer-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
  }
  
  .status-bar {
    margin-top: 30px;
    background: #1a2a3f;
    padding: 10px 15px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    color: #9db4d2;
    font-size: 14px;
  }
  
  .status-bar .status-title {
    display: flex;
    align-items: center;
  }
  
  .status-bar .status-title::before {
    content: "";
    width: 8px;
    height: 8px;
    background-color: #00f5ff;
    border-radius: 50%;
    margin-right: 8px;
  }

  .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 6px;
  }
  
  .page-btn, .page-number {
    background: #1e3c72;
    color: white;
    border: 1px solid #3f6db3;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
  }
  
  .page-btn:hover, .page-number:hover {
    background: #30599e;
  }
  
  .page-number.active {
    background: #2866c7;
    border-color: #2866c7;
  }

  /* ===== 입력 폼 전용 스타일 ===== */
  .page-layout {
    display: flex;
    /* height: 100vh; */
    align-items: stretch; /* 자식들이 같은 높이로 늘어나도록 */
    min-height: 100vh;    /* 전체 화면 높이 */
  }
  
  .invoice-left {
    width: 55%;
    padding: 20px;
    background-color: #1c2c44;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 100%;
  }


  .invoice-left,
  .invoice-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-grow: 1;
  }
  
  .invoice-right {
    width: 45%;
    padding: 20px;
    background-color: #162232;
    box-sizing: border-box;
    border-left: 1px solid #2a3e5f;
  }
  
  .invoice-title {
    font-size: 24px;
    text-align: center;
    margin-bottom: 15px;
  }

  .invoice-actions {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between; /* 좌우 정렬 */
    align-items: center;
  }
  
  /* 브레드크럼 */
  .breadcrumb-nav {
    margin-bottom: 10px;
  }
  
  .breadcrumb-list {
    list-style: none;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #9db4d2;
    gap: 6px;
    padding: 0;
    margin: 0;
  }
  
  .breadcrumb-list li::after {
    content: '>';
    margin: 0 6px;
    color: #4f6480;
  }
  
  .breadcrumb-list li:last-child::after {
    content: '';
  }
  
  .breadcrumb-list a {
    color: #00f5ff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
  }
  
  .breadcrumb-list .active {
    font-weight: bold;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 4px;
  }
  
  .breadcrumb-icon {
    font-size: 15px;
  }
   /* 브레드크럼 */
  
  .action-buttons {
    display: flex;
    gap: 6px;
  }
  
  .action-buttons .btn {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  
  .line, .footer-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }
  
  .line input, .footer-line input {
    flex: 1;
    background-color: #2a3e5f;
    border: 1px solid #465f87;
    border-radius: 4px;
    color: white;
    padding: 6px;
  }

  .footer-line-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
  }
  
  .footer-line-table td {
    padding: 6px;
    vertical-align: middle;
  }
  
  .spacer {
    flex: 0.3;
  }
  
  .invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
  }
  
  .invoice-table th:nth-child(1),
  .invoice-table td:nth-child(1),
  .invoice-table th:nth-child(2),
  .invoice-table td:nth-child(2) {
    width: 18%; /* 냉동명 - 넓게 */
  }

  .invoice-table th:nth-child(3),
  .invoice-table td:nth-child(3),
  .invoice-table th:nth-child(4),
  .invoice-table td:nth-child(4),
  .invoice-table th:nth-child(5),
  .invoice-table td:nth-child(5),
  .invoice-table th:nth-child(7),
  .invoice-table td:nth-child(7) {
    width: 11%; /* 규격, 단위, 수량 - 좁게 */
  }

  .invoice-table th:nth-child(6),
  .invoice-table td:nth-child(6) {
    width: 18%; /* 기존보다 넓게 설정 */
  }
  
  .invoice-table th:last-child,
  .invoice-table td:last-child {
    width: 40px !important;     /* 강제 적용 */
    max-width: 60px;
    text-align: center;
    padding: 1.5px;
  }  

  .invoice-table tfoot td {
    background-color: #223652;
    padding: 8px;
    font-weight: bold;
    color: #ffffff;
  }  

  .invoice-table th, .invoice-table td {
    border: 1px solid #465f87;
    text-align: center;
    padding: 5px;
  }
  
  .invoice-table input, .invoice-input {
    width: 100%;
    background-color: #2a3e5f;
    border: none;
    color: white;
    padding: 4px 6px;
    height: 26px;
    font-size: 13px;
  }
  
  .unit-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .unit-row input {
    background-color: #2a3e5f;
    border: 1px solid #465f87;
    color: white;
    border-radius: 4px;
    padding: 6px;
    width: 100px;
  }
  
  .icon-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  
  .icon-btn:hover {
    transform: scale(1.1);
    color: #00f5ff;
  }
  
  .invoice-table td:last-child {
    text-align: center;
    width: 80px; /* 좁고 정렬된 버튼 공간 */
  }
  

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

  .form-group input {
    width: 100%;
    padding: 10px;
    background-color: #2a3e5f;
    border: 1px solid #465f87;
    border-radius: 4px;
    color: white;
  }

  .horizontal-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 8px;
  }

  .horizontal-info label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 2px 4px;
    font-size: 14px;
    white-space: nowrap;
  }

  .horizontal-info input[type="checkbox"] {
    appearance: none;
    width: 12px;
    height: 12px;
    padding: 0;
    margin: 0;
    border: 1px solid #ccc;
    background-color: #fff;
    position: relative;
    vertical-align: middle;
    box-sizing: border-box;
  }
  
  .horizontal-info input[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 3px;
    width: 4px;
    height: 6px;
    border: solid #2866c7;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
    display: none;
  }
  
  .horizontal-info input[type="checkbox"]:checked::before {
    display: block;
  }
    
  .btn-outline {
    background-color: transparent;
    border: 1px solid #3f6db3;
    color: white;
  }
  
  .btn-outline:hover {
    background-color: #3f6db3;
  }
  
  hr.divider {
    border: none;
    border-top: 1px solid #3a4a6a; /* 어두운 파란 회색 계열 */
    margin: 15px 0;
    opacity: 0.4; /* 얇고 은은한 느낌 */
  }

  /* 송장 로그 기록 */
  .log-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 145px; /* 원하는 높이 지정 */
    overflow-y: auto;
    overflow-x: hidden;
    border-bottom: 1px solid #2a3e5f;
    padding-right: 8px;
  }
  
  .log-list li {
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px dashed #3a4a6a;
    color: #cfd8e3;
  }
  
  .log-list li strong {
    color: #00f5ff;
  }
  
  .log-list li em {
    color: #ffcc66;
    font-style: normal;
  }

  .memo-textarea {
    width: 100%;
    padding: 10px;
    margin-top: 2%;
    background-color: #2a3e5f;
    border: 1px solid #465f87;
    border-radius: 4px;
    color: white;
    resize: vertical;
    font-size: 14px;
    line-height: 1.4;
  }
  

  /* ===========================
   🔵 로그인 화면 스타일
   전체 페이지에는 영향 없음
   =========================== */

/* 로그인 배경은 로그인 페이지에서만 body에 로그인 클래스 추가해서 사용 */
body.login-page {
    height: 100vh;
    margin: 0;
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(to bottom, #1e3c72, #2a5298);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

/* 로그인 박스 */
.login-container {
    width: 380px;
    background-color: #162232;
    padding: 35px 40px;
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    text-align: center;
}

/* 로고 이미지 */
.login-logo-img {
    width: 120px;
    height: auto;
    margin-bottom: 18px;
}

/* 타이틀 */
.login-title {
    margin-bottom: 18px;
    font-size: 14px;
    color: #cbd5e1;
}

/* 입력창 */
.login-input {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border-radius: 6px;
    background: #2a3e5f;
    border: 1px solid #465f87;
    color: white;
    font-size: 15px;
}

.login-input::placeholder {
    color: #b8c4d9;
}

/* 로그인 버튼 */
.login-btn {
    width: 100%;
    margin-top: 22px;
    padding: 12px;
    background-color: #2866c7;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}

.login-btn:hover {
    background-color: #1f56a8;
}

/* 옵션 */
.login-options {
    margin-top: 15px;
    font-size: 13px;
    color: #b8c4d9;
}

.login-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.login-options input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #2866c7;
}

/* ===========================
   🔵 DASHBOARD
   =========================== */

.dashboard-layout {
    display: flex;
    height: calc(100vh - 50px); /* navbar 제외 */
    background: #1a2535;
}

/* 사이드바 */
.dashboard-sidebar {
    width: 200px;
    background: #141e2e;
    padding: 20px;
    border-right: 1px solid #25354d;
}

.dashboard-sidebar h3 {
    color: #00f5ff;
    margin-bottom: 15px;
}

.dashboard-sidebar ul {
    list-style: none;
    padding: 0;
}

.dashboard-sidebar li {
    padding: 10px 0;
    cursor: pointer;
    color: #b4c6e2;
}

.dashboard-sidebar li.active,
.dashboard-sidebar li:hover {
    color: white;
    font-weight: bold;
}

/* 메인 콘텐츠 */
.dashboard-main {
    flex-grow: 1;
    padding: 25px;
    color: white;
    overflow-y: auto;
}

.dashboard-title {
    font-size: 24px;
    margin-bottom: 25px;
}

/* 카드 위젯 */
.dashboard-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.dash-card {
    flex: 1;
    background: #1f2f44;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #2f4260;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.dash-card h4 {
    color: #00f5ff;
}

.dash-number {
    margin-top: 10px;
    font-size: 26px;
    font-weight: bold;
}

.dash-warn {
    color: #ff7675;
}

/* 하단 2단 그리드 */
.dashboard-lower-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 박스 */
.dash-box {
    background: #1f2f44;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #2f4260;
}

/* 표 */
.dash-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.dash-table th,
.dash-table td {
    padding: 10px;
    border-bottom: 1px solid #2a3e5f;
}

.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.badge-ok { background: #1abc9c; }
.badge-ing { background: #3498db; }

/* 차트 영역 (임시) */
.sample-chart {
    height: 180px;
    background: #142233;
    border-radius: 10px;
    border: 1px solid #2a3e5f;
}



/* ===========================
   🔍 자동완성 검색창
=========================== */
.stats-search-input {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 6px;
}

/* ===========================
   📈 Chart.js 섹션
=========================== */
.chart-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

/* ===========================
   🔔 알림센터 슬라이드 패널
=========================== */
.notify-panel {
    position: fixed;
    top: 0;
    right: -340px;
    width: 320px;
    height: 100vh;
    background: #fff;
    border-left: 2px solid #2866c7;
    box-shadow: -4px 0 12px rgba(0,0,0,0.1);
    padding: 20px;
    transition: 0.3s;
    z-index: 2000;
}

.notify-panel.open {
    right: 0;
}

.notify-panel h4 {
    margin: 0 0 12px 0;
}

#notifyList {
    list-style: none;
    padding: 0;
    max-height: 80vh;
    overflow-y: auto;
}

#notifyList li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

/* overlay */
.notify-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.3);
    z-index: 1900;
}

.notify-overlay.show {
    display: block;
}

/* 닫기 버튼 */
.close-btn {
    margin-top: 10px;
}
