@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;
}

:root {
    --primary: #2c5282;
    --primary-light: #3a6fa8;
    --primary-dark: #1a365d;
    --accent: #c9963a;
    --accent-light: #f0e6d2;
    --dark-gray: #303030;
    --medium-gray: #a7a9ab;
    --light-gray: #f5f5f5;
    --white: #ffffff;
}

@page {
    size: A4;
    margin: 0;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: #e8e8e8;
    color: var(--dark-gray);
    line-height: 1.5;
    font-size: 13px;
}

/* ===== Tab Navigation ===== */
.tab-container {
    width: 210mm;
    margin: 20px auto 0;
    display: flex;
    gap: 0;
    border-bottom: 3px solid var(--primary);
}

.tab-btn {
    flex: 1;
    padding: 14px 20px;
    background: #e0e0e0;
    border: 1px solid #ccc;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tab-btn:hover {
    background: #d0d0d0;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ===== Page Container ===== */
.page {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

/* Print Styles */
@media print {
    body {
        background: white;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .page {
        margin: 0;
        box-shadow: none;
        width: 100%;
        min-height: 100vh;
    }
    .tab-container,
    .submit-section,
    .signature-modal {
        display: none !important;
    }
    .form-table, .form-table th, .form-table td,
    .bank-table, .bank-table th, .bank-table td,
    .product-table, .product-table th, .product-table td {
        border: 1px solid #ddd !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .form-table th, .bank-table th, .product-table th {
        background: #e8edf4 !important;
    }
}

/* ===== Header ===== */
.header {
    background: var(--white);
    padding: 25px 35px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--primary);
}

.logo-section {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo {
    height: 48px;
    width: auto;
}

.title-section {
    flex: 1;
    text-align: center;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-gray);
    letter-spacing: 4px;
}

.doc-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.doc-info-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
}

.doc-info-label {
    color: #999;
    font-weight: 500;
    min-width: 50px;
}

.doc-info-value {
    border: 1px solid #ddd;
    padding: 2px 8px;
    border-radius: 3px;
    min-width: 80px;
    background: #fafafa;
}

/* ===== Content ===== */
.content {
    padding: 18px 35px;
    padding-bottom: 70px;
}

/* Form Description */
.form-description {
    font-size: 13px;
    color: #555;
    margin-bottom: 18px;
    line-height: 1.7;
}

.form-description p {
    margin-bottom: 6px;
}

/* ===== Section ===== */
.section {
    margin-bottom: 15px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.section-number {
    background: var(--primary);
    color: var(--white);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-gray);
}

/* ===== Form Table ===== */
.form-table {
    width: 100%;
    border-collapse: collapse;
}

.form-table th,
.form-table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
    vertical-align: middle;
    font-size: 13px;
    min-height: 38px;
    height: auto;
}

.form-table th {
    background: linear-gradient(180deg, #edf1f7 0%, #e0e7f0 100%);
    font-weight: 500;
    color: var(--dark-gray);
    white-space: nowrap;
    text-align: center;
}

.form-table td {
    background: var(--white);
}

.form-table input[type="text"],
.form-table input[type="email"] {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    padding: 0;
    text-align: center;
}

/* 주소는 왼쪽 정렬 유지 */
.address-input,
.address-detail-input {
    text-align: left !important;
}

.form-table input:focus {
    background: #fffef0;
    border-radius: 3px;
}

.same-check-cell {
    text-align: center;
    justify-content: center;
    display: table-cell;
    vertical-align: middle;
}

.same-check-cell input[type="checkbox"] {
    accent-color: var(--primary);
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: block;
    margin: 0 auto;
}

/* ===== Phone Input Group ===== */
.phone-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    flex-wrap: nowrap;
    min-width: 0;
}

.phone-input {
    width: 55px;
    min-width: 0;
    flex: 1 1 auto;
    max-width: 60px;
    padding: 2px 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    font-family: inherit;
    text-align: center;
    outline: none;
}

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

.phone-separator {
    color: var(--dark-gray);
    flex-shrink: 0;
}

/* ===== SSN Input Group ===== */
.ssn-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 22px;
}

.ssn-input {
    width: 80px;
    padding: 2px 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    font-family: inherit;
    text-align: center;
    outline: none;
}

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

.ssn-separator {
    color: var(--dark-gray);
}

/* ===== Tooltip ===== */
.tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: #999;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    cursor: help;
}

.tooltip-text {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-gray);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--dark-gray);
}

.tooltip-wrapper:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
}

/* ===== Terms Section ===== */
.terms-section {
    margin-bottom: 3px;
}

.terms-section strong {
    color: var(--dark-gray);
}

.agreement-notice {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
}

/* ===== Product Table ===== */
.product-table {
    width: 100%;
    border-collapse: collapse;
}

.product-table th,
.product-table td {
    border: 1px solid #ddd;
    padding: 6px 12px;
    font-size: 13px;
    vertical-align: middle;
}

.product-table th {
    background: linear-gradient(180deg, #edf1f7 0%, #e0e7f0 100%);
    font-weight: 600;
    text-align: center;
    color: var(--dark-gray);
}

.product-table td {
    background: var(--white);
}

.product-table td.center {
    text-align: center;
}

.product-table input[type="radio"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.product-sub {
    font-size: 12px;
    color: #777;
}

/* Quantity Input */
.quantity-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.quantity-input {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    text-align: center;
    outline: none;
}

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

/* ===== Payment Info ===== */
.payment-info {
    font-size: 11px;
    color: #999;
    margin-left: 10px;
}

/* ===== Bank Table ===== */
.bank-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.bank-table th,
.bank-table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    font-size: 13px;
    vertical-align: middle;
    min-height: 38px;
    height: auto;
}

.bank-table th {
    background: linear-gradient(180deg, #edf1f7 0%, #e0e7f0 100%);
    font-weight: 500;
    width: 100px;
    white-space: nowrap;
    text-align: center;
}

.bank-table .th-sub {
    font-size: 11px;
    font-weight: 400;
    color: #777;
}

.bank-table td {
    background: white;
}

.bank-table input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 13px;
    outline: none;
    padding: 0;
    text-align: center;
}

.bank-table input::placeholder {
    color: #bbb;
    font-size: 12px;
}

.bank-table input:focus {
    background: #fffef0;
    border-radius: 3px;
}

/* Amount Display */
.amount-display {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
}

.amount-field {
    width: 80px;
    text-align: center;
    border: none !important;
    background: transparent !important;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
    font-family: inherit;
}

/* Date Options */
.date-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ===== Checkbox & Radio ===== */
.checkbox-group,
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    white-space: nowrap;
}

.checkbox-item input,
.radio-item input {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

/* Custom Radio/Checkbox for PDF */
.custom-radio,
.custom-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid #999;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    flex-shrink: 0;
}

.custom-checkbox {
    border-radius: 3px;
}

.custom-radio.checked,
.custom-checkbox.checked {
    border-color: var(--primary);
    background: var(--primary);
}

.custom-radio.checked::after {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.custom-checkbox.checked::after {
    content: '\2713';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* ===== Agreement Section ===== */
.agreement-box {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.agreement-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--dark-gray);
}

.agreement-content {
    font-size: 12px;
    color: #555;
    line-height: 1.7;
}

.agreement-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    flex-wrap: nowrap;
}

.agreement-check input {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.agreement-check label {
    font-weight: 500;
    font-size: 12px;
}

/* ===== Signature Section ===== */
.signature-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid var(--primary);
}

.signature-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    margin-top: 20px;
}

.date-line {
    font-size: 13px;
    color: var(--dark-gray);
    white-space: nowrap;
}

.date-input {
    border: none;
    border-bottom: 1px solid var(--dark-gray);
    width: 40px;
    text-align: center;
    font-size: 14px;
    background: transparent;
    display: inline-block;
}

.signature-area {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: nowrap;
}

.signature-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.signature-label {
    font-weight: 500;
    white-space: nowrap;
}

.signature-input {
    border: none;
    border-bottom: 1px solid var(--dark-gray);
    width: 120px;
    text-align: center;
    font-size: 13px;
    background: transparent;
    padding: 5px 0;
}

.signature-box {
    width: 120px;
    height: 50px;
    border: 1px solid var(--dark-gray);
    border-radius: 4px;
    background: #fafafa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.signature-box:hover {
    background: #e8edf4;
    border-color: var(--primary);
}

.signature-box.has-signature {
    background: white;
}

.signature-box img {
    max-width: calc(100% - 4px);
    max-height: calc(100% - 4px);
    margin: 2px;
}

.signature-placeholder {
    color: #999;
    font-size: 11px;
    text-align: center;
}

/* ===== Footer ===== */
.footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-gray);
    color: var(--white);
    padding: 12px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
}

.footer-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
}

.footer-info {
    font-size: 10px;
    color: var(--medium-gray);
    text-align: right;
    font-style: italic;
}

/* ===== Signature Modal ===== */
.signature-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.signature-modal.active {
    display: flex;
}

.signature-modal-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    width: 95%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
}

.signature-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.signature-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-gray);
}

.signature-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.signature-canvas-container {
    border: 2px solid var(--primary);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    touch-action: none;
}

#signatureCanvas {
    width: 100%;
    height: 200px;
    display: block;
    background: white;
    touch-action: none;
}

.signature-modal-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear {
    background: #f0f0f0;
    color: #666;
}

.btn-clear:hover {
    background: #e0e0e0;
}

.btn-confirm {
    background: var(--primary);
    color: white;
}

.btn-confirm:hover {
    background: var(--primary-dark);
}

/* ===== Submit Section ===== */
.submit-section {
    background: var(--white);
    padding: 20px 35px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: center;
    gap: 15px;
    position: sticky;
    bottom: 0;
}

.btn-submit {
    padding: 15px 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.4);
}

/* ===== Toast Message ===== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-gray);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background: var(--primary);
}

.toast.error {
    background: #e74c3c;
}

/* ===== Loading ===== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 15px;
    font-size: 14px;
    color: var(--dark-gray);
}

/* ===== Complete Page ===== */
.complete-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8edf4 0%, #d0dbe8 100%);
    z-index: 4000;
    align-items: center;
    justify-content: center;
}

.complete-page.active {
    display: flex;
}

.complete-content {
    text-align: center;
    padding: 40px;
}

.complete-icon {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 40px;
    color: white;
}

.complete-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 40px;
}

.complete-btn {
    padding: 15px 40px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.complete-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.4);
}

/* ===== Address Search Layer ===== */
.postcode-layer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2500;
    align-items: center;
    justify-content: center;
}

.postcode-layer.active {
    display: flex;
}

.postcode-layer-content {
    width: 95%;
    max-width: 500px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.postcode-layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 15px;
}

.postcode-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

#postcodeEmbed {
    width: 100%;
    height: 450px;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        background: var(--white);
    }

    /* 탭 */
    .tab-container {
        width: 100%;
        margin: 0;
        border-bottom-width: 2px;
    }

    .tab-btn {
        padding: 12px 10px;
        font-size: 13px;
        border-radius: 0;
    }

    /* 페이지 */
    .page {
        width: 100%;
        min-height: auto;
        margin: 0;
        box-shadow: none;
    }

    /* 헤더 */
    .header {
        padding: 12px 15px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
    }

    .header-logo {
        height: 40px;
    }

    .page-title {
        font-size: 15px;
        letter-spacing: 2px;
    }

    .doc-info {
        display: none;
    }

    /* 컨텐츠 */
    .content {
        padding: 15px;
        padding-bottom: 80px;
    }

    .section {
        margin-bottom: 20px;
    }

    /* 테이블 - 모바일 2열 구조 */
    .form-table,
    .form-table tbody {
        display: block;
        width: 100%;
        border: 1px solid #ddd;
    }

    .form-table tr {
        display: flex;
        flex-wrap: wrap;
        border-bottom: none;
    }

    .form-table th,
    .form-table td {
        display: flex;
        align-items: center;
        box-sizing: border-box;
        border: none;
        border-bottom: 1px solid #ddd;
        padding: 12px;
        font-size: 13px;
        min-height: 48px;
    }

    .form-table th {
        width: 30%;
        min-width: auto;
        background: linear-gradient(180deg, #edf1f7 0%, #e0e7f0 100%);
        border-right: 1px solid #ddd;
        justify-content: center;
    }

    .form-table td {
        width: 70%;
    }

    .form-table td[colspan="2"],
    .form-table td[colspan="3"],
    .form-table td[colspan="5"] {
        width: 70%;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    /* 6열 테이블 모바일 대응 */
    .form-table-6col,
    .form-table-6col tbody {
        display: block;
        width: 100%;
        border: 1px solid #ddd;
    }

    .form-table-6col tr {
        display: flex;
        flex-wrap: wrap;
    }

    .form-table-6col th,
    .form-table-6col td {
        width: 70%;
    }

    .form-table-6col th {
        width: 30%;
    }

    .same-check-cell {
        width: 70% !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .form-table input[type="text"] {
        font-size: 16px;
    }

    /* 상품 테이블 */
    .product-table,
    .product-table thead,
    .product-table tbody,
    .product-table tr {
        display: block;
        width: 100%;
    }

    .product-table thead tr {
        display: none;
    }

    .product-table tbody tr {
        display: flex;
        align-items: center;
        border: 1px solid #ddd;
        border-bottom: none;
        padding: 12px;
        gap: 10px;
    }

    .product-table tbody tr:last-child {
        border-bottom: 1px solid #ddd;
    }

    .product-table td {
        border: none !important;
        padding: 0 !important;
    }

    .product-table td:first-child {
        flex-shrink: 0;
    }

    .product-table td:nth-child(2) {
        flex: 1;
    }

    .product-table td:last-child {
        flex-shrink: 0;
        font-weight: 600;
        color: var(--primary-dark);
    }

    /* 은행 테이블 - 모바일 2열 구조 */
    .bank-table,
    .bank-table tbody {
        display: block;
        width: 100%;
        border: 1px solid #ddd;
    }

    .bank-table tr {
        display: flex;
        flex-wrap: wrap;
        border-bottom: none;
    }

    .bank-table th,
    .bank-table td {
        display: flex;
        align-items: center;
        box-sizing: border-box;
        border: none;
        border-bottom: 1px solid #ddd;
        padding: 12px;
        font-size: 13px;
        min-height: 48px;
    }

    .bank-table th {
        width: 30% !important;
        min-width: auto;
        background: linear-gradient(180deg, #edf1f7 0%, #e0e7f0 100%);
        border-right: 1px solid #ddd;
        justify-content: center;
    }

    .bank-table td {
        width: 70% !important;
    }

    .bank-table td[colspan="3"] {
        width: 70% !important;
    }

    .bank-table input {
        font-size: 16px;
    }

    /* 연락처 */
    .phone-input-group {
        height: 24px;
        gap: 3px;
    }

    .phone-input {
        width: 48px;
        padding: 2px 4px;
        font-size: 13px;
        height: 24px;
    }

    /* 주민등록번호 */
    .ssn-input-group {
        height: 24px;
        gap: 3px;
    }

    .ssn-input {
        width: 65px;
        padding: 2px 4px;
        font-size: 13px;
        height: 24px;
    }

    /* 툴팁 */
    .tooltip-icon {
        width: 12px;
        height: 12px;
        font-size: 9px;
    }

    .tooltip-text {
        font-size: 10px;
        padding: 5px 8px;
    }

    /* 동의 */
    .agreement-check {
        flex-wrap: wrap;
    }

    .agreement-notice {
        white-space: normal;
        width: 100%;
        margin-top: 5px;
    }

    /* 주소 */
    .address-wrapper {
        flex-direction: column;
    }

    .address-detail-input {
        width: 100%;
        min-width: auto;
        padding: 8px;
        font-size: 16px;
    }

    /* 날짜 옵션 */
    .date-options {
        gap: 10px;
    }

    /* 동의사항 */
    .agreement-box {
        padding: 10px;
    }

    .agreement-content {
        font-size: 11px;
    }

    .agreement-check label {
        font-size: 11px;
    }

    /* 서명 */
    .signature-line {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .date-line {
        font-size: 12px;
    }

    .signature-area {
        gap: 15px;
    }

    .signature-row {
        font-size: 12px;
    }

    .signature-input {
        width: 100px;
        font-size: 12px;
    }

    .signature-box {
        width: 100px;
        height: 45px;
    }

    /* 제출 */
    .submit-section {
        padding: 15px;
    }

    .btn-submit {
        width: 100%;
        padding: 16px;
        font-size: 16px;
    }

    /* 푸터 */
    .footer {
        position: relative;
        padding: 12px 15px;
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .footer-info {
        text-align: center;
    }

    /* 주소 검색 */
    .postcode-layer-content {
        width: 100%;
        max-width: none;
        height: 100%;
        border-radius: 0;
    }

    #postcodeEmbed {
        height: calc(100% - 48px);
    }

    /* 수량 입력 */
    .quantity-input {
        font-size: 16px;
    }
}

/* 더 작은 화면 */
@media (max-width: 375px) {
    .header {
        padding: 10px 12px;
    }

    .header-logo {
        height: 35px;
    }

    .page-title {
        font-size: 13px;
        letter-spacing: 1px;
    }

    .content {
        padding: 12px;
        padding-bottom: 80px;
    }

    .form-table th,
    .form-table td {
        padding: 6px 8px;
        font-size: 11px;
    }

    .phone-input {
        width: 45px;
    }

    .form-table th {
        width: 35%;
    }

    .form-table td {
        width: 65%;
    }

    .bank-table th {
        width: 35% !important;
    }

    .bank-table td {
        width: 65% !important;
    }

    .tab-btn {
        font-size: 12px;
        padding: 10px 8px;
    }
}

/* ===== Address Input ===== */
.address-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.address-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    padding: 0;
    cursor: pointer;
}

.address-input:read-only {
    background: transparent;
}

.address-input::placeholder {
    color: #bbb;
    font-size: 12px;
}

.address-detail-input {
    flex: 1;
    min-width: 150px;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.address-detail-input:focus {
    border-color: var(--primary);
}

.address-detail-input::placeholder {
    color: #bbb;
    font-size: 12px;
}
