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

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

: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-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --sidebar-w: 248px;
  --header-h: 64px;

  --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: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::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;
  line-height: 1.5;
  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%; }

/* ============================================================
   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;
}

.sidebar {
  background: var(--bg-1);
  border-right: 1px solid var(--border-1);
  padding: 20px 16px;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.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: 8px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.04em;
}
img.sidebar__brand-mark {
  background: transparent;
  border-radius: 6px;
  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: 18px; }
.sidebar__label {
  font-size: 11px;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  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: var(--text-2);
  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;
  opacity: 0.85;
  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: 6px;
  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; }

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

.topbar {
  height: var(--header-h);
  border-bottom: 1px solid var(--border-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(17,17,20,0.85); /* --bg-2 (한단계 밝게) */
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  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: 6px;
  object-fit: contain;
}
.topbar__brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  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);
}
/* Topbar Store 아웃링크 (외부 앱으로 이동) */
.topbar__store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: none;
  border: 1px solid var(--border-2);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.topbar__store:hover { background: var(--surface-hover); color: var(--text-1); border-color: var(--border-3); }
.topbar__store-ext { opacity: .55; }

.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: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #2a2a2f, #3a3a44);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  color: var(--text-1);
  border: 1px solid var(--border-2);
}
button.avatar { cursor: pointer; padding: 0; font-family: 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;
}
.profile-menu__user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px 10px;
}
.profile-menu__user-info { display: flex; flex-direction: column; gap: 2px; }
.profile-menu__user-name { font-size: 13.5px; font-weight: 600; color: var(--text-1); }
.profile-menu__user-pos { font-size: 12px; color: var(--text-2); }
.profile-menu__logout {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  margin: -2px -4px -2px 0;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.profile-menu__logout:hover { background: rgba(248,113,113,0.10); color: var(--danger); }
.profile-menu__item {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-2);
  transition: background .15s ease, color .15s ease;
}
.profile-menu__item:hover { background: var(--surface-hover); color: var(--text-1); }
.profile-menu__item--danger { color: var(--danger); }
.profile-menu__item--danger:hover { background: rgba(248,113,113,0.10); color: var(--danger); }

/* 알림 팝업 — .profile-menu(드롭다운) 확장 + .tabs 재사용 */
.noti { position: relative; }
.noti__pop { width: 360px; max-width: calc(100vw - 32px); padding: 0; }
.noti__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; font-size: 14px; font-weight: 600; color: var(--text-1); }
.noti__mark-all { background: none; border: none; cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 500; color: var(--text-3); padding: 2px 4px; transition: color .15s ease; }
.noti__mark-all:hover { color: var(--text-1); }
.noti__tabs { gap: 2px; margin: 0; padding: 0 10px; }
.noti__tabs[hidden] { display: none; }
.noti__tabs button {
  background: none; border: none; cursor: pointer; font-family: inherit;
  padding: 8px 10px; font-size: 13px; font-weight: 500; color: var(--text-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .15s ease, border-color .15s ease;
}
.noti__tabs button:hover { color: var(--text-1); }
.noti__tabs button.is-active { color: var(--text-1); border-bottom-color: var(--accent); font-weight: 600; }
.noti__list { max-height: 360px; overflow-y: auto; padding: 6px; }
.noti__item { display: block; padding: 10px 12px; border-radius: var(--radius-sm); color: inherit; text-decoration: none; cursor: pointer; }
.noti__item[hidden] { display: none; }
.noti__item + .noti__item { margin-top: 2px; }
.noti__item:hover { background: var(--surface-hover); }
/* 안 읽음 표시 — 제목 바로 우측 점 */
.noti__item.is-unread .noti__item-title::after {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-left: 6px; vertical-align: 1px;
}
.noti__item.is-unread { background: var(--accent-soft); }
.noti__item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.noti__item-title { font-size: 13px; font-weight: 600; color: var(--text-1); }
.noti__item-date { flex-shrink: 0; font-size: 11.5px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.noti__item-body { margin: 3px 0 0; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.noti__empty { padding: 28px 16px; text-align: center; font-size: 13px; color: var(--text-3); }

/* 프로젝트 옵션 메뉴 (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; }

/* 시뮬 사용자 전환기 (개발용, 좌하단 플로팅) */
.user-switcher {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--surface);
  border: 1px solid var(--border-3);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
}
.user-switcher__badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--bg-0);
  background: var(--warning);
  padding: 2px 5px;
  border-radius: 4px;
}
.user-switcher__label { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.user-switcher__select {
  background: var(--bg-2);
  color: var(--text-1);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 12px;
  font-family: inherit;
  max-width: 240px;
}

.content {
  padding: 32px 28px 64px;
  max-width: 1280px;
  width: 100%;
}

/* ============================================================
   Typography
   ============================================================ */
.page-h1 {
  font-size: 28px;
  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: 8px; 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: 8px 8px 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; }
.month-nav__label { min-width: 84px; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--text-1); font-variant-numeric: tabular-nums; }
.month-nav__btn {
  width: 28px; height: 28px; flex-shrink: 0;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border-2); border-radius: 8px;
  color: var(--text-2); cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.month-nav__btn:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--border-3); 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-lg);
  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: 14px;
  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: 11px; 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 { opacity: 0.85; }

/* 이미지 드롭존 (업로드 폼 공용) — 영역 클릭=파일선택, 이미지 있으면 호버 시 '변경' 오버레이 */
.img-drop {
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-3);
  border: 1px dashed var(--border-3);
  color: var(--text-4);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.img-drop:hover { border-color: var(--text-3); color: var(--text-2); background: var(--surface-hover); }
.img-drop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-drop.is-filled { border-style: solid; border-color: var(--border-2); }
/* 호버 변경 오버레이 (이미지 있을 때만) */
.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); }
}
@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-lg);
  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.06em; }
.stat__value { font-size: 28px; 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; }
.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(--bg-3);
  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(--bg-3); }
.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(--bg-3);
  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(--bg-3);
}

/* ============================================================
   Tables
   ============================================================ */
.table-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  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 {
  background: var(--bg-3);
  color: var(--text-3);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.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 { 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 (login)
   ============================================================ */
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,0.04), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(255,255,255,0.03), transparent 40%),
    var(--bg-0);
  padding: 24px;
}
.auth__card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-glow);
}
.auth__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth__title { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 6px; }
.auth__sub { color: var(--text-3); font-size: 13.5px; margin: 0 0 24px; }
.auth__sub--error { color: var(--danger); }
.auth__divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-4); font-size: 12px;
  margin: 20px 0;
}
.auth__divider::before, .auth__divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border-1);
}

/* ============================================================
   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: 4px; }

.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-lg);
  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.08em;
  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-lg);
  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: 10px;
  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.08em; 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-lg);
  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.10em;
  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: 6px;
  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 { 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); }

/* ============================================================
   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-xl);
  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: 8px;
  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 대체) */
.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text-1);
  padding: 11px 18px; border-radius: 10px; box-shadow: var(--shadow-glow);
  font-size: 13.5px; font-weight: 500; z-index: 200;
  max-width: 90vw;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   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 6px 6px 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);
}
