/* 정부사업 통합검색 시스템 - CSS 스타일 */

/* ── 디자인 토큰 ── */
:root {
    --color-primary: #4a90d9;
    --color-primary-dark: #2563eb;
    --color-primary-light: #7bb3e8;
    --color-primary-bg: #eff6ff;
    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;
    --color-success: #16a34a;
    --color-success-bg: #dcfce7;
    --color-warning: #d97706;
    --color-warning-bg: #fef3c7;
    --color-danger: #dc2626;
    --color-danger-bg: #fee2e2;
    --color-info: #2563eb;
    --color-info-bg: #dbeafe;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.08);
    --bottom-tab-height: 56px;
    --ad-reserved: 40px;  /* 광고 배너 높이 (flex fallback용) */
    /* 2026-04-09: 레이어 체계 — z-index 중앙 관리 */
    --z-sticky: 100;        /* sticky 헤더, 필터 바 */
    --z-header: 1000;       /* 상단 헤더 */
    --z-dropdown: 2000;     /* 드롭다운 메뉴, 유저 메뉴 */
    --z-overlay: 10000;     /* 필터/면허/달력 다이얼로그 오버레이 */
    --z-overlay-child: 10100; /* 오버레이 위 자식 (면허 선택 등) */
    --z-modal: 30000;       /* 상세 모달, 인박스 */
    --z-modal-child: 40000; /* 상세 모달 위 자식 (과거 공고, PDF 뷰어, 문서요약) */
    --z-system: 50000;      /* 채팅 패널, 시스템 UI */
    --z-toast: 90000;       /* 토스트 알림 */
    --z-popup: 100000;      /* 공지 팝업, 최상위 */
}

/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
}

html {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Pretendard', 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background: #ffffff;
    height: 100%;
    overflow: hidden;
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    flex: 1;
    min-height: 0;
    margin: 0 auto;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

@media (min-width: 768px) {
    .container {
        padding: 0 24px;
        max-width: 100%;
    }
}

/* 헤더 스타일 */
header {
    margin-bottom: 0;
    padding: 8px 16px;
    background: #ffffff;
    color: var(--color-text);
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    text-align: left;
    flex: 1;
}

header h1 {
    font-size: 1.2rem;
    margin-bottom: 0;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.5px;
}

.version-pill {
    display: none;
}

header p {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    opacity: 1;
}

/* 알림 버튼 */
/* 알림 버튼 상태 — header-icon-btn 위에 적용 */
.notification-btn {
    position: relative;
}

.notification-btn.enabled::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 4px;
    width: 7px;
    height: 7px;
    background: var(--color-success);
    border-radius: 50%;
    border: 1.5px solid #fff;
}

.notification-btn.disabled {
    opacity: 0.5;
}

.notification-btn.unsupported {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 헤더 액션 버튼 그룹 */
.header-actions {
    display: flex;
    gap: 2px;
    align-items: flex-start;
    position: relative;
    overflow: visible;
}

/* 헤더 아이콘 그룹 — 페이지 특화 / 공통 분리 */
.header-group {
    display: flex;
    gap: 2px;
    align-items: flex-start;
}
.header-group.page-nav {
    padding-right: 6px;
    border-right: 1px solid rgba(255,255,255,0.15);
    margin-right: 4px;
}

/* 헤더 아이콘 버튼 — 공통 */
.header-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 4px 6px 2px;
    cursor: pointer;
    transition: background 0.15s;
    color: var(--color-text);
    text-decoration: none;
    min-width: 38px;
}

.header-icon-btn:hover {
    background: var(--color-border-light);
}
/* 2026-04-09: 헤더 아이콘 배지 (채팅 등) */
.header-badge {
    position: absolute; top: 0; right: 0; min-width: 16px; height: 16px;
    border-radius: 8px; background: #d32f2f; color: #fff;
    font-size: 0.6rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

.header-icon-btn:active {
    transform: scale(0.95);
}

.header-icon-emoji {
    font-size: 1.15rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.4rem;
    min-width: 1.4rem;
}

/* ── 웰컴 오버레이 ── */
/* 웰컴 오버레이 — 배경 블러만, 카드 배경 없음 */
.welcome-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(10, 12, 30, 0.45);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 0;
    cursor: pointer;
    opacity: 0; animation: welOverlayIn 0.4s ease forwards;
}
@keyframes welOverlayIn { to { opacity: 1; } }
.welcome-overlay.wel-closing { animation: welOverlayOut 0.6s ease forwards; }
@keyframes welOverlayOut { to { opacity: 0; } }
.welcome-content {
    text-align: center; max-width: 380px; padding: 20px;
}
/* 웰컴 로고 — "일이야" 글자 애니메이션 */
.welcome-logo {
    display: flex; align-items: baseline; justify-content: center;
    gap: 2px; margin-bottom: 12px; user-select: none;
}
.wel-char {
    font-size: 2.6rem; font-weight: 900; line-height: 1;
    display: inline-block;
    opacity: 0; transform: translateY(24px) scale(0.5);
    animation: welCharDrop 0.45s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.wel-char:nth-child(1) { animation-delay: 0.15s; color: #a5b4fc; }
.wel-char:nth-child(2) { animation-delay: 0.30s; color: #c4b5fd; }
.wel-char:nth-child(3) { animation-delay: 0.45s; color: #f9a8d4; }
@keyframes welCharDrop {
    0% { opacity: 0; transform: translateY(24px) scale(0.5) rotate(-8deg); }
    70% { opacity: 1; transform: translateY(-6px) scale(1.08) rotate(2deg); }
    85% { transform: translateY(2px) scale(0.97) rotate(-1deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
/* 글자 호버 시 통통 */
.wel-char:hover {
    animation: welCharBounce 0.4s ease;
}
@keyframes welCharBounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.25) rotate(-3deg); }
    70% { transform: scale(0.95) rotate(1deg); }
    100% { transform: scale(1) rotate(0); }
}
/* 도트 장식 — 로고 아래 작은 원 3개 */
.wel-dots {
    display: flex; gap: 6px; justify-content: center; margin-bottom: 4px;
}
.wel-dot {
    width: 6px; height: 6px; border-radius: 50%;
    opacity: 0; animation: welDotPop 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.wel-dot:nth-child(1) { background: #a5b4fc; animation-delay: 0.65s; }
.wel-dot:nth-child(2) { background: #c4b5fd; animation-delay: 0.75s; }
.wel-dot:nth-child(3) { background: #f9a8d4; animation-delay: 0.85s; }
@keyframes welDotPop {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}
.welcome-title {
    font-size: 1.15rem; font-weight: 800; color: #fff;
    margin: 16px 0 8px; letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.welcome-title em {
    font-style: normal;
    background: linear-gradient(135deg, #a5b4fc, #c4b5fd, #f9a8d4);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.welcome-sub {
    font-size: 0.88rem; color: rgba(255,255,255,0.7); line-height: 1.6; margin-bottom: 24px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.2);
}
.welcome-btn {
    padding: 10px 36px; border: none; border-radius: 10px;
    background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
    color: #fff; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: background 0.2s;
    backdrop-filter: blur(4px);
}
.welcome-btn:hover { background: rgba(255,255,255,0.25); }

/* AI 상담 아이콘 — 배경 없는 그라디언트 알파벳.
   부모 .header-icon-emoji가 flex 컨테이너이므로 vertical-align 불필요.
   drop-shadow는 수직 오프셋을 만드므로 제거. */
.ai-icon {
    display: inline-block;
    background: linear-gradient(135deg, #4f46e5, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Inter', 'Pretendard', system-ui, sans-serif;
    font-size: 1.15rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.06em;
    line-height: 1;
}

.header-icon-label {
    font-size: 0.5rem;
    font-weight: 600;
    opacity: 0.8;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

/* 2026-03-11: 로그인 버튼 — 배경색 제거, 비로그인 시 회색 아이콘 */
.login-btn .header-icon-emoji {
    filter: grayscale(1);
    opacity: 0.5;
}
.login-btn.logged-in .header-icon-emoji {
    filter: none;
    opacity: 1;
}

/* 관리자 버튼 — header-icon-btn으로 통합 */

/* 사용자 메뉴 드롭다운 */
.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: var(--z-dropdown);
    overflow: hidden;
}

.user-menu-header {
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.user-menu-header strong {
    display: block;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.user-menu-header small {
    display: block;
    color: #666;
    font-size: 0.75rem;
}

/* 크레딧 정보 섹션 (사용자 메뉴 내부) */
.user-menu-credit { padding: 10px 14px; border-bottom: 1px solid #e5e7eb; background: #f8fafc; }
.umc-loading { font-size: 0.75rem; color: #888; text-align: center; padding: 6px 0; }
.umc-row { display: flex; gap: 10px; margin-bottom: 6px; }
.umc-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; background: #fff; padding: 10px 8px; border-radius: 8px; border: 1px solid #e5e7eb; }
.umc-icon { font-size: 1.1rem; }
.umc-label { font-size: 0.68rem; color: #888; }
.umc-val { font-size: 1rem; font-weight: 800; color: #1e293b; letter-spacing: -0.02em; }
.umc-sub { font-size: 0.72rem; color: #059669; font-weight: 600; padding: 4px 0; text-align: center; }
.umc-va { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 8px; background: #eef2ff; border-radius: 6px; font-size: 0.72rem; }
.umc-va-label { color: #4b5563; font-weight: 600; white-space: nowrap; }
.umc-va-num { color: #1e40af; font-weight: 600; cursor: pointer; flex: 1; }
.umc-va-num:hover { text-decoration: underline; }
.umc-next { font-size: 0.68rem; color: #888; margin-top: 4px; text-align: right; }
.umc-link { display: block; font-size: 0.75rem; color: #1565c0; text-decoration: none; text-align: center; padding: 6px 0 2px; font-weight: 600; }
.umc-link:hover { text-decoration: underline; }

.user-menu-items {
    padding: 8px 0;
}

.user-menu-section {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    display: grid;
    gap: 8px;
}

.user-menu-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #6c757d;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.user-menu-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #333;
    background: #f8f9fa;
}

.user-menu-button {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: #fff;
    transition: all 0.2s ease;
}

.user-menu-button:disabled {
    background: #adb5bd;
    cursor: not-allowed;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.user-menu-item:hover {
    background: #f8f9fa;
}

.header-actions {
    position: relative;
}

/* 로그인 모달 스타일 */
.login-modal-content {
    max-width: 400px;
    padding: 0;
    overflow: hidden;
}

.login-modal-header {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.login-modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.login-modal-header p {
    opacity: 0.85;
    font-size: 0.9rem;
}

#loginForm {
    padding: 25px 20px 15px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #3949ab;
    box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.remember-me input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-password {
    color: #3949ab;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.3);
}

.login-submit-btn:active {
    transform: translateY(0);
}

.login-divider {
    display: flex;
    align-items: center;
    padding: 0 20px;
    margin: 10px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.login-divider span {
    padding: 0 15px;
    color: #888;
    font-size: 0.85rem;
}

.social-login {
    padding: 0 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.social-btn.kakao {
    background: #FEE500;
    color: #3C1E1E;
}

.social-btn.naver {
    background: #03C75A;
    color: white;
}

.login-footer {
    padding: 15px 20px 20px;
    text-align: center;
    background: #f8f9fa;
    font-size: 0.9rem;
}

.login-footer a {
    color: #3949ab;
    font-weight: 600;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

@media (min-width: 768px) {
    header {
        margin-bottom: 12px;
        padding: 12px 15px;
        border-radius: 10px;
    }
    
    header h1 {
        font-size: 1.3rem;
    }
    
    header p {
        font-size: 0.8rem;
    }
}

/* 2026-03-10: 검색 UI + 즐겨찾기 래퍼 — 데스크탑 2열, 모바일 1열 */
.search-bookmark-row {
    display: block; /* 모바일: 1열 */
}
.search-bookmark-side {
    display: none; /* 모바일에서 숨김 — 대시보드 즐겨찾기로 대체 */
}
@media (min-width: 768px) {
    .search-bookmark-row {
        display: flex;
        gap: 12px;
        /* 2026-03-12: 공고 현황과 좌우 정렬 — 대시보드 padding + 달력열 + gap 만큼 왼쪽 오프셋 */
        padding: 10px 16px 0 calc(16px + 240px + 8px);
        margin: 0;
        align-items: stretch;
    }
    .search-bookmark-row .search-section {
        flex: 1;
        min-width: 0;
    }
    .search-bookmark-side {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-width: 0;
        background: var(--color-surface);
        border: 1px solid var(--color-border-light);
        border-radius: 10px;
        overflow: hidden;
    }
    .search-bookmark-side-header {
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--color-text-secondary);
        padding: 8px 12px 6px;
        border-bottom: 1px solid var(--color-border-light);
        background: rgba(0,0,0,0.015);
    }
    .search-bookmark-side-list {
        flex: 1;
        overflow-y: auto;
        font-size: 0.78rem;
    }
    .search-bookmark-side-list .bm-side-item {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        border-bottom: 1px solid var(--color-border-light);
        cursor: pointer;
        transition: background 0.15s;
    }
    .search-bookmark-side-list .bm-side-item:hover {
        background: #f0f4ff;
    }
    .search-bookmark-side-list .bm-side-item:last-child {
        border-bottom: none;
    }
    .bm-side-name {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .bm-side-deadline {
        font-size: 0.7rem;
        color: #999;
        white-space: nowrap;
    }
    /* 2026-03-11: 진행중 공고 상태 강조 */
    .bm-side-status-open {
        color: #16a34a;
        font-weight: 600;
    }
    .bm-side-empty {
        padding: 16px 12px;
        text-align: center;
        color: #999;
        font-size: 0.78rem;
    }
    /* 2026-03-12: 모두 보기 링크 */
    .bm-side-viewall {
        display: block;
        padding: 8px 12px;
        text-align: center;
        color: var(--color-primary, #2563eb);
        font-size: 0.78rem;
        font-weight: 600;
        cursor: pointer;
        border-top: 1px solid var(--color-border-light, #e5e7eb);
    }
    .bm-side-viewall:hover {
        background: #f0f4ff;
    }
}
/* 2026-03-12: 1200px+ — 대시보드 달력 280px + gap 12px 에 맞춤 */
@media (min-width: 1200px) {
    .search-bookmark-row {
        padding-left: calc(16px + 280px + 12px);
    }
}
/* 2026-03-12: 1440px+ — 대시보드 padding 24px, gap 16px 에 맞춤 */
@media (min-width: 1440px) {
    .search-bookmark-row {
        padding-left: calc(24px + 280px + 16px);
        padding-right: 24px;
        gap: 16px;
    }
}
/* 2026-03-12: 헤더 챗봇 버튼 — 오버레이 열림 시 활성 표시 */
.header-icon-btn#consultToggleBtn.active {
    background: var(--color-primary, #2563eb);
    color: #fff;
    border-radius: 8px;
}
.header-icon-btn#consultToggleBtn.active .header-icon-label {
    opacity: 1;
    color: #fff;
}

/* 2026-03-12: 챗봇 오버레이 */
.consult-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 900;
    background: rgba(0,0,0,0.25);
    justify-content: flex-end;
    align-items: flex-start;
    padding: 60px 16px 20px;
}
.consult-overlay.open {
    display: flex;
}
.consult-overlay-panel {
    width: 420px;
    max-width: 95vw;
    max-height: calc(100vh - 100px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: consultSlideIn 0.2s ease-out;
}
@keyframes consultSlideIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}
.consult-overlay-panel .consult-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--color-border-light, #e5e7eb);
    background: #f9fbff;
    flex-shrink: 0;
}
.consult-overlay-panel .consult-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 8px;
    gap: 6px;
}
.consult-overlay-panel .consult-messages {
    flex: 1;
    min-height: 120px;
    max-height: none;
    overflow-y: auto;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #e1e5e9;
    background: #ffffff;
}
.consult-overlay-panel .consult-input-row {
    flex-shrink: 0;
}
.consult-overlay-btn {
    background: none;
    border: 1px solid var(--color-border-light, #e5e7eb);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--color-text-secondary, #666);
    transition: background 0.15s;
}
.consult-overlay-btn:hover {
    background: #f0f4ff;
}
.consult-close-btn {
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 8px;
    border: none;
}
@media (min-width: 768px) {
    .consult-overlay {
        justify-content: flex-end;
        padding-right: 16px;
    }
}
@media (min-width: 1440px) {
    .consult-overlay {
        padding-right: 24px;
    }
}
/* 2026-03-12: 즐겨찾기 전체 다이얼로그 */
.bm-dialog {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    margin: 10vh auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.bm-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}
.bm-dialog-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}
.bm-dialog-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.bm-dialog-close:hover {
    color: #334155;
}
.bm-dialog-body {
    overflow-y: auto;
    padding: 4px 0;
    flex: 1;
}
.bm-dialog-body .bm-side-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.85rem;
}
.bm-dialog-body .bm-side-item:hover {
    background: #f0f4ff;
}
.bm-dialog-body .bm-side-item:last-child {
    border-bottom: none;
}
.bm-dialog-body .bm-side-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bm-dialog-body .bm-side-deadline {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #64748b;
}
.bm-dialog-body .bm-side-status-open {
    color: #16a34a;
    font-weight: 600;
}

/* 검색 섹션 */
.search-section {
    background: #ffffff;
    padding: 10px 16px;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
    border-bottom: 1px solid var(--color-border-light);
}
/* 2026-03-08: 데스크탑 — 검색 영역 카드형 (래퍼가 중앙 정렬 담당) */
@media (min-width: 768px) {
    .search-section {
        max-width: none;
        margin: 0;
        padding: 8px 14px;
        border: 1px solid var(--color-border);
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        min-width: 540px;
    }
    .search-section .search-tabs {
        margin-bottom: 5px;
    }
    .search-section .search-box {
        margin-bottom: 4px;
    }
    .search-section .search-box input[type="text"] {
        padding: 7px 10px;
        font-size: 0.85rem;
    }
    .search-section .search-box button {
        padding: 7px 14px;
        font-size: 0.82rem;
    }
    /* 2026-03-10: 데스크탑 — 콤보박스/버튼 크기 유지 */
    .search-section .result-view-select {
        padding: 6px 28px 6px 10px;
        font-size: 0.82rem;
        min-width: 0;
        margin-left: auto;
    }
    .search-section .search-buttons {
        margin-bottom: 4px;
    }
    .search-section .search-buttons > button {
        padding: 6px 12px;
        font-size: 0.82rem;
    }
    /* [원위치용 view-filters 스타일 제거됨 — 현재 view-filters-inline 사용] */
    .search-section .type-filters {
        margin-left: -14px;
        margin-right: -14px;
        padding: 6px 14px 6px;
        border-bottom: none;
        margin-bottom: -8px;
        border-radius: 0 0 10px 10px;
        gap: 2px;
    }
    .search-section .type-filter-btn {
        padding: 4px 6px;
    }
    .search-section .type-filter-btn .filter-icon {
        font-size: 1.1rem;
    }
    .search-section .type-filter-btn .filter-name {
        font-size: 0.68rem;
    }
    .search-section .type-filter-btn .filter-count {
        font-size: 0.62rem;
    }
}

.search-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.search-tab-btn {
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.search-tab-btn.active {
    background: var(--color-primary);
    color: #ffffff;
    border-color: transparent;
    box-shadow: none;
}

.search-box {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.search-panel.hidden {
    display: none;
}

.search-mode-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.search-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid #e1e5e9;
    background: #f2f4f8;
}

.search-mode-toggle .mode-btn {
    border: none;
    background: transparent;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #5b6472;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.search-mode-toggle .mode-btn.active {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(26, 35, 126, 0.2);
}

.search-mode-hint {
    font-size: 0.75rem;
    color: #6a7685;
    flex: 1;
    min-width: 180px;
}

.ai-reason-wrapper {
    margin-bottom: 10px;
}

.ai-reason-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 4px;
}

#aiReasonText {
    width: 100%;
    border: 1px solid #dbe1ea;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #2d3748;
    background: #f7f9fc;
    resize: vertical;
    min-height: 64px;
}

.consult-panel {
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    background: #f9fbff;
}

.consult-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.consult-title {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.1;
    color: #1a237e;
}

.consult-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.consult-messages {
    max-height: 220px;
    overflow-y: auto;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #e1e5e9;
    background: #ffffff;
}

.consult-message {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.consult-message:last-child {
    margin-bottom: 0;
}

.consult-message .bubble {
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: 82%;
    word-break: keep-all;
}

.consult-message.user {
    align-items: flex-end;
}

.consult-message.user .bubble {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.consult-message.assistant {
    align-items: flex-start;
}

.consult-message.assistant .bubble {
    background: #eef2ff;
    color: #1f2937;
    border: 1px solid #dbe2f5;
    border-bottom-left-radius: 4px;
}

.consult-input-row {
    display: flex;
    gap: 8px;
}

#consultInput {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #dbe1ea;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#consultInput:focus {
    outline: none;
    border-color: #3949ab;
    box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.12);
}

.consult-send-btn {
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: #ffffff;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(57, 73, 171, 0.25);
}

.consult-hint {
    font-size: 0.75rem;
    color: #6a7685;
}

.consult-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.consult-suggestion-btn {
    border: 1px solid #d5dbea;
    background: #ffffff;
    color: #3949ab;
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.consult-suggestion-btn:hover {
    border-color: #3949ab;
    background: #eef2ff;
}

.consult-suggestion-btn.action {
    border-color: #1a237e;
    background: #eef2ff;
    color: #1a237e;
}

.consult-summary {
    border-radius: 8px;
    border: 1px solid #dbe1ea;
    background: #f7f9fc;
    padding: 8px 10px;
    font-size: 0.78rem;
    color: #2d3748;
    white-space: pre-line;
}


.consult-processing {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #5b6576;
    padding: 2px 4px;
}

.consult-processing-dots {
    display: inline-flex;
    gap: 4px;
}

.consult-processing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #3949ab;
    opacity: 0.35;
    animation: consultPulse 1s ease-in-out infinite;
}

.consult-processing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.consult-processing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes consultPulse {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.35;
    }
    50% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

.consult-quick-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.consult-quick-btn {
    border: 1px solid #d5dbea;
    background: #ffffff;
    color: #1a237e;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.consult-quick-btn:hover {
    border-color: #3949ab;
    color: #3949ab;
    background: #eef2ff;
}

.consult-quick-btn.yes {
    border-color: #3949ab;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: #ffffff;
}

.consult-quick-btn.no {
    border-color: #d5dbea;
    color: #5b6576;
}

@media (max-width: 480px) {
    .consult-input-row {
        flex-direction: column;
    }
    .consult-send-btn {
        width: 100%;
    }
}

header,
.search-buttons,
.search-mode-row,
.ai-reason-wrapper,
.search-tabs,
.consult-panel,
.type-filters,
.license-filter-card {
    transition: max-height 0.35s ease, opacity 0.35s ease, transform 0.35s ease, margin 0.35s ease, padding 0.35s ease;
    overflow: hidden;
    max-height: 1200px;
}

body.user-menu-open header,
body.user-menu-open .header-actions {
    overflow: visible;
}

body.results-scroll-compact header,
body.results-scroll-compact .search-buttons,
body.results-scroll-compact .search-mode-row,
body.results-scroll-compact .ai-reason-wrapper,
body.results-scroll-compact .search-tabs,
body.results-scroll-compact .consult-panel,
body.results-scroll-compact .type-filters,
body.results-scroll-compact .license-filter-card {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

body.results-scroll-compact .search-section {
    padding: 8px 16px;
    margin-bottom: 0;
}

body.results-scroll-compact .search-box {
    margin-bottom: 0;
}

.sticky-search-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    padding: 8px 16px 10px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 2s ease, opacity 2s ease;
    backdrop-filter: blur(10px);
}

.sticky-search-bar.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.sticky-search-inner {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

#stickySearchInput {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #cfd6e4;
    border-radius: 10px;
    font-size: 0.9rem;
}

#stickySearchInput:focus {
    outline: none;
    border-color: #3949ab;
    box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.15);
}

#stickySearchBtn {
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(57, 73, 171, 0.25);
    white-space: nowrap;
}

.search-section[data-active-tab="consult"] .license-filter-card,
.search-section[data-active-tab="ai"] .license-filter-card {
    display: none;
}

#searchKeyword {
    width: 100%;
    padding: 8px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: 14px;
    transition: all 0.2s ease;
    background: var(--color-bg);
}

#searchKeyword:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.12);
    background: #fff;
}

#aiSearchKeyword {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

#aiSearchKeyword:focus {
    outline: none;
    border-color: #3949ab;
    box-shadow: 0 0 0 4px rgba(57, 73, 171, 0.1);
}

#searchBtn,
#aiSearchBtn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 6px 14px !important;
    border-radius: var(--radius-pill);
    font-size: 13px !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    white-space: nowrap;
    min-height: 32px !important;
}

.refine-search-icon-btn {
    background: transparent;
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
    padding: 4px 8px;
    border-radius: var(--radius-pill);
    font-size: 15px;
    cursor: pointer;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}
.refine-search-icon-btn:hover {
    background: var(--color-primary-bg, #eef4ff);
}

#searchBtn:hover,
#aiSearchBtn:hover {
    background: var(--color-primary-dark);
    transform: none;
    box-shadow: none;
}

#searchBtn:active,
#aiSearchBtn:active {
    transform: scale(0.97);
}
/* 2026-04-09: 검색 버튼 스피너 */
.btn-spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
    border-radius: 50%; animation: btnSpin 0.6s linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }
#searchBtn:disabled { opacity: 0.8; cursor: wait; }

/* ── 최근 검색 드롭다운 (2026-03-07) ── */
.search-history-wrapper {
    position: relative;
    flex-shrink: 0;
}
.search-history-btn {
    background: #f5f5f5;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 4px 8px;
    font-size: 16px;
    cursor: pointer;
    min-height: 32px;
    color: #666;
    line-height: 1;
    transition: background 0.15s;
}
.search-history-btn:hover { background: #e9ecef; }
.search-history-btn:active { background: #dee2e6; }
.search-history-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 340px;
    max-width: 440px;
    max-height: 420px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 6px 0;
}
.search-history-dropdown.open { display: block; }
.search-history-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 14px 6px; border-bottom: 1px solid #eee;
    font-size: 12px; color: #888;
}
.search-history-header button {
    background: none; border: none; color: #e53935; font-size: 11px;
    cursor: pointer; padding: 2px 6px; border-radius: 4px;
}
.search-history-header button:hover { background: #fee; }
.search-history-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.12s;
}
.search-history-item:last-child { border-bottom: none; }
.search-history-item:hover { background: #f0f4ff; }
.sh-keyword {
    font-weight: 600; font-size: 13px; color: #222;
    margin-bottom: 3px; display: flex; align-items: center; gap: 6px;
}
.sh-keyword .sh-count {
    font-weight: 400; font-size: 11px; color: #999;
}
.sh-filters {
    font-size: 11px; color: #888; line-height: 1.5;
}
.sh-filters span { margin-right: 8px; }
.sh-time {
    font-size: 10px; color: #bbb; margin-top: 2px;
}
.search-history-empty {
    padding: 24px 14px; text-align: center;
    font-size: 12px; color: #aaa;
}
/* 재검색 확인 오버레이 */
.sh-confirm-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45); z-index: var(--z-modal);
    display: flex; align-items: center; justify-content: center;
}
.sh-confirm-box {
    background: #fff; border-radius: 14px; padding: 22px 24px;
    max-width: 400px; width: 90%; box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.sh-confirm-box h3 {
    font-size: 15px; margin: 0 0 12px; color: #222;
}
.sh-confirm-filters {
    background: #f8f9fa; border-radius: 8px; padding: 12px 14px;
    font-size: 12px; line-height: 1.7; color: #555; margin-bottom: 16px;
}
.sh-confirm-filters .sh-cf-row { display: flex; gap: 6px; }
.sh-confirm-filters .sh-cf-label { color: #999; min-width: 40px; flex-shrink: 0; }
.sh-confirm-filters .sh-cf-val { color: #333; font-weight: 500; }
.sh-confirm-actions {
    display: flex; gap: 8px; justify-content: flex-end;
}
.sh-confirm-actions button {
    padding: 8px 18px; border-radius: 8px; font-size: 13px;
    font-weight: 600; cursor: pointer; border: none;
}
.sh-confirm-actions .sh-btn-cancel {
    background: #f1f3f5; color: #666;
}
.sh-confirm-actions .sh-btn-cancel:hover { background: #e9ecef; }
.sh-confirm-actions .sh-btn-search {
    background: var(--color-primary, #3949ab); color: #fff;
}
.sh-confirm-actions .sh-btn-search:hover { opacity: 0.9; }
/* 3-choice 확인 다이얼로그: 당시 조건 vs 현재 조건 비교 레이아웃 (2026-03-07) */
.sh-confirm-dual {
    display: flex; gap: 12px; margin-bottom: 16px;
}
.sh-confirm-col {
    flex: 1; background: #f8f9fa; border-radius: 6px; padding: 10px 12px;
    font-size: 13px; line-height: 1.5;
}
.sh-confirm-col-title {
    font-weight: 600; margin-bottom: 6px; color: #333; font-size: 13px;
}
.sh-confirm-actions .sh-btn-current {
    background: #43a047; color: #fff;
}
.sh-confirm-actions .sh-btn-current:hover { opacity: 0.9; }
@media (max-width: 767px) {
    /* 2026-03-10: 모바일 검색 내역 화면 벗어남 방지 — fixed로 화면 폭에 맞춤 */
    .search-history-dropdown {
        position: fixed;
        top: auto;
        left: 8px;
        right: 8px;
        min-width: unset;
        max-width: none;
        width: auto;
        max-height: 60vh;
    }
    .sh-confirm-box { max-width: 340px; padding: 18px 16px; }
    .sh-confirm-dual { flex-direction: column; gap: 8px; }
    .sh-confirm-actions { flex-direction: column; gap: 6px; }
    .sh-confirm-actions button { width: 100%; }
    /* 2026-03-10: 모바일 — 8시간/7일 버튼 가로폭 축소, 콤보박스 축소 */
    .search-section .search-buttons > button {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
    .search-section .result-view-select {
        padding: 4px 20px 4px 6px;
        font-size: 0.75rem;
        min-width: 0;
    }
}

/* 버튼들을 검색란 아래 배치 */
.search-buttons {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scrollbar-color: transparent transparent;
}

.search-buttons::-webkit-scrollbar {
    height: 6px;
}

.search-buttons::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.search-buttons::-webkit-scrollbar-thumb {
    background: #3949ab;
    border-radius: 3px;
}

.search-buttons::-webkit-scrollbar-thumb:hover {
    background: #1a237e;
}

/* 2026-03-15: 버튼 2줄 캡션 허용 + 가로폭 축소 */
.search-buttons > button {
    min-width: 0;
    white-space: normal;
    flex-shrink: 0;
    padding: 4px 6px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
}
.search-buttons .new-items-btn {
    min-width: 30px;
}
.search-buttons .result-view-select {
    margin-left: auto; /* 우측 정렬 */
    flex-shrink: 0;
}
/* 검색 결과 숫자 표시 */
/* ── 결과내 검색 (2026-03-07) ── */
/* 2026-03-10: 결과내 버튼 → 콤보박스 교체 */
.result-view-select {
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid var(--color-primary);
    background: #fff;
    color: var(--color-primary);
    border-radius: var(--radius-pill);
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%234a90d9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    outline: none;
    vertical-align: middle;
    margin-left: 4px;
}
.result-view-select:focus {
    border-color: var(--color-primary-dark);
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
}
.result-view-select option {
    font-weight: 500;
    color: var(--color-text);
}
/* 레거시 — 기존 결과내 버튼 (제거 예정) */
.refine-search-btn {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid var(--color-primary);
    background: #fff;
    color: var(--color-primary);
    border-radius: var(--radius-pill);
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
}
.refine-search-btn:hover, .refine-search-btn.active {
    background: var(--color-primary);
    color: #fff;
}
.refine-search-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f0f4ff;
    border: 1px solid var(--color-primary-light, #b3d1ff);
    border-radius: var(--radius-md);
    margin-bottom: 6px;
}
.refine-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}
.refine-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
}
.refine-label-exclude {
    color: var(--color-danger, #d32f2f);
}
.refine-input {
    flex: 1;
    min-width: 120px;
    max-width: 240px;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: var(--radius-sm);
    outline: none;
}
.refine-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(59,130,246,.15);
}
.refine-input-exclude:focus {
    border-color: var(--color-danger, #d32f2f);
    box-shadow: 0 0 0 2px rgba(211,47,47,.15);
}
.refine-clear-btn {
    padding: 5px 10px;
    font-size: 12px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
}
.refine-clear-btn:hover {
    background: #f5f5f5;
}
/* 2026-04-21: 결과내 검색 → 제외 단어 선택 버튼 */
.refine-pick-btn {
    padding: 5px 10px;
    font-size: 12px;
    border: 1px solid var(--color-danger, #d32f2f);
    background: #fff5f5;
    color: var(--color-danger, #d32f2f);
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
}
.refine-pick-btn:hover {
    background: #fee2e2;
}
.refine-result-count {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

/* secondary-btn은 search-buttons에서 자동으로 스타일 적용 */

@media (min-width: 768px) {
    .search-section {
        padding: 15px;
    }
    
    .search-box {
        flex-direction: row;
        overflow-x: visible;
    }
    
    #searchKeyword {
        flex: 1;
        min-width: auto;
    }

    #aiSearchKeyword {
        flex: 1;
        min-width: auto;
    }
    
    #searchBtn,
    #aiSearchBtn {
        min-width: 100px;
    }
    
    #searchBtn:hover,
    #aiSearchBtn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(26, 35, 126, 0.4);
    }
}

/* 검색 도움말 */
.search-help {
    display: none;
}

.search-help strong {
    color: #0d47a1;
}

/* 유형 필터 - 버튼 스타일 */
/* 2026-03-15: 데이터 상태 분류 — 인라인 (search-buttons 내부) */
.view-filters-inline {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-right: auto;
}
.view-filters-inline .view-filter-btn {
    display: inline-flex;
    flex-direction: column !important;
    align-items: center;
    gap: 0 !important;
    padding: 2px 5px !important;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-md, 8px);
    font-size: 20px !important;
    line-height: 1 !important;
    color: var(--color-text-muted, #64748b);
    transition: background 0.15s;
    white-space: nowrap;
    flex-shrink: 1 !important;
}
.view-filters-inline .view-filter-btn:hover { background: var(--color-hover-bg, #f1f5f9); }
.view-filters-inline .view-filter-btn.active {
    color: var(--color-primary, #4a90d9);
    background: var(--color-primary-bg, #eef4ff);
    font-weight: 600;
}
.view-filters-inline .view-label {
    font-size: 0.7rem;
    line-height: 1.1;
    margin-top: 1px;
}
.view-filters-inline .filter-count {
    font-size: 0.65rem;
    font-weight: 600;
}
/* 2026-04-04: phase 분리 검색 — 물결 로딩 애니메이션 */
@keyframes phaseWave {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.view-filters-inline .filter-count.phase-loading {
    display: inline-block;
    min-width: 22px;
    height: 10px;
    border-radius: 4px;
    background: linear-gradient(90deg, #d1d5db 25%, #9ca3af 50%, #d1d5db 75%);
    background-size: 200% 100%;
    animation: phaseWave 1.2s ease-in-out infinite;
    color: transparent !important;
    vertical-align: middle;
}

/* [원위치용 .view-filters / .view-filter-btn 전체 제거됨 — .view-filters-inline 사용 중] */

.type-filters {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: hidden !important;
    gap: 1px;
    margin-bottom: 0;
    padding: 4px 6px;
    background: #ffffff;
    border-radius: 0;
    border-bottom: 1px solid var(--color-border-light);
    width: 100%;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
}

.type-filters::-webkit-scrollbar {
    height: 6px;
}

.type-filters::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 3px;
}

.type-filters::-webkit-scrollbar-track {
    background: transparent;
}

.type-filter-btn {
    --chip-bg: #ffffff;
    --chip-color: var(--color-text-secondary);
    --chip-border: transparent;
    --chip-active-bg: var(--color-primary-bg);
    --chip-active-color: var(--color-primary);
    display: flex !important;
    flex-shrink: 1 !important;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 4px 4px;
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    border-radius: var(--radius-md);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
    color: var(--chip-color);
    box-shadow: none;
    min-height: auto;
    min-width: 0;
    /* 2026-04-11: iOS long-press 텍스트 선택/프리뷰 팝업 차단 (재정렬 모드 진입 2초간에도 적용되도록 base 에 둠) */
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

a.type-filter-btn {
    text-decoration: none;
}

.type-filter-btn:hover {
    background: var(--color-bg);
    transform: none;
    box-shadow: none;
}

.type-filter-btn.active {
    background: var(--chip-active-bg);
    color: var(--chip-active-color);
    border-color: transparent;
    box-shadow: none;
    font-weight: 700;
}

.type-filter-btn .filter-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.type-filter-btn .filter-name {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    color: var(--color-text) !important;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-top: 2px;
}

.type-filter-btn.active .filter-name {
    font-weight: 700 !important;
    color: var(--color-primary) !important;
}

.type-filter-btn .filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1;
    color: var(--color-text-muted);
}

.type-filter-btn.active .filter-count {
    background: transparent;
    color: var(--color-primary);
}

/* 카테고리별 색상 — 통일된 톤 */
.type-filter-btn[data-type="all"],
.type-filter-btn[data-type="bid"],
.type-filter-btn[data-type="bid_purchase"],
.type-filter-btn[data-type="bid_service"],
.type-filter-btn[data-type="rnd"],
.type-filter-btn[data-type="subsidy"],
.type-filter-btn[data-type="success_bid"],
.type-filter-btn[data-type="bizinfo"],
.type-filter-btn[data-type="private_bid"] {
    --chip-bg: transparent;
    --chip-color: var(--color-text-secondary);
    --chip-border: transparent;
    --chip-active-bg: var(--color-primary-bg);
    --chip-active-color: var(--color-primary);
}

.type-filter-btn[data-type="cancelled"] {
    --chip-bg: transparent;
    --chip-color: var(--color-text-secondary);
    --chip-border: transparent;
    --chip-active-bg: #fef2f2;
    --chip-active-color: #dc2626;
}
.type-filter-btn[data-type="cancelled"].active .filter-name {
    color: #dc2626 !important;
}
.type-filter-btn[data-type="cancelled"].active .filter-count {
    color: #dc2626;
}

/* ── 픽미업! 재정렬 모드 ──────────────────────────────
 * type_filter_reorder.js — long-press 2초 → 통통 튀는 애니메이션 + 드래그 재정렬
 */
@keyframes pickme-bounce {
    0%, 100% { transform: translateY(0) rotate(-1.5deg); }
    50%      { transform: translateY(-5px) rotate(1.5deg); }
}
.type-filters.reorder-mode {
    overflow-x: visible !important;
    /* 재정렬 모드에서는 가로 스크롤 안 함 */
}
.type-filters.reorder-mode .type-filter-btn {
    animation: pickme-bounce 0.45s ease-in-out infinite;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    z-index: 1;
    position: relative;
}
.type-filters.reorder-mode .type-filter-btn:nth-child(2n)   { animation-delay: 0.15s; }
.type-filters.reorder-mode .type-filter-btn:nth-child(3n)   { animation-delay: 0.30s; }
.type-filters.reorder-mode .type-filter-btn:nth-child(4n+1) { animation-delay: 0.07s; }
.type-filters.reorder-mode .type-filter-btn.dragging {
    animation: none;
    cursor: grabbing;
    opacity: 0.92;
    z-index: 100;
    /* transform 은 JS 가 인라인으로 설정 (translateX + translateY(-90px) + scale(1.1)) */
    box-shadow: 0 12px 28px rgba(0,0,0,0.28);
    transition: none;
    /* 손가락 위로 떠서 보이도록 더 강한 강조 */
    filter: brightness(1.05);
}

/* ── 크레딧 배지 ────────────────────────────────────────── */
.credit-badge-btn { position: relative; }
.credit-amount {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.credit-badge-btn.credit-low .credit-amount { color: #f59e0b; }
.credit-badge-btn.credit-empty .credit-amount { color: #ef4444; }
.credit-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    padding: 14px 16px;
    min-width: 220px;
    z-index: var(--z-dropdown, 8000);
    display: none;
    font-size: 0.82rem;
    color: #1f2937;
    line-height: 1.6;
}
.credit-dropdown.open { display: block; }
.credit-dropdown-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; }
.credit-dropdown-row { display: flex; justify-content: space-between; padding: 3px 0; }
.credit-dropdown-row .label { color: #6b7280; }
.credit-dropdown-row .value { font-weight: 600; }
.credit-dropdown-link {
    display: block; text-align: center; margin-top: 10px;
    padding: 8px; background: #eff6ff; border-radius: 8px;
    color: #2563eb; font-weight: 500; text-decoration: none;
}

/* ══════════════════════════════════════════════════════════
 * 가입 위자드 (signup-wizard) — Phase 1
 * 단계 전환: fade + 16px translate, 220ms ease
 * ══════════════════════════════════════════════════════════ */
.signup-wizard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: var(--ad-reserved, 40px); /* 하단 광고 영역 침범 방지 */
    background: rgba(15, 23, 42, 0.58);
    z-index: var(--z-modal, 9000);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
}
.signup-wizard-overlay.active {
    display: flex;
    animation: sw-fade-in 180ms ease;
}
@keyframes sw-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.signup-wizard {
    /* 뷰포트 비율 반응형: 모바일 360px ~ 데스크탑 720px, 55vw 기준 */
    width: clamp(360px, 55vw, 720px);
    max-width: 90vw;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    overflow: hidden;
    position: relative;
}

/* 상단: 제목 + 닫기 + 진행률 */
.sw-header {
    padding: 18px 20px 10px 20px;
    border-bottom: 1px solid #f3f4f6;
}
.sw-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.sw-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}
.sw-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0 6px;
    line-height: 1;
}
.sw-close:hover { color: #1f2937; }

.sw-progress {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}
.sw-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 2px;
    transition: width 260ms cubic-bezier(0.4, 0, 0.2, 1);
}
.sw-step-indicator {
    text-align: right;
    font-size: 0.72rem;
    color: #6b7280;
    margin-top: 4px;
}

/* 본문: 스텝 컨테이너 */
.sw-body {
    flex: 1;
    overflow-y: auto;
    position: relative;
    min-height: 240px;
    /* grid stacking — 모든 자식이 같은 셀에 겹쳐서 컨테이너 높이 = active 기준 */
    display: grid;
    grid-template-columns: 1fr;
}
.sw-step {
    grid-area: 1 / 1;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 220ms cubic-bezier(0.4, 0, 0.2, 1),
                transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.sw-step.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
/* leaving 은 absolute 로 grid track 에서 빠져나감 → 부모 높이는 active 만 결정 */
.sw-step.leaving-forward,
.sw-step.leaving-back {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.sw-step.leaving-forward {
    opacity: 0;
    transform: translateX(-16px);
}
.sw-step.leaving-back {
    opacity: 0;
    transform: translateX(16px);
}
/* 뒤로가기 방향 — 들어오는 스텝이 왼쪽에서 등장 */
.signup-wizard.back .sw-step:not(.active):not(.leaving-forward):not(.leaving-back) {
    transform: translateX(-16px);
}

/* 동작 감소 모드 — 슬라이드 제거 */
@media (prefers-reduced-motion: reduce) {
    .sw-step,
    .sw-step.leaving-forward,
    .sw-step.leaving-back {
        transition: opacity 120ms ease;
        transform: none !important;
    }
}

/* 스텝별 소개 카드 (Step 2 이후) */
.sw-intro {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border-left: 3px solid #3b82f6;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.sw-intro-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 4px;
}
.sw-intro-body {
    font-size: 0.82rem;
    color: #1e3a8a;
}
.sw-intro-reason {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #bfdbfe;
    font-size: 0.76rem;
    color: #4b5563;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.sw-intro-reason::before {
    content: "💡";
    flex-shrink: 0;
}

/* 스텝 내부 질문/설명 */
.sw-question {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
    margin: 4px 0 8px;
}
.sw-hint {
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 18px;
    line-height: 1.5;
}

/* 입력 필드 */
.sw-input,
.sw-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.95rem;
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease;
    box-sizing: border-box;
}
.sw-input:focus,
.sw-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.sw-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.sw-input-row .sw-input { flex: 1; }
.sw-inline-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 160ms ease;
}
.sw-inline-btn:hover { background: #1d4ed8; }
.sw-inline-btn:disabled { background: #9ca3af; cursor: not-allowed; }

/* 카드 선택지 (purpose / role / interests 등) */
.sw-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sw-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 160ms cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}
.sw-option:hover {
    border-color: #93c5fd;
    background: #f0f9ff;
}
.sw-option.selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}
.sw-option.sw-option-disabled {
    opacity: 0.5;
    background: #f9fafb;
    border-color: #e5e7eb;
    cursor: not-allowed;
}
.sw-option.sw-option-disabled:hover {
    border-color: #e5e7eb;
    background: #f9fafb;
}
.sw-option-icon {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}
.sw-option-body { flex: 1; }
.sw-option-label {
    font-size: 0.92rem;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 2px;
}
.sw-option-desc {
    font-size: 0.78rem;
    color: #6b7280;
    line-height: 1.4;
}
.sw-option-badge {
    font-size: 0.68rem;
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 600;
}

/* 체크박스 (복수 선택) */
.sw-checklist .sw-option .sw-option-icon::before {
    content: "☐";
    font-size: 1.05rem;
}
.sw-checklist .sw-option.selected .sw-option-icon::before {
    content: "☑";
    color: #2563eb;
}

/* 라디오 동작 (단일 선택) */
.sw-radiolist .sw-option .sw-option-icon::before {
    content: "○";
    font-size: 1.1rem;
    color: #9ca3af;
}
.sw-radiolist .sw-option.selected .sw-option-icon::before {
    content: "●";
    color: #2563eb;
}

/* 에러 메시지 */
.sw-error {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #991b1b;
    margin-top: 10px;
    animation: sw-shake 280ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes sw-shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
    40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* 약관 동의 영역 */
.sw-agreement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}
.sw-agreement input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.sw-agreement-label {
    flex: 1;
    font-size: 0.85rem;
    color: #1f2937;
    line-height: 1.5;
}
.sw-agreement-label .required { color: #ef4444; margin-right: 4px; }
.sw-agreement-link {
    color: #2563eb;
    text-decoration: underline;
    font-size: 0.78rem;
    margin-left: 6px;
}
.sw-agreement-all {
    background: #f9fafb;
    border: 1.5px solid #d1d5db;
    font-weight: 600;
}

/* 하단 버튼 */
.sw-footer {
    padding: 14px 20px 18px 20px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 10px;
    background: #fafafa;
}
.sw-btn {
    flex: 1;
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 160ms ease, transform 120ms ease;
}
.sw-btn:active { transform: scale(0.97); }
.sw-btn-back {
    background: #f3f4f6;
    color: #4b5563;
    flex: 0 0 96px;
}
.sw-btn-back:hover { background: #e5e7eb; }
.sw-btn-back:disabled { opacity: 0.4; cursor: not-allowed; }
.sw-btn-next {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.sw-btn-next:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.sw-btn-next:disabled {
    background: #9ca3af;
    box-shadow: none;
    cursor: not-allowed;
}
.sw-btn-skip {
    background: none;
    color: #6b7280;
    flex: 0 0 auto;
    padding: 12px 14px;
}
.sw-btn-skip:hover { color: #2563eb; }

/* 완료 화면 */
.sw-done {
    text-align: center;
    padding: 30px 20px;
}
.sw-done-icon {
    font-size: 3.2rem;
    margin-bottom: 10px;
    animation: sw-pop 420ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes sw-pop {
    0%   { opacity: 0; transform: scale(0.6); }
    60%  { opacity: 1; transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}
.sw-done-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
}
.sw-done-desc {
    font-size: 0.88rem;
    color: #6b7280;
    margin-bottom: 20px;
}

/* 모바일 */
@media (max-width: 600px) {
    .signup-wizard {
        max-width: 100%;
        max-height: calc(100vh - var(--ad-reserved, 40px));
        height: calc(100vh - var(--ad-reserved, 40px));
        border-radius: 0;
    }
    .sw-body { padding: 18px 16px; }
    .sw-footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
}

/* 레거시 체크박스 스타일 (호환성) */
.type-filter {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.type-filter input[type="checkbox"] {
    display: none;
}

.filter-label {
    padding: 5px 10px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.type-filter input[type="checkbox"]:checked + .filter-label {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
    border-color: transparent;
}

.type-filter:hover .filter-label {
    border-color: #3949ab;
}

/* 검색 옵션 버튼 */
.search-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.secondary-btn, .link-btn {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* 24시간 신규 버튼 강조 */
.new-items-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.new-items-btn:active {
    background: linear-gradient(135deg, #ee5a5a 0%, #dd4a4a 100%);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

@media (min-width: 768px) {
    .new-items-btn:hover {
        background: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    }
}

.secondary-btn:active, .link-btn:active {
    background: #e9ecef;
}

@media (min-width: 768px) {
    .secondary-btn:hover, .link-btn:hover {
        background: #e9ecef;
        border-color: #adb5bd;
    }
}

/* 면허 필터 카드 */
.license-filter-card {
    margin-top: 12px;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.license-filter-toggle {
    width: 100%;
    background: transparent;
    border: none;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    border-radius: 12px;
}

.license-filter-toggle:focus-visible {
    outline: 2px solid #4a90d9;
    outline-offset: 2px;
}

.license-filter-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
}

.license-filter-title {
    font-weight: 600;
    font-size: 1rem;
    color: #1f3c88;
}

.license-filter-summary {
    font-size: 0.85rem;
    color: #495057;
}

.license-filter-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #495057;
}

.license-filter-chevron {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.license-filter-panel {
    border-top: 1px solid #f1f3f5;
    padding: 16px;
    background: #f9fbff;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.license-filter-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.license-table-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.license-table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.license-table-wrapper {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    background: white;
}

.license-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.license-table thead {
    position: sticky;
    top: 0;
    background: #f5f7fb;
    z-index: 1;
}

.license-table th,
.license-table td {
    padding: 10px;
    border-bottom: 1px solid #f1f3f5;
    text-align: left;
}

.license-table tbody tr:hover {
    background: #f9fbff;
}

.license-table-checkbox {
    width: 48px;
    text-align: center;
}

.license-table-checkbox input {
    width: 16px;
    height: 16px;
}

.license-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3949ab;
    font-size: 0.8rem;
    font-weight: 600;
}

.license-filter-inputs,
.license-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.license-filter-inputs input,
.license-keyword-input {
    flex: 1;
    min-width: 160px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    font-size: 0.9rem;
}

.license-keyword-input {
    max-width: 220px;
}

.license-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    color: #495057;
}

.license-switch input {
    width: 16px;
    height: 16px;
}

.license-search-btn {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.license-search-btn:active {
    transform: scale(0.98);
}

@media (min-width: 768px) {
    .license-filter-toolbar {
        flex-direction: column;
    }

    .license-filter-options {
        align-items: center;
    }

    .license-search-btn:hover {
        box-shadow: 0 6px 12px rgba(57, 73, 171, 0.25);
    }
}

.license-feedback {
    font-size: 0.85rem;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #edf2ff;
    color: #1f3c88;
}

.license-feedback[data-type="success"] {
    background: #e6f4ea;
    color: #1b5e20;
}

.license-feedback[data-type="error"] {
    background: #ffe8e8;
    color: #b71c1c;
}

.license-feedback[data-type="info"] {
    background: #edf2ff;
    color: #1f3c88;
}

.license-category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.license-category-card {
    background: white;
    border-radius: 4px;
    border: 1px solid #e8e8e8;
    padding: 0;
    margin-bottom: 2px;
}

.license-category-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 3px 8px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    border-left: 3px solid #667eea;
}

.category-info {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.category-icon {
    font-size: 14px;
}

.category-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #333;
    flex: 1;
}

.category-text strong {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

.category-count {
    font-size: 11px;
    color: #888;
    margin-left: auto;
}

.license-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.license-chip {
    border: 1px solid #d0d7de;
    background: #f8f9fa;
    color: #495057;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.license-chip.selected {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(57, 73, 171, 0.3);
}

.license-chip:focus-visible {
    outline: 2px solid #4a90d9;
    outline-offset: 2px;
}

.license-empty {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 0.9rem;
}

/* PWA 모드 특별 스타일 */
body.pwa-mode header {
    padding-top: max(env(safe-area-inset-top), 10px);
}

body.pwa-mode .ad-banner-area {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* 통계 섹션 */
.stats-section {
    margin-bottom: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.stat-card {
    background: white;
    padding: 8px 10px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    border-left: 3px solid #ccc;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card:active {
    transform: scale(0.95);
}

.stat-card.active {
    box-shadow: 0 0 0 2px #1976d2;
}

.stat-card.bid { border-left-color: #1976d2; }
.stat-card.rnd { border-left-color: #7b1fa2; }
.stat-card.sme { border-left-color: #388e3c; }
.stat-card.subsidy { border-left-color: #f57c00; }
.stat-card.bizinfo { border-left-color: #00796b; }
.stat-card.all { border-left-color: #455a64; }

.stat-icon {
    font-size: 1rem;
}

.stat-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a237e;
}

.stat-label {
    font-size: 0.7rem;
    color: #6c757d;
    display: none;
}

@media (min-width: 768px) {
    .stat-label {
        display: inline;
    }
}

/* 로딩 스타일 */
.loading {
    text-align: center;
    padding: 40px 16px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.spinner {
    border: 2px solid var(--color-border);
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 결과 섹션 */
.results-section {
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    margin: 0;
}

.results-header {
    padding: 12px 16px;
    background: transparent;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    cursor: pointer;
}

.results-header h2 {
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 700;
}

.results-info {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.results-header:hover #resultsTitle {
    text-decoration: none;
    color: var(--color-primary);
}

#resultsCount {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.9rem;
}

/* 결과 가상 스크롤 래퍼 */
.results-virtual-wrapper {
    max-height: calc(100vh - 220px);
    overflow-y: scroll;
    overscroll-behavior: contain;
    padding: 0;
    width: 100%;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.results-virtual-wrapper::-webkit-scrollbar {
    width: 6px;
}

.results-virtual-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.results-virtual-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.results-virtual-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.results-virtual-wrapper .results-grid {
    padding: 0;
}

/* 결과 그리드 — 모바일 세로: 2열 */
.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 6px;
}

@media (min-width: 768px) {
    .results-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px;
    }
}

@media (min-width: 1100px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1400px) {
    .results-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 결과 카드 */
.result-card {
    background: white;
    border-radius: var(--radius-sm);
    padding: 10px;
    border: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}

.result-card:hover {
    background: var(--color-bg);
    box-shadow: none;
    transform: none;
    border-color: var(--color-border-light);
}

.result-card.bid,
.result-card.rnd,
.result-card.subsidy,
.result-card.bizinfo,
.result-card.sme_support,
.result-card.prespec,
.result-card.private_bid {
    border-left: none;
}

@media (min-width: 768px) {
    .result-card {
        border-radius: var(--radius-md);
        border: 1px solid var(--color-border);
        box-shadow: var(--shadow-sm);
    }
    .result-card:hover {
        box-shadow: var(--shadow-md);
        border-color: var(--color-border);
    }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 4px;
    border-radius: 6px;
    font-size: 0.55rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.01em;
    min-height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.type-badge.bid { background: linear-gradient(135deg, #0d47a1, #1976d2); }
.type-badge.bid_purchase { background: linear-gradient(135deg, #00695c, #00897b); }
.type-badge.bid_service { background: linear-gradient(135deg, #4527a0, #5e35b1); }
.type-badge.rnd { background: linear-gradient(135deg, #512da8, #7b1fa2); }
.type-badge.sme_support { background: linear-gradient(135deg, #004d40, #00796b); } /* 2026-03-10: bizinfo와 동일 */
.type-badge.subsidy { background: linear-gradient(135deg, #e65100, #fb8c00); }
.type-badge.success_bid { background: linear-gradient(135deg, #ad1457, #e91e63); }
.type-badge.success_bid_service { background: linear-gradient(135deg, #880e4f, #c2185b); }
.type-badge.success_bid_purchase { background: linear-gradient(135deg, #6a1b9a, #ad1457); }
.type-badge.bizinfo { background: linear-gradient(135deg, #004d40, #00796b); }
.type-badge.prespec { background: linear-gradient(135deg, #827717, #9e9d24); }
.type-badge.private_bid { background: linear-gradient(135deg, #bf360c, #e64a19); }
.type-badge.all { background: linear-gradient(135deg, #263238, #455a64); }

.summary-badge,
.cached-badge,
.modal-title-area .type-badge {
    font-size: 0.55rem;
    padding: 1px 6px;
    line-height: 1.1;
}

/* 상태 배지 (헤더용) */
.status {
    padding: 2px 6px;
    background: #f1f3f4;
    border-radius: 8px;
    font-size: 0.65rem;
    color: #6c757d;
}

.status.active {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
}

.status.canceled {
    background: #ffebee;
    color: #c62828;
}

.status.awarded {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100;
    font-weight: 700;
}

/* 2026-03-09: 공동수급 허용/불가 뱃지 */
.joint-supply-badge {
    padding: 1px 5px;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 600;
    white-space: nowrap;
}
.joint-supply-badge.allowed {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}
.joint-supply-badge.denied {
    background: #fce4ec;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* === 2026-03-10: 데스크톱 자동 새로고침 === */
.auto-refresh-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    user-select: none;
    vertical-align: middle;
}
.auto-refresh-toggle input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--color-primary, #4a90d9);
}
.auto-refresh-label {
    font-weight: 500;
    color: #555;
}
.auto-refresh-countdown {
    font-size: 11px;
    color: #999;
    min-width: 28px;
}
.auto-refresh-banner {
    background: #e3f2fd;
    color: #1565c0;
    padding: 6px 12px;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    border-bottom: 1px solid #bbdefb;
    animation: arBannerFadeIn 0.3s ease;
}
@keyframes arBannerFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === 카드 낙찰 요약 블록 === */
.award-summary {
    margin: 4px -8px 0;
    padding: 6px 8px;
    border-top: 1px dashed #ffe0b2;
    background: linear-gradient(135deg, #fff8f0 0%, #fff3e0 100%);
    border-radius: 4px;
}

.award-row .info-value {
    color: #e65100;
    font-weight: 600;
}

.award-company {
    color: #bf360c !important;
    font-weight: 700 !important;
}

.award-amount {
    font-weight: 700 !important;
}

/* ── 부처 재정현황 다이얼로그 ── */
.fiscal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100001;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}
.fiscal-dialog {
    background: #1a1a2e;
    border-radius: 12px;
    width: 90vw;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
}
.fiscal-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #2a2a4a;
}
.fiscal-dialog-header h3 { margin: 0; font-size: 1rem; color: #e0e0ff; }
.fiscal-dialog-close { background: none; border: none; color: #888; font-size: 1.5rem; cursor: pointer; padding: 0 4px; }
.fiscal-dialog-notice {
    padding: 12px 20px;
    background: #1e1e3a;
    color: #a0a0c0;
    font-size: 0.8rem;
    line-height: 1.5;
    border-bottom: 1px solid #2a2a4a;
}
.fiscal-notice-warn { color: #ffa726; font-size: 0.75rem; }
.fiscal-notice-src { color: #666; font-size: 0.7rem; font-style: italic; }
.fiscal-dialog-body { padding: 16px 20px; }
.fiscal-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.fiscal-table thead th { color: #8888bb; font-weight: 600; padding: 8px 6px; text-align: left; border-bottom: 1px solid #2a2a4a; font-size: 0.8rem; }
.fiscal-table tbody td { padding: 10px 6px; border-bottom: 1px solid #1e1e3a; color: #d0d0e0; }
.fiscal-year { font-weight: 700; color: #90caf9; }
.fiscal-amount { font-family: 'Pretendard', monospace; font-weight: 500; }
.fiscal-rate { display: flex; align-items: center; gap: 8px; }
.fiscal-rate span { min-width: 45px; text-align: right; font-weight: 600; color: #4fc3f7; }
.fiscal-bar-bg { flex: 1; height: 8px; background: #2a2a4a; border-radius: 4px; overflow: hidden; }
.fiscal-bar-fill { height: 100%; background: linear-gradient(90deg, #1565c0, #42a5f5); border-radius: 4px; transition: width 0.5s ease; }
.fiscal-loading, .fiscal-empty { text-align: center; color: #8888bb; padding: 30px 0; font-size: 0.9rem; }
.fiscal-na { color: #555; font-style: italic; }
/* 탭 */
.fiscal-tabs { display: flex; gap: 0; border-bottom: 1px solid #2a2a4a; padding: 0 16px; overflow-x: auto; }
.fiscal-tab { background: none; border: none; color: #8888bb; font-size: 0.82rem; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s; white-space: nowrap; }
.fiscal-tab:hover { color: #c0c0ff; }
.fiscal-tab.active { color: #4fc3f7; border-bottom-color: #4fc3f7; font-weight: 600; }
/* 요약 바 */
.fiscal-summary-bar { display: flex; gap: 16px; padding: 10px 0 8px; font-size: 0.82rem; color: #a0a0c0; flex-wrap: wrap; }
.fiscal-summary-bar strong { color: #4fc3f7; }
/* 5년 추이 행 */
.fiscal-trend-row { display: flex; gap: 4px; padding: 6px 0 10px; overflow-x: auto; }
.fiscal-trend-item { background: #1e1e3a; border-radius: 6px; padding: 8px 10px; min-width: 70px; text-align: center; border: 1px solid #2a2a4a; flex-shrink: 0; }
.fiscal-trend-year { font-size: 0.7rem; color: #666; }
.fiscal-trend-value { font-size: 0.85rem; font-weight: 700; color: #c0c0ff; margin: 2px 0; }
.fiscal-trend-diff { font-size: 0.7rem; font-weight: 600; }
/* 수평 바 차트 (분야별·기금별 공용) */
.fiscal-bars { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.fiscal-bar-row { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; }
.fiscal-bar-label { width: 110px; flex-shrink: 0; color: #b0b0e0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fiscal-bar-track { flex: 1; height: 16px; background: #1e1e3a; border-radius: 3px; overflow: hidden; }
.fiscal-bar-value { height: 100%; background: linear-gradient(90deg, #1565c0, #42a5f5); border-radius: 3px; transition: width 0.5s ease; min-width: 2px; }
.fiscal-bar-fund { background: linear-gradient(90deg, #0d47a1, #1e88e5); }
.fiscal-bar-info { display: flex; gap: 6px; min-width: 100px; justify-content: flex-end; align-items: center; }
.fiscal-bar-amt { color: #d0d0e0; font-family: 'Pretendard', monospace; font-weight: 600; font-size: 0.8rem; }
.fiscal-bar-pct { color: #4fc3f7; font-size: 0.75rem; min-width: 36px; text-align: right; }
.fiscal-bar-num { color: #555; font-size: 0.75rem; margin-right: 4px; }
.fiscal-more { text-align: center; color: #555; font-size: 0.78rem; padding: 6px 0; }
/* 기금 섹션 */
.fiscal-fund-section { margin-bottom: 14px; }
.fiscal-fund-section h4 { color: #b0b0e0; font-size: 0.85rem; margin: 10px 0 6px; font-weight: 600; }
.fiscal-fund-hero { padding: 8px 0; }
.fiscal-fund-hero-total { font-size: 0.9rem; color: #a0a0c0; margin-bottom: 8px; }
.fiscal-fund-hero-total strong { font-size: 1.2rem; color: #4fc3f7; }
.fiscal-fund-cards { display: flex; gap: 8px; flex-wrap: wrap; }
.fiscal-fund-card { background: #1e1e3a; border-radius: 8px; padding: 12px 14px; flex: 1; min-width: 90px; text-align: center; border: 1px solid #2a2a4a; }
.fiscal-fund-card-sm { padding: 8px 12px; }
.fiscal-fund-card-label { font-size: 0.75rem; color: #8888bb; margin-top: 2px; }
.fiscal-fund-card-value { font-size: 1.05rem; font-weight: 700; color: #4fc3f7; font-family: 'Pretendard', monospace; }
.fiscal-fund-card-sm .fiscal-fund-card-value { font-size: 0.9rem; }
/* 소관부처 안내 */
.fiscal-resolved { font-size: 0.8rem; color: #90caf9; padding: 6px 10px; background: #1a237e; border-radius: 4px; margin-bottom: 8px; }
/* 집행률 안정성 */
.fiscal-stability { font-size: 0.82rem; color: #a0a0c0; padding: 8px 12px; background: #1e1e3a; border-radius: 6px; margin-bottom: 8px; }
.fiscal-stability strong { color: #4fc3f7; }
/* 분야 칩 */
.fiscal-fields { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.fiscal-field-chip { font-size: 0.72rem; background: #1e1e3a; color: #90caf9; padding: 2px 8px; border-radius: 10px; border: 1px solid #2a2a4a; white-space: nowrap; }
/* 추경 표시 */
.fiscal-supp { color: #ffa726; font-size: 0.72rem; margin-left: 2px; }
/* 각주 */
.fiscal-footnote { font-size: 0.7rem; color: #555; padding: 8px 0 2px; line-height: 1.5; }

.fiscal-row .info-value { color: #90caf9; font-size: 0.8rem; font-weight: 500; }
.fiscal-badge { background: #1a237e; color: #64b5f6; padding: 1px 6px; border-radius: 3px; font-size: 0.75rem; font-weight: 600; }
.fiscal-badge-local { background: #1b3a2a; color: #81c784; }
.fiscal-badge-private { background: #2a2a2a; color: #999; font-weight: 400; }
.fiscal-hint { color: #666; font-size: 0.7rem; margin-left: 4px; }

@media (max-width: 767px) {
    .fiscal-summary {
        padding: 3px 6px;
        margin: 2px -6px 0;
    }
    .fiscal-row .info-value {
        font-size: 0.75rem;
    }
    .award-summary {
        padding: 4px 6px;
        margin: 2px -6px 0;
    }
    .award-summary .info-row {
        font-size: 0.78rem;
    }
}

/* === 모달 예산 vs 낙찰 비교 === */
.budget-comparison {
    padding: 12px 16px;
    background: #fafbfc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin: 8px 0;
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comparison-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
}

.comparison-savings {
    font-weight: 700;
    font-size: 0.85rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.comparison-savings.positive {
    background: #e8f5e9;
    color: #2e7d32;
}

.comparison-savings.negative {
    background: #ffebee;
    color: #c62828;
}

/* 2026-03-10: 설계금액 참고 표시 */
.comparison-note {
    font-size: 0.75rem;
    color: #888;
    margin-top: 4px;
    text-align: right;
}

.comparison-bar-container {
    position: relative;
}

.comparison-bar {
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    margin-bottom: 4px;
    transition: width 0.5s ease;
}

.budget-bar {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
}

.award-bar {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 1px solid #ffcc80;
}

.bar-label {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.budget-bar .bar-label {
    color: #1565c0;
}

.award-bar .bar-label {
    color: #e65100;
}

/* 모달 낙찰업체 강조 */
.award-highlight .extra-value {
    color: #bf360c;
    font-weight: 700;
    font-size: 1rem;
}

.award-company-value {
    color: #bf360c;
    font-weight: 700;
}

/* 2026-03-07: 기초금액 상세분해 */
.basis-breakdown {
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
    line-height: 1.4;
}

/* 2026-03-07: 사정률 강조 */
.assessment-rate {
    color: #1565c0;
    font-weight: 700;
}

/* 2026-03-07: 투찰 과정 안내 버튼 */
.bid-guide-btn {
    font-size: 0.72rem; padding: 2px 10px; border-radius: 12px;
    border: 1px solid #90caf9; background: #e3f2fd; color: #1565c0;
    cursor: pointer; font-weight: 600; white-space: nowrap;
}
.bid-guide-btn:hover { background: #bbdefb; }
/* 2026-03-10: 개찰 전 투찰 안내 섹션 — 큰 버튼 */
.bid-guide-btn-large {
    display: block; width: 100%; padding: 10px 16px; margin-top: 8px;
    font-size: 0.9rem; text-align: center; border-radius: 8px;
}
/* 2026-03-10: 위자드 체크리스트 스타일 */
.wiz-checklist { display: flex; flex-direction: column; gap: 8px; }
.wiz-check-item {
    padding: 8px 12px; background: #f8f9fa; border-radius: 6px;
    font-size: 0.85rem; line-height: 1.5;
}
/* 2026-03-10: 예비가격 시뮬레이션 스타일 */
.wiz-section-title {
    font-size: 0.85rem; font-weight: 700; color: #333;
    margin: 10px 0 6px; padding-bottom: 4px;
    border-bottom: 1px solid #e0e0e0;
}
.wiz-price-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
    margin: 6px 0 10px;
}
.wiz-price-cell {
    display: flex; flex-direction: column; align-items: center;
    padding: 5px 4px; background: #f5f5f5; border-radius: 5px;
    font-size: 0.72rem; line-height: 1.3;
}
.wiz-price-cell.wiz-price-hot {
    background: #e3f2fd; border: 1px solid #90caf9;
}
.wiz-price-idx {
    font-size: 0.65rem; color: #999; font-weight: 600;
}
.wiz-price-val { font-weight: 600; color: #222; }
.wiz-price-rate { color: #666; font-size: 0.65rem; }
/* 시뮬레이션 요약 카드 */
.wiz-sim-summary {
    display: flex; gap: 8px; margin: 10px 0;
    flex-wrap: wrap;
}
.wiz-sim-card {
    flex: 1; min-width: 120px; padding: 10px 12px;
    background: #f8f9fa; border-radius: 8px; text-align: center;
}
.wiz-sim-card.wiz-sim-primary {
    background: #1565c0; color: #fff;
}
.wiz-sim-label {
    font-size: 0.7rem; font-weight: 600; margin-bottom: 4px;
    opacity: 0.85;
}
.wiz-sim-primary .wiz-sim-label { color: #bbdefb; }
.wiz-sim-value {
    font-size: 0.95rem; font-weight: 700; line-height: 1.3;
}
.wiz-sim-sub {
    font-size: 0.65rem; margin-top: 2px; opacity: 0.7;
}
.wiz-sim-primary .wiz-sim-sub { color: #e3f2fd; }
/* 히스토그램 */
.wiz-hist { margin: 6px 0; }
.wiz-hist-row {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 3px; font-size: 0.7rem;
}
.wiz-hist-label {
    min-width: 80px; text-align: right; color: #555;
    font-size: 0.65rem; flex-shrink: 0;
}
.wiz-hist-bar-wrap {
    flex: 1; height: 14px; background: #eee; border-radius: 3px;
    overflow: hidden;
}
.wiz-hist-bar {
    height: 100%; background: linear-gradient(90deg, #1565c0, #42a5f5);
    border-radius: 3px; min-width: 2px;
    transition: width 0.3s;
}
.wiz-hist-pct {
    min-width: 36px; text-align: right; color: #888;
    font-size: 0.65rem; flex-shrink: 0;
}

/* 2026-03-07: 투찰 과정 위자드 오버레이 */
/* 2026-03-10: bottom에 광고 영역 예약 — 광고 배너 침범 방지 */
.bwiz-overlay {
    position: fixed; top: 0; left: 0; right: 0;
    bottom: var(--ad-reserved, 40px);
    background: rgba(0,0,0,0.5);
    /* 2026-04-14: 상세모달(20000) + collab(31000) 위에 표시 */
    z-index: 40000;
    display: flex; align-items: center; justify-content: center;
}
/* 2026-03-10: 고정 크기 — 헤더/진행바/액션 고정, 본문만 스크롤 */
.bwiz-box {
    background: #fff; border-radius: 14px; width: 90%; max-width: 520px;
    max-height: calc(100% - 20px); /* 2026-03-10: overlay 내에서 상대 높이 */
    box-shadow: 0 8px 32px rgba(0,0,0,0.25); overflow: hidden;
    display: flex; flex-direction: column;
}
.bwiz-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; background: #1565c0; color: #fff;
}
.bwiz-title-text { font-weight: 700; font-size: 1rem; }
.bwiz-close {
    background: none; border: none; color: #fff; font-size: 1.2rem;
    cursor: pointer; padding: 0 4px;
}
.bwiz-progress {
    display: flex; justify-content: center; gap: 6px;
    padding: 8px 16px 4px; background: #f5f5f5;
}
.bwiz-dot {
    width: 26px; height: 26px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: 0.7rem;
    font-weight: 700; background: #e0e0e0; color: #999; transition: all 0.2s;
}
.bwiz-dot.done { background: #a5d6a7; color: #2e7d32; }
.bwiz-dot.active { background: #1565c0; color: #fff; transform: scale(1.15); }
/* 2026-03-10: flex:1로 남은 공간 채움, 내부 스크롤 */
.bwiz-content {
    padding: 10px 18px 10px; text-align: center;
    flex: 1; overflow-y: auto; min-height: 0;
}
/* 2026-03-10: 아이콘+제목을 한 줄로 축소 — 본문 공간 확보 */
.bwiz-step-icon { font-size: 1.1rem; display: inline; margin-right: 6px; }
.bwiz-step-title {
    font-size: 0.95rem; font-weight: 700; color: #1a237e; margin-bottom: 8px;
    display: inline;
}
.bwiz-step-body {
    font-size: 0.88rem; color: #444; line-height: 1.6; text-align: left;
}
.wiz-data {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; background: #e8f5e9; border-radius: 8px;
    margin-bottom: 6px; border-left: 3px solid #43a047;
}
.wiz-data-label { font-size: 0.8rem; color: #2e7d32; font-weight: 600; }
.wiz-data-val { font-size: 0.88rem; color: #1b5e20; font-weight: 700; }
.wiz-highlight { color: #1565c0; font-size: 1rem; }
/* 맞춤 분석 위자드 — 테이블 */
.wiz-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; font-size: 0.84rem; }
.wiz-table td { padding: 6px 8px; border-bottom: 1px solid #eee; }
.wiz-table td:first-child { color: #666; width: 35%; white-space: nowrap; }
.wiz-table td:last-child { color: #222; font-weight: 500; }
.wiz-table-summary td:last-child { text-align: right; }
.wiz-summary-title { font-weight: 700; color: #1a237e; margin-bottom: 8px; font-size: 0.9rem; }
.wiz-insight {
    padding: 8px 12px; background: #fff3e0; border-radius: 6px;
    border-left: 3px solid #ff8f00; margin: 8px 0; font-size: 0.84rem;
    color: #e65100; line-height: 1.5;
}
.wiz-empty {
    padding: 16px; text-align: center; color: #999; font-size: 0.84rem;
    background: #fafafa; border-radius: 8px;
}
.wiz-range-box {
    background: #f5f5f5; border-radius: 8px; padding: 10px 14px;
    margin-bottom: 8px; text-align: center;
}
.wiz-range-highlight { background: #e3f2fd; border: 1px solid #90caf9; }
.wiz-range-title { font-size: 0.78rem; color: #666; font-weight: 600; margin-bottom: 4px; }
.wiz-range-vals { font-size: 0.9rem; color: #1a237e; font-weight: 700; }
.wiz-range-sub { font-size: 0.75rem; color: #888; margin-top: 4px; }
.wiz-bar-wrap { margin: 10px 0; }
.wiz-bar-track {
    position: relative; height: 10px; background: #e0e0e0; border-radius: 5px;
    overflow: visible;
}
.wiz-bar-fill { height: 100%; border-radius: 5px; transition: width 0.3s; }
.wiz-bar-marker {
    position: absolute; top: -6px; transform: translateX(-50%);
    width: 2px; height: 22px; background: #d32f2f;
}
.wiz-bar-label {
    position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
    font-size: 0.65rem; color: #d32f2f; font-weight: 700; white-space: nowrap;
}
.wiz-bar-range {
    display: flex; justify-content: space-between; font-size: 0.7rem; color: #999; margin-top: 3px;
}
.wiz-badge {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 0.78rem; font-weight: 600;
}
.wiz-badge-ok { background: #e8f5e9; color: #2e7d32; }
.wiz-badge-warn { background: #fff3e0; color: #e65100; }
.wiz-corp-list { margin: 8px 0; }
.wiz-corp-row {
    display: flex; align-items: center; gap: 6px; padding: 5px 8px;
    border-bottom: 1px solid #f0f0f0; font-size: 0.8rem;
}
.wiz-corp-row:last-child { border-bottom: none; }
.wiz-corp-winner { background: #fff8e1; border-left: 3px solid #ff8f00; }
.wiz-corp-rank {
    width: 22px; height: 22px; border-radius: 50%; background: #e0e0e0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
}
.wiz-corp-winner .wiz-corp-rank { background: #ff8f00; color: #fff; }
.wiz-corp-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #333; }
.wiz-corp-amt { font-size: 0.75rem; color: #1565c0; font-weight: 600; white-space: nowrap; }
.wiz-corp-rate { font-size: 0.75rem; color: #666; min-width: 50px; text-align: right; }
.wiz-corp-more { text-align: center; color: #999; font-size: 0.78rem; padding: 4px; }
.bwiz-actions {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 18px 16px; border-top: 1px solid #eee;
    flex-shrink: 0;
}
.bwiz-page { font-size: 0.82rem; color: #999; }
.bwiz-btn {
    padding: 8px 18px; border-radius: 8px; border: none; cursor: pointer;
    font-size: 0.85rem; font-weight: 600; transition: all 0.15s;
}
.bwiz-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.bwiz-btn-prev { background: #e0e0e0; color: #555; }
.bwiz-btn-prev:hover:not(:disabled) { background: #bdbdbd; }
.bwiz-btn-next { background: #1565c0; color: #fff; }
.bwiz-btn-next:hover { background: #0d47a1; }
.bwiz-btn-done { background: #43a047; color: #fff; }
.bwiz-btn-done:hover { background: #2e7d32; }

@media (max-width: 767px) {
    .bwiz-box { width: 100%; max-width: none; height: 100%; max-height: 100%; border-radius: 0; }
    .bwiz-content { padding: 16px 14px 10px; }
    .bwiz-dot { width: 22px; height: 22px; font-size: 0.6rem; }
    .bwiz-step-icon { font-size: 1rem; }
}

@media (max-width: 767px) {
    .budget-comparison {
        padding: 8px 12px;
    }
    .bar-label {
        font-size: 0.65rem;
    }
    .comparison-bar {
        height: 24px;
    }
}

/* 상세보기 버튼 (작은 버전) */
/* 2026-03-10: 카드 즐겨찾기 버튼 */
.card-bookmark-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #ccc;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s, transform 0.15s;
}
.card-bookmark-btn:hover { color: #ffc107; transform: scale(1.2); }
.card-bookmark-btn.active { color: #ffc107; }

.btn-detail-sm {
    padding: 2px 8px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.65rem;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-detail-sm:hover {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.deadline {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

.deadline.soon {
    color: #d32f2f;
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.75rem;
    line-height: 1.4;
}

.info-label {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.info-value {
    color: #495057;
    flex: 1;
    word-break: break-word;
}

.info-value strong {
    color: #333;
    font-weight: 600;
}

.info-value.budget {
    color: #d32f2f;
    font-weight: 600;
}

.info-value.id-value {
    font-family: monospace;
    font-size: 0.7rem;
    color: #666;
    background: #f5f5f5;
    padding: 1px 4px;
    border-radius: 3px;
}

.info-value.email-value {
    color: #1976d2;
    font-size: 0.7rem;
}

/* 카드 크기 확장 */
.result-card {
    min-height: auto;
}

.result-card .card-info {
    max-height: none;
}

/* 결과 없음 */
.no-results {
    text-align: center;
    padding: 8px 15px 10px;
    color: #6c757d;
}

.no-results-icon {
    font-size: 1.5rem;
    margin: 0 0 4px 0;
}

.no-results h3 {
    font-size: 1rem;
    margin: 0 0 3px 0;
    color: #495057;
}

.no-results p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.3;
}

.no-results .hint {
    margin: 3px 0 0;
    font-size: 0.75rem;
    color: #9e9e9e;
    line-height: 1.2;
}

/* 2026-03-18: AI 유사 키워드 제안 */
.suggest-keywords {
    text-align: center;
    padding: 10px 15px;
    margin: 0 auto;
}
.suggest-keywords .suggest-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-right: 6px;
}
.suggest-keywords .suggest-kw-btn {
    display: inline-block;
    margin: 3px 4px;
    padding: 5px 14px;
    font-size: 0.82rem;
    border: 1px solid #4a90d9;
    border-radius: 16px;
    background: #f0f6ff;
    color: #2c6fbb;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.suggest-keywords .suggest-kw-btn:hover {
    background: #4a90d9;
    color: #fff;
}

/* ── 정보 카드 섹션 (날씨/뉴스/주가) ── */
.info-cards-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    /* 모바일: 남은 공간을 3등분하여 카드 고정 높이 */
    flex: 1;
    min-height: 0;
    padding-bottom: 8px; /* 광고배너와 겹침 방지 */
}
.info-cards-section.hidden { display: none; }
/* 데스크탑: 정보 카드 섹션 숨김 (대시보드가 대체) — 터치 디바이스 제외 (2026-03-10) */
@media (min-width: 768px) and (hover: hover) {
    .info-cards-section { display: none !important; }
}

.info-card {
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
    /* 모바일: 3등분 고정 크기 */
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* 날짜 + 날씨 행 */
.date-weather-row { display: flex; gap: 6px; }
.date-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-width: 135px; max-width: 135px; padding: 4px 6px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: #ffcc80; cursor: pointer;
}
.date-mmdd { font-family: 'DSEG7 Classic', monospace; font-size: 2rem; font-weight: 400; color: #333; line-height: 1; letter-spacing: 1px; min-height: 2rem; }
.date-sub { display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.date-weekday-label { font-size: 0.72rem; color: #555; font-weight: 600; }
.date-day-name { font-size: 0.58rem; font-weight: 600; }
.date-events { display: flex; align-items: center; gap: 3px; }

/* ── 무한 스크롤 달력 ── */
.cal-overlay {
    position: fixed; inset: 0; bottom: var(--ad-reserved, 40px);
    z-index: 9999; background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
}
.cal-modal {
    background: #fff; border-radius: 16px; width: 92%; max-width: 420px;
    max-height: calc(100vh - var(--ad-reserved, 40px) - 30px);
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.cal-header {
    display: flex; align-items: center; padding: 12px 16px 8px; gap: 8px;
}
.cal-title { font-weight: 700; font-size: 1.15rem; flex: 1; }
.cal-lunar-btn {
    font-size: 0.85rem; padding: 4px 10px; border-radius: 12px;
    border: 1px solid #999; color: #666; background: #fff; cursor: pointer;
}
.cal-lunar-btn-active {
    border-color: #7b1fa2; color: #7b1fa2; background: #f3e5f5; font-weight: 600;
}
.cal-year-select {
    font-size: 0.85rem; padding: 4px 8px; border-radius: 12px;
    border: 1px solid #666; color: #333; background: #fff; cursor: pointer;
    appearance: auto; -webkit-appearance: auto;
}
.cal-today-btn {
    font-size: 0.85rem; padding: 4px 12px; border-radius: 12px;
    border: 1px solid #1565c0; color: #1565c0; background: #fff; cursor: pointer;
}
.cal-close-btn {
    border: none; background: none; font-size: 1.6rem; color: #999; cursor: pointer; padding: 0 4px;
}
.cal-day-header {
    display: grid; grid-template-columns: repeat(7,1fr); text-align: center;
    padding: 6px 8px; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.cal-day-label { font-size: 0.88rem; font-weight: 600; color: #666; padding: 4px 0; }
.cal-day-label.cal-sun { color: #d32f2f; }
.cal-day-label.cal-sat { color: #1565c0; }
.cal-legend {
    display: flex; gap: 12px; padding: 6px 16px; font-size: 0.78rem; color: #666;
    border-bottom: 1px solid #eee; flex-shrink: 0;
}
.cal-leg-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 3px; vertical-align: middle; }
.cal-scroll {
    flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 8px;
    -webkit-overflow-scrolling: touch;
}
.cal-month-section { padding: 4px 0; }
.cal-month-title {
    font-weight: 700; font-size: 1.05rem; color: #333;
    padding: 12px 4px 6px; position: sticky; top: 0;
    background: #fff; z-index: 1;
}
/* 외부 그리드: subgrid — 같은 주의 모든 셀이 동일 행 높이 공유 → 선분 정렬 보장
   4행 구조: 기념일(1) | 날짜(2) | 음력(3) | 선분(4)
   (2026-03-07 수정: 기념일을 날짜 바로 위로 배치 — 하단 배치 시 아래 일자와 혼동) */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-rows: auto auto auto 1fr;
    column-gap: 1px;
    text-align: center;
}
/* 셀: 4단 subgrid — 기념일(1) | 날짜(2) | 음력(3) | 선분(4) */
.cal-cell {
    padding: 4px 1px; cursor: pointer; border-radius: 6px; min-height: 64px;
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
    row-gap: 0;
    justify-items: center; align-items: start;
    min-width: 0; overflow: visible;
}
/* 주간 구분선 — 일요일 셀에서 가로 전체를 가로지르는 흐린 선 */
.cal-cell.cal-week-start { position: relative; }
.cal-cell.cal-week-start::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: calc(700% + 6px); height: 0;
    border-top: 1px solid rgba(0,0,0,0.07);
    pointer-events: none; z-index: 1;
}
.cal-cell:hover { background: #f5f5f5; }
.cal-cell.cal-today-cell { background: #e3f2fd; }
.cal-cell.cal-cell-selected { background: #bbdefb; border-radius: 6px; }
.cal-day-num { font-size: 0.95rem; line-height: 1.3; white-space: nowrap; grid-row: 2; }
.cal-day-num.cal-sun { color: #d32f2f; }
.cal-day-num.cal-sat { color: #1565c0; }
.cal-day-num.cal-today-num { font-weight: 700; background: #1565c0; color: #fff; border-radius: 50%; width: 26px; height: 26px; line-height: 26px; }
/* 기념일 래퍼 — 날짜 바로 위(row 1) 배치 (2026-03-07 수정: 하단→상단, 아래 일자와 혼동 방지) */
.cal-cell-bottom { grid-row: 1; align-self: end; text-align: center; width: 100%; }
.cal-hol-label { font-size: 0.55rem; line-height: 1.15; max-width: 100%; word-break: keep-all; overflow-wrap: break-word; }
.cal-hol-red { color: #d32f2f; }
.cal-hol-green { color: #2e7d32; }
.cal-hol-blue { color: #1565c0; }
.cal-lunar { font-size: 0.55rem; color: #999; line-height: 1.15; white-space: nowrap; grid-row: 3; }
.cal-lunar-first { color: #7b1fa2; font-weight: 600; }
.cal-evt-dots {
    display: flex; flex-direction: column; align-items: stretch;
    gap: 3px; min-height: 7px;
    width: 100%; overflow: visible;
    grid-row: 4; align-self: start;
}
.cal-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; align-self: center; }
/* 레인 spacer — 비어있는 레인의 높이를 확보하여 다른 셀과 정렬 유지 (2026-03-07 추가) */
.cal-evt-bar-spacer { height: 2px; flex-shrink: 0; visibility: hidden; }
/* 기간 이벤트 bar (2026-03-07 수정: 높이 2px, 여러 이벤트 겹침 시 가시성 개선) */
.cal-evt-bar {
    height: 2px; flex-shrink: 0; position: relative; overflow: visible;
}
.cal-evt-bar-start {
    margin-left: 40%; margin-right: -3px;
}
.cal-evt-bar-mid {
    margin-left: -3px; margin-right: -3px;
}
.cal-evt-bar-end {
    margin-left: -3px; margin-right: 40%;
}
.cal-evt-bar-single {
    margin-left: 20%; margin-right: 20%;
}
.cal-evt-bar-start::before, .cal-evt-bar-end::after {
    content: ''; position: absolute; top: 50%; transform: translateY(-50%);
    width: 6px; height: 6px; border-radius: 50%;
    background: inherit;
}
.cal-evt-bar-start::before { left: 0; }
.cal-evt-bar-end::after { right: 0; }
.cal-evt-bar-single::before {
    content: ''; position: absolute; top: 50%; transform: translateY(-50%); left: 0;
    width: 6px; height: 6px; border-radius: 50%;
    background: inherit;
}
.cal-evt-bar-single::after {
    content: ''; position: absolute; top: 50%; transform: translateY(-50%); right: 0;
    width: 6px; height: 6px; border-radius: 50%;
    background: inherit;
}
/* 달력 일정 리스트 — 리디자인 (2026-03-07) */
.cal-event-list {
    padding: 10px 14px; border-top: 1px solid #e5e7eb;
    max-height: 240px; overflow-y: auto; flex-shrink: 0;
    background: #fafbfc;
}
.cal-ev-header {
    font-weight: 700; font-size: 0.95rem; margin-bottom: 8px; color: #222;
    display: flex; align-items: center; justify-content: space-between;
}
.cal-ev-empty { text-align: center; color: #aaa; font-size: 0.9rem; padding: 16px 0; margin: 0; }
.cal-ev-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; margin-bottom: 6px;
    background: #fff; border: 1px solid #e8eaed; border-radius: 10px;
    cursor: pointer; transition: box-shadow .15s, border-color .15s;
}
.cal-ev-item:hover { border-color: #c5cae9; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.cal-ev-item:last-child { margin-bottom: 0; }
.cal-ev-item .cal-dot { width: 10px; height: 10px; margin-top: 4px; }
.cal-ev-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cal-ev-title {
    font-size: 0.92rem; font-weight: 600; color: #222;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.cal-ev-meta { display: flex; align-items: center; gap: 6px; }
.cal-ev-type {
    font-size: 0.78rem; color: #fff; white-space: nowrap;
    background: #90a4ae; border-radius: 4px; padding: 1px 6px;
}
.cal-ev-type[data-etype="bookmark_deadline"] { background: #ef5350; }
.cal-ev-type[data-etype="private_participation"] { background: #42a5f5; }
.cal-ev-type[data-etype="private_desired"] { background: #66bb6a; }
.cal-ev-type[data-etype="user_schedule"] { background: #ab47bc; }
.cal-ev-time { font-size: 0.82rem; color: #7b1fa2; font-weight: 600; white-space: nowrap; }
.cal-ev-del {
    font-size: 1.1rem; color: #ccc; cursor: pointer; padding: 2px 4px;
    line-height: 1; flex-shrink: 0; font-weight: 700;
    align-self: center; border-radius: 4px; transition: color .15s, background .15s;
}
.cal-ev-del:hover { color: #d32f2f; background: #ffebee; }
.cal-add-schedule-btn {
    font-size: 0.85rem; color: #7b1fa2; background: #f3e5f5; border: 1px solid #ce93d8;
    border-radius: 12px; padding: 5px 14px; cursor: pointer; white-space: nowrap;
}
.cal-add-schedule-btn:active { background: #e1bee7; }
/* 일정 폼 */
.cal-schedule-form { padding: 4px 0; }
.cal-form-row { margin-bottom: 10px; }
.cal-form-row label { display: block; font-size: 0.85rem; color: #666; margin-bottom: 3px; font-weight: 600; }
.cal-form-row input[type="text"],
.cal-form-row input[type="time"],
.cal-form-row textarea {
    width: 100%; box-sizing: border-box; border: 1px solid #ddd; border-radius: 6px;
    padding: 8px 10px; font-size: 0.92rem; font-family: inherit;
}
.cal-form-row input:focus, .cal-form-row textarea:focus { border-color: #7b1fa2; outline: none; }
.cal-form-row textarea { resize: vertical; }
.cal-form-actions { text-align: right; }
.cal-form-save {
    background: #7b1fa2; color: #fff; border: none; border-radius: 8px;
    padding: 8px 24px; font-size: 0.92rem; cursor: pointer; font-weight: 600;
}
.cal-form-save:active { background: #6a1b9a; }

/* 일정 다이얼로그 오버레이 */
.sched-dialog-overlay {
    position: fixed; inset: 0;
    z-index: 10001; background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
}
.sched-dialog {
    background: #fff; border-radius: 16px; width: 88%; max-width: 380px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    overflow: hidden; animation: schedDialogIn 0.2s ease-out;
}
@keyframes schedDialogIn {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.sched-dialog-header {
    display: flex; align-items: center; padding: 14px 16px 10px; gap: 8px;
    border-bottom: 1px solid #eee;
}
.sched-dialog-title {
    font-weight: 700; font-size: 1.1rem; color: #333;
}
.sched-dialog-date {
    flex: 1; font-size: 0.9rem; color: #7b1fa2; font-weight: 600;
}
.sched-dialog-close {
    border: none; background: none; font-size: 1.6rem; color: #999;
    cursor: pointer; padding: 0 4px; line-height: 1;
}
.sched-dialog-close:hover { color: #333; }
.sched-dialog .cal-schedule-form {
    padding: 14px 16px 8px;
}
.sched-dialog-actions {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 8px 16px 16px;
}
.sched-dialog-cancel {
    background: #f5f5f5; color: #666; border: 1px solid #ddd; border-radius: 8px;
    padding: 8px 20px; font-size: 0.92rem; cursor: pointer; font-weight: 600;
}
.sched-dialog-cancel:hover { background: #eee; }
.sched-dialog-cancel:active { background: #e0e0e0; }
.sched-datetime-row {
    display: flex; gap: 8px; align-items: center;
}
.sched-datetime-row input[type="date"] {
    flex: 1; min-width: 0; box-sizing: border-box;
    border: 1px solid #ddd; border-radius: 6px;
    padding: 8px 8px; font-size: 0.9rem; font-family: inherit;
}
.sched-datetime-row input[type="time"] {
    width: 100px; box-sizing: border-box;
    border: 1px solid #ddd; border-radius: 6px;
    padding: 8px 8px; font-size: 0.9rem; font-family: inherit;
}
.sched-datetime-row input:focus {
    border-color: #7b1fa2; outline: none;
}

/* 날씨 카드 */
.weather-card {
    display: flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #90caf9; flex: 1; overflow: hidden; cursor: pointer;
}
.weather-today { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.weather-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.weather-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.weather-main { display: flex; align-items: baseline; gap: 4px; flex-shrink: 0; }
.weather-temp { font-size: 1.3rem; font-weight: 700; color: #1565c0; white-space: nowrap; }
.weather-desc { font-size: 0.72rem; color: #37474f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weather-location { font-size: 0.68rem; color: #546e7a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 3일 미니 예보 */
.weather-forecast-mini {
    display: flex; gap: 2px; flex-shrink: 0;
    border-left: 1px solid rgba(144,202,249,0.5); padding-left: 6px;
}
.weather-mini-day { display: flex; flex-direction: column; align-items: center; min-width: 28px; }
.weather-mini-date { font-size: 0.55rem; color: #546e7a; font-weight: 500; line-height: 1.1; }
.weather-mini-icon { font-size: 0.85rem; line-height: 1.2; }
.weather-mini-temp { font-size: 0.55rem; color: #1565c0; font-weight: 600; white-space: nowrap; line-height: 1.1; }

/* 주간 날씨 다이얼로그 */
.weather-dialog-overlay {
    position: fixed; inset: 0; bottom: var(--ad-reserved, 40px);
    z-index: 9999; background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.2s; padding: 20px;
}
.weather-dialog-overlay.visible { opacity: 1; pointer-events: auto; }
.weather-dialog {
    background: #fff; border-radius: var(--radius-md);
    max-width: 420px; width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    transform: translateY(20px); opacity: 0;
    transition: transform 0.25s ease-out, opacity 0.25s ease-out;
    max-height: calc(100vh - var(--ad-reserved, 40px) - 40px);
    display: flex; flex-direction: column; overflow: hidden;
}
.weather-dialog-overlay.visible .weather-dialog { transform: translateY(0); opacity: 1; }
.weather-dialog-top { padding: 14px 16px 8px; flex-shrink: 0; border-bottom: 1px solid #e0e0e0; background: #fff; z-index: 1; }
.weather-dialog-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.weather-dialog-title { font-size: 1rem; font-weight: 700; color: #1565c0; display: flex; align-items: center; gap: 6px; }
.weather-dialog-close { background: none; border: none; font-size: 1.4rem; color: var(--color-text-secondary); cursor: pointer; padding: 0 4px; line-height: 1; }
.weather-dialog-location { font-size: 0.8rem; color: #546e7a; margin-bottom: 2px; }
.weather-dialog-body { overflow-y: auto; padding: 6px 16px 14px; flex: 1; }
.weather-dialog-credit { padding: 6px 16px 10px; text-align: center; font-size: 0.6rem; color: #999; flex-shrink: 0; border-top: 1px solid #eee; }
.weather-dialog-credit a { color: #1565c0; text-decoration: none; }
.weather-week-list { display: flex; flex-direction: column; }
.weather-week-item { display: flex; flex-direction: column; padding: 4px 6px; border-bottom: 1px solid #f0f0f0; }
.weather-week-item:last-child { border-bottom: none; }
.weather-week-item.today { background: #e3f2fd; border-radius: 8px; }
.weather-week-item.has-event .weather-week-day::after { content: '●'; font-size: 0.35rem; color: #d32f2f; vertical-align: top; margin-left: 1px; }
/* 메인 행: 왼쪽(요일+아이콘+온도) | 오른쪽(설명+상세표) (2026-03-06) */
.weather-week-main { display: flex; align-items: flex-start; gap: 6px; cursor: pointer; }
.weather-week-left {
    width: 60px; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; gap: 0;
}
.weather-week-day { font-size: 0.95rem; font-weight: 600; color: #333; line-height: 1.2; text-align: center; }
.weather-week-day small { display: block; font-size: 0.8rem; font-weight: 400; color: #888; }
.weather-week-icon { font-size: 1.6rem; line-height: 1.1; }
.weather-week-temps { display: flex; flex-direction: column; align-items: center; gap: 0; line-height: 1.2; }
.weather-week-max { color: #d32f2f; font-weight: 700; font-size: 1.1rem; }
.weather-week-min { color: #1565c0; font-size: 0.78rem; }
.weather-week-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.weather-week-top-row { display: flex; align-items: center; gap: 6px; }
.weather-week-desc { font-size: 0.8rem; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weather-week-sun { font-size: 0.65rem; color: #7b1fa2; white-space: nowrap; }
/* 상세 날씨 — 고정 컬럼 표 레이아웃 (2026-03-06 수정: 항목 위치 고정) */
.weather-week-detail {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: 0;
    font-size: 0.68rem;
    background: #fafafa;
    border-radius: 4px;
    overflow: hidden;
}
.wk-cell {
    display: flex; flex-direction: column;
    padding: 2px 4px;
    border-right: 1px solid #eeeeee;
    border-bottom: 1px solid #eeeeee;
    min-width: 0;
}
.wk-cell:nth-child(4n) { border-right: none; }
.wk-cell:nth-last-child(-n+4) { border-bottom: none; }
.wk-lbl { font-size: 0.55rem; color: #999; line-height: 1.2; }
.wk-val { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-val.feel { color: #6d4c41; }
.wk-val.humid { color: #0277bd; }
.wk-val.rain { color: #1976d2; }
.wk-val.wind { color: #00838f; }
.wk-val.uv { color: #e65100; }
.wk-val.sun { color: #f9a825; }
.wk-val.snow { color: #5c6bc0; }
.wk-val.daylen { color: #7b1fa2; }
.wk-val.dust { color: #5d4037; }
/* 펼침 영역 — 시간대별 예보 + 이벤트 (2026-03-06 확장) */
.wk-expand { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.weather-week-item.expanded .wk-expand { max-height: 400px; }
.wk-expand-events { padding: 3px 0 2px 44px; }

/* 시간대별 예보 테이블 (2026-03-06 추가) */
.wk-hourly-table {
    margin: 4px 0;
    font-size: 0.65rem;
    border-radius: 4px;
    overflow: hidden;
    background: #f8f9fa;
}
.wk-hourly-header {
    display: grid;
    grid-template-columns: 30px 28px 38px 52px 34px 38px 38px 1fr;
    gap: 0;
    padding: 3px 4px;
    background: #e3f2fd;
    font-weight: 600;
    color: #1565c0;
    font-size: 0.58rem;
}
.wk-hourly-header span { text-align: center; }
.wk-hourly-row {
    display: grid;
    grid-template-columns: 30px 28px 38px 52px 34px 38px 38px 1fr;
    gap: 0;
    padding: 2px 4px;
    border-bottom: 1px solid #eee;
    align-items: center;
}
.wk-hourly-row:last-child { border-bottom: none; }
.wk-hourly-row span { text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-hr-time { font-weight: 600; color: #333; }
.wk-hr-icon { font-size: 0.9rem; }
.wk-hr-temp { font-weight: 600; color: #d32f2f; }
.wk-hr-rain { color: #1976d2; }
.wk-hr-wind { color: #00838f; }
.wk-hr-humid { color: #6d4c41; }
.wk-hr-cloud { color: #78909c; }
.wk-hr-vis { color: #555; font-size: 0.6rem; }
.wk-evt-row { display: flex; align-items: center; gap: 5px; padding: 2px 0; }
.wk-evt-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wk-evt-label { font-size: 0.78rem; font-weight: 600; color: #555; flex-shrink: 0; }
.wk-evt-title { font-size: 0.78rem; color: #333; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* 뉴스/주가 카드 */
.info-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.info-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
}
.info-badge.news { background: linear-gradient(135deg, #0d47a1, #1976d2); }
.info-badge.stock { background: linear-gradient(135deg, #e65100, #fb8c00); }
.info-card-indicator { font-size: 0.7rem; color: var(--color-text-secondary); }

.info-card-body { min-height: 48px; overflow: hidden; }
.info-card-placeholder { font-size: 0.82rem; color: var(--color-text-secondary); }

/* 개별 정보 아이템 */
.info-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.info-item-category {
    font-size: 0.65rem; font-weight: 600;
    padding: 1px 6px; border-radius: 6px;
    background: #e8eaf6; color: #3949ab;
}
.info-item-title { font-size: 0.9rem; font-weight: 600; color: var(--color-text); }
.info-item-summary {
    width: 100%; font-size: 0.8rem; color: var(--color-text-secondary);
    line-height: 1.4; margin-top: 2px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.info-item-source { font-size: 0.7rem; color: #9e9e9e; }

/* 주가 전용 */
.stock-name { font-size: 0.9rem; font-weight: 600; }
.stock-price { font-size: 0.9rem; color: var(--color-text); font-weight: 500; }
.stock-change { font-size: 0.8rem; font-weight: 600; }
.stock-up { color: #d32f2f; }
.stock-down { color: #1565c0; }

/* 페이드 애니메이션 */
@keyframes infoFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
/* 뉴스 슬라이드 트랙 */
.news-slide-track {
    display: flex; flex-direction: column; gap: 0;
}
.news-item {
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border-light);
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; user-select: none;
}
.news-item-source {
    flex: 0 0 72px; width: 72px;
    text-align: center; font-size: 0.62rem; font-weight: 600;
    line-height: 1.3; color: #3949ab;
}
.news-item-title {
    flex: 1; min-width: 0;
    text-align: left; font-size: 0.85rem; font-weight: 600;
    color: var(--color-text); line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-item:last-child { border-bottom: none; }
.news-item:active { background: var(--color-bg); border-radius: 4px; }

/* 뉴스/주가 슬라이드 애니메이션 — 동시 캐러셀 */
@keyframes slideOutLeft  { from { transform:translateX(0); } to { transform:translateX(-100%); } }
@keyframes slideOutRight { from { transform:translateX(0); } to { transform:translateX(100%); } }
@keyframes slideInRight  { from { transform:translateX(100%); } to { transform:translateX(0); } }
@keyframes slideInLeft   { from { transform:translateX(-100%); } to { transform:translateX(0); } }
.slide-out-left  { animation: slideOutLeft 0.3s ease-in-out forwards; }
.slide-out-right { animation: slideOutRight 0.3s ease-in-out forwards; }
.slide-in-right  { animation: slideInRight 0.3s ease-in-out forwards; }
.slide-in-left   { animation: slideInLeft 0.3s ease-in-out forwards; }

/* 뉴스 다이얼로그 */
.news-dialog-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s;
    padding: 20px;
}
.news-dialog-overlay.visible { opacity: 1; pointer-events: auto; }
.news-dialog {
    background: #fff; border-radius: var(--radius-md);
    padding: 20px; max-width: 480px; width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    transform: translateY(20px); opacity: 0;
    transition: transform 0.25s ease-out, opacity 0.25s ease-out;
}
.news-dialog-overlay.visible .news-dialog { transform: translateY(0); opacity: 1; }
.news-dialog-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.news-dialog-category {
    font-size: 0.7rem; font-weight: 600;
    padding: 2px 8px; border-radius: 6px;
    background: #e8eaf6; color: #3949ab;
}
.news-dialog-close {
    background: none; border: none; font-size: 1.4rem;
    color: var(--color-text-secondary); cursor: pointer;
    padding: 0 4px; line-height: 1;
}
.news-dialog-title { font-size: 1rem; font-weight: 600; color: var(--color-text); margin: 0 0 10px; line-height: 1.4; }
.news-dialog-body { font-size: 0.88rem; color: var(--color-text-secondary); line-height: 1.6; margin: 0 0 10px; }
.news-dialog-source { font-size: 0.75rem; color: #9e9e9e; }

/* 주가 슬라이드 트랙 */
.stock-slide-track { }

/* 주가 그리드 (4건씩 2x2) */
.stock-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.stock-grid.fade-in { animation: infoFadeIn 0.4s ease-out; }
.stock-grid-item {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px;
    padding: 6px 8px;
    background: var(--color-bg);
    border-radius: 6px;
}
.stock-grid-item .stock-name { font-size: 0.82rem; font-weight: 600; flex-shrink: 0; }
.stock-grid-item .stock-price { font-size: 0.82rem; color: var(--color-text); }
.stock-grid-item .stock-change { font-size: 0.75rem; }

/* 태블릿 이상 — 2026-03-08: 모바일 info-cards는 데스크탑에서 숨김 (대시보드로 대체) — 터치 디바이스 제외 (2026-03-10) */
@media (min-width: 768px) and (hover: hover) {
    .info-cards-section { display: none !important; }
    .info-card {
        border-radius: var(--radius-md);
        border: 1px solid var(--color-border);
        box-shadow: var(--shadow-sm);
        padding: 16px 20px;
        flex: unset;
        overflow: visible;
    }
    .weather-card { border-color: #90caf9; }
    .stock-grid { grid-template-columns: repeat(4, 1fr); }
}

/* 에러 메시지 */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #ef9a9a;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.error-icon {
    font-size: 1.5rem;
}

/* 숨김 클래스 */
.hidden {
    display: none !important;
}

/* 모달 스타일 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - var(--ad-reserved, 40px));
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 20000; /* 다른 다이얼로그(면허 10001, 필터 10101 등)보다 위에 표시 (2026-03-07) */
    padding: 10px;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-height: calc(100vh - var(--ad-reserved, 40px) - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto;
    /* 2026-03-10: 비동기 콘텐츠 로드 시 스크롤 앵커링 — 스크롤 점프 방지 */
    overflow-anchor: auto;
}

.guest-intro-modal {
    max-width: 720px;
}

.guest-intro-modal .modal-body {
    padding: 18px 20px 8px;
    display: grid;
    gap: 12px;
}

.guest-intro-lead {
    font-size: 0.95rem;
    color: #2f3a4a;
    line-height: 1.5;
    margin: 0;
}

.guest-intro-note {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    border: 1px solid rgba(37, 99, 235, 0.25);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
}

.guest-intro-grid {
    display: grid;
    gap: 12px;
}

.guest-intro-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
}

.guest-intro-box h3 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: #1f2937;
}

.guest-intro-box ul {
    margin: 0;
    padding-left: 18px;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
}

.guest-intro-box.highlight {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(37, 99, 235, 0.35);
}

.guest-intro-actions {
    padding: 12px 20px 20px;
}

@media (min-width: 768px) {
    .guest-intro-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Auth modal */
.auth-modal .modal-header {
    padding: 16px 20px;
}
.auth-modal .modal-body {
    padding: 16px 20px 20px;
}
.auth-toggle {
    display: inline-flex;
    gap: 8px;
    background: #f1f3f5;
    border-radius: 12px;
    padding: 4px;
}
.auth-toggle button {
    border: none;
    background: transparent;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
}
.auth-toggle button.active {
    background: #4a90d9;
    color: #fff;
    box-shadow: 0 4px 10px rgba(74, 144, 217, 0.25);
}
.auth-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.auth-form label {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 600;
}
.auth-form input, .auth-form select {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.95rem;
}
.auth-form .password-field {
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-form .password-field input {
    flex: 1;
}
.password-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.password-toggle:hover {
    background: #e9ecef;
}
.password-toggle .eye-icon {
    position: relative;
    width: 18px;
    height: 10px;
    border: 2px solid #adb5bd;
    border-radius: 10px;
    display: inline-block;
}
.password-toggle .eye-icon::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 4px;
    height: 4px;
    background: #adb5bd;
    border-radius: 50%;
}
.password-toggle.active .eye-icon {
    border-color: #4a90d9;
}
.password-toggle.active .eye-icon::after {
    background: #4a90d9;
}
.auth-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}
.auth-actions button {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}
.auth-submit {
    background: #4a90d9;
    color: #fff;
}
.auth-cancel {
    background: #f1f3f5;
    color: #495057;
}
.auth-hint {
    font-size: 0.85rem;
    color: #868e96;
}

@media (min-width: 768px) {
    .modal {
        align-items: center;
        padding: 30px;
    }
    
    .modal-content {
        max-width: 900px;
        width: 90%;
        max-height: 90vh;
        margin: 0;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.modal-title-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-title-area .type-badge {
    align-self: flex-start;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.3;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 10;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}
.bookmark-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.4rem;
    color: white;
    cursor: pointer;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, transform 0.15s;
    line-height: 1;
}
.bookmark-toggle-btn:hover { background: rgba(255,255,255,0.3); }
.bookmark-toggle-btn.active { color: #ffd54f; }

.close-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.4);
}

.modal-body {
    padding: 20px;
}

@media (min-width: 768px) {
    .modal-header {
        padding: 25px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 30px;
    }
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

@media (min-width: 768px) {
    .detail-grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* ── 민간입찰 상세 페이지 ── */
.detail-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.detail-sidebar .detail-card {
    padding: 16px;
}
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}
.detail-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
}
.detail-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}
.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.status-pill.draft { background: #f1f5f9; color: #64748b; }
.status-pill.open { background: #dcfce7; color: #166534; }
.status-pill.closed { background: #fef3c7; color: #92400e; }
.status-pill.awarded { background: #dbeafe; color: #1e40af; }

.detail-card > .detail-section {
    border: none;
    border-radius: 0;
    margin: 0 -20px;
    padding: 0 20px;
}
.detail-card > .detail-section + .detail-section {
    border-top: 1px solid #f1f5f9;
    margin-top: 16px;
    padding-top: 16px;
}
.detail-card > .detail-section h3 {
    background: none;
    border-bottom: none;
    padding: 0 0 10px 0;
    font-size: 0.9rem;
    color: #334155;
}
.body-html {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #374151;
    word-break: break-word;
}
.body-html p { margin: 0 0 8px 0; }

/* 본문 인라인 미디어 크기 (위저드 에디터와 동일) */
.body-html figure.inline-media { margin: 12px 0; padding: 0; border-radius: 10px; overflow: hidden; }
.body-html figure.inline-media.size-small { max-width: 240px; }
.body-html figure.inline-media.size-medium { max-width: 400px; }
.body-html figure.inline-media.size-full { max-width: 100%; }
/* 오버레이 플레이어인 경우 사이즈 제한 해제 */
.body-html figure.inline-media.overlay-player-wrap { max-width: 100%; overflow: visible; }
.body-html figure.inline-media img,
.body-html figure.inline-media video {
    display: block; width: 100%; height: auto; border-radius: 8px; background: #0f172a;
}
.body-html figure.inline-media video { min-height: 80px; }
@media (max-width: 768px) {
    .body-html figure.inline-media video { width: auto; max-width: 100%; max-height: 50vh; object-fit: contain; }
}

/* 공고정보 DL */
.detail-dl {
    margin: 0;
}
.detail-dl-row {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
}
.detail-dl-row:last-child { border-bottom: none; }
.detail-dl-row dt {
    flex: 0 0 60px;
    color: #64748b;
    font-weight: 500;
}
.detail-dl-row dd {
    margin: 0;
    color: #1e293b;
}
.price-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}
.price-badge.fixed { background: #dbeafe; color: #1e40af; }
.price-badge.bidding { background: #fef3c7; color: #92400e; }

.contact-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.85rem;
    color: #475569;
}
.contact-info h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 6px 0;
}
.contact-info div { margin-bottom: 2px; }

.owner-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.btn-sm {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}
.btn-sm:hover { background: #f3f4f6; border-color: #9ca3af; }
.btn-sm.primary { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.btn-sm.primary:hover { background: #4338ca; }
.btn-sm.danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.btn-sm.danger:hover { background: #dc2626; }

/* 첨부파일 그리드 */
.appendix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 10px;
}
.appendix-card {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}
.appendix-media {
    position: relative;
}
.appendix-media img,
.appendix-media video {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 200px;
}
.appendix-card .detail-meta {
    padding: 6px 10px;
    font-size: 0.78rem;
}

/* 참여 현황 */
/* 사이드바 카드 내부 h3 */
.detail-sidebar .detail-card > h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

/* 참여 신청 폼 */
.subpage-form-row {
    margin-bottom: 12px;
}
.subpage-form-row label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 4px;
}
.subpage-form-row input[type="text"],
.subpage-form-row input[type="file"],
.subpage-form-row textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    box-sizing: border-box;
    background: #fff;
}
.subpage-form-row textarea {
    min-height: 80px;
    resize: vertical;
}
.subpage-form-actions {
    margin-top: 12px;
    text-align: right;
}

/* 참여 현황 */
.participation-item {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    color: #374151;
}
.participation-item:last-child { border-bottom: none; }
.participation-item div { margin-bottom: 3px; }

/* 결과 보고/평가 상태 배지 */
.status-badge { font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; display: inline-block; }
.status-badge.pending, .status-badge.submitted { background: #fef3c7; color: #92400e; }
.status-badge.accepted { background: #d1fae5; color: #065f46; }
.status-badge.rejected { background: #fee2e2; color: #991b1b; }
.participation-item strong { color: #64748b; font-weight: 500; }

/* 참여 카드 */
.participation-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 12px 14px;
    transition: box-shadow 0.15s;
}
.participation-card-link:hover .participation-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.participation-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.participation-card-email {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-primary);
}
.participation-card-quote {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 2px;
}
.participation-card-date {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}

.muted {
    color: #94a3b8;
    font-size: 0.85rem;
}
.error-box {
    background: #fef2f2;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    border: 1px solid #fecaca;
}

.detail-section {
    background: #ffffff;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.detail-section.full-width {
    grid-column: 1 / -1;
}

.detail-section h3 {
    margin: 0;
    color: #495057;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.norm-indicator {
    font-size: 0.9rem;
    margin-left: 6px;
    opacity: 1;
    display: inline-block;
}

.detail-tag {
    display: inline-block;
    background: #eef2ff;
    color: #3b4cca;
    padding: 4px 8px;
    border-radius: 8px;
    margin: 2px 4px 2px 0;
    font-size: 0.82rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.data-rows .row {
    margin-bottom: 6px;
    font-size: 0.9rem;
    line-height: 1.35;
}

.link-list {
    padding-left: 18px;
    margin: 0;
}

.link-list li {
    margin-bottom: 4px;
}

.link-list a {
    color: #1f6feb;
    text-decoration: underline;
}

.normalized-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 768px) {
    .normalized-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.normalized-block {
    background: #ffffff;
    border: 1px solid #e3e7ef;
    border-radius: 10px;
    padding: 12px;
}

.normalized-title {
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 8px;
    color: #27364f;
}

/* 기초금액 표 스타일 */
.base-amount-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 0.9rem;
}

.base-amount-table th,
.base-amount-table td {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    text-align: left;
}

.base-amount-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    width: 25%;
}

.base-amount-table td {
    background-color: #ffffff;
    color: #212529;
}

.normalized-status {
    font-size: 0.9rem;
    color: #5f6b7a;
    margin-bottom: 6px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    padding: 8px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    min-height: 36px;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item:nth-child(even) {
    background: #fafbfc;
}

.detail-item label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
    font-size: 0.85rem;
    background: #f8f9fa;
    padding: 0;
    white-space: pre-line;
    line-height: 1.3;
}

.detail-item span {
    color: #212529;
    word-break: break-word;
    line-height: 1.4;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .detail-item {
        flex-direction: row;
        align-items: flex-start;
        padding: 8px 16px;
    }
    
    .detail-item label {
        width: 120px;
        min-width: 120px;
        max-width: 120px;
        margin-right: 0;
        margin-bottom: 0;
        flex-shrink: 0;
        border-right: 1px solid #dee2e6;
        padding-right: 12px;
        padding-top: 2px;
    }
    
    .detail-item span {
        flex: 1;
        min-width: 0;
        padding-left: 12px;
        padding-top: 2px;
    }
}
/* 발주기관 + 과거 공고 버튼 — 명시적 래퍼로 세로 정렬 (버튼이 기관명을 가리지 않도록) */
.detail-item-org .detail-org-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    flex: 1;
    min-width: 0;
    padding-left: 12px;
    padding-top: 2px;
}
@media (max-width: 767px) {
    .detail-item-org .detail-org-wrap {
        padding-left: 0;
    }
}
.detail-item-org .detail-org-wrap #detailOrganization {
    display: block;
    width: 100%;
    word-break: keep-all;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.4;
    padding-left: 0;
}
.detail-item-org .detail-org-wrap #orgHistoryBtn {
    flex-shrink: 0;
    align-self: flex-start;
}

.detail-content {
    background: #fff;
    padding: 16px;
    color: #212529;
    line-height: 1.6;
    font-size: 0.9rem;
}

.extra-info-list {
    padding: 0;
}

.extra-info-item {
    display: flex;
    padding: 8px 16px;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
    background: #fff;
    min-height: 36px;
}

.extra-info-item:nth-child(even) {
    background: #fafbfc;
}

.extra-info-item:last-child {
    border-bottom: none;
}

/* 첨부파일 스타일 */
.attachments-list {
    padding: 0;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    min-height: 36px;
}

.attachment-item:nth-child(even) {
    background: #fafbfc;
}

.attachment-item:last-child {
    border-bottom: none;
}

.attachment-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.attachment-name {
    flex: 1;
    color: #555;
    font-size: 0.9rem;
    word-break: break-all;
}

.attachment-name-text {
    flex: 1;
    color: #333;
    font-size: 0.9rem;
    word-break: break-all;
    margin-right: 8px;
}

.attachment-name-link {
    flex: 1;
    color: #2196F3;
    font-size: 0.9rem;
    word-break: break-all;
    margin-right: 8px;
    text-decoration: none;
    cursor: pointer;
}

.attachment-name-link:hover {
    text-decoration: underline;
    color: #1976D2;
}

.attachment-view-btn,
.attachment-download-btn,
.attachment-convert-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1rem;
    margin-left: 4px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.attachment-view-btn {
    background: #e3f2fd;
    border: 1px solid #90caf9;
}

.attachment-view-btn:hover {
    background: #bbdefb;
}

.attachment-convert-btn {
    background: #fff3e0;
    border: 1px solid #ffcc80;
}

.attachment-convert-btn:hover {
    background: #ffe0b2;
}

.attachment-convert-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.attachment-download-btn {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
}

.attachment-download-btn:hover {
    background: #eeeeee;
}

.attachment-link {
    flex: 1;
    color: #1a73e8;
    font-size: 0.9rem;
    text-decoration: none;
    word-break: break-all;
    transition: color 0.2s;
}

.attachment-link:hover {
    color: #1557b0;
    text-decoration: underline;
}

.attachment-link:active {
    color: #0d47a1;
}

.download-icon {
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.open-icon {
    font-size: 0.9rem;
    opacity: 0.6;
    margin-left: 4px;
}

.attachment-item:hover .download-icon,
.attachment-item:hover .open-icon {
    opacity: 1;
}

/* 모바일 터치 영역 확대 */
@media (max-width: 767px) {
    .attachment-item {
        padding: 14px 0;
        min-height: 48px;
    }
    
    .attachment-link {
        font-size: 1rem;
    }
}

/* 첨부파일 다운로드 안내 */
.attachments-notice {
    margin-top: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 1px solid #ffb74d;
    border-radius: 8px;
    color: #e65100;
    font-size: 0.85rem;
    line-height: 1.5;
    display: none;
}

.extra-label {
    font-weight: 600;
    color: #495057;
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    font-size: 0.85rem;
    flex-shrink: 0;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    padding-right: 12px;
    padding-top: 2px;
    white-space: pre-line;
    line-height: 1.3;
}

.extra-value {
    flex: 1;
    color: #212529;
    font-size: 0.9rem;
    padding-left: 12px;
    padding-top: 2px;
    line-height: 1.4;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

@media (min-width: 768px) {
    .modal-actions {
        flex-direction: row;
        justify-content: flex-end;
        gap: 15px;
    }
}

.action-btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn.primary {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(26, 35, 126, 0.3);
}

.action-btn.secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.action-btn.secondary:hover {
    background: #e9ecef;
}

/* 컨소시엄 등록 버튼 — 제목+설명 2행 */
.action-btn.collab {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    flex-direction: column;
    gap: 2px;
    padding: 8px 16px;
}
.action-btn.collab:hover { background: #c8e6c9; }
.action-btn.collab.collab-not-joined {
    background: transparent; color: #2e7d32; border: 1.5px solid #a5d6a7;
    cursor: pointer;
}
.action-btn.collab.collab-not-joined:hover { background: rgba(165,214,167,0.15); }
.collab-btn-title { font-size: 0.88rem; font-weight: 700; }
.collab-btn-desc { font-size: 0.7rem; opacity: 0.7; font-weight: 400; }

/* 하단 액션 버튼 래핑 개선 */
@media (min-width: 768px) {
    .modal-actions { flex-wrap: wrap; }
    .modal-actions .action-btn.primary { flex: 1 1 auto; }
    .modal-actions .action-btn.collab { flex: 0 1 auto; }
    .modal-actions .action-btn.secondary { flex: 0 0 auto; }
}

/* 푸터 */
footer {
    text-align: center;
    margin-top: 20px;
    padding: 15px 10px;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
    font-size: 0.75rem;
}

footer p {
    margin-bottom: 3px;
}

footer .data-sources {
    margin: 8px 0;
}

footer .data-sources a {
    color: #4a90d9;
    text-decoration: none;
    transition: color 0.2s;
}

footer .data-sources a:hover {
    color: #2d6cb5;
    text-decoration: underline;
}

footer .api-notice {
    font-size: 0.65rem;
    opacity: 0.7;
    margin-top: 5px;
}

footer p:last-child {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* 데이터 출처 표시 스타일 */
.data-source-row {
    background: rgba(74, 144, 217, 0.08);
    border-radius: 4px;
    padding: 2px 4px;
    margin-bottom: 4px;
}

.data-source {
    color: #4a90d9;
    font-size: 0.75rem;
    font-weight: 500;
}

/* 면허 정보 표시 스타일 */
.license-info {
    background: rgba(40, 167, 69, 0.08);
    border-radius: 4px;
    padding: 2px 4px;
    margin-bottom: 4px;
    border-left: 3px solid #28a745;
}

.license-info .info-value {
    color: #1e7e34;
    font-weight: 500;
}

/* 추가 모바일 최적화 */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    header {
        padding: 8px;
    }
    
    header h1 {
        font-size: 1rem;
    }
    
    header p {
        font-size: 0.65rem;
    }
    
    .search-section {
        padding: 10px;
    }
    
    .type-filters {
        padding: 6px;
    }

    .filter-label {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .stats-grid {
        gap: 5px;
    }
    
    .stat-card {
        padding: 6px;
    }
    
    .stat-count {
        font-size: 1rem;
    }
    
    .results-grid {
        padding: 8px;
        gap: 8px;
    }
    
    .result-card {
        padding: 10px;
    }
    
    .card-title {
        font-size: 0.85rem;
    }
}

/* 알림 권한 요청 프롬프트 */
.notification-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 8px 0;
    font-size: 14px;
    flex-wrap: wrap;
}

.notification-prompt button {
    background: white;
    color: #667eea;
    border: none;
    padding: 6px 14px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}

.notification-prompt button:last-child {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ============================================
   면허 필터 - 카테고리별 그리드 스타일 (컴팩트)
   ============================================ */

.license-filter-toolbar-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.license-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.license-save-btn {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.license-save-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

.license-save-btn:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(57, 73, 171, 0.25);
    transform: translateY(-1px);
}

.license-select-all-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.license-select-all-btn:hover {
    background: #5a6fd6;
}

.license-select-all-btn.active {
    background: #4caf50;
}

.license-select-all-btn input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.license-categories-wrapper {
    max-height: none;
    overflow-y: visible;
    overflow-x: hidden;
    padding: 4px;
    background: #fff;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.license-category-section {
    margin-bottom: 2px;
    background: white;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.license-category-header {
    background: #f8f8f8;
    color: #333;
    padding: 2px 6px;
    border-bottom: 1px solid #e8e8e8;
    border-left: 3px solid #667eea;
}

.category-select-all {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 12px;
    justify-content: flex-start;
    width: 100%;
}

.category-select-all input[type="checkbox"] {
    width: 13px;
    height: 13px;
    cursor: pointer;
}

.category-icon {
    font-size: 13px;
}

.category-name {
    margin-right: auto;
    text-align: left;
}

.category-count {
    font-size: 11px;
    color: #888;
    margin-left: auto;
}

.license-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 3px;
    padding: 4px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1200px) {
    .license-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .license-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .license-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .license-grid {
        grid-template-columns: 1fr;
    }
}

.license-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 12px;
    min-height: 32px;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.license-item.selected {
    background: #e3f2fd;
    border-color: #1976d2;
    box-shadow: 0 0 0 1px rgba(25, 118, 210, 0.3);
}

.license-item input[type="checkbox"] {
    width: 12px;
    height: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

.license-name {
    font-size: 12px;
    color: #333;
    line-height: 1.3;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
    flex: 1;
    min-width: 0;
}

.license-empty {
    text-align: center;
    padding: 15px;
    color: #666;
    font-size: 13px;
}

.license-search-btn {
    display: none !important;
}

/* 피드백 메시지 숨기기 */
.license-feedback {
    display: none !important;
    flex-shrink: 0;
}

/* 선택된 면허 표시 영역 */
.license-selected-box {
    background: #f0f7ff;
    border: 1px solid #b3d4fc;
    border-radius: 4px;
    padding: 6px 10px;
    margin-top: 8px;
    font-size: 12px;
    color: #1565c0;
    line-height: 1.5;
}

.license-selected-box.hidden {
    display: none;
}

.license-selected-box .label {
    font-weight: 600;
    margin-right: 6px;
}

.license-selected-box .items {
    color: #333;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.license-selected-box .license-chip {
    padding: 4px 10px;
    font-size: 11px;
    line-height: 1.2;
    max-width: 100%;
    word-break: break-word;
}

/* 접힌 상태에서 상단에 보이는 선택 요약 */
.license-filter-summary {
    font-size: 12px;
    color: #666;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ===========================================================================
   문서 요약 모달 스타일
   =========================================================================== */

/* 2026-03-10: 요약 모달 화면 가득 채우기 */
.summary-modal-content {
    max-width: 95vw;
    width: 95vw;
    max-height: calc(95vh - var(--ad-reserved, 40px));
    display: flex;
    flex-direction: column;
}
.summary-modal-content .modal-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.summary-badge {
    background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
}

/* 요약 버튼 */
.attachment-summary-btn {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 6px;
    transition: all 0.2s ease;
}

.attachment-summary-btn:hover {
    background: linear-gradient(135deg, #6d28d9, #9333ea);
    transform: scale(1.1);
}

.attachment-summary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 로딩 스피너 */
.summary-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #7c3aed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-subtext {
    color: #9ca3af;
    font-size: 13px;
    margin-top: 8px;
}

/* 요약 내용 */
.summary-content {
    padding: 10px 0;
}

/* 2026-03-10: summary-text 높이 제한 해제 — 모달이 flex로 관리 */
.summary-text {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.7;
    max-height: none;
    overflow-y: auto;
}

.summary-text h3 {
    color: #1f2937;
    font-size: 16px;
    margin: 16px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e5e7eb;
}

.summary-text h3:first-child {
    margin-top: 0;
}

.summary-text h4 {
    color: #374151;
    font-size: 14px;
    margin: 12px 0 6px;
}

.summary-text ul {
    margin: 8px 0;
    padding-left: 20px;
}

.summary-text li {
    margin: 4px 0;
}

.summary-text strong {
    color: #1f2937;
}

.summary-text p {
    margin: 8px 0;
}

/* 요약 메타 정보 */
.summary-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #6b7280;
}

.results-virtual-wrapper.scrolling .result-card {
    transition: none !important;
}
.result-card {
    /* 비가시 영역 최적화 및 고유 크기 힌트 */
    content-visibility: auto;
    contain-intrinsic-size: 360px 220px;
    contain: layout paint style;
}
.results-virtual-wrapper .results-grid {
    /* 향후 translateY 도입 시 합성 최적화 */
    will-change: transform;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #6b7280;
}

.cached-badge {
    background: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

/* 요약 에러 */
.summary-error {
    text-align: center;
    padding: 30px 20px;
    color: #dc2626;
}

.summary-error p:first-child {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

#summaryErrorText {
    color: #6b7280;
    font-size: 13px;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .summary-modal-content {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        margin: 10px;
        max-height: calc(100vh - 70px);
    }

    .summary-text {
        max-height: none;
        font-size: 13px;
    }
    
    .attachment-summary-btn {
        padding: 6px 10px;
        font-size: 16px;
    }
}

/* 2026-03-10: 문서 변환 로딩 표시 */
.pdf-viewer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    gap: 12px;
}
.pdf-viewer-loading p {
    font-size: 16px;
    margin: 0;
}
.pdf-viewer-loading .loading-subtext {
    font-size: 13px;
    color: #9ca3af;
}

/* 2026-03-10: PDF 뷰어 모달 화면 가득 채우기 */
.pdf-viewer-content {
    width: 95vw;
    max-width: 95vw;
    height: calc(95vh - var(--ad-reserved, 40px));
    max-height: calc(95vh - var(--ad-reserved, 40px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.pdf-viewer-body {
    padding: 0;
    flex: 1;
    min-height: 0;
    background: #525659;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.pdf-viewer-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

#pdfViewerContainer {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
    box-sizing: border-box;
}

/* 변환 방법 선택 버튼 스타일 */
.conversion-method-btn {
    padding: 15px;
    text-align: left;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.conversion-method-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.conversion-method-btn:active {
    transform: translateY(0);
}

/* 2026-03-10: 데스크탑 PDF 뷰어도 화면 가득 채우기 */
@media (min-width: 768px) {
    .pdf-viewer-content {
        width: 95vw;
        max-width: 95vw;
        height: calc(95vh - var(--ad-reserved, 40px));
        max-height: calc(95vh - var(--ad-reserved, 40px));
    }

    .pdf-viewer-body {
        flex: 1;
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .pdf-viewer-content {
        width: calc(100vw - 10px);
        max-width: calc(100vw - 10px);
        margin: 5px;
        height: calc(100vh - 70px);
        max-height: calc(100vh - 70px);
    }

    .pdf-viewer-body {
        flex: 1;
        min-height: 0;
    }
}

/* 면허필터 슬라이드 패널 스타일 */
.license-filter-card {
    display: none !important; /* 슬라이드 패널만 사용 */
}

.license-panel-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
    pointer-events: none;
}

.license-panel-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.license-slide-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: 40vw;
    min-width: 360px;
    max-width: 800px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.45);
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
    z-index: 10001;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
}

.license-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 14px;
    height: 100%;
    cursor: ew-resize;
    transform: translateX(-50%);
    display: none;
    z-index: 10002;
    touch-action: none;
}

.license-resize-handle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 48px;
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(120, 120, 120, 0.1), rgba(120, 120, 120, 0.6), rgba(120, 120, 120, 0.1));
}

.license-slide-panel.open .license-resize-handle {
    display: block;
}

.license-slide-panel.open {
    transform: translateX(0);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.35);
}

/* 데스크톱: 화면의 1/3 */
@media (min-width: 769px) {
    .license-slide-panel {
        width: 40vw;
        min-width: 380px;
        max-width: 840px;
    }
}

/* 태블릿: 화면의 절반 */
@media (min-width: 481px) and (max-width: 768px) {
    .license-slide-panel {
        width: 60vw;
        min-width: 320px;
    }
}

/* 모바일: 전체 화면 */
@media (max-width: 480px) {
    .license-slide-panel {
        width: 100%;
    }
}

.license-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex-shrink: 0;
}

.license-panel-header h3 {
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
}

.license-panel-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.license-panel-header-actions .complete-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    padding: 5px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.license-panel-header-actions .complete-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.license-panel-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    min-width: auto;
}

.license-panel-header .close-btn:hover {
    opacity: 0.8;
}

.license-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.license-panel-footer {
    padding: 15px;
    border-top: 2px solid #f0f0f0;
    background: #f9f9f9;
    flex-shrink: 0;
}

.license-panel-footer .complete-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.license-panel-footer .complete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.license-panel-footer .complete-btn:active {
    transform: translateY(0);
}

body.license-panel-resizing {
    cursor: ew-resize;
    user-select: none;
}

/* 검색 버튼 스타일 조정 */
#searchBtn,
.search-buttons .secondary-btn,
.license-filter-btn {
    white-space: nowrap;
    line-height: 1.2;
    min-height: 32px;
}

.license-filter-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.license-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.license-filter-btn:active {
    transform: translateY(0);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .license-slide-panel {
        width: 100%;
    }

    .license-resize-handle {
        display: none !important;
    }
}

body.license-panel-open {
    overflow: hidden;
}

/* ============================================
   서브페이지 헤더 (민간입찰 등)
   ============================================ */
.header-compact {
    padding: 10px 12px;
}
.header-compact .header-content {
    gap: 12px;
}
.header-compact h1 {
    font-size: 1rem;
    margin-bottom: 0;
}
.header-compact .header-subtitle {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.85);
}
.header-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-secondary, #f3f4f6);
    color: var(--color-primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
}
.header-back-btn:hover {
    background: var(--color-border);
}

/* ============================================
   공유 서브페이지 컴포넌트
   ============================================ */
.status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    background: var(--color-border);
    color: var(--color-text);
}
.status-pill.open { background: var(--color-success-bg); color: #166534; }
.status-pill.closed { background: var(--color-danger-bg); color: #991b1b; }
.status-pill.draft { background: var(--color-warning-bg); color: #92400e; }
.status-pill.awarded { background: var(--color-info-bg); color: #1e40af; }

.price-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
}
.price-badge.fixed { background: var(--color-info-bg); color: #1e40af; }
.price-badge.bidding { background: var(--color-warning-bg); color: #92400e; }

.bid-type {
    display: inline-block;
    background: var(--color-primary-bg);
    color: #3730a3;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
}

.empty-state {
    padding: 40px 20px;
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    text-align: center;
    font-size: 14px;
}

.error-box {
    background: var(--color-danger-bg);
    color: #991b1b;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 13px;
}

.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: #334155;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
}
.btn-sm:hover { background: var(--color-border); }
.btn-sm.danger { background: var(--color-danger-bg); color: #991b1b; border-color: #fca5a5; }
.btn-sm.danger:hover { background: #fecaca; }
.btn-sm.primary { background: var(--color-primary); color: var(--color-surface); border-color: var(--color-primary); }
.btn-sm.primary:hover { background: var(--color-primary-dark); }

/* ── 탭 바 (내일거리 목록) ── */
.pb-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 16px;
}
.pb-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}
.pb-tab:hover { color: var(--color-text); }
.pb-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}
.pb-tab-count {
    font-size: 12px;
    background: var(--color-bg-secondary, #f3f4f6);
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 4px;
}
.pb-tab.active .pb-tab-count {
    background: var(--color-primary);
    color: #fff;
}

/* ============================================
   목록 페이지 컴포넌트
   ============================================ */
.bid-list-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding: 4px 0;
}
.bid-stat-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}
.bid-stat-chip .bid-stat-count { font-weight: 700; color: var(--color-text); }
.bid-stat-chip .bid-stat-label { color: var(--color-text-secondary); }
.bid-stat-chip.open { border-color: #86efac; background: #f0fdf4; }
.bid-stat-chip.draft { border-color: #fde68a; background: #fffbeb; }
.bid-stat-chip.closed { border-color: #fca5a5; background: #fef2f2; }
.bid-stat-chip.awarded { border-color: #93c5fd; background: #eff6ff; }

.bid-list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 768px) {
    .bid-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.bid-list-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.bid-list-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.bid-list-card-link {
    display: block;
    padding: 16px;
    text-decoration: none;
    color: inherit;
}
.bid-list-card-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.bid-list-card-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
}
.bid-list-card-title .draft-marker { color: var(--color-warning); }
.bid-list-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--color-text-secondary);
}
.bid-list-card-actions {
    padding: 10px 16px;
    border-top: 1px solid var(--color-border-light);
    display: flex;
    gap: 8px;
}

/* ══════════════════════════════════════════════════════
   버튼 스타일 개선 — 맥락별 차별화
   ══════════════════════════════════════════════════════ */

/* ── 2A. 헤더 액션 버튼 (민간입찰 등) — frosted glass ── */
.header-actions .secondary-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    letter-spacing: 0.02em;
    min-height: 36px;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.header-actions .secondary-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}
.header-actions .secondary-btn:active {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

/* ── 2B. 검색 영역 버튼 (7일, 면허필터) — 블루 톤 ── */
.search-buttons .secondary-btn {
    background: #f0f4ff;
    color: var(--color-primary);
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px !important;
    padding: 4px 6px !important;
    min-height: 28px !important;
    box-shadow: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.search-buttons .secondary-btn:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
    box-shadow: 0 2px 6px rgba(57, 73, 171, 0.12);
}
.search-buttons .secondary-btn:active {
    background: #c7d2fe;
    border-color: #818cf8;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* 정보패널 토글 버튼 */
#infoPanelToggleBtn {
    background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
    color: #33691e; border-color: #aed581;
}
#infoPanelToggleBtn.info-panel-btn-active {
    background: linear-gradient(135deg, #33691e 0%, #558b2f 100%);
    color: #fff; border-color: #33691e;
}

/* 면허필터 버튼 — 보라색 강조 */
#licenseFilterBtn {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    color: #6d28d9;
    border: 1.5px solid #c4b5fd;
    font-weight: 600;
}
#licenseFilterBtn:hover {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-color: #a78bfa;
    box-shadow: 0 3px 8px rgba(109, 40, 217, 0.12);
}

/* ── 2C. 챗봇 보내기 버튼 — 마이크로 인터랙션 ── */
.consult-send-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: #ffffff;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(57, 73, 171, 0.3);
    transition: all 0.2s ease;
    letter-spacing: 0.03em;
}
.consult-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(57, 73, 171, 0.4);
}
.consult-send-btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(57, 73, 171, 0.25);
}
.consult-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 다른 대화 버튼 — 아웃라인 필 스타일 */
.consult-actions .secondary-btn {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid #c7d2fe;
    border-radius: var(--radius-pill);
    padding: 5px 14px;
    font-size: 0.72rem;
    font-weight: 600;
    min-height: auto;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.consult-actions .secondary-btn:hover {
    background: var(--color-primary-bg);
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}
.consult-actions .secondary-btn:active {
    background: #e0e7ff;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* ── 2D. 챗봇 선택 버튼 — 더 생동감 ── */
.consult-suggestion-btn {
    border: 1.5px solid #c7d2fe;
    background: #fafbff;
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 1px 2px rgba(57, 73, 171, 0.06);
}
.consult-suggestion-btn:hover {
    background: #e8eafc;
    border-color: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(57, 73, 171, 0.12);
}
.consult-quick-btn {
    border: 1.5px solid #c7d2fe;
    background: #fafbff;
    color: #1a237e;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 1px 2px rgba(57, 73, 171, 0.06);
}
.consult-quick-btn:hover {
    background: #e8eafc;
    border-color: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(57, 73, 171, 0.12);
}
.consult-quick-btn.yes {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(57, 73, 171, 0.25);
}
.consult-quick-btn.yes:hover {
    box-shadow: 0 4px 12px rgba(57, 73, 171, 0.35);
    transform: translateY(-1px);
}
.consult-quick-btn.no {
    background: #fff;
    border-color: #e2e8f0;
    color: #64748b;
}
.consult-quick-btn.no:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

/* ── 2E. 결과 카드 상세 버튼 — 크기 확대, 호버 반전 ── */
.btn-detail-sm {
    padding: 4px 12px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eafc 100%);
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}
.btn-detail-sm:hover {
    background: linear-gradient(135deg, #3949ab 0%, #1a237e 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(57, 73, 171, 0.2);
    transform: translateY(-1px);
}
.btn-detail-sm:active {
    transform: scale(0.95);
}

/* ── 2F. 첨부파일 버튼 — 컨텍스트별 색상 + 호버 효과 ── */
.attachment-view-btn,
.attachment-download-btn,
.attachment-convert-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    margin-left: 4px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    cursor: pointer;
}
.attachment-view-btn {
    background: #e3f2fd;
    border: 1px solid #90caf9;
}
.attachment-view-btn:hover {
    background: #bbdefb;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(25, 118, 210, 0.15);
}
.attachment-download-btn {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
}
.attachment-download-btn:hover {
    background: #c8e6c9;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(56, 142, 60, 0.15);
}
.attachment-convert-btn {
    background: #fff3e0;
    border: 1px solid #ffcc80;
}
.attachment-convert-btn:hover {
    background: #ffe0b2;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(245, 124, 0, 0.15);
}
.attachment-convert-btn:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

/* ── 2G. 서브페이지 헤더 버튼 ── */
.header-compact .secondary-btn {
    background: var(--color-primary-bg);
    color: var(--color-primary);
    border: 1.5px solid #c7d2fe;
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 36px;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.header-compact .secondary-btn:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
    box-shadow: 0 2px 6px rgba(57, 73, 171, 0.12);
}
.header-compact .secondary-btn:active {
    background: #c7d2fe;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* ── 모바일 대응 ── */
@media (max-width: 480px) {
    .search-buttons .secondary-btn {
        min-height: 32px;
        padding: 5px 10px;
        font-size: 12px;
    }
    .header-actions .secondary-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
        min-height: 32px;
    }
    .header-compact .secondary-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
        min-height: 32px;
    }
}

/* ── 오버레이 플레이어 (인라인 비디오 도형 오버레이) ── */
.overlay-player-wrap {
    display: block;
    width: 100%;
    overflow: hidden;
}
/* 비디오 영역 wrapper — 캔버스/터치/아이콘은 이 안에서 absolute */
.ovp-video-area {
    position: relative;
    width: 100%;
    line-height: 0; /* 비디오 아래 공백 제거 */
}
.ovp-video-area video {
    display: block;
    width: 100%;
}
.overlay-player-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}
.overlay-player-touch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    cursor: pointer;
}
.overlay-player-play-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    pointer-events: none;
    transition: opacity 0.2s;
}
.overlay-player-play-icon svg {
    opacity: 0.85;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

/* 오버레이 플레이어 포커스 아웃라인 제거 */
.overlay-player-wrap,
.overlay-player-wrap video,
.overlay-player-wrap .ovp-video-area,
.overlay-player-wrap button,
.overlay-player-wrap .ovp-range {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* 네이티브 비디오 컨트롤 숨김 — 커스텀 플레이어가 처리 */
.overlay-player-wrap video::-webkit-media-controls {
    display: none !important;
}
.overlay-player-wrap video::-webkit-media-controls-panel {
    display: none !important;
}
.overlay-player-wrap video::-webkit-media-controls-start-playback-button {
    display: none !important;
}
.overlay-player-wrap video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

/* 컨트롤 바 — 일반: 영상 아래 / 전체화면: 영상 위 오버레이 */
.overlay-player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #1a1a1a;
    position: relative;
    z-index: 5;
    transition: opacity 0.3s;
}
.overlay-player-controls.ovp-controls-hidden {
    opacity: 0;
    pointer-events: none;
}
.ovp-play-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    flex-shrink: 0;
}
.ovp-progress-wrap {
    flex: 1;
    height: 28px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}
/* range 슬라이더 기반 시크바 — 네이티브 플레이어 스타일 */
.ovp-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: transparent;
    margin: 0;
    padding: 0;
    cursor: pointer;
    position: relative;
    z-index: 2;
}
.ovp-range:focus { outline: none; }
/* 트랙 (배경 + 채움을 JS로 그라디언트 처리) */
.ovp-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right,
        var(--color-primary, #3949ab) var(--ovp-pct, 0%),
        rgba(255,255,255,0.3) var(--ovp-pct, 0%));
    transition: height 0.15s;
}
.ovp-progress-wrap:hover .ovp-range::-webkit-slider-runnable-track,
.ovp-progress-wrap:active .ovp-range::-webkit-slider-runnable-track {
    height: 6px;
}
.ovp-range::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.3);
}
.ovp-range::-moz-range-progress {
    height: 4px;
    border-radius: 2px;
    background: var(--color-primary, #3949ab);
}
/* 썸 (핸들) */
.ovp-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: none;
    margin-top: -5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s;
}
.ovp-progress-wrap:hover .ovp-range::-webkit-slider-thumb,
.ovp-progress-wrap:active .ovp-range::-webkit-slider-thumb {
    opacity: 1;
    transform: scale(1.1);
}
.ovp-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.15s;
}
.ovp-progress-wrap:hover .ovp-range::-moz-range-thumb,
.ovp-progress-wrap:active .ovp-range::-moz-range-thumb {
    opacity: 1;
}
.ovp-time {
    color: rgba(255,255,255,0.7);
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.ovp-fs-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.8;
}
.ovp-fs-btn:active {
    opacity: 1;
}

/* CSS 기반 가짜 전체화면 (iOS 호환) */
.overlay-player-wrap.ovp-fullscreen {
    position: fixed !important;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    z-index: 99999;
    background: #000;
    border-radius: 0;
    margin: 0 !important;
    padding: 0 !important;
}
.overlay-player-wrap.ovp-fullscreen .ovp-video-area {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.overlay-player-wrap.ovp-fullscreen video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}
.overlay-player-wrap.ovp-fullscreen .overlay-player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

/* 모바일 대응 — 터치에서는 항상 thumb 표시 */
@media (max-width: 600px) {
    .overlay-player-play-icon svg {
        width: 48px;
        height: 48px;
    }
    .overlay-player-controls {
        gap: 6px;
        padding: 5px 8px;
    }
    .ovp-time {
        font-size: 10px;
    }
    .ovp-range::-webkit-slider-thumb {
        opacity: 1;
        width: 16px;
        height: 16px;
        margin-top: -6px;
    }
    .ovp-range::-moz-range-thumb {
        opacity: 1;
        width: 16px;
        height: 16px;
    }
    .ovp-range::-webkit-slider-runnable-track {
        height: 5px;
    }
}

/* ── 하단 광고 배너 ── */
.ad-banner-area {
    flex-shrink: 0;
    height: 40px;
    background: #f8f9fa;
    border-top: 1px solid var(--color-border-light);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-banner-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.ad-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--color-text-muted);
    background: var(--color-border);
    padding: 1px 4px;
    border-radius: 2px;
    line-height: 1;
}

@media (min-width: 768px) {
    :root { --ad-reserved: 0px; }   /* 데스크탑: 광고 없음 → 예약 공간 0 */
    .ad-banner-area {
        display: none;
    }
}

/* 광고 배너 보호: 모든 오버레이/모달 위에 항상 표시 */
/* 2026-03-10: 컨소시엄 등 오버레이는 bottom: 40px으로 광고 영역 침범하지 않음 */
.ad-banner-area {
    z-index: 99999 !important;
    position: relative;
}

/* ── 결과 섹션 배경 ── */
.results-section {
    background: transparent;
}

/* ── 민간입찰 링크 버튼 (헤더) ── */
.header-actions .secondary-btn {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
}

.header-actions .secondary-btn:hover {
    background: var(--color-bg);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ── 모바일 가로 모드: 결과 전체 화면 ── */
/* 2026-03-10: 가로모드 레이아웃 — 모바일 가로 전용 (max-width:1024px 추가)
   데스크탑 브라우저 창 높이가 낮은 경우에는 적용하지 않음 */
@media (orientation: landscape) and (max-height: 650px) and (max-width: 1024px) {
    /* 기본: 헤더·검색·광고 숨기고 결과만 표시 */
    header,
    .sticky-search-bar,
    .ad-banner-area {
        display: none !important;
    }

    .container {
        padding-bottom: 0;
        flex: 1;
        min-height: 0;
        overflow: hidden !important;       /* 바깥 스크롤 제거 — 안쪽만 스크롤 */
    }

    .search-section {
        display: none !important;
    }

    /* 2026-03-10: 가로모드에서 즐겨찾기 사이드바 포함 전체 검색 래퍼 숨김 */
    .search-bookmark-row {
        display: none !important;
    }

    .info-cards-section {
        display: none !important;
    }

    /* 2026-03-10: 모바일 가로모드에서 데스크탑 전용 요소 강제 숨김 */
    .dashboard-section {
        display: none !important;
    }

    main {
        display: block;
        height: 100vh;
        overflow: hidden;
    }

    .results-section {
        width: 100%;
        height: 100%;
        max-height: none;
        overflow: hidden;
    }

    .results-header {
        padding: 6px 12px;
        background: #fff;
        z-index: 10;
        flex-shrink: 0;
    }

    .results-virtual-wrapper {
        height: calc(100vh - 36px);
        max-height: none;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* 결과 카드 4열 그리드 — 화면 내 정확히 수용 */
    .results-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
        padding: 6px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .result-card {
        border-radius: 8px !important;
        margin: 0 !important;
        border: 1px solid var(--color-border) !important;
        padding: 10px !important;
        font-size: 0.8rem;
        overflow: hidden !important;
        min-width: 0 !important;       /* 그리드 셀 넘침 방지 핵심 */
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 카드 내 모든 텍스트: 넘치면 개행 */
    .result-card .card-title {
        -webkit-line-clamp: unset !important;
        display: block !important;
        overflow: hidden !important;
        text-overflow: ellipsis;
        font-size: 0.8rem;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal !important;
    }

    .result-card .info-row {
        font-size: 0.7rem;
        flex-wrap: wrap;
        min-width: 0;
    }

    .result-card .info-value {
        word-break: break-word;
        overflow-wrap: break-word;
        min-width: 0;
        white-space: normal !important;
    }

    .result-card .card-header {
        margin-bottom: 4px;
        min-width: 0;
    }

    .result-card .card-info {
        gap: 2px;
        min-width: 0;
    }

    .result-card * {
        min-width: 0;
        max-width: 100%;
    }

    /* "검색" 토글 버튼 표시 */
    .landscape-search-toggle {
        display: inline-flex !important;
    }

    /* compact 스크롤 무시 */
    body.results-scroll-compact header,
    body.results-scroll-compact .search-buttons,
    body.results-scroll-compact .search-mode-row,
    body.results-scroll-compact .ai-reason-wrapper,
    body.results-scroll-compact .search-tabs,
    body.results-scroll-compact .consult-panel,
    body.results-scroll-compact .type-filters,
    body.results-scroll-compact .license-filter-card {
        max-height: 0;
        opacity: 0;
        pointer-events: none;
    }

    /* ── "검색 보기" 모드 (토글 시) ── */
    body.landscape-show-search header {
        display: flex !important;
        padding: 4px 12px;
    }

    body.landscape-show-search header h1 {
        font-size: 1rem;
    }

    body.landscape-show-search header p {
        display: none;
    }

    body.landscape-show-search .search-section {
        display: block !important;
        padding: 6px 10px;
        border-bottom: 1px solid var(--color-border-light);
        max-height: 50vh;
        overflow-y: auto;
    }

    body.landscape-show-search .type-filters {
        grid-template-columns: repeat(5, 1fr) !important;
        padding: 4px 8px;
        gap: 2px;
    }

    body.landscape-show-search .type-filter-btn {
        padding: 4px 2px;
    }

    body.landscape-show-search .type-filter-btn .filter-icon {
        font-size: 1rem;
    }

    body.landscape-show-search .type-filter-btn .filter-name {
        font-size: 0.5rem !important;
    }

    body.landscape-show-search .type-filter-btn .filter-count {
        display: none;
    }

    body.landscape-show-search .search-tabs {
        margin-bottom: 4px;
    }

    body.landscape-show-search .search-tab-btn {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    body.landscape-show-search .search-box {
        margin-bottom: 4px;
    }

    body.landscape-show-search .search-buttons {
        margin-bottom: 2px;
    }

    body.landscape-show-search #searchBtn,
    body.landscape-show-search #aiSearchBtn {
        padding: 4px 10px !important;
        font-size: 12px !important;
        min-height: 28px !important;
    }

    body.landscape-show-search .search-buttons .secondary-btn {
        padding: 3px 8px !important;
        font-size: 11px !important;
        min-height: 28px !important;
    }

    body.landscape-show-search .results-virtual-wrapper {
        max-height: calc(50vh - 36px);
    }
}

/* 검색 토글 버튼 (가로 모드 전용) */
/* 가로모드 검색 결과 없음 안내 */
.landscape-no-data {
    display: none;
}

@media (orientation: landscape) and (max-height: 650px) and (max-width: 1024px) {
    .landscape-no-data {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100vh;
        color: #78909c;
        text-align: center;
        gap: 8px;
    }
    .landscape-no-data-icon { font-size: 2.5rem; }
    .landscape-no-data-text { font-size: 1.1rem; font-weight: 600; color: #546e7a; }
    .landscape-no-data-hint { font-size: 0.8rem; color: #90a4ae; }

    /* JS에서 hidden 클래스로 제어 */
    .landscape-no-data.hidden {
        display: none !important;
    }
}

.landscape-search-toggle {
    display: none !important;
    align-items: center;
    gap: 4px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    cursor: pointer;
    margin-left: 8px;
    line-height: 1;
    transition: background 0.15s;
}

.landscape-search-toggle:hover {
    background: var(--color-primary-dark);
}

/* ===== 검색 필터 종합 다이얼로그 ===== */
.search-filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: var(--ad-reserved, 40px);
    background: rgba(0,0,0,0.45);
    z-index: 10100;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}
.search-filter-overlay.open {
    opacity: 1;
    visibility: visible;
}

.search-filter-dialog {
    position: fixed;
    top: calc((100vh - var(--ad-reserved, 40px)) / 2);
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 92vw;
    max-width: 540px;
    max-height: calc(100vh - var(--ad-reserved, 40px) - 24px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.25);
    z-index: 10101;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s, transform .25s;
}
.search-filter-dialog.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.sfd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
}
.sfd-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}
.sfd-close-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #888;
    padding: 4px 8px;
    line-height: 1;
}

.sfd-body {
    overflow-y: auto;
    padding: 0 20px 12px;
    flex: 1;
    min-height: 0;
}

/* 2026-04-08: 키워드 필터 섹션 */
.filter-keyword-input-row {
    display: flex; gap: 6px; margin-bottom: 8px;
}
.filter-keyword-input {
    flex: 1; padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 6px;
    font-size: 0.85rem; outline: none;
}
.filter-keyword-input:focus { border-color: #4a90d9; }
.filter-keyword-add-btn {
    padding: 7px 14px; background: #4a90d9; color: #fff; border: none;
    border-radius: 6px; font-size: 0.82rem; cursor: pointer; white-space: nowrap;
}
.filter-keyword-tags {
    display: flex; flex-wrap: wrap; gap: 6px; min-height: 8px;
}
.filter-keyword-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; background: #eef4ff; color: #1e40af; border-radius: 12px;
    font-size: 0.78rem; font-weight: 500;
}
.filter-keyword-tag .kw-alert {
    cursor: pointer; font-size: 0.85rem; opacity: 0.5; margin-left: 2px;
}
.filter-keyword-tag .kw-alert.active { opacity: 1; }
.filter-keyword-tag .kw-remove {
    cursor: pointer; font-size: 0.7rem; opacity: 0.6; margin-left: 2px;
}
.filter-keyword-tag .kw-remove:hover { opacity: 1; color: #dc2626; }
.filter-keyword-label {
    font-size: 0.75rem; font-weight: 600; color: #374151; margin-bottom: 4px;
}
.filter-keyword-label.exclude {
    color: #dc2626; margin-top: 10px;
}
.filter-keyword-add-btn.exclude { background: #ef4444; }
.filter-keyword-tag.exclude {
    background: #fef2f2; color: #991b1b;
}
.filter-keyword-hint {
    font-size: 0.72rem; color: #9ca3af; margin-top: 6px;
}

/* 섹션 (접힘/펼침) */
.filter-section {
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 0 8px;
}
.filter-section:last-child {
    border-bottom: none;
}
.filter-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
}
.filter-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}
.filter-section-summary {
    font-size: 0.78rem;
    color: #999;
    margin-left: 8px;
}
.filter-section-chevron {
    font-size: 0.7rem;
    color: #aaa;
    transition: transform .2s;
}
.filter-section.collapsed .filter-section-chevron {
    transform: rotate(-90deg);
}
.filter-section-content {
    padding-top: 8px;
}
.filter-section.collapsed .filter-section-content {
    display: none;
}

/* 지역 그리드 */
.region-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}
.region-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    background: #fff;
}
.region-chip:has(input:checked) {
    background: var(--color-primary-bg, #e8f0fe);
    border-color: var(--color-primary, #3b82f6);
    color: var(--color-primary, #3b82f6);
    font-weight: 600;
}
.region-chip input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--color-primary, #3b82f6);
}
.region-select-all {
    grid-column: 1 / -1;
    margin-bottom: 4px;
    background: #f8f9fa;
    font-weight: 600;
}

/* 면허 선택 버튼 행 (검색 필터 내) (2026-03-07) */
.license-open-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}
.license-open-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 14px;
    background: #f8fafc;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #334155;
    transition: border-color .15s, background .15s;
}
.license-open-btn:hover { border-color: #93c5fd; background: #f0f7ff; }
.license-open-summary { font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.license-open-chevron { color: #94a3b8; font-size: 0.7rem; flex-shrink: 0; }

/* 면허 선택 다이얼로그 (2026-03-07) */
.license-dlg-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 10100;
}
.license-dlg-overlay.open { display: block; }
.license-dlg {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 94vw; max-width: 520px;
    max-height: 85vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    z-index: 10101;
    flex-direction: column;
    overflow: hidden;
}
.license-dlg.open { display: flex; }
.license-dlg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #e5e7eb;
}
.license-dlg-header h3 { margin: 0; font-size: 1.05rem; color: #1e293b; }
.license-dlg-close {
    background: none; border: none;
    font-size: 1.4rem; color: #94a3b8;
    cursor: pointer; padding: 0 4px; line-height: 1;
}
.license-dlg-close:hover { color: #475569; }
.license-dlg-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 20px 6px;
}
.license-dlg-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 10px;
    -webkit-overflow-scrolling: touch;
}
.license-dlg-body .license-grid {
    grid-template-columns: repeat(2, 1fr) !important;
}
.license-dlg-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
    background: #fafbfc;
}
.license-dlg-count { font-size: 0.88rem; color: #64748b; font-weight: 600; }
.license-dlg-done-btn {
    padding: 8px 28px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.license-dlg-done-btn:hover { background: #2563eb; }

/* 금액 범위 */
.amount-range-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.amount-input-wrap {
    flex: 1;
    position: relative;
}
.amount-input {
    width: 100%;
    padding: 8px 28px 8px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: right;
    box-sizing: border-box;
}
.amount-input:focus {
    outline: none;
    border-color: var(--color-primary, #3b82f6);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}
.amount-unit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #999;
    pointer-events: none;
}
.amount-separator {
    font-size: 0.9rem;
    color: #999;
    flex-shrink: 0;
}
.amount-preset-btn {
    padding: 4px 8px;
    font-size: 0.72rem;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 4px;
    background: var(--color-bg-secondary, #f8fafc);
    color: var(--color-text, #334155);
    cursor: pointer;
    white-space: nowrap;
}
.amount-preset-btn:hover {
    background: var(--color-primary, #3b82f6);
    color: #fff;
    border-color: var(--color-primary, #3b82f6);
}

/* 데이터 분류 그리드 */
.data-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}
.data-type-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 7px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    background: #fff;
}
.data-type-chip:has(input:checked) {
    background: var(--color-primary-bg, #e8f0fe);
    border-color: var(--color-primary, #3b82f6);
    color: var(--color-primary, #3b82f6);
    font-weight: 600;
}
.data-type-chip input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--color-primary, #3b82f6);
}
.data-type-select-all {
    grid-column: 1 / -1;
    margin-bottom: 4px;
    background: #f8f9fa;
    font-weight: 600;
}

/* 하단 버튼 영역 */
.sfd-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 16px;
    border-top: 1px solid #e8e8e8;
    flex-shrink: 0;
}
.sfd-reset-btn {
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    cursor: pointer;
    color: #666;
}
.sfd-apply-btn {
    background: var(--color-primary, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}
.sfd-apply-btn:hover {
    filter: brightness(0.9);
}
.sfd-save-btn {
    background: none;
    color: var(--color-primary, #3b82f6);
    border: 1px solid var(--color-primary, #3b82f6);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.sfd-save-btn:hover {
    background: rgba(59, 130, 246, 0.08);
}
.sfd-footer {
    gap: 8px;
}
.sfd-footer-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 필터 활성 표시 배지 */
.filter-badge {
    display: inline-block;
    background: var(--color-primary, #3b82f6);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    margin-left: 4px;
    padding: 0 4px;
}

/* 모바일 반응형 */
@media (max-width: 480px) {
    .search-filter-dialog {
        width: 100vw;
        max-width: 100vw;
        max-height: calc(100vh - var(--ad-reserved, 40px));
        border-radius: 0;
        top: 0;
        left: 0;
        transform: translateY(100%);
    }
    .search-filter-dialog.open {
        transform: translateY(0);
    }
    .region-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .data-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .filter-save-dialog {
        width: 95vw;
        max-height: 80vh;
    }
}

/* ── 필터 저장 다이얼로그 ── */
.filter-save-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: var(--ad-reserved, 40px);
    background: rgba(0,0,0,0.45);
    z-index: 10100;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
}
.filter-save-overlay.open {
    opacity: 1;
    visibility: visible;
}
.filter-save-dialog {
    position: fixed;
    top: calc((100vh - var(--ad-reserved, 40px)) / 2);
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: min(440px, 92vw);
    max-height: calc(80vh - var(--ad-reserved, 40px));
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    z-index: 10101;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s, transform .25s;
}
.filter-save-dialog.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}
.fsd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}
.fsd-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}
.fsd-close-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #888;
    padding: 0 4px;
}
.fsd-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}
.fsd-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}
.fsd-name-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 0.92rem;
    outline: none;
    box-sizing: border-box;
}
.fsd-name-input:focus {
    border-color: var(--color-primary, #3b82f6);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}
.fsd-summary {
    margin-top: 16px;
    background: #f8f9fb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
}
.fsd-summary-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}
.fsd-summary-row {
    display: flex;
    gap: 8px;
    font-size: 0.82rem;
    line-height: 1.7;
    color: #444;
}
.fsd-summary-row .fsd-key {
    flex-shrink: 0;
    font-weight: 600;
    color: #666;
    min-width: 48px;
}
.fsd-summary-row .fsd-val {
    color: #333;
    word-break: break-all;
}
.fsd-alert-section {
    margin-top: 18px;
    padding: 12px 14px;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 10px;
}
.fsd-alert-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.fsd-alert-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary, #3b82f6);
    cursor: pointer;
}
.fsd-alert-toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #92400e;
}
.fsd-alert-desc {
    font-size: 0.78rem;
    color: #a16207;
    margin-top: 4px;
    padding-left: 28px;
}
.fsd-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #e5e7eb;
}
.fsd-cancel-btn {
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 0.88rem;
    cursor: pointer;
    color: #666;
}
.fsd-submit-btn {
    background: var(--color-primary, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 24px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}
.fsd-submit-btn:hover {
    filter: brightness(0.9);
}
.fsd-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ── 저장된 필터 목록 (필터 다이얼로그 내) ── */
/* 저장된 필터 — 콤보박스 UI (2026-03-07 카드→select 변경) */
.saved-filter-section {
    margin-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 0;
}
.saved-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.saved-filter-select {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 0.84rem;
    color: #333;
    background: #fff;
    min-width: 0;
}
.saved-filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,.15);
}
.saved-filter-alert-icon {
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.35;
    transition: opacity .15s;
    flex-shrink: 0;
}
.saved-filter-alert-icon.active {
    opacity: 1;
}
.sf-delete-btn {
    background: none;
    border: 1px solid #fca5a5;
    border-radius: 5px;
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    color: #dc2626;
    flex-shrink: 0;
}
.sf-delete-btn:hover {
    background: #fef2f2;
}
/* 저장된 필터 수정됨 뱃지 (2026-03-07) */
.sf-modified-badge {
    font-size: 0.7rem;
    color: #ea580c;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 4px;
    padding: 2px 6px;
    flex-shrink: 0;
    font-weight: 600;
}
/* ── 달력 가로 모드 레이아웃 (2026-03-07 추가)
   목적: 모바일 가로 전환 시 좌측 사이드바(버튼/범례) + 우측 달력(가로 스크롤) ── */
@media (orientation: landscape) and (max-height: 650px) and (max-width: 1024px) {
    .cal-modal {
        display: grid !important;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto 1fr auto;
        width: 96vw; max-width: 96vw;
        height: calc(100vh - 16px); max-height: calc(100vh - 16px);
        flex-direction: unset;
    }
    /* 좌측: 헤더(row 1~2 span) — 버튼 세로 나열, 요일 행과 높이 분리
       (2026-03-07 수정: row 1 단독 → row 1/3 span, 요일 공간 비대 해결) */
    .cal-header {
        grid-column: 1; grid-row: 1 / 3;
        flex-direction: column; align-items: stretch;
        padding: 6px 8px; gap: 5px;
        border-right: 1px solid #eee; border-bottom: none;
    }
    .cal-header .cal-title { font-size: 0.95rem; text-align: center; }
    .cal-header .cal-close-btn { align-self: flex-end; }
    /* 좌측 하단: 범례 */
    .cal-legend {
        grid-column: 1; grid-row: 3;
        flex-direction: column; gap: 5px;
        padding: 6px 8px; align-self: start;
        border-right: 1px solid #eee; border-bottom: none;
    }
    /* 우측 row 1: 요일 헤더 — 컴팩트 (헤더 span과 독립) */
    .cal-day-header {
        grid-column: 2; grid-row: 1;
        padding: 2px 6px;
    }
    .cal-day-label { font-size: 0.75rem; padding: 1px 0; }
    /* 우측 row 2~3: 달력 스크롤 */
    .cal-scroll {
        grid-column: 2; grid-row: 2 / 4;
        overflow: auto;
    }
    .cal-grid {
        min-width: 520px;
    }
    .cal-cell {
        min-height: 56px;
    }
    /* 하단: 이벤트 목록 */
    .cal-event-list {
        grid-column: 1 / 3; grid-row: 4;
    }
}

/* ========================================
   2026-03-08: 투찰업체 순위 테이블 스타일
   2026-04-11: 개찰결과 섹션 내부에 통합 — 서브 헤더 스타일 추가
   ======================================== */
.bidders-subheader {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px 6px;
    border-top: 1px dashed #d0d7de;
    margin-bottom: 6px;
}
.bidders-subheader-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1565c0;
}
.bidders-subheader-count {
    font-size: 0.78rem;
    color: #666;
    font-weight: 500;
}
.bidders-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.bidders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.bidders-table thead th {
    background: #f5f7fa;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
    position: sticky;
    top: 0;
}
.bidders-table thead th.num-col {
    text-align: right;
}
.bidders-table tbody td {
    padding: 7px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.bidders-table tbody td.num-col {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.bidders-table tbody tr:nth-child(even) {
    background: #fafbfc;
}
.bidders-table tbody tr:hover {
    background: #e8f0fe;
}
.bidders-table tbody tr.bidder-winner {
    background: #fff8e1;
}
.bidders-table tbody tr.bidder-winner td {
    font-weight: 600;
}
.bidder-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 600;
}
.bidder-badge.winner {
    background: #fff3e0;
    color: #e65100;
}
.bidder-badge.normal {
    color: #888;
    font-weight: normal;
}
.bidder-badge.disqualified {
    background: #ffebee;
    color: #c62828;
}
.bidders-toggle-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 16px;
    color: #1565c0;
    cursor: pointer;
    font-size: 0.8rem;
}
.bidders-toggle-btn:hover {
    background: #e8f0fe;
}

/* 2026-03-08: 참가가능지역 태그 스타일 */
.participation-area-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
}
.area-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #e3f2fd;
    color: #1565c0;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 2026-03-10: Phase 2-2 진행 상태 타임라인 */
.timeline-container {
    display: flex;
    align-items: flex-start;
    padding: 12px 8px;
    overflow-x: auto;
    gap: 0;
}
.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 110px;
    max-width: 140px;
    position: relative;
    flex-shrink: 0;
}
.timeline-step .tl-icon {
    font-size: 1.3rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.timeline-step.done .tl-icon {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}
.timeline-step.current .tl-icon {
    background: #fff3e0;
    border: 2px solid #ff9800;
    animation: tl-pulse 1.5s infinite;
}
.timeline-step.pending .tl-icon {
    background: #f5f5f5;
    border: 2px solid #bdbdbd;
}
.timeline-step.unknown .tl-icon {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
}
@keyframes tl-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,152,0,0.3); }
    50% { box-shadow: 0 0 0 6px rgba(255,152,0,0); }
}
.timeline-step .tl-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 6px;
    color: #333;
    text-align: center;
}
.timeline-step .tl-date {
    font-size: 0.68rem;
    color: #757575;
    margin-top: 2px;
    text-align: center;
}
.timeline-step .tl-detail {
    font-size: 0.65rem;
    color: #9e9e9e;
    margin-top: 1px;
    text-align: center;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* 연결선 */
.timeline-connector {
    flex: 1;
    height: 2px;
    min-width: 20px;
    margin-top: 18px;
    align-self: flex-start;
}
.timeline-connector.done {
    background: #4caf50;
}
.timeline-connector.pending {
    background: #e0e0e0;
    border-top: 2px dashed #bdbdbd;
    height: 0;
}

/* 2026-03-09: 참가 가능 여부 배너 */
.eligibility-banner {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
}
.eligibility-banner.eligible {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}
.eligibility-banner.ineligible {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    color: #c62828;
}
.eligibility-banner.check-needed {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    color: #e65100;
}
.eligibility-banner .elig-title {
    font-weight: 700;
    margin-right: 6px;
}
.eligibility-banner .elig-detail {
    font-size: 0.78rem;
    color: inherit;
    opacity: 0.85;
    margin-top: 4px;
}

/* 2026-03-09: 자재단가 검색 스타일 */
.price-search-box {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
}
.price-search-box input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
}
.price-search-btn {
    padding: 6px 14px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
}
.price-search-btn:hover { background: #1565c0; }
.price-item {
    padding: 6px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.price-item:last-child { border-bottom: none; }
.price-item .price-name { flex: 1; color: #333; }
.price-item .price-value { font-weight: 600; color: #1976d2; white-space: nowrap; }
.price-item .price-meta { font-size: 0.72rem; color: #999; }

/* 2026-03-08: 계약정보 스타일 */
.contract-timeline {
    padding: 8px 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.82rem;
    color: #666;
}
.contract-timeline .ct-step {
    padding: 3px 8px;
    border-radius: 4px;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 500;
}
.contract-timeline .ct-arrow {
    color: #bbb;
}

/* ══════════════════════════════════════════════════════════════
   2026-03-08: 데스크탑 대시보드 스타일
   ══════════════════════════════════════════════════════════════ */

.dashboard-section {
    display: none;  /* 모바일에서는 숨김 — 데스크탑 전용 */
    padding: 12px 16px 40px;  /* 2026-04-21: 하단 여유 40px — 마지막 카드가 viewport 바닥에 붙는 것 방지 */
    gap: 12px;
}
/* 2026-04-21: 대시보드 마지막 행은 바닥 여유 추가 (강제 스크롤 방지) */
.dashboard-section > .dash-charts-row:last-child {
    margin-bottom: 24px;
}
/* 2026-03-08: 정보패널 ↔ 검색결과 전환 애니메이션 */
.dash-fade-out {
    animation: dashFadeOut 0.2s ease-out forwards;
}
.dash-fade-in {
    animation: dashFadeIn 0.25s ease-in forwards;
}
@keyframes dashFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}
@keyframes dashFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 2026-03-10: hover:hover 추가 — 터치 디바이스(모바일 가로 포함)에서는 대시보드 숨김 유지 */
@media (min-width: 768px) and (hover: hover) {
    .dashboard-section {
        /* 2026-03-08: 2열 레이아웃 — 달력+날씨(좌) | 메인(우) */
        display: grid;
        grid-template-columns: 280px 1fr;
        align-items: start;
    }
}

@media (min-width: 768px) and (max-width: 1199px) and (hover: hover) {
    .dashboard-section {
        /* 2026-03-08: 중간 화면 — 좌측 좁게 */
        grid-template-columns: 240px 1fr;
        gap: 8px;
    }
}

/* ── 3열 컬럼 ── */
.dash-col { min-width: 0; }

.dash-col-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── 좌/우 패널 공통 ── */
.dash-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.dash-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-bg);
}

.dash-panel-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text);
}

.dash-panel-action {
    font-size: 0.72rem;
    color: var(--color-primary);
    background: none;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-pill);
    padding: 2px 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.dash-panel-action:hover {
    background: var(--color-primary-bg);
}

/* ══ 달력 패널 ══ */
.dash-calendar-panel {
    border-color: #ffcc80;
    background: linear-gradient(to bottom, #fffbf0 0%, #fff 40%);
}

.dash-mini-cal {
    padding: 4px 8px;
}

/* 미니 캘린더 그리드 */
.dash-mini-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0 6px;
}
.dash-mini-cal-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
}
.dash-mini-cal-nav {
    background: none; border: none; cursor: pointer;
    font-size: 1rem; color: var(--color-text-secondary);
    padding: 2px 6px; border-radius: 4px;
}
.dash-mini-cal-nav:hover { background: var(--color-bg); }

.dash-mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    text-align: center;
    font-size: 0.78rem;
}
.dash-mcal-dayname {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--color-text-muted);
    padding: 2px 0;
}
.dash-mcal-dayname:first-child { color: var(--color-danger); }
.dash-mcal-dayname:last-child { color: var(--color-primary); }

.dash-mcal-day {
    padding: 4px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s;
    position: relative;
    line-height: 1.3;
}
.dash-mcal-day:hover { background: var(--color-bg); }
.dash-mcal-day.today {
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
}
.dash-mcal-day.other-month { color: var(--color-text-muted); opacity: 0.4; }
.dash-mcal-day.sunday { color: var(--color-danger); }
.dash-mcal-day.saturday { color: var(--color-primary); }
.dash-mcal-day.today.sunday,
.dash-mcal-day.today.saturday { color: #fff; }
.dash-mcal-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--color-warning);
}
.dash-mcal-day.today.has-event::after { background: #fff; }
/* 2026-03-08: 색상별 이벤트 도트 (기존 ::after 단일 도트 → 다중 도트) */
.dash-mcal-day.has-event::after { display: none; } /* 기존 단일 도트 숨김 */
.dash-mcal-dots {
    display: flex;
    gap: 2px;
    justify-content: center;
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
}
.dash-mcal-dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}
/* 2026-03-08: 선택된 날짜 하이라이트 */
.dash-mcal-day.selected {
    background: #e8eaf6;
    font-weight: 700;
}
.dash-mcal-day.selected.sunday { color: var(--color-danger); }
.dash-mcal-day.selected.saturday { color: var(--color-primary); }
.dash-mcal-day.today.selected { background: var(--color-primary); color: #fff; }

/* 2026-03-08: 일정 헤더 (날짜 표시 + 추가 버튼) */
.dash-events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px 4px;
    border-top: 1px solid var(--color-border-light);
}
.dash-events-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text);
}
.dash-add-schedule-btn {
    font-size: 0.72rem;
    color: #7b1fa2;
    background: #f3e5f5;
    border: 1px solid #ce93d8;
    border-radius: 10px;
    padding: 3px 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.dash-add-schedule-btn:hover { background: #e1bee7; }

/* 오늘의 일정 목록 */
.dash-today-events {
    max-height: 240px;
    overflow-y: auto;
}

.dash-event-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.78rem;
    cursor: pointer;
}
.dash-event-item:hover { background: #fff8e1; }
.dash-event-item:last-child { border-bottom: none; }

.dash-event-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dash-event-text {
    flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--color-text);
}
.dash-event-time {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.dash-no-events {
    padding: 12px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}
/* 2026-03-08: 일정 타입 배지 */
.dash-event-type-badge {
    font-size: 0.6rem;
    color: #fff;
    padding: 1px 5px;
    border-radius: 4px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ══ 날씨 패널 — 2026-03-08 공간 효율 레이아웃 재설계 ══ */
.dash-weather-panel {
    border-color: #90caf9;
    background: linear-gradient(135deg, #e8f4fd 0%, #f8fbff 50%, #fff 100%);
}

/* 현재 날씨 상단: 좌(아이콘+온도+설명) | 우(상세 3x2 그리드) */
.dash-weather-top {
    display: flex;
    align-items: stretch;
    padding: 8px 10px 4px;
    gap: 0;
}

/* 좌측: 아이콘 + 온도 + 설명 (세로 중앙정렬) */
.dash-weather-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    flex-shrink: 0;
    border-right: 1px solid var(--color-border-light);
    padding-right: 10px;
    margin-right: 10px;
}

.dash-weather-icon {
    font-size: 2rem;
    line-height: 1;
}

.dash-weather-temp {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

.dash-weather-desc {
    font-size: 0.72rem;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

/* 우측: 상세 정보 3x2 그리드 — 빈 공간 완전 활용 */
.dash-weather-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    flex: 1;
    min-width: 0;
    align-content: center;
}

.dash-wx-item {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 4px;
    font-size: 0.68rem;
    color: var(--color-text-secondary);
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
}
.dash-wx-item b { font-weight: 600; color: var(--color-text); margin-left: auto; }

/* 위치 — 헤더 아래 한 줄 */
.dash-weather-loc {
    font-size: 0.66rem;
    color: var(--color-text-muted);
    padding: 0 10px 4px;
    text-align: right;
}
.dash-weather-loc:empty { display: none; }

/* ── 5일 예보 리스트 — 설명 추가, 빈 공간 활용 ── */
.dash-weather-forecast {
    border-top: 1px solid var(--color-border-light);
    display: flex;
    flex-direction: column;
}

.dash-wx-day {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.75rem;
}
.dash-wx-day:last-child { border-bottom: none; }

.dash-wx-day.dash-wx-today {
    background: #e3f2fd;
    font-weight: 600;
}

.dash-wx-day-label {
    width: 28px;
    font-weight: 600;
    color: var(--color-text);
    flex-shrink: 0;
}
.dash-wx-day-icon { font-size: 1rem; flex-shrink: 0; }

/* 날씨 설명 — 기존 빈 공간 채움 */
.dash-wx-day-desc {
    flex: 1;
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.dash-wx-day-temps {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
    font-size: 0.78rem;
}
.dash-wx-day-hi { color: var(--color-danger); font-weight: 600; }
.dash-wx-day-lo { color: var(--color-primary); }

/* 비/바람 부가정보 */
.dash-wx-day-extra {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    width: 52px;
    justify-content: flex-end;
}
.dash-wx-rain, .dash-wx-wind {
    font-size: 0.66rem;
    color: var(--color-primary);
}

/* ── 2026-03-08: 공고 목록 4분할 패널 + 프로필 필터 표시 ── */
.dash-notices-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.dash-notices-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border-light);
}
.dash-notices-header-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}
.dash-notices-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}
.dash-notices-subtitle {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}
/* 2026-03-08: 활성 필터 읽기 전용 표시 */
.dash-active-filter {
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}
.dash-filter-icon { font-size: 0.8rem; }
.dash-filter-name {
    font-size: 0.76rem;
    color: var(--color-primary);
    font-weight: 500;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-active-filter.has-filter .dash-filter-name {
    color: var(--color-primary);
    font-weight: 600;
}
.dash-active-filter:not(.has-filter) .dash-filter-name {
    color: var(--color-text-tertiary);
}
/* 필터 상세 툴팁 (hover) */
.dash-filter-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    padding: 10px 14px;
    font-size: 0.74rem;
    color: var(--color-text);
    white-space: nowrap;
    z-index: 100;
    min-width: 220px;
    line-height: 1.7;
}
.dash-active-filter:hover .dash-filter-tooltip {
    display: block;
}
.dash-filter-tooltip-row {
    display: flex;
    gap: 8px;
}
.dash-filter-tooltip-label {
    color: var(--color-text-tertiary);
    min-width: 55px;
}
.dash-filter-tooltip-value {
    color: var(--color-text);
    font-weight: 500;
}

/* 2026-03-08: 공고 그리드 — 2x2 테이블 레이아웃 */
.dash-notices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.dash-notices-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}
.dash-notices-col:nth-child(2n) { border-right: none; }
.dash-notices-col:nth-last-child(-n+2) { border-bottom: none; }
/* 2026-03-08: 즐겨찾기 full-width 섹션 (하단에서 상단으로 이동됨) */
.dash-bookmark-section {
    border-top: 1px solid var(--color-border-light);
}

/* 2026-03-10: 검색 + 즐겨찾기 독립 패널 (공고현황과 분리) */
/* 2026-03-10: 즐겨찾기 패널 (검색 UI는 main에 고정) */
.dash-bookmark-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}
.dash-top-col-header {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    padding: 8px 10px 6px;
    border-bottom: 1px solid var(--color-border-light);
    background: rgba(0,0,0,0.015);
    white-space: nowrap;
}
.dash-bookmark-panel .dash-table-wrap {
    max-height: 200px;
    overflow-y: auto;
}
.dash-notices-col-header {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    padding: 8px 10px 6px;
    border-bottom: 1px solid var(--color-border-light);
    background: rgba(0,0,0,0.015);
    white-space: nowrap;
}

/* ── 차트 카드 (2열 그리드) ── */
.dash-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.dash-chart-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
/* 통계 탭 */
.dash-stat-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-bg);
}
.dash-stat-tab {
    flex: 1;
    padding: 8px 4px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.dash-stat-tab:hover { color: var(--color-text); }
.dash-stat-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}
.dash-stat-panel { display: none; }
.dash-stat-panel.active { display: block; }
/* 바 차트 정렬 헤더 */
.dash-hbar-header { display: flex; align-items: center; gap: 6px; padding: 0; margin-bottom: 2px; }
.dash-hbar-sort { font-size: 0.7rem; color: var(--color-text-muted); cursor: pointer; user-select: none; white-space: nowrap; }
.dash-hbar-sort:hover { color: var(--color-primary); }
.dash-hbar-sort[data-col="label"] { width: 45%; text-align: left; flex-shrink: 0; }
.dash-hbar-sort[data-col="count"], .dash-hbar-sort[data-col="budget"] { width: 36px; text-align: center; flex-shrink: 0; }
.dash-hbar-sort-spacer { flex: 1; }
/* 수평 바 차트 */
.dash-hbar-chart { padding: 8px 12px; }
.dash-hbar-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 0.75rem; }
.dash-hbar-label { width: 45%; text-align: left; color: var(--color-text-muted); flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-hbar-track { flex: 1; height: 16px; background: var(--color-bg); border-radius: 3px; overflow: hidden; }
.dash-hbar-fill { height: 100%; border-radius: 3px; transition: width 0.3s ease; }
.dash-hbar-value { width: 80px; font-size: 0.7rem; color: var(--color-text-muted); flex-shrink: 0; white-space: nowrap; }
/* 스택 바 차트 (유형별 추이) */
.dash-stack-chart { padding: 8px 12px; }
.dash-stack-legend { display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.dash-stack-legend-item { font-size: 0.7rem; color: var(--color-text-muted); display: flex; align-items: center; gap: 3px; }
.dash-stack-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.dash-stack-bars { display: flex; gap: 4px; align-items: flex-end; height: 160px; }
.dash-stack-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.dash-stack-bar-wrap { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; }
.dash-stack-seg { width: 100%; border-radius: 2px; min-height: 2px; transition: height 0.3s; }
.dash-stack-label { font-size: 0.65rem; color: var(--color-text-muted); margin-top: 4px; }
/* 드릴다운 바 (dashMoreDialog 내부) */
.dash-drill-list { padding: 12px 16px; }
.dash-drill-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; border-radius: 4px; transition: background 0.15s; }
.dash-drill-row:hover { background: var(--color-bg); }
.dash-drill-label { width: 160px; text-align: right; font-size: 0.82rem; color: var(--color-text); flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-drill-track { flex: 1; height: 22px; background: var(--color-bg); border-radius: 4px; overflow: hidden; }
.dash-drill-fill { height: 100%; border-radius: 4px; transition: width 0.3s ease; }
.dash-drill-value { width: 110px; font-size: 0.78rem; color: var(--color-text-muted); flex-shrink: 0; white-space: nowrap; }
/* 드릴다운 브레드크럼 */
.dash-drill-bc { color: var(--color-primary); text-decoration: none; cursor: pointer; }
.dash-drill-bc:hover { text-decoration: underline; }
.dash-drill-bc-current { color: var(--color-text); font-weight: 600; }
.dash-drill-bc-sep { color: var(--color-text-muted); margin: 0 2px; }
.dash-drill-bc-hint { color: var(--color-text-muted); font-style: italic; font-size: 0.85em; }
.dash-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-bg);
}
.dash-list-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text);
}
.dash-list-sub {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* 2026-03-09: 공고 현황 — TOP 10 고정 높이 (행 ~28px × 10 + 헤더 + 더보기) */
.dash-table-wrap {
    overflow: hidden;
}
.dash-col-count {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-left: 4px;
}
.dash-list-loading {
    padding: 24px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* 대시보드 테이블 공통 */
.dash-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    table-layout: fixed;
}
.dash-tbl thead th {
    position: sticky;
    top: 0;
    background: var(--color-bg);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-muted);
    padding: 5px 6px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
    z-index: 1;
}
.dash-tbl tbody tr {
    cursor: pointer;
    transition: background 0.12s;
}
.dash-tbl tbody tr:hover {
    background: var(--color-primary-bg);
}
.dash-tbl tbody td {
    padding: 6px 6px;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
    line-height: 1.35;
}
.dash-tbl tbody tr:last-child td {
    border-bottom: none;
}

/* 컬럼별 너비 + 말줄임 */
.dash-tbl .col-name {
    width: 36%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text);
}
.dash-tbl .col-org,
.dash-tbl .col-company {
    width: 18%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text-secondary);
    font-size: 0.74rem;
}
.dash-tbl .col-budget {
    width: 14%;
    text-align: right;
    white-space: nowrap;
    color: var(--color-primary-dark);
    font-weight: 500;
    font-size: 0.74rem;
}
.dash-tbl .col-time {
    width: 22%;
    text-align: center;
    white-space: nowrap;
    font-size: 0.72rem;
    color: var(--color-text-secondary);
}
.dash-tbl .col-status {
    width: 14%;
    text-align: center;
    white-space: nowrap;
}
.dash-tbl .col-rate {
    width: 14%;
    text-align: right;
    white-space: nowrap;
    color: var(--color-success);
    font-weight: 600;
    font-size: 0.74rem;
}

/* 잔여시간 필 */
.time-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: #fff3cd;
    color: #856404;
}
.time-pill.urgent {
    background: #fee2e2;
    color: #dc2626;
    animation: urgentPulse 1.5s ease-in-out infinite;
}
@keyframes urgentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 상태 필 (개찰) */
.status-pill {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
}
.status-pill.active { background: #fff3e0; color: #e65100; }
.status-pill.pending { background: #e3f2fd; color: #1565c0; }
.status-pill.done { background: #e8f5e9; color: #2e7d32; }

/* 경과 필 */
.elapsed-pill {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
}
.elapsed-pill.today {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
}

/* ── 차트 영역 ── */
/* 2026-04-21: 탭 전환/드릴다운으로 콘텐츠 높이가 바뀔 때 카드 전체가 상하로 튀는
   현상 방지. 고정 프레임 + 내부 스크롤로 시각적 안정성 확보. */
.dash-chart-body {
    padding: 12px 14px;
    min-height: 200px;
    max-height: 280px;
    overflow-y: auto;
    overscroll-behavior: contain;  /* 부모 컨테이너까지 스크롤 번짐 차단 */
}

/* 탭 전환 시 panel display 토글은 카드 내부에서만 발생하도록 */
.dash-chart-body .dash-stat-panel {
    min-height: 180px;  /* 가장 짧은 탭도 여유 있게 */
}

/* 바 차트 (유형별 분포) */
.dash-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

/* dash-bar-label: 아래 모드 토글 섹션으로 이동 */

.dash-bar-track {
    flex: 1;
    height: 22px;
    background: var(--color-bg);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.dash-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    min-width: 2px;
}

.dash-bar-fill.type-cnstwk { background: #4a90d9; }
.dash-bar-fill.type-thng { background: #16a34a; }
.dash-bar-fill.type-servc { background: #d97706; }
.dash-bar-fill.type-etc { background: #94a3b8; }

/* 2026-03-10: 면허 분포 트리맵 (확정) */
.dash-treemap-svg { width: 100%; height: 220px; }
.dash-treemap-rect { stroke: #fff; stroke-width: 2; cursor: pointer; transition: opacity 0.15s; }
.dash-treemap-rect:hover { opacity: 0.8; }
.dash-treemap-text { font-size: 10px; fill: #fff; text-anchor: middle; dominant-baseline: central; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.dash-treemap-sub { font-size: 8px; fill: rgba(255,255,255,0.85); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.dash-treemap-legend { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; color: var(--color-text-secondary); padding: 6px 0 0; justify-content: center; }
.dash-treemap-legend-bar { width: 100px; height: 8px; border-radius: 4px; background: linear-gradient(to right, #3b82f6, #f59e0b, #ef4444); }

/* SVG 라인 차트 (7일 추이) */
.dash-trend-svg {
    width: 100%;
    height: 140px;
}

.dash-trend-line {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dash-trend-area {
    fill: var(--color-primary-bg);
    opacity: 0.5;
}

.dash-trend-dot {
    fill: var(--color-primary);
    stroke: white;
    stroke-width: 2;
}

.dash-trend-label {
    font-size: 10px;
    fill: var(--color-text-muted);
    text-anchor: middle;
}

.dash-trend-value {
    font-size: 10px;
    fill: var(--color-text-secondary);
    text-anchor: middle;
    font-weight: 600;
}

/* ── 와이드 화면 ── */
@media (min-width: 1440px) {
    .dashboard-section {
        padding: 16px 24px 0;
        gap: 16px;
        grid-template-columns: 280px 1fr;
    }
    .dash-weather-icon { font-size: 2.6rem; }
    .dash-weather-temp { font-size: 2rem; }
    .dash-weather-left { min-width: 80px; }
}

/* ── 2026-03-09: 더보기 링크 — 11번째 행 위치 ── */
.dash-tbl-more {
    text-align: center;
    padding: 7px 8px;
    font-size: 0.75rem;
    color: var(--color-primary);
    cursor: pointer;
    border-top: 1px dashed var(--color-border-light);
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background 0.15s, color 0.15s;
}
.dash-tbl-more:hover {
    background: var(--color-primary);
    color: #fff;
}

/* ── 2026-03-09: 더보기 다이얼로그 — 깔끔한 전체 목록 ── */
.dash-more-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    animation: dashMoreFadeIn 0.18s ease;
}
@keyframes dashMoreFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.dash-more-panel {
    background: var(--color-surface);
    border-radius: 14px;
    width: 92vw;
    max-width: 960px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.05);
    overflow: hidden;
    animation: dashMoreSlideUp 0.22s ease;
}
@keyframes dashMoreSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.dash-more-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(to bottom, var(--color-bg), var(--color-surface));
}
.dash-more-header-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.dash-more-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
}
.dash-more-count {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-primary);
    background: var(--color-primary-bg);
    padding: 2px 10px;
    border-radius: 12px;
}
.dash-more-close {
    background: none;
    border: 1px solid var(--color-border);
    font-size: 1.2rem;
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.dash-more-close:hover {
    background: var(--color-danger-bg, #fee2e2);
    border-color: var(--color-danger, #dc2626);
    color: var(--color-danger, #dc2626);
}
.dash-more-body {
    overflow-y: auto;
    padding: 0;
    flex: 1;
}

/* 다이얼로그 내 테이블 — 넓은 레이아웃, 행 번호 + 호버 강조 */
.dash-tbl-dialog {
    font-size: 0.82rem;
}
.dash-tbl-dialog thead th {
    font-size: 0.72rem;
    padding: 8px 10px;
    background: var(--color-bg);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.dash-tbl-dialog tbody td {
    padding: 8px 10px;
}
.dash-tbl-dialog tbody tr:hover {
    background: var(--color-primary-bg);
}
.dash-tbl-dialog tbody tr:nth-child(even) {
    background: rgba(0,0,0,0.015);
}
.dash-tbl-dialog tbody tr:nth-child(even):hover {
    background: var(--color-primary-bg);
}
.dash-tbl-dialog .col-no {
    width: 36px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.7rem;
    font-weight: 500;
}
.dash-tbl-dialog .col-name { width: 46%; }
.dash-tbl-dialog .col-org,
.dash-tbl-dialog .col-company { width: 20%; }
.dash-tbl-dialog .col-budget { width: 14%; }
.dash-tbl-dialog .col-time { width: 12%; }
.dash-tbl-dialog .col-status { width: 12%; }
.dash-tbl-dialog .col-rate { width: 12%; }

/* 모바일 더보기 다이얼로그 */
@media (max-width: 768px) {
    .dash-more-panel {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        height: 100vh;
    }
    .dash-more-header { padding: 12px 16px; }
    .dash-more-title { font-size: 0.95rem; }
    .dash-tbl-dialog { font-size: 0.76rem; }
    .dash-tbl-dialog thead th { padding: 6px 8px; }
    .dash-tbl-dialog tbody td { padding: 6px 8px; }
    .dash-tbl-dialog .col-no { width: 28px; }
    .dash-tbl-dialog .col-org,
    .dash-tbl-dialog .col-company { display: none; }
    .dash-tbl-dialog thead th:nth-child(3) { display: none; }
}

/* ── 2026-03-08: 낙찰 분석 섹션 ── */

/* 요약 카드 */
.analysis-cards {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.analysis-card {
    flex: 1;
    min-width: 130px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}
.analysis-card.highlight {
    background: #e3f2fd;
    border-color: #1565c0;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.15);
}
.analysis-card .card-label {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 4px;
}
.analysis-card .card-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
}
.analysis-card.highlight .card-value {
    color: #1565c0;
}
.analysis-card .card-sub {
    font-size: 0.65rem;
    color: #999;
    margin-top: 2px;
}

/* 2026-03-08: 개찰결과/낙찰분석 안내 텍스트 */
.section-guide {
    background: #f0f6ff;
    border-left: 3px solid #1976d2;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 0.78rem;
    color: #37474f;
    line-height: 1.5;
    border-radius: 4px;
}
/* 2026-03-10: 데이터 시점·출처 뱃지 — 사용자가 데이터 신뢰도를 즉시 판단할 수 있도록 */
.data-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    white-space: nowrap;
}
.data-source-badge.confirmed {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}
.data-source-badge.estimate {
    background: #FFF8E1;
    color: #E65100;
    border: 1px solid #FFE082;
}
.data-source-badge.pending {
    background: #F3E5F5;
    color: #6A1B9A;
    border: 1px solid #E1BEE7;
}
.extra-hint {
    display: block;
    font-size: 0.65rem;
    color: #999;
    font-weight: 400;
    margin-top: 1px;
}
.card-hint {
    font-size: 0.62rem;
    color: #888;
    margin-top: 4px;
    line-height: 1.4;
}

/* 바 차트 */
.analysis-chart {
    margin-bottom: 12px;
}
.chart-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}
.chart-sub {
    font-weight: 400;
    color: #999;
    font-size: 0.7rem;
}
.analysis-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.75rem;
}
.analysis-bar-row.optimal-row {
    background: #fff8e1;
    border-radius: 4px;
    padding: 2px 4px;
    margin-left: -4px;
    margin-right: -4px;
}
.bar-label {
    width: 85px;
    text-align: right;
    color: #555;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.bar-track {
    flex: 1;
    height: 18px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    background: #90caf9;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.bar-fill.optimal {
    background: #1565c0;
}
.bar-value {
    width: 95px;
    text-align: right;
    color: #555;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* 통계 요약 */
.analysis-stats {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: #666;
    padding: 8px 0;
    border-top: 1px solid #eee;
    margin-top: 8px;
}

/* 기관별 경향 */
.analysis-institution {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f0f7ff;
    border-radius: 6px;
    border-left: 3px solid #1565c0;
    margin-top: 10px;
    font-size: 0.8rem;
}
.inst-label {
    font-weight: 600;
    color: #333;
}
.inst-value {
    color: #555;
}

/* 2026-03-09: 모바일 낙찰 분석 카드 — 글자 넘침 수정 */
@media (max-width: 600px) {
    .analysis-cards {
        gap: 6px;
        flex-wrap: wrap;
    }
    .analysis-card {
        /* 2열 배치: 카드 2개씩 줄바꿈 (4개 카드가 한 줄에 억지로 안 들어가게) */
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        padding: 8px 6px;
        overflow: hidden;
        word-break: keep-all;
    }
    .analysis-card .card-label {
        font-size: 0.72rem;
    }
    .analysis-card .card-value {
        font-size: 1rem;
    }
    .analysis-card .card-sub {
        font-size: 0.68rem;
        line-height: 1.4;
    }
    .analysis-card .card-hint {
        font-size: 0.62rem;
        line-height: 1.4;
    }
    .bar-label {
        width: 70px;
        font-size: 0.65rem;
    }
    .bar-value {
        width: 75px;
        font-size: 0.65rem;
    }
    .analysis-stats {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ══════════════════════════════════════════════════════════════
   2026-03-08: 데스크탑 다이얼로그 크기 확대
   모바일에서는 max-width:420px이지만 데스크탑에서는 넓은 화면 활용
   ══════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    /* 달력 다이얼로그 — 데스크탑 확대 */
    .cal-modal {
        max-width: 680px;
        width: 85%;
        max-height: calc(100vh - 60px);
    }
    .cal-grid {
        grid-auto-rows: auto auto auto 1fr;
    }
    .cal-cell {
        min-height: 72px;
        padding: 6px 2px;
    }
    .cal-day-num { font-size: 1rem; }
    .cal-month-title { font-size: 1.15rem; }
    .cal-event-list {
        max-height: 300px;
    }
    .cal-ev-item {
        padding: 12px 14px;
    }
    .cal-ev-title { font-size: 0.95rem; }
    /* 일정 등록 다이얼로그 — 데스크탑 확대 */
    .sched-dialog {
        max-width: 480px;
    }

    /* 날씨 다이얼로그 — 데스크탑 확대 */
    .weather-dialog {
        max-width: 680px;
        max-height: calc(100vh - 60px);
    }
    .weather-week-left { width: 80px; }
    .weather-week-icon { font-size: 1.8rem; }
    .weather-week-max { font-size: 1.2rem; }
    .weather-week-detail {
        grid-template-columns: repeat(4, 1fr);
        font-size: 0.72rem;
    }
    .wk-hourly-header,
    .wk-hourly-row {
        font-size: 0.7rem;
    }
}


/* ══════════════════════════════════════════════════════════════════
   2026-03-09: 컨소시엄(공동수급체 구성) 모달 스타일
   ══════════════════════════════════════════════════════════════════ */

/* 공통 오버레이 */
/* 2026-03-10: 광고 영역을 침범하지 않도록 bottom에 광고 높이(40px) 확보 */
.collab-overlay {
    position: fixed; top: 0; left: 0; right: 0;
    bottom: var(--ad-reserved, 40px); /* 광고 배너 영역 제외 */
    z-index: 31000; /* 상세모달(30000)보다 위, 광고 아래 영역에만 표시 */
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    animation: collabFadeIn 0.2s ease;
}
.collab-overlay.hidden { display: none; }
@keyframes collabFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 컨소시엄 패널 — 데스크톱: 콘텐츠에 맞는 크기, 모바일: 전체화면 */
.collab-list-panel {
    background: #fff; border-radius: 16px;
    max-width: calc(100% - 32px);
    max-height: 85vh;
    flex: 0 0 auto;
    overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: collabSlideUp 0.25s ease; position: relative;
}
@media (max-width: 600px) {
    .collab-list-panel {
        width: calc(100% - 16px) !important;
        max-height: calc(100% - 16px);
        min-height: 60vh;
        border-radius: 12px;
    }
}
@keyframes collabSlideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.collab-list-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px 8px; border-bottom: 1px solid #eee;
    position: sticky; top: 0; z-index: 10; background: #fff;
}
.collab-list-header h3 { margin: 0; font-size: 1.1rem; }
.collab-list-sub {
    padding: 4px 20px 12px; font-size: 0.85rem; color: #666;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    position: sticky; top: 46px; z-index: 9; background: #fff;
}
.collab-list-body { padding: 8px 12px 16px; }
.collab-list-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-radius: 10px; cursor: pointer;
    transition: background 0.15s;
}
.collab-list-item:hover { background: #f0f7ff; }
.collab-list-main { flex: 1; min-width: 0; }
.collab-list-title { font-weight: 600; font-size: 0.92rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collab-list-meta { font-size: 0.8rem; color: #888; margin-top: 2px; }
.collab-list-join { color: var(--primary, #1a73e8); font-weight: 600; font-size: 0.85rem; white-space: nowrap; margin-left: 12px; }
.collab-list-new {
    text-align: center; padding: 14px; margin-top: 8px;
    border: 2px dashed #ccc; border-radius: 10px; color: #666;
    cursor: pointer; font-weight: 500; transition: all 0.15s;
}
.collab-list-new:hover { border-color: var(--primary, #1a73e8); color: var(--primary, #1a73e8); background: #f0f7ff; }

/* 닫기 버튼 */
.collab-close {
    background: none; border: 1px solid #ddd; border-radius: 8px;
    width: 32px; height: 32px; font-size: 1.3rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #666; transition: all 0.15s;
}
.collab-close:hover { background: #fee; color: #d32f2f; border-color: #d32f2f; }

/* 상세 패널 — 항상 최대 고정 사이즈 (인라인 style 덮어쓰기) */
.collab-detail-panel {
    background: #fff; border-radius: 16px;
    width: calc(100% - 20px) !important; height: calc(100% - 20px) !important;
    min-height: calc(100% - 20px) !important; max-height: calc(100% - 20px) !important;
    flex: 0 0 auto;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: collabSlideUp 0.25s ease;
}
.collab-detail-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 20px; border-bottom: 1px solid #eee; flex-shrink: 0;
    background: #fff; border-radius: 16px 16px 0 0; gap: 12px;
}
.collab-detail-header h3 { margin: 0; font-size: 1rem; }
.collab-detail-meta { display: flex; gap: 8px; align-items: center; font-size: 0.78rem; color: #666; }
.collab-detail-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
/* 탭 바 — 고정 */
.collab-tab-bar {
    display: flex; gap: 0; border-bottom: 2px solid #eee; flex-shrink: 0;
    padding: 0 20px; background: #fff;
}
.collab-tab {
    padding: 10px 20px; font-size: 0.88rem; font-weight: 600; cursor: pointer;
    border: none; background: none; color: #888; border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: all 0.15s;
}
.collab-tab:hover { color: #333; }
.collab-tab.active { color: var(--primary, #1a73e8); border-bottom-color: var(--primary, #1a73e8); }
/* 탭 콘텐츠 — 스크롤 영역 */
.collab-detail-body {
    flex: 1; overflow: hidden; position: relative;
}
.collab-tab-content {
    display: none; height: 100%; overflow-y: auto; padding: 16px 20px;
}
.collab-tab-content.active { display: flex; flex-direction: column; }
/* 채팅 탭은 패딩 없이 chat-wrap이 전체 차지 */
#collabTabChat { padding: 0; }
#collabTabChat .collab-chat-wrap { flex: 1; display: flex; flex-direction: column; height: 100%; }

/* 상태 배지 */
.collab-status {
    display: inline-block; padding: 2px 10px; border-radius: 12px;
    font-size: 0.78rem; font-weight: 600;
}
.collab-status-recruiting { background: #e8f5e9; color: #2e7d32; }
.collab-status-confirmed { background: #e3f2fd; color: #1565c0; }
.collab-status-closed { background: #f5f5f5; color: #757575; }
.collab-status-cancelled { background: #fce4ec; color: #c62828; }

/* 좌측 컬럼 (레거시 — 탭 구조로 대체) */
.collab-left-col {
    width: 45%; border-right: 1px solid #eee; overflow-y: auto; padding: 16px;
}
/* 탭 구조에서는 left-col 미사용 */
.collab-section { margin-bottom: 20px; }
.collab-section h4 { margin: 0 0 10px; font-size: 0.95rem; color: #333; border-bottom: 2px solid var(--primary, #1a73e8); padding-bottom: 6px; }

/* 멤버 카드 */
.collab-member-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; border-radius: 8px; margin-bottom: 6px;
    background: #fafafa; border: 1px solid #eee;
}
.collab-member-info strong { font-size: 0.88rem; }
.collab-member-sub { font-size: 0.78rem; color: #888; }
.collab-role-leader {
    display: inline-block; background: #fff3e0; color: #e65100;
    font-size: 0.7rem; padding: 1px 6px; border-radius: 4px; font-weight: 600; margin-left: 4px;
}
/* 2026-03-09: 리더 투표 현황 표시 */
.collab-vote-info {
    font-size: 0.78rem; color: #1565c0; background: #e3f2fd;
    padding: 6px 12px; border-radius: 8px; margin-bottom: 8px; text-align: center;
}
.collab-leader-confirmed {
    font-size: 0.78rem; color: #2e7d32; background: #e8f5e9;
    padding: 6px 12px; border-radius: 8px; margin-bottom: 8px; text-align: center; font-weight: 600;
}
.collab-vote-count {
    display: inline-block; background: #e3f2fd; color: #1565c0;
    font-size: 0.68rem; padding: 1px 5px; border-radius: 3px; font-weight: 600; margin-left: 4px;
}
.collab-my-vote {
    display: inline-block; background: #e8f5e9; color: #2e7d32;
    font-size: 0.65rem; padding: 1px 5px; border-radius: 3px; margin-left: 3px;
}

/* 합의 항목 */
.collab-agree-cat {
    font-size: 0.78rem; font-weight: 700; color: #555; text-transform: uppercase;
    margin: 14px 0 6px; padding-left: 4px; letter-spacing: 0.5px;
}
.collab-agree-item {
    padding: 8px 12px; border-radius: 8px; margin-bottom: 4px; cursor: pointer;
    border-left: 3px solid #ddd; transition: background 0.15s;
}
.collab-agree-item:hover { background: #f9f9f9; }
.collab-agree-agreed { border-left-color: #4caf50; background: #f1f8e9; }
.collab-agree-rejected { border-left-color: #f44336; background: #fce4ec; }
.collab-agree-header { display: flex; justify-content: space-between; align-items: center; }
.collab-agree-title { font-size: 0.88rem; font-weight: 500; }
.collab-agree-votes { font-size: 0.75rem; color: #888; }
.collab-agree-body { padding: 8px 0 4px; font-size: 0.83rem; color: #555; }
.collab-agree-body p { margin: 0 0 6px; }
.collab-agree-decision { background: #f5f5f5; padding: 6px 10px; border-radius: 6px; margin-bottom: 6px; font-size: 0.82rem; }
.collab-agree-actions { display: flex; gap: 6px; }
.collab-agree-done { font-size: 0.78rem; color: #4caf50; font-weight: 600; }

/* 우측 컬럼: 채팅 */
.collab-right-col {
    width: 55%; display: flex; flex-direction: column;
}
.collab-chat-wrap { display: flex; flex-direction: column; height: 100%; }
/* 채팅방 법적 고지 배너 */
.collab-chat-legal-banner {
    background: #fff8e1; color: #e65100; font-size: 0.75rem; font-weight: 500;
    padding: 6px 16px; border-bottom: 1px solid #ffe082; flex-shrink: 0;
    text-align: center;
}
.collab-chat-messages {
    flex: 1; overflow-y: auto; padding: 12px 16px;
    display: flex; flex-direction: column; gap: 6px;
}
.collab-chat-system {
    text-align: center; font-size: 0.78rem; color: #888;
    padding: 6px; background: #f5f5f5; border-radius: 8px;
}
.collab-chat-msg { padding: 4px 0; }
.collab-chat-sender { font-size: 0.78rem; color: #555; font-weight: 600; margin-bottom: 2px; }
.collab-chat-time { font-weight: 400; color: #aaa; margin-left: 6px; }
.collab-chat-content { font-size: 0.88rem; line-height: 1.5; }
.collab-chat-img { max-width: 200px; max-height: 160px; border-radius: 8px; cursor: pointer; }
.collab-chat-file {
    display: inline-block; padding: 4px 10px; background: #e3f2fd; border-radius: 6px;
    font-size: 0.82rem; color: #1565c0; text-decoration: none;
}
.collab-chat-input-wrap {
    display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #eee;
    flex-shrink: 0;
}
.collab-chat-input {
    flex: 1; border: 1px solid #ddd; border-radius: 10px; padding: 10px 14px;
    font-size: 0.9rem; outline: none; transition: border-color 0.2s;
}
.collab-chat-input:focus { border-color: var(--primary, #1a73e8); }

/* 2026-03-09: 음성 통화 UI */
.collab-voice-join-btn {
    flex-shrink: 0; width: 36px; height: 36px; border: none; border-radius: 50%;
    background: #059669; color: #fff; font-size: 16px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.collab-voice-join-btn:hover { background: #047857; }
/* collabVoiceBar 제거됨 — 플로팅 바(voice_chat.js)가 유일한 통화 UI */
/* 텍스트 채팅에서 음성 자막 메시지 구분 */
.collab-chat-voice {
    font-style: italic; color: #94a3b8; font-size: 0.85em;
}
.collab-chat-voice::before { content: '🎤 '; }

/* 2026-03-09: 회의록 링크 메시지 */
.collab-chat-minutes {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.88em;
}
.collab-chat-minutes-icon { font-size: 1.2em; }
.collab-chat-minutes-link {
    display: inline-block;
    margin-top: 4px;
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
}
.collab-chat-minutes-link:hover { text-decoration: underline; color: #93c5fd; }

/* 공통 버튼 */
.collab-btn {
    border: none; border-radius: 8px; padding: 8px 16px; font-size: 0.85rem;
    font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.collab-btn-join { background: var(--primary, #1a73e8); color: #fff; }
.collab-btn-join:hover { background: #1557b0; }
.collab-btn-leave { background: #f5f5f5; color: #d32f2f; border: 1px solid #ddd; }
.collab-btn-leave:hover { background: #fce4ec; }
.collab-btn-send { background: var(--primary, #1a73e8); color: #fff; border: none; border-radius: 10px; padding: 10px 18px; font-weight: 600; cursor: pointer; }
.collab-btn-send:hover { background: #1557b0; }
.collab-btn-sm { border: 1px solid #ddd; background: #fff; border-radius: 6px; padding: 4px 10px; font-size: 0.76rem; cursor: pointer; transition: all 0.15s; }
.collab-btn-sm:hover { background: #f0f7ff; border-color: var(--primary, #1a73e8); }
.collab-btn-agree { color: #2e7d32; border-color: #a5d6a7; }
.collab-btn-agree:hover { background: #e8f5e9; }
.collab-btn-disagree { color: #c62828; border-color: #ef9a9a; }
.collab-btn-disagree:hover { background: #fce4ec; }

/* ══════════════════════════════════════════════════════════════════
   2026-03-09: 파트너 검색 카드 스타일
   ══════════════════════════════════════════════════════════════════ */
.partner-card {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 12px 16px; border-radius: 10px; margin-bottom: 8px;
    background: #fafafa; border: 1px solid #eee; transition: background 0.15s;
}
.partner-card:hover { background: #f0f7ff; border-color: #bbdefb; }
.partner-card-main { flex: 1; min-width: 0; }
.partner-card-name {
    font-weight: 600; font-size: 0.92rem; margin-bottom: 4px;
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.partner-card-detail { font-size: 0.8rem; color: #666; margin-bottom: 2px; }
.partner-card-intro {
    font-size: 0.8rem; color: #888; margin-top: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.partner-card-actions { flex-shrink: 0; margin-left: 12px; padding-top: 4px; }
.partner-looking-badge {
    display: inline-block; background: #e8f5e9; color: #2e7d32;
    font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════
   2026-03-09: 업체 프로필 폼 스타일
   ══════════════════════════════════════════════════════════════════ */
.collab-profile-label {
    display: block; font-size: 0.85rem; font-weight: 600; color: #333;
    margin-bottom: 4px; margin-top: 12px;
}
.collab-profile-label:first-child { margin-top: 0; }
.collab-profile-input {
    width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 8px;
    font-size: 0.9rem; box-sizing: border-box; transition: border-color 0.2s;
}
.collab-profile-input:focus { border-color: var(--primary, #1a73e8); outline: none; }
textarea.collab-profile-input { resize: vertical; min-height: 60px; font-family: inherit; }

/* ══════════════════════════════════════════════════════════════════
   2026-03-09: 분담비율 편집 스타일
   ══════════════════════════════════════════════════════════════════ */
.ratio-edit-row {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 0; border-bottom: 1px solid #f0f0f0;
}
.ratio-edit-name {
    flex: 1; font-size: 0.88rem; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ratio-total-row {
    padding: 10px 0; text-align: right; font-size: 0.9rem; color: #333;
    border-top: 2px solid #ddd; margin-top: 8px;
}

/* 2026-03-10: 내 컨소시엄 카드 */
.my-collab-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 12px; margin-bottom: 10px; transition: box-shadow 0.15s;
}
.my-collab-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.my-collab-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.my-collab-status { font-size: 0.75rem; }
.my-collab-members { font-size: 0.75rem; color: #64748b; }
.my-collab-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.my-collab-bid { font-size: 0.75rem; color: #64748b; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-collab-meta { font-size: 0.75rem; color: #94a3b8; margin-bottom: 8px; }
.my-collab-btn:hover { background: #e2e8f0; }
.my-collab-btn-detail { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.my-collab-btn-detail:hover { background: #dbeafe; }

/* 메뉴 뱃지 */
.collab-menu-badge {
    background: #ef4444; color: #fff; font-size: 0.6rem; padding: 1px 5px;
    border-radius: 8px; margin-left: 4px; font-weight: 700;
}

/* 게시판 글 */
.collab-board-post {
    padding: 10px; border-bottom: 1px solid #f1f5f9;
}
.collab-board-post:last-child { border-bottom: none; }
.collab-board-post-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px;
}
.collab-board-post-header strong { font-size: 0.8rem; }
.collab-board-post-time { font-size: 0.7rem; color: #94a3b8; }
.collab-board-post-content { font-size: 0.85rem; line-height: 1.5; white-space: pre-wrap; }

/* 2026-03-10: 컨소시엄 확장 기능 스타일 */

/* 버튼 그리드 (많은 버튼 3열 배치) */
.my-collab-actions {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.my-collab-btn {
    flex: 0 0 calc(33.33% - 4px); min-width: 0; padding: 6px 0;
    border: 1px solid #e2e8f0; border-radius: 6px;
    background: #f8fafc; font-size: 0.75rem; cursor: pointer; text-align: center;
    transition: background 0.15s; position: relative;
}

/* 체크리스트 */
.collab-cl-item {
    display: flex; align-items: flex-start; gap: 8px; padding: 8px;
    border-bottom: 1px solid #f1f5f9; transition: opacity 0.2s;
}
.collab-cl-item:last-child { border-bottom: none; }
.collab-cl-done { opacity: 0.5; }
.collab-cl-done .collab-cl-title { text-decoration: line-through; }
.collab-cl-check { flex-shrink: 0; margin-top: 2px; }
.collab-cl-check input { width: 18px; height: 18px; cursor: pointer; accent-color: #16a34a; }
.collab-cl-content { flex: 1; min-width: 0; }
.collab-cl-title { font-size: 0.85rem; font-weight: 500; margin-bottom: 2px; }
.collab-cl-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.collab-cl-assignee { font-size: 0.7rem; color: #64748b; }
.collab-cl-due { font-size: 0.7rem; color: #64748b; }
.collab-cl-due.overdue { color: #dc2626; font-weight: 600; }
.collab-cl-del {
    flex-shrink: 0; width: 24px; height: 24px; border: none; background: none;
    color: #94a3b8; cursor: pointer; font-size: 1rem; border-radius: 4px;
}
.collab-cl-del:hover { background: #fee2e2; color: #dc2626; }

/* 공유 문서함 */
.collab-doc-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px; border-bottom: 1px solid #f1f5f9;
}
.collab-doc-item:last-child { border-bottom: none; }
.collab-doc-info { flex: 1; min-width: 0; }
.collab-doc-name { font-size: 0.85rem; font-weight: 500; word-break: break-all; }
.collab-doc-meta { font-size: 0.7rem; color: #94a3b8; margin-top: 2px; }
.collab-doc-actions { display: flex; gap: 6px; flex-shrink: 0; margin-left: 8px; }
.collab-doc-dl {
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border-radius: 6px; background: #eff6ff; text-decoration: none; font-size: 0.85rem;
}
.collab-doc-dl:hover { background: #dbeafe; }
.collab-doc-del {
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border: none; background: none; color: #94a3b8; cursor: pointer; font-size: 1rem; border-radius: 6px;
}
.collab-doc-del:hover { background: #fee2e2; color: #dc2626; }

/* 공유 일정 타임라인 */
.collab-sched-timeline { padding: 8px 0; }
.collab-sched-item {
    display: flex; align-items: flex-start; gap: 10px; padding: 8px 4px;
    position: relative; border-left: 2px solid #e2e8f0; margin-left: 8px; padding-left: 16px;
}
.collab-sched-item.past { opacity: 0.5; }
.collab-sched-dot {
    position: absolute; left: -6px; top: 12px; width: 10px; height: 10px;
    border-radius: 50%; background: #2563eb; border: 2px solid #fff;
}
.collab-sched-item.past .collab-sched-dot { background: #94a3b8; }
.collab-sched-content { flex: 1; }
.collab-sched-date { font-size: 0.7rem; color: #64748b; font-weight: 600; }
.collab-sched-title { font-size: 0.85rem; font-weight: 500; margin: 2px 0; }
.collab-sched-type { font-size: 0.7rem; color: #94a3b8; }
.collab-sched-auto {
    font-size: 0.6rem; background: #e0f2fe; color: #0369a1; padding: 1px 4px;
    border-radius: 3px; margin-left: 4px;
}

/* 분담 현황 */
.collab-ratio-header {
    font-size: 0.85rem; padding: 8px 0; border-bottom: 1px solid #f1f5f9; margin-bottom: 12px;
}
.collab-ratio-chart-wrap { display: flex; justify-content: center; margin: 16px 0; }
.collab-ratio-donut {
    width: 140px; height: 140px; border-radius: 50%; position: relative;
}
.collab-ratio-donut::after {
    content: ''; position: absolute; top: 30px; left: 30px; width: 80px; height: 80px;
    border-radius: 50%; background: #fff;
}
.collab-ratio-table {
    width: 100%; border-collapse: collapse; font-size: 0.82rem; margin-top: 12px;
}
.collab-ratio-table th {
    text-align: left; padding: 6px 8px; border-bottom: 2px solid #e2e8f0;
    font-size: 0.75rem; color: #64748b; font-weight: 600;
}
.collab-ratio-table td { padding: 6px 8px; border-bottom: 1px solid #f1f5f9; }
.collab-ratio-dot {
    display: inline-block; width: 10px; height: 10px; border-radius: 50%;
    margin-right: 6px; vertical-align: middle;
}
.collab-ratio-duties { margin-top: 8px; }
.collab-ratio-duty {
    padding: 6px 0; border-bottom: 1px solid #f8fafc; font-size: 0.82rem;
}
.collab-ratio-decision {
    font-size: 0.75rem; color: #64748b; margin-top: 2px; padding-left: 20px;
}

/* 활동 알림 */
.collab-notif-item {
    display: flex; gap: 8px; padding: 10px 8px; border-bottom: 1px solid #f1f5f9;
    cursor: pointer; transition: background 0.15s;
}
.collab-notif-item:hover { background: #f8fafc; }
.collab-notif-item:last-child { border-bottom: none; }
.collab-notif-read { opacity: 0.5; }
.collab-notif-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.collab-notif-content { flex: 1; min-width: 0; }
.collab-notif-msg { font-size: 0.82rem; }
.collab-notif-time { font-size: 0.7rem; color: #94a3b8; margin-top: 2px; }
.collab-notif-badge {
    background: #ef4444; color: #fff; font-size: 0.55rem; padding: 1px 4px;
    border-radius: 6px; font-weight: 700; vertical-align: super;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .collab-detail-panel { width: 100%; height: 100%; border-radius: 0; }
    .collab-detail-header { border-radius: 0; }
    .collab-list-panel { width: 100%; max-width: 100%; height: 100%; border-radius: 0; max-height: 100%; }
    .collab-tab { padding: 8px 14px; font-size: 0.82rem; }
}

/* ── 2026-03-11: 공고 댓글 섹션 ── */
.comment-count-badge {
    background: #3b82f6; color: #fff; font-size: 0.65rem; padding: 1px 6px;
    border-radius: 8px; font-weight: 700; margin-left: 6px; vertical-align: middle;
}
.comment-list {
    max-height: 400px; overflow-y: auto; margin-bottom: 12px;
}
.comment-item {
    padding: 10px 0; border-bottom: 1px solid #f1f5f9;
}
.comment-item:last-child { border-bottom: none; }
.comment-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.comment-author {
    font-size: 0.82rem; font-weight: 600; color: #1e293b;
}
.comment-author.anonymous {
    color: #94a3b8; font-style: italic;
}
.comment-company {
    font-size: 0.72rem; color: #64748b; font-weight: 400;
}
.comment-time {
    font-size: 0.7rem; color: #94a3b8; margin-left: auto;
}
.comment-delete-btn {
    font-size: 0.7rem; color: #ef4444; background: none; border: none;
    cursor: pointer; padding: 0 4px; opacity: 0.6; transition: opacity 0.15s;
}
.comment-delete-btn:hover { opacity: 1; }
.comment-body {
    font-size: 0.85rem; color: #334155; line-height: 1.5;
    word-break: break-word;
}
.comment-form {
    border-top: 1px solid #e2e8f0; padding-top: 10px;
}
.comment-input-row {
    margin-bottom: 6px;
}
.comment-textarea {
    width: 100%; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 8px 12px; font-size: 0.85rem; resize: vertical;
    min-height: 48px; max-height: 200px; font-family: inherit;
    transition: border-color 0.15s;
}
.comment-textarea:focus {
    outline: none; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}
.comment-action-row {
    display: flex; align-items: center; gap: 10px;
}
.comment-anon-toggle {
    display: flex; align-items: center; gap: 4px; cursor: pointer;
    font-size: 0.78rem; color: #64748b; user-select: none;
}
.comment-anon-toggle input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: #3b82f6;
}
.anon-label { font-size: 0.78rem; }
.comment-char-count {
    font-size: 0.7rem; color: #94a3b8; margin-left: auto;
}
.comment-submit-btn {
    background: #3b82f6; color: #fff; border: none; border-radius: 6px;
    padding: 6px 16px; font-size: 0.82rem; font-weight: 600;
    cursor: pointer; transition: background 0.15s;
}
.comment-submit-btn:hover { background: #2563eb; }
.comment-login-prompt {
    text-align: center; padding: 12px; color: #94a3b8; font-size: 0.82rem;
    border-top: 1px solid #e2e8f0;
}
/* 2026-03-11: 대댓글 들여쓰기 */
.comment-reply { margin-left: 24px; border-left: 2px solid #e2e8f0; padding-left: 12px; }
.comment-reply.depth-2 { margin-left: 20px; }
.comment-reply.depth-3 { margin-left: 16px; }
/* 수정됨 표시 */
.comment-edited {
    font-size: 0.7rem; color: #3b82f6; cursor: pointer;
    text-decoration: underline dotted; margin-left: 4px;
}
.comment-edited:hover { color: #2563eb; }
/* 수정/답글 버튼 */
.comment-edit-btn, .comment-reply-btn {
    font-size: 0.7rem; color: #64748b; background: none; border: none;
    cursor: pointer; padding: 0 4px; opacity: 0.7; transition: opacity 0.15s;
}
.comment-edit-btn:hover, .comment-reply-btn:hover { opacity: 1; color: #3b82f6; }
.comment-cancel-btn {
    background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0;
    border-radius: 6px; padding: 5px 12px; font-size: 0.8rem; cursor: pointer;
}
.comment-cancel-btn:hover { background: #e2e8f0; }
/* 수정 이력 패널 */
.comment-history-box {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 10px 12px; margin-top: 8px; font-size: 0.78rem;
}
.comment-history-title {
    font-weight: 600; color: #475569; margin-bottom: 8px; font-size: 0.8rem;
}
.comment-history-item {
    padding: 6px 0; border-bottom: 1px solid #e2e8f0;
}
.comment-history-item:last-child { border-bottom: none; }
.comment-history-meta {
    display: flex; align-items: center; gap: 8px; margin-bottom: 3px;
}
.comment-history-version {
    font-weight: 600; color: #3b82f6; font-size: 0.72rem;
}
.comment-history-time { font-size: 0.7rem; color: #94a3b8; }
.comment-history-content {
    color: #64748b; line-height: 1.4; word-break: break-word;
}
/* 대댓글 작성 폼 */
.comment-reply-form-inner {
    margin-top: 8px; padding: 8px; background: #f8fafc; border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* ── 2026-03-11: 알림 관리 패널 ── */
.notif-manage-section { margin-bottom: 16px; }
.notif-status-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid #f1f5f9;
}
.notif-status-row:last-child { border-bottom: none; }
.notif-status-label { font-size: 0.85rem; color: #475569; font-weight: 500; }
.notif-status-value { font-size: 0.82rem; font-weight: 600; }
.notif-status-value.status-ok { color: #16a34a; }
.notif-status-value.status-warn { color: #d97706; }
.notif-status-value.status-err { color: #dc2626; }
.notif-manage-actions { display: flex; flex-direction: column; gap: 4px; }
.notif-action-btn {
    width: 100%; padding: 10px 16px; border: none; border-radius: 8px;
    font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: background 0.15s;
    text-align: left;
}
.notif-action-btn.primary { background: #3b82f6; color: #fff; }
.notif-action-btn.primary:hover { background: #2563eb; }
.notif-action-btn.secondary { background: #f1f5f9; color: #475569; }
.notif-action-btn.secondary:hover { background: #e2e8f0; }
.notif-action-btn.danger { background: #fef2f2; color: #dc2626; }
.notif-action-btn.danger:hover { background: #fee2e2; }
.notif-action-desc {
    font-size: 0.72rem; color: #94a3b8; margin: 0 0 10px 4px; line-height: 1.4;
}
.notif-section-title {
    font-size: 0.88rem; font-weight: 700; color: #1e293b; margin-bottom: 6px;
    padding-bottom: 6px; border-bottom: 2px solid #e2e8f0;
}
.notif-filter-list { display: flex; flex-direction: column; gap: 6px; }
.notif-filter-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
}
.notif-filter-item.alert-on { background: #eff6ff; border-color: #bfdbfe; }
.notif-filter-name { font-size: 0.82rem; font-weight: 600; color: #334155; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-filter-tags { font-size: 0.7rem; color: #94a3b8; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-filter-toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; margin-left: 8px; }
.notif-filter-toggle input { opacity: 0; width: 0; height: 0; }
.notif-filter-toggle .slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background: #cbd5e1; border-radius: 22px; transition: 0.2s;
}
.notif-filter-toggle .slider:before {
    content: ""; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%; transition: 0.2s;
}
.notif-filter-toggle input:checked + .slider { background: #3b82f6; }
.notif-filter-toggle input:checked + .slider:before { transform: translateX(18px); }
.notif-filter-empty { font-size: 0.8rem; color: #94a3b8; text-align: center; padding: 12px 0; }
.notif-log {
    margin-top: 12px; padding: 10px; background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 8px; max-height: 200px; overflow-y: auto;
}
.notif-log-line { font-size: 0.8rem; line-height: 1.8; color: #475569; }
.notif-log-line.log-ok { color: #16a34a; }
.notif-log-line.log-err { color: #dc2626; }
.notif-log-line.log-info { color: #94a3b8; }

/* 2026-03-18: 정렬 콤보박스 */
#sortOrder {
    font-size: 0.75rem;
    padding: 2px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: white;
    color: #475569;
    cursor: pointer;
    margin-left: 8px;
}

/* 2026-03-18: 모바일 상세 페이지 레이아웃 개선 */
@media (max-width: 480px) {
    .detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .detail-grid {
        gap: 12px;
    }
    .detail-card {
        padding: 12px;
    }
    .detail-sidebar {
        padding: 10px;
    }
    .section-table {
        font-size: 0.8rem;
    }
    .section-table th,
    .section-table td {
        padding: 4px 2px;
    }
}

/* ── 공지사항 팝업 ── */
.notice-popup-overlay { position:fixed; inset:0; z-index:var(--z-popup); background:rgba(0,0,0,0.6); display:flex; align-items:center; justify-content:center; }
.notice-popup-dialog { background:#1a1a2e; border-radius:12px; width:90vw; max-width:480px; max-height:80vh; display:flex; flex-direction:column; overflow:hidden; }
.notice-popup-header { display:flex; justify-content:space-between; align-items:center; padding:14px 18px 10px; border-bottom:1px solid #2a2a4a; }
.notice-popup-header h3 { margin:0; font-size:1rem; color:#e0e0ff; }
.notice-popup-close { background:none; border:none; color:#888; font-size:1.4rem; cursor:pointer; padding:0 4px; }
.notice-popup-body { padding:16px 18px; overflow-y:auto; flex:1; }
.notice-popup-title { margin:0 0 10px; font-size:1rem; color:#fff; font-weight:700; }
.notice-popup-content { font-size:0.88rem; color:#c0c0d0; line-height:1.7; word-break:break-word; }
.notice-popup-content p { margin:6px 0; }
.notice-popup-img { margin:10px 0; text-align:center; }
.notice-popup-img img { max-width:100%; border-radius:6px; }
.notice-popup-footer { display:flex; align-items:center; justify-content:space-between; padding:10px 18px 14px; border-top:1px solid #2a2a4a; gap:8px; }
.notice-popup-hide-label { font-size:0.8rem; color:#888; display:flex; align-items:center; gap:4px; cursor:pointer; }
.notice-popup-hide-label input { accent-color:#4fc3f7; }

/* 2026-04-21: PWA 설치 안내 팝업 */
.pwa-guide-overlay { position:fixed; inset:0; z-index:var(--z-popup, 20000); background:rgba(0,0,0,0.62); display:flex; align-items:center; justify-content:center; padding:12px; }
.pwa-guide-dialog { background:#1a1a2e; border-radius:14px; width:100%; max-width:500px; max-height:86vh; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 18px 48px rgba(0,0,0,0.5); }
.pwa-guide-header { display:flex; justify-content:space-between; align-items:center; padding:14px 18px 10px; border-bottom:1px solid #2a2a4a; }
.pwa-guide-header h3 { margin:0; font-size:1.02rem; color:#e0e0ff; }
.pwa-guide-close { background:none; border:none; color:#888; font-size:1.4rem; cursor:pointer; padding:0 4px; line-height:1; }
.pwa-guide-close:hover { color:#fff; }
.pwa-guide-intro { padding:12px 18px 6px; font-size:0.85rem; color:#a8a8c0; line-height:1.6; }
/* 2026-04-21: PWA 설치 전용 기능 강조 박스 */
.pwa-guide-features { background:#1f2937; border:1px solid #facc15; border-radius:10px; padding:10px 14px; margin-top:6px; }
.pwa-guide-features-title { font-size:0.82rem; color:#fde047; font-weight:600; margin-bottom:8px; }
.pwa-guide-features ul { list-style:none; padding:0; margin:0; }
.pwa-guide-features li { padding:6px 0; font-size:0.82rem; color:#e5e7eb; border-bottom:1px dashed #374151; line-height:1.5; }
.pwa-guide-features li:last-child { border-bottom:none; }
.pwa-guide-features li b { color:#fbbf24; }
.pwa-guide-feat-note { display:inline-block; margin-top:3px; color:#94a3b8; font-size:0.74rem; }
.pwa-guide-tabs { display:flex; gap:6px; padding:10px 18px 0; border-bottom:1px solid #2a2a4a; }
.pwa-guide-tab { flex:1; background:#22233a; border:1px solid #2a2a4a; border-bottom:none; color:#9090a8; padding:9px 6px; border-radius:8px 8px 0 0; font-size:0.82rem; cursor:pointer; transition:all 0.15s; }
.pwa-guide-tab:hover { color:#c0c0d8; background:#2a2a44; }
.pwa-guide-tab-active { background:#1a1a2e; color:#4fc3f7; font-weight:600; border-color:#4fc3f7; border-bottom-color:#1a1a2e; position:relative; top:1px; }
.pwa-guide-body { padding:18px; overflow-y:auto; flex:1; }
.pwa-guide-steps { list-style:none; padding:0; margin:0 0 14px; }
.pwa-guide-steps li { display:flex; gap:10px; padding:8px 0; font-size:0.9rem; color:#d8d8e8; line-height:1.55; }
.pwa-guide-step-n { flex-shrink:0; width:24px; height:24px; border-radius:50%; background:#4fc3f7; color:#0a0a18; display:inline-flex; align-items:center; justify-content:center; font-size:0.78rem; font-weight:700; }
.pwa-guide-step-t { flex:1; }
.pwa-guide-step-t b { color:#fff; }
.pwa-guide-note { font-size:0.78rem; color:#8888a0; background:#22223a; border-left:3px solid #4a4a66; padding:8px 10px; border-radius:4px; margin:6px 0 10px; line-height:1.5; }
.pwa-guide-install-btn { width:100%; padding:11px; margin-top:10px; background:linear-gradient(135deg,#4fc3f7,#29b6f6); color:#0a0a18; border:none; border-radius:8px; font-size:0.92rem; font-weight:700; cursor:pointer; }
.pwa-guide-install-btn:disabled { background:#2a2a44; color:#666; cursor:not-allowed; }
.pwa-guide-install-hint { display:block; font-size:0.72rem; font-weight:400; margin-top:2px; opacity:0.8; }
.pwa-guide-footer { display:flex; align-items:center; gap:10px; padding:11px 18px 14px; border-top:1px solid #2a2a4a; flex-wrap:wrap; }
.pwa-guide-hide-label { font-size:0.78rem; color:#888; display:flex; align-items:center; gap:4px; cursor:pointer; }
.pwa-guide-hide-label input { accent-color:#4fc3f7; }
.pwa-guide-ok { margin-left:auto; background:#4fc3f7; color:#0a0a18; border:none; padding:7px 18px; border-radius:6px; font-size:0.85rem; font-weight:600; cursor:pointer; }
.pwa-guide-ok:hover { background:#29b6f6; }
.notice-popup-pager { font-size:0.78rem; color:#666; }
.notice-popup-btn { background:#1565c0; color:#fff; border:none; padding:6px 20px; border-radius:6px; font-size:0.85rem; cursor:pointer; }
.notice-popup-btn:hover { background:#1976d2; }

/* 2026-04-09: 기관 과거 공고 다이얼로그 */
.org-history-btn {
    display: inline-block; padding: 2px 8px; margin-left: 6px;
    background: #eef4ff; color: #1e40af; border: 1px solid #bfdbfe; border-radius: 4px;
    font-size: 0.72rem; cursor: pointer; vertical-align: middle;
}
.org-history-btn:hover { background: #dbeafe; }
.org-history-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: var(--z-modal-child);
    display: flex; align-items: flex-start; justify-content: center; padding-top: 60px;
}
.org-history-dialog {
    background: #fff; border-radius: 12px; width: 90%; max-width: 640px;
    height: 70vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.org-history-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #e5e7eb;
}
.org-history-header h3 { margin: 0; font-size: 1rem; }
.org-history-close { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: #666; }
.org-history-tabs {
    display: flex; gap: 4px; padding: 10px 20px; border-bottom: 1px solid #f0f0f0;
}
.org-history-tab {
    padding: 5px 14px; border: 1px solid #d1d5db; border-radius: 16px;
    background: #fff; font-size: 0.8rem; cursor: pointer;
}
.org-history-tab.active { background: #1e40af; color: #fff; border-color: #1e40af; }
.org-history-search { padding: 8px 20px 0; }
.org-history-search-input {
    width: 100%; padding: 7px 12px; border: 1px solid #d1d5db; border-radius: 6px;
    font-size: 0.83rem; outline: none; box-sizing: border-box;
}
.org-history-search-input:focus { border-color: #4a90d9; }
.org-history-body { overflow-y: auto; flex: 1; padding: 12px 20px; }
.org-history-loading, .org-history-empty { text-align: center; padding: 40px; color: #999; }
.org-history-summary { font-size: 0.82rem; color: #6b7280; margin-bottom: 10px; }
.org-history-list { display: flex; flex-direction: column; gap: 8px; }
.oh-item {
    padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px; cursor: pointer;
    transition: background 0.15s;
}
.oh-item:hover { background: #f9fafb; }
.oh-item.oh-awarded { border-left: 3px solid #f59e0b; }
/* 2026-04-18: 취소/정정 상태 시각 구분 */
.oh-item.oh-cancelled { background: #f3f4f6; opacity: 0.72; }
.oh-item.oh-cancelled:hover { background: #e5e7eb; opacity: 0.85; }
.oh-badge {
    display: inline-block; padding: 1px 7px; border-radius: 10px;
    font-size: 0.68rem; font-weight: 600; margin-left: 6px; vertical-align: middle;
}
.oh-badge.oh-badge-cancelled { background: #e5e7eb; color: #4b5563; }
.oh-badge.oh-badge-revised { background: #fed7aa; color: #9a3412; }
.oh-title { font-size: 0.85rem; font-weight: 500; margin-bottom: 4px; }
.oh-meta { font-size: 0.75rem; color: #6b7280; display: flex; gap: 8px; flex-wrap: wrap; }
.oh-budget { color: #1e40af; font-weight: 600; }
.oh-award { margin-top: 4px; font-size: 0.78rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.oh-award-company { color: #b45309; font-weight: 600; }
.oh-award-amount { color: #059669; font-weight: 600; }
.oh-award-rate { color: #6b7280; }
.oh-award-bidders { color: #6b7280; font-size: 0.72rem; }
/* 2026-04-10: 투찰 이력 — 순위/낙찰 표시 */
.oh-rank-badge {
    display: inline-block; padding: 1px 8px; background: #e5e7eb; color: #374151;
    border-radius: 10px; font-size: 0.72rem; font-weight: 600; margin-right: 4px;
}
.oh-rank-badge.oh-winner { background: #fef3c7; color: #b45309; }
.oh-winner-name { color: #6b7280; font-size: 0.72rem; }
.oh-dqlfctn { color: #dc2626; font-size: 0.72rem; }
/* 2026-04-10: 전체 투찰업체 테이블 */
.bidder-details { margin-top: 12px; }
.bidder-details summary { cursor: pointer; font-weight: 600; padding: 6px 0; color: #1e40af; }
.bidder-details summary:hover { color: #2563eb; }
.bidder-table {
    width: 100%; border-collapse: collapse; margin-top: 8px;
    font-size: 0.78rem;
}
.bidder-table th, .bidder-table td {
    padding: 5px 8px; border-bottom: 1px solid #e5e7eb; text-align: left;
}
.bidder-table th { background: #f8fafc; font-weight: 600; color: #475569; }
.bidder-table tr.bidder-winner { background: #fef3c7; font-weight: 600; }
.bidder-table tr.bidder-disqualified { color: #9ca3af; }
.extra-info-item.full-width { grid-column: 1 / -1; }
/* 2026-04-10: 강화된 기관 통계 */
.org-stats-summary {
    margin-top: 12px; padding: 10px 14px; background: #f0f7ff;
    border-radius: 8px; border-left: 3px solid #1565c0;
}
.og-title { font-size: 0.82rem; font-weight: 600; color: #1e293b; margin-bottom: 8px; }
.og-meta { font-size: 0.7rem; color: #64748b; font-weight: 400; margin-left: 4px; }
.og-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px;
}
.og-stat {
    display: flex; flex-direction: column; gap: 2px;
    padding: 6px 10px; background: #fff; border-radius: 6px;
    font-size: 0.85rem;
}
.og-label { font-size: 0.7rem; color: #6b7280; }
.og-stat b { font-size: 0.95rem; color: #1e40af; }

/* ══════════════════════════════════════════════════════════
 * 2026-04-14: 낙찰 분석 실행 버튼 (상세 카드 내) + 별도 다이얼로그
 * 크레딧 차감 시점을 사용자에게 명시적으로 노출
 * ══════════════════════════════════════════════════════════ */
.bid-analysis-launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    margin-top: 10px;
    background: linear-gradient(135deg, #1565c0, #1976d2);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.25);
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}
.bid-analysis-launch-btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 16px rgba(21, 101, 192, 0.35);
    transform: translateY(-1px);
}
.bid-analysis-launch-btn:active { transform: translateY(0); filter: brightness(0.98); }
.bid-analysis-launch-icon { font-size: 1.1rem; }
.bid-analysis-launch-text { font-weight: 700; }
.bid-analysis-launch-cost {
    margin-left: 6px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* 낙찰 분석 다이얼로그 — 상세 카드 위 중첩 오버레이 */
.bid-analysis-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: var(--ad-reserved, 40px); /* 하단 광고 영역 침범 방지 */
    background: rgba(15, 23, 42, 0.55);
    /* 2026-04-14: detailModal(20000) 위로 확실히 띄움 — 이전 10050은 detailModal 뒤에 가려짐 */
    z-index: 40000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
    animation: bidAnalysisFadeIn 180ms ease;
}
@keyframes bidAnalysisFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.bid-analysis-dialog .bid-analysis-modal {
    width: clamp(360px, 70vw, 880px);
    max-width: 96vw;
    max-height: 88vh;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: bidAnalysisSlideUp 200ms ease;
}
@keyframes bidAnalysisSlideUp {
    from { transform: translateY(12px); opacity: 0.85; }
    to   { transform: translateY(0); opacity: 1; }
}
.bid-analysis-dialog .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.bid-analysis-dialog .modal-header h2 {
    margin: 0;
    font-size: 1.05rem;
    color: #1e293b;
}
.bid-analysis-dialog .modal-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #64748b;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
}
.bid-analysis-dialog .modal-close:hover { background: #f1f5f9; color: #1e293b; }
.bid-analysis-dialog .modal-body {
    padding: 18px 20px 20px 20px;
    overflow-y: auto;
    flex: 1 1 auto;
}
.bid-analysis-dialog .section-guide {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: #f8fafc;
    border-left: 3px solid #1976d2;
    border-radius: 4px;
}
.bid-analysis-dialog .analysis-empty {
    padding: 40px 16px;
    text-align: center;
    color: #6b7280;
    font-size: 0.92rem;
}
