/* ===============================
   LOGIN: 로그인 화면
   =============================== */

.hidden {
  display: none !important;
}

.login-wrap {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 120px;
}

.login-legal {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 20px max(20px, env(safe-area-inset-bottom));
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  line-height: 1.55;
}

.login-legal__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-bottom: 10px;
}

.login-legal__links a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.2s;
}

.login-legal__links a:hover,
.login-legal__links a:focus-visible {
  color: #fff;
}

.login-legal__company p {
  margin: 0;
}

.login-legal__company a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.login-legal__company a:hover,
.login-legal__company a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.login-legal__copy {
  margin: 8px 0 0;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 380px) {
  .login-wrap {
    padding-bottom: 140px;
  }

  .login-legal {
    font-size: 10px;
  }
}

.login-panel {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-title {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: #1a1a2e;
}

.login-tagline {
  margin: 0 0 24px 0;
  font-size: 13px;
  color: #666;
  text-align: center;
  line-height: 1.45;
}

.login-footnote {
  margin: 0;
  font-size: 13px;
  color: #888;
  text-align: center;
  line-height: 1.4;
}

.login-subtitle {
  margin: 0 0 24px 0;
  font-size: 14px;
  color: #666;
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-input {
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}
.login-input:focus {
  border-color: #16213e;
}

.login-email-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-email-row .login-input--email {
  flex: 1;
  min-width: 0;
}

.login-email-check-btn {
  flex-shrink: 0;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #f5f7fa;
  color: #16213e;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.login-email-check-btn:hover:not(:disabled) {
  background: #eef2f8;
  border-color: #16213e;
}

.login-email-check-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.login-email-status {
  margin: -4px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.login-email-status.hidden {
  display: none;
}

.login-email-status--ok {
  color: #047857;
}

.login-email-status--error {
  color: #b91c1c;
}

.login-error {
  font-size: 13px;
  color: #c00;
  padding: 4px 0;
}

.login-submit {
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: #16213e;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
}
.login-submit:hover:not(:disabled) {
  background: #1a1a2e;
}
.login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* -------- 탈퇴 유예 게이트 -------- */
.withdraw-gate {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.withdraw-gate__panel {
  width: 100%;
  max-width: 420px;
  padding: 28px 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  text-align: center;
}

.withdraw-gate__title {
  margin: 0 0 12px;
  font-size: 22px;
  color: #16213e;
}

.withdraw-gate__lead {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.55;
  color: #334155;
}

.withdraw-gate__countdown-box {
  margin: 0 0 10px;
  padding: 16px 12px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fdba74;
}

.withdraw-gate__countdown-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #9a3412;
}

.withdraw-gate__countdown {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  color: #c2410c;
}

.withdraw-gate__meta {
  margin: 0 0 16px;
  font-size: 13px;
  color: #64748b;
}

.withdraw-gate__hint {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
}

.withdraw-gate__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.withdraw-gate__btn {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.withdraw-gate__btn--primary {
  color: #fff;
  background: #16213e;
}

.withdraw-gate__btn--secondary {
  color: #334155;
  background: #f1f5f9;
}

.login-form-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 8px;
  font-size: 13px;
}

.login-form-links__btn {
  padding: 0;
  border: none;
  background: none;
  color: #555;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.login-form-links__btn:hover {
  color: #16213e;
  text-decoration: underline;
}

.login-form-links__sep {
  color: #ccc;
  font-size: 12px;
  user-select: none;
}

.login-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #444;
  line-height: 1.4;
}

.login-check input {
  margin-top: 3px;
}

.login-check a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-check a:hover,
.login-check a:focus-visible {
  color: #1d4ed8;
}

.login-hint {
  font-size: 12px;
  color: #666;
  margin: 0;
  line-height: 1.4;
}

.login-hint--field {
  margin: -4px 0 8px;
}

.onboarding-banner {
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff8e6;
  border: 1px solid #f0d78c;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.onboarding-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.onboarding-banner__inner--stack {
  align-items: flex-start;
}

.onboarding-banner__reason {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: inherit;
}

.onboarding-banner__text {
  flex: 1;
  min-width: 0;
}

.onboarding-banner__cancel {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid #d97706;
  border-radius: 6px;
  background: #fff;
  color: #b45309;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.onboarding-banner__cancel:hover {
  background: #fffbeb;
  border-color: #b45309;
}

.onboarding-banner__cancel:active {
  background: #fef3c7;
}

.onboarding-banner--ok {
  background: #eef9ee;
  border-color: #a8d5a8;
}

.onboarding-banner--error {
  background: #fdeeee;
  border-color: #e8a8a8;
}

/* ── 사무소 신청 페이지 ── */
#onboardingPage,
.onboarding-panel {
  --onboarding-pad-x: 20px;
  --onboarding-accent: #2b6cff;
  --onboarding-accent-hover: #1a5ae6;
  --onboarding-accent-active: #0d4bc7;
  --onboarding-border: #e8eaed;
  --onboarding-input-h: 44px;
  --onboarding-radius: 8px;
  --onboarding-text-muted: #6b7280;
  --onboarding-surface: #f9fafb;
}

#onboardingPage .onboarding-panel,
.my-page-detail__form-mount .listing-panel--inline.onboarding-panel {
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

#onboardingPage .onboarding-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px var(--onboarding-pad-x) 20px;
  -webkit-overflow-scrolling: touch;
}

.onboarding-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--onboarding-border);
}

.onboarding-section:last-child {
  border-bottom: none;
  padding-bottom: 8px;
}

.onboarding-section__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
}

.onboarding-section__desc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--onboarding-text-muted);
}

.onboarding-section--flush {
  padding-top: 8px;
  border-bottom: none;
}

.onboarding-view.hidden {
  display: none;
}

.onboarding-hub__note {
  margin: 4px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  font-size: 13px;
  font-weight: 400;
  color: #64748b;
  line-height: 1.5;
}

.onboarding-hub__question {
  margin: 16px 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  line-height: 1.45;
}

.onboarding-type-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.onboarding-type-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--onboarding-border);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.onboarding-type-card:hover:not(:disabled) {
  border-color: #c7d7fe;
  box-shadow: 0 2px 8px rgba(43, 108, 255, 0.08);
}

.onboarding-type-card:active:not(:disabled) {
  background: #f8fafc;
}

.onboarding-type-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f3f4f6;
}

.onboarding-type-card--owner:not(:disabled) {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #f8fbff 0%, #fff 100%);
}

.onboarding-type-card--join:not(:disabled) {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #f7fef9 0%, #fff 100%);
}

.onboarding-type-card__icon {
  flex-shrink: 0;
  font-size: 22px;
  line-height: 1;
}

.onboarding-type-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.onboarding-type-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
}

.onboarding-type-card__desc {
  font-size: 13px;
  color: var(--onboarding-text-muted);
  line-height: 1.45;
}

.onboarding-type-card__note {
  font-size: 12px;
  font-weight: 600;
  color: #b45309;
  line-height: 1.4;
}

.onboarding-type-card__arrow {
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 300;
  color: #9ca3af;
  line-height: 1;
}

.onboarding-section__desc + .onboarding-search-row,
.onboarding-section__desc + .onboarding-form {
  margin-top: 14px;
}

.onboarding-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--onboarding-text-muted);
}

.onboarding-search-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.onboarding-search-row .onboarding-input {
  flex: 1;
  min-width: 0;
}

.onboarding-input {
  display: block;
  width: 100%;
  height: var(--onboarding-input-h);
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: var(--onboarding-radius);
  background: #fff;
  font-size: 15px;
  color: #111827;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.onboarding-input::placeholder {
  color: #9ca3af;
}

.onboarding-input:focus {
  outline: none;
  border-color: var(--onboarding-accent);
  box-shadow: 0 0 0 3px rgba(43, 108, 255, 0.15);
}

.onboarding-input--file {
  height: auto;
  min-height: var(--onboarding-input-h);
  padding: 10px 12px;
  font-size: 14px;
}

.onboarding-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.onboarding-field + .onboarding-field {
  margin-top: 14px;
}

.onboarding-field--file .onboarding-input--file {
  background: var(--onboarding-surface);
}

.onboarding-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  line-height: 1.3;
}

.onboarding-field__hint {
  margin: 0;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.4;
}

.onboarding-form {
  display: flex;
  flex-direction: column;
}

.onboarding-form__actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--onboarding-border);
}

.onboarding-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--onboarding-radius);
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.45;
}

.onboarding-error.hidden {
  display: none;
}

.onboarding-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: var(--onboarding-input-h);
  padding: 0 16px;
  border: none;
  border-radius: var(--onboarding-radius);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.onboarding-btn--primary {
  background: var(--onboarding-accent);
  color: #fff;
}

.onboarding-btn--primary:hover {
  background: var(--onboarding-accent-hover);
}

.onboarding-btn--primary:active {
  background: var(--onboarding-accent-active);
}

.onboarding-btn--primary:disabled {
  background: #93b4f5;
  cursor: not-allowed;
}

.onboarding-btn--block {
  display: flex;
  width: 100%;
  min-height: 48px;
  font-size: 15px;
}

.onboarding-btn--compact {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  white-space: nowrap;
}

.onboarding-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.onboarding-office-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--onboarding-border);
  border-radius: var(--onboarding-radius);
  background: var(--onboarding-surface);
}

.onboarding-office-item__info {
  flex: 1;
  min-width: 0;
}

.onboarding-office-item__name {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}

.onboarding-office-item__rep {
  font-size: 12px;
  color: #374151;
  margin-top: 4px;
  line-height: 1.4;
}

.onboarding-office-item__addr {
  font-size: 12px;
  color: var(--onboarding-text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.join-req-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.join-req-notice {
  flex-shrink: 0;
  margin: 12px 16px 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  line-height: 1.5;
}

.join-req-notice__title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
}

.join-req-notice__text {
  margin: 0;
  font-size: 13px;
  color: #374151;
}

.join-req-notice__text + .join-req-notice__text {
  margin-top: 6px;
}

.join-req-actions button {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 13px;
}

.join-req-approve {
  background: #16213e;
  color: #fff;
}

.join-req-reject {
  background: #eee;
  color: #333;
}

.topbar-user {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
  font-size: 10px;
  color: #aeb4bc;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

/* 로그인 화면 — 아이디/비밀번호 찾기 모달 */
.login-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.login-modal__panel {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.login-modal__title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: #1a1a2e;
}

.login-modal__message {
  font-size: 13px;
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 8px;
  word-break: break-all;
}

.login-modal__message--error {
  color: #a00;
  background: #fdeeee;
  border: 1px solid #e8a8a8;
}

.login-modal__message--ok {
  color: #1a5c1a;
  background: #eef9ee;
  border: 1px solid #a8d5a8;
}

.login-modal__message--temp {
  color: #1a1a2e;
  background: #f5f7fa;
  border: 1px solid #d0d8e8;
  font-family: ui-monospace, monospace;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: pre-line;
}

.login-modal__cancel {
  padding: 12px;
  font-size: 14px;
  color: #555;
  background: #f0f0f0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.login-modal__cancel:hover {
  background: #e4e4e4;
}
