/* ==========================================================================
   주식회사 바알 (BAAL Corporation) 정규 기업 포털 스타일시트
   ========================================================================== */

:root {
  --nav-height: 64px;
  --bg-color: #0b0e14;
  --bg-surface: #121722;
  --bg-surface-elevated: #1a202e;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.18);
  
  --brand-primary: #3b82f6;
  --brand-gold: #f59e0b;
  --brand-purple: #8b5cf6;
  --brand-emerald: #10b981;
  
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-muted: #64748b;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Segoe UI", Roboto, sans-serif;
  --font-serif: "Songti SC", "Nanum Myeongjo", serif;
  --font-mono: "SF Mono", "Fira Code", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100vh; height: auto; }

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   GNB (Global Navigation Bar) - 대기업 공식 네비게이션
   -------------------------------------------------------------------------- */
.corp-gnb {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(11, 14, 20, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.gnb-inner {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.corp-logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
}

.corp-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
}

.corp-logo-text {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.corp-logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* GNB 주 메뉴 리스트 */
.gnb-menu {
  display: flex;
  gap: 4px;
  list-style: none;
  height: 100%;
}

.gnb-item {
  height: 100%;
  display: flex;
  align-items: center;
}

.gnb-btn {
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-size: 14.5px;
  font-weight: 600;
  padding: 0 18px;
  height: 100%;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
  font-family: inherit;
}

.gnb-btn:hover {
  color: #fff;
}

.gnb-btn.active {
  color: #fff;
}

.gnb-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 12px;
  right: 12px;
  height: 3px;
  background: var(--brand-primary);
  border-radius: 2px 2px 0 0;
}

.gnb-util {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-select {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   메인 콘텐츠 뷰 컨테이너 (각 페이지 탭 전환 구조)
   -------------------------------------------------------------------------- */
.corp-main-viewport {
  flex: 1;
  min-height: calc(100vh - 250px);
}

.page-view {
  display: none;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* --------------------------------------------------------------------------
   VIEW 1: 홈 (메인 포털)
   -------------------------------------------------------------------------- */
.home-hero-banner {
  position: relative;
  background: linear-gradient(180deg, rgba(18, 23, 34, 0.7) 0%, rgba(11, 14, 20, 1) 100%),
              radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 50%);
  border-bottom: 1px solid var(--border-color);
  padding: 80px 24px 70px;
  text-align: center;
}

.home-hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-corp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 24px;
}

.home-hero-title {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.18;
  color: #fff;
  margin-bottom: 20px;
}

.home-hero-desc {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-sub);
  max-width: 720px;
  margin: 0 auto 36px;
  word-break: keep-all;
}

.home-cta-group {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.btn-portal-primary {
  background: var(--brand-primary);
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-portal-primary:hover {
  background: #1d4ed8;
}

.btn-portal-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border-color-hover);
  padding: 12px 26px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-portal-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 홈 KPI 실시간 공시 바 */
.home-kpi-bar {
  max-width: 1200px;
  margin: 40px auto 60px;
  position: relative;
  z-index: 10;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px 36px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.kpi-cell {
  border-right: 1px solid var(--border-color);
  padding-right: 20px;
}

.kpi-cell:last-child {
  border-right: none;
}

.kpi-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-figure {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin: 4px 0 2px;
  font-feature-settings: "tnum";
}

.kpi-figure span {
  font-size: 15px;
  color: var(--brand-primary);
  font-weight: 700;
}

.kpi-sub {
  font-size: 11.5px;
  color: var(--brand-emerald);
  font-weight: 600;
}

/* 홈 바로가기 카드 섹션 */
.home-cards-section {
  max-width: 1200px;
  margin: 0 auto 80px;
  padding: 0 24px;
}

.section-eyebrow-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--brand-primary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-main-heading {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 28px;
  letter-spacing: -0.5px;
}

.home-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.portal-nav-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.portal-nav-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-4px);
  background: var(--bg-surface-elevated);
}

.portal-card-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.portal-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.portal-card-desc {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 20px;
  word-break: keep-all;
}

.portal-card-link {
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   VIEW 2: 회사소개 (About Us)
   -------------------------------------------------------------------------- */
.subpage-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.subpage-title {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.subpage-desc {
  font-size: 15px;
  color: var(--text-sub);
  margin-top: 6px;
}

.ceo-official-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 48px;
}

.ceo-portrait-wrap {
  text-align: center;
}

.ceo-official-img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-color-hover);
}

.ceo-official-name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-top: 14px;
}

.ceo-official-role {
  font-size: 12px;
  color: var(--brand-gold);
  font-weight: 600;
}

.ceo-letter-body h3 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 20px;
  word-break: keep-all;
}

.ceo-letter-text {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text-sub);
  word-break: keep-all;
}

.ceo-letter-text p + p {
  margin-top: 14px;
}

.ceo-official-sign {
  margin-top: 28px;
  font-family: var(--font-serif);
  font-size: 15px;
  color: #fff;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

/* 기업 비전 & 핵심 가치 그리드 */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.value-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
}

.value-box-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 12px;
}

.value-box h4 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.value-box p {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.65;
  word-break: keep-all;
}

/* --------------------------------------------------------------------------
   VIEW 3: 사업영역 (Business)
   -------------------------------------------------------------------------- */
.biz-portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.biz-row-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 32px;
  align-items: center;
}

.biz-row-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: 0.5px;
}

.biz-row-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-top: 6px;
}

.biz-row-dept {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

.biz-row-detail {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-sub);
  word-break: keep-all;
}

/* --------------------------------------------------------------------------
   VIEW 4: 조직 및 임직원 (Organization)
   -------------------------------------------------------------------------- */
.org-filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.org-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
  font-family: inherit;
}

.org-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.org-tab-btn.active {
  color: #fff;
  background: var(--brand-primary);
}

.employee-portal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.portal-emp-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.portal-emp-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.portal-emp-photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  background: #161c28;
  overflow: hidden;
}

.portal-emp-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.2s;
}

.portal-emp-card:hover .portal-emp-photo {
  transform: scale(1.03);
}

.portal-dept-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #93c5fd;
  border: 1px solid var(--border-color);
}

.portal-emp-meta {
  padding: 16px;
}

.portal-emp-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.portal-emp-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.portal-emp-rank {
  font-size: 12px;
  color: var(--brand-gold);
  font-weight: 700;
}

.portal-emp-role {
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portal-emp-quote {
  font-size: 11.5px;
  color: var(--text-muted);
  font-style: italic;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   VIEW 5: 사업장 안내 (Campus & Facilities)
   -------------------------------------------------------------------------- */
.campus-portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.campus-portal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.campus-portal-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-3px);
}

.campus-photo-wrap {
  width: 100%;
  aspect-ratio: 2.56 / 1;
  background: #161c28;
  overflow: hidden;
}

.campus-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.campus-portal-card:hover .campus-photo {
  transform: scale(1.04);
}

.campus-card-content {
  padding: 16px;
}

.campus-code-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-primary);
}

.campus-item-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  margin: 2px 0 6px;
}

.campus-item-desc {
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   VIEW 6: 인재채용 및 복지 (Careers & Culture)
   -------------------------------------------------------------------------- */
.culture-welfare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.culture-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px;
}

.culture-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.culture-card h4 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.culture-card p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
  word-break: keep-all;
}

.recruitment-notice-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 14px;
  padding: 36px;
  text-align: center;
}

.recruitment-notice-banner h3 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.recruitment-notice-banner p {
  font-size: 14.5px;
  color: #bfdbfe;
  margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   사원증 상세 모달 및 라이트박스
   -------------------------------------------------------------------------- */
.portal-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.portal-modal-backdrop.active {
  display: flex;
}

.portal-id-window {
  background: #11151f;
  border: 1px solid var(--border-color-hover);
  border-radius: 16px;
  width: 100%;
  max-width: 860px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  padding: 36px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.portal-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.portal-modal-close:hover {
  background: #ef4444;
}

.portal-modal-profile {
  display: flex;
  gap: 28px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.portal-modal-avatar {
  width: 120px;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-color-hover);
}

.portal-modal-info h2 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}

.portal-modal-role {
  color: var(--brand-primary);
  font-size: 13.5px;
  font-weight: 700;
  margin: 4px 0 10px;
}

.portal-modal-desc {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.65;
}

.portal-modal-gallery-head {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.portal-modal-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.portal-photo-item {
  background: #181e2b;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.portal-photo-item:hover {
  border-color: #fff;
  transform: translateY(-2px);
}

.portal-photo-thumb {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.portal-photo-caption {
  padding: 5px 4px;
  font-size: 11px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Lightbox */
.portal-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.portal-lightbox.active {
  display: flex;
}

.portal-lightbox-img {
  max-width: 88vw;
  max-height: 82vh;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
}

.portal-lightbox-label {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   공식 기업 푸터
   -------------------------------------------------------------------------- */
.corp-global-footer {
  border-top: 1px solid var(--border-color);
  background: #080a0e;
  padding: 56px 24px 40px;
  margin-top: 100px;
  flex-shrink: 0;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.footer-nav-list {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-nav-list a {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.footer-nav-list a:hover {
  color: #fff;
}

.footer-legal {
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-muted);
}

@media (max-width: 992px) {
  .home-kpi-bar { grid-template-columns: repeat(2, 1fr); margin: 20px auto; }
  .home-grid-3 { grid-template-columns: 1fr; }
  .ceo-official-card { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .biz-row-card { grid-template-columns: 1fr; }
  .employee-portal-grid { grid-template-columns: repeat(2, 1fr); }
  .campus-portal-grid { grid-template-columns: 1fr; }
  .culture-welfare-grid { grid-template-columns: 1fr; }
  .gnb-menu { display: none; }
}

/* ==========================================================================
   인간 모드 vs 마계 모드 (Dual-Realm Security System) 스타일
   ========================================================================== */

/* 사원증 게이트 태그 스위치 */
.realm-switch-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color-hover);
  border-radius: 30px;
  padding: 3px;
  gap: 2px;
}

.realm-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.realm-btn:hover {
  color: #fff;
}

.realm-btn.active.human {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
}

.realm-btn.active.demon {
  background: linear-gradient(135deg, #7c3aed, #dc2626);
  color: #fff;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.5);
}

/* 마계 모드 활성화 시 글로벌 테마 효과 */
body.demon-realm {
  background-color: #08060c;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(139, 92, 246, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(220, 38, 38, 0.08) 0%, transparent 50%);
}

body.demon-realm .corp-logo-icon {
  background: linear-gradient(135deg, #7c3aed, #ef4444);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
}

/* 인간 모드 임직원 블라인드 배너 */
.human-locked-banner {
  background: var(--bg-surface);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 64px 32px;
  text-align: center;
  max-width: 720px;
  margin: 40px auto;
}

.lock-icon-giant {
  font-size: 48px;
  margin-bottom: 16px;
}

.locked-headline {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.locked-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
  word-break: keep-all;
  margin-bottom: 24px;
}

.btn-tag-rfid {
  background: linear-gradient(135deg, #7c3aed, #dc2626);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.35);
  transition: all 0.2s ease;
}

.btn-tag-rfid:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.5);
}

/* 사원증 게이트 알림 토스트 */
.gate-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #151022;
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 12px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  z-index: 5000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gate-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-sound-icon {
  font-size: 24px;
}

.toast-text-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
}

.toast-text-sub {
  font-size: 11.5px;
  color: #c4b5fd;
}

/* ==========================================================================
   주식회사 바알 공식 CI 로고 스타일
   ========================================================================== */
.corp-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.4));
  transition: transform 0.2s;
}

.corp-logo-area:hover .corp-logo-img {
  transform: scale(1.08);
}

.hero-brand-emblem-wrap {
  margin-bottom: 24px;
}

.hero-brand-ci {
  max-width: 280px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 20px rgba(220, 38, 38, 0.25));
  animation: emblemFloat 4s ease-in-out infinite alternate;
}

@keyframes emblemFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

/* ==========================================================================
   라이트 모드 테마 시스템 (Clean Enterprise Light Theme)
   ========================================================================== */

/* 테마 전환 버튼 */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color-hover);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* 라이트 모드 변수 덮어쓰기 */
body.light-theme {
  --bg-color: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-hover: rgba(0, 0, 0, 0.16);
  
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #64748b;
  
  background-color: var(--bg-color);
  color: var(--text-main);
}

body.light-theme .theme-toggle-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
  color: #0f172a;
}

body.light-theme .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

body.light-theme .corp-gnb {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border-color);
}

body.light-theme .gnb-btn {
  color: #475569;
}

body.light-theme .gnb-btn:hover {
  color: #0f172a;
}

body.light-theme .gnb-btn.active {
  color: #0f172a;
}

body.light-theme .corp-logo-text {
  color: #0f172a;
}

body.light-theme .realm-switch-wrap {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .realm-btn {
  color: #64748b;
}

body.light-theme .realm-btn.active.human {
  background: #2563eb;
  color: #fff;
}

body.light-theme .home-hero-banner {
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-color);
}

body.light-theme .home-hero-title {
  color: #0f172a;
}

body.light-theme .home-kpi-bar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

body.light-theme .kpi-figure {
  color: #0f172a;
}

body.light-theme .section-main-heading,
body.light-theme .subpage-title,
body.light-theme .ceo-letter-body h3,
body.light-theme .value-box h4,
body.light-theme .biz-row-title,
body.light-theme .culture-card h4,
body.light-theme .portal-emp-name,
body.light-theme .campus-item-title,
body.light-theme .portal-card-title,
body.light-theme .ceo-official-name {
  color: #0f172a;
}

body.light-theme .portal-nav-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

body.light-theme .portal-nav-card:hover {
  background: #f8fafc;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

body.light-theme .ceo-official-card,
body.light-theme .value-box,
body.light-theme .biz-row-card,
body.light-theme .culture-card,
body.light-theme .human-locked-banner,
body.light-theme .portal-emp-card,
body.light-theme .campus-portal-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

body.light-theme .corp-global-footer {
  background: #f1f5f9;
  border-top: 1px solid var(--border-color);
}

body.light-theme .footer-nav-list a {
  color: #475569;
}

body.light-theme .footer-nav-list a:hover {
  color: #0f172a;
}

body.light-theme .portal-modal-backdrop {
  background: rgba(15, 23, 42, 0.6);
}

body.light-theme .portal-id-window {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

body.light-theme .portal-modal-info h2 {
  color: #0f172a;
}

body.light-theme .portal-modal-gallery-head {
  color: #0f172a;
}

body.light-theme .portal-photo-item {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .portal-modal-close {
  background: rgba(0, 0, 0, 0.06);
  color: #0f172a;
}


/* ==========================================================================
   라이트 모드 텍스트 시인성 100% 완전 보강 규칙
   ========================================================================== */
body.light-theme,
body.light-theme p,
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme div,
body.light-theme span:not(.portal-dept-tag):not(.campus-code-label):not(.biz-row-badge):not(.value-box-num) {
  /* 기본적으로 흰색 텍스트 상속 방지 */
}

body.light-theme .corp-logo-text,
body.light-theme .home-hero-title,
body.light-theme .section-main-heading,
body.light-theme .subpage-title,
body.light-theme .ceo-letter-body h3,
body.light-theme .value-box h4,
body.light-theme .biz-row-title,
body.light-theme .culture-card h4,
body.light-theme .portal-emp-name,
body.light-theme .campus-item-title,
body.light-theme .portal-card-title,
body.light-theme .ceo-official-name,
body.light-theme .ceo-official-sign,
body.light-theme .kpi-figure,
body.light-theme .locked-headline,
body.light-theme .recruitment-notice-banner h3,
body.light-theme .toast-text-title,
body.light-theme .portal-modal-info h2,
body.light-theme .portal-modal-gallery-head {
  color: #0f172a !important;
}

body.light-theme .home-hero-desc,
body.light-theme .section-subtext,
body.light-theme .subpage-desc,
body.light-theme .portal-card-desc,
body.light-theme .ceo-letter-text,
body.light-theme .value-box p,
body.light-theme .biz-row-detail,
body.light-theme .portal-emp-role,
body.light-theme .campus-item-desc,
body.light-theme .culture-card p,
body.light-theme .locked-desc,
body.light-theme .portal-modal-desc,
body.light-theme .portal-photo-caption,
body.light-theme .portal-emp-quote,
body.light-theme .footer-legal {
  color: #334155 !important;
}

body.light-theme .kpi-header,
body.light-theme .corp-logo-sub,
body.light-theme .biz-row-dept,
body.light-theme .recruitment-notice-banner p,
body.light-theme .editorial-role {
  color: #64748b !important;
}

/* 부서 탭 버튼 시인성 */
body.light-theme .org-tab-btn {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .org-tab-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

body.light-theme .org-tab-btn.active {
  color: #ffffff !important;
  background: #2563eb !important;
}

/* 채용 배너 라이트모드 배경 및 텍스트 */
body.light-theme .recruitment-notice-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #ede9fe 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

/* 토스트 알림 라이트모드 */
body.light-theme .gate-toast {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

body.light-theme .toast-text-sub {
  color: #64748b !important;
}

/* 모달 사원증 내부 */
body.light-theme .portal-id-window {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}

body.light-theme .portal-photo-item {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .portal-photo-item:hover {
  border-color: #2563eb !important;
}

/* 마계 모드 전환 시 라이트 모드에서도 글자 가독성 유지 */
body.light-theme.demon-realm {
  background-color: #fdf4f4;
}

body.light-theme.demon-realm .home-hero-banner {
  background: linear-gradient(180deg, #fee2e2 0%, #fdf4f4 100%);
}

/* ==========================================================================
   푸터 브랜드 로고 & 고대비 텍스트 가독성 패치
   ========================================================================== */

.footer-brand-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.footer-brand-ci {
  max-width: 210px;
  height: auto;
  object-fit: contain;
  transition: transform 0.2s;
}

.footer-brand-area:hover .footer-brand-ci {
  transform: scale(1.03);
}

.footer-brand-desc {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* 안내 바 기본 다크모드 스타일 */
.status-bar-demon {
  font-size: 13px;
  color: #c4b5fd;
  font-weight: 700;
}

.welfare-notice-human {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 8px;
  padding: 12px 18px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #93c5fd;
  font-weight: 600;
}

.welfare-notice-demon {
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 8px;
  padding: 12px 18px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #ddd6fe;
  font-weight: 700;
}

.recruit-banner-text {
  font-size: 14.5px;
  color: #bfdbfe;
  margin-bottom: 20px;
}

/* ==========================================================================
   라이트 모드 고대비 텍스트 색상 완전 보강
   ========================================================================== */
body.light-theme .status-bar-demon {
  color: #6b21a8 !important;
}

body.light-theme .welfare-notice-human {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1e40af !important;
}

body.light-theme .welfare-notice-demon {
  background: #faf5ff !important;
  border-color: #e9d5ff !important;
  color: #581c87 !important;
}

body.light-theme .recruit-banner-text {
  color: #1e3a8a !important;
}

body.light-theme .hero-corp-badge {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

body.light-theme .section-eyebrow-text,
body.light-theme .biz-row-badge,
body.light-theme .campus-code-label,
body.light-theme .kpi-figure span,
body.light-theme .portal-card-link {
  color: #1d4ed8 !important;
}

body.light-theme .portal-dept-tag {
  background: #ffffff !important;
  color: #1d4ed8 !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

body.light-theme .portal-emp-rank {
  color: #b45309 !important;
}

body.light-theme .kpi-sub {
  color: #047857 !important;
}

body.light-theme .footer-brand-desc {
  color: #64748b !important;
}

body.light-theme .portal-emp-quote {
  color: #64748b !important;
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}


/* 임직원 명부 조회 및 보조 버튼 시인성 완전 수정 */
body.light-theme .btn-portal-secondary {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #94a3b8 !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .btn-portal-secondary:hover {
  background: #f1f5f9 !important;
  border-color: #0f172a !important;
  color: #000000 !important;
}

/* 홈 카드의 링크 및 텍스트 라이트모드 100% 검정 보정 */
body.light-theme .portal-card-link {
  color: #1d4ed8 !important;
  font-weight: 800 !important;
}

/* 하단 푸터 대기업 공식 로고 센터 배치 및 웅장한 보더 스타일 */
.corp-global-footer {
  border-top: 2px solid var(--border-color);
  background: #080a0e;
  padding: 64px 24px 48px;
  margin-top: 100px;
}

body.light-theme .corp-global-footer {
  background: #f1f5f9;
  border-top: 2px solid rgba(0, 0, 0, 0.12);
}

.footer-center-brand {
  text-align: center;
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-main-logo {
  max-width: 260px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.4));
  cursor: pointer;
  transition: transform 0.2s;
}

.footer-main-logo:hover {
  transform: scale(1.04);
}

.footer-slogan {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

body.light-theme .footer-slogan {
  color: #475569 !important;
}

.footer-divider-line {
  width: 100%;
  max-width: 1200px;
  height: 1px;
  background: var(--border-color);
  margin: 24px auto;
}

body.light-theme .footer-divider-line {
  background: rgba(0, 0, 0, 0.1);
}


/* ==========================================================================
   모바일 완벽 대응 반응형 미디어 쿼리 (Mobile Responsive Optimization)
   ========================================================================== */

@media (max-width: 768px) {
  :root {
    --nav-height: auto;
  }

  /* GNB 모바일 최적화 */
  .corp-gnb {
    height: auto;
    padding: 10px 0;
  }

  .gnb-inner {
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
  }

  .corp-logo-area {
    width: 100%;
    justify-content: flex-start;
  }

  /* GNB 메뉴: 가로 스와이프 가능한 탭 바 */
  nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }

  nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }

  .gnb-menu {
    display: flex;
    gap: 6px;
    width: max-content;
    padding-bottom: 4px;
  }

  .gnb-btn {
    padding: 8px 14px;
    font-size: 13.5px;
    white-space: nowrap;
    height: auto;
    border-radius: 6px;
  }

  .gnb-btn.active::after {
    display: none;
  }

  .gnb-btn.active {
    background: var(--brand-primary);
    color: #fff !important;
  }

  .gnb-util {
    width: 100%;
    justify-content: space-between;
    padding-top: 4px;
    border-top: 1px solid var(--border-color);
  }

  .realm-switch-wrap {
    flex: 1;
    justify-content: center;
  }

  .realm-btn {
    padding: 5px 10px;
    font-size: 11px;
  }

  .theme-toggle-btn {
    padding: 5px 10px;
    font-size: 11.5px;
  }

  /* 히어로 섹션 모바일 */
  .home-hero-banner {
    padding: 40px 16px 36px;
  }

  .hero-brand-ci {
    max-width: 190px;
  }

  .home-hero-title {
    font-size: 26px;
    line-height: 1.25;
    margin-bottom: 14px;
  }

  .home-hero-desc {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
  }

  .home-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .btn-portal-primary,
  .btn-portal-secondary {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }

  /* KPI 보드 2x2 모바일 그리드 */
  .home-kpi-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 18px 16px;
    margin: 20px 16px 40px;
  }

  .kpi-cell {
    padding-right: 8px;
  }

  .kpi-figure {
    font-size: 22px;
  }

  .kpi-figure span {
    font-size: 12px;
  }

  .kpi-header {
    font-size: 11px;
  }

  .kpi-sub {
    font-size: 10px;
  }

  /* 홈 퀵 카드 */
  .home-cards-section {
    padding: 0 16px;
    margin-bottom: 50px;
  }

  .section-main-heading {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .home-grid-3 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .portal-nav-card {
    padding: 20px 16px;
  }

  /* 서브페이지 공통 패딩 */
  .page-container {
    padding: 24px 16px 60px;
  }

  .subpage-title {
    font-size: 24px;
  }

  .subpage-desc {
    font-size: 13.5px;
  }

  /* CEO 인사말 모바일 세로 배치 */
  .ceo-official-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 16px;
  }

  .ceo-portrait-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .ceo-official-img {
    max-width: 200px;
  }

  .ceo-letter-body h3 {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .ceo-letter-text {
    font-size: 13.5px;
    line-height: 1.7;
  }

  /* 가치 & 사업 영역 */
  .values-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .biz-row-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 16px;
  }

  .biz-row-title {
    font-size: 19px;
  }

  /* 조직도 부서 탭 가로 스크롤 */
  .org-filter-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    gap: 6px;
    padding-bottom: 8px;
  }

  .org-tab-btn {
    padding: 6px 12px;
    font-size: 12.5px;
  }

  /* 임직원 카드 그리드 모바일 2열 */
  .employee-portal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .portal-emp-meta {
    padding: 12px 10px;
  }

  .portal-emp-name {
    font-size: 14px;
  }

  .portal-emp-rank {
    font-size: 11px;
  }

  .portal-emp-role {
    font-size: 11.5px;
    -webkit-line-clamp: 2;
  }

  .portal-emp-quote {
    font-size: 10.5px;
  }

  /* 사업장 캠퍼스 1열 */
  .campus-portal-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* 복지 카드 1열 */
  .culture-welfare-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .culture-card {
    padding: 20px 16px;
  }

  .recruitment-notice-banner {
    padding: 24px 16px;
  }

  .recruitment-notice-banner h3 {
    font-size: 19px;
  }

  /* 모달 사원증 모바일 뷰 */
  .portal-id-window {
    padding: 20px 16px;
    max-height: 90vh;
    border-radius: 12px;
  }

  .portal-modal-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .portal-modal-avatar {
    width: 100px;
  }

  .portal-modal-info h2 {
    font-size: 20px;
  }

  .portal-modal-desc {
    font-size: 12.5px;
    text-align: left;
  }

  .portal-modal-photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  /* 푸터 모바일 최적화 */
  .corp-global-footer {
    padding: 40px 16px 30px;
    margin-top: 50px;
  }

  .footer-main-logo {
    max-width: 180px;
  }

  .footer-slogan {
    font-size: 12px;
    text-align: center;
  }

  .footer-nav-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .footer-nav-list a {
    font-size: 12px;
  }

  .footer-legal p {
    font-size: 11px;
  }
}
