* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    font-family: 'Segoe UI', 'Malgun Gothic', sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    height: 100vh;
    overflow: hidden;
}

/* Header */
header {
    background: #1e293b;
    padding: 8px 32px;
    border-bottom: 2px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
}
header h1 { font-size: 1.2rem; color: #38bdf8; }
.header-controls { display: flex; align-items: center; gap: 20px; }
.slide-controls label { font-size: 0.9rem; color: #94a3b8; margin-right: 4px; }
.slide-controls select {
    background: #334155; color: #e2e8f0; border: 1px solid #475569;
    padding: 4px 10px; border-radius: 6px; font-size: 0.9rem;
}
.last-update { font-size: 0.85rem; color: #64748b; }

/* 슬라이드 인디케이터 */
.slide-indicator { display: flex; gap: 8px; align-items: center; }
.slide-indicator .dot {
    width: 14px; height: 14px; border-radius: 50%;
    background: #475569; cursor: pointer; transition: all 0.3s;
}
.slide-indicator .dot.active { background: #38bdf8; transform: scale(1.3); }

/* 슬라이드 */
main { height: calc(100vh - 48px); overflow: hidden; }
.slide-container { position: relative; width: 100%; height: 100%; }
.slide {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    padding: 24px 40px;
    opacity: 0; transition: opacity 0.6s ease-in-out;
    pointer-events: none;
    display: flex; flex-direction: column;
}
.slide.active { opacity: 1; pointer-events: auto; }

/* 슬라이드 타이틀 - 컴팩트 */
.slide-title {
    display: flex; align-items: baseline; gap: 16px;
    margin-bottom: 20px; padding-bottom: 10px;
    border-bottom: 3px solid #334155;
}
.slide-title h2 { font-size: 1.8rem; color: #38bdf8; font-weight: 700; }
.ip-label { font-size: 1.1rem; color: #64748b; }

/* 센서 카드 - 1920x1080 TV 최적화 */
.cards {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr 1fr;
    gap: 16px;
}
.card {
    background: #1e293b;
    border-radius: 16px;
    padding: 16px;
    border: 3px solid #334155;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    transition: border-color 0.3s;
}
.card .label {
    font-size: 1.4rem;
    color: #cbd5e1;
    margin-bottom: 8px;
    font-weight: 600;
    white-space: nowrap;
}
.card .value {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}
.card .unit {
    font-size: 1.1rem;
    color: #64748b;
    margin-left: 4px;
    font-weight: 500;
}

/* 상태 색상 - 테두리만, 배경은 통일 */
.card.status-normal  { border-color: #22c55e; }
.card.status-warn    { border-color: #f59e0b; }
.card.status-danger  { border-color: #ef4444; }
.card.status-normal .value { color: #ffffff; }
.card.status-warn .value   { color: #fbbf24; }
.card.status-danger .value { color: #ff6b6b; }
.card.status-none .value   { color: #ffffff; }
.card.status-none { border-color: #475569; }
