/* =========================================================
   OWA 컴포넌트 스타일 — Figma componentcom 페이지 실제 값 기준
   파일: du0xi84nNzFChYJsseXXZc
   ========================================================= */

:root {
  --maincolor: #5a5bfd;      /* MainColor */
  --main-615d: #615dff;      /* 버튼 기본 채움 */
  --main-342f: #342fff;      /* 버튼 focus */
  --main-press: #0c098f;     /* 버튼 press */
  --main-hover: #b1afff;     /* 버튼 hover */
  --normal-txt: #333333;     /* normal_txt */
  --disabled: #b1b1b1;       /* disabled */
  --disabled-txt: #efefef;   /* disabled_txt */
  --gray-btn: #eeecec;       /* gray_btn */
  --gray-hover: #e0e0e0;
  --gnb-top: #dddddd;        /* bottom_gnb_top */
  --gray-txt: #787878;
  --red: #ff2727;
  --bg: #f8f8f8;
}

body {
  font-family: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--normal-txt);
}

/* 모바일 화면 컨테이너 (402 x 874) */
.screen {
  position: relative;
  width: 402px;
  min-height: 874px;
  background: #fff;
  overflow: hidden;
  margin: 0 auto;
}
.screen--scroll { height: 874px; overflow-y: auto; }

/* =========================================================
   top_title — 헤더 (h54)
   ========================================================= */
.top-title {
  position: relative;
  height: 54px;
  width: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.top-title__txt {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 44px;
  color: var(--maincolor);
  text-align: center;
}
.top-title__left {
  position: absolute;
  left: 16px;
  top: 15px;
  width: 24px;
  height: 24px;
}
.top-title__right {
  position: absolute;
  top: 15px;
  display: flex;
  gap: 24px;
  right: 16px;
}
.top-title__right .icon { width: 24px; height: 24px; }

/* =========================================================
   input (h44, radius12, border1)
   ========================================================= */
.inp {
  display: flex;
  align-items: center;
  height: 44px;
  min-width: 140px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--maincolor);
  border-radius: 12px;
  background: #fff;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: var(--maincolor);
}
.inp::placeholder { color: var(--maincolor); opacity: .7; }
.inp--black { border-color: var(--normal-txt); color: var(--normal-txt); }
.inp--black::placeholder { color: var(--normal-txt); opacity: .6; }
.inp--readonly { background: #efefef; border-color: var(--maincolor); }
.inp--disabled { border-color: var(--disabled); color: var(--disabled); }
.inp--disabled::placeholder { color: var(--disabled); }

/* =========================================================
   select (h44, radius12)
   ========================================================= */
.sel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  min-width: 140px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--maincolor);
  border-radius: 12px;
  background: #fff;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: var(--maincolor);
}
.sel__txt { flex: 1; }
.sel__arrow { width: 24px; height: 24px; flex-shrink: 0; }
.sel--black { border-color: var(--normal-txt); color: var(--normal-txt); }
.sel--readonly { background: #efefef; }
.sel--disabled { border-color: var(--disabled); color: var(--disabled); }
/* 드롭다운 옵션 */
.sel__options {
  position: absolute;
  left: -1px; top: 45px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--maincolor);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(90,91,253,.12);
  overflow: hidden;
  z-index: 5;
}
.sel__options li {
  height: 40px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 20px;
  color: var(--normal-txt);
}

/* =========================================================
   checkbox (18px box + 8px gap)
   ========================================================= */
.cbx { display: inline-flex; align-items: center; gap: 8px; }
.cbx__box { width: 18px; height: 18px; flex-shrink: 0; }
.cbx__txt {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 16px;
  line-height: 18px;
  color: #000;
  white-space: nowrap;
}
.cbx--checked .cbx__txt { color: var(--maincolor); }
.cbx--disabled .cbx__txt { color: var(--disabled); }

/* =========================================================
   text_checkbox — 필터/태그 토글 (h34, radius10)
   ========================================================= */
.tcbx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  max-height: 40px;
  min-width: 80px;
  padding: 10px 4px;
  border-radius: 10px;
  background: var(--gray-btn);
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  line-height: 16px;
  color: var(--normal-txt);
  text-align: center;
}
.tcbx--on { background: var(--maincolor); color: #fff; }      /* focus */
.tcbx--press { background: var(--main-press); color: #fff; }
.tcbx--disabled { background: var(--disabled); color: var(--disabled-txt); }

/* =========================================================
   big_button (h56, radius10, w288) — Login 등
   ========================================================= */
.big-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  min-width: 92px;
  width: 288px;
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--main-615d);
  font-family: 'Pretendard', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 16px;
  color: #fff;
  text-align: center;
}
.big-btn--hover { background: var(--main-hover); }
.big-btn--focus { background: var(--main-342f); }
.big-btn--press { background: var(--main-press); }
.big-btn--disabled { background: var(--disabled); color: var(--disabled-txt); }

/* =========================================================
   small_button (h40, radius10) — fill / gray / line
   ========================================================= */
.sm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  min-width: 92px;
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--main-615d);
  font-family: 'Pretendard', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 16px;
  color: #fff;
  text-align: center;
}
.sm-btn--gray { background: var(--gray-btn); color: var(--normal-txt); }
.sm-btn--line { background: #fff; border: 1px solid var(--maincolor); color: var(--maincolor); }
.sm-btn--disabled { background: var(--disabled); color: var(--disabled-txt); }

/* =========================================================
   bottom_btn_wrap — 취소/확인 (gap16, pb40)
   ========================================================= */
.btn-wrap {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  padding-bottom: 40px;
}
.btn-wrap__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 92px;
  width: 146px;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: 'Pretendard', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 16px;
  text-align: center;
}
.btn-wrap__cancel { background: var(--gray-btn); color: var(--normal-txt); }
.btn-wrap__ok { background: var(--main-615d); color: #fff; }

/* =========================================================
   bottom_gnb — 하단 탭바 (각 탭 h68)
   ========================================================= */
.gnb {
  display: flex;
  width: 100%;
}
.gnb__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 68px;
  padding: 9px 20px 10px;
  border-top: 1px solid var(--gnb-top);
  background: #fff;
}
.gnb__item .icon { width: 24px; height: 24px; }
.gnb__label {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 12px;
  line-height: 12px;
  color: var(--gray-txt);
  text-align: center;
  width: 60px;
}
.gnb__item--active { border-top-color: var(--maincolor); }
.gnb__item--active .gnb__label { color: var(--maincolor); }
.gnb__item--disabled { background: #f6f6f6; }
.gnb__item--disabled .icon { opacity: .5; }

/* =========================================================
   list02 — 카드 리스트 (h112, radius14)
   ========================================================= */
.card {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 112px;
  padding: 0 16px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 0 16px rgba(0,0,0,.16);
}
.card__info { flex: 1; min-width: 0; }
.card__title {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  color: var(--normal-txt);
}
.card__sub {
  margin-top: 6px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: var(--normal-txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card__actions { display: flex; gap: 8px; flex-shrink: 0; }
.card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border: 1px solid var(--maincolor);
  border-radius: 12px;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: var(--maincolor);
}
.card__btn--del { border-color: var(--red); color: var(--red); }

/* =========================================================
   date_bar — 날짜 범위 바 (datepicker default 상단)
   ========================================================= */
.date-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 44px;
  background: var(--maincolor);
}
.date-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px;
  line-height: 44px;
  color: #fff;
}
.date-bar__item .icon { width: 24px; height: 24px; }
.date-bar__sep { width: 9px; height: 1px; background: #fff; }

/* =========================================================
   month_bar — 월 이동 바 (관리/휴가/출퇴근 상단)
   ========================================================= */
.month-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 42px;
  background: var(--maincolor);
}
.month-bar .icon { width: 24px; height: 24px; }
.month-bar__txt {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px;
  color: #fff;
}

/* =========================================================
   form rows — 등록/필터 폼 공통
   ========================================================= */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field__label {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--normal-txt);
}
.field__label .req { color: var(--red); font-size: 12px; margin-left: 2px; }
.txtarea {
  min-height: 104px;
  padding: 10px;
  border: 1px solid var(--normal-txt);
  border-radius: 12px;
  font-size: 14px;
  line-height: 20px;
  color: var(--normal-txt);
  resize: none;
}

/* =========================================================
   화면 레이아웃 헬퍼 (header / content / gnb 세로 구성)
   ========================================================= */
.screen--app { display: flex; flex-direction: column; height: 874px; background: #fff; }
.app-body { flex: 1; overflow-y: auto; background: var(--bg); padding: 16px; }
.app-body--white { background: #fff; }

/* 날짜바에 좌우 이동 화살표가 있는 변형 */
.date-bar--nav { gap: 16px; }
.date-bar__nav { width: 24px; height: 24px; }

/* 리스트 컬럼 헤더 */
.col-head {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  background: #fff;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px;
  color: var(--gray-txt);
}
.col-head > span { flex: 1; text-align: center; }
.col-head > span:first-child { text-align: left; }

/* 경고문 */
.warn {
  padding: 10px 16px;
  background: #fff;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 12px;
  color: var(--red);
  text-align: center;
}

/* 통계 카드 (휴가 사용 현황) */
.stat-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  overflow: hidden;
  margin-bottom: 16px;
}
.stat-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 16px;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--normal-txt);
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  border-top: 1px solid #eee;
}
.stat-grid div {
  padding: 10px 12px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px;
  border-bottom: 1px solid #f2f2f2;
}
.stat-grid .k { color: var(--normal-txt); font-weight: 500; background: #fafafa; }
.stat-grid .v { color: var(--normal-txt); text-align: right; }

/* 출퇴근 리스트 행 (list01) */
.row {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  margin-bottom: 8px;
  padding: 14px 16px;
}
.row__main { display: flex; align-items: center; }
.row__date { flex: 1; font-family: 'Noto Sans KR', sans-serif; font-size: 14px; color: var(--normal-txt); font-weight: 500; }
.row__cell { width: 64px; text-align: center; font-family: 'Noto Sans KR', sans-serif; font-size: 14px; color: var(--normal-txt); }
.row__cell--blue { color: var(--maincolor); }
.row__cell--red { color: var(--red); }
.row__chev { width: 24px; height: 24px; margin-left: 6px; }
.row__tags { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* 직출퇴 등록/필터 폼 컨테이너 */
.form-body { flex: 1; overflow-y: auto; background: #fff; padding: 20px 16px; }

/* 팝업/모달 */
.modal-dim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 20;
}
.modal {
  width: 320px;
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px 20px;
  text-align: center;
}
.modal__title { font-family: 'Noto Sans KR', sans-serif; font-weight: 700; font-size: 16px; color: var(--normal-txt); margin-bottom: 12px; }
.modal__body { font-family: 'Noto Sans KR', sans-serif; font-size: 14px; line-height: 20px; color: var(--normal-txt); margin-bottom: 20px; }

/* 등록/필터 폼 행 — 라벨 좌측 인라인 (label 92px + field) */
.frow { display: flex; align-items: flex-start; margin-bottom: 18px; }
.frow__label {
  width: 92px; flex-shrink: 0; padding-top: 12px;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 600; font-size: 15px; color: var(--normal-txt);
}
.frow__field { flex: 1; min-width: 0; }
.tag-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-grid .tcbx { min-width: 83px; flex: 0 0 auto; }

/* 인라인 날짜 (등록폼의 일자/휴가일) */
.inline-date {
  display: flex; align-items: center; gap: 8px; height: 44px;
  font-family: 'Noto Sans KR', sans-serif; font-size: 14px; color: var(--normal-txt);
}
.inline-date .icon { width: 24px; height: 24px; }
.inline-date__sep { color: var(--normal-txt); }

/* 지도 */
.map-img { width: 100%; border-radius: 12px; margin-bottom: 18px; }

/* 앱관리 프로필 */
.profile { display: flex; align-items: center; gap: 14px; padding: 24px 20px; }
.profile__avatar { width: 54px; height: 54px; flex-shrink: 0; }
.profile__name { font-family: 'Noto Sans KR', sans-serif; font-weight: 700; font-size: 16px; color: var(--normal-txt); }
.profile__org { margin-top: 4px; font-family: 'Noto Sans KR', sans-serif; font-size: 13px; color: var(--gray-txt); }
.menu-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 20px;
  border-top: 1px solid #eee;
  font-family: 'Noto Sans KR', sans-serif; font-size: 15px; color: var(--maincolor);
}
.menu-row:last-of-type { border-bottom: 1px solid #eee; }
.menu-row .icon { width: 24px; height: 24px; }

/* 관리2 — 업무 카드 (출근/퇴근 버튼 포함) */
.work-card {
  display: flex; align-items: center;
  background: #fff; border-radius: 14px;
  box-shadow: 0 0 16px rgba(0,0,0,.10);
  padding: 14px 12px; margin-bottom: 10px; min-height: 112px;
}
.work-card__info { flex: 1; min-width: 0; padding-right: 8px; }
.work-card__date { font-family: 'Noto Sans KR', sans-serif; font-weight: 500; font-size: 14px; color: var(--normal-txt); }
.work-card__task { margin-top: 4px; font-family: 'Noto Sans KR', sans-serif; font-size: 13px; color: var(--gray-txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-card__slots { display: flex; gap: 8px; flex-shrink: 0; }
.wbtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 76px; height: 76px; padding: 6px 4px; border-radius: 10px;
  background: var(--gray-btn); color: var(--normal-txt);
  font-family: 'Noto Sans KR', sans-serif; font-weight: 500; font-size: 14px; text-align: center;
}
.wbtn--on { background: var(--main-615d); color: #fff; }
.wbtn--time { background: #fff; color: var(--maincolor); font-size: 12px; line-height: 16px; }
.wbtn--time-red { color: var(--red); }

/* =========================================================
   인터랙션 상태 (owa.js)
   ========================================================= */
.cbx, .tcbx, .sel, .stat-card__head, .row, .gnb__item,
.terms-all, .terms-row, .menu-row { cursor: pointer; }

/* select 드롭다운 — 기본 닫힘 */
.sel__options { display: none; }
.sel--open .sel__options { display: block; }
.sel--open { border-color: var(--maincolor); }   /* 옵션 열렸을 때 파란 테두리 */
.sel__arrow { transition: transform .15s; }
.sel--open .sel__arrow { transform: rotate(180deg); }
.sel__options li { cursor: pointer; }
.sel__options li:hover { background: #f4f4fb; }

/* input / textarea 포커스 — 포커스 시에만 파란 테두리 */
.inp:focus, .txtarea:focus { border-color: var(--maincolor); box-shadow: 0 0 0 2px rgba(90,91,253,.18); }

/* 출퇴근 행 아코디언 — 태그 기본 숨김 */
.row__tags { display: none; }
.row.open .row__tags { display: flex; }
.row__chev { transition: transform .15s; }
.row.open .row__chev { transform: rotate(180deg); }

/* 휴가 사용현황 아코디언 */
.stat-card__head .icon { transition: transform .15s; }
.stat-card.collapsed .stat-grid { display: none; }
.stat-card.collapsed .stat-card__head .icon { transform: rotate(180deg); }
