:root {
  --primary-color: #75acff;
  --primary-hover-color: #5d9cff;
  --background-color: #f7f8fa;
  --text-main-color: #191f28;
  --text-sub-color: #6b7684;
  --text-label-color: #4e5968;
  --border-color: #d9dee8;
  --danger-color: #e5484d;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Login */

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--background-color);
}

.login-card {
  width: min(420px, 100%);
  background: #ffffff;
  border-radius: 28px;
  padding: 36px 28px 32px;
  box-shadow: var(--shadow-card);
  transition: width 0.3s ease, padding 0.3s ease;
}

.logo-area {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.logo {
  width: 220px;
  height: auto;
}

.title-area {
  margin-bottom: 28px;
}

#loginGuide {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main-color);
  line-height: 1.3;
  letter-spacing: -0.3px;
}

#loginGuide.hidden {
  display: none;
}

#loginSubGuide {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-sub-color);
  line-height: 1.5;
}

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

.form-step {
  display: none;
}

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

.login-form label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-label-color);
}

.login-form input {
  height: 52px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0 16px;
  font-size: 17px;
}

.login-form input:focus {
  border-color: var(--primary-color);
}

.primary-button {
  height: 52px;
  border-radius: 14px;
  background: var(--primary-color);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.primary-button:hover {
  background: var(--primary-hover-color);
}

.primary-button:disabled {
  opacity: 0.55;
}

.text-button {
  height: 44px;
  background: transparent;
  color: var(--text-sub-color);
  font-size: 14px;
  font-weight: 700;
}

.error-message {
  min-height: 20px;
  margin: 4px 0 0;
  color: var(--danger-color);
  font-size: 13px;
  text-align: center;
}

.signup-message {
  margin: 0 0 8px;
  color: var(--text-sub-color);
  font-size: 15px;
  text-align: center;
}

.code-input-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.code-input {
  width: 42px !important;
  height: 48px !important;
  padding: 0 !important;
  text-align: center;
  font-size: 22px !important;
  font-weight: 800;
  border-radius: 12px;
}

/* ── Signup ──────────────────────────── */

.signup-card {
  width: min(480px, 100%);
  padding: 32px 28px 28px;
  border-radius: 24px;
}

.card-transitioning {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.card-entering {
  animation: cardEnter 0.3s ease forwards;
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.signup-step {
  display: flex;
  flex-direction: column;
}

/* 헤더 영역 */
.signup-step-header {
  margin-bottom: 28px;
}

.signup-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
  padding: 0;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub-color);
  cursor: pointer;
  transition: color 0.12s;
}

.signup-back-btn:hover {
  color: var(--text-main-color);
}

.signup-back-btn::before {
  content: "←";
  font-size: 15px;
}

.signup-step-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
  color: var(--text-main-color);
  line-height: 1.3;
  letter-spacing: -0.5px;
}

.signup-step-sub {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub-color);
  line-height: 1.5;
}

/* 업체 유형 선택 카드 */
.signup-type-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}

.signup-type-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 18px 18px;
  border: 1.5px solid #e5e8eb;
  border-radius: 16px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.signup-type-card:hover {
  border-color: #3182f6;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.1);
  background: #f8fbff;
}

.signup-type-card:active {
  background: #eef5ff;
}

.signup-type-icon {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 12px;
  background: #f2f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.signup-type-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.signup-type-text strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main-color);
}

.signup-type-text span {
  font-size: 13px;
  color: var(--text-sub-color);
}

.signup-type-arrow {
  color: #c9cdd4;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
}

/* 폼 영역 */
.signup-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.signup-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.signup-field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-label-color);
  letter-spacing: -0.1px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.signup-verified-badge {
  font-size: 11px;
  font-weight: 600;
  color: #00b660;
  background: #e6f9f0;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0;
}

.signup-input-readonly {
  background: #f2f4f6;
  color: var(--text-sub-color);
  cursor: default;
}

.signup-optional {
  font-size: 11px;
  font-weight: 600;
  color: #8b95a1;
  background: #f2f4f6;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0;
}

.signup-input {
  height: 50px;
  border: 1.5px solid #e5e8eb;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-main-color);
  background: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.signup-input:focus {
  border-color: #3182f6;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.12);
  outline: none;
}

.signup-input::placeholder {
  color: #c9cdd4;
}

.signup-address-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  padding: 0 16px;
  border: 1.5px solid #e5e8eb;
  border-radius: 12px;
  background: #f9fafb;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.signup-address-btn:hover {
  border-color: #3182f6;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.12);
}

.signup-address-btn span {
  font-size: 15px;
  color: #c9cdd4;
  font-family: inherit;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signup-address-btn span.has-value {
  color: var(--text-main-color);
}

.signup-address-btn::after {
  content: "›";
  margin-left: 8px;
  color: #c9cdd4;
  font-size: 18px;
  font-weight: 300;
  flex: 0 0 auto;
}

/* 리스트 (업체/지점 선택) */
.verify-phone-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.verify-send-btn {
  height: 50px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid #3182f6;
  background: #ffffff;
  color: #3182f6;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s;
}

.verify-send-btn:hover { background: #f0f6ff; }
.verify-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.verify-timer {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub-color);
  text-align: center;
}

.signup-search-wrap {
  margin-bottom: 10px;
}

.signup-search-input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 40px;
  border: 1.5px solid #e5e8eb;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-main-color);
  background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c9cdd4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 14px center;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.signup-search-input:focus {
  border-color: #3182f6;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.12);
  outline: none;
}

.signup-search-input::placeholder {
  color: #c9cdd4;
}

.signup-list-wrap {
  margin-bottom: 20px;
}

.signup-list-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub-color);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.signup-list {
  display: flex;
  flex-direction: column;
  max-height: 300px;
  overflow-y: auto;
  border: 1.5px solid #e5e8eb;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
  overflow-y: auto;
}

.signup-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 15px 18px;
  background: #ffffff;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main-color);
  border: none;
  border-bottom: 1px solid #f2f4f6;
  transition: background 0.1s;
  cursor: pointer;
}

.signup-list-item:last-child {
  border-bottom: none;
}

.signup-list-item:hover {
  background: #f8fbff;
}

.signup-list-item:active {
  background: #eef5ff;
}

.signup-list-item.selected {
  background: #eef5ff;
  color: #3182f6;
}

.signup-list-item-arrow {
  color: #c9cdd4;
  font-size: 18px;
  font-weight: 300;
  flex: 0 0 auto;
}

.signup-list-new {
  color: #3182f6;
  font-weight: 700;
}

.signup-list-new .signup-list-item-arrow {
  color: #3182f6;
  opacity: 0.5;
}

.signup-list-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--text-sub-color);
}

/* 섹션 구분 */
.similar-company-warning {
  margin-bottom: 16px;
  border: 1.5px solid #f0b429;
  border-radius: 14px;
  background: #fffbec;
  overflow: hidden;
}

.similar-collapsed {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #b45309;
}

.similar-toggle-btn {
  font-size: 12px;
  font-weight: 700;
  color: #3182f6;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.similar-expanded {
  padding: 16px;
}

.similar-company-title {
  font-size: 14px;
  font-weight: 800;
  color: #b45309;
  margin: 0 0 4px;
}

.similar-company-sub {
  font-size: 13px;
  color: #92400e;
  margin: 0 0 10px;
}

.similar-company-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.similar-company-item {
  font-size: 14px;
  font-weight: 700;
  color: #1c1917;
  padding: 8px 12px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #fde68a;
}

.similar-company-actions {
  display: flex;
  gap: 8px;
}

.similar-btn-existing {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid #3182f6;
  background: #ffffff;
  color: #3182f6;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s;
}

.similar-btn-existing:hover { background: #f0f6ff; }

.similar-btn-confirm {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  border: none;
  background: #f2f4f6;
  color: #4e5968;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s;
}

.similar-btn-confirm:hover { background: #e5e8eb; }

/* 가입 페이지 주소 다이얼로그 고정 크기 */
[data-signup-shell] .address-dialog-card {
  height: 560px;
  max-height: 82vh;
}

[data-signup-shell] .address-dialog-card .address-result-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

[data-signup-shell] .address-dialog-card .selected-address-box {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.address-dialog-footer {
  flex: 0 0 auto;
  padding: 12px 20px;
  border-top: 1px solid #edf0f4;
  background: #ffffff;
}

.address-dialog-footer.hidden {
  display: none;
}

.address-apply-button {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  background: #3182f6;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background 0.12s;
}

.address-apply-button:hover {
  background: #1b64da;
}

.signup-section-label {
  font-size: 12px;
  font-weight: 700;
  color: #8b95a1;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.signup-section-divider {
  height: 1px;
  background: #f2f4f6;
  margin: 4px 0 4px;
}

/* 에러 */
.signup-error {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #f04452;
  line-height: 1.4;
}

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

/* 액션 버튼 영역 */
.signup-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.signup-actions .primary-button {
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  background: #3182f6;
  letter-spacing: -0.2px;
}

.signup-actions .primary-button:hover {
  background: #1b64da;
}

.signup-actions .primary-button:disabled {
  opacity: 0.5;
}

.signup-back-text-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #8b95a1;
  cursor: pointer;
  transition: color 0.12s;
}

.signup-back-text-btn:hover {
  color: var(--text-main-color);
}
