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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    min-height: 100vh;
    padding: 20px 10px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* 고객 모드(QR 스캔 진입)는 기존 보라 그라디언트 유지 */
body.customer-mode {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

/* 관리자 모드 PC 레이아웃 - container 확장 */
.container.admin-mode {
    max-width: 1400px;
    width: 95%;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

header h1 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    font-weight: 600;
}

header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.application-form, .result-section {
    padding: 30px 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fafafa;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

/* 모바일 최적화 */
@media (max-width: 480px) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;  /* iOS에서 자동 확대 방지 */
        padding: 15px;    /* 터치 영역 확대 */
        margin-bottom: 8px;
    }

    .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }

    /* 가상 키보드가 표시될 때 페이지 스크롤 개선 */
    .container {
        max-height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 버튼 크기 최적화 */
    button[type="submit"] {
        min-height: 44px;  /* 터치 영역 최소 크기 */
        padding: 12px 24px;
        font-size: 16px;
    }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* ========================================
   커스텀 체크박스 스타일 (개인정보 동의)
   ======================================== */

/* 기본 체크박스 숨기기 */
.form-group input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

/* 체크박스 레이블 컨테이너 */
.form-group label:has(input[type="checkbox"]) {
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    min-height: 24px;
}

/* 커스텀 체크박스 (체크 전) */
.form-group label:has(input[type="checkbox"])::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background-color: white;
    transition: all 0.3s ease;
}

/* 체크마크 (체크 전에는 숨김) */
.form-group label:has(input[type="checkbox"])::after {
    content: '✓';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    font-size: 16px;
    font-weight: bold;
    color: #000000;
    transition: all 0.3s ease;
    opacity: 0;
}

/* 체크박스 호버 효과 */
.form-group label:has(input[type="checkbox"]):hover::before {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* 체크 후 */
.form-group input[type="checkbox"]:checked + label::before,
.form-group label:has(input[type="checkbox"]:checked)::before {
    background-color: white;
    border-color: #4CAF50;
    border-width: 2px;
}

/* 체크마크 표시 (체크 후) */
.form-group input[type="checkbox"]:checked + label::after,
.form-group label:has(input[type="checkbox"]:checked)::after {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

/* 포커스 상태 */
.form-group input[type="checkbox"]:focus + label::before,
.form-group label:has(input[type="checkbox"]:focus)::before {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* 모달 스타일 */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    margin: 20px;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    z-index: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
}

.modal h2 {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    margin: 0;
    padding: 25px 20px;
    border-radius: 15px 15px 0 0;
    font-size: 1.4rem;
}

.email-form {
    padding: 25px 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.form-actions, .result-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.submit-btn, .share-btn, .new-btn, .qr-btn, .download-btn, .close-btn, .sms-btn {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.submit-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.share-btn {
    background: linear-gradient(135deg, #FEE500 0%, #FFCD00 100%);
    color: #3C1E1E;
}

.share-btn:hover {
    background: linear-gradient(135deg, #FFCD00 0%, #FFB300 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 205, 0, 0.3);
}

.new-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
}

.new-btn:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

.sms-btn {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
}

.sms-btn:hover {
    background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

.result-section {
    text-align: center;
    background: #f8f9fa;
}

.result-section h2 {
    color: #4CAF50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

#resultContent {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#resultContent .result-item {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

#resultContent .result-item:last-child {
    border-bottom: none;
}

#resultContent .result-label {
    font-weight: 600;
    color: #555;
    display: inline-block;
    min-width: 100px;
}

#resultContent .result-value {
    color: #333;
}

@media (max-width: 768px) {
    body {
        padding: 10px 5px;
    }
    
    .container {
        border-radius: 10px;
    }
    
    header {
        padding: 25px 15px;
    }
    
    header h1 {
        font-size: 1.6rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .application-form, .result-section {
        padding: 25px 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 14px 12px;
    }
    
    .form-actions, .result-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .submit-btn, .share-btn, .new-btn {
        width: 100%;
        padding: 16px;
        font-size: 16px;
    }
    
    #resultContent .result-label {
        display: block;
        margin-bottom: 4px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.4rem;
    }
    
    .application-form, .result-section {
        padding: 20px 12px;
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

.error-message {
    color: #f44336;
    font-size: 14px;
    margin-top: 5px;
}

.success-message {
    color: #4CAF50;
    font-size: 14px;
    margin-top: 5px;
}

/* QR 코드 관련 스타일 */
.qr-btn {
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    color: white;
}

.qr-btn:hover {
    background: linear-gradient(135deg, #7B1FA2 0%, #4A148C 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.3);
}

.qr-section {
    padding: 30px 20px;
    text-align: center;
    background: #f8f9fa;
    border-top: 2px solid #eee;
}

.qr-section h2 {
    color: #9C27B0;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.qr-section p {
    color: #666;
    margin-bottom: 20px;
}

.qr-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 3px solid #90EE90;
}

.qr-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.download-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
}

.download-btn:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

.close-btn {
    background: linear-gradient(135deg, #757575 0%, #616161 100%);
    color: white;
}

.close-btn:hover {
    background: linear-gradient(135deg, #616161 0%, #424242 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(117, 117, 117, 0.3);
}

/* 메일/폰번호 입력 모달 스타일 */
.email-input-row, .phone-input-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.email-input, .phone-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.email-input:focus, .phone-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.remove-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    min-width: 60px;
}

.remove-btn:hover {
    background: #ff3742;
    transform: scale(1.05);
}

.add-btn {
    background: #2ed573;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: 100%;
}

.add-btn:hover {
    background: #26d0ce;
    transform: scale(1.02);
}

.add-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

/* QR 코드 삭제 버튼 스타일 */
#qrDeleteBtn {
    background: #ff4757;
    border-color: #ff4757;
}

#qrDeleteBtn:hover {
    background: #ff3742;
    border-color: #ff3742;
}

/* 메일/폰번호 입력 모달 특별 스타일 */
#emailInputModal .modal-content,
#phoneInputModal .modal-content {
    max-width: 500px;
}

#emailInputModal .email-form,
#phoneInputModal .email-form {
    padding: 20px 0;
}

#emailInputModal .form-group,
#phoneInputModal .form-group {
    margin-bottom: 20px;
}

#emailInputModal label,
#phoneInputModal label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: block;
}

/* 제목 편집 관련 스타일 */
#mainTitle, #mainSubtitle {
    transition: all 0.3s ease;
}

#mainTitle:hover, #mainSubtitle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 5px 10px;
    margin: -5px -10px;
}

#mainTitle:active, #mainSubtitle:active {
    transform: scale(0.98);
}

/* 제목 편집 입력란 스타일 */
#titleInput, #subtitleInput {
    font-family: inherit;
    text-align: center;
}

#titleInput:focus, #subtitleInput:focus {
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2) !important;
}

/* 편집 버튼 스타일 */
#mainTitle button, #mainSubtitle button {
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#mainTitle button:hover, #mainSubtitle button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 폼 액션 영역 레이아웃 조정 */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

/* 입력 섹션 (메일/폰번호) */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 액션 섹션 (공유/QR 코드 버튼들) */
.action-section {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 입력 그룹 스타일 */
.input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

/* 입력 표시 스타일 */
.input-display {
    display: inline-block;
    padding: 6px 10px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    min-width: 200px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    min-height: 16px;
    line-height: 1.2;
}

.input-display:empty {
    display: none;
}

.input-display.has-content {
    background: #e8f5e8;
    border-color: #4CAF50;
    color: #2e7d32;
    font-weight: 500;
}

/* 버튼 크기 조정 */
.email-btn, .sms-btn {
    width: 140px !important;
    height: 40px !important;
    padding: 0 !important;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    flex-grow: 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 40px;
    box-sizing: border-box;
}

/* 메일 입력 버튼 스타일 */
.email-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.email-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 폰번호 입력 버튼 스타일 */
.sms-btn {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.sms-btn:hover {
    background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

/* 공유 및 QR 코드 버튼 스타일 */
.share-btn, .qr-btn {
    min-width: 140px;
    max-width: 160px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    height: 40px;
}

/* 고객용 신청서 제출 섹션 */
.customer-submit-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
}

.customer-submit-section .submit-btn {
    width: 200px;
    height: 50px;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    margin: 0 auto;
    display: block;
}

.customer-submit-section .submit-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* 전단지 이미지 스타일링 */
.promotion-flyer {
    margin: 20px 0;
    text-align: center;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.flyer-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.flyer-image:first-child {
    margin-top: 0;
}

.flyer-image:last-child {
    margin-bottom: 0;
}

.flyer-image:hover {
    transform: scale(1.02);
}

/* 모바일에서 이미지 최적화 */
@media (max-width: 480px) {
    .promotion-flyer {
        margin: 15px 0;
        padding: 10px;
    }

    .flyer-image {
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

/* 관리자 전용 상단 버튼들 스타일 */
.admin-top-section {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
}

.admin-info-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.admin-info-buttons > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    white-space: nowrap;
}

.info-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.info-display {
    color: #495057;
    font-size: 0.9rem;
    padding: 4px 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    min-width: 120px;
    text-align: center;
}

.info-display.has-content {
    background: #e8f5e8;
    border-color: #4CAF50;
    color: #2e7d32;
}

/* 고객 모드에서 관리자 요소 완전 숨김 */
body.customer-mode .admin-only,
body.customer-mode .admin-top-section,
body.customer-mode .admin-info-buttons,
body.customer-mode .info-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* 모바일에서 관리자 버튼 최적화 */
@media (max-width: 768px) {
    .admin-info-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-info-buttons > div {
        justify-content: space-between;
        width: 100%;
    }

    .info-btn {
        flex: 0 0 auto;
    }

    .info-display {
        flex: 1;
        min-width: auto;
        margin-left: 10px;
    }
}

/* ========================================
   관리자 모드 PC 전용 스타일
   ======================================== */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 관리자 제어판 - 컴팩트 버전 */
.admin-control-panel {
    padding: 25px 30px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: auto;
}

.admin-panel-header {
    text-align: center;
    margin-bottom: 25px;
    animation: fadeInDown 0.6s ease-out;
}

.admin-panel-header h2 {
    font-size: 1.9rem;
    color: white;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 5px;
}

.admin-panel-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
}

/* 메인 콘텐츠 레이아웃 - 3열 그리드로 변경 */
.admin-main-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-section {
    background: white;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeInUp 0.6s ease-out;
}

.admin-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
}

.primary-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
}

.admin-section-right {
    display: contents;
}

.notification-section {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
    border: 2px solid #ffc9c9;
}

.share-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #bae6fd;
}

/* 섹션 헤더 - 컴팩트 버전 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 2px solid transparent;
}

.primary-section .section-header {
    border-bottom-color: #667eea;
}

.notification-section .section-header {
    border-bottom-color: #f093fb;
}

.share-section .section-header {
    border-bottom-color: #4facfe;
}

.section-header h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 700;
    margin: 0;
}

.section-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #4CAF50;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.section-badge.optional {
    background: #64b5f6;
    box-shadow: 0 2px 8px rgba(100, 181, 246, 0.3);
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-btn-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 관리자 버튼 공통 스타일 - 컴팩트 */
.admin-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    background: white;
    color: #2c3e50;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.admin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.3), rgba(255,255,255,0));
    transition: width 0.3s ease;
}

.admin-btn:hover::before {
    width: 100%;
}

.admin-btn:hover {
    transform: translateX(6px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.admin-btn .btn-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.admin-btn:hover .btn-icon {
    transform: scale(1.15) rotate(5deg);
}

.admin-btn .btn-text {
    flex: 1;
    text-align: left;
}

.admin-btn .btn-arrow {
    font-size: 1.3rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.admin-btn:hover .btn-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* 큰 버튼 스타일 */
.admin-btn.large {
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 700;
}

/* 버튼별 호버 색상 */
.admin-btn.info-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.admin-btn.email-btn:hover {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-color: #f093fb;
}

.admin-btn.sms-btn:hover {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-color: #4facfe;
}

.admin-btn.share-btn:hover {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border-color: #43e97b;
}

.admin-btn.qr-btn:hover {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    border-color: #fa709a;
}

.admin-btn.qr-delete-btn:hover {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border-color: #ff6b6b;
}

/* 정보 표시 영역 - 컴팩트 */
.admin-section .info-display {
    padding: 10px 14px;
    background: #f1f3f5;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #666;
    min-height: 38px;
    display: flex;
    align-items: center;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.admin-section .info-display.has-content {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    font-weight: 600;
    border: 2px solid #66bb6a;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

/* 태블릿 반응형 */
@media (max-width: 1024px) {
    .admin-main-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .primary-section {
        grid-row: span 1;
    }
}

/* 모바일 반응형 - 관리자 패널 숨김 */
@media (max-width: 768px) {
    .admin-control-panel {
        display: none !important;
    }

    /* 모바일에서는 기존 레이아웃 유지 */
    .container.admin-mode {
        max-width: 600px;
        width: 100%;
    }
}

/* 고객 모드에서 관리자 패널 숨김 */
body.customer-mode .admin-control-panel,
body.customer-mode .admin-landing {
    display: none !important;
}

/* 고객 모드에서 결과 화면 표시 시 헤더와 폼 숨김 */
body.customer-mode #result:not([style*="display: none"]) ~ * header,
body.customer-mode #result[style*="display: block"] ~ * header {
    display: none !important;
}

/* 결과 화면이 보일 때 신청 폼 완전히 숨김 */
body.customer-mode.result-shown #applicationForm,
body.customer-mode.result-shown header {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* ========================================
   랜딩 페이지 스타일
   ======================================== */

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 관리자 랜딩 페이지 */
.admin-landing {
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 히어로 섹션 */
.hero-section {
    padding: 30px 30px 20px 30px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fadeInDown 0.8s ease-out;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: white;
    margin-bottom: 12px;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 25px;
    font-weight: 400;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 25px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* 기능 섹션 */
.features-section {
    padding: 0px 30px 40px 30px;
    background: #f8f9fa;
}

.section-title-wrapper {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 400;
}

/* 신규 영업 KC 등록 버튼 섹션 */
.new-kc-register-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 5px;
}

.new-kc-register-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.new-kc-register-btn:hover {
    background: linear-gradient(135deg, #ff5252 0%, #dd4960 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.new-kc-register-btn .btn-icon {
    font-size: 1.2rem;
}

.new-kc-register-btn .btn-text {
    font-weight: 700;
}

.new-kc-hint {
    font-size: 0.90rem;
    color: #6c757d;
    font-weight: 600;
}

.new-kc-cancel-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

.new-kc-cancel-btn:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(149, 165, 166, 0.5);
}

.new-kc-cancel-btn .btn-icon {
    font-size: 1.2rem;
}

.new-kc-cancel-btn .btn-text {
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.card-header {
    margin-bottom: 15px;
}

.step-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.card-header h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 700;
    margin: 0;
}

.card-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 18px;
}

.card-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* QR 액션 버튼 컨테이너 */
.qr-action-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
}

/* QR 액션 버튼 스타일 */
.qr-action-buttons .feature-btn {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    font-size: 0.8rem;
}

/* 기능 버튼 스타일 */
.feature-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.feature-btn:hover::before {
    width: 300px;
    height: 300px;
}

.feature-btn .btn-icon {
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.feature-btn .btn-label {
    flex: 1;
    text-align: left;
    position: relative;
    z-index: 1;
}

.feature-btn .btn-arrow {
    font-size: 1.2rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.feature-btn:hover .btn-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* 버튼 색상 */
.feature-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.feature-btn.success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: white;
}

.feature-btn.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.feature-btn.warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.feature-btn.danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.feature-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 상태 표시 */
.status-display {
    padding: 8px 12px;
    background: #f1f3f5;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #6c757d;
    min-height: 35px;
    display: flex;
    align-items: center;
    border: 2px dashed #dee2e6;
    margin-top: 5px;
}

.status-display.has-content {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #28a745;
    font-weight: 600;
}

/* CTA 섹션 */
.cta-section {
    padding: 45px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out;
}

.cta-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
}

.cta-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.cta-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cta-btn.primary {
    background: white;
    color: #667eea;
}

.cta-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.cta-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    animation: pulse 0.6s ease-in-out;
}

.cta-icon {
    font-size: 1.2rem;
}

/* 반응형 */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .hero-section {
        padding: 30px 20px;
    }

    .features-section {
        padding: 30px 20px;
    }

    .cta-section {
        padding: 35px 20px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-btn {
        width: 100%;
        max-width: 400px;
        justify-content: center;
    }
}

/* ========================================
   QR 코드 목록 관리 스타일
   ======================================== */

/* QR 목록 컨테이너 */
.qr-list-container {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.qr-list {
    display: grid;
    gap: 15px;
    margin-top: 10px;
}

/* QR 카드 */
.qr-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    width: 300px;
    max-width: 300px;
}

.qr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.qr-card.inactive {
    opacity: 0.6;
    background: #f1f3f5;
}

/* QR 카드 헤더 */
.qr-card-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.qr-card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.qr-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
}

.qr-status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.qr-status.active {
    background: #d4edda;
    color: #155724;
}

.qr-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.qr-card-info {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #6c757d;
}

/* QR 코드 미리보기 */
.qr-code-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    width: 170px;
    height: 170px;
    margin: 0 auto;
}

.qr-code-preview canvas {
    border: 3px solid #E8E8E8;
    border-radius: 8px;
    padding: 5px;
    background: white;
    width: 150px !important;
    height: 150px !important;
}

/* QR 카드 액션 버튼 */
.qr-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.qr-action-btn {
    flex: 1;
    min-width: 100px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.qr-action-btn.download {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.qr-action-btn.download:hover {
    background: linear-gradient(135deg, #3b9ce8 0%, #00d9e4 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

.qr-action-btn.toggle {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.qr-action-btn.toggle:hover {
    background: linear-gradient(135deg, #e080eb 0%, #e44658 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.4);
}

.qr-action-btn.edit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.qr-action-btn.edit:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63408b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.qr-action-btn.delete {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.qr-action-btn.delete:hover {
    background: linear-gradient(135deg, #ff5252 0%, #dd4960 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* QR 목록 빈 상태 */
.qr-list:empty::after {
    content: '생성된 QR 코드가 없습니다.';
    display: block;
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-size: 0.9rem;
}

/* 반응형 - QR 카드 */
@media (max-width: 768px) {
    .qr-card-actions {
        flex-direction: column;
    }

    .qr-action-btn {
        width: 100%;
    }

    .qr-code-preview canvas {
        width: 120px !important;
        height: 120px !important;
    }
}
/* ========================================
   QR 코드 갤러리 섹션 (웹 맨 아래)
   ======================================== */

/* QR 갤러리 섹션 */
.qr-gallery-section {
    padding: 40px 30px;
    background: linear-gradient(135deg, #e8eaf0 0%, #f0f2f5 100%);
    border-top: 3px solid #e9ecef;
}

.qr-gallery-content {
    max-width: 1400px;
    margin: 0 auto;
}

.qr-gallery-header {
    text-align: center;
    margin-bottom: 30px;
}

.qr-gallery-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 8px;
}

.qr-gallery-subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 400;
}

/* QR 목록 - 세로 배치 */
.qr-list-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

/* QR 카드 세로 배치용 */
.qr-list-horizontal .qr-card {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* QR 갤러리 빈 상태 */
.qr-list-horizontal:empty::after {
    content: '📱 생성된 QR 코드가 없습니다.\n위 "QR 코드 생성" 버튼을 눌러 새 QR을 만들어보세요!';
    display: block;
    text-align: center;
    padding: 60px 30px;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
    white-space: pre-line;
    width: 100%;
}

/* 반응형 - 갤러리 섹션 */
@media (max-width: 1024px) {
    .qr-gallery-section {
        padding: 30px 20px;
    }

    .qr-list-horizontal {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .qr-gallery-section {
        padding: 25px 15px;
    }

    .qr-gallery-title {
        font-size: 1.4rem;
    }

    .qr-list-horizontal {
        grid-template-columns: 1fr;
    }
}
