/* ============================================================
   PlusX Station — Design System
   Inspired by PlusX BX (+ / × symbols, monochrome black)
   ============================================================ */

/* 한글 폰트: Pretendard 가변(굵기 45~920 파일 하나) — static/fonts 자체 서빙(셀프호스팅)이라 외부 서버 의존 없음.
   swap: 로딩되는 잠깐은 시스템 폰트로 먼저 보여주고 준비되면 교체 (빈 글자 방지)
   라틴·숫자: Strichpunkt Sans — base.html 에서 Google Fonts 로드 (store 와 동일 구성) */
@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/PretendardVariable.woff2') format('woff2-variations');
  font-weight: 45 920;
  font-display: swap;
}

:root {
  --bg-0: #000000;
  --bg-1: #0A0A0B;
  --bg-2: #111114;
  --bg-3: #16161A;
  --surface: #1A1A1F;
  --surface-hover: #22222A;

  --border-1: rgba(255, 255, 255, 0.06);
  --border-2: rgba(255, 255, 255, 0.10);
  --border-3: rgba(255, 255, 255, 0.18);

  --text-1: #FAFAFA;
  --text-2: rgba(255, 255, 255, 0.72);
  --text-3: rgba(255, 255, 255, 0.48);
  --text-4: rgba(255, 255, 255, 0.30);

  --accent: #FFFFFF;
  --accent-soft: rgba(255, 255, 255, 0.08);

  --success: #4ADE80;
  --warning: #FACC15;
  --danger:  #F87171;
  --info:    #60A5FA;

  --radius-xs: 6px;                   /* 마이크로 — 체크박스·뱃지·브랜드마크·아이콘 버튼 */
  --radius-sm: 8px;                   /* 컨트롤 — 버튼·인풋·메뉴 아이템 */
  --radius-md: 11px;                  /* 컨테이너 표준 — 카드·표·팝오버·상단바 (store --radius 와 동일값) */
  --radius-lg: 16px;                  /* 대형 히어로 서피스 — 모달·로그인 카드 */

  --sidebar-w: 232px;
  --header-h: 50px;                   /* store --bar-h 와 동일 */
  --topbar-gap: 16px;                 /* 상단바 플로팅 여백 (store 얼라인: --gap 16px) */
  --topbar-bg: rgba(40, 40, 46, 0.45); /* 상단바 글래스 배경 (반투명 회색 틴트) — 상단바 전용 */
  --glass-bg: rgba(58, 58, 64, 0.3);  /* 떠 있는 글래스(프로필 메뉴·알림 팝업·토스트) — 상단바보다 한 단계 밝음 (2026.08.11 분리). 알파 .45 → .3 (2026.09.02 사용자 확정) */
  --topbar-blur: 28px;                /* 글래스 공통 블러 세기 (20 → 24 → 28 확정, 2026.08.12 — 상단바·프로필 메뉴·알림·토스트·드롭다운·모달 공유) */
  --input-bg: rgba(14, 14, 18, 0.65);  /* 인풋 공통 면 — 독립 토큰 (2026.08.19 사용자 확정: --bg-3 50% 파생에서 분리). 22,22,26/.5 → 8,8,11/.65(어두운 배경에서 티 안 남) → 색만 살짝 밝힘(불투명도 유지). 인풋 톤은 이 값만 조절. 블러 없음 — 팝업 카드가 이미 backdrop-filter 라 중첩 블러는 무효과 */

  /* 스켈레톤 공용 (2026.09.03 사용자 확정, 시안 비교로 선택) — 면 #262629(구 image-skeleton #25252B 와 거의 같은 밝기; #1F1F24 → #292930 → #262629 순으로 당일 조정) · 세로 쉬머 흰 5%(구 7.5%) · 주기 1.2s */
  --sk-face: #262629;
  --sk-face-table: #17171A;           /* 표 골격 면 — 패널 바닥(#111114) 바로 위 한 단계 (#202024 → #1B1B1F → #17171A, 2026.09.03 사용자 지시). 더 내리면 바닥과 구분 안 됨 */
  --sk-shine: rgba(255, 255, 255, 0.05);
  --sk-shine-table: rgba(255, 255, 255, 0.03);   /* 표 골격 쉬머 — 면이 어두워 5% 는 과해 3% (2026.09.03 사용자 지시) */
  --sk-dur: 1.2s;

  --shadow-1: 0 1px 0 rgba(255,255,255,0.04) inset;
  --shadow-2: 0 8px 24px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 0 1px rgba(255,255,255,0.06), 0 12px 32px rgba(0,0,0,0.6);

  --font-sans: 'Strichpunkt Sans', 'Pretendard', -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif; /* store 와 동일: 라틴·숫자=Strichpunkt Sans, 한글=Pretendard(셀프호스팅) */
  /* 기술 식별자(슬러그·IP·도메인·키)용 — 모노스페이스 제거하고 본문과 동일 Pretendard 로 통일.
     (라틴·숫자도 Pretendard 로 나오도록 Strichpunkt 보다 Pretendard 를 앞에 둠) 토큰명은 사용처 호환 위해 유지. */
  --font-mono: 'Pretendard', -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

/* ── Scrollbar (다크 테마 전역 일관) ──
   커스텀 미정의 시 macOS가 밝은 네이티브/오버레이 스크롤바를 보여 테마와 충돌.
   전역으로 어둡고 얇게 통일한다. */
html { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  border: 2px solid transparent;     /* 트랙 여백으로 thumb 가늘게 */
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.30); }
::-webkit-scrollbar-corner { background: transparent; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500; /* 기본 두께 = Medium (store 와 동일) — GNB 라벨·메뉴, 카드 텍스트 등 미지정 요소 공통 */
  line-height: 1.5;
  /* 전역 단어 단위 줄바꿈 (사용자 확정 2026.08.26) — 한글이 글자 중간에서 끊기지 않게.
     긴 영문·URL 오버플로는 break-word 가 안전망 */
  word-break: keep-all;
  overflow-wrap: break-word;
  color: var(--text-1);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { display: block; max-width: 100%; }
/* 아이콘(Iconify·Tabler)이 async 로 늦게 로드돼도 자리 미리 예약 → 로드 시 폭 점프(layout shift) 방지.
   width 속성으로 크기를 지정한 아이콘은 속성 크기를 따라야 하므로 1em 강제는 미지정분에만 */
iconify-icon { display: inline-block; }
iconify-icon:not([width]) { width: 1em; height: 1em; }

/* ============================================================
   Layout
   ============================================================ */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.app-body {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  flex: 1;
  min-height: 0;
}

/* 투명 GNB — 배경·보더 없이 검은 캔버스 위에 아이템만. 구분은 선이 아니라 간격이 담당.
   pill 왼쪽 엣지(패딩 16px)가 플로팅 상단바 왼쪽 엣지(--topbar-gap 16px)와 같은 수직선에 정렬 */
.sidebar {
  /* GNB 폰트 = Pretendard 전면 적용 (전역 확정 2026.08) — 라틴·숫자까지.
     Strichpunkt 는 로고와 명시 지정된 숫자에만 남긴다 (규칙: DESIGN-RENEWAL.md 2번) */
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  display: flex;
  flex-direction: column;
  padding: 0 16px 24px;
  /* 플로팅 상단바가 위/아래 --topbar-gap 을 차지하므로 그만큼 내려서 고정 */
  position: sticky;
  top: calc(var(--header-h) + var(--topbar-gap) * 2);
  height: calc(100vh - var(--header-h) - var(--topbar-gap) * 2);
  /* 스크롤 주체는 안쪽 .sidebar__scroll — 하단 클러스터(알림 등)를 스크롤 밖에 두기 위해 */
  overflow: hidden;
  /* sticky 는 자체 스태킹 컨텍스트를 만듦 — z-index 없으면 내부 알림 팝업(z 100)이
     컨텍스트째로 콘텐츠의 sticky 요소(가이드 목차 z 5 등) 아래에 깔린다 */
  z-index: 30;
}

/* GNB 를 [스크롤 영역] + [하단 고정 클러스터] 두 덩이로 나눈다.
   margin-top:auto 만으로 바닥에 붙이던 방식은 **메뉴가 많아 내용이 넘치는 순간 고정이 풀려**
   알림이 화면 밖으로 밀려났다(1440×900 에서 실제 발생, 2026.08). 위만 스크롤시켜 해결.
   min-height:0 필수 — flex 아이템 기본값 auto 면 내용 높이만큼 버텨서 스크롤이 안 생긴다.
   자신도 flex 컬럼 — 안의 --pinned 섹션(UI Preview)이 margin-top:auto 로 이 영역 바닥에 붙는다 */
.sidebar__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
/* GNB 스크롤바 숨김 (2026.08.23 사용자 확정) — 스크롤은 되고 바만 안 보이게 */
.sidebar__scroll { scrollbar-width: none; }
.sidebar__scroll::-webkit-scrollbar { display: none; }

/* 하단 고정 섹션(ORIGINAL) — 하단 클러스터의 첫 요소로 남는 공간을 밀어냄 (알림이 그 아래 붙음) */
.sidebar__section--pinned {
  margin-top: auto;
  padding-top: 28px;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 24px;
}
.sidebar__brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--bg-0);
  border-radius: var(--radius-xs);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.04em;
}
img.sidebar__brand-mark {
  background: transparent;
  border-radius: var(--radius-xs);
  object-fit: contain;
}
.sidebar__brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.sidebar__brand-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
}

.sidebar__section { margin-top: 28px; } /* 섹션 구분은 여백으로만 */
.sidebar__section:first-child { margin-top: 0; }
/* 스크롤 영역 바닥에 붙는 섹션(UI Preview). 위 134행에도 같은 선언이 있지만 바로 윗줄
   .sidebar__section 이 특이도 동점 + 후순위로 덮어써서 안 먹고 있었다 → 여기서 되살린다 (2026.08) */
.sidebar__section--pinned { margin-top: auto; }
.sidebar__label {
  font-family: inherit; /* GNB 는 전부 Pretendard (전역 확정 2026.08 — 구 Strichpunkt 명시 해제) */
  font-size: 11px;
  color: #4D4D4D; /* mute — 투명도(--text-4 30%) 대신 동일 밝기 단색 */
  text-transform: uppercase;
  letter-spacing: 0; /* store 대문자 라벨과 동일 (eyebrow·logo 모두 0) */
  padding: 0 12px 6px;
}

.sidebar__nav { list-style: none; padding: 0; margin: 0; }
.sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: #B8B8B8; /* mute — 투명도(--text-2 72%) 대신 동일 밝기 단색 */
  transition: background .15s ease, color .15s ease;
}
.sidebar__nav a:hover {
  background: var(--accent-soft);
  color: var(--text-1);
}
.sidebar__nav a.is-active {
  background: var(--surface);
  color: var(--text-1);
  font-weight: 600;
}
.sidebar__nav .ico {
  width: 16px; height: 16px; /* mute 는 링크 색상으로 — opacity 겹치기 제거 */
  display: inline-flex;
}
/* GNB 진행중 결재 개수 칩 — 메뉴 텍스트 바로 옆, 차분한 톤 */
.sidebar__nav .nav-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sidebar__nav a:hover .nav-badge,
.sidebar__nav a.is-active .nav-badge {
  background: var(--surface-hover);
  color: var(--text-1);
}
/* inline-flex 가 UA [hidden]{display:none} 를 눌러버리므로 명시 (진행중 0건 시 숨김) */
.sidebar__nav .nav-badge[hidden] { display: none; }
/* 노출될 때 부드럽게 등장 — 캐시로 첫 페인트부터 안정 노출하되 페이드로 자연스럽게. */
@keyframes navBadgeIn { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
.sidebar__nav .nav-badge:not([hidden]) { animation: navBadgeIn .22s ease both; }

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* 상단바 위 여백(--topbar-gap) 가림막 — 스크롤 콘텐츠가 플로팅 바 위로 삐져나오지 않게 덮음.
   0~16px 완전 불투명(틈 완전 차단) → 16~50px 페이드. 페이드 구간은 글래스 바 뒤라 바 상단이 미세하게 어두워지는 정도로만 보임 */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 50px;
  background: linear-gradient(to bottom, var(--bg-0) var(--topbar-gap), transparent 100%);
  z-index: 19;            /* 상단바(20) 아래, 일반 콘텐츠 위. 팝업(100+)엔 안 걸림 */
  pointer-events: none;
}

/* 플로팅 글래스 바 — 화면 가장자리에서 --topbar-gap 만큼 띄우고 라운드+블러 (store 얼라인, 박스 제거) */
.topbar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  margin: var(--topbar-gap);  /* Station 버튼이 상단바 안으로 들어와 우측 여백도 동일 */
  border-radius: var(--radius-md);
  background: var(--topbar-bg);
  box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: blur(var(--topbar-blur)) saturate(1.3);
  backdrop-filter: blur(var(--topbar-blur)) saturate(1.3);
  position: sticky;
  top: var(--topbar-gap);
  z-index: 20;
}
.topbar__crumb {
  font-size: 13px;
  color: var(--text-3);
}
.topbar__crumb b { color: var(--text-1); font-weight: 600; }

/* Topbar brand (logo) */
.topbar__brand {
  display: flex;
  align-items: center;
  gap: 4px;
}
.topbar__brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  object-fit: contain;
}
.topbar__brand-name {
  /* store .logo 와 동일 스펙 — 로고는 Strichpunkt Sans 명시 */
  font-family: 'Strichpunkt Sans', var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--text-1);
}

.topbar__right { display: flex; align-items: center; gap: 8px; }

/* Topbar icon buttons (알림 / Docs) */
.topbar__icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.topbar__icon-btn:focus { outline: none; }
.topbar__icon-btn:focus-visible { outline: 2px solid var(--border-3); outline-offset: 2px; }
.topbar__icon-btn:hover {
  background: var(--surface-hover);
  color: var(--text-1);
}
/* Station 이동 버튼(.topbar__station) 제거 — 프로필 메뉴 항목으로 이동 (2026.08.13, 사용자 확정).
   상단바에 상시 노출할 만큼 자주 쓰는 동작이 아니고, 계정 메뉴가 외부 서비스 이동의 자연스러운 자리 */

.topbar__icon-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--bg-1);
}

.avatar {
  width: 27px; height: 27px; border-radius: 50%; /* store .pop-face 와 동일 크기 */
  background: linear-gradient(135deg, #2a2a2f, #3a3a44);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  color: var(--text-1);
  border: 0;   /* 상시 1px 테두리 제거 (2026.08.21 사용자 지시) — 호버 흰 링과 이중선으로 보이던 것 */
  transition: transform .2s ease, box-shadow .25s ease; /* store .pop-face 와 동일 호버/클릭 모션 */
}
.avatar:hover { transform: scale(1.07); box-shadow: 0 0 0 2px rgba(255,255,255,.22); }
.avatar:active { transform: scale(.96); }
button.avatar { cursor: pointer; padding: 0; font-family: inherit; }
.avatar--img { background: var(--bg-1); overflow: hidden; }
.avatar__img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }

/* Topbar profile dropdown (로그아웃) */
.topbar__profile { position: relative; }
.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  padding: 6px;
  z-index: 30;
}
/* 상단바·프로필 메뉴 폰트 = Pretendard (전역 확정 2026.08) — GNB 와 같은 기준.
   **로고(.topbar__brand-name)만 Strichpunkt 유지** = 브랜드 마크 (§6-1).
   상단바는 .rn-panel 밖이라 리뉴얼 폰트 상속이 닿지 않으므로 직접 지정한다 */
.profile-menu {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
}

/* 계정 메뉴 글래스 변형 — 상단바 밖 형제(fixed), 상단바와 동일 글래스. hidden 대신 .is-open 클래스로 페이드/슬라이드 */
.profile-menu--glass {
  position: fixed;
  top: calc(var(--topbar-gap) + var(--header-h) + 8px);
  /* 아바타(프로필 버튼) 오른쪽 끝과 정렬 — 상단바 바깥 여백 + 상단바 좌우 패딩(20).
     ※ 옛 플로팅 버튼 기준(`--topbar-gap * 2 + --header-h`)은 메뉴를 46px 왼쪽에 띄웠다 (2026.08 수정) */
  right: calc(var(--topbar-gap) + 20px);
  z-index: 100;
  border: none;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--topbar-blur)) saturate(1.3);
  backdrop-filter: blur(var(--topbar-blur)) saturate(1.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .28s ease, transform .28s cubic-bezier(.2,.8,.2,1), visibility .28s;
}
.profile-menu--glass.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.profile-menu__user {
  display: flex;
  align-items: center;
  /* 로그아웃 버튼이 항목 줄로 내려가 이 행은 이름·직급만 남는다 (2026.08.17) — space-between·gap 제거 */
  padding: 9px 12px 10px;
}
/* 이름과 직급을 한 줄로 — 전 화면 공통 "이름 직급" 표기 (2026.08. 구: 세로 2줄) */
.profile-menu__user-info { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.profile-menu__user-name { font-size: 13.5px; font-weight: 600; color: var(--text-1); }
.profile-menu__user-pos { font-size: 13.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
/* 로그아웃은 계정 행 우측 아이콘 버튼에서 항목 줄(.profile-menu__item--logout)로 이동 (2026.08.17).
   구 .profile-menu__logout 규칙은 사용처가 없어 삭제 — 되살릴 땐 git 이력 참고 */
/* 그룹 구분 헤어라인 — rn-menu__sep 과 같은 값 (계정 정보 ↔ 이동 항목) */
.profile-menu__sep { height: 1px; background: rgba(255,255,255,.06); margin: 4px 6px; }
.profile-menu__item {
  /* flex = 아이콘 동반 항목 정렬 (rn-menu__item 과 같은 문법 — 아이콘 없으면 결과 동일) */
  display: flex;
  align-items: center;
  gap: 8px;
  /* a·button 을 같은 항목으로 쓰기 위한 리셋 (rn-menu__item 과 동일 — 로그아웃이 button, 2026.08.17).
     ⚠️ button 은 UA 스타일이 폰트·자간을 끊으므로 family 만으로 부족 — weight·letter-spacing 도 명시
     (안 하면 로그아웃만 400/자간 0 으로 렌더돼 위 항목보다 얇고 넓어 보인다. 실측으로 확인) */
  width: 100%;   /* button 은 block 이어도 내용 폭에 맞춰지므로 명시 — 없으면 호버 면이 줄 일부만 덮는다 */
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: inherit;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1; /* 한 줄 라벨 = 행간 1 (§2) — 상속 1.5 는 지정 패딩보다 항목을 6px 키운다 */
  color: #B8B8B8; /* mute — 투명도(--text-2 72%) 대신 동일 밝기 단색 */
  transition: background .15s ease, color .15s ease;
}
/* display 지정 클래스엔 hidden 가드 필수 (§5 — 브라우저 기본 [hidden] 보다 author 규칙이 강함) */
.profile-menu__item[hidden] { display: none; }
/* 전역 svg=block 리셋 아래 flex 아이템 정렬. 아이콘 16 > 글자 13.5 — 상쇄 마진으로 항목 높이 불변 */
.profile-menu__item svg { flex: none; margin: -1.5px 0; }
.profile-menu__item:hover { background: var(--surface-hover); color: var(--text-1); }
/* 로그아웃 호버는 위험색 유지 — 아이콘 버튼 시절의 어포던스를 항목 줄에서도 그대로 (2026.08.17) */
.profile-menu__item--logout:hover { background: rgba(248,113,113,0.10); color: var(--danger); }
.profile-menu__item--danger { color: var(--danger); }
.profile-menu__item--danger:hover { background: rgba(248,113,113,0.10); color: var(--danger); }

/* 알림 API 연결 전 빈 상태 팝업 — 기존 상단바 글래스 스타일 유지 */
.noti__pop {
  width: 380px; max-width: calc(100vw - 32px); padding: 0;   /* 360 → 380 (사용자 확정 2026.09.02) */
  position: fixed;
  top: calc(var(--topbar-gap) + var(--header-h) + 8px);
  right: calc(var(--topbar-gap) + 20px);
  left: auto;
  bottom: auto;
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 0;
  z-index: 100;
  border: 0;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--topbar-blur)) saturate(1.3);
  backdrop-filter: blur(var(--topbar-blur)) saturate(1.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .28s ease, transform .28s cubic-bezier(.2,.8,.2,1), visibility .28s;
}
.noti__pop.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.noti__head { border-bottom: 1px solid var(--border-1); }
.noti__head[hidden] { display: none; }
.noti__tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px 0;
}
.noti__tabs[hidden] { display: none; }
.noti__tabs button {
  display: inline-flex;
  align-items: center;
  margin-bottom: -1px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-3);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  transition: color .15s ease, border-color .15s ease;
}
.noti__tabs button:hover { color: var(--text-1); }
.noti__tabs button.is-active {
  border-bottom-color: var(--accent);
  color: var(--text-1);
  font-weight: 600;
}
.noti__list { max-height: 360px; overflow-y: auto; padding: 6px; }
.noti__list[hidden] { display: none; }
.noti__empty {
  margin: 0;
  padding: 28px 16px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1;
  text-align: center;
}

/* 프로젝트 옵션 메뉴 (kebab 드롭다운) */
.proj-menu { position: relative; }
.proj-menu__btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: none;
  border: none;
  padding: 0;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.proj-menu__btn:hover { background: var(--surface-hover); color: var(--text-1); }

/* 프로젝트 목록 카드 — 케밥 옵션(정보 수정/삭제) 오버레이 */
.proj-card { position: relative; }
.proj-card__link { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.proj-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.proj-card__menu { position: relative; z-index: 2; flex-shrink: 0; }

.content {
  /* 왼쪽 거터 0 — 콘텐츠가 사이드바 컬럼 바로 오른쪽에 붙음 (레일 모드와 동일한 정렬 리듬).
     사이드바 자체 우측 패딩(16px)이 최소 간격을 만든다. 우측 16 = 상단바 여백(--topbar-gap)과 정렬 */
  padding: 0 16px 64px 0;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

/* ============================================================
   Typography
   ============================================================ */
.page-h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.page-sub {
  color: var(--text-3);
  font-size: 14px;
  margin: 0 0 28px;
}
.section-h {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

/* ============================================================
   비용 분석 (cost) — 예산 게이지 / 월별 막대 / 프로젝트 바 / 리포트
   ============================================================ */
.cost-gauge { height: 8px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.cost-gauge__fill { display: block; height: 100%; border-radius: 999px; background: rgba(255, 255, 255, 0.55); }
.cost-gauge__fill.is-ok { background: var(--success); }
.cost-gauge__fill.is-warning { background: var(--warning); }
.cost-gauge__fill.is-danger { background: var(--danger); }

.cost-bars { display: flex; gap: 14px; margin-top: 18px; align-items: flex-end; }
.cost-bars__col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cost-bars__track {
  width: 100%; max-width: 56px; height: 150px;
  display: flex; align-items: flex-end;
  background: var(--bg-3); border-radius: var(--radius-sm); overflow: hidden;
}
.cost-bars__bar {
  width: 100%; min-height: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.55));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.cost-bars__bar.is-current { background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), #ffffff); }
.cost-bars__amt { font-size: 11.5px; color: var(--text-3); }
.cost-bars__lbl { font-size: 12px; color: var(--text-2); }

.cost-proj + .cost-proj { margin-top: 14px; }
.cost-proj__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; font-size: 13.5px; }
.cost-proj__head .mono { color: var(--text-3); font-size: 13px; }
.cost-proj__meta { margin-left: 8px; font-size: 12px; color: var(--text-3); font-weight: 400; }

/* 운영 비용 — 사이트별 + 환경 분해 */
.cost-ops + .cost-ops { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-1); }
.cost-ops__envs { display: flex; flex-direction: column; gap: 6px; padding: 8px 0 0 12px; border-left: 1px solid var(--border-2); margin-left: 2px; }
.cost-ops__env { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; color: var(--text-2); }
.cost-ops__env .mono { color: var(--text-3); font-size: 12.5px; }

/* 월 전환 네비 (프로젝트별 비용 등) */
.month-nav { display: inline-flex; align-items: center; gap: 6px; }
/* 라벨 날짜 표기 — 숫자 포함 Pretendard 고정 (날짜=Pretendard 전역 규칙) */
.month-nav__label { min-width: 92px; text-align: center; font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif; font-size: 13.5px; font-weight: 600; color: var(--text-1); font-variant-numeric: tabular-nums; line-height: 1; }
/* 버튼 = 필드형 아이콘 버튼 30px (2026.09.01 비용 분석 오버라이드를 표준으로 승격 — radius-xs 는 아이콘 버튼 토큰 기준) */
.month-nav__btn {
  width: 30px; height: 30px; flex-shrink: 0; padding: 0;   /* UA 버튼 패딩 리셋 — 쉐브론이 중앙에서 밀리는 것 방지 */
  display: grid; place-items: center;
  background: var(--surface); border: 0; border-radius: var(--radius-xs);
  color: var(--text-2); cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.month-nav__btn iconify-icon, .month-nav__btn svg { display: block; }
.month-nav__btn:hover:not(:disabled) { background: var(--surface-hover); color: var(--text-1); }
.month-nav__btn:disabled { opacity: 0.35; cursor: default; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: 22px;
}
.card--hover { transition: border-color .15s ease, transform .15s ease, background .15s ease; }
.card--hover:hover {
  border-color: var(--border-3);
  background: var(--bg-3);
}
.card__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
}
.card__desc {
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
}
.card__row {
  display: flex; align-items: center; justify-content: space-between;
}

/* 프로젝트 아이콘 타일 (상세 헤더 / 목록 카드 공용) */
.proj-thumb {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2a2a2f, #3a3a44);
  border: 1px solid var(--border-2);
  display: grid; place-items: center;
  font-size: 22px; font-weight: 800; color: var(--text-1);
}
.proj-thumb--sm { width: 40px; height: 40px; border-radius: var(--radius-sm); font-size: 17px; }

/* 빈 미디어 슬롯 (아이콘/썸네일 미등록) — 텍스트 대신 실제 footprint 유지 */
.media-empty {
  display: grid; place-items: center; gap: 4px;
  background: var(--bg-3);
  border: 1px dashed var(--border-3);
  color: var(--text-4);
}
.media-empty__cap { font-size: 11px; line-height: 1; }
.media-empty svg, .media-empty iconify-icon { opacity: 0.85; }

/* 이미지 드롭존 (업로드 폼 공용) — 영역 클릭=파일선택, 이미지 있으면 호버 시 '변경' 오버레이 */
.img-drop {
  position: relative;
  /* place-content 까지 중앙 — 단일 아이템 grid 는 트랙(줄)이 start 라 아이콘이 위에 붙었다 (2026.08.21) */
  display: grid; place-items: center; place-content: center;
  overflow: hidden;
  cursor: pointer;
  /* 스트로크 제거 + 인풋과 같은 연한 면 --input-bg (2026.08.21 사용자 확정 — 구 실선 --border-3) */
  background: var(--input-bg);
  border: 0;
  color: var(--text-4);
  transition: color .15s ease, background .15s ease;
}
.img-drop:hover { color: var(--text-2); background: #2B2B31; }   /* 드롭다운·체크박스 호버와 동일 (2026.08.12 규격) */
/* 채움 이미지는 절대 배치로 상자 전체 — place-content:center 그리드에서 100% 가 0 으로 붕괴하는 것 방지 (2026.08.21) */
.img-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* 호버 변경 오버레이 (이미지 있을 때만) */
.img-drop__over {
  position: absolute; inset: 0;
  display: grid; grid-auto-flow: column; place-content: center; align-items: center; gap: 5px;
  background: rgba(0, 0, 0, 0.55); color: #fff;
  font-size: 12px; font-weight: 500;
  opacity: 0; transition: opacity .15s ease;
}
.img-drop.is-filled:hover .img-drop__over { opacity: 1; }

/* 신청 진입 카드 (전자 결재 — .card/.card--hover 위에 레이아웃만) */
.req-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 18px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-1);
}
.req-card__icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text-2);
}
.req-card__title { font-weight: 600; font-size: 14px; }
.req-card__desc { font-size: 12.5px; color: var(--text-3); }

.grid {
  display: grid;
  gap: 16px;
}
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }

  /* GNB 반응형 — 아이콘 전용 레일(축소) 모드. 폭 56px, 라벨·섹션명·뱃지 숨김.
     아이콘은 iconify width 속성(16px)이라 font-size:0 라벨 숨김에도 그대로 유지됨. */
  :root { --sidebar-w: 56px; }
  .sidebar { padding: 12px 6px 24px; }
  /* 좁은 화면: 콘텐츠 왼쪽 패딩 제거 → 레일↔카드 틈 없애 아이콘이 레일폭 중앙으로 읽힘 */
  .content { padding-left: 0; padding-right: 18px; }
  .sidebar__label { display: none; }
  .sidebar__nav a {
    justify-content: center;
    gap: 0;
    padding-left: 0;
    padding-right: 0;
    font-size: 0;               /* 라벨 텍스트 노드 숨김 (아이콘은 명시 width 라 유지) */
    position: relative;
  }
  .sidebar__nav .nav-badge { display: none; }   /* 카운트 뱃지는 레일에서 숨김 */
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ============================================================
   Stat cards
   ============================================================ */
.stat {
  padding: 20px 22px;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255,255,255,0.04), transparent 60%);
  pointer-events: none;
}
.stat__label { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0; }
.stat__value { font-size: 22px; font-weight: 700; margin-top: 6px; letter-spacing: -0.03em; }
.stat__delta { font-size: 12px; margin-top: 4px; color: var(--success); }
.stat__delta--down { color: var(--danger); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-1);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: var(--bg-0);
}
.btn--primary:hover { opacity: 0.88; }
.btn--ghost {
  background: var(--accent-soft);
  color: var(--text-1);
}
.btn--ghost:hover { background: rgba(255,255,255,0.14); }
.btn--outline {
  border-color: var(--border-2);
  color: var(--text-1);
}
.btn--outline:hover { border-color: var(--border-3); background: var(--accent-soft); }
.btn--danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
}
.btn--danger:hover { background: rgba(248,113,113,0.22); }
.btn--sm { padding: 6px 12px; font-size: 12.5px; }
.btn--lg { padding: 12px 20px; font-size: 14px; }
.btn--block { width: 100%; }

/* ============================================================
   Forms
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
/* display:flex 가 UA 의 [hidden](display:none)을 덮는다 — hidden 필드가 그대로 보이는 함정 방지 */
.field[hidden] { display: none; }
.field label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.field .hint { font-size: 12px; color: var(--text-4); }

.input, .select, .textarea {
  display: block;
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-2);
  color: var(--text-1);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--text-2);
  background: var(--bg-2);
}
/* 읽기 전용 입력 — 흐리게(수정 불가) 표현 + 클릭/포커스 효과 없음 */
.input[readonly], .textarea[readonly] { cursor: default; opacity: 0.55; }
.input[readonly]:focus, .textarea[readonly]:focus { border-color: var(--border-2); background: var(--input-bg); }
.textarea { resize: vertical; min-height: 96px; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 8L9 4.5' stroke='%23bbb' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ── 커스텀 드롭다운 (네이티브 select 대체 — JS: customSelects) ── */
.cselect { position: relative; }
.cselect > select.select { display: none; }
.cselect__btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border-2);
  color: var(--text-1);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background .15s ease;
}
.cselect__btn:hover { border-color: var(--border-3); }
.cselect.is-open .cselect__btn { border-color: var(--text-3); }
.cselect__btn:disabled { opacity: 0.55; cursor: not-allowed; }
.cselect__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect__chev { color: var(--text-3); flex-shrink: 0; transition: transform .15s ease; }
.cselect.is-open .cselect__chev { transform: rotate(180deg); }

.cselect__menu {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  padding: 6px;
  z-index: 300;
  max-height: 280px;
  overflow-y: auto;
}
.cselect__menu[hidden] { display: none; }
.cselect__option {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
}
.cselect__option:hover { background: var(--surface-hover); color: var(--text-1); }
.cselect__option.is-selected { color: var(--text-1); font-weight: 500; }
.input:disabled, .select:disabled, .textarea:disabled {
  color: var(--text-2);
  -webkit-text-fill-color: var(--text-2);
  cursor: not-allowed;
  background: var(--input-bg);
}

/* ============================================================
   Tables
   ============================================================ */
.table-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table th, .table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-1);
}
.table th {
  color: var(--text-3); /* 배경 밴드 제거 — 하단 보더 한 줄로만 구분 (디박싱) */
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}
.table tr:last-child td { border-bottom: none; }
/* 리스트 행 높이 통일 — 항목 내용(텍스트/뱃지/버튼)과 무관하게 전 페이지 테이블 동일 높이 */
.table tbody td { height: 56px; padding-top: 0; padding-bottom: 0; }
.table tr[data-href] { cursor: pointer; }
.table tr[data-href]:hover td { background: rgba(255,255,255,0.02); }
/* 클릭 시 상세 모달이 뜨는 행 (전자 결재 · 승인 대기열) */
#approval-table tbody tr[data-status],
#approval-queue tbody tr[data-app] { cursor: pointer; }
#approval-table tbody tr[data-status]:hover td,
#approval-queue tbody tr[data-app]:hover td { background: rgba(255,255,255,0.02); }
#approval-table tbody tr[data-status]:hover td:last-child,
#approval-queue tbody tr[data-app]:hover td:last-child { color: var(--text-1); }

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--accent-soft);
  color: var(--text-1);
  border: 1px solid var(--border-2);
}
.badge--success { background: rgba(74,222,128,0.10); color: var(--success); border-color: rgba(74,222,128,0.25); }
.badge--warning { background: rgba(250,204,21,0.10); color: var(--warning); border-color: rgba(250,204,21,0.25); }
.badge--danger  { background: rgba(248,113,113,0.10); color: var(--danger);  border-color: rgba(248,113,113,0.25); }
.badge--info    { background: rgba(96,165,250,0.10); color: var(--info);     border-color: rgba(96,165,250,0.25); }
.badge--muted   { color: var(--text-3); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge svg, .badge iconify-icon { display: block; flex-shrink: 0; }

/* ============================================================
   Tabs
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-1);
  margin-bottom: 24px;
}
.tabs a {
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s ease, border-color .15s ease;
}
.tabs a:hover { color: var(--text-1); }
.tabs a.is-active {
  color: var(--text-1);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ============================================================
   Auth (로그인 · 가입 확인 · 콜백) — 그룹웨어 SSO 공식 예제 화면 디자인 이식 (2026.09.03)
   원본: sso-client-example/account/templates/oauth2_client/{login,confirm,callback}.html 인라인 스타일.
   수치·색 원본 그대로: #F5F5F5 바닥 · 흰 카드 clamp(320~488)×clamp(500~520) r8 #DADADA 테두리 ·
   검정 56px 버튼(좌 20px 에 24px 그룹웨어 심볼) · 우하단 빨간 토스트 · 콜백은 흰 화면 + GIF + 점선 지면.
   로고 슬롯만 원본(CONTACT 로고 이미지, 높이 60px)을 우리 마크+워드마크로 대체 — 박스 높이 60px 동일.
   ============================================================ */
.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #F5F5F5;
  color: #000000;
}
/* 상단바 페이드(body::before)는 앱 셸 전용 — 밝은 인증·콜백 화면에선 검정 밴드로 보이므로 제거 */
body:has(> .auth, > .oauth-loading)::before { content: none; }

.auth__card {                        /* 원본 .container */
  display: flex;
  flex-direction: column;
  width: clamp(320px, 90vw, 488px);
  height: clamp(500px, 60vh, 520px);
  gap: clamp(8px, 2vw, 20px);
  padding: 32px;
  background: #FFFFFF;
  border: 1px solid #DADADA;
  border-radius: 8px;
}
.auth__top { flex: 1 1 auto; display: flex; }   /* 원본 .top-section — 남는 높이를 전부 차지해 버튼을 바닥으로 */
.auth__top--block { display: block; }           /* 가입 확인: 아이콘 → 문구 세로 흐름 (원본 confirm.html) */
.auth__bottom { margin: 0 -8px 12px; }          /* 원본 .bottom-section — 버튼이 카드 패딩 밖으로 좌우 8px 확장, 바닥 12px */

/* 로고 슬롯 (원본 logo.svg 자리) — +X 마크 58.14×28.52 + 워드마크 25px (사용자 지정) */
.auth__logo-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: flex-start;    /* 부모(.auth__top) 가 flex — 세로로 늘어나지 않게 */
  gap: 8px;
}
.auth__logo { display: block; width: 58.14px; height: 28.52px; }   /* +X 마크 — 사용자 지정 치수 2026.09.03 */
.auth__wordmark {
  margin: 0;
  font-family: 'Strichpunkt Sans', var(--font-sans);   /* 상단바 브랜드명과 같은 서체 */
  font-size: 25px;           /* 사용자 지시 2026.09.03 */
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.8px;    /* -0.5px(-0.02em) → -0.8px (사용자 지시 2026.09.03) */
  text-transform: uppercase;
  color: #000000;
}

/* 검정 버튼 (원본 .login-button) — 로그인·가입 확인 공용 */
.auth__login-btn {
  position: relative;
  width: 100%;
  min-height: 56px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #000000;
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;          /* 원본 400 → 600 (사용자 지시 2026.09.03) */
  cursor: pointer;
}
.auth__login-btn-icon {               /* 원본 .login-button-logo — 좌 20px, 24×24, 세로 중앙 */
  position: absolute;
  left: 20px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  object-fit: contain;
}

/* 가입 확인 (원본 confirm.html) — 빨간 느낌표 32px + 안내문 */
.auth__confirm-icon { display: block; width: 32px; height: 32px; }
.auth__confirm-text {                 /* 원본 .styled-text */
  margin: 16px 0 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;   /* 영문 포함 Pretendard 통일 (사용자 지시 2026.09.03) */
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #333333;
}

/* 에러 토스트 (원본 .toast) — 우하단 고정, X 로 닫기. 생성·5초 자동 제거는 oauth_login.js.
   전역 .toast(main.js 디자인 토스트)와 이름이 겹쳐 auth- 접두어 */
.auth-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 280px;
  padding: 12px 20px;
  background: #F44336;
  color: #FFFFFF;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  font-size: 16px;
}
.auth-toast__close {
  padding: 0;
  border: 0;
  background: none;
  color: #FFFFFF;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* 콜백 로딩 (원본 callback.html) — 흰 전체 화면, 달리는 캐릭터 GIF(60px) 위로 흐르는 점선 지면 + "로그인 중" */
.oauth-loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  color: #000000;
}
.oauth-loading__icon { width: 60px; height: 60px; z-index: 2; }
.oauth-loading__ground {              /* 원본 .ground — 검정 20px / 빈칸 20px 반복, 1.1s 주기로 왼쪽으로 흐름 */
  position: absolute;
  bottom: 51%;
  width: 90px;
  height: 4px;
  z-index: 3;
  background: repeating-linear-gradient(to right, #000 0, #000 20px, transparent 20px, transparent 40px);
  animation: oauth-ground 1.1s linear infinite;
}
.oauth-loading__text { margin: 30px 0 0; font-size: 1.2rem; color: #000000; }
@keyframes oauth-ground {
  from { background-position-x: 90px; }
  to   { background-position-x: 0; }
}

/* ============================================================
   Misc helpers
   ============================================================ */
.flex { display: flex; }
.flex--between { display: flex; justify-content: space-between; align-items: center; }
.flex--end { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.muted { color: var(--text-3); }
.mono { font-family: var(--font-mono); }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty__title { color: var(--text-2); font-weight: 600; margin-bottom: 4px; }

/* console (admin) accent */
.console-mark {
  background: #1A1A1F !important;
  color: var(--accent) !important;
  border: 1px solid var(--border-3);
}

/* ============================================================
   Env selector (checkbox cards)
   ============================================================ */
.env-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.env-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) {
  .env-grid--3 { grid-template-columns: 1fr; }
}
.env-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--border-2);
  background: var(--bg-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.env-card:hover { border-color: var(--border-3); }
.env-card input[type=checkbox],
.env-card input[type=radio] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  margin: 1px 0 0;
  border: 1.5px solid var(--border-3);
  background: var(--bg-1);
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .15s ease, background .15s ease;
}
.env-card input[type=radio] { border-radius: 50%; }
.env-card input[type=checkbox] { border-radius: var(--radius-xs); }

.env-card input[type=radio]::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform .14s ease;
}
.env-card input[type=checkbox]::before {
  content: "";
  width: 11px; height: 11px;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
  background: var(--bg-0);
  transform: scale(0);
  transition: transform .14s ease;
}
.env-card input[type=radio]:checked,
.env-card input[type=checkbox]:checked {
  border-color: var(--accent);
}
.env-card input[type=checkbox]:checked {
  background: var(--accent);
}
.env-card input[type=radio]:checked::before,
.env-card input[type=checkbox]:checked::before {
  transform: scale(1);
}
.env-card input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.env-card input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.env-card__body { display: flex; flex-direction: column; gap: 2px; }
.env-card__name { font-weight: 600; font-size: 14px; }
.env-card__desc { font-size: 12px; color: var(--text-3); }
.env-card.is-locked { opacity: 0.8; cursor: not-allowed; }
.env-card.is-selected,
.env-card:has(input:checked) {
  border-color: var(--text-1);
  background: var(--bg-2);
}

/* env summary tile (app detail) */
.env-tile {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: 22px;
}
.env-tile__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.env-tile__name {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px;
}
.env-tile__name .dot { width: 8px; height: 8px; border-radius: 50%; }
.env-tile__name .dot--prod    { background: var(--success); }
.env-tile__name .dot--staging { background: var(--warning); }

.kv-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--border-1);
  font-size: 13.5px;
}
.kv-row:first-of-type { border-top: none; }
.kv-row__k { color: var(--text-3); }
.kv-row__v { color: var(--text-1); font-weight: 500; }
.kv-row__v.mono { font-weight: 400; }

/* ============================================================
   Help tooltip (? toggle)
   ============================================================ */
.help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  border: 1px solid var(--border-2);
  margin-left: 4px;
  vertical-align: middle;
  user-select: none;
}
.help:hover, .help:focus { background: rgba(255,255,255,0.16); color: var(--text-1); outline: none; }
.help__pop {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  padding: 12px 14px;
  background: var(--bg-3);
  color: var(--text-1);
  border: 1px solid var(--border-3);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
  white-space: normal;
  cursor: default;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 20;
}
.help__pop::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--bg-3);
}
.help:hover .help__pop,
.help:focus .help__pop,
.help:focus-within .help__pop {
  opacity: 1;
  pointer-events: auto;
}
.help__pop b { color: var(--text-1); }
.help__pop p { margin: 6px 0 0; color: var(--text-2); }

/* ============================================================
   Hover 플로팅 툴팁 (재사용 컴포넌트)
   사용법:
     <span class="has-tip">
       <트리거 요소>
       <span class="has-tip__pop">안내 문구 (여러 줄은 \n)</span>
     </span>
   · 정보 아이콘은 좌상단에 자동 표시 (CSS mask)
   · disabled 버튼도 래퍼(.has-tip)가 hover를 받아 정상 동작
   ============================================================ */
.has-tip { position: relative; display: inline-block; }
.has-tip__pop {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: max-content;
  max-width: 260px;
  padding: 8px 10px 8px 30px;        /* 좌측은 정보 아이콘 자리 */
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-2);
  white-space: pre-line;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
  z-index: 20;
}
.has-tip__pop::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  width: 13px;
  height: 13px;
  background-color: var(--text-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.has-tip:hover .has-tip__pop,
.has-tip:focus-within .has-tip__pop { opacity: 1; }

/* ============================================================
   Slug → domain preview (app create)
   ============================================================ */
.slug-preview {
  padding: 12px 14px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.slug-preview__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  gap: 12px;
}
.slug-preview__row[hidden] { display: none; }

/* ============================================================
   Codebox (client_id / secret / uri 등)
   ============================================================ */
.codebox {
  display: block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-1);
  word-break: break-all;
  line-height: 1.5;
}
.codebox + .codebox { margin-top: 6px; }
.codebox--secret { color: var(--text-3); letter-spacing: 0.12em; }
.codebox--muted  { color: var(--text-4); }

/* env tag pill (DEV / STAGING / PROD) */
.env-pill {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--text-2);
  border: 1px solid var(--border-2);
}
.env-pill--dev     { color: var(--info);    border-color: rgba(96,165,250,0.30); background: rgba(96,165,250,0.08); }
.env-pill--staging { color: var(--warning); border-color: rgba(250,204,21,0.30); background: rgba(250,204,21,0.08); }
.env-pill--prod    { color: var(--success); border-color: rgba(74,222,128,0.30); background: rgba(74,222,128,0.08); }

/* ============================================================
   SSO tab — Toss-style grouping × PlusX dark
   ============================================================ */
.sso-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-2), #1c1c22);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 12px;
}
.sso-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255,255,255,0.05), transparent 55%);
  pointer-events: none;
}
.sso-hero__head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; position: relative; }
.sso-hero__icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--bg-0);
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800;
  letter-spacing: -0.05em;
}
.sso-hero__title { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.sso-hero__sub { font-size: 12.5px; color: var(--text-3); margin: 2px 0 0; }
.sso-hero__envs { display: flex; gap: 8px; flex-wrap: wrap; position: relative; }

.env-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border-2);
  background: var(--bg-1);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-2);
}
.env-chip__dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.env-chip__dot--active   { background: var(--success); box-shadow: 0 0 0 3px rgba(74,222,128,0.18); }
.env-chip__dot--pending  { background: var(--warning); box-shadow: 0 0 0 3px rgba(250,204,21,0.18); }
.env-chip__dot--inactive { background: var(--text-4); }
.env-chip__name { font-weight: 700; letter-spacing: 0; font-size: 11px; color: var(--text-1); }
.env-chip__state { color: var(--text-3); }

/* env section card */
.env-section {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 10px;
}
.env-section__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-1);
  margin-bottom: 10px;
}
.env-section__head-l { display: flex; align-items: center; gap: 10px; }
.env-section__title { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }

.env-section__group { padding: 14px 0; }
.env-section__group + .env-section__group { border-top: 1px solid var(--border-1); }
/* SSO 카드 내 필드 간격: 라벨↔입력(4px)보다 넓혀 묶음을 명확히 */
.env-section .field-stack { margin-bottom: 18px; }
.env-section .field-stack:last-child { margin-bottom: 0; }
.env-section__group-title {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 600;
  margin: 0 0 8px;
}

/* label-on-top field */
.field-stack { margin-bottom: 6px; }
.field-stack:last-child { margin-bottom: 0; }
.field-stack__label {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 4px;
}
.field-stack__value { display: flex; gap: 6px; align-items: center; }
.field-stack__value .codebox { flex: 1; }
.field-stack__stack > .field-stack__value + .field-stack__value { margin-top: 6px; }

/* 환경 카드 헤더용 아이콘 버튼 — 새로고침 등 가벼운 액션 */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0;
  border: 1px solid var(--border-2); border-radius: var(--radius-xs);
  background: var(--surface-1); color: var(--text-2);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text-1); border-color: var(--border-3); }
.icon-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.icon-btn.is-spinning svg, .icon-btn.is-spinning iconify-icon { animation: spin 0.8s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* copy button (icon only) */
.copy-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  padding: 0;
}
.copy-btn:hover { background: var(--surface-hover); color: var(--text-1); border-color: var(--border-3); }
.copy-btn.is-copied {
  background: rgba(74,222,128,0.12);
  border-color: rgba(74,222,128,0.32);
  color: var(--success);
}
.copy-btn__icon { display: block; }
.copy-btn__icon--check { display: none; }
.copy-btn.is-copied .copy-btn__icon--default { display: none; }
.copy-btn.is-copied .copy-btn__icon--check { display: block; }

/* endpoint-input: prefix(고정) + endpoint(편집) 합성 입력 */
.endpoint-input {
  display: grid;
  grid-template-columns: minmax(160px, auto) minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--border-2);
  background: var(--bg-1);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.endpoint-input:focus-within { border-color: var(--border-3); }
.endpoint-input__prefix {
  display: flex; align-items: center;
  padding: 7px 10px;
  background: var(--bg-3);
  color: var(--text-3);
  border-right: 1px solid var(--border-1);
  word-break: break-all;
  line-height: 1.4;
}
.endpoint-input__input {
  width: 100%;
  padding: 7px 10px;
  background: transparent;
  border: 0;
  color: var(--text-1);
  font: inherit;
}
.endpoint-input__input:focus { outline: none; }
.endpoint-input.is-readonly { background: var(--bg-2); }
.endpoint-input.is-readonly .endpoint-input__prefix { color: var(--text-4); background: var(--bg-2); }
.endpoint-input.is-readonly .endpoint-input__input {
  color: var(--text-3);
  cursor: not-allowed;
}

/* inline mono input (도메인 편집 등) */
.input--inline {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 7px 10px;
}

/* input + 단위 라벨 (예: 60 분) */
.input-with-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}
.input-with-unit .input { flex: 1; min-width: 0; }
.input-unit {
  font-size: 13px;
  color: var(--text-3);
  flex-shrink: 0;
}

.env-section__actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-1);
  display: flex; justify-content: flex-end; gap: 8px;
}
.slug-preview__k {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 12.5px;
}
.slug-preview__k .dot { width: 6px; height: 6px; border-radius: 50%; }
.slug-preview__v {
  color: var(--text-1);
  font-size: 13px;
  text-align: right;
  word-break: break-all;
}
.slug-preview__v.is-placeholder { color: var(--text-4); }

.slug-row { display: flex; gap: 8px; align-items: stretch; }
.slug-row .input { flex: 1; }
.slug-status-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  margin-bottom: 6px;
  padding-right: 2px;
}
.slug-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px;
  min-height: 18px;
}
.slug-status--ok   { color: var(--success); }
.slug-status--bad  { color: var(--danger); }
.slug-status--idle { color: var(--text-4); }

/* 깃허브 초대 신청 — 아이디 입력 시 프로필(아바타/이름) 미리보기 카드 */
.gh-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-1);
  border-radius: 10px;
  background: var(--bg-2);
}
.gh-card--muted { color: var(--text-4); }
.gh-card--bad   { border-color: rgba(248, 113, 113, 0.45); background: rgba(248, 113, 113, 0.06); }
.gh-card--ok    { border-color: rgba(74, 222, 128, 0.45);  background: rgba(74, 222, 128, 0.06); }
.gh-card__avatar {
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 50%; object-fit: cover; background: var(--surface);
}
.gh-card__meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.gh-card__login { font-weight: 600; letter-spacing: -.02em; }
.gh-card__name  { color: var(--text-3); font-size: 12px; }
.gh-card__hint  { color: var(--text-4); font-size: 13px; }
.gh-card__check { color: var(--success); margin-left: auto; flex: 0 0 auto; }
.gh-card__check--warn { color: var(--danger); }

/* ============================================================
   Modal
   ============================================================ */
.modal {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 100;
  padding: 20px;
}
.modal.is-open { display: flex; }
.modal__card {
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-glow);
  animation: modal-in .18s ease-out;
}
.modal__card--wide { max-width: 560px; }
.modal__card--confirm { max-width: 400px; }

/* 환경 카드 진행 안내 박스 — Provisioning/Starting/Stopping 상태일 때 본문 맨 아래 */
.progress-hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--border-2);
}
.progress-hint__icon {
  flex-shrink: 0;
  color: var(--text-2);
  padding-top: 1px;
  animation: progress-hint-pulse 1.6s ease-in-out infinite;
}
.progress-hint__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.progress-hint__title { color: var(--text-1); font-size: 13px; font-weight: 600; }
.progress-hint__desc { color: var(--text-2); font-size: 12.5px; line-height: 1.5; }
@keyframes progress-hint-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* 활성화 진행중 모달 — PEM 1회성 정책상 다운로드 완료 전 이탈 방지용 */
.activate-loading { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 6px 0 4px; }
.activate-loading__spinner {
  width: 38px; height: 38px;
  border: 3px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.activate-loading__msg { color: var(--text-2); text-align: center; font-size: 13.5px; line-height: 1.55; margin: 0; }
.activate-loading__msg b { color: var(--text-1); }

/* Toast (시스템 alert 대체) */
/* 상단바 우측 아래 고정 — 우측 = 콘텐츠 패널 우측 끝과 같은 선(--topbar-gap 16, 구 +20 프로필 정렬선), 상단바 바로 아래(콘텐츠 시작선과 동일).
   진입은 우→좌 12px 슬라이드 (2026.08.11 확정 — 위→아래는 당일 폐기) */
.toast {
  position: fixed; right: var(--topbar-gap);
  top: calc(var(--header-h) + var(--topbar-gap) * 2);
  transform: translateX(12px);
  /* 글래스 = 상단바·프로필 메뉴와 같은 토큰 레시피 (2026.08.11 — 구 --bg-2 면 + 스트로크) */
  background: var(--glass-bg); border: none; color: var(--text-1);
  -webkit-backdrop-filter: blur(var(--topbar-blur)) saturate(1.3);
  backdrop-filter: blur(var(--topbar-blur)) saturate(1.3);
  padding: 11px 18px; border-radius: var(--radius-md); box-shadow: var(--shadow-glow);
  font-size: 13px; font-weight: 500; z-index: 200;   /* 13/500 (구 13.5/600, 2026.08.11) */
  max-width: 380px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-show { opacity: 1; transform: translateX(0); }
/* 기본 한 줄(메시지 13/500). desc 를 주면 아래 캡션 한 줄이 붙는다 (2026.08.19) */
.toast__body { display: block; min-width: 0; }
.toast__t { display: block; line-height: 1.4; }
/* 캡션 — 값이 아니라 부속 나열이라 한 단계 아래: 12px + mute 단색(§1).
   위 마진 0 (2026.08.19 — 구 5): 두 줄 모두 행간 1.4 라 글자 위아래 여백이 이미 3px 씩 붙는다.
   마진 0 에서도 글자 사이는 6.6px 로 보인다(실측). 더 좁히려면 행간부터 내려야 함 */
.toast__d { display: block; margin-top: 0; font-size: 12px; line-height: 1.4; color: #B8B8B8; }

/* ============================================================
   Global loading — 페이지/API 전환 중 전역 공용 오버레이
   ============================================================ */
.global-loading {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 11, .72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.global-loading[hidden] { display: none; }
.global-loading__spinner {
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, .2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: global-loading-spin .7s linear infinite;
}
@keyframes global-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .global-loading__spinner { animation-duration: 1.4s; }
}

/* ============================================================
   Skeleton — 로딩 자리표시 공용 (2026.09.03 규격 확정: 쉬머·프레임 유지·1.2s·면 #262629·쉬머 5%)
   · 쉬머는 **세로 띠가 좌→우로** 지나간다 (90deg — 구 100deg 기울임 폐기, 사용자 확정)
   · 텍스트 블록 .sk = radius 4 (높이 12~15 에 radius-xs 6 은 알약처럼 보임). 아이콘·썸네일은 사용처에서 자기 radius 를 덮어쓴다
   · 블록 높이는 사용처에서 실제 글자 line box 와 같게 잡아 콘텐츠 도착 시 레이아웃이 움직이지 않게 한다
   · 300ms 안에 응답이 오면 띄우지 않는다 — 컨테이너에 .sk-wait 를 주면 CSS 만으로 300ms 뒤 등장
   · 모션 줄이기: 쉬머 정지 + 3.5% 정적 하이라이트
   ============================================================ */
.sk {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--sk-face);
  border-radius: 4px;
}
.sk::before, .image-skeleton::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 20%, var(--sk-shine) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: sk-shimmer var(--sk-dur) ease-in-out infinite;
}
@keyframes sk-shimmer { to { transform: translateX(100%); } }
/* 텍스트 블록 폭 세트 — 랜덤 금지, 사용처에서 고정 순서로 순환 */
.sk.w80 { width: 80%; }
.sk.w60 { width: 60%; }
.sk.w40 { width: 40%; }
/* 300ms 지연 등장 — 애니메이션 딜레이만 쓰므로 JS 없이도 동작. 콘텐츠 렌더 시 JS 가 클래스를 제거한다 */
.sk-wait { opacity: 0; animation: sk-appear 0s linear .3s forwards; }
@keyframes sk-appear { to { opacity: 1; } }
/* 골격 → 콘텐츠 전환은 즉시 교체 — 페이드 인 없음 (180ms 페이드 제거, 사용자 지시 2026.09.03) */

/* Station private 이미지를 Blob URL로 바꾸는 동안 원래 이미지 footprint를 유지한다 — 위 공용 쉬머를 공유 */
.image-skeleton {
  position: relative;
  overflow: hidden;
  /* 상세 타일의 기본 background-image나 이전 아이콘이 쉬머 투명부로 비치지 않게 완전히 가린다. */
  background-color: var(--sk-face) !important;
  background-image: none !important;
}
.image-skeleton > img { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .sk::before, .image-skeleton::before { animation: none; background: rgba(255,255,255,.035); }
}

/* ============================================================
   Timeline (프로젝트 히스토리)
   ============================================================ */
.timeline { position: relative; }
.timeline__item { position: relative; display: flex; gap: 14px; padding-bottom: 24px; }
.timeline__item::before {
  content: ""; position: absolute; left: 15px; top: 0; width: 1px; height: 100%;
  background: var(--border-2);
}
.timeline__item.is-first::before { top: 16px; height: calc(100% - 16px); }
.timeline__item.is-last { padding-bottom: 0; }
.timeline__item.is-last::before { height: 16px; }
.timeline__item.is-only::before { display: none; }
.timeline__node {
  position: relative; z-index: 1; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--border-2);
  display: grid; place-items: center; color: var(--text-3);
}
.timeline__node--danger {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}
.timeline__body { min-width: 0; flex: 1; padding-top: 4px; }
.timeline__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.timeline__title { font-weight: 600; font-size: 14px; color: var(--text-1); }
.timeline__meta { font-size: 12px; color: var(--text-4); margin-top: 3px; }
.timeline__detail { font-size: 13px; color: var(--text-2); margin-top: 6px; line-height: 1.55; }

/* ============================================================
   결재 단계 상태 요약 (신청 상세 모달) — 단계별 한 줄
   ============================================================ */
.appr-list { display: flex; flex-direction: column; gap: 10px; }
.appr-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.appr-row__dot {
  flex-shrink: 0; box-sizing: border-box;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg-3); border: 1.5px solid var(--border-3);
}
.appr-row.is-done .appr-row__dot     { background: var(--success); border-color: var(--success); }
.appr-row.is-current .appr-row__dot  { background: var(--warning); border-color: var(--warning); }
.appr-row.is-rejected .appr-row__dot { background: var(--danger); border-color: var(--danger); }
.appr-row__step { min-width: 64px; color: var(--text-2); font-weight: 600; }
.appr-row.is-pending .appr-row__step { color: var(--text-3); font-weight: 500; }
.appr-row__info { min-width: 0; color: var(--text-4); }
.appr-row__status { font-weight: 600; }
.appr-row.is-done .appr-row__status     { color: var(--success); }
.appr-row.is-current .appr-row__status  { color: var(--warning); }
.appr-row.is-rejected .appr-row__status { color: var(--danger); }
.appr-row.is-pending .appr-row__status  { color: var(--text-4); font-weight: 500; }
.appr-row__meta { color: var(--text-4); font-variant-numeric: tabular-nums; }
/* 반려 사유 — 결재 진행의 반려 단계 바로 아래 ('반려' 상태 텍스트에 정렬: 점9 + gap10 + 단계64 + gap10 = 93px) */
.appr-reason {
  margin: -2px 0 0 93px;
  padding: 8px 11px;
  font-size: 12.5px; line-height: 1.55;
  color: var(--text-2);
  background: rgba(248, 113, 113, 0.08);
  border-left: 2px solid var(--danger);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  white-space: pre-line;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal__icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(248,113,113,0.12);
  color: var(--danger);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}
.modal__icon--ok {
  background: rgba(74,222,128,0.12);
  color: var(--success);
}
.modal__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.modal__body {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0 0 22px;
}
.modal__body .mono { color: var(--text-1); }
.modal__actions {
  display: flex; justify-content: flex-end; gap: 8px;
  /* CTA를 카드 하단에 고정 — 본문이 길면 본문만 스크롤되고 버튼은 항상 보임.
     카드 padding(28px)을 음수 마진으로 상쇄해 카드 좌우/바닥 끝까지 배경을 깐다. */
  position: sticky;
  bottom: -28px;
  margin: 22px -28px -28px;
  padding: 16px 28px;
  background: var(--bg-2);
  border-top: 1px solid transparent;
}
/* 실제로 스크롤이 생길 때만 구분선 노출 (짧은 모달엔 선 없음) */
.modal__card.is-scrollable .modal__actions { border-top-color: var(--border-1); }

/* 긴 모달 — 헤더(제목)·푸터(버튼)는 고정, 본문만 내부 스크롤.
   카드 전체가 아니라 .modal__scroll 만 스크롤돼서 스크롤바가 버튼 영역까지 내려가지 않는다. */
.modal__card--scroll { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
.modal__card--scroll > form,
.modal__card--scroll > .modal__flex { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.modal__scroll {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto;
  margin: 0 -28px;          /* 스크롤바를 카드 안쪽 끝까지 */
  padding: 2px 28px 28px;   /* 내용은 다시 28px 들여쓰기 + 푸터 앞 하단 여백 */
}
.modal__card--scroll .modal__actions {
  position: static; bottom: auto; flex-shrink: 0;
  margin: 0 -28px;          /* 카드 좌우 끝까지 */
  padding: 16px 28px 28px;  /* 카드 padding-bottom 을 푸터가 대신 */
  border-top-color: var(--border-1);
}
