/* 1. 폰트 및 전역 초기화 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 전역 폰트를 Noto Sans KR로 설정하여 모든 요소의 기본 폰트를 통일합니다. */
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background-color: #f4f7f9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* 2. 메인 컨테이너 */
.container {
    max-width: 480px;
    width: 100%;
    background: #ffffff;
    padding: 40px 35px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

/* 3. 헤더 및 로고 (확대 적용) */
header {
    text-align: center;
    margin-bottom: 30px;
}

header img.main-logo {
    max-width: 240px;
    /* 로고 크기를 시원하게 키웠습니다. */
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

header p {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* 4. 폼 공통 스타일 (상단 입력창 디자인 기준) */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 10px;
}

/* 모든 input 요소의 배경, 테두리, 폰트를 통일합니다. */
.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    background-color: #f8fafc;
    /* 연한 회색 배경 */
    color: #334155;
    transition: all 0.2s ease;
    /* 굵기 처리 제거 */
    font-weight: 400 !important;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
}

/* 5. 시리얼 번호 가로 분할 레이아웃 */
.serial-input-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
}

/* [최종 수정] 시리얼 박스 폰트 및 굵기 통일 */
.serial-box {
    width: 22% !important;
    height: 52px;
    padding: 0 !important;
    text-align: center;
    /* 고정폭 폰트와 굵기 설정을 완전히 제거하여 상단 입력창과 동일하게 만듭니다. */
    font-family: 'Noto Sans KR', sans-serif !important;
    font-weight: 400 !important;
    font-size: 0.95rem !important;
}

.divider {
    font-size: 1.1rem;
    font-weight: 400;
    /* 하이픈 굵기도 조정 */
    color: #cbd5e1;
}

/* 6. 버튼 및 기타 요소 */
.input-with-btn {
    display: flex;
    gap: 10px;
}

.btn-inline {
    min-width: 95px;
    background-color: #334155;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background-color: #5850ec;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
}

.readonly-style {
    background-color: #f1f5f9 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
}

/* 로딩 애니메이션 및 푸터 */
#loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #5850ec;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

footer {
    margin-top: 35px;
    text-align: center;
}

footer p {
    font-size: 0.75rem;
    color: #cbd5e1;
}