/* 기본 브라우저 스타일 초기화 및 강제 배경 지정 */
html, body {
  background-color: #0a0f0d !important;
  color: #e0e0e0;
  font-family: 'Courier New', Courier, monospace;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* 전체 메인 컨테이너 */
.system-container {
  width: 90%;
  max-width: 500px;
  background-color: #111a16 !important;
  border: 1px solid #1f3a2b;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.15);
  box-sizing: border-box;
  transition: all 0.5s ease;
}

/* 화면 전환용 클래스 */
.screen {
  display: block;
}
.hidden {
  display: none !important;
}

/* 로그인 화면 요소 */
.system-title {
  color: #00ff66;
  text-align: center;
  letter-spacing: 2px;
  margin-top: 0;
  text-shadow: 0 0 10px rgba(0, 255, 102, 0.5);
  font-size: 1.8rem;
}

.system-subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: #00ff66;
}

#codename {
  width: 100%;
  padding: 12px;
  background: #070b09;
  border: 1px solid #1f3a2b;
  color: #fff;
  border-radius: 4px;
  font-family: inherit;
  box-sizing: border-box;
}

#codename:focus {
  outline: none;
  border-color: #00ff66;
}

/* 부대 선택 (라디오 버튼을 카드 형태로) */
.unit-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.unit-card {
  display: block;
  background: #070b09;
  border: 1px solid #1f3a2b;
  padding: 12px;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.unit-card input {
  display: none;
}

.unit-card span {
  font-size: 0.9rem;
  color: #aaa;
}

/* 부대별 선택되었을 때의 개별 네온 컬러 정의 */
.unit-strike:has(input:checked) { border-color: #ff3333 !important; background: rgba(255, 51, 51, 0.1) !important; }
.unit-strike:has(input:checked) span { color: #ff3333 !important; font-weight: bold; }

.unit-stealth:has(input:checked) { border-color: #00ccff !important; background: rgba(0, 204, 255, 0.1) !important; }
.unit-stealth:has(input:checked) span { color: #00ccff !important; font-weight: bold; }

.unit-artillery:has(input:checked) { border-color: #ff9900 !important; background: rgba(255, 153, 0, 0.1) !important; }
.unit-artillery:has(input:checked) span { color: #ff9900 !important; font-weight: bold; }

.unit-intel:has(input:checked) { border-color: #00ff66 !important; background: rgba(0, 255, 102, 0.1) !important; }
.unit-intel:has(input:checked) span { color: #00ff66 !important; font-weight: bold; }


/* 지문 인식기 구역 */
.fingerprint-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;
}

.fingerprint-pad {
  position: relative;
  width: 100px;
  height: 120px;
  background: #050806;
  border: 2px dashed #1f3a2b;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.icon-fingerprint {
  font-size: 50px;
  color: #1f3a2b;
  user-select: none;
}

.scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #00ff66;
  box-shadow: 0 0 10px #00ff66;
  display: none;
}

@keyframes scan {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

.fingerprint-pad.scanning {
  border-color: #00ff66 !important;
  box-shadow: 0 0 15px rgba(0, 255, 102, 0.4);
}
.fingerprint-pad.scanning .icon-fingerprint {
  color: #00ff66 !important;
}
.fingerprint-pad.scanning .scanner-line {
  display: block;
  animation: scan 1.5s infinite linear;
}

.scan-status {
  margin-top: 12px;
  font-size: 0.8rem;
  color: #888;
}

/* ==========================================================================
   부대별 대시보드 전용 테마 컬러 클래스 (JS를 통해 컨테이너에 부여됨)
   ========================================================================== */

/* 1. 선봉타격대 (네온 레드) */
.theme-strike {
  --theme-color: #ff3333;
  box-shadow: 0 0 20px rgba(255, 51, 51, 0.2);
}
/* 2. 은밀기동대 (네온 블루) */
.theme-stealth {
  --theme-color: #00ccff;
  box-shadow: 0 0 20px rgba(0, 204, 255, 0.2);
}
/* 3. 중화포격대 (네온 주황) */
.theme-artillery {
  --theme-color: #ff9900;
  box-shadow: 0 0 20px rgba(255, 153, 0, 0.2);
}
/* 4. 정보지원대 (네온 초록) */
.theme-intel {
  --theme-color: #00ff66;
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.2);
}

/* 대시보드 (로그인 후 화면) 디자인 연동 */
.dash-header {
  border-bottom: 1px solid var(--theme-color, #1f3a2b);
  padding-bottom: 15px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.badge-unit {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--theme-color, #fff);
  border: 1px solid var(--theme-color, transparent);
  padding: 2px 6px;
  border-radius: 3px;
}

.badge-name {
  margin: 5px 0 0 0;
  color: #fff;
  font-size: 1.5rem;
}

.system-status {
  font-size: 0.75rem;
  color: var(--theme-color, #fff);
  text-shadow: 0 0 5px var(--theme-color);
}

.dash-card {
  background: #070b09;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--theme-color, #1f3a2b); /* 왼쪽에 포인트 컬러 바 */
  border-radius: 0 6px 6px 0;
  padding: 20px;
  margin-bottom: 15px;
}

.dash-card h3 {
  margin-top: 0;
  color: var(--theme-color, #fff);
  font-size: 1rem;
}

.mission-text {
  line-height: 1.5;
  font-size: 0.95rem;
}

.card-footer {
  font-size: 0.75rem;
  color: #555;
  margin-top: 10px;
  text-align: right;
}

.training-list {
  padding-left: 20px;
  margin: 0;
}

.training-list li {
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.btn-logout {
  width: 100%;
  background: transparent;
  border: 1px solid #ff3333;
  color: #ff3333;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  margin-top: 10px;
}