:root {
  /* Premium Tech Palette (Samsung US Style) */
  --bg-primary: #ffffff;
  --bg-secondary: #f7f7f7;
  --bg-tertiary: #000000;
  
  --text-primary: #000000;
  --text-secondary: #555555;
  --text-inverse: #ffffff;
  
  --accent: #000000; /* Pure black for premium feel */
  --accent-light: rgba(0, 0, 0, 0.05);
  --border-color: #e5e5e5;
  
  --font-heading: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto !important;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  margin-bottom: 0;
  line-height: 1.6;
}

main[role="main"] {
  padding-top: 70px;
}

h1, h2, h3, h4, h5, h6, .brand-text {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

/* Navbar Customization */
.navbar-custom {
  background: rgba(51, 51, 51, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease, padding 0.3s ease;
}

.navbar-custom .nav-link {
  color: #ffffff !important;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: -0.3px;
  transition: color 0.3s ease;
  position: relative;
  padding: 0.5rem 1.2rem !important;
  white-space: nowrap;
  word-break: keep-all;
}

.navbar-custom .nav-link:hover {
  color: #ffffff !important;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff !important;
}

/* 브랜드 텍스트 "Jsystems" — 기본: 흰색 */
.navbar-brand-text {
  color: #ffffff;
  transition: color 0.3s ease;
}

/* 흰 배경 navbar에서 브랜드 텍스트 → 네이비 */
.navbar-custom.navbar-white .navbar-brand-text,
.navbar-custom[style*="background: #fff"] .navbar-brand-text,
.navbar-custom[style*="background:#fff"] .navbar-brand-text {
  color: #11294b !important;
}

/* 햄버거 SVG currentColor — 기본: 흰색 */
.navbar-custom .navbar-toggler {
  color: #ffffff;
}

/* 흰 배경 navbar에서 햄버거 → 어두운 색 */
.navbar-custom.navbar-white .navbar-toggler {
  color: #333333 !important;
  border-color: rgba(0,0,0,0.25) !important;
}

/* =============================================
   흰 배경 navbar 모드 (Equipment, Robotics 등)
   ViewData["NavbarLight"]=true 페이지에 적용
   ============================================= */
.navbar-custom.navbar-white {
  background: #ffffff !important;
  border-bottom: 1px solid #e1e5eb !important;
}

/* 흰 배경: 링크 색상 → 어둡게 */
.navbar-custom.navbar-white .nav-link {
  color: #333333 !important;
}
.navbar-custom.navbar-white .nav-link:hover {
  color: #11294b !important;
}

/* 흰 배경: 브랜드 텍스트 → 어둡게 */
.navbar-custom.navbar-white .navbar-brand,
.navbar-custom.navbar-white .navbar-brand-text {
  color: #11294b !important;
}

/* 흰 배경: 로고 이미지 → drop-shadow로 명확하게 */
.navbar-custom.navbar-white .site-logo {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45))
          drop-shadow(0 0 1px rgba(0, 0, 0, 0.3));
}

/* 흰 배경: 햄버거 버튼 → 어두운 색 SVG */
.navbar-custom.navbar-white .navbar-toggler {
  color: #333333 !important;
  border-color: rgba(0, 0, 0, 0.25) !important;
}

/* 흰 배경: 버튼들 */
.navbar-custom.navbar-white .btn-primary-custom { color: #fff !important; }
.navbar-custom.navbar-white .btn-solid-custom   { color: #000 !important; }
.navbar-custom.navbar-white .btn-secondary-custom {
  color: #333 !important;
  border-color: #333 !important;
}

/* Buttons */
.btn-primary-custom, .btn-solid-custom {
  background-color: var(--accent);
  color: var(--text-inverse) !important;
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: 50px;
  padding: 0.8rem 2.5rem;
  border: 1px solid var(--accent);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  letter-spacing: -0.2px;
}

.btn-primary-custom:hover, .btn-solid-custom:hover {
  background-color: transparent;
  color: var(--text-primary) !important;
  transform: translateY(-2px);
}

.btn-secondary-custom {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
  border-radius: 50px;
  padding: 0.8rem 2.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.btn-secondary-custom:hover {
  background-color: var(--text-primary);
  color: var(--text-inverse);
}

.nav-action-btn {
  padding: 0.4rem 1.2rem !important;
  font-size: 0.8rem;
  height: auto;
}

/* Premium Tech Cards */
.glass-card {
  background: var(--bg-primary);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid var(--border-color);
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* Forms */
.form-label {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary) !important;
    font-weight: 600;
}

.form-control.bg-transparent {
    background: var(--bg-primary) !important;
    border: 0;
    border-bottom: 1px solid #ccc;
    border-radius: 0;
    padding: 0.85rem 0;
    color: var(--text-primary) !important;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control.bg-transparent:focus {
    border-color: var(--text-primary);
    box-shadow: none;
    outline: none;
}

::placeholder {
    color: #999 !important;
}

/* Sections */
.section-padding {
  padding: 100px 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 60px 0;
  }
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  display: block;
  letter-spacing: -1px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 3rem;
  max-width: 700px;
  line-height: 1.6;
  font-weight: 400;
}

/* Footer */
.footer {
  background-color: #111111;
  color: #aaaaaa;
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer h5 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer a {
    color: #aaaaaa;
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: #ffffff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Utility Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* Responsive Table */
@media screen and (max-width: 768px) {
    .table-responsive-mobile table tr {
        border-bottom: 1px solid var(--border-color) !important;
        background-color: var(--bg-primary);
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        border-radius: 12px;
        margin-bottom: 1rem;
        display: block;
        padding: 10px;
    }
    .table-responsive-mobile table td {
        border-bottom: 1px solid var(--bg-secondary);
        display: block;
        text-align: right !important;
    }
}

/* ============================================
   로고 가시성 (Logo Visibility) 유틸리티
   ============================================ */

/* 어두운 배경 위 로고 — 기본 (변경 없음) */
.logo-on-dark {
    filter: none;
}

/* 밝은/흰 배경 위 로고 — 어두운 drop-shadow 추가 */
.logo-on-light {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55))
            drop-shadow(0 0 1px rgba(0, 0, 0, 0.4));
}

/* 배경색 관계없이 항상 잘 보이는 로고 — 겉에 어두운 테두리 효과 */
.logo-auto {
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5))
            drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
    transition: filter 0.2s ease;
}

/* 로고를 어두운 pill 배경 위에 표시 (배경 있는 버전) */
.logo-badge {
    background: rgba(10, 10, 10, 0.75);
    border-radius: 10px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

/* Payslip / 인쇄용 — 흰 배경에서 반전 없이 선명하게 */
.logo-print {
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.6))
            drop-shadow(1px 1px 2px rgba(0,0,0,0.35));
}