/* 팬더정산 — 로그인 화면 · 상단 계정 바 */

body.pgate-on > .shell,
body.pgate-on > .modal-backdrop { display: none !important; }

.pgate {
  position: fixed; inset: 0; z-index: 9999; overflow: auto;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(900px 520px at 50% -10%, #ede4ff, transparent 65%) #f7f5fc;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", Pretendard, "Malgun Gothic", sans-serif;
}
.pgate-box {
  width: 100%; max-width: 380px; background: #fff; border: 1px solid #e7e0f5;
  border-radius: 18px; padding: 30px 26px; box-shadow: 0 22px 48px -20px rgba(60, 30, 120, .28);
}
.pgate-logo {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 17px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}
.pgate-title {
  margin: 0; text-align: center; font-size: 24px; font-weight: 800; letter-spacing: -.4px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pgate-sub { margin: 6px 0 20px; text-align: center; font-size: 12.5px; color: #8b83a3; }

.pgate-tabs { display: flex; gap: 6px; margin-bottom: 18px; background: #f1ecfa; padding: 4px; border-radius: 11px; }
.pgate-tabs button {
  flex: 1; padding: 9px; border: none; border-radius: 8px; background: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 700; color: #6b6480;
}
.pgate-tabs button.on { background: #fff; color: #7c3aed; box-shadow: 0 1px 4px rgba(0, 0, 0, .07); }

.pgate-roles { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.pgate-roles button {
  text-align: left; padding: 12px 14px; border: 1px solid #e7e0f5; border-radius: 11px;
  background: #fff; cursor: pointer; font-family: inherit;
}
.pgate-roles button.on { border-color: #7c3aed; background: #f6f1ff; }
.pgate-roles b { display: block; font-size: 13.5px; color: #251a38; }
.pgate-roles span { display: block; margin-top: 2px; font-size: 11.5px; color: #8b83a3; }

.pgate-f { display: block; margin-bottom: 12px; }
.pgate-f span { display: block; margin-bottom: 5px; font-size: 11.5px; font-weight: 600; color: #6b6480; }
.pgate-f input {
  width: 100%; box-sizing: border-box; padding: 11px 12px; font-family: inherit; font-size: 14px;
  border: 1px solid #ddd5ee; border-radius: 10px; background: #fff; color: #251a38; outline: none;
}
.pgate-f input:focus { border-color: #7c3aed; }
.pgate-f input:disabled { opacity: .55; }

.pgate-msg {
  margin: 4px 0 12px; padding: 10px 12px; border-radius: 9px; font-size: 12.5px; line-height: 1.5;
  background: #f1ecfa; color: #5b2ec4;
}
.pgate-msg.bad { background: #fdecec; color: #c0392b; }

.pgate-go {
  width: 100%; padding: 13px; border: none; border-radius: 11px; cursor: pointer;
  font-family: inherit; font-size: 14.5px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}
.pgate-go:disabled { opacity: .55; cursor: default; }
.pgate-hint { margin: 14px 0 0; text-align: center; font-size: 11.5px; color: #8b83a3; line-height: 1.6; }

/* 상단 계정 바 */
.acct-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 20px; background: #251a38; color: #cfc6e4; font-size: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", Pretendard, "Malgun Gothic", sans-serif;
}
.acct-ws { font-weight: 700; color: #fff; }
/* 톱니만 있으면 눌리는 줄 모릅니다 — 테두리 있는 버튼으로 둡니다 */
.acct-bar .acct-cog {
  padding: 3px 10px; border: 1px solid rgba(168, 85, 247, .55); border-radius: 7px;
  background: rgba(168, 85, 247, .18); color: #e3d4ff; cursor: pointer;
  font-family: inherit; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.acct-bar .acct-cog:hover { background: rgba(168, 85, 247, .35); border-color: #a855f7; color: #fff; }
.acct-role { padding: 2px 8px; border-radius: 999px; background: rgba(168, 85, 247, .25); color: #d9c4ff; font-weight: 600; }
.acct-ro { padding: 2px 8px; border-radius: 999px; background: rgba(56, 189, 248, .2); color: #9ad9f7; }
.acct-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.acct-bar button {
  padding: 4px 10px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 7px;
  background: none; color: #cfc6e4; cursor: pointer; font-family: inherit; font-size: 11.5px;
}
.acct-bar button:hover { border-color: #a855f7; color: #fff; }

@media print { .acct-bar { display: none; } }

/* 초대 코드 패널 */
.inv-panel { margin-bottom: 16px; }
.inv-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 4px 0 6px; }
.inv-f { display: flex; flex-direction: column; gap: 5px; }
.inv-f > span { font-size: 11px; font-weight: 600; color: var(--ink-faint); }
.inv-f > span em { font-style: normal; font-weight: 400; }
.inv-f select, .inv-f input {
  padding: 8px 10px; min-width: 150px; font-family: inherit; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); outline: none;
}
.inv-f select:focus, .inv-f input:focus { border-color: var(--accent); }

.inv-note { margin: 6px 0 14px; font-size: 12.5px; line-height: 1.6; color: var(--ink-faint); }
.inv-note.ok { padding: 9px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.inv-note.bad { padding: 9px 12px; border-radius: 8px; background: #fdecec; color: #c0392b; }
.inv-new { font-size: 15px; letter-spacing: .06em; }

.inv-code {
  padding: 3px 8px; border-radius: 6px; background: var(--surface-alt);
  font-family: "SF Mono", Consolas, ui-monospace, monospace;
  font-size: 13px; font-weight: 700; letter-spacing: .05em; color: var(--accent);
}
.inv-copy { margin-left: 6px; }

/* 엔터사 관리 */
.ws-name {
  width: 100%; min-width: 130px; padding: 6px 9px; font-family: inherit; font-size: 13px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--surface); color: var(--ink); outline: none;
}
.ws-name:focus { border-color: var(--accent); }
.ws-sub { font-size: 10px; font-weight: 400; color: var(--ink-faint); text-transform: none; }
