/* ══════════════════════════════════
   BW리뷰 웹 통합 - 모바일 최적화 CSS
   ══════════════════════════════════ */

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
    background: #ffffff;
    color: #333;
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
}

/* ──────── 앱 헤더 ──────── */
.app-header {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 12px 16px;
    box-shadow: 0 1px 4px rgba(245,158,11,0.12);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}
.header-user-info {
    font-size: 12px;
    color: #ffffff;
    font-weight: 500;
    margin-right: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}
.header-logout-btn {
    background: #92400e;
    border: 1px solid #92400e;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}
.header-logout-btn:active { opacity: 0.6; }

/* ──────── 앱 메인 ──────── */
.app-main {
    max-width: 520px;
    margin: 0 auto;
    padding: 20px 16px 80px;
}

/* ──────── 하단 네비게이션 ──────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 520px;
    background: #fff;
    display: flex;
    border-top: 1px solid #e5e5e5;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}
/* 채팅 페이지에서는 하단 네비 숨김 (사이드바 사용) */
.chat-page .bottom-nav { display: none; }
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    text-decoration: none;
    color: #999;
    font-size: 11px;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.nav-item.active { color: #b45309; }
.nav-icon { font-size: 20px; margin-bottom: 2px; }
.nav-label { font-weight: 500; }

/* ──────── 페이지 공통 ──────── */
.page-content { padding-top: 8px; }
.page-title {
    font-size: 22px;
    text-align: center;
    margin-bottom: 4px;
}
.page-subtitle {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-bottom: 24px;
}
.loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* ──────── 플래시 메시지 ──────── */
.flash-messages { margin-bottom: 16px; }
.flash {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 8px;
}

/* ──────── 버튼 ──────── */
.btn {
    display: inline-block;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { opacity: 0.7; }
.btn-primary { background: #f59e0b; color: #fff; }
.btn-secondary { background: #b45309; color: #fff; }
.btn-outline { background: #f0f9ff; color: #1e40af; border: 2px solid #93c5fd; font-weight: 700; }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-danger { background: #e74c3c; color: #fff; }

/* 검수 페이지 */
.review-actions { margin-top: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.reject-reason-input { padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; width: 240px; }
.capture-link { color: #4a90d9; text-decoration: underline; font-weight: 600; }

/* 반려 표시 (업로드 카드) */
.item-card.rejected { border-left: 4px solid #e74c3c; }
.item-reject-notice {
    color: #e74c3c; font-size: 13px; font-weight: 600;
    margin-top: 4px; padding: 4px 8px; background: #fce4ec; border-radius: 6px;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    border-radius: 16px;
    width: 100%;
}
.menu-buttons { display: flex; flex-direction: column; gap: 16px; }
.btn-icon { font-size: 36px; margin-bottom: 8px; }
.btn-text { font-size: 18px; font-weight: 700; }
.btn-desc { font-size: 13px; opacity: 0.7; margin-top: 4px; }

/* ──────── 폼 ──────── */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}
.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    -webkit-appearance: none;
}
.form-group input:focus { border-color: #fbbf24; }

/* ──────── 검색 ──────── */
.search-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.search-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    -webkit-appearance: none;
}
.search-input:focus { border-color: #fbbf24; }

/* ──────── 로그인 ──────── */
.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
}
.login-logo {
    text-align: center;
    margin-bottom: 40px;
}
.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 auto 12px;
}
.login-subtitle { color: #888; font-size: 14px; margin-top: 4px; }
.login-form-wrap { width: 100%; }
.login-warning {
    background: #fff3e0;
    color: #e65100;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.4;
}
.login-form { display: flex; flex-direction: column; gap: 12px; }

/* ──────── 채팅 페이지 ──────── */

.chat-header {
    background: linear-gradient(135deg, #f5e6c8, #e8d5a8);
    padding: 12px 16px;
    flex-shrink: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border-bottom: 1px solid #e0d5c0;
}
.chat-header-inner {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-profile { display: flex; align-items: center; gap: 10px; }
.profile-avatar {
    width: 36px;
    height: 36px;
    background: #d97706;
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
}
.profile-name { font-weight: 700; font-size: 16px; color: #ffffff; }
.profile-status { font-size: 12px; color: #666; display: block; }
.menu-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
    padding: 4px;
}

/* ──────── 사이드바 ──────── */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.sidebar-overlay.open { opacity: 1; visibility: visible; }

.sidebar {
    position: fixed;
    top: 0;
    right: -260px;
    bottom: 0;
    width: 260px;
    background: #fff;
    z-index: 201;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 16px rgba(0,0,0,0.12);
    transition: right 0.25s ease;
}
.sidebar.open { right: 0; }

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}
.sidebar-title { font-size: 18px; font-weight: 700; color: #ffffff; }
.sidebar-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
    transition: background 0.15s;
}
.sidebar-item:hover, .sidebar-item:active { background: #f5f5f5; }
.sidebar-item.active { color: #b45309; font-weight: 700; background: #fffbeb; }
.sidebar-icon { font-size: 20px; width: 28px; text-align: center; }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
}
.sidebar-logout {
    width: 100%;
    padding: 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: background 0.15s;
}
.sidebar-logout:active { background: #eee; }

/* 채팅 컨테이너 */
.chat-container, .chat-body {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
}
.chat-messages { padding: 16px; }

/* 채팅 버블 */
.chat-bubble {
    display: flex;
    margin-bottom: 12px;
    align-items: flex-end;
    gap: 6px;
}
.chat-bubble.bot { flex-direction: row; }
.chat-bubble.user { flex-direction: row-reverse; }

.bubble-avatar {
    width: 32px;
    height: 32px;
    background: #d97706;
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    align-self: flex-start;
}

.bubble-content {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
}
.chat-bubble.bot .bubble-content {
    background: #fff;
    color: #1e293b;
    border-top-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.chat-bubble.user .bubble-content {
    background: #fef3c7;
    color: #78350f;
    border-top-right-radius: 4px;
}

.bubble-time {
    font-size: 11px;
    color: rgba(0,0,0,0.4);
    flex-shrink: 0;
    align-self: flex-end;
}

.typing-indicator {
    display: none;
    padding: 10px 14px;
    background: #fff;
    border-radius: 16px;
    border-top-left-radius: 4px;
    max-width: 80px;
    margin-left: 38px;
}
.typing-indicator.show { display: block; }
.typing-dots {
    display: flex;
    gap: 4px;
}
.typing-dots span {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* 채팅 입력 */
.chat-input-area {
    background: #fff;
    border-top: 1px solid #e5e5e5;
    padding: 6px 16px;
}
.chat-input-wrap {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.chat-input-wrap textarea {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 20px;
    font-size: 15px;
    outline: none;
    -webkit-appearance: none;
    resize: none;
    overflow-y: hidden;
    min-height: 42px;
    max-height: 84px;
    line-height: 1.4;
    font-family: inherit;
}
.chat-input-wrap textarea.scrollable {
    overflow-y: auto;
}
.chat-input-wrap textarea:focus { border-color: #fbbf24; }
.send-btn {
    width: 44px;
    height: 44px;
    background: #f59e0b;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    color: #fff;
    -webkit-tap-highlight-color: transparent;
}
.send-btn:active { opacity: 0.7; }

/* ──────── 상태 카드 ──────── */
.section-title {
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 12px;
    color: #555;
}
.status-card {
    background: #fffef8;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #f0ebe0;
}
.status-card.completed { opacity: 0.7; }
.status-card.rejected { border-left: 4px solid #e74c3c; }
.reject-notice span { color: #e74c3c; font-weight: 600; }
.reject-notice .label { color: #e74c3c; }
.status-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.product-name { font-size: 16px; font-weight: 700; word-break: break-word; }
.status-badge { font-size: 13px; display: flex; align-items: center; gap: 4px; }
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot.yellow { background: #ffc107; }
.status-dot.blue { background: #2196f3; }
.status-dot.orange { background: #ff9800; }
.status-dot.green { background: #4caf50; }
.status-dot.done { background: #4caf50; }
.status-dot.cancel { background: #f44336; }
.status-card-body { font-size: 13px; color: #666; }
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}
.info-row .label { color: #999; }

/* ──────── 입금현황 ──────── */
.payment-section { margin-bottom: 24px; }
.section-title.payment-done { color: #4caf50; }
.section-title.payment-pending { color: #ff9800; }
.section-title.payment-no-review { color: #f44336; }
.payment-item {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 13px;
    align-items: center;
}
.payment-product { font-weight: 600; }
.payment-id { color: #888; }
.payment-amount { color: #4caf50; font-weight: 600; }
.payment-date { color: #888; font-size: 12px; }

/* ──────── 업로드 ──────── */
.item-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.item-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s, opacity 0.3s;
}
.item-card.uploading {
    box-shadow: 0 0 0 2px #fbbf24, 0 2px 8px rgba(251,191,36,0.3);
}
.item-info { margin-bottom: 12px; }
.item-product { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.item-detail { font-size: 13px; color: #666; margin-bottom: 2px; }
.file-input { display: none; }
.upload-controls { position: relative; }
.upload-result { margin-top: 8px; }
.result-success { color: #2e7d32; font-size: 14px; font-weight: 600; }
.result-fail { color: #d32f2f; font-size: 13px; }
.item-card.uploaded {
    opacity: 0.6;
    border-left: 3px solid #4caf50;
}

/* File select area */
.file-select-area { }
.file-select-label { cursor: pointer; display: inline-block; }
.file-select-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    min-height: 44px;
    line-height: 24px;
    transition: opacity 0.15s;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.file-select-label:active .file-select-btn { opacity: 0.7; }

/* File selected indicator */
.file-selected-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: #e8f5e9;
    border-radius: 10px;
}
.file-selected-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #2e7d32;
}
.file-selected-check { font-size: 16px; }
.file-selected-actions {
    display: flex;
    gap: 6px;
}
.file-action-btn {
    padding: 6px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    min-height: 36px;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.file-action-btn:active { background: #f0f0f0; }
.file-action-change { color: #1976d2; border-color: #90caf9; }
.file-action-change:active { background: #e3f2fd; }
.file-action-remove { color: #d32f2f; border-color: #ef9a9a; }
.file-action-remove:active { background: #ffebee; }

/* ──────── Sticky top bar ──────── */
.upload-sticky {
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    z-index: 950;
    background: #fff;
    padding: 12px 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 12px 12px;
    max-width: 600px;
    margin: 0 auto;
}
.sticky-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #333;
}
.sticky-icon { font-size: 20px; }
.sticky-label { font-weight: 500; }
.sticky-label strong { color: #ffffff; font-size: 18px; }

.sticky-submit-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    background: #ccc;
    color: #888;
    transition: all 0.2s;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}
.sticky-submit-btn:disabled {
    background: #e0e0e0;
    color: #aaa;
    cursor: not-allowed;
}
.sticky-submit-btn.active {
    background: #f59e0b;
    color: #fff;
}
.sticky-submit-btn.active:active { opacity: 0.8; }

/* ──────── Batch progress overlay ──────── */
.batch-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.batch-overlay-content {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    width: 100%;
    max-width: 360px;
    text-align: center;
}
.batch-overlay-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
}
.progress-bar-wrap { margin-bottom: 12px; }
.progress-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fde68a, #86efac);
    border-radius: 5px;
    width: 0;
    transition: width 0.3s ease;
}
.progress-text {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

/* ──────── Confirmation modal ──────── */
.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 310;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.confirm-dialog {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px 20px;
    width: 100%;
    max-width: 340px;
    text-align: center;
}
.confirm-message {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
    line-height: 1.5;
}
.confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.confirm-btn {
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    min-height: 48px;
    transition: opacity 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.confirm-btn:active { opacity: 0.7; }
.confirm-btn-submit {
    background: #f59e0b;
    color: #fff;
}
.confirm-btn-cancel {
    background: #f0f0f0;
    color: #666;
}

/* ──────── 성공 페이지 ──────── */
.success-page { text-align: center; padding: 40px 0; }
.success-icon { font-size: 64px; margin-bottom: 16px; }
.success-message { font-size: 16px; color: #666; margin-bottom: 32px; }
.success-actions { display: flex; flex-direction: column; gap: 12px; }

/* ──────── 빈 상태 ──────── */
.empty-state { text-align: center; padding: 40px 20px; color: #888; }
.empty-state p { margin-bottom: 12px; }

.back-link {
    display: block;
    text-align: center;
    color: #888;
    text-decoration: none;
    font-size: 14px;
    margin-top: 20px;
    padding: 8px;
}

/* ══════════════════════════════════
   관리자 페이지
   ══════════════════════════════════ */

.admin-body { background: #f8f9fa; }

.admin-login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}
.admin-login-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
}
.admin-login-box h1 {
    margin-bottom: 24px;
    font-size: 24px;
}

.admin-header {
    background: #3c1e1e;
    color: #fff;
    padding: 0 20px;
}
.admin-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 56px;
    flex-wrap: wrap;
    gap: 4px 0;
    padding: 8px 0;
}
.admin-logo {
    font-size: 18px;
    font-weight: 700;
    color: #fee500;
    text-decoration: none;
}
.admin-nav { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.admin-nav a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}
.admin-nav a:hover, .admin-nav a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.admin-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
}
.admin-main h1 { font-size: 24px; margin-bottom: 20px; }
.admin-main h2 { font-size: 18px; margin: 24px 0 12px; }

.admin-search {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.admin-search input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}
.admin-search input:focus { border-color: #fee500; }

.admin-empty {
    color: #888;
    text-align: center;
    padding: 40px;
}

/* 통계 카드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.stat-number { font-size: 32px; font-weight: 800; color: #3c1e1e; }
.stat-label { font-size: 13px; color: #888; margin-top: 4px; }

/* 최근 메시지 (레거시) */
.recent-messages { display: flex; flex-direction: column; gap: 4px; }
.recent-msg {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 8px;
    font-size: 13px;
    align-items: center;
}
.msg-reviewer { font-weight: 600; min-width: 120px; }
.msg-sender {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 36px;
    text-align: center;
}
.msg-sender.bot { background: #e3f2fd; color: #1565c0; }
.msg-sender.user { background: #fff8e1; color: #f57f17; }
.msg-text { color: #666; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 최근 활동 피드 */
.recent-activities { display: flex; flex-direction: column; gap: 2px; }
.activity-item {
    display: flex; gap: 10px; padding: 10px 12px;
    background: #fff; border-radius: 8px; font-size: 13px; align-items: flex-start;
}
.activity-item.status { border-left: 3px solid #e0e0e0; }
.activity-item.chat { border-left: 3px solid #fff8e1; }
.act-icon { font-size: 16px; flex-shrink: 0; line-height: 1.4; }
.act-body { flex: 1; min-width: 0; }
.act-main { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.act-who { font-weight: 600; white-space: nowrap; }
.act-text { color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-time { font-size: 11px; color: #aaa; margin-top: 2px; }
.act-status-badge {
    font-size: 11px; padding: 1px 8px; border-radius: 10px; font-weight: 600; white-space: nowrap;
}
.act-status-badge.신청 { background: #e3f2fd; color: #1565c0; }
.act-status-badge.가이드전달 { background: #e8f5e9; color: #2e7d32; }
.act-status-badge.구매캡쳐대기 { background: #fff3e0; color: #e65100; }
.act-status-badge.리뷰대기 { background: #f3e5f5; color: #7b1fa2; }
.act-status-badge.리뷰제출 { background: #e8eaf6; color: #283593; }
.act-status-badge.입금대기 { background: #fff8e1; color: #f57f17; }
.act-status-badge.입금완료 { background: #e8f5e9; color: #2e7d32; }
.act-status-badge.취소 { background: #ffebee; color: #c62828; }
.act-status-badge.타임아웃취소 { background: #fbe9e7; color: #bf360c; }

/* 관리자 테이블 */
.admin-table-wrap { overflow-x: auto; margin-bottom: 20px; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.admin-table th, .admin-table td {
    padding: 10px 12px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}
.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}
.admin-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: #e8f5e9;
    color: #2e7d32;
}

/* 대화 뷰어 */
.chat-viewer-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    min-height: 400px;
}
.reviewer-list-panel {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    overflow-y: auto;
    max-height: 600px;
}
.reviewer-list-panel h3 { font-size: 14px; margin-bottom: 12px; }
.reviewer-list-item {
    display: block;
    padding: 8px 10px;
    text-decoration: none;
    color: #333;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 2px;
}
.reviewer-list-item:hover { background: #f5f5f5; }
.reviewer-list-item.active { background: #fee500; font-weight: 600; }

.chat-view-panel {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    overflow-y: auto;
    max-height: 600px;
}
.chat-view-panel h3 { font-size: 14px; margin-bottom: 12px; }

.admin-chat-messages { display: flex; flex-direction: column; gap: 8px; }
.admin-chat-msg { display: flex; flex-direction: column; }
.admin-chat-msg.bot { align-items: flex-start; }
.admin-chat-msg.user { align-items: flex-end; }
.admin-chat-msg .msg-bubble {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
}
.admin-chat-msg.bot .msg-bubble {
    background: #f0f0f0;
    border-top-left-radius: 4px;
}
.admin-chat-msg.user .msg-bubble {
    background: #fee500;
    border-top-right-radius: 4px;
}
.msg-meta { font-size: 11px; color: #999; margin-top: 2px; }
.rate-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    opacity: 0.5;
}
.rate-btn:hover { opacity: 1; }

/* ──────── 퀵 버튼 ──────── */
.quick-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 0;
    margin-left: 38px;
}
.quick-btn {
    padding: 12px 16px;
    background: #fff;
    border: 1.5px solid #fee500;
    width: 100%;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #3c1e1e;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.15s;
}
.quick-btn:active {
    background: #fee500;
    transform: scale(0.96);
}

.chat-action-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #4a90d9;
    color: #fff !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s;
}
.chat-action-btn:active {
    background: #357abd;
}

/* ──────── 인라인 버튼 (서버 전송) ──────── */
.inline-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}
.inline-buttons.disabled { opacity: 0.5; pointer-events: none; }
.inline-btn {
    padding: 12px 18px;
    background: #fffef8;
    border: 1.5px solid #e8910c;
    width: 100%;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
    cursor: pointer;
    transition: all 0.15s;
}
.inline-btn:hover { background: #fef3c7; }
.inline-btn:active { background: #fef3c7; transform: scale(0.97); }
.inline-btn:disabled { opacity: 0.5; cursor: default; }
.inline-btn-danger {
    border-color: #e74c3c;
    color: #e74c3c;
}
.inline-btn-danger:active { background: #fce4e4; }
.inline-btn-secondary {
    border-color: #ccc;
    color: #888;
}
.inline-btn-secondary:active { background: #f0f0f0; }

/* ──────── 캠페인 카드 (아코디언) ──────── */
.campaign-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
    margin-left: 38px;
    max-width: calc(100% - 38px);
}
.campaign-cards.disabled { opacity: 0.5; pointer-events: none; }
.campaign-card {
    background: #fffef8;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #f0ebe0;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.campaign-card.campaign-card-expanded {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    border-color: #fbbf24;
}

/* 헤더 (항상 표시, 클릭으로 토글) */
.campaign-card-header.campaign-card-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.campaign-card-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.campaign-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    word-break: break-word;
}
.campaign-closed {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #94a3b8;
    padding: 3px 10px;
    border-radius: 8px;
}
.campaign-remain-badge {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #6366f1;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
}
.campaign-card-arrow {
    font-size: 12px;
    color: #999;
    transition: transform 0.25s ease;
    flex-shrink: 0;
    margin-left: 8px;
}
.campaign-card-expanded .campaign-card-arrow {
    transform: rotate(180deg);
}

.campaign-urgent {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #e74c3c;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
.campaign-closed {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #888;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
}

/* 상세 영역 (접힘/펼침) */
.campaign-card-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 16px;
}
.campaign-card-expanded .campaign-card-detail {
    max-height: 500px;
    padding: 0 16px 14px;
}

.campaign-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}
.campaign-card-row {
    font-size: 13px;
    color: #555;
}
.campaign-card-row.remaining { font-weight: 600; color: #333; }
.campaign-card-row.remaining.urgent { color: #e74c3c; }
.campaign-card-icon { margin-right: 4px; }

/* 내 진행 이력 */
.campaign-card-history {
    border-top: 1px solid #eee;
    padding-top: 8px;
    margin-top: 8px;
    font-size: 13px;
}
.campaign-card-history-title {
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}
.campaign-card-history-item {
    color: #666;
    padding-left: 8px;
}

/* 신청 버튼 */
.campaign-card-btn-disabled {
    background: #ccc !important;
    color: #888 !important;
    cursor: not-allowed;
}
.campaign-card-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #f59e0b;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 4px;
}
.campaign-card-btn:active { background: #d97706; transform: scale(0.98); }

/* ──────── 관리자 버튼 ──────── */
.admin-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}
.admin-btn:hover { background: #f5f5f5; }
.admin-btn-sm { padding: 4px 10px; font-size: 12px; }
.admin-btn-primary {
    background: #3c1e1e;
    color: #fff;
    border-color: #3c1e1e;
}
.admin-btn-primary:hover { background: #5a3030; }

/* ──────── 관리자 폼 ──────── */
.admin-form {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.admin-subtitle {
    font-size: 14px;
    color: #888;
    margin: -12px 0 20px 0;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}
.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #fee500;
}
.form-group-full { grid-column: 1 / -1; }
.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ──────── 관리자 플래시 메시지 ──────── */
.admin-flash {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #2e7d32;
    font-size: 14px;
}

/* ══════════════════════════════════
   리뷰어 웹 UI
   ══════════════════════════════════ */

/* ──────── 캠페인 검색 ──────── */
.campaign-search-wrap {
    position: relative;
    margin-bottom: 16px;
}
.campaign-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
    opacity: 0.5;
}
.campaign-search-input {
    width: 100%;
    padding: 12px 40px 12px 40px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 15px;
    outline: none;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}
.campaign-search-input:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251,191,36,0.15);
}
.campaign-search-input::placeholder { color: #b0b0b0; }
.campaign-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #e5e7eb;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    color: #666;
    cursor: pointer;
    padding: 0;
}
.campaign-search-clear:active { background: #d1d5db; }

/* ──────── 캠페인 목록 ──────── */
.campaign-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.campaign-list .campaign-card {
    margin-left: 0;
    max-width: 100%;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.campaign-list .campaign-card:active {
    transform: scale(0.985);
}
.campaign-list .campaign-card-closed {
    opacity: 0.5;
    cursor: default;
}
.campaign-list .campaign-card-closed:active {
    transform: none;
}
.campaign-card-detail-row {
    display: flex;
    gap: 8px;
    padding: 0 16px 8px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}
.campaign-card-store { font-weight: 500; }
.campaign-card-price { color: #333; }
.campaign-card-fee { color: #4caf50; font-weight: 600; }
.campaign-card-time {
    font-size: 12px;
    color: #888;
    padding: 0 16px 10px;
}
.campaign-card-time.closed { color: #e74c3c; }
.campaign-apply-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 6px rgba(34,197,94,0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}
.campaign-apply-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(34,197,94,0.2);
}
.campaign-list .campaign-card-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
}
.campaign-card-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.campaign-card-my {
    font-size: 13px;
    color: #555;
    padding: 6px 16px 12px;
    border-top: 1px solid #f0f0f0;
}
.campaign-card-my-title {
    font-weight: 600;
    color: #888;
    font-size: 12px;
    margin-bottom: 4px;
}
.my-history-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
}
.my-history-status {
    font-size: 12px;
    color: #888;
}
.history-action-btn {
    padding: 3px 10px;
    background: #fee500;
    color: #3c1e1e;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    margin-left: auto;
}
.history-action-btn:active { opacity: 0.7; }

/* ──────── 캠페인 상세 ──────── */
.back-link-top {
    display: inline-block;
    color: #999;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 10px;
    padding: 2px 0;
}
.detail-image {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
}
.detail-image img {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    display: block;
}
.detail-title {
    font-size: 18px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 4px;
    line-height: 1.4;
}
.detail-store {
    color: #999;
    font-size: 13px;
    margin-bottom: 14px;
}
.detail-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.detail-stat {
    flex: 1;
    background: #f8f8f8;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
}
.detail-stat-number {
    font-size: 20px;
    font-weight: 800;
    color: #1c1c1e;
    display: block;
    line-height: 1.2;
}
.detail-stat-label {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
.detail-info {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid #f0f0f0;
}
.detail-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 7px 0;
    font-size: 13px;
    border-bottom: 1px solid #f5f5f5;
}
.detail-info-row:last-child { border-bottom: none; }
.detail-info-row .label {
    color: #999;
    flex-shrink: 0;
    margin-right: 12px;
}
.detail-section {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid #f0f0f0;
}
.detail-section-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1c1c1e;
}
.detail-guide-text {
    font-size: 13px;
    line-height: 1.7;
    color: #666;
    word-break: break-word;
    overflow-wrap: break-word;
}
.detail-my-ids {
    background: #f8f8f8;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
    margin-bottom: 12px;
    color: #555;
}
.detail-my-ids .label { color: #999; }
.detail-action { margin-top: 16px; margin-bottom: 16px; }

/* ──────── 신청 페이지 ──────── */
.apply-campaign-info {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.apply-campaign-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.apply-campaign-store { font-size: 14px; color: #888; }
.apply-campaign-remaining { font-size: 14px; color: #4caf50; font-weight: 600; margin-top: 4px; }

.apply-step {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.apply-step-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

.apply-count-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.count-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: #fff;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.count-btn:active { background: #f5f5f5; }
.count-display { font-size: 32px; font-weight: 800; min-width: 40px; text-align: center; }
.apply-count-hint { text-align: center; font-size: 13px; color: #888; margin-top: 8px; }

.apply-id-group { margin-bottom: 16px; }
.apply-id-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}
.apply-id-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    -webkit-appearance: none;
}
.apply-id-input:focus { border-color: #fee500; }

.apply-id-suggest {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
}
.suggest-label { font-size: 12px; color: #888; }
.suggest-btn {
    padding: 4px 12px;
    border: 1px solid #fee500;
    border-radius: 16px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    color: #3c1e1e;
}
.suggest-btn:active { background: #fee500; }

.apply-actions {
    display: flex;
    gap: 12px;
}

/* ──────── 태스크 페이지 ──────── */
.task-deadline-timer {
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}
.task-deadline-timer .timer-icon { margin-right: 4px; }
.task-deadline-timer strong { font-size: 18px; margin: 0 4px; }
.task-deadline-timer .timer-deadline { font-weight: 400; color: #666; font-size: 12px; }
.timer-normal { background: #e8f5e9; color: #2e7d32; }
.timer-warning { background: #fff3e0; color: #e65100; }
.timer-danger { background: #ffebee; color: #c62828; animation: timer-pulse 1s infinite; }
.timer-expired { font-size: 16px; }
@keyframes timer-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.timer-extend-btn {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 12px;
    background: #fff;
    color: #c62828;
    border: 1px solid #ef9a9a;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    vertical-align: middle;
}
.timer-extend-btn:hover { background: #ffebee; }

.task-header {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.task-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.task-subtitle { font-size: 14px; color: #888; margin-bottom: 8px; }

.task-guide-section {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.task-guide-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #3c1e1e;
}
.task-guide-content {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}
.task-guide-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.task-guide-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}
.task-guide-row:last-child { border-bottom: none; }
.task-guide-row .label { color: #888; }
.task-guide-row .value.highlight { color: #e74c3c; font-weight: 600; }
.task-product-link {
    color: #4a90d9;
    text-decoration: underline;
    font-size: 14px;
    word-break: break-all;
}

.task-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 20px 0;
}

.task-capture-section {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.task-capture-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}
.task-capture-hint {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}
.task-capture-upload {
    margin-bottom: 12px;
}
.capture-preview {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #eee;
}

/* AI 검수 결과 */
.ai-verifying {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 8px;
    font-size: 14px;
    color: #1565c0;
}
.reviewer-spinner-sm {
    width: 20px;
    height: 20px;
    border: 3px solid #90caf9;
    border-top-color: #1565c0;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.ai-result {
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 8px;
}
.ai-pass {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
}
.ai-warn {
    background: #fff3e0;
    color: #e65100;
}
.ai-warn strong { display: block; margin-bottom: 4px; }
.ai-warn-note { font-size: 12px; color: #888; margin-top: 4px; }
.ai-reject {
    background: #ffcdd2;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}
.ai-reject strong { display: block; margin-bottom: 4px; font-size: 16px; }
.ai-error {
    background: #fce4ec;
    color: #c62828;
}

/* 폼 섹션 */
.task-form-section {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.task-form-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}
.task-form-hint {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}
.task-form-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
}
.task-form-section .form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    -webkit-appearance: none;
}
.task-form-section .form-group input:focus {
    border-color: #fee500;
}

/* 태스크 완료 */
.task-done {
    text-align: center;
    padding: 40px 0;
}
.task-done h2 { font-size: 22px; margin-bottom: 8px; }
.task-done p { color: #666; margin-bottom: 4px; }

/* 반려 알림 */
.task-reject-notice {
    background: #fce4ec;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ──────── 내 작업 페이지 ──────── */
.my-item-action {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}
.my-item-action .btn-sm {
    padding: 7px 12px;
    font-size: 13px;
    white-space: nowrap;
}
.my-item-remark {
    color: #e74c3c;
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
    padding: 4px 8px;
    background: #fce4ec;
    border-radius: 6px;
}
.my-status-text {
    font-size: 13px;
    color: #888;
    font-weight: 500;
}
.my-status-text.done { color: #4caf50; }

/* 아이디별 행 (그룹 카드) */
.id-list-section { margin-top: 8px; }
.id-list-section > .label { font-size: 12px; color: #999; display: block; margin-bottom: 4px; }
.id-row {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 8px; background: #f9f9f9; border-radius: 6px; margin-bottom: 4px;
    flex-wrap: wrap;
}
.id-row .id-name {
    font-weight: 600; font-size: 14px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    min-width: 0; flex: 1 1 0;
}
.id-row .status-badge { flex-shrink: 0; margin-left: auto; }
.id-row .id-action { flex-shrink: 0; white-space: nowrap; }
.id-remark {
    color: #e74c3c; font-size: 11px;
    flex-basis: 100%; padding-left: 2px; margin-top: -2px;
}
.id-row.purchase-rejected { background: #fef2f2; border: 1px solid #fecaca; }
.btn-xs { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.my-status-text-sm { font-size: 11px; color: #888; }
.my-status-text-sm.done { color: #4caf50; }

/* ──────── 토스트 ──────── */
.reviewer-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    z-index: 500;
    opacity: 0;
    transition: all 0.3s;
    max-width: 90%;
    text-align: center;
}
.reviewer-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.reviewer-toast-info { background: #333; color: #fff; }
.reviewer-toast-success { background: #2e7d32; color: #fff; }
.reviewer-toast-error { background: #c62828; color: #fff; }

/* ──────── 로딩 오버레이 ──────── */
.reviewer-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 400;
}
.reviewer-loading-content {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
}
.reviewer-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #fee500;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}
.reviewer-loading-text {
    font-size: 14px;
    color: #666;
}

/* ──────── 플로팅 채팅 버튼 + 모달 ──────── */
.chat-float-btn {
    position: fixed;
    bottom: 72px;
    right: 16px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fbbf24;
    border: none;
    box-shadow: 0 2px 12px rgba(251,191,36,0.3);
    cursor: pointer;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.chat-float-btn:active { transform: scale(0.92); }
.chat-float-icon { font-size: 24px; }
.chat-float-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.chat-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 300;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.chat-modal {
    width: 100%;
    max-width: 480px;
    height: 85vh;
    background: #fff;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: chatModalSlideUp 0.25s ease-out;
}
@keyframes chatModalSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.chat-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    flex-shrink: 0;
}
.chat-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}
.chat-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.chat-modal-iframe {
    flex: 1;
    border: none;
    width: 100%;
    min-height: 0;
}

/* ──────── 채팅 안내 배너 ──────── */
.chat-cta {
    display: flex; align-items: center; gap: 8px;
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px;
    padding: 10px 14px; margin: 12px 0; cursor: pointer;
    font-size: 13px; color: #1e40af; font-weight: 600;
    transition: background 0.15s;
}
.chat-cta:hover { background: #dbeafe; }
.chat-cta .chat-cta-icon { font-size: 18px; flex-shrink: 0; }
.chat-cta .chat-cta-text { flex: 1; }
.chat-cta .chat-cta-arrow { color: #3b82f6; font-size: 16px; }

/* ──────── 반응형 ──────── */
@media (max-width: 768px) {
    .admin-header-inner {
        flex-direction: column;
        align-items: flex-start;
        height: auto !important;
        min-height: unset;
        padding: 10px 0;
        gap: 8px;
    }
    .admin-logo { margin-bottom: 2px; }
    .admin-nav {
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
    }
    .admin-nav a { font-size: 12px; padding: 6px 10px; }
    .chat-viewer-layout {
        grid-template-columns: 1fr;
    }
    .reviewer-list-panel { max-height: 200px; }
    .form-grid { grid-template-columns: 1fr; }
}
