
/* ==========================================
   QuickServiceWeb
   기사 가입 6단계 - Premium UI
   ========================================== */

:root {
    --navy: #10243a;
    --navy-light: #1d3854;
    --orange: #f36b32;
    --orange-hover: #df5720;
    --orange-soft: #fff3ec;
    --background: #f5f7fb;
    --white: #ffffff;
    --text: #172b42;
    --muted: #718096;
    --border: #e2e8f0;
    --success: #16803d;
    --danger: #d92d20;
    --radius: 16px;
    --shadow: 0 12px 45px rgba(16, 36, 58, 0.07);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: "Malgun Gothic", "Apple SD Gothic Neo",
                 Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================
   메인 컨테이너
   ========================================== */

.apply-container {
    width: min(100% - 32px, 720px);
    margin: 48px auto 80px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ==========================================
   상단 헤더
   ========================================== */

.apply-header {
    padding: 34px 42px 30px;
    background: linear-gradient(
        135deg,
        var(--navy) 0%,
        var(--navy-light) 100%
    );
    color: var(--white);
}

.home-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 25px;
    font-size: 13px;
    color: #d1dbe5;
    transition: color 0.2s;
}

.home-link:hover {
    color: var(--white);
}

.apply-header h1 {
    margin: 0 0 8px;
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -1px;
}

.apply-header p {
    margin: 0;
    color: #c7d4e2;
    font-size: 14px;
}

/* ==========================================
   6단계 진행 표시
   ========================================== */

.progress {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    padding: 30px 42px 0;
}

.progress-step {
    height: 7px;
    border-radius: 20px;
    background: #e3e9f0;
    transition: background 0.25s ease;
}

.progress-step.active {
    background: var(--orange);
}

.progress-step.completed {
    background: var(--navy);
}

/* ==========================================
   가입 폼
   ========================================== */

#applyForm {
    padding: 28px 42px 40px;
}

.form-step {
    display: none;
    animation: fadeIn 0.25s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h2 {
    margin: 0 0 5px;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.7px;
}

.description {
    margin: 0 0 30px;
    color: var(--muted);
    font-size: 14px;
}

/* ==========================================
   입력 필드
   ========================================== */

.form-step > label:not(.check-row) {
    display: block;
    margin: 20px 0 8px;
    font-size: 14px;
    font-weight: 700;
}

.form-step > input,
.form-step > select,
.form-step > textarea {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--white);
    color: var(--text);
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.form-step input::placeholder,
.form-step textarea::placeholder {
    color: #a1adba;
}

.form-step > input:focus,
.form-step > select:focus,
.form-step > textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(243, 107, 50, 0.1);
}

.form-step > textarea {
    min-height: 150px;
    resize: vertical;
}

.form-step select {
    cursor: pointer;
}

/* ==========================================
   개인정보 및 약관 동의
   ========================================== */

.agreement {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-top: 30px;
    padding: 22px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 13px;
}

.agreement label,
.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.6;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--orange);
}

.agreement input[type="checkbox"],
.check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 2px 0 0;
}

/* ==========================================
   가입 정보 - 라디오 그룹
   ========================================== */

fieldset {
    margin: 0 0 28px;
    padding: 0;
    border: none;
    min-width: 0;
}

legend {
    display: block;
    width: 100%;
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 800;
}

fieldset > label {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 54px;
    padding: 13px 16px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    transition:
        border-color 0.2s,
        background 0.2s;
}

fieldset > label:hover {
    border-color: var(--orange);
    background: var(--orange-soft);
}

fieldset > label:has(input:checked) {
    border-color: var(--orange);
    background: var(--orange-soft);
}

fieldset > label input[type="radio"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 0;
}

.hint {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

/* ==========================================
   차량 선택 카드
   ========================================== */

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.vehicle-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    padding: 14px 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.2s,
        background 0.2s,
        transform 0.2s;
}

.vehicle-card:hover {
    border-color: var(--orange);
    transform: translateY(-2px);
}

.vehicle-card:has(input:checked) {
    border: 2px solid var(--orange);
    background: var(--orange-soft);
}

.vehicle-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.vehicle-card:has(input:focus-visible) {
    outline: 3px solid rgba(243, 107, 50, 0.35);
    outline-offset: 3px;
}

.vehicle-card span {
    font-size: 14px;
    font-weight: 700;
}

/* ==========================================
   서류 첨부 안내
   ========================================== */

.check-row {
    margin-top: 25px;
    padding: 22px;
    border: 1px solid #cce4d3;
    border-radius: 12px;
    background: #f1faf4;
    color: var(--success);
    cursor: default;
}

.check-row input:disabled {
    opacity: 1;
}

/* ==========================================
   오류 메시지
   ========================================== */

.form-message {
    display: none;
    margin: 22px 0 0;
    padding: 13px 16px;
    border-radius: 10px;
    background: #fff0ee;
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
}

.form-message:not(:empty) {
    display: block;
}

.form-step input[aria-invalid="true"],
.form-step select[aria-invalid="true"],
.form-step textarea[aria-invalid="true"] {
    border-color: var(--danger);
}

/* ==========================================
   이전 / 다음 버튼
   ========================================== */

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 35px;
}

.form-actions button {
    min-height: 54px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    transition:
        background 0.2s,
        transform 0.2s;
}

.form-actions button:active {
    transform: scale(0.98);
}

#prevBtn {
    flex: 1;
    background: #eef2f6;
    color: var(--navy);
}

#prevBtn:hover {
    background: #e1e7ee;
}

#nextBtn {
    flex: 2;
    background: var(--orange);
    color: var(--white);
}

#nextBtn:hover {
    background: var(--orange-hover);
}

.form-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ==========================================
   하단 안내
   ========================================== */

.help-text {
    margin: 22px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* ==========================================
   태블릿
   ========================================== */

@media (max-width: 768px) {
    .apply-container {
        width: min(100% - 24px, 640px);
        margin: 24px auto 50px;
    }

    .apply-header {
        padding: 28px 28px 26px;
    }

    .progress {
        padding: 26px 28px 0;
    }

    #applyForm {
        padding: 26px 28px 35px;
    }
}

/* ==========================================
   모바일
   ========================================== */

@media (max-width: 480px) {
    body {
        background: var(--white);
        font-size: 14px;
    }

    .apply-container {
        width: 100%;
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .apply-header {
        padding: 24px 20px 26px;
    }

    .apply-header h1 {
        font-size: 25px;
    }

    .home-link {
        margin-bottom: 22px;
    }

    .progress {
        gap: 5px;
        padding: 25px 20px 0;
    }

    .progress-step {
        height: 6px;
    }

    #applyForm {
        padding: 25px 20px 40px;
    }

    .form-step h2 {
        font-size: 23px;
    }

    .description {
        margin-bottom: 24px;
    }

    .agreement {
        padding: 18px 15px;
    }

    .vehicle-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .vehicle-card {
        min-height: 94px;
    }

    .form-actions {
        gap: 9px;
    }

    .form-actions button {
        min-height: 52px;
    }
}

/* ==========================================
   접근성 및 모션 설정
   ========================================== */

:focus-visible {
    outline: 3px solid rgba(243, 107, 50, 0.4);
    outline-offset: 2px;
}



/* 주민등록번호 형식 */
.rrn-field {
    margin-top: 20px;
}

.rrn-field > label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
}


/* 주민등록번호 입력란 */
.rrn-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

/* 공통 입력창 */
.rrn-inputs input {
    height: 52px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #ffffff;
    outline: none;
    font-size: 16px;
    box-sizing: border-box;
}

/* 앞자리 6자리 */
.rrn-inputs #rrnFront {
    flex: 1 1 0;
    width: 0;
    text-align: center;
    letter-spacing: 1px;
}

/* 뒷자리 첫 숫자 */
.rrn-inputs #rrnBack {
    flex: 0 0 56px;
    width: 56px;
    padding: 12px 6px;
    text-align: center;
    font-weight: 700;
}

/* 입력창 선택 */
.rrn-inputs input:focus {
    border-color: #f36b32;
    box-shadow: 0 0 0 4px rgba(243, 107, 50, 0.1);
}

/* 비활성화 */
.rrn-inputs input:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
}

/* 하이픈 */
.rrn-dash {
    flex-shrink: 0;
    color: #718096;
    font-size: 18px;
    font-weight: 700;
}

/* 나머지 6자리 표시 */
.rrn-mask {
    flex-shrink: 0;
    color: #94a3b8;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}


.field-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #718096;
}


/* 자택 주소 검색 */

.address-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.address-search input {
    flex: 1;
    min-width: 0;
    background: #f8fafc;
    cursor: pointer;
}

.address-search-btn {
    flex-shrink: 0;
    padding: 13px 18px;
    border: none;
    border-radius: 10px;
    background: #10243a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.address-search-btn:hover {
    background: #f36b32;
}

#address {
    margin-bottom: 10px;
    background: #f8fafc;
}

#addressDetail {
    margin-bottom: 0;
}


/* 신청 접수 성공 메시지 */

.form-message.success {
    background: #eaf8ef;
    color: #167347;
    border: 1px solid #bce5ca;
    border-radius: 10px;
    padding: 15px 16px;
    font-weight: 600;
}

.form-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}


/* ==========================================
   추가 정보 - 기타 은행 / 우편번호 입력창
   ========================================== */

/* 기타 은행 입력 영역 */
#otherBankWrap {
    margin-top: 18px;
    margin-bottom: 20px;
}

#otherBankWrap[hidden] {
    display: none !important;
}

#otherBankWrap label {
    display: block;
    margin-bottom: 10px;
}

/* 기타 은행명 입력창 */
#otherBank {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid #dce3eb;
    border-radius: 12px;
    background: #ffffff;
    color: #10243a;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
}

/* 우편번호 입력 영역 */
.form-step[data-step="3"] .form-group:has(#postcode) {
    margin-top: 22px;
    margin-bottom: 20px;
}

/* 우편번호 라벨 */
.form-step[data-step="3"] label[for="postcode"] {
    display: block;
    margin-bottom: 10px;
}

/* 우편번호 입력창 */
#postcode {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid #dce3eb;
    border-radius: 12px;
    background: #f7f9fc;
    color: #10243a;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    cursor: pointer;
}

/* 입력창 포커스 */
#otherBank:focus,
#postcode:focus {
    outline: none;
    border-color: #f36b32;
    box-shadow: 0 0 0 3px rgba(243, 107, 50, 0.12);
}


/* ==========================================
   기사 가입 신청 완료 화면
   ========================================== */

.apply-complete {
    padding: 55px 20px;
    text-align: center;
    background: #ffffff;
    border-radius: 18px;
}

.complete-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f8ef;
    color: #16a34a;
    font-size: 42px;
    font-weight: 700;
}

.apply-complete h2 {
    margin: 0 0 18px;
    color: #10243a;
    font-size: 24px;
    line-height: 1.5;
}

.apply-complete p {
    margin: 0;
    color: #667085;
    font-size: 15px;
    line-height: 1.8;
}

.receipt-box {
    margin: 30px auto;
    padding: 22px;
    max-width: 360px;
    background: #f3f6fa;
    border-radius: 12px;
}

.receipt-box span {
    display: block;
    margin-bottom: 8px;
    color: #667085;
    font-size: 13px;
}

.receipt-box strong {
    display: block;
    color: #10243a;
    font-size: 28px;
}

.complete-home-btn {
    display: inline-block;
    padding: 15px 35px;
    background: #10243a;
    color: #ffffff;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
}

.complete-home-btn:hover {
    background: #f36b32;
}

.progress[hidden],
.form-actions[hidden] {
    display: none !important;
}

@media (max-width: 600px) {
    .apply-complete {
        padding: 45px 15px;
    }

    .apply-complete h2 {
        font-size: 21px;
    }

    .complete-home-btn {
        width: 100%;
    }
}


@media (max-width: 480px) {
    .address-search-btn {
        padding: 13px 12px;
        font-size: 13px;
    }

    /* 주민등록번호 모바일 정렬 */
    .rrn-inputs {
        gap: 6px;
    }

    .rrn-inputs #rrnFront {
        padding: 12px 8px;
        font-size: 15px;
    }

    .rrn-inputs #rrnBack {
        flex-basis: 48px;
        width: 48px;
        font-size: 15px;
    }

    .rrn-mask {
        font-size: 13px;
        letter-spacing: 0;
    }

    .rrn-dash {
        font-size: 16px;
    }

}


@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ==========================================
   new city 약관 동의 영역
   ========================================== */

.agreement-newcity {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.agreement-newcity .agreement-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.agreement-newcity .agreement-row label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
}

.agreement-newcity .agreement-row input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #f36b32;
}

.agreement-view-btn {
    flex-shrink: 0;
    padding: 8px 11px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #f8fafc;
    color: #344054;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.agreement-view-btn:hover {
    border-color: #f36b32;
    color: #f36b32;
}

@media (max-width: 480px) {
    .agreement-newcity .agreement-row {
        padding: 12px;
        gap: 8px;
    }

    .agreement-newcity .agreement-row label {
        font-size: 12px;
    }

    .agreement-view-btn {
        padding: 8px;
        font-size: 11px;
    }
}


/* ==========================================
   new city 약관 전문 팝업
   ========================================== */

.agreement-modal[hidden] {
    display: none !important;
}

.agreement-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.65);
    box-sizing: border-box;
}

.agreement-modal-open {
    overflow: hidden;
}

.agreement-modal-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 650px;
    max-height: 85vh;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
}

.agreement-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.agreement-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #10243a;
}

.agreement-modal-close {
    border: 0;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
}

.agreement-modal-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 24px;
    font-size: 14px;
    line-height: 1.8;
    color: #344054;
}

.agreement-modal-content h3 {
    font-size: 18px;
    margin: 0 0 20px;
}

.agreement-modal-content h4 {
    font-size: 15px;
    margin: 22px 0 8px;
    color: #10243a;
}

.agreement-modal-content p {
    margin: 0 0 12px;
}

.agreement-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    text-align: right;
}

.agreement-modal-footer button {
    padding: 11px 28px;
    border: 0;
    border-radius: 9px;
    background: #10243a;
    color: #ffffff;
    cursor: pointer;
}

@media (max-width: 600px) {
    .agreement-modal {
        padding: 12px;
    }

    .agreement-modal-box {
        max-height: 90vh;
    }

    .agreement-modal-header,
    .agreement-modal-content,
    .agreement-modal-footer {
        padding: 16px;
    }

    .agreement-modal-header h2 {
        font-size: 17px;
    }
}

/* 가입 도움말 버튼 */
button.help-text.help-open-btn {
    display: block;
    width: fit-content;
    margin: 20px auto 0;
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

button.help-text.help-open-btn:hover {
    color: #f36b32;
    text-decoration: underline;
}

/* 상담 바텀시트 */
.help-sheet[hidden] {
    display: none !important;
}

.help-sheet {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.help-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
}

.help-sheet-panel {
    position: relative;
    width: 100%;
    max-height: 90dvh;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 16px 20px 28px;
    background: #ffffff;
    text-align: center;
    border-radius: 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.08);
}

.help-sheet-handle {
    width: 40px;
    height: 4px;
    margin: 0 auto 24px;
    background: #e5e7eb;
    border-radius: 10px;
}

.help-sheet-panel h3 {
    margin: 0;
    color: #111827;
    font-size: 16px;
    font-weight: 800;
}

.help-sheet-description {
    margin: 10px 0 24px;
    color: #89919e;
    font-size: 13px;
}

.help-sheet-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 720px;
    margin: 0 auto;
}

.help-sheet-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

.help-sheet-phone {
    background: #60a5fa;
    color: #ffffff;
}

.help-sheet-kakao {
    background: #ffe500;
    color: #191919;
}

.help-sheet-close {
    display: block;
    margin: 22px auto 0;
    padding: 8px 24px;
    border: 0;
    background: transparent;
    color: #89919e;
    font-size: 13px;
    cursor: pointer;
}

body.help-sheet-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .help-sheet-panel {
        padding: 16px 16px max(24px, env(safe-area-inset-bottom));
    }

    .help-sheet-actions {
        gap: 10px;
    }

    .help-sheet-actions a {
        font-size: 13px;
    }
}
/* 기사 가입 신청서 - 홈으로 가기 */
.apply-header .home-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    font-size: 17px;
    font-weight: 800;
    line-height: 1.5;

    text-decoration: none;
}

.apply-header .home-link:hover {
    text-decoration: underline;
}
