/* ==========================================================
   HELLO JUNGLE ART - 관리 패널 / 로그인 / QR 라벨 스타일
   (art.css 와 함께 로드됨)
   ========================================================== */

/* ── 인증 화면 ────────────────────────────────────────── */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 28px 16px; position: relative; background: var(--green-deep); }
.auth-bg { position: fixed; inset: 0; background: linear-gradient(135deg, rgba(20, 40, 28, .94), rgba(46, 89, 58, .86)), url('https://file.ezia.org/image/hellojungle/hellojungle_w_small.jpg') center/cover; }
.auth-wrap { position: relative; width: 100%; max-width: 920px; z-index: 1; }
.auth-card { display: grid; grid-template-columns: 1fr 1.1fr; background: #fff; border-radius: 26px; overflow: hidden; box-shadow: 0 40px 90px rgba(0, 0, 0, .45); animation: fadeUp .7s both; }
.auth-card.single { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
.auth-side { background: linear-gradient(160deg, var(--green-dark), var(--green)); color: #fff; padding: 44px 36px; display: flex; flex-direction: column; justify-content: center; text-align: center; align-items: center; gap: 18px; }
.auth-side img { width: 150px; background: #fff; border-radius: 24px; padding: 10px; box-shadow: 0 14px 30px rgba(0, 0, 0, .25); }
.auth-side h2 { font-family: var(--serif); font-size: 32px; font-weight: 500; letter-spacing: .08em; line-height: 1.25; }
.auth-side h2 em { color: #d8c08c; font-size: .8em; letter-spacing: .3em; }
.auth-side p { font-size: 14px; color: rgba(255, 255, 255, .8); line-height: 1.9; }
.auth-form { padding: 44px 40px; }
.auth-form h1 { font-family: var(--serif-ko); font-size: 28px; color: var(--green-dark); margin-bottom: 6px; }
.auth-desc { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.auth-back { display: inline-block; font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.auth-back:hover { color: var(--green); }
.install-log { list-style: none; padding: 16px 20px; background: var(--cream); border-radius: 12px; font-size: 14px; margin: 0 0 20px; }
.install-log li { padding: 3px 0; }

/* ── 패널 레이아웃 ────────────────────────────────────── */
body.panel-body { background: #f3f1ea; }
.panel-top { position: sticky; top: 0; z-index: 50; height: 62px; display: flex; align-items: center; gap: 14px; padding: 0 22px; background: var(--green-deep); color: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .2); }
.panel-burger { display: none; background: none; border: 0; color: #fff; font-size: 24px; cursor: pointer; }
.panel-brand { display: flex; align-items: center; gap: 12px; font-size: 14px; letter-spacing: .08em; }
.panel-brand .brand-logo { width: 38px; height: 38px; border-width: 2px; }
.panel-brand b { font-weight: 800; }
.panel-brand em { font-style: normal; font-size: 10px; letter-spacing: .25em; background: var(--gold); color: #fff; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.panel-user { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; }
.panel-user .who { font-weight: 700; color: #d8c08c; }
.mini-link { color: rgba(255, 255, 255, .8); font-size: 13px; }
.mini-link:hover { color: #fff; text-decoration: underline; }

.panel-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 62px); }
.panel-side { background: #fff; border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto; }
.panel-side nav { display: flex; flex-direction: column; gap: 4px; }
.panel-side nav a { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 10px; font-size: 14.5px; font-weight: 500; color: #444; transition: all .15s; }
.panel-side nav a:hover { background: #f1f5ef; color: var(--green); }
.panel-side nav a.is-active { background: var(--green); color: #fff; font-weight: 700; }
.badge-count { background: #e5484d; color: #fff; font-size: 11.5px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.side-promo { text-align: center; font-size: 12.5px; color: var(--muted); background: var(--cream); border-radius: 14px; padding: 16px 12px; }
.side-promo img { width: 90px; margin: 0 auto 8px; }
.panel-main { padding: 30px clamp(18px, 3vw, 40px) 60px; max-width: 1180px; width: 100%; }
.panel-title { font-family: var(--serif-ko); font-size: 26px; font-weight: 700; color: var(--green-dark); margin-bottom: 22px; }

/* ── 카드/통계 ────────────────────────────────────────── */
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px; }
.card h3 { font-family: var(--serif-ko); font-size: 17px; color: var(--green-dark); margin-bottom: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card h3 small { font-family: var(--sans); font-weight: 400; font-size: 12.5px; color: var(--muted); }
.card h3 .more { margin-left: auto; font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--green); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.stat span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.stat b { font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--green-dark); line-height: 1.1; }
.stat b small { font-size: 14px; color: var(--muted); font-family: var(--sans); font-weight: 400; }
.stat b.money { font-size: 26px; }
.stat-alert { border-color: #f0b4b6; background: #fff6f6; }
.stat-alert b { color: #d33b40; }
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: linear-gradient(135deg, var(--green-dark), var(--green)); color: #fff; padding: 26px 30px; border-radius: 18px; margin-bottom: 20px; }
.welcome h2 { font-family: var(--serif-ko); font-size: 22px; }
.welcome h2 small { font-size: 14px; font-weight: 400; opacity: .8; }
.welcome p { font-size: 14px; opacity: .85; margin-top: 4px; }
.welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.welcome .btn-primary { background: #fff; color: var(--green-dark); border-color: #fff; }
.welcome .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.welcome .btn-outline:hover { background: #fff; color: var(--green-dark); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .chip { padding: 6px 14px; font-size: 13px; }
.filter-row select, .filter-row input[type=search] { padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 14px; background: #fff; }
.empty-panel { text-align: center; background: #fff; border: 2px dashed #d9d3c4; border-radius: 18px; padding: 60px 20px; }
.empty-panel h3 { font-family: var(--serif-ko); font-size: 20px; margin: 6px 0; }
.empty-panel p { color: var(--muted); margin-bottom: 18px; }

/* ── 작품 리스트 (날짜별) ─────────────────────────────── */
.date-group { margin-bottom: 26px; }
.date-group > h3 { font-family: var(--serif); font-size: 21px; color: var(--green-dark); margin-bottom: 12px; display: flex; align-items: baseline; gap: 12px; }
.date-group > h3 span { font-family: var(--sans); font-size: 13px; color: var(--muted); }
.work-list { display: flex; flex-direction: column; gap: 10px; }
.work-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 130px auto; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px 12px 12px; transition: box-shadow .2s; }
.work-row:hover { box-shadow: 0 8px 24px rgba(20, 40, 28, .08); }
.work-thumb { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--cream); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-main h4 { font-family: var(--serif-ko); font-size: 16.5px; }
.work-main p { font-size: 14px; color: #444; margin-top: 3px; }
.work-main .price { color: var(--green); }
.work-main .sub { font-size: 12.5px; color: var(--muted); }
.work-main .sub a { color: var(--green); font-weight: 700; text-decoration: underline; }
.work-status select, .tbl select { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1.5px solid var(--line); font-family: inherit; font-weight: 600; font-size: 13px; background: #fff; }
.st-available { color: var(--green); border-color: #bcd6b6 !important; background: #f2f9ef !important; }
.st-reserved { color: #8a6a22; border-color: #e6d3a3 !important; background: #fdf7e7 !important; }
.st-sold { color: #fff; background: #3a3a3a !important; border-color: #3a3a3a !important; }
.st-hidden { color: #777; background: #eee !important; }
.work-actions { display: flex; gap: 6px; align-items: center; }
.work-actions form { display: inline; }

/* ── 작품 등록 폼 ─────────────────────────────────────── */
.work-form .card { padding: 26px 28px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hint { font-size: 13px; color: var(--muted); background: var(--cream); padding: 10px 14px; border-radius: 8px; }
.exist-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; margin-bottom: 18px; }
.exist-img { border: 1px solid var(--line); border-radius: 10px; padding: 6px; text-align: center; font-size: 12.5px; }
.exist-img img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; margin-bottom: 6px; }
.exist-img label { display: flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; padding: 2px 0; }
.exist-img .del-mini { color: var(--danger); }
.dropzone { position: relative; border: 2px dashed #c9d6c3; border-radius: 14px; background: #f7faf5; text-align: center; padding: 34px 16px; transition: all .2s; }
.dropzone:hover { border-color: var(--green); background: #eff6eb; }
.dropzone.busy { opacity: .55; pointer-events: none; }
.dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dz-text b { display: block; font-size: 17px; color: var(--green-dark); margin-bottom: 6px; }
.dz-text span { font-size: 13px; color: var(--muted); }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; margin-top: 14px; }
.preview { position: relative; text-align: center; font-size: 11.5px; color: var(--muted); }
.preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.preview button { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; font-size: 12px; }

/* ── 문의 ─────────────────────────────────────────────── */
.inq-list { display: flex; flex-direction: column; gap: 12px; }
.inq { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; }
.inq.is-new { border-left: 4px solid #e5484d; background: #fffdfd; }
.inq-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.inq-tel { margin-left: 10px; color: var(--green); font-weight: 700; text-decoration: underline; }
.dot-new { background: #e5484d; color: #fff; font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-right: 6px; letter-spacing: .05em; }
.inq-art { font-size: 13.5px; color: var(--muted); margin: 6px 0; }
.inq-art a { color: var(--green); text-decoration: underline; }
.inq-msg { background: var(--cream); border-radius: 10px; padding: 12px 16px; margin: 10px 0; font-size: 14.5px; }
.inq-actions form { display: flex; gap: 8px; }

/* ── 관리자 ───────────────────────────────────────────── */
.mini-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0ede4; font-size: 14px; }
.mini-row:last-child { border-bottom: 0; }
.mini-row form { display: flex; gap: 6px; flex: none; }
.pill-mini { display: inline-block; background: #eef3ea; color: var(--green); font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; vertical-align: 2px; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.recent-item { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.recent-item img, .recent-item .noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--cream); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.recent-item small { color: var(--muted); }
.user-list { display: flex; flex-direction: column; gap: 14px; }
.user-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 26px; border-left: 5px solid #ccc; }
.user-card.st-pending { border-left-color: #e5a63a; background: #fffcf4; }
.user-card.st-approved { border-left-color: var(--leaf); }
.user-card.st-rejected, .user-card.st-suspended { border-left-color: #b0b0b0; opacity: .92; }
.user-head h3 { font-family: var(--serif-ko); font-size: 19px; margin-bottom: 6px; }
.status-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px; margin-right: 8px; }
.sb-pending { background: #fdecc6; color: #8a5a00; }
.sb-approved { background: #e3f1dd; color: #2b6a2f; }
.sb-rejected { background: #eee; color: #666; }
.sb-suspended { background: #f6dcdc; color: #9b2c2c; }
.user-info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 20px; margin: 16px 0 10px; }
.user-info dt { font-size: 12px; color: var(--muted); }
.user-info dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; word-break: break-all; }
.user-info dd a { color: var(--green); text-decoration: underline; }
.user-intro { background: #f7f5ef; padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 12px; }
.user-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.memo-form { display: flex; gap: 8px; margin-top: 12px; }
.memo-form input { flex: 1; padding: 8px 12px; border: 1.5px dashed #d9d3c4; border-radius: 8px; font-family: inherit; font-size: 13.5px; background: #fffef9; }
.table-card { padding: 0; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 14px 16px; background: #faf8f3; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid #f0ede4; vertical-align: middle; }
.tbl-work { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.tbl-work img, .tbl-work .noimg { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--cream); display: flex; align-items: center; justify-content: center; flex: none; }
.tbl select { min-width: 110px; }

/* ── QR 출력 ──────────────────────────────────────────── */
.qr-toolbar { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; margin-bottom: 14px; }
.qr-toolbar-left { display: flex; gap: 16px; align-items: center; font-size: 14px; }
.qr-toolbar select { padding: 7px 12px; border-radius: 8px; border: 1.5px solid var(--line); font-family: inherit; margin-left: 6px; }
.qr-toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; }
.qr-url { font-size: 13px; color: var(--muted); margin-bottom: 22px; word-break: break-all; }
.qr-url a { color: var(--green); text-decoration: underline; }

.qr-sheet { --lw: 100mm; display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; padding: 10px 0; }
.qr-sheet.size-s { --lw: 70mm; }
.qr-sheet.size-m { --lw: 100mm; }
.qr-sheet.size-l { --lw: 140mm; }
.qr-label { width: var(--lw); font-size: calc(var(--lw) / 20); background: #fff; border-radius: .9em; padding: 1.3em 1.2em 1em; display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--green-dark); position: relative; overflow: hidden; box-shadow: 0 14px 40px rgba(20, 40, 28, .16); break-inside: avoid; page-break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.qr-label::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: .5em; background: linear-gradient(90deg, var(--green-dark), var(--leaf) 60%, var(--gold)); }
.ql-head { display: flex; align-items: center; gap: .6em; margin-top: .3em; text-align: left; font-size: .5em; letter-spacing: .3em; line-height: 1.35; color: var(--muted); }
.ql-head img { width: 5.6em; height: 5.6em; object-fit: contain; }
.ql-head b { font-size: 1.5em; letter-spacing: .12em; color: var(--green-dark); }
.ql-qr { width: 78%; margin: .9em 0 .5em; padding: .55em; border: .16em solid var(--green-dark); border-radius: .9em; background: #fff; }
.qr-box canvas, .qr-box svg { width: 100% !important; height: auto !important; display: block; }
.qr-box { min-height: 3em; font-size: .5em; color: var(--muted); }
.ql-scan { font-size: .5em; letter-spacing: .28em; font-weight: 700; color: var(--gold); margin-bottom: 1em; }
.ql-info { width: 100%; padding-top: .9em; border-top: .06em solid var(--line); }
.ql-info h3 { font-family: var(--serif-ko); font-size: 1.2em; font-weight: 700; line-height: 1.3; word-break: keep-all; }
.ql-artist { font-size: .8em; color: #444; margin-top: .25em; }
.ql-spec { font-size: .6em; color: var(--muted); margin-top: .25em; }
.ql-price { font-family: var(--serif); font-size: 1.35em; font-weight: 600; color: var(--green); margin-top: .35em; letter-spacing: .03em; }
.ql-foot { width: 100%; display: flex; justify-content: space-between; gap: .6em; margin-top: .9em; padding-top: .7em; border-top: .06em dashed #cfc9b8; font-size: .52em; color: var(--muted); }
.ql-foot span:last-child { color: var(--green); font-weight: 700; }

/* ── 반응형 ───────────────────────────────────────────── */
@media (max-width: 960px) {
    .panel-shell { grid-template-columns: 1fr; }
    .panel-burger { display: block; }
    .panel-side { position: fixed; left: 0; top: 62px; bottom: 0; width: 260px; height: auto; z-index: 60; transform: translateX(-100%); transition: transform .3s; box-shadow: 8px 0 30px rgba(0, 0, 0, .15); }
    .panel-side.open { transform: none; }
    .panel-user .mini-link:first-of-type { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .user-info { grid-template-columns: repeat(2, 1fr); }
    .work-row { grid-template-columns: 72px minmax(0, 1fr); }
    .work-thumb { width: 72px; height: 72px; }
    .work-status, .work-actions { grid-column: 1 / -1; }
    .work-actions { flex-wrap: wrap; }
}
@media (max-width: 720px) {
    .auth-card { grid-template-columns: 1fr; }
    .auth-side { padding: 28px 24px; }
    .auth-side img { width: 100px; }
    .auth-form { padding: 30px 24px; }
    .panel-user .who { display: none; }
}

/* ── 인쇄 (QR 라벨만 출력) ────────────────────────────── */
@media print {
    @page { margin: 8mm; }
    body.panel-body { background: #fff; }
    .panel-top, .panel-side, .no-print, .panel-title, .alert { display: none !important; }
    .panel-shell { display: block; min-height: 0; }
    .panel-main { padding: 0; max-width: none; }
    .qr-sheet { gap: 5mm; padding: 0; justify-content: flex-start; }
    .qr-label { box-shadow: none; border: .25mm dashed #aaa; border-radius: 3mm; }
    .reveal { opacity: 1 !important; transform: none !important; }
}
