/* =====================================================
   풀방 - 공통 스타일 (모바일 우선 / 큰 버튼 / 큰 글씨)
   기준: 360~430px  |  태블릿 768px~  |  PC 1200px~
   ===================================================== */
:root {
    --main:   #2f6fed;
    --main-d: #1f55c7;
    --sub:    #ff8a3d;
    --bg:     #f5f7fa;
    --card:   #ffffff;
    --line:   #e3e7ee;
    --txt:    #222222;
    --txt2:   #666666;
    --txt3:   #999999;
    --danger: #e53935;
    --ok:     #2e9e5b;
    --radius: 14px;
    --top-h:  56px;
    --nav-h:  64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 17px; }               /* 기본 글씨 크게 */
body {
    margin: 0; background: var(--bg); color: var(--txt);
    font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
    line-height: 1.5; word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- 레이아웃 ---------- */
.app-wrap {
    width: 100%; max-width: 640px; margin: 0 auto;
    min-height: 100vh; background: var(--bg); position: relative;
}
.content {
    padding: calc(var(--top-h) + 12px) 16px calc(var(--nav-h) + 24px);
}

/* ---------- 상단바 ---------- */
.top-bar {
    position: fixed; top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 640px; height: var(--top-h);
    background: #fff; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; padding: 0 12px; z-index: 100;
}
.top-logo { font-size: 1.45rem; font-weight: 800; color: var(--main); letter-spacing: -1px; }
.top-area { margin-left: 10px; font-size: .9rem; color: var(--txt2); }
.top-back { font-size: 2rem; line-height: 1; padding: 0 10px 4px 0; color: var(--txt); }
.top-title { font-size: 1.15rem; font-weight: 700; margin: 0; flex: 1; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-icon { font-size: 1.5rem; padding: 6px; }
.top-login { font-size: .95rem; color: var(--main); font-weight: 600; padding: 8px 4px; }

/* ---------- 하단 고정 메뉴 ---------- */
.bottom-nav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 640px; height: var(--nav-h);
    background: #fff; border-top: 1px solid var(--line);
    display: flex; z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: .8rem; color: var(--txt3); gap: 2px;
}
.bottom-nav a .ico { font-size: 1.5rem; line-height: 1; }
.bottom-nav a.on { color: var(--main); font-weight: 700; }

/* ---------- 카드 ---------- */
.card {
    background: var(--card); border-radius: var(--radius); padding: 18px;
    margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.card-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 10px; }
.card-sub { color: var(--txt2); font-size: .95rem; }
.card .row { display: flex; align-items: center; gap: 10px; }
.card .row + .row { margin-top: 8px; }

.sec-title {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 1.15rem; font-weight: 700; margin: 24px 0 12px;
}
.sec-title a { font-size: .9rem; color: var(--txt2); font-weight: 400; }

/* ---------- 버튼 (큰 버튼) ---------- */
.btn {
    display: flex; align-items: center; justify-content: center;
    width: 100%; min-height: 56px; padding: 0 16px;
    border: 0; border-radius: 12px; font-size: 1.1rem; font-weight: 700;
    background: var(--main); color: #fff; cursor: pointer;
}
.btn:active { background: var(--main-d); }
.btn.sub   { background: var(--sub); }
.btn.line  { background: #fff; color: var(--main); border: 2px solid var(--main); }
.btn.gray  { background: #eef1f5; color: var(--txt2); }
.btn.sm    { min-height: 44px; font-size: .95rem; border-radius: 10px; }
.btn + .btn { margin-top: 10px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { margin: 0; }

/* 화면 하단 고정 버튼 (엄지 영역) */
.fixed-btn {
    position: fixed; bottom: var(--nav-h); left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 640px; padding: 12px 16px;
    background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0)); z-index: 90;
}
.has-fixed-btn { padding-bottom: calc(var(--nav-h) + 96px); }

/* ---------- 메인 ---------- */
.hero {
    background: linear-gradient(135deg, #2f6fed, #5b8cff);
    color: #fff; border-radius: var(--radius); padding: 26px 20px; margin-bottom: 16px;
}
.hero h2 { margin: 0 0 8px; font-size: 1.5rem; line-height: 1.3; }
.hero p  { margin: 0 0 18px; opacity: .9; }
.hero .btn { background: #fff; color: var(--main); }

.main-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.main-btns a {
    background: #fff; border-radius: var(--radius); padding: 18px 12px;
    text-align: center; font-weight: 700; font-size: 1.02rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.main-btns a .ico { display: block; font-size: 2rem; margin-bottom: 6px; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 16px 0; }
.quick a { text-align: center; font-size: .85rem; color: var(--txt2); padding: 8px 0; }
.quick a .ico {
    display: block; width: 52px; height: 52px; margin: 0 auto 6px; border-radius: 16px;
    background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.06);
    font-size: 1.6rem; line-height: 52px;
}

/* ---------- 목록 카드 (업체/기사/작업) ---------- */
.item-card { display: flex; gap: 14px; }
.item-card .thumb {
    width: 72px; height: 72px; border-radius: 12px; background: #eef1f5; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 2rem; overflow: hidden;
}
.item-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-card .info { flex: 1; min-width: 0; }
.item-card .name { font-size: 1.1rem; font-weight: 700; }
.item-card .meta { font-size: .9rem; color: var(--txt2); margin-top: 2px; }
.star { color: #f5a623; }
.badge {
    display: inline-block; padding: 3px 9px; border-radius: 20px;
    font-size: .78rem; font-weight: 600; background: #eaf1ff; color: var(--main);
}
.badge.ok   { background: #e6f6ec; color: var(--ok); }
.badge.gray { background: #eef1f5; color: var(--txt2); }
.badge.hot  { background: #fff0e6; color: var(--sub); }

/* ---------- 단계형 입력 (견적요청) ---------- */
.step-bar { display: flex; gap: 4px; margin-bottom: 20px; }
.step-bar span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.step-bar span.on { background: var(--main); }
.step { display: none; }
.step.on { display: block; }
.step h2 { font-size: 1.4rem; margin: 0 0 6px; }
.step .help { color: var(--txt2); margin: 0 0 18px; font-size: .95rem; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice.one { grid-template-columns: 1fr; }
.choice label {
    display: flex; align-items: center; justify-content: center; min-height: 64px;
    background: #fff; border: 2px solid var(--line); border-radius: 12px;
    font-size: 1.05rem; font-weight: 600; text-align: center; padding: 10px; cursor: pointer;
}
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice input:checked + span, .choice label.on { color: var(--main); }
.choice label.on { border-color: var(--main); background: #eaf1ff; }

/* ---------- 폼 ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 6px; }
.form-group .tip { font-size: .85rem; color: var(--txt3); margin-top: 4px; }
.inp, .sel, .txa {
    width: 100%; min-height: 54px; padding: 12px 14px;
    border: 2px solid var(--line); border-radius: 12px; background: #fff; font-size: 1.05rem;
}
.inp:focus, .sel:focus, .txa:focus { outline: none; border-color: var(--main); }
.txa { min-height: 120px; resize: vertical; }
.inp-row { display: flex; gap: 8px; align-items: center; }
.inp-row .inp { flex: 1; }
.unit { font-weight: 700; color: var(--txt2); }

/* 사진 업로드 */
.photo-box {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 90px; border: 2px dashed var(--main); border-radius: 12px;
    background: #f3f7ff; color: var(--main); font-weight: 700; cursor: pointer;
}
.photo-box input { display: none; }
.photo-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.photo-list div { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #eee; }
.photo-list img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 예상 견적 ---------- */
.est-box { text-align: center; padding: 26px 16px; }
.est-box .price { font-size: 1.8rem; font-weight: 800; color: var(--main); margin: 8px 0; }
.est-box .note { font-size: .88rem; color: var(--txt3); }

/* ---------- 진행 상태 ---------- */
.progress { display: flex; justify-content: space-between; position: relative; margin: 18px 0 6px; }
.progress::before {
    content: ""; position: absolute; top: 14px; left: 0; right: 0; height: 3px; background: var(--line);
}
.progress div { position: relative; text-align: center; font-size: .75rem; color: var(--txt3); flex: 1; }
.progress div::before {
    content: ""; display: block; width: 30px; height: 30px; margin: 0 auto 4px; border-radius: 50%;
    background: #fff; border: 3px solid var(--line);
}
.progress div.done { color: var(--main); font-weight: 700; }
.progress div.done::before { background: var(--main); border-color: var(--main); }

/* ---------- 기타 ---------- */
.info-list { margin: 0; padding: 0; list-style: none; }
.info-list li { display: flex; padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child { border: 0; }
.info-list li b { width: 100px; flex-shrink: 0; color: var(--txt2); font-weight: 600; }
.menu-list a {
    display: flex; align-items: center; min-height: 60px; padding: 0 18px;
    background: #fff; border-bottom: 1px solid var(--line); font-size: 1.05rem;
}
.menu-list a::after { content: "›"; margin-left: auto; color: var(--txt3); font-size: 1.4rem; }
.menu-list a:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.menu-list a:last-child  { border-radius: 0 0 var(--radius) var(--radius); border: 0; }
.empty { text-align: center; color: var(--txt3); padding: 50px 0; }
.paging { display: flex; justify-content: center; gap: 4px; margin: 20px 0; }
.paging a, .paging strong {
    min-width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: #fff; border: 1px solid var(--line);
}
.paging strong { background: var(--main); color: #fff; border-color: var(--main); }
.filter-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; }
.filter-bar .sel { min-width: 120px; min-height: 46px; flex-shrink: 0; }
.txt-c { text-align: center; }
.txt-r { text-align: right; }
.mt10 { margin-top: 10px; } .mt20 { margin-top: 20px; }
.big { font-size: 1.25rem; font-weight: 800; }
.price-txt { color: var(--sub); font-weight: 800; }

/* ---------- 관리자 (PC 넓게) ---------- */
.admin .app-wrap, .admin .top-bar, .admin .bottom-nav, .admin .fixed-btn { max-width: 1200px; }
.admin .content { padding-bottom: 40px; }
.admin .bottom-nav { display: none; }
.admin-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.admin-menu a { background: #fff; border-radius: 12px; padding: 20px 10px; text-align: center; font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat-grid .card { margin: 0; }
.stat-grid .num { font-size: 1.6rem; font-weight: 800; color: var(--main); }
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 640px; }
table.tbl th, table.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.tbl th { background: #f5f7fa; font-weight: 700; }

/* ---------- 반응형 ---------- */
@media (min-width: 768px) {
    html { font-size: 18px; }
    .main-btns { grid-template-columns: repeat(4, 1fr); }
    .quick { grid-template-columns: repeat(8, 1fr); }
    .choice { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) {
    .app-wrap { max-width: 640px; }   /* 사용자 화면은 모바일 폭 유지 */
}

/* ---------- 3차: 별점 / 캘린더 ---------- */
.star-pick { display: flex; gap: 6px; font-size: 2.2rem; line-height: 1; color: #d5d9e0; user-select: none; }
.star-pick span { cursor: pointer; padding: 2px; }
.star-pick span.on { color: #f5a623; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; border-radius: var(--radius); overflow: hidden; }
.cal th { padding: 8px 0; font-size: .85rem; background: #f5f7fa; }
.cal th:first-child, .cal td:first-child { color: var(--danger); }
.cal td { height: 56px; text-align: center; vertical-align: top; padding-top: 6px; border-top: 1px solid var(--line); font-size: .95rem; }
.cal td a { display: block; }
.cal td.today { background: #eaf1ff; font-weight: 800; color: var(--main); }
.cal td .dot { display: block; margin: 2px auto 0; width: 22px; height: 22px; line-height: 22px; border-radius: 50%; background: var(--main); color: #fff; font-size: .75rem; }
.cal td.sel { outline: 2px solid var(--sub); outline-offset: -2px; }

/* ---------- 4차: 알림 ---------- */
.top-icon { position: relative; }
.bell-badge { position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.noti { display: block; }
.noti.unread { border-left: 4px solid var(--main); }

/* =====================================================
   일러스트 아이콘 (images/ic/*.svg) - 파스텔 타일 + 진한 외곽선 스타일
   ===================================================== */
.ic { width: 1.3em; height: 1.3em; vertical-align: -0.3em; margin-right: 2px; }
.top-icon .ic { width: 26px; height: 26px; margin: 0; vertical-align: middle; }
.item-card .thumb .ic { width: 62%; height: 62%; object-fit: contain; margin: 0; }
.thumb .ic { margin: 0; }

/* 메인 4버튼 : 파스텔 타일 */
.main-btns a { font-weight: 800; padding: 18px 8px 16px; }
.main-btns a .ico { width: 84px; height: 84px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; }
.main-btns a .ico .ic { width: 84px; height: 84px; margin: 0; vertical-align: top; }
.main-btns a:nth-child(1) { background: #ffe9ee; }
.main-btns a:nth-child(2) { background: #e6efff; }
.main-btns a:nth-child(3) { background: #fff3d1; }
.main-btns a:nth-child(4) { background: #eae3fb; }

/* 퀵메뉴 8개 : 색 타일 */
.quick a { font-weight: 700; color: var(--txt, #333); }
.quick a .ico { width: 64px; height: 64px; border-radius: 20px; box-shadow: none; display: flex; align-items: center; justify-content: center; line-height: 1; }
.quick a .ico .ic { width: 44px; height: 44px; margin: 0; vertical-align: top; }
.quick a:nth-child(8n+1) .ico { background: #ffe9ee; } .quick a:nth-child(8n+2) .ico { background: #e6efff; }
.quick a:nth-child(8n+3) .ico { background: #fff3d1; } .quick a:nth-child(8n+4) .ico { background: #eae3fb; }
.quick a:nth-child(8n+5) .ico { background: #ddf3e6; } .quick a:nth-child(8n+6) .ico { background: #ffe9d6; }
.quick a:nth-child(8n+7) .ico { background: #e1f2fb; } .quick a:nth-child(8n+8) .ico { background: #ececf5; }

/* 하단 메뉴 : 선택된 메뉴만 컬러 */
.bottom-nav a .ico { display: flex; }
.bottom-nav a .ico .ic { width: 28px; height: 28px; margin: 0; vertical-align: top; filter: grayscale(1); opacity: .55; transition: opacity .15s; }
.bottom-nav a.on .ico .ic { filter: none; opacity: 1; }

/* 관리자 메뉴 : 큰 아이콘 */
.admin-menu a .ic { width: 56px; height: 56px; margin: 0 0 6px; vertical-align: top; }
.admin-menu a { background: #fff; }
