/* 회원가입 — login.css 2단 레이아웃 확장 */

.portal-signup-page.portal-login-page {
  align-items: stretch;
  overflow: hidden;
}

.portal-signup-page .portal-login-hero {
  flex: 0 0 min(420px, 42%);
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
}

.portal-signup-panel {
  flex: 1 1 58%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: #f0f6fb;
  position: relative;
}

.portal-signup-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 420px at 90% 10%, rgba(0, 116, 186, 0.07), transparent 55%),
    radial-gradient(circle 320px at 5% 95%, rgba(6, 182, 212, 0.06), transparent 50%);
  pointer-events: none;
}

.portal-signup-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
  position: relative;
  z-index: 1;
  scroll-behavior: smooth;
}

.portal-signup-inner {
  max-width: 640px;
  margin: 0 auto;
}

.portal-signup-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.portal-signup-topbar .portal-login-brand {
  margin-bottom: 0;
}

.portal-signup-topbar .portal-login-back {
  margin-bottom: 0;
  font-size: 0.8125rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 116, 186, 0.06);
  border: 1px solid rgba(0, 116, 186, 0.12);
  text-decoration: none;
}

.portal-signup-topbar .portal-login-back:hover {
  background: #0074ba;
  color: #fff;
  text-decoration: none;
}

.portal-signup-intro {
  margin-bottom: 1.5rem;
}

.portal-signup-intro h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
  color: #0f172a;
}

.portal-signup-intro p {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.55;
}

.portal-signup-intro .req {
  color: #dc2626;
  font-weight: 700;
}

.portal-signup-section {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 1.25rem 1.35rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 14px -8px rgba(15, 23, 42, 0.08);
}

.portal-signup-section-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}

.portal-signup-section-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0074ba, #06b6d4);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-signup-section-head h2 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
  color: #0f172a;
}

.portal-signup-section-head p {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
}

.portal-signup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
}

.portal-signup-grid .span-2 {
  grid-column: 1 / -1;
}

.portal-signup-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #0f172a;
}

.portal-signup-field label .req {
  color: #dc2626;
  font-weight: 700;
}

.portal-signup-field label.req-label .opt-tag {
  display: none;
}

.portal-signup-field label .opt-tag {
  font-weight: 500;
  color: #94a3b8;
  font-size: 0.75rem;
}

.portal-signup-field input[type="text"],
.portal-signup-field input[type="password"],
.portal-signup-field input[type="email"],
.portal-signup-field input[type="tel"] {
  width: 100%;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.72rem 0.95rem;
  font-size: 0.9375rem;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.portal-signup-field input:focus {
  outline: none;
  border-color: #0074ba;
  box-shadow: 0 0 0 4px rgba(0, 116, 186, 0.12);
}

.portal-signup-field input[readonly] {
  background: #f8fafc;
  color: #475569;
}

.portal-signup-field .hint {
  font-size: 0.72rem;
  color: #64748b;
  margin: 0.35rem 0 0;
  line-height: 1.45;
}

.portal-signup-address-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.portal-signup-address-row {
  display: flex;
  gap: 0.5rem;
}

.portal-signup-address-row input {
  flex: 1;
}

.portal-signup-btn-secondary {
  flex-shrink: 0;
  border: 2px solid #e2e8f0;
  background: #fff;
  color: #0074ba;
  border-radius: 12px;
  padding: 0.72rem 1rem;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.portal-signup-btn-secondary:hover {
  border-color: #0074ba;
  background: rgba(0, 116, 186, 0.06);
}

/* 파일 업로드 */
.portal-file-picker {
  position: relative;
}

.portal-file-picker input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.portal-file-picker-ui {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  transition: border-color 0.2s, background 0.2s;
}

.portal-file-picker:hover .portal-file-picker-ui,
.portal-file-picker:focus-within .portal-file-picker-ui {
  border-color: #0074ba;
  background: rgba(0, 116, 186, 0.04);
}

.portal-file-picker.is-selected .portal-file-picker-ui {
  border-style: solid;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.06);
}

.portal-file-picker-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 116, 186, 0.12), rgba(6, 182, 212, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0074ba;
  font-size: 0.7rem;
  font-weight: 800;
}

.portal-file-picker-body {
  flex: 1;
  min-width: 0;
}

.portal-file-picker-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
}

.portal-file-picker-meta {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.portal-file-picker-name {
  display: block;
  font-size: 0.75rem;
  color: #166534;
  font-weight: 600;
  margin-top: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-file-picker-name:empty {
  display: none;
}

.portal-signup-files-grid {
  display: grid;
  gap: 0.75rem;
}

.portal-signup-agree {
  background: linear-gradient(135deg, #f8fafc, #fff);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1.15rem;
}

.portal-signup-agree h3 {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: #0f172a;
}

.portal-signup-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  font-size: 0.875rem;
  line-height: 1.5;
  cursor: pointer;
}

.portal-signup-check:last-child {
  margin-bottom: 0;
}

.portal-signup-check input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  accent-color: #0074ba;
  flex-shrink: 0;
}

.portal-signup-check a {
  color: #0074ba;
  font-weight: 600;
  text-decoration: none;
}

.portal-signup-check a:hover {
  text-decoration: underline;
}

.portal-signup-actions {
  margin-top: 0.5rem;
  padding-top: 1rem;
  padding-bottom: 0.5rem;
  border-top: 1px solid #e2e8f0;
}

.portal-signup-submit {
  width: 100%;
  padding: 0.95rem 1.5rem;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #0074ba 0%, #3b9fd4 100%);
  cursor: pointer;
  box-shadow: 0 8px 22px -8px rgba(0, 116, 186, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}

.portal-signup-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(0, 116, 186, 0.55);
}

.portal-signup-submit:active {
  transform: translateY(0);
}

.portal-signup-footer {
  text-align: center;
  margin-top: 1rem;
  padding-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

.portal-signup-footer a {
  color: #0074ba;
  font-weight: 700;
  text-decoration: none;
}

.portal-signup-footer a:hover {
  text-decoration: underline;
}

.portal-signup-page .portal-login-alert {
  margin-bottom: 1rem;
}

@media (max-width: 991.98px) {
  .portal-signup-page.portal-login-page {
    flex-direction: column;
    overflow: auto;
    max-height: none;
  }

  .portal-signup-page .portal-login-hero {
    flex: none;
    min-height: auto;
    position: relative;
  }

  .portal-signup-page .portal-login-hero h1,
  .portal-signup-page .portal-login-features {
    display: none;
  }

  .portal-signup-panel {
    min-height: auto;
    max-height: none;
    overflow: visible;
  }

  .portal-signup-scroll {
    overflow: visible;
  }
}

@media (max-width: 575.98px) {
  .portal-signup-grid {
    grid-template-columns: 1fr;
  }

  .portal-signup-section {
    padding: 1rem 1rem 1.1rem;
  }
}
