/* ==========================================================================
   직장인 업무도구 (work.chatgpts.kr)
   모던하고 신뢰감 있는 직장인 실무 도구 디자인 시스템
   ========================================================================== */

:root {
  --color-primary: #1E40AF;         /* 로열 블루 */
  --color-primary-dark: #1E3A8A;    /* 딥 네이비 */
  --color-primary-light: #DBEAFE;   /* 라이트 블루 */
  --color-accent: #2563EB;          /* 액센트 블루 */
  --color-teal: #0D9488;            /* 세이지 틸 */
  
  --color-bg: #F8FAFC;              /* 라이트 슬레이트 배경 */
  --color-card: #FFFFFF;            /* 카드 배경 */
  --color-border: #E2E8F0;          /* 연한 테두리 */
  --color-border-hover: #CBD5E1;
  
  --color-text: #0F172A;            /* 본문 딥 다크 */
  --color-text-soft: #475569;       /* 부드러운 슬레이트 그레이 */
  --color-text-muted: #94A3B8;      /* 연한 보조 텍스트 */
  
  --color-success: #059669;
  --color-danger: #DC2626;
  --color-warning: #D97706;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.08);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-base: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Apple SD Gothic Neo", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ---------- 1. 상단 헤더 ---------- */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1.5px solid var(--color-border);
  margin-bottom: 16px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.brand-logo:hover {
  color: var(--color-primary);
}

.logo-badge {
  background: var(--color-primary);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.25);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 패밀리 드롭다운 */
.family-nav-wrap {
  position: relative;
}

.family-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--color-border);
  background: #fff;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--color-text-soft);
  cursor: pointer;
  transition: all 0.16s ease;
}

.family-btn:hover {
  background: #f1f5f9;
  border-color: var(--color-text-muted);
  color: var(--color-text);
}

.family-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 200;
}

.family-dropdown.show {
  display: block;
  animation: dropdownFade 0.2s ease;
}

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

.family-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: background 0.14s ease;
}

.family-dropdown a:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

/* ---------- 2. 상단 메뉴 칩 (스크롤형) ---------- */
.nav-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.nav-chip:hover {
  background: #f1f5f9;
  border-color: var(--color-text-muted);
  color: var(--color-text);
}

.nav-chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.2);
}

/* ---------- 3. 히어로 배너 (홈 & 상세) ---------- */
.page-hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  margin-bottom: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-tag {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.hero-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-primary-dark);
  margin-bottom: 10px;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 1.02rem;
  color: #1E3A8A;
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto;
  word-break: keep-all;
}

/* ---------- 4. 홈 그리드 (도구 카드 모음) ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}

.tool-card {
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #EFF6FF;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.tool-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 8px;
}

.tool-card-desc {
  font-size: 0.92rem;
  color: var(--color-text-soft);
  line-height: 1.55;
  margin-bottom: 20px;
  flex: 1;
  word-break: keep-all;
}

.tool-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #F8FAFC;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.16s ease;
}

.tool-card:hover .tool-card-btn {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* 준비 중인 도구 카드 */
.tool-card.coming-soon {
  opacity: 0.75;
  background: #F8FAFC;
  border-style: dashed;
}
.tool-card.coming-soon:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--color-border);
}

/* ---------- 5. 계산기 폼 & 카드 UI ---------- */
.calc-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.calc-box {
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.calc-box-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 폼 그룹 */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-label small {
  font-weight: 500;
  color: var(--color-text-soft);
  margin-left: 4px;
}

.form-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1.02rem;
  color: var(--color-text);
  background: #fff;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-unit {
  position: absolute;
  right: 14px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-muted);
  pointer-events: none;
}

/* 탭 버튼 (월급/연봉 토글 등) */
.toggle-tabs {
  display: flex;
  background: #F1F5F9;
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 18px;
  gap: 4px;
}

.toggle-tab-btn {
  flex: 1;
  padding: 9px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text-soft);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.toggle-tab-btn.active {
  background: #fff;
  color: var(--color-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* 버튼 영역 */
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.btn-primary {
  flex: 1;
  padding: 14px 20px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(30, 64, 175, 0.35);
}

.btn-outline {
  padding: 14px 18px;
  background: #fff;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-soft);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-outline:hover {
  background: #F1F5F9;
  border-color: var(--color-text-muted);
}

/* ---------- 6. 계산 결과 카드 ---------- */
.result-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 2px solid #BFDBFE;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.result-hero-box {
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}

.result-hero-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1E40AF;
  margin-bottom: 6px;
}

.result-hero-amount {
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--color-primary-dark);
  letter-spacing: -0.02em;
}

.result-hero-sub {
  font-size: 0.86rem;
  color: var(--color-text-soft);
  margin-top: 4px;
}

/* 세부 명세 표 */
.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.result-table th, .result-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--color-border);
}

.result-table th {
  text-align: left;
  font-weight: 600;
  color: var(--color-text-soft);
}

.result-table td {
  text-align: right;
  font-weight: 800;
  color: var(--color-text);
}

.result-table tr.total-row {
  background: #F1F5F9;
  font-weight: 800;
}
.result-table tr.total-row th,
.result-table tr.total-row td {
  color: var(--color-primary-dark);
  font-size: 0.98rem;
  border-top: 2px solid var(--color-border);
  border-bottom: 2px solid var(--color-border);
}

/* ---------- 7. 체크리스트 (memo.html) ---------- */
.memo-wrap {
  max-width: 720px;
  margin: 0 auto;
}

.memo-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.memo-input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.16s ease;
}

.memo-input:focus {
  border-color: var(--color-primary);
}

.memo-add-btn {
  padding: 14px 24px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.memo-add-btn:hover {
  background: var(--color-primary-dark);
}

.memo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.memo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.16s ease;
}

.memo-item:hover {
  border-color: var(--color-border-hover);
}

.memo-item.done {
  background: #F8FAFC;
  opacity: 0.65;
}

.memo-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.memo-text {
  flex: 1;
  font-size: 1rem;
  color: var(--color-text);
  word-break: break-word;
}

.memo-item.done .memo-text {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.memo-delete-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.14s ease, background 0.14s ease;
}

.memo-delete-btn:hover {
  color: var(--color-danger);
  background: #FEE2E2;
}

.memo-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-muted);
  background: #fff;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md);
}

/* ---------- 8. 법적 면책 안내 박스 ---------- */
.disclaimer-card {
  background: #FFFBEB;
  border: 1.5px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 28px 0;
  font-size: 0.88rem;
  color: #92400E;
  line-height: 1.6;
}

.disclaimer-card strong {
  display: block;
  font-size: 0.94rem;
  margin-bottom: 4px;
  color: #78350F;
}

/* ---------- 9. 푸터 ---------- */
.site-foot {
  margin-top: auto;
  border-top: 1.5px solid var(--color-border);
  padding: 30px 0 40px;
  text-align: center;
  color: var(--color-text-soft);
  font-size: 0.88rem;
}

.footer-family-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-family-links a {
  color: var(--color-text-soft);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.14s ease;
}

.footer-family-links a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.footer-copy {
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

/* ---------- 10. 반응형 미디어 쿼리 ---------- */
@media (max-width: 860px) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .calc-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .calc-box, .result-card {
    padding: 20px 16px;
  }
  .result-hero-amount {
    font-size: 1.9rem;
  }
  .btn-row {
    flex-direction: column;
  }
}

/* ---------- 애드센스 클린 슬롯 (다른 사이트 동일 방식) ---------- */
.ad-slot,
.ad-placeholder {
  margin: 24px auto;
  min-height: 1px;
  text-align: center;
  clear: both;
}
.ad-placeholder {
  display: none;
}

/* ---------- 패밀리 서비스 배너 (다른 프로젝트 동일) ---------- */
.nolja-family-banner {
  background: linear-gradient(135deg, #EFF6FF 0%, #FEF3C7 100%);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 28px 0;
  border: 1.5px solid #BFDBFE;
}

.nolja-family-banner h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  margin-bottom: 6px;
}

.nolja-family-banner p {
  font-size: 0.88rem;
  color: var(--color-text-soft);
  line-height: 1.5;
  margin-bottom: 14px;
}

.family-link-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.family-chip-link {
  font-size: 0.85rem;
  font-weight: 700;
  background: #FFFFFF;
  color: var(--color-text);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.15s ease;
}

.family-chip-link:hover {
  background: var(--color-primary-light);
  border-color: #93C5FD;
  color: var(--color-primary-dark);
  transform: translateY(-1px);
}
