/* /dashboard/css/dashboard.css */
:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --line:#e5e7eb;
  --brand:#2563eb;
  --ok:#10b981;
  --warn:#ef4444;
  --off:#9ca3af;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  background:var(--bg);
  color:var(--text);
}
a{color:var(--brand); text-decoration:none}
a:hover{text-decoration:underline}
.container{max-width:1400px; margin:0 auto; padding:18px}
.header{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:12px; margin-bottom:14px;
}
.header h1{margin:0; font-size:24px}
.header .sub{color:var(--muted); margin-top:4px; font-size:13px}
.header .right{
  display:flex; align-items:center; gap:10px; color:var(--muted); font-size:13px;
}
.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; border-radius:999px;
  background:#eef2ff; color:#3730a3;
}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow:0 8px 20px rgba(0,0,0,.04);
}
.card .title{
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  font-weight:700;
}
.card .content{padding:14px}
.filters{
  display:flex; flex-wrap:wrap; gap:10px;
  padding:12px 14px;
}
.filters label{font-size:12px; color:var(--muted); display:block; margin-bottom:6px}
.filters .field{min-width:170px}
.filters input,.filters select{
  width:100%;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
}
.btn{
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  cursor:pointer;
  font-weight:600;
}
.btn.primary{
  background:var(--brand);
  color:#fff;
  border-color:var(--brand);
}
.btn:active{transform:translateY(1px)}
.kpis{
  display:grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap:10px;
  margin:12px 0 14px;
}
.kpi{
  padding:12px 14px;
  display:flex; flex-direction:column; gap:6px;
}
.kpi .label{font-size:12px; color:var(--muted)}
.kpi .value{font-size:20px; font-weight:800}
.grid2{
  display:grid;
  grid-template-columns: 1.05fr 1fr;
  gap:12px;
  align-items:start;
}
@media (max-width: 1100px){
  .kpis{grid-template-columns: repeat(2, minmax(160px, 1fr))}
  .grid2{grid-template-columns:1fr}
}
#map{width:100%; height:520px; border-radius:12px}
.latest-wrap{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}
.latest-item{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  background:#fafafa;
}
.latest-item .k{font-size:12px; color:var(--muted)}
.latest-item .v{font-size:16px; font-weight:800; margin-top:4px}
.status-dot{width:10px; height:10px; border-radius:999px; display:inline-block}
.dot-ok{background:var(--ok)}
.dot-warn{background:var(--warn)}
.dot-off{background:var(--off)}
.chartbox{height:280px}
.small{font-size:12px; color:var(--muted)}
.table-wrap{padding:14px}
.table-wrap table{width:100%}
.img-panel{
  display:flex; gap:12px; align-items:flex-start; flex-wrap:wrap;
}
.img-panel img{
  width:520px; max-width:100%;
  border-radius:12px; border:1px solid var(--line);
  background:#fff;
}
.thumb-list{
  display:flex; flex-direction:column; gap:8px;
}
.thumb-list img{
  width:140px; height:90px; object-fit:cover;
  border-radius:10px; border:1px solid var(--line);
  cursor:pointer;
}
.notice{
  padding:10px 14px;
  background:#fffbeb;
  border:1px solid #fde68a;
  border-radius:12px;
  color:#92400e;
  font-size:13px;
}

/* ================================
   공통 데이터 테이블 스타일
   (메인 / 상세 페이지 공용)
================================ */

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* 헤더 */
.data-table thead th {
  background: #f1f5f9;
  color: #1f2937;
  font-weight: 600;
  padding: 10px 12px;
  text-align: center;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

/* 본문 셀 */
.data-table tbody td {
  padding: 9px 12px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  white-space: nowrap;
}

/* 줄무늬 (zebra) */
.data-table tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

/* hover 효과 */
.data-table tbody tr:hover {
  background-color: #e0f2fe;
  transition: background-color 0.15s ease-in-out;
}

/* 마지막 줄 border 제거 */
.data-table tbody tr:last-child td {
  border-bottom: none;
}