@charset "UTF-8";
/* =========================================================
   유비텍 대시보드 - 벽걸이 키오스크 (Galaxy Tab S3, 1024x768 @DPR2)
   - AMOLED 번인 대비: 검정 계열 배경, 밝은 고정 요소 최소화
   - Android 9 WebView 호환: CSS 변수/Flex/Grid까지만 사용
   ========================================================= */

/* ---------- 전체 레이아웃 ---------- */
.app {
	display: flex;
	flex-direction: column;
	height: 100vh;
	padding: var(--gap);
	gap: var(--gap);
	transition: transform 2s ease;   /* 번인 방지 픽셀 이동 */
}
.grid {
	flex: 1;
	min-height: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: var(--gap);
}

/* ---------- 상단 바 ---------- */
.topbar {
	height: 56px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 8px 0 6px;
}
.clock { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.clock-time { font-size: 40px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.clock-sec { font-size: 18px; color: var(--text-3); font-weight: 600; width: 24px; }
.clock-date { font-size: 17px; color: var(--text-2); margin-left: 8px; }
.brand { font-size: 13px; letter-spacing: 3px; color: var(--text-3); }
.brand b { color: var(--accent); font-weight: 700; opacity: .8; }

.overall {
	display: flex; align-items: center; gap: 10px;
	height: 40px; padding: 0 18px;
	border-radius: 20px;
	font-size: 16px; font-weight: 700;
	background: var(--panel); border: 1px solid var(--line);
	transition: background .4s, color .4s, border-color .4s;
}
.overall .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); }
.overall.is-ok { color: var(--ok); border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.overall.is-ok .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.overall.is-warn { color: var(--warn); border-color: rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .08); }
.overall.is-warn .dot { background: var(--warn); }
.overall.is-down { color: #fff; border-color: var(--down); background: var(--down); }
.overall.is-down .dot { background: #fff; animation: blink 1s infinite; }

/* ---------- 패널 공통 ---------- */
.panel {
	min-height: 0;
	display: flex;
	flex-direction: column;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}
.panel-head {
	flex: none;
	display: flex; align-items: center; gap: 10px;
	height: 46px; padding: 0 14px 0 16px;
	border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 16px; font-weight: 700; white-space: nowrap; }
.panel-link { display: flex; align-items: center; gap: 8px; height: 46px; padding-right: 6px; }
.panel-link .go { font-size: 20px; font-weight: 400; color: var(--text-3); margin-left: -2px; line-height: 1; }
.panel-link:active { opacity: .6; }
.panel-head .updated { margin-left: auto; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.panel-head .updated.is-err { color: var(--warn); }
.panel-body {
	flex: 1; min-height: 0;
	overflow-y: auto;
	padding: 10px 12px;
	scrollbar-width: none;
}
.panel-body::-webkit-scrollbar { display: none; }

.ico { display: inline-block; width: 6px; height: 16px; border-radius: 3px; background: var(--accent); }
.ico-bell { background: var(--info); }
.ico-cal { background: #a78bfa; }
.ico-memo { background: var(--memo); }

.empty { padding: 30px 0; text-align: center; color: var(--text-3); font-size: 14px; }

/* ---------- 1. 헬스체크 ---------- */
.summary { display: flex; gap: 6px; }
.chip { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 10px; background: var(--panel-2); color: var(--text-2); font-variant-numeric: tabular-nums; }
.chip.ok { color: var(--ok); }
.chip.down { color: #fff; background: var(--down); }
.chip.pause { color: var(--text-3); }

.health-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hc {
	position: relative;
	padding: 9px 10px 8px 12px;
	border-radius: 10px;
	background: var(--panel-2);
	border: 1px solid transparent;
	overflow: hidden;
}
.hc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ok); }
.hc-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 14px; }
.hc-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.hc-type { font-size: 10px; padding: 0 5px; border-radius: 4px; border: 1px solid var(--line); color: var(--text-3); }
.hc-dot { position: absolute; right: 9px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.hc.is-slow::before, .hc.is-slow .hc-dot { background: var(--warn); }
.hc.is-slow .hc-ms { color: var(--warn); }
.hc.is-down { background: rgba(244, 63, 94, .14); border-color: rgba(244, 63, 94, .6); }
.hc.is-down::before, .hc.is-down .hc-dot { background: var(--down); }
.hc.is-down .hc-dot { animation: blink 1s infinite; }
.hc.is-down .hc-ms { color: var(--down); font-weight: 700; }
.hc.is-paused { opacity: .45; }
.hc.is-paused::before, .hc.is-paused .hc-dot { background: var(--text-3); }

/* ---------- 2. 최근 알림 ---------- */
.count-badge { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: var(--info); color: #04121f; }
.alert-list li {
	display: flex; gap: 10px; align-items: flex-start;
	padding: 9px 10px;
	border-radius: 10px;
	border: 1px solid transparent;
}
.alert-list li + li { margin-top: 4px; }
.al-kind { flex: none; width: 40px; text-align: center; font-size: 11px; font-weight: 700; padding: 2px 0; border-radius: 6px; margin-top: 1px; background: var(--panel-2); color: var(--text-2); }
.al-kind.k-monitor { color: var(--down); }
.al-kind.k-incident { color: var(--warn); }
.al-kind.k-notice { color: var(--info); }
.al-body { flex: 1; min-width: 0; }
.al-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-sub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-time { flex: none; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; margin-top: 2px; }
.alert-list li.is-new { background: rgba(96, 165, 250, .1); border-color: rgba(96, 165, 250, .45); }
.alert-list li.is-new .al-title::after { content: "NEW"; margin-left: 6px; font-size: 10px; font-weight: 800; color: var(--info); vertical-align: 1px; }
.alert-list li.is-fresh { animation: flash 1.2s ease 3; }

/* ---------- 3. 일정 ---------- */
.cal-cols { display: flex; gap: 12px; }
.cal-col { flex: 1; min-width: 0; }
.cal-col + .cal-col { border-left: 1px dashed var(--line); padding-left: 12px; }
.day-title { font-size: 13px; font-weight: 700; color: #a78bfa; margin: 2px 0 8px; }
.day-title.is-tomorrow { color: var(--text-2); }
.day-title small { font-weight: 400; color: var(--text-3); margin-left: 4px; }
.cal-list li { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cal-list li:last-child { border-bottom: 0; }
.cal-time { flex: none; width: 44px; font-size: 13px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cal-time.is-allday { font-size: 11px; font-weight: 700; color: #a78bfa; }
.cal-title { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-list li.is-past { opacity: .4; }
.cal-list li.is-now .cal-time { color: var(--accent); }
.cal-list li.is-now .cal-title { font-weight: 700; }
.cal-col .empty { padding: 20px 0; font-size: 13px; }

/* ---------- 4. 작업목록 (메모지) ---------- */
.tabs { display: flex; gap: 4px; margin-left: 6px; }
.tab { height: 30px; padding: 0 12px; border-radius: 15px; font-size: 13px; font-weight: 600; color: var(--text-3); }
.tab em { font-style: normal; font-size: 11px; margin-left: 2px; }
.tab.is-on { background: rgba(252, 211, 77, .14); color: var(--memo); }
.btn-add {
	margin-left: auto;
	width: 34px; height: 34px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center; padding-bottom: 2px;
	font-size: 22px; line-height: 1; font-weight: 400;
	background: rgba(252, 211, 77, .14); color: var(--memo);
}
.btn-add:active { background: rgba(252, 211, 77, .3); }

.task-list li {
	display: flex; align-items: center; gap: 10px;
	min-height: 46px;   /* 터치 영역 */
	padding: 5px 10px;
	border-radius: 8px;
	background: rgba(252, 211, 77, .05);
	border-left: 3px solid rgba(252, 211, 77, .55);
}
.task-list li + li { margin-top: 6px; }
.task-chk {
	flex: none;
	width: 24px; height: 24px; border-radius: 6px;
	border: 2px solid rgba(252, 211, 77, .6);
	position: relative;
}
.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-content { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.task-rank { flex: none; width: 16px; font-size: 12px; font-weight: 800; color: rgba(252, 211, 77, .7); text-align: center; font-variant-numeric: tabular-nums; }
.task-list li.is-done { border-left-color: var(--line); background: transparent; }
.task-list li.is-done .task-title { color: var(--text-3); text-decoration: line-through; }
.task-list .empty { background: none; border: 0; display: block; }
.task-list li.is-done .task-chk { background: var(--memo); border-color: var(--memo); }
.task-list li.is-done .task-chk::after {
	content: ""; position: absolute; left: 6px; top: 1px;
	width: 6px; height: 12px;
	border: solid #1a1405; border-width: 0 3px 3px 0;
	transform: rotate(45deg);
}

/* ---------- 장애 경고 상태 ---------- */
.alarm-frame { position: fixed; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; z-index: 40; display: none; }
body.is-alarm .alarm-frame { display: block; box-shadow: inset 0 0 0 6px var(--down), inset 0 0 80px rgba(244, 63, 94, .45); animation: alarm 1.6s ease-in-out infinite; }
body.is-alarm { background: #12040a; }
body.is-alarm #pnHealth { border-color: var(--down); }

@keyframes blink { 50% { opacity: .25; } }
@keyframes alarm { 50% { opacity: .35; } }
@keyframes flash { 50% { background: rgba(96, 165, 250, .28); } }

/* 태블릿보다 큰 화면(PC 미리보기)에서 비율 유지 */
@media (min-width: 1280px) {
	body { font-size: 16px; }
}
