/* 공통 리셋 및 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 키보드 처리를 위한 기본 설정 */
html {
    height: 100%;
    overflow: hidden; /* 전체 페이지 스크롤 방지 */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 앱 컨테이너 */
#app-container {
    max-width: 400px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    position: relative;
}

/* 헤더 스타일 - 웹뷰에서 항상 표시 */
#app-header {
    display: block; /* 기본적으로 항상 표시 */
    background: #f6f6f6;
    border-bottom: #d6d6d6 solid 1px;
    color: #333;
    padding: 12px 60px; /* 뒤로가기 버튼 공간 확보 */
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    /* 뒤로가기 버튼을 위한 상대적 위치 설정 */
    position: relative;
    min-height: 44px; /* 최소 높이 보장 */
}

#header-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-align: center;
    line-height1: 1.2;
}

.hidden{  display: none !important }
.no-show{  display: none !important }

/* 뒤로가기 버튼 - 웹뷰 최적화 */
.back-button {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: #007AFF; /* 더 명확한 파란색 */
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    display: none; /* 기본 숨김, 필요시 표시 */
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    /* 웹뷰에서 터치하기 쉽도록 */
    min-width: 44px;
    min-height: 44px;
}

.back-button:hover {
    background: rgba(0, 122, 255, 0.1);
    transform: translateY(-50%) scale(1.05);
}

.back-button:active {
    background: rgba(0, 122, 255, 0.2);
    transform: translateY(-50%) scale(0.95);
}

.back-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    color: #999;
}

.back-button:disabled:hover {
    background: none;
    transform: translateY(-50%) scale(1);
}

/* 뒤로가기 버튼 표시 상태 */
.back-button.visible {
    display: flex;
}

/* 웹뷰에서 헤더 상태별 클래스 */
.app-header-home {
    /* 홈에서는 뒤로가기 버튼 공간 불필요 */
    padding: 12px 20px;
}

.app-header-with-back {
    /* 뒤로가기 버튼이 있을 때 */
    padding: 12px 60px;
}

.no-show {
  display: none;
}

/* 웹뷰에서 터치 최적화 */
.webview-mode1 {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.webview-mode1 input,
.webview-mode1 textarea {
    -webkit-user-select: text;
    user-select: text;
}

/* 하이라이트 효과 - 웹뷰 최적화 */
.highlighted {
    animation: webview-highlight 2s ease-in-out;
}

@keyframes1 webview-highlight {
    0% { background-color: transparent; }
    20% { background-color: rgba(0, 122, 255, 0.15); }
    80% { background-color: rgba(0, 122, 255, 0.15); }
    100% { background-color: transparent; }
}

/* 단계별 강조 효과 */
.step-highlight {
    border: 2px solid #007AFF !important;
    box-shadow: 0 0 12px rgba(0, 122, 255, 0.3);
    background: rgba(0, 122, 255, 0.05);
    transition: all 0.3s ease;
}

/* 웹뷰 전용 애니메이션 효과 */
.back-button-slide-in {
    animation: slideInFromLeft 0.3s ease-out;
}

.back-button-slide-out {
    animation: slideOutToLeft 0.3s ease-in;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

@keyframes slideOutToLeft {
    from {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
    to {
        opacity: 0;
        transform: translateY(-50%) translateX(-30px);
    }
}

/* 하단 네비게이션 - 웹뷰에서 조건부 표시 */
#bottom-nav {
    position: fixed;
    display: none; /* 웹뷰에서는 기본 숨김 */
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 400px;
    height: 70px;
    background: white;
    border-top: 1px solid #e9ecef;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
    z-index: 100;
    transition: all 0.3s ease;
}

/* PC 환경에서만 하단 네비게이션 표시 */
.app-container.pc-mode #bottom-nav {
    display: flex;
}

/* 웹뷰 모드에서 하단 네비게이션 숨김 */
.app-container.webview-mode #bottom-nav {
    display: none !important;
}

/* 메인 콘텐츠 영역 키보드 대응 */
#content-area {
    flex: 1;
    padding: 20px;
    padding-bottom1: 90px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    position: relative;
}

/* 키보드 열림 감지를 위한 클래스 */
body.keyboard-open #content-area {
    /* 키보드가 열렸을 때 추가 여백 */
    padding-bottom: 40px;
}

body.keyboard-open #app-container {
    /* 키보드 열림 시 컨테이너 높이 조정 */
    height: 100vh;
}

/* content 더미 요소 */
#content-dummy {
  height: 60px;
  background : transparent;
  display: block;
  width: 100%;
}

/* 키보드 더미 요소 */
#keyboard-dummy {
    display: block;
    width: 100%;
}

/* Android 네이티브 모드에서 하단 패딩 조절 */
#app-container.native-mode #content-area {
    padding-bottom: 20px;
}

/* 하단 네비게이션 */
#bottom-nav {
    position: fixed;
    display:none;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 400px;
    height: 70px;
    background: white;
    border-top: 1px solid #e9ecef;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
    z-index: 100;
    transition: all 0.3s ease;
}

/* 네이티브 모드에서 하단 네비게이션 숨김 */
#bottom-nav.native-hidden {
    display: none !important;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    padding: 8px 4px;
    position: relative;
}

.nav-item:hover {
    background: #f8f9fa;
}

.nav-item.active {
    color: #007AFF;
    background: #F0F8FF;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #007AFF;
    border-radius: 0 0 3px 3px;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform 0.2s ease;
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.nav-text {
    font-size: 10px;
    font-weight: 500;
}

/* 폼 요소 공통 스타일 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 10px;
    border: 1px solid #799af3;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}

.form-input:invalid {
    border-color: #799af3;
}

.form-input::placeholder {
    color: #999;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* 버튼 공통 스타일 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
    min-height: 48px;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:not(:disabled):active {
    transform: translateY(0);
}

/* 버튼 종류별 스타일 */
.btn-primary {
    background: #3a84ff;
    color: white;
    box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #dee2e6;
}

.btn-success {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #FF3838 0%, #C62828 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255,56,56,0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid #007AFF;
    color: #007AFF;
}

.btn-outline:hover {
    background: #007AFF;
    color: white;
}

/* 전체 너비 버튼 */
.btn-full {
    width: 100%;
}

/* 작은 버튼 */
.btn-sm {
    padding: 10px 10px;
    font-size: 16px;
    min-height: 40px;
}

/* 큰 버튼 */
.btn-lg {
    padding: 18px 24px;
    font-size: 18px;
    min-height: 56px;
}

/* 유틸리티 클래스 */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.p-10 { padding: 10px; }
.p-20 { padding: 20px; }

/* 로딩 스피너 */
#loading-spinner1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    margin-top: 10px;
    font-size: 14px;
}

/* 토스트 메시지 */
#toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    max-width: 350px;
    width: 90%;
}

.toast {
    background: rgba(0,0,0,0.8);
    color: black;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    animation: slideDown 0.3s ease-out;
    font-size: 14px;
    text-align: center;
}

.toast.success {
    background1: rgba(76,175,80,0.9);
    background: rgb(255 244 160);
    border: solid 1px #a9a9ec;
}

.toast.error {
    background: rgba(255,56,56,0.9);
}

.toast.warning {
    background: rgba(255,193,7,0.9);
    color: #333;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 카드 스타일 */
.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #f0f0f0;
    margin-bottom: 16px;
}

.card-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.card-body {
    font-size: 14px;
    line-height: 1.6;
}

/* 입력 그룹 */
.input-group {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.input-group .form-input {
    flex: 1;
}

.input-group .btn {
    flex-shrink: 0;
    min-height: 48px;
}

/* 체크박스 및 라디오 스타일 */
.checkbox-group, .radio-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.checkbox-group label,
.radio-group label {
    margin: 0;
    font-size: 14px;
    cursor: pointer;
}

/* 선택 옵션 그룹 */
.option-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.option-item {
    flex: 1;
    text-align: center;
    padding: 16px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.option-item:hover {
    border-color: #007AFF;
    background: #F0F8FF;
}

.option-item.selected {
    border-color: #007AFF;
    background: #F0F8FF;
    color: #007AFF;
}

.option-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.option-text {
    font-size: 12px;
    font-weight: 500;
}

/* 알림 박스 */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    border-left: 4px solid;
}

.alert-info {
    background: #E3F2FD;
    border-left-color: #2196F3;
    color: #1565C0;
}

.alert-success {
    background: #E8F5E8;
    border-left-color: #4CAF50;
    color: #2E7D32;
}

.alert-warning {
    background: #FFF3CD;
    border-left-color: #FFC107;
    color: #F57C00;
}

.alert-error {
    background: #FFEBEE;
    border-left-color: #F44336;
    color: #C62828;
}

/* 탭 스타일 */
.tabs {
    display: flex;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #666;
}

.tab.active {
    background: white;
    color: #007AFF;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.page-btn:hover {
    background: #f8f9fa;
    border-color: #007AFF;
}

.page-btn.active {
    background: #007AFF;
    color: white;
    border-color: #007AFF;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 링크 스타일 */
.text-link-m {
    color: #007AFF;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.text-link-m:hover {
    text-decoration: underline;
}

/* 메뉴 콘텐츠 컨테이너 */
.menu-content1 {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Android 연동을 위한 추가 스타일 */
.native-integration {
    position: relative;
}

.native-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.native-message {
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 14px;
    color: #666;
}



/* 반응형 디자인 */
@media (max-width: 480px) {
    #app-container {
        max-width: 100%;
        height: 100vh;
    }

    #app-header {
         padding: 10px 50px;
         min-height: 50px;
     }

     #header-title {
         font-size: 18px;
     }

     .back-button {
       display: none;
         left: 12px;
         width: 36px;
         height: 36px;
         min-width: 40px;
         min-height: 40px;
         font-size: 18px;
     }

     .app-header-home {
         padding: 10px 16px;
     }

     .app-header-with-back {
         padding: 10px 50px;
     }

    #content-area {
      background: #ffffff;
      padding: 10px;
    }

    .option-group {
        flex-direction: row;
        gap: 8px;
    }

    .btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    /* 작은 버튼 */
    .btn-sm {
        padding: 10px 10px;
        font-size: 15px;
        min-height: 40px;
    }

    .input-group {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .input-group .btn {
        min-height: 40px;
    }

    /* 주문화면 추가 */
    .item-selection {
      flex-direction: column;
      gap: 8px;
    }

    .item-option {
        padding: 16px 12px;
    }

    .item-icon {
        font-size: 24px;
    }

    .inline-inputs {
        flex-direction: column;
        gap: 8px;
    }

    .search-bar {
        flex-direction: row;
        align-items: stretch;
    }

    .filter-tabs {
        gap: 6px;
    }

    .filter-tab {
        font-size: 13px;
        padding: 6px 12px;
    }

    .summary-item {
        flex-direction: column;
        gap: 8px;
    }

    .summary-label {
        width: auto;
        margin-right: 0;
        margin-bottom: 4px;
    }

    .address-group {
        padding: 16px;
    }

    .date-separator {
        padding: 8px 0;
        justify-content: center;
    }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #0066CC;
        border: 2px solid #004499;
    }

    .nav-item.active {
        background: #E6F3FF;
        border: 1px solid #0066CC;
    }
}

/* 다크모드 지원 (향후 확장) */
@media (prefers-color-scheme: dark1) {
    body {
        background: #000000;
        color: #ffffff;
        background1: #ffffff;
        color1: #000000;
    }

    #app-container {
        background: #1c1c1e;
        box-shadow: 0 0 20px rgba(255,255,255,0.1);
    }

    #app-header {
        background: linear-gradient(135deg, #0A84FF 0%, #0056CC 100%);
    }

    #bottom-nav {
        background: #1c1c1e;
        border-top-color: #3a3a3c;
    }

    .nav-item {
        color: #999;
    }

    .nav-item.active {
        color: #0A84FF;
        background: rgba(10,132,255,0.1);
    }

    .form-input {
        background: #2c2c2e;
        border-color: #3a3a3c;
        color: #ffffff;
    }

    .card {
        background: #2c2c2e;
        border-color: #3a3a3c;
    }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* 입력 필드 키보드 대응 개선 */
.form-input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
    /* 키보드 열림 시 자동 스크롤을 위한 여백 확보 */
    scroll-margin-top: 80px;
    scroll-margin-bottom: 80px;
}

/* 키보드 열림 상태에서의 폼 조정 */
body.keyboard-open .form-group {
    margin-bottom: 16px; /* 간격을 줄여서 더 많은 요소가 보이도록 */
}

body.keyboard-open .login-header {
    margin-bottom: 20px; /* 헤더 여백 축소 */
}

body.keyboard-open .login-header h2 {
    font-size: 20px; /* 제목 크기 축소 */
}

/* 주문하기 추가 */
/* 페이지네이션 스타일 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    min-width: 36px;
    text-align: center;
}

.page-btn:hover:not(.active):not(:disabled) {
    background: #f8f9fa;
    border-color: #007AFF;
}

.page-btn.active {
    background: #007AFF;
    color: white;
    border-color: #007AFF;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

/* 날짜 구분자 */
.date-separator {
    color: #666;
    font-weight: 500;
    padding: 0 0px;
    display: flex;
    align-items: center;
}

/* 인라인 입력 그룹 */
.inline-inputs {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.inline-inputs .form-input {
    flex: 1;
    min-width: 0;
}

/* 요약 섹션 */
.summary-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.summary-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.summary-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.summary-label {
    width: 100px;
    flex-shrink: 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    margin-right: 12px;
}

.summary-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* 편집 버튼 */
.edit-btn {
    background: #f0f0f0;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
    color: #666;
    transition: all 0.2s ease;
}

.edit-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* 최종 가격 표시 */
.final-price {
    background: transparent;
    color: black;
    padding1: 16px 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;

}

/* 상태 태그 */
.status-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

/* 상태별 색상 */
.status-tag.waiting {
    background: #fff3cd;
    color: #856404;
}

.status-tag.accepted {
    background: #d4edda;
    color: #155724;
}

.status-tag.pickup {
    background: #cce5ff;
    color: #004085;
}

.status-tag.delivering {
    background: #e2e3ff;
    color: #3d348b;
}

.status-tag.completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-tag.canceled {
    background: #f8d7da;
    color: #721c24;
}

.status-tag.paid {
    background: #e8f5e8;
    color: #4CAF50;
}

.status-tag.unpaid {
    background: #fff3cd;
    color: #856404;
}

/* 빈 상태 표시 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
    display: block;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* 로딩 애니메이션 */
.loading-text::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* 컴팩트 폼 그룹 */
.form-group.compact {
    margin-bottom: 12px;
}

/* 텍스트에리어 추가 스타일 */
.form-textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

/* 검색 바 */
.search-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.search-bar .form-input {
    flex: 1;
    min-width: 0;
}

/* 필터 섹션 */
.filter-section {
    margin-top: 12px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 16px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    white-space: nowrap;
}

.filter-tab.active {
    background: #007AFF;
    color: white;
    border-color: #007AFF;
}

.filter-tab:hover:not(.active) {
    background: #f0f0f0;
    border-color: #007AFF;
}

/* 아이템 선택 그리드 */
.item-selection {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.item-option {
    flex: 1;
    text-align: center;
    padding: 20px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.item-option:hover {
    border-color: #007AFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,122,255,0.15);
}

.item-option.selected {
    border-color: #007AFF;
    background: #F0F8FF;
    color: #007AFF;
}

.item-icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}

.item-name {
    font-size: 14px;
    font-weight: 500;
}

/* 주소 그룹 */
.address-group {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}


.address-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.address-title::before {
    content: '📍';
    margin-right: 8px;
}

.departure .address-title::before {
    content: '🚀';
}

.arrival .address-title::before {
    content: '🎯';
}


/* 컴팩트 인라인 입력 */
.compact-inline-inputs {
    display: flex;
    gap: 8px;
}

.compact-input {
    flex: 1;
    text-align: center;
    font-size: 14px;
    padding: 12px 8px;
}

/* 컴팩트 물품 선택 */
.compact-item-selection {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.compact-item-option {
    flex: 1;
    text-align: center;
    padding: 16px 8px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.compact-item-option:hover {
    border-color: #007AFF;
    transform: translateY(-2px);
}

.compact-item-option.selected {
    border-color: #007AFF;
    background: #F0F8FF;
    color: #007AFF;
}

.compact-item-option .item-icon {
    font-size: 24px;
    margin-bottom: 6px;
    display: block;
}

.compact-item-option .item-name {
    font-size: 12px;
    font-weight: 500;
}

/* 컴팩트 결제 방법 */
.compact-payment-options {
    display: flex;
    gap: 8px;
}

.compact-payment-option {
    flex: 1;
    text-align: center;
    padding: 16px 8px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.compact-payment-option:hover {
    border-color: #007AFF;
    transform: translateY(-2px);
}

.compact-payment-option.selected {
    border-color: #007AFF;
    background: #F0F8FF;
    color: #007AFF;
}

.compact-payment-option .option-icon {
    font-size: 24px;
    margin-bottom: 6px;
    display: block;
}

.compact-payment-option .option-text {
    font-size: 12px;
    font-weight: 500;
}

/* 기존 공통 스타일들 */

/* 페이지네이션 스타일 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    min-width: 36px;
    text-align: center;
}

.page-btn:hover:not(.active):not(:disabled) {
    background: #f8f9fa;
    border-color: #007AFF;
}

.page-btn.active {
    background: #007AFF;
    color: white;
    border-color: #007AFF;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

/* 날짜 구분자 */
.date-separator {
    color: #666;
    font-weight: 500;
    padding: 0 8px;
    display: flex;
    align-items: center;
}

/* 인라인 입력 그룹 */
.inline-inputs {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.inline-inputs .form-input {
    flex: 1;
    min-width: 0;
}

/* 요약 섹션 */
.summary-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.summary-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.summary-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.summary-label {
    width: 100px;
    flex-shrink: 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    margin-right: 12px;
}

.summary-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* 편집 버튼 */
.edit-btn {
    background: #f0f0f0;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
    color: #666;
    transition: all 0.2s ease;
}

.edit-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* 최종 가격 표시 */
.final-price1 {
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    color: black;
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}

/* 상태 태그 */
.status-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

/* 상태별 색상 */
.status-tag.waiting {
    background: #fff3cd;
    color: #856404;
}

.status-tag.accepted {
    background: #d4edda;
    color: #155724;
}

.status-tag.pickup {
    background: #cce5ff;
    color: #004085;
}

.status-tag.delivering {
    background: #e2e3ff;
    color: #3d348b;
}

.status-tag.completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-tag.canceled {
    background: #f8d7da;
    color: #721c24;
}

.status-tag.paid {
    background: #e8f5e8;
    color: #4CAF50;
}

.status-tag.unpaid {
    background: #fff3cd;
    color: #856404;
}

/* 빈 상태 표시 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
    display: block;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* 로딩 애니메이션 */
.loading-text::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* 컴팩트 폼 그룹 */
.form-group.compact {
    margin-bottom: 12px;
}

/* 텍스트에리어 추가 스타일 */
.form-textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

/* 검색 바 */
.search-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.search-bar .form-input {
    flex: 1;
    min-width: 0;
}

/* 필터 섹션 */
.filter-section {
    margin-top: 12px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 16px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    white-space: nowrap;
}

.filter-tab.active {
    background: #007AFF;
    color: white;
    border-color: #007AFF;
}

.filter-tab:hover:not(.active) {
    background: #f0f0f0;
    border-color: #007AFF;
}

/* 아이템 선택 그리드 */
.item-selection {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.item-option {
    flex: 1;
    text-align: center;
    padding: 20px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.item-option:hover {
    border-color: #007AFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,122,255,0.15);
}

.item-option.selected {
    border-color: #007AFF;
    background: #F0F8FF;
    color: #007AFF;
}

.item-icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}

.item-name {
    font-size: 14px;
    font-weight: 500;
}

/* 주소 그룹 */
.address-group {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}


.address-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.address-title::before {
    content: '📍';
    margin-right: 8px;
}

.departure .address-title::before {
    content: '🚀';
}

.arrival .address-title::before {
    content: '🎯';
}

/* 반응형 개선 */
@media (max-width: 480px) {
    .item-selection {
        flex-direction: column;
        gap: 8px;
    }

    .item-option {
        padding: 16px 12px;
    }

    .item-icon {
        font-size: 24px;
    }

    .inline-inputs {
        flex-direction: column;
        gap: 8px;
    }

    .search-bar {
        flex-direction: row;
        align-items: stretch;
    }

    .search-bar .form-input {
        width: 100%;
    }

    .date-separator {
        align-self: center;
    }


    .filter-tabs {
        gap: 6px;
    }

    .filter-tab {
        font-size: 13px;
        padding: 6px 12px;
    }

    .summary-item {
        flex-direction: column;
        gap: 8px;
    }

    .summary-label {
        width: auto;
        margin-right: 0;
        margin-bottom: 4px;
    }

    .address-group {
        padding: 16px;
    }

    .date-separator {
        padding: 8px 0;
        justify-content: center;
    }
}

/* 설정 리스트 */
.settings-list {
    padding1: 20px;
}

/* 설정 아이템 */
.settings-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 16px;
    color: #333;
}

.settings-item:hover {
    background: #f8f9fa;
}

.settings-item:last-child {
    border-bottom: none;
}

/* 로그아웃 아이템 (빨간색 스타일 등 커스터마이징 가능) */
.settings-item.logout {
    color: #FF3838;
}

/* 모달 스타일 */
/* 모달 공통 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index1: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity1: 0;
    transition: opacity 0.3s ease;
    pointer-events1: none;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}

/* 확실한 중앙 배치를 위한 alternative 방식 */
.modal-overlay.centered {
    display: block;
}

.modal-overlay.centered .modal-content {
    position: fixed;
    top: 50px;
    left: 5px;
    transform1: translate(-50%, -50%);
}

.modal-content {

    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

/* centered 방식일 때의 애니메이션 */
.modal-overlay.centered.show .modal-content {
    transform1: translate(-50%, -50%) scale(1);
}

.modal-overlay.centered .modal-content {
    transform1: translate(-50%, -50%) scale(0.95);
    transition1: transform 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f0f0f0;
}

.modal-body {
    padding: 10px 20px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.modal-footer .btn {
    flex: 1;
}

/* 반응형 */
@media (max-width: 480px) {

    .modal-content {
        width: 95%;
        margin1: 10px;
        top: 50px;
      left: 5px;
    }

}


/* Utility Classes */
.no-show { display: none; }
.tac { text-align: center; }
.tal { text-align: left; }
.tar { text-align: right; }
.fs-12 { font-size: 12pt; }
.fs-13 { font-size: 13pt; }
.fs-14 { font-size: 14pt; }
.fs-15 { font-size: 15pt; }
.fs-16 { font-size: 16pt; }
.fs-17 { font-size: 17pt; }
.fs-18 { font-size: 18pt; }
.fs-19 { font-size: 19pt; }
.fs-20 { font-size: 20pt; }
.fs-25 { font-size: 25pt; }
.mb-0 { margin-bottom: 0px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mb-50 { margin-bottom: 50px; }
.mb-60 { margin-bottom: 60px; }
.mt-0 { margin-top: 0px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mt-50 { margin-top: 50px; }
.mt-60 { margin-top: 60px; }

.pt-0 { padding-top: 0px; }
.pt-10 { padding-top: 10px; }
.pt-20 { padding-top: 20px; }
.pt-30 { padding-top: 30px; }
.pt-40 { padding-top: 40px; }
.pt-50 { padding-top: 50px; }
.pt-60 { padding-top: 60px; }

.pb-0 { padding-bottom: 0px; }
.pb-10 { padding-bottom: 10px; }
.pb-20 { padding-bottom: 20px; }
.pb-30 { padding-bottom: 30px; }
.pb-40 { padding-bottom: 40px; }
.pb-50 { padding-bottom: 50px; }
.pb-60 { padding-bottombottom: 60px; }
