/* ===== SAP 공통 스타일 ===== */
:root {
  --c-primary:      #8c386d;  /* 앱 배경/상태바 */
  --c-primary-dark: #591b44;  /* 입력 글자색 */
  --c-input-bg:     #a66c90;  /* bg_login_text.xml */
  --c-accent:       #c04a9f;  /* Sign in 버튼 */
  --c-accent-press: #a8418c;
  --c-white:        #ffffff;
  --radius:         6px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* 아이폰 노치·홈 바 영역 피하기 (viewport-fit=cover 와 함께 사용) */
body {
  padding-left:   env(safe-area-inset-left);
  padding-right:  env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

button { font: inherit; cursor: pointer; }
input  { font: inherit; }

/* ----- 로딩 오버레이 (원본: ProgressDialog) ----- */
.loading {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.45);
  z-index: 100;
}
.loading.show { display: flex; }
.loading__box {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 24px;
  background: #fff; color: #333;
  border-radius: 8px;
  font-size: 15px;
  white-space: pre-line;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.spinner {
  width: 24px; height: 24px;
  border: 3px solid #e6d3df;
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- 알림창 (원본: AlertDialog) ----- */
.dialog {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,.45);
  z-index: 110;
}
.dialog.show { display: flex; }
.dialog__box {
  width: 100%; max-width: 340px;
  background: #fff; color: #222;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,.3);
}
.dialog__title { margin: 0; padding: 18px 20px 6px; font-size: 17px; font-weight: 700; }
.dialog__msg   { margin: 0; padding: 6px 20px 18px; font-size: 15px; line-height: 1.5; white-space: pre-line; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 4px; padding: 0 10px 10px; }
.dialog__btn {
  padding: 10px 16px;
  border: 0; background: none;
  color: var(--c-primary); font-weight: 700; font-size: 15px;
  border-radius: 4px;
}
.dialog__btn:hover { background: #f5ecf2; }

/* ----- 토스트 (원본: Toast) ----- */
.toast {
  position: fixed; left: 50%; bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  background: rgba(40,40,40,.9); color: #fff;
  border-radius: 20px;
  font-size: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 120;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
