/* =========================
   GLOBAL
========================= */
html,
body {
  height: 100%;
  margin: 0;
}
@font-face {
  font-family: "Pretendard";
  src: url("/css/fonts/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}
body {
  margin: 0;
  font-family: "Inter", "Pretendard", system-ui, sans-serif;
  background: radial-gradient(circle at 20% 10%, #0b1b3a 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, #050a18 0%, #060b18 50%);
  color: #cce7ff;
}

header {
  border-bottom: 1px solid #00eaff44;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #0065bd;
  color: #fff;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  height: 28px;
}

.title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-info {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.logout-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #0065bd;
  background: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.logout-btn:hover {
  opacity: 0.85;
}

/* =========================
login
========================= */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #02070f;
  background-image: radial-gradient(circle at 50% 30%, #081a2f 0%, #02070f 70%);
  z-index: 2000;
  overflow: hidden; /* 추가: 배경 로고 튀어나옴 방지 */
}

/* 🔥 대형 워터마크 로고 */
.login-bg-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  background: url("/images/logo.png") no-repeat center / contain;
  opacity: 0.14;
  filter: drop-shadow(0 0 40px #00eaff);
  pointer-events: none;
}

/* 🔥 은은한 격자선 (사이버 그리드) */
.login-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#00eaff11 1px, transparent 1px),
    linear-gradient(90deg, #00eaff11 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 70%);
  pointer-events: none;
}

.login-box {
  position: relative;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(8, 26, 47, 0.5),
    rgba(2, 7, 15, 0.6)
  );
  backdrop-filter: blur(2px);
  border: 1px solid #00eaff33;
  border-radius: 10px;
  box-shadow: 0 0 30px #00eaff22, inset 0 0 20px rgba(0, 234, 255, 0.04);
  padding: 40px 32px;
  width: 300px;
  text-align: center;
}

.login-box .logo {
  width: 145px;
  filter: drop-shadow(0 0 10px #00eaff88);
}

.login-box h2 {
  color: #00eaff;
  font-size: 20px;
  letter-spacing: 1px;
  margin-bottom: 28px;
  text-shadow: 0 0 10px #00eaff77;
}

.login-box input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #02070f;
  border: 1px solid #00eaff33;
  border-radius: 6px;
  color: #e6f7ff;
  font-size: 13px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

.login-box input::placeholder {
  color: #4b5c6b;
}

.login-box input:focus {
  border-color: #00eaff;
  box-shadow: 0 0 8px #00eaff55;
}

.login-box button {
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  background: #00eaff;
  color: #001018;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 0 12px #00eaff77;
  transition: box-shadow 0.2s;
}

.login-box button:hover {
  box-shadow: 0 0 20px #00eaffaa;
}

.login-error {
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 10px;
  min-height: 16px;
}

/* =========================
LAYOUT
========================= */
.layout {
  height: calc(100vh - 58px); /* header 높이 */
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 7.2fr 2.8fr;
  overflow: hidden;
}

.left-panel {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr 300px;
  overflow: hidden;
}
.left-top {
  padding: 20px;
}

.right-panel {
  padding: 5px 20px 0px 20px;
  background: #030b18;
  border-left: 1px solid #00eaff22;

  display: flex;
  flex-direction: column;
}
/* =========================
상단탭
========================= */
.tabs {
  grid-column: 1 / -1; /* 🔥 좌우 전체 차지 */

  display: flex;
  gap: 10px;
  padding: 10px 20px;

  background: #02070f;
  border-bottom: 1px solid #00eaff22;
}
.tab {
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;

  border: 1px solid #00eaff33;
  border-radius: 6px;

  color: #7ddcff;
  background: #001018;

  transition: all 0.2s ease;
}

.tab:hover {
  background: rgba(0, 234, 255, 0.1);
  box-shadow: 0 0 8px #00eaff55;
}

/* 선택된 탭 */
.tab.active {
  background: #00eaff;
  color: #001018;
  font-weight: 700;
  box-shadow: 0 0 12px #00eaff;
}

/* =========================
점검현황 테이블
========================= */
#detailTitle {
  margin: 15px 0 8px;
  font-size: 16px; /* (선택) 살짝 줄이면 더 깔끔 */
}
/* 셀 넘침 방지 */
/*.detail-table th,
.detail-table td {
  padding: 12px;
  text-align: center;
  word-break: break-word;  🔥 글자 길어도 안튀어나옴 
}/*

/* 테이블 기본 */
.detail-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  /*margin-top: 12px;*/
  font-size: 14px;
  background: #151821;
  border-radius: 10px;
  overflow: hidden;
}

/* 헤더 */
.detail-table thead {
  background: #1f2430;
}

.detail-table th {
  padding: 12px;
  text-align: center;
  font-weight: 600;
  color: #9ca3af;
  border-bottom: 1px solid #2a2f3a;
}

/* 상태 컬럼 (좁게) */
.detail-table th:first-child,
.detail-table td:first-child {
  width: 80px;
  white-space: nowrap;
  text-align: center;
  font-weight: 600;
}

/* 점검항목 (넓게 + 좌측정렬) */
.detail-table th:last-child,
.detail-table td:last-child {
  text-align: left;
  padding: 6px 12px 6px 16px;
  line-height: 1.4;
}

/* 바디 */
.detail-table td {
  padding: 12px;
  border-bottom: 1px solid #2a2f3a;
}

/* 행 기본 */
.detail-table tbody tr {
  transition: all 0.2s ease;
}

/* hover */
.detail-table tbody tr:hover {
  background: #1c212c;
}

/* 완료 */
.detail-table tr.ok {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}

/* 미완료 */
.detail-table tr.danger {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

/* 상태 강조 */
.detail-table tr.danger td:first-child {
  color: #ff6b6b;
}

.detail-table tr.ok td:first-child {
  color: #4ade80;
}

/* 데이터 없음 */
.detail-table td[colspan] {
  color: #6b7280;
  padding: 20px;
}
/* =========================
CARD GRID
========================= */
.cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.card {
  background: radial-gradient(circle at top, #081a2f, #02070f);
  border: 1px solid #032937;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative; /* 이미 있으면 OK */
  overflow: hidden; /* ⭐ 이 한 줄이 핵심 */
}

.card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px #00eaff44;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 1px;
}

/* 카드 전체 스캔라인 */
.card.danger::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 43, 43, 0.25) 50%,
    transparent 100%
  );
  animation: scanline 2.2s linear infinite;
  pointer-events: none;
}

/* 카드 미세 진동 */
.card.danger {
  animation: hudShake 0.25s infinite alternate;
  box-shadow: 0 0 20px rgba(255, 43, 43, 0.6),
    inset 0 0 20px rgba(255, 43, 43, 0.2);
}

/* 도넛 맥박 */
.card.danger .donut-wrap {
  animation: pulse 1.4s infinite;
}

/* ALERT 글리치 */
.card.danger .center-badge {
  animation: glitch 1s infinite;
  text-shadow: 0 0 6px rgba(255, 43, 43, 0.8), 0 0 12px rgba(255, 43, 43, 0.6);
}

/* =========================
KEYFRAMES
========================= */

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100%);
  }
}

@keyframes hudShake {
  from {
    transform: translateX(-0.5px);
  }

  to {
    transform: translateX(0.5px);
  }
}

@keyframes glitch {
  0% {
    opacity: 1;
  }

  20% {
    opacity: 0.3;
  }

  40% {
    opacity: 1;
  }

  60% {
    opacity: 0.6;
  }

  100% {
    opacity: 1;
  }
}

/* =========================
CYBER DONUT
========================= */
.donut-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  margin: auto;
}

.donut {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
}

.donut.energy {
  border-top-color: #00eaff;
  animation: spin 6s linear infinite;
}

.donut.value {
  inset: 8px;
  border: 3px solid rgba(0, 234, 255, 0.4);
  animation: spinReverse 10s linear infinite;
}

.donut-wrap.danger .donut.energy {
  border-top-color: #ff2b2b;
  animation-duration: 1.2s;
}

.donut-wrap.danger .donut.value {
  border-color: rgba(255, 43, 43, 0.4);
}

.center-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #00eaff;
}

.donut-wrap.danger .center-badge {
  color: #ff2b2b;
}

@keyframes spin {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes spinReverse {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0);
  }
}
/* =========================
선박정비만료현황
========================= */
.bottom-ticker {
  grid-column: 1 / -1; /* 🔥 이게 핵심 */
}
.bottom-ticker {
  height: 50px;
  display: flex;
  align-items: center;
  border-top: 1px solid #00eaff22;
  background: #02070f;
  padding: 0 16px;
  gap: 16px;
}

/* 좌측 타이틀 */
.ticker-title {
  min-width: 150px;
  font-weight: 700;
  color: #00eaff;
  font-size: 14px;
  letter-spacing: 1px;
}

/* 스크롤 영역 */
.ticker-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* 움직이는 트랙 */
.ticker-track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: tickerMove 20s linear infinite;
}

/* 아이템 */
.ticker-item {
  color: #e5e7eb;
  font-size: 13px;
}

.ticker-item span {
  color: #ff6b6b;
  font-weight: 700;
}

/* 애니메이션 */
@keyframes tickerMove {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* =========================
점검 입력 모달
========================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 8, 16, 0.75);
  backdrop-filter: blur(2px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active {
  display: flex;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid #00eaff22;
  margin-bottom: 16px;
}

.modal-header h3 {
  color: #00eaff;
  font-size: 15px;
  letter-spacing: 0.5px;
  margin: 0;
  text-shadow: 0 0 8px #00eaff55;
}

.modal-close-x {
  background: none;
  border: none;
  color: #7ddcff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

.modal-close-x:hover {
  color: #00eaff;
  text-shadow: 0 0 8px #00eaff88;
}
.modal-box {
  background: radial-gradient(circle at top, #081a2f, #02070f);
  border: 1px solid #00eaff55;
  border-radius: 10px;
  box-shadow: 0 0 24px #00eaff33, inset 0 0 20px rgba(0, 234, 255, 0.05);
  padding: 24px;
  width: 480px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  color: #cdd6e0;
}

.modal-box h3 {
  color: #00eaff;
  font-size: 15px;
  letter-spacing: 0.5px;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #00eaff22;
  text-shadow: 0 0 8px #00eaff55;
}

.modal-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 18px;
}

.modal-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #9ca3af;
  padding: 8px 10px;
  border: 1px solid #032937;
  border-radius: 6px;
  background: #001018;
  transition: all 0.15s ease;
  cursor: pointer;
}

.modal-checklist label:hover {
  border-color: #00eaff55;
  background: rgba(0, 234, 255, 0.05);
  color: #e6f7ff;
}

.modal-checklist input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #00eaff;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.btn-cancel,
.btn-save {
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-cancel {
  background: #001018;
  border-color: #00eaff33;
  color: #7ddcff;
}
.btn-cancel:hover {
  background: rgba(0, 234, 255, 0.08);
}

.btn-save {
  background: #00eaff;
  color: #001018;
  box-shadow: 0 0 12px #00eaff77;
}
.btn-save:hover {
  box-shadow: 0 0 18px #00eaffaa;
}
.checklist-done {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #22c55e;
  padding: 8px 10px;
  border: 1px solid #22c55e33;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.06);
}

.checklist-done .bullet-icon {
  color: #22c55e;
  font-weight: 700;
}
