/* style.css */

/* 기본 리셋 및 본문 스타일 */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  color: #333;
  font-size: 16px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 상단 영역 */
#top_content {
  padding: 20px;
}

.header {
  text-align: center;
  margin-bottom: 20px;
}

.header h3 {
  font-size: 1.5em;
  margin: 0;
  color: #222;
}

/* 네비게이션 바 */
nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background-color: #536DD5;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 20px;
}

nav a {
  flex: 1 1 auto;
  text-align: center;
  padding: 10px 15px;
  text-decoration: none;
  color: #fff;
  font-size: 1em;
  margin: 5px;
  border-radius: 10px;
  background-color: #536DD5;
  transition: background-color 0.3s ease;
}

nav a:hover {
  background-color: #3e4eab;
}

nav a.active {
  background-color: #414A9D;
}

/* main_modify.php 수정버튼 영역 */
.modify-controls {
  text-align: center;
  margin: 0px 0;
}

.modify-controls input[type="submit"] {
  width: 100px;
  padding: 4px;
  margin: 1px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.modify-controls input[type="submit"] {
  background-color: #536DD5;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.modify-controls input[type="submit"]:hover {
  background-color: #3e4eab;
}


/* 검색/컨트롤 영역 (상단 메뉴바와 리스트 사이) */
.search-controls {
  text-align: center;
  margin: 20px 0;
}

.search-controls input[type="date"],
.search-controls input[type="text"],
.search-controls select,
.search-controls input[type="submit"],
.search-controls input[type="button"] {
  padding: 8px;
  margin: 5px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.search-controls input[type="submit"],
.search-controls input[type="button"] {
  background-color: #536DD5;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-controls input[type="submit"]:hover,
.search-controls input[type="button"]:hover {
  background-color: #3e4eab;
}

/* 탭 인터페이스 (main_all.php 전용) */
.tab-container {
  margin: 20px auto;
  width: 95%;
}

.tabs {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0 0 20px 0;
  border-bottom: 2px solid #ddd;
}

.tabs .tab {
  padding: 10px 20px;
  cursor: pointer;
  font-size: 16px;
  color: #536DD5;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  margin: 0 5px;
}

.tabs .tab:hover {
  color: #3e4eab;
}

.tabs .tab.active {
  border-bottom: 2px solid #536DD5;
  font-weight: bold;
  color: #536DD5;
}

/* device-group 영역 (테이블 포함) */
.device-group {
  margin: 20px auto;
  width: 95%;
  text-align: center;
}

/* 통합 테이블 디자인 (main_all.php의 .data-table 및 main_list.php의 .list-table 적용) */
.data-table,
.list-table {
  width: 85%;
  margin: 20px auto;
  border-collapse: collapse;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 1px solid #ddd;
  font-family: Arial, sans-serif;
}

.data-table thead,
.list-table thead {
  background-color: #536DD5;
  color: #fff;
}

.data-table thead th,
.list-table thead th {
  padding: 12px 15px;
  font-size: 16px;
  border: 1px solid #ddd;
  text-align: center;
}

.data-table tbody td,
.list-table tbody td {
  padding: 12px 15px;
  border: 1px solid #ddd;
  text-align: center;
  font-size: 14px;
}

.data-table tbody tr,
.list-table tbody tr {
  border-bottom: 1px solid #ddd;
  transition: background-color 0.3s ease;
}

.data-table tbody tr:nth-child(even),
.list-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.data-table tbody tr:hover,
.list-table tbody tr:hover {
  background-color: #f1f1f1;
}

/* 페이지 번호 (main_list.php) */
#page_num {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

#page_num ul {
  list-style: none;
  padding: 0;
  display: inline-block;
}

#page_num ul li {
  display: inline;
  margin: 0 5px;
}

/* 반응형 디자인 */
@media (max-width: 600px) {
  .search-controls input[type="date"],
  .search-controls input[type="text"],
  .search-controls select,
  .search-controls input[type="submit"],
  .search-controls input[type="button"] {
    width: 90%;
    max-width: 300px;
  }
  
  nav a {
    margin: 5px;
    font-size: 0.9em;
  }
}