/* ============================================================
   table.css — 실시간 알림 테이블
   total.html (.table-scroll > table)
   infra_security.html (.img-table)
   network page (.alert-table)
   ============================================================ */

/* ── total.html 테이블 래퍼 ── */
.table-scroll {
  width: 100%;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: auto;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex: 1;
  min-height: 180px;
}

/* ── 공통 테이블 기본 ── */
table {
  width: auto;
  min-width: 100%;
  border-collapse: collapse;
  background: #000;
  table-layout: auto;
}
th {
  text-align: left;
  padding: 14px 18px;
  color: #5c677d;
  font-size: var(--text-sm);
  font-weight: 700;
  background: #0a0a0b;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.4;
}
td {
  padding: 14px 18px;
  border-bottom: 1px solid #1c1f26;
  font-size: var(--text-base);
  font-weight: 400;
  vertical-align: middle;
  line-height: 1.6;
  white-space: nowrap;
  color: #e0e0e0;
}

/* MESSAGE 컬럼도 줄바꿈 없이 가로 스크롤 */
td {
  max-width: none;
}

/* footer-content 내부 테이블 (스크롤 처리) */
.footer-content table {
  display: table;
  width: auto;
  min-width: 100%;
}

/* ── infra_security 전용 테이블 ── */
.img-table { 
  font-size: var(--text-base); 
}
.img-table th { 
  padding: 14px 18px; 
  border-bottom: 1px solid #2d3139; 
  background: #141517; 
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.4;
}
.img-table td { 
  padding: 14px 18px; 
  color: #e0e0e0; 
  vertical-align: middle; 
  white-space: nowrap;
  line-height: 1.6;
  font-size: var(--text-base);
  font-weight: 400;
}

.badge-crit {
  background: #ff1744; 
  color: #000; 
  font-weight: 700;
  padding: 4px 8px; 
  border-radius: 3px; 
  font-size: var(--text-xs);
  display: inline-block; 
  min-width: 70px; 
  text-align: center;
  letter-spacing: 0.3px;
}
.badge-warn {
  background: #ffea00; 
  color: #000; 
  font-weight: 700;
  padding: 4px 8px; 
  border-radius: 3px; 
  font-size: var(--text-xs);
  display: inline-block; 
  min-width: 70px; 
  text-align: center;
  letter-spacing: 0.3px;
}
.badge-norm {
  background: transparent;
  color: var(--green); 
  font-weight: 700;
  padding: 4px 8px; 
  border-radius: 3px; 
  font-size: var(--text-xs);
  display: inline-block; 
  min-width: 70px; 
  text-align: center;
  letter-spacing: 0.3px;
  border: 1px solid var(--green);
}
.cell-time { 
  color: #999; 
  font-family: var(--font-mono); 
  font-size: var(--text-sm); 
  font-weight: 500;
}
.cell-cat {
  color: #90a4ae;
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.cell-src  { 
  color: #fff; 
  font-weight: 600; 
  font-size: var(--text-base);
}
.cell-msg  { 
  color: #e0e0e0; 
  font-size: var(--text-base);
  font-weight: 400;
}

/* ── network 페이지 테이블 ── */
.alert-table { 
  min-width: 0; 
}
.alert-table th { 
  background: #141517; 
  color: var(--text-sub); 
  padding: 14px 18px; 
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.4;
}
.alert-table td { 
  padding: 14px 18px; 
  font-size: var(--text-base); 
  color: #e0e0e0; 
  line-height: 1.6;
  font-weight: 400;
}

/* ── 스크롤 영역 ── */
.alert-scroll {
  flex: 1;
  overflow-y: auto;
  background: #0a0a0b;
  min-height: 0;
}

/* ── Footer Widget 통일 (하단 알림·AI 섹션) ── */
.footer-widget {
  background: #141517;
  border: 1px solid #2d3139;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.footer-header {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  background: #141517;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.footer-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: #90a4ae;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.footer-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 16px;
  border-radius: 2px;
}

.footer-title.alert-title::before {
  background: var(--red);
}

.footer-title.ai-title::before {
  background: var(--purple);
}

.footer-content {
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
  background: #0a0a0b;
  min-height: 0;
}

.footer-content::-webkit-scrollbar { width: 6px; height: 6px; }
.footer-content::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.footer-content::-webkit-scrollbar-track { background: #1a1a1a; }

/* ── Footer 내부 표준 스타일 ── */
.footer-content table,
.footer-content .ai-content,
.footer-content .ai-report {
  font-size: var(--text-base);
  line-height: 1.7;
}

.footer-content th {
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 14px 18px;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

.footer-content td {
  font-size: var(--text-base);
  font-weight: 400;
  padding: 14px 18px;
  line-height: 1.7;
  color: #e0e0e0;
}

.footer-content .ai-item {
  font-size: var(--text-base);
  font-weight: 400;
  padding: 16px 0;
  line-height: 1.7;
  color: #e0e0e0;
}

.footer-content .ai-bullet,
.footer-content .ai-text {
  font-size: var(--text-base);
  line-height: 1.7;
  color: #e0e0e0;
  font-weight: 400;
}
