/* ==========================================================
   CMSKoreaERP 접수대장 - 복제 스타일시트
   ========================================================== */
:root{
  --header-bg:#1e1e1e;
  --header-active:#e67e22;
  --sidebar-bg:#2c3e50;
  --sidebar-bg-dark:#233140;
  --sidebar-active:#1a252f;
  --sidebar-text:#c5d0da;
  --sidebar-text-active:#ffffff;
  --accent-blue:#2980b9;
  --accent-blue-hover:#2471a3;
  --table-header-bg:#f8f9fa;
  --border-color:#e0e0e0;
  --text-main:#333333;
  --text-sub:#555555;
  --text-muted:#888888;
  --link-blue:#1a6ec7;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:'Noto Sans KR','맑은 고딕',sans-serif;
  color:var(--text-main);
  background:#eef1f4;
  font-size:13px;
  min-height:100vh;
}

/* ===== Header ===== */
.top-header{
  height:52px;
  background:var(--header-bg);
  display:flex;
  align-items:center;
  padding:0 16px;
  color:#fff;
  position:sticky;
  top:0;
  z-index:100;
}
.logo-area{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:700;
  font-size:16px;
  min-width:200px;
}
.logo-area i{color:#e67e22;font-size:18px;}
.logo-text{white-space:nowrap;}

.top-nav{
  display:flex;
  flex:1;
  height:100%;
  margin-left:16px;
  justify-content:flex-end;
}
.top-nav-item{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 22px;
  color:#cfd3d6;
  text-decoration:none;
  font-size:13px;
  height:100%;
  white-space:nowrap;
  transition:background .15s;
}
.top-nav-item:hover{background:#333;color:#fff;}
.top-nav-item.active{
  background:var(--header-active);
  color:#fff;
  font-weight:600;
}

.top-icons{
  display:flex;
  align-items:center;
  gap:18px;
  margin-left:auto;
  padding-left:16px;
  font-size:16px;
  color:#cfd3d6;
}
.top-icons i{cursor:pointer;transition:color .15s;}
.top-icons i:hover{color:#fff;}

/* ===== App Body Layout ===== */
.app-body{
  display:flex;
  min-height:calc(100vh - 52px - 34px);
}

/* ===== Sidebar ===== */
.sidebar{
  width:220px;
  background:var(--sidebar-bg);
  color:var(--sidebar-text);
  flex-shrink:0;
  padding-bottom:20px;
}
.sidebar-top{
  padding:14px 16px;
  border-bottom:1px solid #3a4b5c;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.sidebar-alltab{
  font-size:11px;
  color:#8ea0b3;
}
.sidebar-current{
  font-size:15px;
  font-weight:700;
  color:#fff;
}

.sidebar-menu{padding-top:6px;}
.menu-group{border-bottom:1px solid #33455780;}
.menu-divider{
  height:0;
  margin:10px 16px;
  border-top:1px solid #46617a;
}
.menu-title{
  width:100%;
  background:none;
  border:none;
  color:var(--sidebar-text);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 16px;
  font-size:13px;
  cursor:pointer;
  font-family:inherit;
}
.menu-title span{display:flex;align-items:center;gap:8px;}
.menu-title:hover{background:#31465c;color:#fff;}
.menu-group.open > .menu-title{
  background:var(--sidebar-active);
  color:#fff;
  font-weight:600;
}
.chevron{font-size:11px;transition:transform .2s;}

.submenu{
  list-style:none;
  margin:0;
  padding:0;
  background:#233140;
  overflow:hidden;
  max-height:500px;
  transition:max-height .25s ease;
}
.submenu.collapsed{max-height:0;}
.submenu li{margin:0;}
.submenu-item{
  display:block;
  padding:10px 16px 10px 40px;
  color:#a9b7c5;
  text-decoration:none;
  font-size:12.5px;
  border-left:3px solid transparent;
  transition:background .15s;
}
.submenu-item:hover{background:#2b3d4e;color:#fff;}
.submenu-item.active{
  background:#1a252f;
  color:#fff;
  border-left:3px solid var(--header-active);
  font-weight:600;
}

/* ===== Main Content ===== */
.main-content{
  flex:1;
  padding:16px 20px;
  min-width:0;
}

.breadcrumb{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin-bottom:12px;
}
.page-title{
  font-size:20px;
  font-weight:700;
  color:#222;
}
.breadcrumb-path{
  font-size:12px;
  color:var(--text-muted);
}

.content-panel{
  background:#fff;
  border:1px solid var(--border-color);
  border-radius:4px;
  padding:16px 18px 20px;
}
.content-panel-empty{
  min-height:500px;
}

.panel-desc{
  font-size:13px;
  color:var(--text-sub);
  margin-bottom:14px;
  padding-bottom:12px;
  border-bottom:1px solid var(--border-color);
}
.desc-link{color:var(--link-blue);text-decoration:none;margin-left:4px;}
.desc-link:hover{text-decoration:underline;}

/* Filter bar */
.filter-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:14px;
}
.filter-left{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.filter-select, .filter-date{
  height:32px;
  border:1px solid #d0d5da;
  border-radius:3px;
  padding:0 8px;
  font-size:12.5px;
  color:var(--text-main);
  background:#fff;
}
.filter-select{min-width:110px;}
.filter-date{width:220px;}
.filter-checkbox{
  display:flex;
  align-items:center;
  gap:5px;
  font-size:12.5px;
  color:var(--text-sub);
  margin-left:4px;
  cursor:pointer;
  white-space:nowrap;
}

.btn{
  height:32px;
  border:none;
  border-radius:3px;
  padding:0 16px;
  font-size:12.5px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:inherit;
  transition:background .15s;
}
.btn-primary{
  background:var(--accent-blue);
  color:#fff;
  font-weight:600;
}
.btn-primary:hover{background:var(--accent-blue-hover);}

/* Result bar */
.result-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 2px;
  margin-bottom:6px;
}
.result-count{font-size:12.5px;color:var(--text-sub);}
.result-count strong{color:#d35400;font-size:13.5px;}

/* Table */
.table-wrap{
  overflow-x:auto;
  border:1px solid var(--border-color);
  border-top:2px solid #4a5b6c;
}
.data-table{
  width:100%;
  border-collapse:collapse;
  min-width:900px;
  font-size:12.5px;
}
.data-table thead th{
  background:var(--table-header-bg);
  color:#444;
  font-weight:600;
  padding:9px 8px;
  border-bottom:1px solid var(--border-color);
  border-right:1px solid var(--border-color);
  white-space:nowrap;
  text-align:center;
}
.data-table thead th.sortable{cursor:pointer;user-select:none;}
.data-table thead th.sortable i{font-size:10px;color:#aaa;margin-left:3px;}
.data-table thead th.sortable:hover{background:#eef0f2;}
.sub-head-row th{
  background:var(--table-header-bg);
  font-size:11.5px;
  color:#666;
  border-right:1px solid var(--border-color);
  border-bottom:1px solid var(--border-color);
  padding:6px 8px;
}

.data-table tbody td{
  padding:9px 8px;
  border-bottom:1px solid var(--border-color);
  border-right:1px solid var(--border-color);
  color:var(--text-sub);
  text-align:center;
  white-space:nowrap;
}
.data-table tbody tr:hover{background:#f4f8fb;}
.data-table tbody td.cell-company{
  text-align:left;
  max-width:260px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.data-table tbody td.cell-company a{
  color:var(--link-blue);
  text-decoration:none;
}
.data-table tbody td.cell-company a:hover{text-decoration:underline;}
.data-table tbody td.cell-rep{
  text-align:left;
  max-width:220px;
}
.badge{
  display:inline-block;
  padding:2px 8px;
  border-radius:3px;
  font-size:11.5px;
  font-weight:600;
}
.badge-sent{background:#e8f4fc;color:#2980b9;}
.badge-return{background:#fdecea;color:#c0392b;}

/* Pagination */
.pagination{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:4px;
  margin-top:16px;
}
.pagination button{
  min-width:30px;
  height:30px;
  border:1px solid var(--border-color);
  background:#fff;
  color:var(--text-sub);
  border-radius:3px;
  cursor:pointer;
  font-size:12.5px;
}
.pagination button:hover{background:#f0f3f5;}
.pagination button.active{
  background:var(--accent-blue);
  color:#fff;
  border-color:var(--accent-blue);
  font-weight:600;
}
.pagination button:disabled{
  opacity:.4;
  cursor:not-allowed;
}

/* Footer */
.site-footer{
  background:#3a3a3a;
  color:#bbb;
  text-align:center;
  font-size:11px;
  padding:10px 0;
  letter-spacing:.3px;
}

/* ===== Mobile menu toggle button (hidden on desktop) ===== */
.mobile-menu-toggle{
  display:none;
}

/* ===== Responsive ===== */
@media (max-width: 992px){
  .logo-text{display:none;}
  .top-nav-item{padding:0 12px;font-size:12px;}
  .sidebar{width:180px;}
}

@media (max-width: 768px){
  .top-header{padding:0 10px;}
  .mobile-menu-toggle{
    display:flex;
    align-items:center;
    justify-content:center;
    width:34px;height:34px;
    background:none;border:none;
    color:#fff;font-size:18px;
    cursor:pointer;
    margin-right:8px;
  }
  .top-nav{
    position:fixed;
    top:52px;left:0;right:0;
    background:var(--header-bg);
    flex-direction:column;
    height:auto;
    display:none;
    z-index:99;
  }
  .top-nav.open{display:flex;}
  .top-nav-item{width:100%;padding:12px 16px;justify-content:flex-start;}
  .logo-area{min-width:auto;}
  .logo-text{display:inline;font-size:14px;}

  .app-body{flex-direction:column;}
  .sidebar{
    width:100%;
    position:fixed;
    top:52px;
    left:-260px;
    bottom:0;
    z-index:98;
    transition:left .25s ease;
    overflow-y:auto;
    width:260px;
  }
  .sidebar.open{left:0;box-shadow:2px 0 10px rgba(0,0,0,.3);}
  .sidebar-overlay{
    display:none;
    position:fixed;
    inset:52px 0 0 0;
    background:rgba(0,0,0,.4);
    z-index:97;
  }
  .sidebar-overlay.show{display:block;}

  .main-content{padding:10px;}
  .filter-left{flex-direction:column;align-items:stretch;}
  .filter-select,.filter-date{width:100%;}
  .filter-bar{flex-direction:column;align-items:stretch;}
  .result-bar{flex-direction:column;align-items:flex-start;gap:8px;}
  .content-panel{padding:12px;}
}
