/* Custom Design Tokens */
:root {
  --bg-color: #eae3d5;          /* 바깥 배경 (샌드 베이지) */
  --card-bg: #f4efe6;          /* 카드 내부 배경 (연한 크림) */
  --input-bg: #e6dfd1;         /* 인풋 필드 배경 */
  --input-border: #d0c8b8;     /* 인풋 테두리 */
  --text-primary: #1a1a1a;     /* 주 텍스트 */
  --text-muted: #6e675b;       /* 서브 텍스트 */
  --primary-red: #ff3b30;      /* 서브밋 버튼 빨간색 */
  --primary-red-hover: #e03126;/* 서브밋 호버 */
  --btn-guide-bg: #bfae99;     /* 이미지 가이드 버튼 배경 */
  --btn-guide-hover: #ab9b86;  /* 이미지 가이드 버튼 호버 */
  --btn-upload-bg: #ffffff;    /* 업로드 버튼 배경 */
  --btn-upload-border: #c4baa7;/* 업로드 버튼 테두리 */
  --border-radius-lg: 32px;    /* 카드 둥글기 */
  --border-radius-md: 14px;    /* 인풋 둥글기 */
  --border-radius-sm: 8px;     /* 작은 둥글기 */
  --font-title: 'Outfit', 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --error-color: #d32f2f;      /* 에러 붉은색 */
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  font-family: var(--font-body);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

/* Container */
.portal-wrapper {
  width: 100%;
  max-width: 960px;
}

.portal-card {
  background-color: var(--card-bg);
  border: 8px solid #ffffff;
  border-radius: var(--border-radius-lg);
  padding: 50px 60px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

/* Header */
.portal-header {
  margin-bottom: 24px;
}

.portal-title {
  font-family: var(--font-title);
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Form Section */
.form-section {
  display: flex;
  flex-direction: column;
}

.section-title {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 30px;
  color: var(--text-primary);
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 48px;
}

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

/* Form Groups (에러 공간을 미리 확보하여 높이 변화 없게 설정) */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
  width: 100%;
}

.form-group.full-width {
  grid-column: span 2;
  margin-top: 10px;
}

/* Labels */
label {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: #333333;
}

.required-label::after {
  content: ' *';
  color: var(--primary-red);
  font-weight: bold;
}

.size-limit {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Inputs & Selects */
input[type="text"],
input[type="email"],
input[type="date"],
select {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 12px 16px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition-smooth);
  width: 100%;
  min-width: 0; /* Prevents overflow inside flex/grid tracks */
  max-width: 100%;
  height: 48px;
  box-sizing: border-box;
}

input[type="date"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: block !important;
  align-self: stretch !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

input[type="date"]::-webkit-date-and-time-value {
  margin: 0 !important;
  padding: 0 !important;
  min-height: auto !important;
  height: auto !important;
  text-align: left !important;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
}

input[type="date"]::-webkit-datetime-edit {
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  min-width: 0 !important;
}

textarea {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 12px 16px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition-smooth);
  width: 100%;
  box-sizing: border-box;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
  color: #8c8374;
  opacity: 0.8;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  border-color: #8c816d;
  box-shadow: 0 0 0 3px rgba(140, 129, 109, 0.15);
  background-color: #ece6da;
}

/* Date Picker Reset */
input[type="date"] {
  position: relative;
  min-height: 48px !important;
}

/* Select Styling */
.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #4a443b;
  pointer-events: none;
}

select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

select:invalid, select option[value=""] {
  color: #8c8374;
}

/* Textarea Specifics */
textarea {
  background-color: #ffffff;
  border-color: #d0c8b8;
  resize: vertical;
  border-radius: 10px;
  padding: 16px;
  line-height: 1.5;
}

textarea:focus {
  background-color: #ffffff;
  border-color: #8c816d;
}

/* File Upload Layout */
.file-upload-wrapper {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.file-action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
}

.file-name-display {
  width: 100%;
  max-width: 100%;
  flex-grow: 1;
  height: 48px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.file-name-display:empty::before {
  content: attr(placeholder);
  color: #8c8374;
  opacity: 0.8;
}

.file-name-display .file-selected-text {
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.file-name-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-grow: 1;
  flex-shrink: 1;
  min-width: 0;
  text-align: left;
  padding-right: 8px;
}

.file-name-display .btn-clear-file {
  background: none;
  border: none;
  color: var(--primary-red);
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  margin-left: 8px;
  line-height: 1;
  padding: 0 4px;
}

.hidden-file-input {
  display: none;
}

/* Buttons */
.btn-guide {
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--btn-guide-bg);
  color: #ffffff;
  border: none;
  border-radius: 20px;
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-guide:hover {
  background-color: var(--btn-guide-hover);
}

.btn-upload {
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--btn-upload-bg);
  color: #4a443b;
  border: 1px solid var(--btn-upload-border);
  border-radius: 20px;
  height: 36px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.btn-upload:hover {
  background-color: #f7f5f0;
  border-color: #9c917d;
}

/* Consent Agreement Area */
.consent-group {
  grid-column: span 2;
  margin: 15px 0 35px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background-color: rgba(230, 223, 209, 0.3);
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px dashed var(--input-border);
  transition: var(--transition-smooth);
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  position: relative;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox {
  height: 20px;
  width: 20px;
  background-color: #ffffff;
  border: 2px solid var(--input-border);
  border-radius: 6px;
  margin-right: 10px;
  margin-top: 2px;
  display: inline-block;
  position: relative;
  transition: var(--transition-smooth);
  flex-shrink: 0; /* 찌그러짐 원천 차단 */
}

.checkbox-container:hover input ~ .custom-checkbox {
  border-color: var(--primary-red-hover);
}

.checkbox-container input:checked ~ .custom-checkbox {
  background-color: var(--primary-red);
  border-color: var(--primary-red);
}

.custom-checkbox::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .custom-checkbox::after {
  display: block;
}

.consent-text {
  color: var(--text-primary);
}

.required-star {
  color: var(--primary-red);
  font-weight: bold;
}

.btn-consent-detail {
  background: none;
  border: none;
  color: #554d3f;
  text-decoration: underline;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  margin-left: 5px;
  padding: 2px 4px;
}

.btn-consent-detail:hover {
  color: var(--text-primary);
}

/* Submit Button styling */
.submit-wrapper {
  grid-column: span 2;
  display: flex;
  justify-content: center;
  width: 100%;
}

.btn-submit {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  background-color: var(--primary-red);
  color: #ffffff;
  border: none;
  border-radius: 40px;
  padding: 14px 60px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(255, 59, 48, 0.25);
  display: inline-block;
}

.btn-submit:hover {
  background-color: var(--primary-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 59, 48, 0.35);
}

.btn-submit:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.2);
}

/* 
  Error Messages styling:
  - span 태그는 기본적으로 inline 요소이므로 height와 min-height가 적용되지 않습니다.
  - 이를 해결하기 위해 display: block;을 명시하여 min-height: 34px가 브라우저에 의해 강제 렌더링되게 만듭니다.
  - visibility와 opacity로 토글하여 에러 메시지 유무와 상관없이 레이아웃이 1픽셀도 흔들리지 않게 합니다.
*/
.error-message {
  display: block; /* 중요: inline인 span 요소에 block 성질을 부여하여 min-height 활성화 */
  color: var(--error-color);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.3;
  min-height: 34px; /* 2줄 분량의 높이를 상시 공간 확보 */
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  margin-top: 4px;
  max-width: 100% !important;
  word-break: break-word !important;
  overflow: hidden !important;
}

/* 
  개인정보 동의 영역(.consent-group)용 에러 스타일 수정:
  - 이 영역은 2열 그리드가 아닌 1열 가로 전체를 차지하므로, 평소에 공간을 미리 확보해 둘 필요가 없습니다.
  - 평소에는 슬림하게 보이고, 에러가 발생했을 때만 아래로 늘어납니다.
*/
.consent-group .error-message {
  display: none; /* 평소에는 완전히 닫혀서 영역을 차지하지 않음 */
  visibility: visible;
  opacity: 1;
  min-height: 0;
  margin-top: 10px;
  width: 100%;
}

/* Form Validation Visual feedback */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error .file-name-display {
  border-color: var(--error-color);
  background-color: #fdf2f2;
}

.form-group.has-error .error-message {
  visibility: visible;
  opacity: 1;
}

.consent-group.has-error {
  border-color: var(--error-color);
  background-color: #fdf2f2;
}

.consent-group.has-error .error-message {
  display: block; /* 에러 발생 시에만 렌더링되어 박스 높이가 늘어남 */
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: #ffffff;
  border-radius: 20px;
  width: 90%;
  max-width: 550px;
  max-height: 85%;
  overflow-y: auto;
  position: relative;
  z-index: 1001;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #999;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0edf6;
  color: var(--text-primary);
}

/* Terms Scrollable Body with Customized Scrollbar */
.terms-scrollable-body {
  margin-top: 15px;
  background: #fbfbfb;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  padding: 20px;
}

.terms-scrollable-body::-webkit-scrollbar {
  width: 6px;
}

.terms-scrollable-body::-webkit-scrollbar-track {
  background: transparent;
}

.terms-scrollable-body::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.terms-scrollable-body::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.2);
}

.terms-scrollable-body p {
  margin-bottom: 12px;
  color: #333333;
}

.terms-scrollable-body p:last-child {
  margin-bottom: 0;
}

.terms-scrollable-body strong {
  color: #000000;
}

/* Links in Consent Text */
.consent-text a {
  color: var(--primary-red);
  text-decoration: underline;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.consent-text a:hover {
  color: var(--primary-red-hover);
}

.modal-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4a4a4a;
}

/* Consent Table inside Modal */
.consent-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.85rem;
}

.consent-table th, .consent-table td {
  border: 1px solid #e0dbd0;
  padding: 10px 12px;
  text-align: left;
}

.consent-table th {
  background-color: #f7f4ed;
  font-weight: 600;
}

.warning-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Image Guide layouts */
.guide-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.guide-img-placeholder {
  width: 100%;
  height: 200px;
  background-color: #f0ede6;
  border: 2px dashed #dcd6c8;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #8c8374;
  font-weight: 500;
  font-size: 0.9rem;
}

.guide-tip-list {
  padding-left: 20px;
}

.guide-tip-list li {
  margin-bottom: 8px;
}

/* Responsiveness */
@media (max-width: 900px) {
  .portal-card {
    padding: 35px 30px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 24px 16px;
  }

  .portal-card {
    padding: 32px 18px;
    border-width: 3px;
    border-radius: 20px;
  }

  .portal-title {
    font-size: 1.8rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-group {
    margin-bottom: 8px;
  }

  .form-group.full-width {
    grid-column: span 1;
  }

  .consent-group {
    grid-column: span 1;
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-consent-detail {
    margin-left: 30px;
  }

  .submit-wrapper {
    grid-column: span 1;
  }

  .btn-submit {
    width: 100%;
    padding: 14px 20px;
  }

  .file-upload-wrapper {
    flex-wrap: wrap;
  }

  .file-name-display {
    width: 100%;
  }

  .btn-guide, .btn-upload {
    flex-grow: 1;
    text-align: center;
  }

  .form-group {
    min-width: 0 !important;
    width: 100% !important;
  }

}

/* Image Guide Hover Tooltip Styles */
.btn-guide-wrapper {
  position: relative;
  display: inline-block;
}

.guide-tooltip {
  position: absolute;
  bottom: 135%; /* 버튼 위쪽으로 툴팁 띄움 */
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: #ffffff;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
  width: 240px; /* 툴팁 가로 크기 */
  pointer-events: none;
}

.guide-tooltip img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* 말풍선 꼬리표 */
.guide-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
}

/* 마우스 호버 시 둥실 나타나는 애니메이션 */
.btn-guide-wrapper:hover .guide-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* File Chip Element Styles for Multiple Uploads */
.file-chip {
  display: inline-flex;
  align-items: center;
  background-color: #eae5db;
  color: #333333;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.8rem;
  margin-right: 6px;
  margin-bottom: 4px;
  max-width: 180px;
  box-sizing: border-box;
  overflow: hidden;
}

.file-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-grow: 1;
}

.btn-remove-chip {
  background: none;
  border: none;
  color: var(--primary-red);
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  margin-left: 6px;
  line-height: 1;
  padding: 0 2px;
}

.file-name-display {
  display: flex;
  flex-wrap: wrap; /* 칩들이 다음 줄로 흐를 수 있게 허용 */
  align-items: center;
  min-height: 48px; /* 세로 기본 높이 유지 */
  height: auto !important; /* 여러 줄일 경우 세로 크기 유연화 */
  padding: 6px 12px;
}

/* Dynamic Fullscreen Loading Overlay Styles */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(140, 129, 109, 0.12);
  width: 90%;
  max-width: 420px;
  animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spinner-dynamic {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(140, 129, 109, 0.15);
  border-top-color: #8c816d;
  border-right-color: #8c816d;
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.55, 0.085, 0.68, 0.53) infinite;
  margin-bottom: 24px;
}

.loading-text {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.loading-subtext {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 320px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes scaleUp {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Progress Bar Styling */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: #f0ede6;
  border-radius: 4px;
  overflow: hidden;
  margin: 16px 0 8px 0;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #9c917d, #8c816d);
  border-radius: 4px;
  transition: width 0.3s cubic-bezier(0.1, 0.8, 0.25, 1);
}

.progress-percent {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: #8c816d;
  margin-bottom: 20px;
  display: block;
}

/* Serial Verify Button Layout & Styling */
.serial-input-wrapper {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.serial-input-wrapper input {
  flex: 1;
  min-width: 0;
}

.btn-verify {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  background-color: #695e4b; /* 가독성을 위해 강화된 선명한 브라운 */
  color: #ffffff;
  border: none;
  border-radius: var(--border-radius-md);
  padding: 0 24px;
  height: 48px;
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-verify:hover {
  background-color: #544b3c;
  box-shadow: 0 4px 10px rgba(105, 94, 75, 0.2);
}

.btn-verify:active {
  transform: translateY(1px);
}

.btn-verify:disabled {
  background-color: #c4baa7 !important;
  color: #f4efe6 !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

/* Verified input state styling */
input[readonly] {
  background-color: #ece6da !important;
  border-color: #bfae99 !important;
  color: #554d3f !important;
  cursor: not-allowed;
}

/* Panel Input Wrapper Styling */
.panel-input-wrapper {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.panel-input-wrapper input {
  flex: 1;
  min-width: 0;
}

/* Conditional Field CSS style alignment */
.conditional-field {
  grid-column: span 1;
}

/* Inline upload button styling to match 48px height of inputs */
.panel-input-wrapper .btn-upload {
  height: 48px !important;
  border-radius: 20px !important;
  font-size: 0.95rem !important;
  padding: 0 24px !important;
}
