/* ========== 기본 설정 ========== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    font-family: "Noto Sans KR", sans-serif;
    color: #222;
    background: #f5f5f5;
}

/* iOS 100vh 버그 대응용: --vh 사용 */
.page-wrap {
    min-height: calc(var(--vh) * 100);
    padding: 0px;
    box-sizing: border-box;
}

/* 최신 브라우저(dvh 지원)일 경우 자동 적용 */
@supports (height: 100dvh) {
    .page-wrap {
        min-height: 100dvh;
    }
}

/* ========== 메인 카드 ========== */
.content-box {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    width: 100%;            /* 화면 가로폭 꽉 차게 */
    box-sizing: border-box;  /* padding 포함 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.content-box h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

/* ========== 폼 요소 ========== */
.label {
    display: block;
    font-weight: 600;
    margin-top: 16px;
    font-size: 15px;
}

input,
textarea {
    width: 100%;
    padding: 11px 12px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-top: 6px;
    box-sizing: border-box;
    background: #fff;
}
select {
    width: 100%;
    padding: 11px 12px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-top: 6px;
    box-sizing: border-box;
    background: #fff;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

/* ✅ select 화살표 디자인 (선택사항이지만 포함) */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff url("data:image/svg+xml;utf8,<svg fill='%23666' width='24' height='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 12px center;
    background-size: 16px;
    padding-right: 36px;
    cursor: pointer;
}

/* ✅ 구성품을 한 줄로 가로 정렬 */
.component-list {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap; /* 화면 좁을 때 자동 줄바꿈 */
    gap: 14px;       /* 항목 간 간격 */
}

/* ✅ 체크박스 + 텍스트 정렬 */
.component-list label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* 체크 시 주황색 계열로 표시 */
.component-list input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ff9600; /* ✅ 브랜드 컬러 */
}
/* ========== 이미지 미리보기 썸네일 ========== */
.preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0px;
}

.thumb {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #ddd;
}

/* 모바일에서 화면 크기에 맞게 자동 조절 */
@media (max-width: 480px) {
    .page-wrap {
        padding: 0px;
    }

    .content-box {
        padding: 16px;
    }

    .thumb {
        width: 28vw;
        height: 28vw;
    }

    input,
    textarea {
        font-size: 14px;
        padding: 10px;
    }
}


/* ✅ 개인정보 동의 박스 */
.agree-box {
    background: #fff;
    color:inherit;
    text-decoration: none;
    padding: 18px;
    border-radius: 12px;
    margin-top: 18px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    width: 100%;
    box-sizing: border-box;
}

/* ✅ 체크박스 + 문구 */
.agree-check {
    display: flex;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
    gap: 8px;
}

/* ✅ 주황색 체크 UI */
.agree-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #ff9600;
    cursor: pointer;
}

/* ✅ 세부 내용 */
.agree-detail {
    background: #f9f9f9;
    padding: 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 12px;
    line-height: 1.45;
    color: #555;
}

/* ========== 하단 안내 박스 ========== */
.info-box {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    margin-top: 16px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    width: 100%;
    box-sizing: border-box;
}

.info-box h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

/* 카카오 안내 박스 */
.kakao-box {
    background: #ffe400;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin-top: 8px;
    font-weight: 600;
}

/* ========== Footer ========== */
.footer {
    font-size: 11px;
    text-align: center;
    color: #888;
    margin-top: 0px;
    padding: 0px 8px calc(env(safe-area-inset-bottom) + 12px);
    box-sizing: border-box;
    width: 100%;
}

/* ========== 하단 플로팅 버튼 ========== */
.floating-btn {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom) + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: 92vw;
    padding: 14px;
    font-size: 17px;
    font-weight: bold;
    background: #ff9600;
    color: #fff;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0px 5px 18px rgba(255,150,0,0.45);
    z-index: 100;
}

/* ========== Safe Area 대응 (아이폰 노치) ========== */
@supports (padding: max(0px)) {
    body {
        padding-bottom: max(env(safe-area-inset-bottom), 0px);
    }
}

/* ========== 가로(landscape) 화면 최적화 ========== */
@media screen and (orientation: landscape) and (max-width: 900px) {
    .page-wrap {
        padding: 10px 0px;
    }


    .content-box,
    .info-box,
    .footer {
        width: 100%;
    }

    .floating-btn {
        width: 80vw;
        font-size: 16px;
        padding: 12px;
    }
}


/* 상단 검정 바 */
.success-top-bar {
    background: #000;
    padding: 18px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

/* 메인 박스 */
.success-box {
    background: #fff;
    margin: 20px auto;
    padding: 20px;
    width: calc(100% - 32px);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.success-brand-top {
    text-align: right;
    font-size: 12px;
    margin-bottom: 30px;
    color: #d33;
}

.success-brand-top a {
    color: #d33;
    text-decoration: underline;
    font-size: 11px;
}

.success-circle-icon {
    width: 68px;
    height: 68px;
    background: #f2a640;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 24px;
    font-size: 36px;
    font-weight: bold;
    color: white;
}

.success-main-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.success-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 28px;
}

.success-btn-orange {
    display: block;
    max-width: 92vw;              /* 너무 넓어지지 않게 제한 */
    padding: 14px 28px;           /* 버튼 내부 여백 */
    margin: 10px auto;            /* 정중앙 정렬 핵심 */
    background: #ff9600;
    color: #fff;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.btn-orange {
    display: block;
    max-width: 92vw;              /* 너무 넓어지지 않게 제한 */
    padding: 14px 28px;           /* 버튼 내부 여백 */
    margin: 10px auto;            /* 정중앙 정렬 핵심 */
    background: #ff9600;
    color: #fff;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.btn-green {
    display: block;
    max-width: 92vw;              /* 너무 넓어지지 않게 제한 */
    padding: 14px 28px;           /* 버튼 내부 여백 */
    margin: 10px auto;            /* 정중앙 정렬 핵심 */
    background: #47C83E;
    color: #fff;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.btn-row {
    display: flex;
    justify-content: center;     /* 가운데 정렬 */
    gap: 12px;                   /* 버튼 사이 간격 */
    margin: 15px 0;
}

.btn-orange-small,
.btn-white-small,
.btn-red-small,
.btn-green-small {
    flex: 1;                     /* 두 버튼 동일 너비 */
    max-width: 40vw;             /* 너무 넓어지지 않도록 제한 */
    padding: 12px 0;
    text-align: center;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

/* 색상만 분리 */
.btn-white-small {
    background: #fff;
    color: #000;
    border: 1px solid #000; 
}

.btn-orange-small {
    background: #ff9600;
}

.btn-red-small {
    background:  #d33;
}

.btn-green-small {
    background: #47C83E;
}

/* 안내 박스 */
.success-guide-box {
    background: #fff;
    padding: 20px;
    margin: 26px auto;
    width: calc(100% - 32px);
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.success-guide-title {
    font-weight: 700;
    margin-bottom: 8px;
}

/* 전체 어둡게 덮는 오버레이 */
.ios-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35); /* iOS 반투명 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

/* iOS spinner */
.ios-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: iosSpin 1s linear infinite;
}

@keyframes iosSpin {
    to {
        transform: rotate(360deg);
    }
}

.request-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 15px;
    text-align: center;                 /* 전체 가운데 정렬 */
}

.request-table thead th {
    background: #f5f5f5;
    padding: 12px 6px;
    font-weight: 700;
    border-bottom: 2px solid #ddd;
}

.request-table tbody td {
    padding: 12px 6px;
    border-bottom: 1px solid #eee;
    font-weight: 500;
}

/* 상태 배지 */
.status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    display: inline-block;
}

.status.ing {
    background: #fff3cd;
    color: #856404;
}

.status.done {
    background: #d4edda;
    color: #155724;
}

.status.wait {
    background: #e2e3e5;
    color: #41464b;
}

.deposit-wrap {
    padding: 20px;
    height: 70px;
    font-family: 'Apple SD Gothic Neo', sans-serif;
}

.title {
    text-align: center;
    font-size: 27px;
    font-weight: 700;
    margin-bottom: 14px;
}

.amount-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.amount-input {
    width: 200px;
    text-align: center;
    padding: 8px;
    font-size: 20px;
    border: 1px solid #ccc;
}

.unit {
    margin-left: 8px;
    font-size: 22px;
}

.notice {
    font-size: 14px;
    margin-top: 8px;
}

.warn {
    font-size: 13px;
    color: red;
    margin-bottom: 14px;
}

.form-row {
    margin: 10px 0;
}

.form-row label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
}

/* 썸네일 외곽 */
.thumb-wrap {
    position: relative;
    display: inline-block;
    margin-right: 8px;
}

/* 삭제 버튼 */
.thumb-delete {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #333;
    font-size: 16px;
    font-weight: bold;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.thumb-delete:hover {
    background: #ff4949;
    color: #fff;
}

body {
    margin: 0;
    background: #f8f8f8;
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
}

/* -------------------------
   🔥 상단 탭 메뉴
------------------------- */
.top-tabs {
    display: flex;
    white-space: nowrap;
    overflow-x: auto;
    background: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.tab {
    padding: 10px 16px;
    font-size: 14px;
    color: #777;
    cursor: pointer;
}

.tab.active {
    color: #e60012;
    font-weight: 700;
}

/* -------------------------
   🔥 카테고리 필터
------------------------- */
.filter-box {
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.filter-select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.filter-msg {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

/* -------------------------
   🔥 검색창
------------------------- */
.search-box {
    background: #fff;
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.search-input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* -------------------------
   🔥 상세 카드
------------------------- */
.item-card {
    background: #fff;
    margin: 16px;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.05);
}

.item-header {
    display: flex;
}

.item-img {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    margin-right: 12px;
    object-fit: cover;
}

.item-info p {
    margin: 2px 0;
}

.item-code { font-weight: 700; }
.item-title { font-size: 14px; font-weight: 700; }
.alert { font-size: 12px; color: #d9534f; }

/* -------------------------
   🔥 정보 테이블
------------------------- */
.item-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
}

.item-table th {
    text-align: left;
    width: 100px;
    color: #555;
    font-size: 13px;
    padding: 6px 0;
}

.item-table td {
    font-size: 13px;
    padding: 6px 0;
}

/* -------------------------
   🔥 이미지 리스트
------------------------- */
.img-list {
    display: flex;
    margin-top: 12px;
    gap: 6px;
    align-items: center;
}

.img-list img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
}

.img-more {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: #555;
}

.form-row-horizontal {
    display: flex;
    align-items: left;
    margin-bottom: 14px;
    gap: 10px; /* 라벨과 입력 사이 간격 */
}

/* 라벨 영역 비율 */
.form-row-horizontal .label {
    width: 10%;          /* 원하는 비율로 조절 가능 */
    font-size: 15px;
    font-weight: 400;
}

/* 입력필드 영역 */
.form-row-horizontal .input {
    flex: 1;             /* 남은 공간 모두 사용 */
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 15px;
}

/* ---------------------- 공통 ---------------------- */
body {
    margin: 0;
    padding: 0;
    background: #f8f8f8;
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
}

.page-wrap {
    width: 100%;
    overflow-x: hidden;
}

/* ---------------------- 상단 탭 ---------------------- */
.top-tabs {
    display: flex;
    white-space: nowrap;
    overflow-x: auto;
    background: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}
.tab {
    padding: 10px 16px;
    font-size: 14px;
    color: #777;
    cursor: pointer;
}
.tab.active {
    color: #e60012;
    font-weight: 700;
}

/* ---------------------- 필터 ---------------------- */
.filter-box {
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
}
.filter-select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
}
.filter-msg {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

/* ---------------------- 검색 ---------------------- */
.search-box {
    padding: 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
}
.search-input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* ---------------------- 카드 ---------------------- */
.item-card {
    background: #fff;
    margin: 16px;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.05);
}

.item-header {
    display: flex;
    cursor: pointer;
}

.item-img {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    margin-right: 12px;
    object-fit: cover;
}

.item-info p {
    margin: 3px 0;
}

.item-code { font-weight: 700; }
.item-title { font-size: 14px; font-weight: 700; }

/* ---------------------- 아코디언 최적화 ---------------------- */
.item-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
}
.item-card.open .item-body {
    max-height: 2000px;
}

/* ---------------------- 테이블 ---------------------- */
.item-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}
.item-table th {
    width: 100px;
    color: #666;
    font-size: 13px;
    text-align: left;
    padding: 6px 0;
}
.item-table td {
    font-size: 13px;
    padding: 6px 0;
}

/* ---------------------- 이미지 리스트 ---------------------- */
.img-list {
    display: flex;
    margin-top: 12px;
    gap: 6px;
}
.img-list img,
.img-more {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
}
.img-more {
    background: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: #555;
}

/* ---------------------- 모달 ---------------------- */
.modal {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
}
.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}
.modal img {
    width: 100%;
}
.modal-close {
    position: absolute;
    right: 10px; top: 10px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
}
.modal-prev, .modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.4);
    color: #fff;
    font-size: 36px;
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
}
.modal-prev { left: -40px; }
.modal-next { right: -40px; }

/* ---------------------- 역할 기반 숨김 ---------------------- */
.role-admin .user-only { display:none; }
.role-user .admin-only { display:none; }

/* 📌 Datepicker 헤더의 연·월 순서 변경 */
.ui-datepicker .ui-datepicker-title {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.ui-datepicker-year {
    order: 1;   /* 년 먼저 */
}

.ui-datepicker-month {
    order: 2;   /* 월 다음 */
}

/* 테이블 말줄임 공통 */
.ellipsis {
    max-width: 140px;          /* 원하는 최대 너비 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-click {
    cursor: default;
    background: #fafafa;
    color: #999;
}
.click-row:hover {
    background: #f1f7ff;
}
.no-click:hover {
    background: #fafafa;
}
/* 파일 업로드 전체 박스 */
.file-box {
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    background: #fff;
}

/* 파일 선택 input */
.file-input {
    width: 100%;
    margin-bottom: 12px;
}

/* 미리보기 영역 */
.preview {
    display: flex;
    align-items: center;
    min-height: 160px; /* ⭐ 파일선택 + 이미지까지 커버 */
}

/* 썸네일 감싸는 박스 */
.thumb-wrap {
    position: relative;
    width: 180px;
    height: 140px;
    border: 1px dashed #ddd;
    border-radius: 6px;
    background: #fafafa;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* 이미지 */
.thumb {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* 🔥 비율 유지 */
}

/* 샘플 이미지 약간 연하게 */
.thumb-wrap.sample img {
    opacity: 0.85;
}

/* 삭제 버튼 */
.thumb-delete {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #ff4d4f;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.thumb-delete:hover {
    background: #d9363e;
}

/* 포커스/호버 시 강조 */
.file-box:hover {
    border-color: #ff9600;
    background: #fffdf9;
}
.tel-link {
  color: inherit;          /* 텍스트 색상 유지 */
  text-decoration: none;   /* 밑줄 제거 */
}
.qa-list {
  border-top: 1px solid #ddd;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.qa-item {
  border-bottom: 1px solid #ddd;
}

.qa-question {
  width: 100%;
  padding: 16px 44px 16px 16px;
  background: #f2f2f2;
  border: none;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  cursor: pointer;
  color: inherit;        /* ⭐ 부모 글자색 상속 */
  font: inherit;         /* ⭐ 폰트/사이즈 상속 */
}

.qa-question .arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid #333;
  border-bottom: 2px solid #333;
  transform: translateY(-50%) rotate(-45deg);
  transition: transform 0.2s;
}

.qa-question.active .arrow {
  transform: translateY(-50%) rotate(45deg);
}

.qa-answer {
  max-height: 0;
  overflow: hidden;
  background: #fff;
  padding: 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  transition: max-height 0.25s ease, padding 0.2s ease;
}

.qa-answer.open {
  padding: 14px 16px 18px;
}

.required {
  color: #e53935;
  font-weight: 700;
  position: relative;
  top: -1px;
}

