/* common.css */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg-component);
  font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  font-weight: 400;
  color: var(--text-main);
}

/* =========================
   공통 레이아웃 (login)
   ========================= */
.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 16px;
}
.wrap { width: 100%; }

/* =========================
   공통 버튼
   ========================= */
.btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-size: 20px;
  line-height: 24px;
  font-weight: 600;
}

.btn--primary {
  background: var(--brand-main);
  color: var(--text-contrast);
}

.btn--outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-default);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =========================
   공통 체크박스 (login 스타일)
   ========================= */
.remember { display: inline-flex; align-items: center; }
.remember__input { position: absolute; opacity: 0; }

.remember__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.remember__box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--bg-component);
  border: 2px solid var(--border-default);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.remember__text {
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  color: var(--text-main);
}

.remember__input:checked + .remember__label .remember__box {
  background: var(--brand-main);
  border-color: var(--brand-main);
}

.remember__input:checked + .remember__label .remember__box::after {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--text-contrast);
  clip-path: polygon(14% 52%, 0 66%, 40% 100%, 100% 30%, 86% 16%, 40% 70%);
}

/* =========================
   로그인
   ========================= */
.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 40px;
}

.login-logo { height: 40px; width: auto; }

.login-subtitle {
  margin-top: 8px;
  font-size: 20px;
  line-height: 24px;
  font-weight: 600;
  color: var(--brand-main);
}

.input-group { padding: 4px 0; }
.input-box + .input-box { margin-top: 4px; }

.input-box {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--bg-component);
  padding: 12px 4px;
  border-bottom: 1px solid var(--border-default);
}

.input-box__icon { width: 24px; height: 24px; }

.input-box__field {
  flex: 1;
  margin-left: 12px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 18px;
}

.input-box__field::placeholder { color: var(--text-sub); }

.login-meta {
  display: flex;
  justify-content: space-between;
  margin: 4px 0 20px;
}

.login-meta__error {
  font-size: 14px;
  color: var(--contrast-main);
  visibility: hidden;
  margin: 0;
}

.login-meta__error.is-visible { visibility: visible; }

/* =========================
   Work Page
   ========================= */
.work-page {
  padding-top: 60px;
  min-height: 100vh;
  background: var(--bg-default);
}

.sheet + .sheet { margin-top: 40px; }

/* Header */
.app-header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 60px;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-component);
  border-bottom: 1px solid var(--border-default);
  z-index: 1000;
}

.app-header__logo { height: 28px; }

/* Sheet */
.sheet {
  width: 100%;
  background: var(--bg-component);
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
}

.sheet__inner { padding: 16px; }
.sheet--user { margin-top: 40px; }

/* User info */
.user-panel__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}
.user-panel__name { color: var(--brand-main); }

.user-panel__desc {
  margin: 8px 0 12px;
  font-size: 14px;
}

.user-meta {
  padding-left: 12px;
  border-left: 2px solid var(--brand-main);
}

.user-meta__row {
  display: flex;
  gap: 4px;
  font-size: 15px;
  color: var(--text-sub);
}

.user-meta__row + .user-meta__row { margin-top: 8px; }

/* Title + Badge row */
.user-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.user-panel__title { flex: 1; min-width: 0; }

/* Badge */
.status-badge {
  border: 1px solid var(--border-default);
  background: var(--bg-component);
  color: var(--text-sub);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 16px;
  font-weight: 700;
  cursor: default;
  white-space: nowrap;
}

/* 수정: 근무 중 아님 배경 = --text-disabled, 텍스트 = --text-sub */
.status-badge--none {
  background: var(--border-default);
  color: var(--text-sub);
}

.status-badge--work {
  background: var(--brand-sub);
  color: var(--brand-main);
  border-color: var(--brand-sub);
}

.status-badge--error {
  background: var(--contrast-bg);
  color: var(--contrast-main);
  border-color: var(--contrast-bg);
  cursor: pointer;
}

/* Segment */
.seg-wrap { border-bottom: 1px solid var(--border-default); }

.seg-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 56px;
  padding: 0 16px;
}

.seg__btn {
  border: 0;
  background: none;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-disabled);
  cursor: pointer;
}

.seg__btn.is-active { color: var(--text-main); }

.seg__underline {
  position: absolute;
  left: 16px;
  bottom: 0;
  width: calc((100% - 32px) / 2);
  height: 2px;
  background: var(--brand-main);
  transition: transform 0.15s ease;
}

/* Office / Remote content */
.office-desc,
.remote-desc {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-sub);
}

.code-box {
  display: flex;
  align-items: center;
  background: var(--brand-bg);
  border-radius: 8px;
  padding: 16px 12px;
}

.code-input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 18px;
}

.code-input::placeholder { color: var(--text-sub); }

.code-hint {
  margin-left: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--contrast-main);
  visibility: hidden;
}
.code-hint.is-visible { visibility: visible; }

.office-btn,
.remote-btn { margin-top: 8px; }

.remote-consent { margin: 6px 0 8px; }
.is-hidden { display: none !important; }

/* =========================
   Modal (work)
   - 에러: 아이콘 없음
   - 가운데 정렬
   - 메인 1줄 + 서브 텍스트
   ========================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}
.modal.is-open { display: block; }

.modal__dim {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

.modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100vw - 32px);
  max-width: 420px;
  background: var(--bg-component);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 16px;
}

.modal__msg {
  margin: 0 0 16px 0;
  text-align: center;
}

.modal__headline {
  margin: 0;
  font-size: 18px;
  line-height: 20px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal__sub {
  margin: 6px 0 0 0;
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  color: var(--text-sub);
}

.modal__time {
  color: var(--brand-main);
  font-weight: 800;
}

.modal__actions { display: flex; gap: 8px; }
.modal__actions .btn { font-size: 16px; line-height: 20px; font-weight: 600; }