/* =========================================================
   THE BIG KOREA - ELECTRONIC CONTRACT UI
   시안형 전자계약 디자인 / PC + Tablet + Mobile + Print
   기존 계약 입력 ID / JS 함수는 유지
   ========================================================= */

:root {
  --navy-950: #082b4f;
  --navy-900: #0d3762;
  --navy-800: #154a7e;
  --navy-700: #1b5c99;

  --blue: #2783e6;
  --blue-soft: #e8f4ff;

  --mint: #13ad87;
  --mint-soft: #e5f8f2;

  --purple: #7b4bdb;
  --purple-soft: #f0eaff;

  --orange: #f38a16;
  --orange-soft: #fff0de;

  --green: #0aa577;
  --green-dark: #078a64;

  --ink: #12243b;
  --text: #263a52;
  --muted: #71829a;
  --line: #d8e4ef;
  --line-soft: #e8eff6;
  --page-bg: #edf4fa;
  --white: #ffffff;

  --shadow-sm: 0 5px 16px rgba(19, 54, 89, .07);
  --shadow-md: 0 10px 28px rgba(20, 55, 90, .10);
  --shadow-lg: 0 18px 44px rgba(15, 45, 78, .13);

  --sidebar-w: 178px;
  --topbar-h: 52px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    "Pretendard",
    "Noto Sans KR",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 80% 0%, rgba(39, 131, 230, .08), transparent 30rem),
    linear-gradient(180deg, #eef6fc 0%, #f8fbfe 42%, #edf4fa 100%);
}

/* =========================================================
   APP SHELL
   ========================================================= */

.contract-shell {
  width: min(1560px, calc(100% - 24px));
  min-height: 100vh;
  margin: 12px auto 42px;
  overflow: hidden;
  background: #f8fbfe;
  border: 1px solid #dce7f1;
  box-shadow: var(--shadow-lg);
}

.contract-topbar {
  height: var(--topbar-h);
  margin-left: var(--sidebar-w);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: linear-gradient(90deg, var(--navy-950), var(--navy-800));
  color: #fff;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.topbar-nav a {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  border-bottom: 3px solid transparent;
}

.topbar-nav a.active,
.topbar-nav a:hover {
  color: #fff;
  border-bottom-color: #70c7ff;
  background: rgba(255, 255, 255, .05);
}

.topbar-slogan {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, .86);
  white-space: nowrap;
}

/* =========================================================
   SIDEBAR / BRAND
   ========================================================= */

.contract-sidebar {
  position: absolute;
  width: var(--sidebar-w);
  top: 12px;
  bottom: 42px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f9fd 72%, #edf5fb 100%);
  border-right: 1px solid #dce8f2;
}

.brand-box {
  min-height: 142px;
  padding: 20px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 이미지 로고가 없어도 깨지지 않는 TB 브랜드 마크 */
.brand-mark {
  position: relative;
  width: 66px;
  height: 52px;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-900);
  font-size: 34px;
  font-weight: 950;
  font-style: italic;
  letter-spacing: -5px;
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 4px;
  width: 19px;
  height: 11px;
  border-radius: 100% 0 100% 0;
  background: #13a57a;
  transform: rotate(-18deg);
}

.brand-name-en {
  color: var(--navy-900);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .5px;
}

.brand-name-ko {
  margin-top: 2px;
  color: var(--navy-950);
  font-size: 15px;
  font-weight: 950;
}

.side-menu {
  padding: 6px 10px;
}

.side-menu a {
  min-height: 64px;
  margin-bottom: 7px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #657890;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
  transition: .16s ease;
}

.side-menu a:hover {
  color: var(--navy-900);
  background: #eaf4fc;
}

.side-menu a.active {
  color: #fff;
  background: linear-gradient(135deg, #2b8df0, #1673d6);
  box-shadow: 0 8px 18px rgba(39, 131, 230, .22);
}

.side-icon {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 950;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 22px 18px 28px;
  color: var(--navy-800);
}

.sidebar-message {
  font-size: 13px;
  line-height: 1.65;
  font-weight: 850;
}

.sidebar-copy {
  margin-top: 30px;
  color: #91a0b2;
  font-size: 9px;
  line-height: 1.5;
}

/* =========================================================
   MAIN PAGE
   ========================================================= */

.page {
  max-width: none;
  margin: 0 0 0 var(--sidebar-w);
  padding: 0 16px 28px;
}

/* =========================================================
   HERO
   ========================================================= */

.header {
  position: relative;
  min-height: 185px;
  margin: 0 -16px 16px;
  padding: 34px 410px 28px 42px;
  overflow: hidden;
  text-align: left;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(104deg, #ffffff 0%, #f3f9ff 46%, #dbeefa 100%);
  box-shadow: none;
}

.header::before {
  content: "THE BIG KOREA · ELECTRONIC CONTRACT";
  display: block;
  margin-bottom: 9px;
  color: var(--navy-800);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 1.2px;
}

.header::after {
  content: "좋은 사람이\A좋은 회사를 만듭니다.";
  white-space: pre;
  position: absolute;
  right: 50px;
  top: 0;
  width: 330px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-900);
  text-align: center;
  font-size: 22px;
  line-height: 1.65;
  font-weight: 850;
  font-style: italic;
  transform: rotate(-3deg);
  background:
    radial-gradient(circle at 72% 42%, rgba(255,255,255,.92), transparent 34%),
    linear-gradient(135deg, transparent 0 22%, rgba(255,255,255,.38) 22% 100%);
}

.header h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--navy-950);
  font-size: clamp(36px, 4vw, 51px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -2.4px;
}

.header p {
  position: relative;
  z-index: 2;
  margin: 8px 0 0;
  color: #526c88;
  font-size: 16px;
  font-weight: 750;
}

/* =========================================================
   FORM CARD / SECTION
   ========================================================= */

.card {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.section {
  --section-color: var(--blue);
  --section-soft: var(--blue-soft);

  position: relative;
  overflow: hidden;
  margin: 0 0 13px;
  padding: 0 20px 21px;
  background: #fff;
  border: 1px solid #dbe6f0;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

/* 01 사업장 */
.card > .section:nth-of-type(1) {
  --section-color: var(--blue);
  --section-soft: var(--blue-soft);
}

/* 02 직원/용역제공자 */
.card > .section:nth-of-type(2) {
  --section-color: var(--mint);
  --section-soft: var(--mint-soft);
}

/* 03 근무/용역 */
.card > .section:nth-of-type(3) {
  --section-color: var(--purple);
  --section-soft: var(--purple-soft);
}

/* 04 임금 */
.card > .section:nth-of-type(4) {
  --section-color: var(--orange);
  --section-soft: var(--orange-soft);
}

.section h2 {
  position: relative;
  height: 49px;
  margin: 0 -20px 18px;
  padding: 0 18px 0 69px;
  display: flex;
  align-items: center;
  border: 0;
  background:
    linear-gradient(90deg, var(--section-soft) 0%, rgba(255,255,255,.35) 100%);
  color: color-mix(in srgb, var(--section-color) 75%, #102b4c);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -.5px;
}

.section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 53px;
  height: 49px;
  background: var(--section-color);
}

.section h2::after {
  position: absolute;
  left: 0;
  top: 0;
  width: 53px;
  height: 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
}

.card > .section:nth-of-type(1) h2::after { content: "01"; }
.card > .section:nth-of-type(2) h2::after { content: "02"; }
.card > .section:nth-of-type(3) h2::after { content: "03"; }
.card > .section:nth-of-type(4) h2::after { content: "04"; }

/* =========================================================
   GRID / LABEL / INPUT
   ========================================================= */

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px 17px;
}

label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  color: #203852;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 850;
}

.full {
  grid-column: 1 / -1;
}

input,
select {
  width: 100%;
  height: 44px;
  min-width: 0;
  padding: 0 13px;
  border: 1px solid #d3dfeb;
  border-radius: 7px;
  outline: 0;
  background: #fff;
  color: #253a52;
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    background-color .15s ease;
}

input::placeholder {
  color: #a3b0c1;
  font-weight: 500;
}

input:hover,
select:hover {
  border-color: #aec0d2;
}

input:focus,
select:focus {
  border-color: var(--section-color);
  box-shadow:
    0 0 0 3px
    color-mix(in srgb, var(--section-color) 13%, transparent);
}

input[readonly] {
  background: #f3f6f9;
  color: #6c7b8e;
}

/* =========================================================
   WORKPLACE INFO
   ========================================================= */

.info-box {
  position: relative;
  min-height: 36px;
  margin-top: 13px;
  padding: 9px 14px 9px 39px;
  border: 0;
  border-radius: 7px;
  background: var(--section-soft);
  color: color-mix(in srgb, var(--section-color) 80%, #153656);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 750;
}

.info-box::before {
  content: "i";
  position: absolute;
  left: 13px;
  top: 9px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--section-color);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.buttons {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 10px;
  max-width: 800px;
  margin: 18px auto 23px;
  padding: 0;
}

button {
  height: 51px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    filter .15s ease;
}

button.blue {
  border: 2px solid #2878ce;
  background: #fff;
  color: #155ba5;
}

button.green {
  border: 0;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(20,54,88,.15);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* =========================================================
   PREVIEW
   ========================================================= */

.preview-section {
  --section-color: var(--navy-800) !important;
  --section-soft: #edf3f9 !important;
  margin-top: 18px;
  padding-bottom: 28px;
}

.preview-section h2 {
  padding-left: 20px;
}

.preview-section h2::before,
.preview-section h2::after {
  display: none !important;
}

.preview {
  max-width: 980px;
  min-height: 230px;
  margin: 0 auto;
  overflow-x: auto;
  padding: 42px 48px;
  border: 1px solid #d5dee8;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
  font-size: 15px;
  line-height: 1.8;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
}

.preview h1 {
  margin: 4px 0 34px;
  text-align: center;
  color: #111827;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 5px;
}

.preview h3 {
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #30445d;
  color: var(--navy-900);
  font-size: 18px;
}

.preview table {
  width: 100%;
  margin: 12px 0 24px;
  border-collapse: collapse;
}

.preview th,
.preview td {
  padding: 10px;
  border: 1px solid #bdc8d5;
  text-align: center;
}

.preview th {
  background: #f1f5f9;
}

/* =========================================================
   RESULT BOX
   ========================================================= */

.result-box {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid #b5e3d1;
  border-radius: 9px;
  background: #effbf6;
  color: #285646;
  font-size: 14px;
  line-height: 1.7;
}

.result-box input {
  margin-top: 9px;
  background: #fff;
}

.result-box button {
  width: 100%;
  margin-top: 9px;
  border: 0;
  background: var(--navy-900);
  color: #fff;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {
  :root {
    --sidebar-w: 150px;
  }

  .topbar-nav a {
    padding: 0 11px;
  }

  .header {
    padding-right: 300px;
  }

  .header::after {
    right: 20px;
    width: 260px;
    font-size: 18px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 720px) {
  .contract-shell {
    width: 100%;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .contract-sidebar {
    position: relative;
    top: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #dce8f2;
  }

  .brand-box {
    min-height: 90px;
    padding: 13px;
    flex-direction: row;
    gap: 12px;
  }

  .brand-mark {
    width: 48px;
    height: 38px;
    margin: 0;
    font-size: 27px;
  }

  .brand-name-en {
    display: none;
  }

  .brand-name-ko {
    margin: 0;
    font-size: 17px;
  }

  .side-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 0 8px 9px;
  }

  .side-menu a {
    min-height: 48px;
    margin: 0;
    padding: 7px;
    justify-content: center;
    text-align: center;
    font-size: 11px;
  }

  .side-icon {
    display: none;
  }

  .sidebar-bottom {
    display: none;
  }

  .contract-topbar {
    display: none;
  }

  .page {
    margin-left: 0;
    padding: 0 8px 32px;
  }

  .header {
    min-height: 132px;
    margin: 0 -8px 10px;
    padding: 24px 18px;
  }

  .header::before {
    margin-bottom: 7px;
    font-size: 9px;
  }

  .header::after {
    display: none;
  }

  .header h1 {
    font-size: 28px;
    letter-spacing: -1.2px;
  }

  .header p {
    font-size: 12px;
  }

  .section {
    margin-bottom: 10px;
    padding: 0 14px 18px;
    border-radius: 10px;
  }

  .section h2 {
    height: 47px;
    margin: 0 -14px 16px;
    padding-left: 60px;
    font-size: 17px;
  }

  .section h2::before,
  .section h2::after {
    width: 47px;
    height: 47px;
  }

  .section h2::after {
    font-size: 15px;
  }

  .preview-section h2 {
    padding-left: 14px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  label {
    font-size: 13px;
  }

  input,
  select {
    height: 48px;
    font-size: 16px;
  }

  .buttons {
    grid-template-columns: 1fr;
    margin: 16px 4px;
  }

  button {
    height: 53px;
    font-size: 15px;
  }

  .preview {
    padding: 25px 14px;
    font-size: 13px;
  }

  .preview h1 {
    font-size: 23px;
    letter-spacing: 2px;
  }
}

/* =========================================================
   PRINT
   ========================================================= */

@media print {
  body {
    background: #fff;
  }

  .contract-shell {
    width: 100%;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .contract-sidebar,
  .contract-topbar,
  .header,
  .card > .section:not(.preview-section),
  .buttons,
  .result-box {
    display: none !important;
  }

  .page {
    margin: 0;
    padding: 0;
  }

  .preview-section {
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .preview-section > h2 {
    display: none;
  }

  .preview {
    max-width: none;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}

/* 상단 메뉴 제거 후 슬로건만 오른쪽 정렬 */
.contract-topbar {
  justify-content: flex-end;
}


/* ===== 3종 계약서 공통 고화질 인재 배너 ===== */
.header{position:relative;overflow:hidden;isolation:isolate}
.header > *:not(.hero-common-banner){position:relative;z-index:2}
.hero-common-banner{
  position:absolute;z-index:1;right:0;top:0;width:53%;height:100%;
  background:url("images/contract-people-common-hd.png") center center/cover no-repeat;
  pointer-events:none;
}
.header:after{display:none!important;content:none!important}
@media(max-width:980px){.hero-common-banner{width:55%;background-position:center}}
@media(max-width:640px){.hero-common-banner{width:47%;opacity:.34;background-position:center}}
