/* 공공알림 통합 프리미엄 디자인 시스템 (UTF-8) */

/* Pretendard 폰트: HTML <link>로 로딩 (렌더 차단 방지) */

:root {
    /* Primary - Navy (차분한 SaaS 톤) */
    --primary-blue: #2B4C7E;
    --primary-blue-dark: #1F3A63;
    --primary-blue-light: #EEF3F8;
    --accent-orange: #D97706;

    /* Text */
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;

    /* Background - Soft Gray */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F4F6F9;
    --bg-surface: #FFFFFF;
    --bg-muted: #F1F5F9;

    /* Gray scale */
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;

    /* Semantic */
    --success: #059669;
    --warning: #D97706;
    --danger: #DC2626;

    /* Borders */
    --border-color: #E2E8F0;

    /* Shadows - subtle */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);

    /* Radius */
    --border-radius-sm: 6px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
}

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

html {
    overflow-x: hidden;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
    overflow-x: hidden;
    /* 한글 단어가 중간에서 끊기지 않도록 (긴 영문·URL은 예외적으로 줄바꿈) */
    word-break: keep-all;
    overflow-wrap: break-word;
}

main.container {
    padding-bottom: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* 알림 센터 디자인 */
.notifications-container {
    max-width: 800px;
    margin: 48px auto;
}

.notification-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    gap: 16px;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.notification-item:hover {
    border-color: var(--primary-blue);
    background: var(--bg-muted);
}

.notification-item.unread {
    border-left: 4px solid var(--primary-blue);
    background: var(--primary-blue-light);
}

.notification-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.notification-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.8rem;
    color: #94A3B8;
}

.unread-badge {
    width: 8px;
    height: 8px;
    background: var(--primary-blue);
    border-radius: 50%;
    position: absolute;
    top: 20px;
    right: 20px;
}

.empty-state,
.error-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    border: 1px dashed var(--gray-300);
    color: var(--text-secondary);
}

.empty-state p,
.error-state p {
    font-size: 1.1rem;
    font-weight: 500;
}

.empty-hint {
    font-size: 0.85rem;
    margin-top: 8px;
    opacity: 0.7;
}

.btn-retry {
    margin-top: 16px;
    padding: 8px 20px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* ========== 헤더 (2단 네비게이션) ========== */
.main-header {
    background: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-top {
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 52px;
    gap: 32px;
}

/* 로고 */
.logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

/* 1단 메인 네비게이션 */
.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.main-nav-item {
    padding: 6px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.main-nav-item:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.main-nav-item.active {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    font-weight: 600;
}

/* 2단 서브 네비게이션 */
.header-sub {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.sub-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 38px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: nowrap;
}

.sub-nav::-webkit-scrollbar {
    display: none;
}

.sub-nav-item {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.sub-nav-item:hover {
    color: var(--text-primary);
}

.sub-nav-item.active {
    color: var(--primary-blue);
    font-weight: 600;
}

.badge-pro {
    font-size: 0.6rem;
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 700;
    margin-left: 2px;
}

.badge-count {
    font-size: 0.65rem;
    background: var(--danger);
    color: white;
    padding: 0 5px;
    border-radius: 100px;
    font-weight: 600;
    margin-left: 4px;
    min-width: 16px;
    text-align: center;
}

/* 네비게이션 */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-group {
    position: relative;
}

.nav-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.nav-trigger svg {
    opacity: 0.5;
    transition: opacity 0.15s;
}

.nav-trigger:hover {
    color: var(--text-primary);
    background: var(--gray-100);
}

.nav-trigger:hover svg {
    opacity: 0.8;
}

.nav-trigger.active {
    color: var(--primary-blue);
    background: var(--primary-blue-light);
}

.nav-trigger.active svg {
    opacity: 1;
    stroke: var(--primary-blue);
}

.nav-trigger::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    opacity: 0.4;
    margin-left: 2px;
    transition: transform 0.2s;
}

.nav-group:hover .nav-trigger::after {
    transform: rotate(180deg);
}

/* 드롭다운 메뉴 */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: white;
    min-width: 220px;
    border-radius: 14px;
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
}

.nav-group:hover .dropdown-menu,
.nav-group.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu-right {
    left: auto;
    right: 0;
    transform: translateY(6px);
}

.nav-group:hover .dropdown-menu-right,
.nav-group.active .dropdown-menu-right {
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.dropdown-icon {
    font-size: 1.15rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.dropdown-label {
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.3;
}

.dropdown-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 1px;
    line-height: 1.3;
}

.dropdown-item:hover {
    background: var(--gray-100);
}

.dropdown-item:hover .dropdown-label {
    color: var(--primary-blue);
}

.dropdown-item.active {
    background: var(--primary-blue-light);
}

.dropdown-item.active .dropdown-label {
    color: var(--primary-blue);
    font-weight: 700;
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 4px 8px;
}

.dropdown-item-danger .dropdown-label {
    color: #EF4444;
}

.dropdown-item-danger:hover {
    background: #FEF2F2;
}

/* 헤더 액션 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-header-secondary {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    transition: all 0.15s;
}

.btn-header-secondary:hover {
    color: var(--text-primary);
    background: var(--gray-100);
}

.btn-header-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--primary-blue);
    color: white;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8125rem;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-header-primary:hover {
    background: var(--primary-blue-dark);
}

/* 유저 메뉴 */
.user-trigger {
    gap: 8px !important;
}

.nav-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gray-200);
}

.nav-username {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-trigger::after {
    display: none;
}

/* 모바일 메뉴 토글 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    padding: 8px;
    border-radius: 8px;
    transition: background 0.15s;
    line-height: 0;
}

.menu-toggle:hover {
    background: var(--gray-100);
}

/* 배지 */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #EF4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 10px;
    margin-left: auto;
}

/* 데스크톱: 모바일 전용 요소 숨김 */
.mobile-drawer,
.mobile-backdrop {
    display: none;
}

/* ========== 모바일 헤더 ========== */
@media (max-width: 992px) {
    .main-nav,
    .header-sub {
        display: none;
    }

    .header-inner {
        gap: 0;
    }

    .menu-toggle {
        display: flex;
        order: 3;
    }

    .header-actions {
        order: 2;
        margin-right: 4px;
    }

    .logo-area {
        order: 1;
        flex: 1;
    }

    .btn-header-secondary,
    .btn-header-primary {
        display: none;
    }

    .user-menu .dropdown-menu {
        display: none !important;
    }

    .nav-username {
        display: none;
    }

    .user-trigger::after {
        display: none !important;
    }

    /* 백드롭 */
    .mobile-backdrop {
        display: block;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s, visibility 0.2s;
    }

    .mobile-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    /* 모바일 드로어 */
    .mobile-drawer {
        display: flex;
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: 85%;
        max-width: 340px;
        background: var(--bg-primary);
        flex-direction: column;
        z-index: 1001;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08);
    }

    .mobile-drawer.active {
        transform: translateX(0);
    }

    .drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .drawer-logo {
        display: flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
    }

    .drawer-close {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-secondary);
        padding: 8px;
        border-radius: 6px;
    }

    .drawer-body {
        flex: 1;
        overflow-y: auto;
        padding: 12px 16px;
    }

    .drawer-section {
        margin-bottom: 16px;
    }

    .drawer-section-title {
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 8px 12px 4px;
    }

    .drawer-link {
        display: block;
        padding: 10px 12px;
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--text-primary);
        text-decoration: none;
        border-radius: 6px;
        transition: background 0.1s;
    }

    .drawer-link:active,
    .drawer-link.active {
        background: var(--primary-blue-light);
        color: var(--primary-blue);
    }

    .drawer-link-danger {
        color: var(--danger);
    }

    .drawer-auth {
        margin-top: auto;
        padding-top: 16px;
        border-top: 1px solid var(--border-color);
    }

    .drawer-user-info {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px;
        margin-bottom: 8px;
    }

    .drawer-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        object-fit: cover;
    }

    .drawer-user-name {
        font-weight: 600;
        font-size: 0.875rem;
        color: var(--text-primary);
        display: block;
    }

    .drawer-user-email {
        font-size: 0.75rem;
        color: var(--text-secondary);
        display: block;
    }

    .drawer-btn-login,
    .drawer-btn-signup {
        display: block;
        text-align: center;
        padding: 12px;
        border-radius: 8px;
        font-size: 0.875rem;
        font-weight: 600;
        text-decoration: none;
        margin-bottom: 8px;
    }

    .drawer-btn-login {
        background: var(--primary-blue);
        color: white;
    }

    .drawer-btn-signup {
        background: var(--gray-100);
        color: var(--text-primary);
    }
}

/* 버튼 */
.btn-login {
    background: var(--primary-blue);
    color: white !important;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    box-shadow: var(--shadow-sm);
}

.btn-login:hover {
    background: var(--primary-blue-dark);
}

/* 히어로 섹션 */
.hero-section {
    background: linear-gradient(135deg, #F4F7FB 0%, #E9EEF5 50%, #F4F7FB 100%);
    color: var(--text-primary);
    padding: 36px 0 32px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #D5DEE9;
}

.hero-section::before {
    display: none;
}

/* 페이지별 히어로 색상 변형 */
.hero-notice { background: linear-gradient(135deg, #F4F7FB 0%, #E9EEF5 50%, #F4F7FB 100%); border-bottom-color: #D5DEE9; }
.hero-notice .stat-number { color: var(--primary-blue); }
.hero-pre-notice { background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 50%, #E0FFF4 100%); border-bottom-color: #6EE7B7; }
.hero-pre-notice .stat-number { color: #059669; }
.hero-procurement { background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 50%, #FEF3C7 100%); border-bottom-color: #FDBA74; }
.hero-procurement .stat-number { color: #D97706; }
.hero-bid-result { background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 50%, #E0F2FE 100%); border-bottom-color: #93C5FD; }
.hero-bid-result .stat-number { color: #2563EB; }
.hero-contract { background: linear-gradient(135deg, #F4F6FA 0%, #E8ECF3 50%, #F4F6FA 100%); border-bottom-color: #CBD5E1; }
.hero-contract .stat-number { color: #475569; }
.hero-tracking { background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 50%, #FECDD3 100%); border-bottom-color: #FDA4AF; }
.hero-tracking .stat-number { color: #E11D48; }
.hero-support { background: linear-gradient(135deg, #F0FDFA 0%, #CCFBF1 50%, #D5F5F6 100%); border-bottom-color: #5EEAD4; }
.hero-support .stat-number { color: #0D9488; }
.hero-notification { background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 50%, #FDE68A 100%); border-bottom-color: #FCD34D; }
.hero-notification .stat-number { color: #B45309; }
.hero-search { background: linear-gradient(135deg, #F4F7FB 0%, #E9EEF5 50%, #F4F7FB 100%); border-bottom-color: #D5DEE9; }
.hero-search .stat-number { color: var(--primary-blue); }

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
    color: #1E293B;
}

.hero-content p {
    font-size: 0.95rem;
    color: #475569;
    font-weight: 400;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--primary-blue);
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Hero Section Tablet */
@media (max-width: 992px) {
    .hero-content h2 {
        font-size: 1.9rem;
    }

    .hero-stats {
        gap: 32px;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

/* Hero Section Mobile */
@media (max-width: 768px) {
    .hero-section {
        padding: 24px 0 28px;
    }

    .hero-content h2 {
        font-size: 1.5rem;
        letter-spacing: -0.5px;
    }

    .hero-content p {
        font-size: 0.85rem;
    }

    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px 24px;
        margin-top: 16px;
        max-width: 100%;
        overflow: hidden;
    }

    .stat-item {
        min-width: 0;
        flex: 0 0 auto;
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }
}

/* Hero Section Small Phone */
@media (max-width: 380px) {
    .hero-section {
        padding: 20px 0 24px;
    }

    .hero-content h2 {
        font-size: 1.3rem;
    }

    .hero-stats {
        gap: 12px 16px;
    }

    .stat-number {
        font-size: 1.05rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }
}

/* 검색 섹션 */
.search-section {
    margin-top: 32px;
    position: relative;
    z-index: 10;
}

.search-card {
    background: white;
    padding: 24px 28px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
}

.search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

#search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-md);
    font-size: 0.95rem;
    transition: all 0.2s;
    outline: none;
}

#search-input:focus {
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-search {
    padding: 0 32px;
    border-radius: var(--border-radius-md);
    font-size: 0.9rem;
    background: var(--primary-blue);
    color: white;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-search:hover {
    background: var(--primary-blue-dark);
}

.filter-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid var(--gray-100);
    padding-top: 14px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.filter-item select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: var(--gray-100);
    font-weight: 600;
    outline: none;
}

.sort-wrapper {
    margin-left: auto;
}

.sort-wrapper select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    font-weight: 700;
    outline: none;
}

/* Search Section Mobile */
@media (max-width: 768px) {
    .search-section {
        margin-top: 16px;
        padding: 0;
    }

    .search-card {
        padding: 14px;
        border-radius: var(--border-radius-md);
    }

    .search-input-group {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }

    #search-input {
        padding: 12px 14px;
        font-size: 0.9rem;
        border-radius: var(--border-radius-md);
    }

    .btn-search {
        width: 100%;
        padding: 12px 0;
        border-radius: var(--border-radius-md);
        font-size: 0.9rem;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
        padding-top: 14px;
    }

    .filter-item {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }

    .filter-label {
        font-size: 0.8rem;
    }

    .filter-item select {
        width: 100%;
        max-width: none;
        padding: 12px 14px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .sort-wrapper {
        margin-left: 0 !important;
        margin-top: 4px;
    }

    .sort-wrapper select {
        width: 100%;
        padding: 12px 14px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
}

/* Search Section - Small phones */
@media (max-width: 380px) {
    .search-section {
        padding: 0 8px;
    }

    .search-card {
        padding: 14px;
    }

    #search-input {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
}

/* 탭 메뉴 스타일 */
.tabs {
    margin-top: 28px;
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--gray-200);
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: thin;
    padding-bottom: 8px;
    margin-bottom: 0;
}

.tabs::-webkit-scrollbar {
    height: 4px;
}

.tabs::-webkit-scrollbar-track {
    background: transparent;
}

.tabs::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
}

@media (max-width: 768px) {
    .tabs {
        margin-top: 24px;
        padding-bottom: 10px;
        gap: 4px;
        margin-bottom: 8px;
        /* 스크롤 유도: 양쪽 끝 패딩 + 우측 페이드 */
        padding-left: 4px;
        padding-right: 20px;
        mask-image: linear-gradient(to right, black 90%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
    }

    .tab-item {
        padding: 10px 16px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
}

.tab-item {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    user-select: none;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.tab-item:hover {
    color: var(--primary-blue);
}

.tab-item.active {
    font-weight: 800;
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.tab-item[data-filter="emergency"] {
    color: #e74c3c;
}

.tab-item[data-filter="emergency"].active {
    border-bottom-color: #e74c3c;
}

.tab-item[data-filter="rebid"] {
    color: #f39c12;
}

.tab-item[data-filter="rebid"].active {
    border-bottom-color: #f39c12;
}

/* ───────────────────────────────────────
   공용 테이블 그리드 (사용자 페이지)
   ─────────────────────────────────────── */
.pub-table-wrap {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-top: 20px;
    position: relative;
}

/* 목록을 바꾸는 동안의 표시.
   탭을 눌러도 1~2초간 아무 반응이 없어 멈춘 것처럼 보였다. 행을 지우지 않고
   흐리게만 해서 표 높이가 그대로 유지되도록 한다(레이아웃이 튀지 않는다). */
.pub-table-wrap.is-loading .pub-table {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

.pub-table-wrap.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid var(--primary-blue-light, #EEF3F8);
    border-top-color: var(--primary-blue, #2B4C7E);
    border-radius: 50%;
    animation: pub-spin 0.7s linear infinite;
}

@keyframes pub-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .pub-table-wrap.is-loading::after { animation-duration: 2s; }
}

.pub-table {
    width: 100%;
    border-collapse: collapse;
}

.pub-table thead th {
    background: var(--bg-muted, #F8FAFC);
    padding: 14px 18px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.pub-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.1s;
    cursor: pointer;
}

.pub-table tbody tr:last-child {
    border-bottom: none;
}

.pub-table tbody tr:hover {
    background: var(--bg-muted, #F8FAFC);
}

.pub-table tbody tr.is-tracked {
    border-left: 3px solid var(--primary-blue);
    background: var(--primary-blue-light);
}

.pub-table tbody tr.is-tracked:hover {
    background: #E3EAF3;
}

.pub-table td {
    padding: 16px 18px;
    font-size: 0.85rem;
    color: var(--text-primary);
    vertical-align: middle;
}

/* 카테고리 배지 */
.cat-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.cat-construction { background: #DBEAFE; color: #1E40AF; }
.cat-service { background: #D1FAE5; color: #065F46; }
.cat-goods { background: #FEF3C7; color: #92400E; }
.cat-foreign { background: #EDE9FE; color: #5B21B6; }
.cat-pre { background: #FCE7F3; color: #9D174D; }
.cat-default { background: var(--gray-100); color: var(--gray-600, #64748B); }

/* 제목 셀 */
.pub-table .td-title {
    max-width: 360px;
    font-weight: 600;
    line-height: 1.4;
}

/* 제목은 실제 링크다. 크롤러가 상세 페이지를 타고 들어갈 수 있어야 하고
   사용자도 새 탭으로 열 수 있어야 한다. 색은 본문 글자색을 그대로 쓴다. */
.pub-table .td-title a {
    color: inherit;
    text-decoration: none;
}

.pub-table .td-title-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: keep-all;
}

.pub-table .td-org {
    color: var(--text-secondary);
    font-size: 0.78rem;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

/* 금액 */
.pub-table .td-price {
    font-weight: 700;
    white-space: nowrap;
}

/* 날짜 */
.pub-table .td-date {
    white-space: nowrap;
    font-size: 0.82rem;
}

.pub-table .td-deadline {
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.82rem;
}

/* 지역 */
.pub-table .td-region {
    white-space: nowrap;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* D-Day 배지 */
.dday-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    background: var(--gray-100);
    color: var(--text-secondary);
}

.dday-badge.urgent {
    background: #FEF2F2;
    color: #EF4444;
}

.dday-badge.warning {
    background: #FFFBEB;
    color: #D97706;
}

.dday-badge.complete {
    background: #D1FAE5;
    color: #065F46;
}

/* 금액 색상 변형 */
.pub-table .td-price-win { color: #DC2626; }
.pub-table .td-price-plan { color: #9333EA; }
.pub-table .td-price-budget { color: #EF4444; }

/* 업체명 */
.pub-table .td-company {
    font-weight: 600;
    color: var(--primary-blue);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 중앙 정렬 */
.pub-table .td-center {
    text-align: center;
}

/* 낙찰률 색상 */
.rate-high { color: #059669; font-weight: 700; }
.rate-mid  { color: #D97706; font-weight: 700; }
.rate-low  { color: #EF4444; font-weight: 700; }

/* 테이블 액션 버튼 */
.pub-table .td-actions {
    white-space: nowrap;
}

.pub-table .td-actions .btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--gray-200);
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.pub-table .td-actions .btn-sm:hover {
    background: var(--bg-muted, #F8FAFC);
    border-color: var(--gray-300, #CBD5E1);
    color: var(--text-primary);
}

.pub-table .td-actions .btn-track-sm {
    background: #FFFBEB;
    color: #D97706;
    border-color: #FEF3C7;
}

.pub-table .td-actions .btn-track-sm:hover {
    background: #FEF3C7;
    border-color: #FDE68A;
}

.pub-table .td-actions .btn-track-sm.active {
    background: #FEF3C7;
    color: #92400E;
    border-color: #F59E0B;
}

.pub-table .td-actions .btn-ai-sm {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    border-color: #D5DEE9;
}

.pub-table .td-actions .btn-ai-sm:hover {
    background: #E3EAF3;
}

/* 빈 상태 */
.pub-table .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

/* 통계 요약 바 */
.pub-stats-bar {
    display: flex;
    gap: 24px;
    padding: 12px 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.pub-stats-bar strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* 반응형 */
@media (max-width: 1024px) {
    .pub-table .td-title { max-width: 240px; }
    .pub-table .col-hide-md { display: none; }
}

@media (max-width: 768px) {
    .pub-table-wrap {
        border: none;
        background: transparent;
        border-radius: 0;
        overflow: visible;
    }
    .pub-table thead { display: none !important; }
    .pub-table, .pub-table tbody, .pub-table tr, .pub-table td {
        display: block !important; width: 100% !important;
    }
    .pub-table tr {
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 14px 16px;
        margin-bottom: 10px;
        cursor: pointer;
        border-left: none;
    }
    .pub-table tr.is-tracked {
        border-left: 3px solid var(--primary-blue);
    }
    .pub-table td {
        padding: 0 !important;
        border: none !important;
        text-align: left;
    }
    .pub-table .td-title {
        max-width: none;
        margin-top: 6px;
    }
    .pub-table .td-title a { text-decoration: none; color: inherit; }
    .pub-table .td-title .td-title-text {
        font-size: 0.92rem; font-weight: 700;
        white-space: normal; line-height: 1.45;
        -webkit-line-clamp: 3;
    }
    .pub-table .td-title .td-org {
        margin-top: 3px;
        max-width: none;
    }
    .pub-table .td-price {
        font-size: 0.85rem; font-weight: 700;
        color: var(--primary-blue); margin-top: 8px;
        display: inline-block !important;
    }
    .pub-table .td-deadline {
        font-size: 0.82rem; color: var(--text-secondary);
        display: inline-block !important;
        margin-left: 12px;
    }
    .pub-table .td-actions {
        margin-top: 10px;
    }
    .pub-table .td-actions .btn-sm,
    .pub-table .td-actions .btn-track-sm {
        display: inline-block;
        padding: 7px 16px;
        font-size: 0.8rem;
        border-radius: 6px;
    }
    .pub-table .col-hide-md { display: none !important; }

    /* stats bar */
    .pub-stats-bar {
        font-size: 0.82rem;
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* 공고 리스트 아이템 디자인 */
.notices-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 20px;
}

.notice-item {
    background: var(--bg-primary);
    padding: 28px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: background 0.15s ease;
}

.notice-item:hover {
    background: var(--bg-muted);
}

.notice-item.is-tracked {
    border-left: 3px solid var(--primary-blue);
    padding-left: 20px;
    background: var(--primary-blue-light);
}

.notice-item.is-tracked:hover {
    background: #E3EAF3;
}

.notice-tracking-badge {
    background: #F59E0B;
    color: white;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.btn-track-active {
    background: #FEF3C7 !important;
    color: #92400E !important;
    border: 1px solid #F59E0B !important;
}

.btn-track-active:hover {
    background: #FDE68A !important;
    border-color: #D97706 !important;
}

.notice-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.notice-badge {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
}

.notice-region {
    background: var(--gray-100);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.notice-dday {
    margin-left: auto;
    background: #FEF2F2;
    color: #EF4444;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid #FEE2E2;
}

.notice-dday.warning {
    background: #FFFBEB;
    color: #D97706;
    border-color: #FEF3C7;
}

.notice-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: keep-all;
}

.notice-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    padding-top: 18px;
    margin-top: 4px;
    border-top: 1px solid var(--gray-100);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.meta-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-blue {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
}

.badge-orange {
    background: #FFF4E6;
    color: var(--accent-orange);
}

/* 프리미엄 푸터 디자인 시스템 */
.main-footer {
    background: #0F172A;
    /* 더 깊은 다크 컬러 */
    color: #94A3B8;
    padding: 80px 0 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-decoration: none;
}

.footer-description {
    line-height: 1.8;
    margin-bottom: 24px;
    font-size: 0.95rem;
    color: #64748B;
}

.footer-copyright {
    font-size: 0.85rem;
    color: #475569;
}

.footer-links-grid {
    display: flex;
    gap: 80px;
}

.footer-section h4 {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--primary-blue);
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-list a {
    color: #94A3B8;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-list a:hover {
    color: white;
    transform: translateX(4px);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-label {
    font-weight: 600;
    color: white;
    width: 70px;
    font-size: 0.85rem;
}

.contact-value {
    color: #94A3B8;
}

.footer-bottom {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-business-info {
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.6;
}

.footer-data-attribution {
    font-size: 0.72rem;
    color: #3B4A5E;
    margin-top: 6px;
    line-height: 1.5;
}

.footer-copyright {
    font-size: 0.8rem;
    color: #475569;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .main-footer {
        padding: 48px 0 32px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 32px;
    }

    .footer-links-grid {
        gap: 32px;
        width: 100%;
    }

    .footer-logo {
        font-size: 1.2rem;
    }

    .footer-description {
        font-size: 0.88rem;
    }

    .footer-section h4 {
        font-size: 0.92rem;
        margin-bottom: 16px;
    }

    .footer-list {
        gap: 10px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: 32px;
        padding-top: 24px;
    }

    .footer-bottom-left {
        align-items: center;
    }
}

@media (max-width: 380px) {
    .container {
        padding: 0 12px;
    }

    .footer-links-grid {
        flex-direction: column;
        gap: 28px;
    }
}

.notice-footer {
    padding-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.btn-detail {
    text-decoration: none;
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.notice-actions {
    display: flex;
    gap: 12px;
    margin-right: 16px;
}

.btn-track {
    background: #FFFBEB;
    color: #D97706;
    border: 1px solid #FEF3C7;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-track:hover {
    background: #FEF3C7;
    border-color: #F59E0B;
}

.btn-track:active {
    transform: translateY(0);
}

.btn-detail:hover {
    background: var(--primary-blue);
    color: white;
}

.btn-report {
    text-decoration: none;
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid #D5DEE9;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-report:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* 지원사업 배지 변형 */
.notice-badge.badge-kstartup { background: #EDE9FE; color: #7C3AED; }
.notice-badge.badge-bizinfo { background: #ECFDF5; color: #059669; }
.notice-badge.badge-event { background: #FEF3C7; color: #D97706; }

/* 지원사업 버튼 변형 */
.btn-detail.btn-apply { background: #ECFDF5; color: #059669; }
.btn-detail.btn-apply:hover { background: #059669; color: white; }
.btn-detail.btn-view { background: #EBF5FF; color: #0066CC; }
.btn-detail.btn-view:hover { background: #0066CC; color: white; }

/* 카드 설명 텍스트 */
.notice-desc {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 해시태그 */
.notice-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--gray-100);
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 조회수 */
.view-count {
    color: #94A3B8;
    font-size: 0.8rem;
}

/* 카드 제목 링크 */
.notice-title a {
    color: inherit;
    text-decoration: none;
}

.notice-title a:hover {
    color: var(--primary-blue);
}

/* D-Day 강조 색상 */
.notice-dday.urgent {
    background: #FEF2F2;
    color: #EF4444;
    border-color: #FEE2E2;
}

/* 공고 카드 모바일 최적화 */
@media (max-width: 768px) {
    .notices-list {
        gap: 14px;
        margin-top: 20px !important;
    }

    .notice-item {
        padding: 16px;
        border-radius: 14px;
        gap: 12px;
    }

    .notice-item:hover {
        transform: none;
    }

    .notice-header {
        gap: 6px;
    }

    .notice-badge {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    .notice-region {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    .notice-tracking-badge {
        padding: 3px 8px;
        font-size: 0.65rem;
    }

    .notice-dday {
        margin-left: 0;
        order: -1;
        align-self: flex-start;
    }

    .notice-title {
        font-size: 1rem;
        line-height: 1.45;
    }

    .notice-meta {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding-top: 12px;
    }

    .meta-label {
        font-size: 0.7rem;
    }

    .meta-value {
        font-size: 0.85rem;
    }

    .notice-footer {
        padding-top: 12px;
        flex-direction: column;
        gap: 8px;
    }

    .notice-footer-extended {
        padding-top: 12px;
        gap: 10px;
    }

    .notice-footer-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .notice-actions {
        margin-right: 0;
        width: 100%;
        flex-wrap: wrap;
    }

    .btn-detail,
    .btn-track,
    .btn-report {
        padding: 10px 14px;
        font-size: 0.82rem;
        flex: 1;
        min-width: 0;
        text-align: center;
        justify-content: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .doc-group {
        flex-direction: column;
        gap: 8px;
        padding: 10px 14px;
    }

    .doc-group-divider {
        display: none;
    }

    .doc-group-links {
        width: 100%;
    }

    .btn-doc {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

/* 공고 카드 - 소형 폰 */
@media (max-width: 380px) {
    .notice-item {
        padding: 14px;
    }

    .notice-meta {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .notice-title {
        font-size: 0.95rem;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 32px 0;
}

@media (max-width: 768px) {
    .pagination {
        gap: 8px;
        margin: 32px 0;
        padding: 0 12px;
    }

    .pagination button {
        padding: 10px 14px !important;
        font-size: 0.82rem !important;
        min-width: auto;
        border-radius: 10px !important;
        flex: 1;
    }

    .pagination div {
        padding: 10px 12px !important;
        font-size: 0.82rem !important;
        white-space: nowrap;
    }
}

@media (max-width: 380px) {
    .pagination {
        gap: 6px;
    }

    .pagination button {
        padding: 9px 10px !important;
        font-size: 0.78rem !important;
    }

    .pagination div {
        padding: 9px 8px !important;
        font-size: 0.78rem !important;
    }
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.notice-item {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* ═══════════════════════════════════════════════════════════
   공통 컴포넌트 스타일 (모든 공개 페이지 공유)
   ═══════════════════════════════════════════════════════════ */

/* 로딩 상태 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.loading p {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 빈 결과 상태 */
.no-results {
    grid-column: 1 / -1;
    padding: 80px 20px;
    text-align: center;
    background: white;
    border-radius: 20px;
    border: 2px dashed var(--gray-200);
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.no-results-icon {
    font-size: 3.5rem;
    background: var(--gray-100);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.no-results-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.no-results-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 400px;
    line-height: 1.6;
    margin: 0;
}

.btn-reset-search {
    margin-top: 8px;
    padding: 12px 24px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-reset-search:hover {
    background: var(--primary-blue-dark);
}

/* 빈 결과 모바일 */
@media (max-width: 768px) {
    .no-results {
        padding: 48px 16px;
        margin: 20px 0;
        border-radius: 14px;
    }

    .no-results-icon {
        font-size: 2.5rem;
        width: 72px;
        height: 72px;
    }

    .no-results-title {
        font-size: 1.1rem;
    }

    .no-results-desc {
        font-size: 0.9rem;
    }

    .empty-state,
    .error-state {
        padding: 40px 16px;
    }
}

/* 데이터 없음 */
.no-data {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    background: white;
    border-radius: 16px;
    border: 1px dashed var(--gray-300);
    font-size: 1rem;
    font-weight: 500;
}

/* 문서 링크 그룹 (사전규격/발주계획) */
.doc-group {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    width: 100%;
}

.doc-group-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.doc-group-label strong {
    color: var(--text-primary);
    font-family: monospace;
}

.doc-group-divider {
    width: 1px;
    height: 16px;
    background: var(--gray-300);
}

.doc-group-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* 문서 다운로드 버튼 */
.btn-doc {
    background: #10B981;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-doc:hover {
    background: #059669;
}

/* notice-footer 확장 (세로 레이아웃) */
.notice-footer-extended {
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.notice-footer-actions {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 8px;
}

/* 메타 하단 정보 */
.notice-meta-bottom {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* 발주계획 보라 테마 */
.doc-group-purple {
    background: #fdf4ff;
    border-color: #f5d0fe;
}

.doc-group-purple .doc-group-label {
    color: #a21caf;
}

.doc-group-purple .doc-group-label strong {
    color: #701a75;
}

/* 완료 배지 */
.badge-complete {
    background: #F0FDF4;
    color: #16A34A;
    border-color: #DCFCE7;
}

/* 프로필 페이지 스타일 */
.profile-container {
    max-width: 700px;
    margin: 48px auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 0;
    padding-bottom: 24px;
    border-bottom: none;
}

/* 프로필 탭 네비게이션 */
.profile-tabs {
    display: flex;
    gap: 6px;
    padding: 6px;
    background: var(--gray-100, #f3f4f6);
    border-radius: 14px;
    margin-bottom: 32px;
}

.profile-tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    transition: all 0.2s;
}

.profile-tab-btn:hover {
    color: var(--text-primary, #111);
    background: rgba(255, 255, 255, 0.5);
}

.profile-tab-btn.active {
    background: var(--primary-blue, #3b82f6);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* 탭 콘텐츠 */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: tabFadeIn 0.25s ease;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary-blue-light);
    object-fit: cover;
}

.profile-info h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.profile-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 폼 스타일 */
.form-section {
    margin-bottom: 32px;
}

.form-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.2s;
    outline: none;
    background: white;
}

.form-group input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px var(--primary-blue-light);
}

.keyword-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    background: var(--gray-100);
    padding: 8px;
    border-radius: 16px;
    border: 1px solid var(--gray-200);
}

.keyword-input-wrapper input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    background: white;
    box-shadow: var(--shadow-sm);
}

.keyword-input-wrapper input:focus {
    box-shadow: 0 0 0 3px var(--primary-blue-light);
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 48px;
    padding: 12px;
    background: white;
    border-radius: 12px;
    border: 1px dashed var(--gray-300);
}

.keyword-tag {
    background: var(--bg-secondary);
    border: 1px solid var(--gray-200);
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s;
}

.keyword-tag:hover {
    border-color: var(--primary-blue);
    background: var(--primary-blue-light);
}

.btn-delete-kw {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s;
}

.btn-delete-kw:hover {
    color: #EF4444;
}

.empty-keywords {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.telegram-guide {
    background: var(--primary-blue-light);
    padding: 16px;
    border-radius: 12px;
    margin-top: 12px;
}

.telegram-guide p {
    font-size: 0.85rem;
    color: var(--primary-blue);
    font-weight: 600;
    line-height: 1.5;
}

.telegram-guide code {
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 800;
}

.btn-save {
    width: 100%;
    padding: 16px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 20px;
}

.btn-save:hover {
    background: var(--primary-blue-dark);
}

.btn-add {
    margin-top: 0 !important;
    width: auto !important;
    padding: 10px 24px !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
}

.status-message {
    margin-top: 16px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    display: none;
}

.status-success {
    color: #10B981;
}

.status-error {
    color: #EF4444;
}

/* 구독 관리 */
.subscription-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 24px;
}

.sub-plan-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sub-plan-name {
    font-size: 1.05rem;
    font-weight: 700;
}

.sub-plan-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.sub-plan-badge {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
}

.sub-plan-badge.free {
    background: #F1F5F9;
    color: var(--text-secondary);
}

.sub-plan-badge.active,
.sub-plan-badge.basic {
    background: #EFF6FF;
    color: var(--primary-blue);
}

.sub-plan-badge.pro {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
}

.sub-details {
    border-top: 1px solid #E2E8F0;
    padding-top: 16px;
    margin-bottom: 16px;
}

.sub-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.sub-detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

.sub-actions {
    display: flex;
    gap: 10px;
}

.btn-sub-upgrade {
    flex: 1;
    padding: 12px;
    text-align: center;
    background: var(--primary-blue);
    color: white;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-sub-upgrade:hover {
    background: var(--primary-blue-dark);
}

.btn-sub-cancel {
    padding: 12px 20px;
    background: white;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-sub-cancel:hover {
    border-color: #EF4444;
    color: #EF4444;
}

/* 결제 내역 */
.payment-history {
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    overflow: hidden;
}

.payment-empty {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #F1F5F9;
    background: white;
}

.payment-item:last-child {
    border-bottom: none;
}

.payment-item:hover {
    background: #F8FAFC;
}

.pay-info .pay-date {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.pay-info .pay-desc {
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 2px;
}

.pay-right {
    text-align: right;
}

.pay-amount {
    font-weight: 700;
    font-size: 0.95rem;
}

.pay-status {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 100px;
    margin-top: 4px;
    display: inline-block;
}

.pay-status.completed {
    background: #DCFCE7;
    color: #16A34A;
}

.pay-status.refunded,
.pay-status.cancelled {
    background: #FEE2E2;
    color: #DC2626;
}

.pay-status.success {
    background: #DCFCE7;
    color: #16A34A;
}

.pay-status.pending {
    background: #FEF3C7;
    color: #D97706;
}

.pay-status.failed {
    background: #FEE2E2;
    color: #DC2626;
}

.payment-item-info {
    flex: 1;
}

.payment-item-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.payment-item-date {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.payment-item-right {
    text-align: right;
}

.payment-item-amount {
    font-weight: 700;
    font-size: 0.95rem;
}

/* 히어로 축소 변형 */
.hero-section-compact {
    padding: 40px 0 60px;
}

/* 지역 필터 select 공통 옵션 (Jinja2 매크로용) */
@media (max-width: 768px) {
    .profile-container {
        margin: 16px auto;
        padding: 20px;
        border-radius: 14px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        margin-bottom: 0;
        padding-bottom: 16px;
    }

    .profile-tabs {
        gap: 4px;
        padding: 4px;
        margin-bottom: 24px;
    }

    .profile-tab-btn {
        padding: 10px 8px;
        font-size: 0.82rem;
    }

    .profile-avatar {
        width: 64px;
        height: 64px;
    }

    .profile-info h2 {
        font-size: 1.2rem;
    }

    .form-section h3 {
        font-size: 1rem;
    }

    .form-group input {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .keyword-input-wrapper {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }

    .keyword-input-wrapper input {
        font-size: 0.95rem;
        padding: 12px 14px;
    }

    .btn-add {
        width: 100% !important;
        padding: 12px !important;
    }

    .keyword-list {
        gap: 8px;
        padding: 10px;
    }

    .btn-save {
        padding: 14px;
        font-size: 0.95rem;
    }

    /* 프로필 버튼 그룹 모바일 스택 */
    .profile-btn-group {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .profile-btn-group .btn-save {
        flex: none !important;
        width: 100%;
    }
}

@media (max-width: 380px) {
    .profile-container {
        margin: 10px auto;
        padding: 16px;
    }
}

/* 페이지네이션 버튼 스타일 보강 */
.btn-pagination-prev {
    background: white !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--gray-300) !important;
}

.pagination-current {
    background: var(--primary-blue);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 800;
    box-shadow: var(--shadow-md);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════
   공고 카드 보강 스타일 (프리미엄)
   ═══════════════════════════════════════════════════════════ */

/* 공고번호 라인 */
.notice-no-line {
    font-size: 0.78rem;
    color: #94A3B8;
    font-weight: 500;
    font-family: 'SF Mono', 'Consolas', monospace;
    letter-spacing: 0.5px;
    margin-top: -6px;
}

/* 입찰방식 배지 */
.badge-method {
    background: #FEF3C7;
    color: #92400E;
}

/* 참여업체수 배지 */
.badge-bidders {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
}

/* 금액 강조 - 그라데이션 텍스트 */
.meta-price {
    color: #DC2626 !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
}

/* 마감일 강조 */
.meta-deadline {
    color: #EA580C !important;
    font-weight: 700 !important;
}

/* 낙찰률 색상 + 배지 스타일 */
.rate-high {
    color: #15803D !important;
    font-weight: 800 !important;
    background: #F0FDF4;
    padding: 2px 10px;
    border-radius: 6px;
    border: 1px solid #BBF7D0;
    display: inline-block;
}

.rate-mid {
    color: #1D4ED8 !important;
    font-weight: 800 !important;
    background: #EFF6FF;
    padding: 2px 10px;
    border-radius: 6px;
    border: 1px solid #BFDBFE;
    display: inline-block;
}

.rate-low {
    color: #DC2626 !important;
    font-weight: 800 !important;
    background: #FEF2F2;
    padding: 2px 10px;
    border-radius: 6px;
    border: 1px solid #FECACA;
    display: inline-block;
}

/* 카드 메타 그리드 - 2열 고정 깔끔한 레이아웃 */
.notice-meta-enhanced {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.meta-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 14px;
    border-bottom: 1px solid #F1F5F9;
    position: relative;
}

.meta-cell:nth-child(odd) {
    border-right: 1px solid #F1F5F9;
}

.meta-cell-label {
    font-size: 0.72rem;
    color: #94A3B8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.meta-cell-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* 금액 셀 전체 너비 강조 */
.meta-cell.meta-cell-full {
    grid-column: 1 / -1;
    border-right: none;
    background: #FEF2F2;
    border-radius: 8px;
    margin: 4px 0;
}

.meta-cell.meta-cell-full .meta-cell-value {
    font-size: 1.1rem;
    color: #DC2626;
    font-weight: 800;
}

/* 나라장터 외부 링크 버튼 */
.btn-g2b-link {
    text-decoration: none;
    background: white;
    color: #64748B;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.2s;
    border: 1px solid #E2E8F0;
}

.btn-g2b-link:hover {
    background: #F8FAFC;
    color: var(--text-primary);
    border-color: #CBD5E1;
}

/* 개찰결과 가격비교 바 */
.price-compare {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-muted);
    border-radius: 10px;
    border: 1px solid #E0F2FE;
    margin-top: 8px;
}

.price-compare-item {
    flex: 1;
    text-align: center;
}

.price-compare-label {
    font-size: 0.7rem;
    color: #64748B;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.price-compare-value {
    font-size: 0.95rem;
    font-weight: 800;
    margin-top: 2px;
}

.price-compare-arrow {
    font-size: 1.2rem;
    color: #94A3B8;
}

/* 공고 footer 개선 */
.notice-footer {
    padding-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #F1F5F9;
}

/* ═══════════════════════════════════════════════════════════
   공고 상세 모달 (사전규격, 발주계획, 개찰결과, 계약 등에서 사용)
   ═══════════════════════════════════════════════════════════ */

.notice-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.25s ease-out;
    transition: opacity 0.25s;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.notice-modal {
    background: white;
    border-radius: 24px;
    max-width: 680px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: modalSlideUp 0.2s ease-out;
    position: relative;
}

.notice-modal::-webkit-scrollbar { width: 6px; }
.notice-modal::-webkit-scrollbar-track { background: transparent; }
.notice-modal::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }

@keyframes modalSlideUp {
    from { transform: translateY(40px) scale(0.97); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.notice-modal-accent {
    height: 3px;
    background: var(--primary-blue);
    border-radius: 24px 24px 0 0;
}

.notice-modal-inner { padding: 28px 32px 32px; }

.notice-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.notice-modal-header > div {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.modal-close-btn {
    background: #F1F5F9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    color: #64748B;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.modal-close-btn:hover {
    background: #E2E8F0;
    color: #1E293B;
    transform: rotate(90deg);
}

.notice-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.45;
    word-break: keep-all;
    margin-bottom: 4px;
}

.notice-modal-body { margin-top: 24px; }

.modal-section { margin-bottom: 28px; }

.modal-section-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-blue-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section-title::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--primary-blue);
    border-radius: 2px;
}

.modal-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.modal-detail-row {
    display: flex;
    gap: 16px;
    padding: 10px 14px;
    border-radius: 8px;
    transition: background 0.15s;
}

.modal-detail-row:nth-child(odd) { background: #F8FAFC; }
.modal-detail-row:hover { background: #F1F5F9; }

.modal-detail-label {
    font-size: 0.8rem;
    color: #64748B;
    font-weight: 600;
    min-width: 140px;
    flex-shrink: 0;
}

.modal-detail-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1E293B;
    word-break: break-all;
}

.notice-modal-footer {
    margin-top: 24px;
    padding: 20px 32px 28px;
    background: #F8FAFC;
    border-top: 1px solid #E2E8F0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-radius: 0 0 24px 24px;
    margin-left: -32px;
    margin-right: -32px;
    margin-bottom: -32px;
}

@media (max-width: 768px) {
    .notice-modal { max-height: 92vh; border-radius: 20px; }
    .notice-modal-inner { padding: 20px; }
    .notice-modal-title { font-size: 1.1rem; }
    .modal-detail-row { flex-direction: column; gap: 3px; padding: 8px 10px; }
    .modal-detail-label { min-width: auto; font-size: 0.72rem; }
    .modal-detail-value { font-size: 0.85rem; }
    .notice-modal-footer {
        flex-direction: column;
        padding: 16px 20px 20px;
        margin-left: -20px;
        margin-right: -20px;
        margin-bottom: -20px;
    }
    .notice-modal-footer .btn-detail,
    .notice-modal-footer .btn-track { text-align: center; justify-content: center; }
}

/* 히어로 통계 4개 대응 */
@media (max-width: 992px) {
    .hero-stats {
        gap: 32px;
    }
}

.stat-item {
    position: relative;
}

.stat-item + .stat-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 992px) {
    .stat-item + .stat-item::before {
        left: -16px;
        height: 30px;
    }
}

@media (max-width: 768px) {
    .stat-item + .stat-item::before {
        display: none;
    }
}

/* ========================================
   랜딩 페이지
   ======================================== */

/* Hero */
.landing-hero {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 80px 0 72px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--primary-blue-light);
    border: 1px solid #D5DEE9;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--primary-blue);
    margin-bottom: 24px;
}

.landing-hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.landing-hero h1 span {
    color: var(--primary-blue);
}

.landing-hero .hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.cta-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 12px;
}

.hero-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.badge-coming-soon {
    display: inline-block;
    padding: 2px 8px;
    background: #FEF3C7;
    color: #92400E;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.btn-cta {
    padding: 13px 28px;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
}

.btn-cta-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-cta-primary:hover {
    background: var(--primary-blue-dark);
}

.btn-cta-ghost {
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.btn-cta-ghost:hover {
    border-color: var(--gray-300);
    color: var(--text-primary);
}

/* Trust Bar */
.trust-bar {
    background: var(--bg-secondary);
    padding: 24px 0;
}

.trust-items {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
}

.trust-item strong {
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.1rem;
}

/* Section common */
.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 480px;
    margin: 0 auto;
}

/* Pain Points */
.pain-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.pain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.pain-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 28px 24px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.pain-emoji {
    font-size: 2.2rem;
    margin-bottom: 14px;
}

.pain-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pain-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.pain-arrow {
    font-size: 0.8rem;
    color: var(--primary-blue);
    font-weight: 700;
    margin-top: 12px;
}

/* Features */
.features-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    margin-bottom: 64px;
}

.feature-row:last-child {
    margin-bottom: 0;
}

.feature-row.reverse {
    direction: rtl;
}

.feature-row.reverse > * {
    direction: ltr;
}

.feature-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 100px;
    margin-bottom: 10px;
}

.feature-badge.pro {
    background: #FEF3C7;
    color: #D97706;
}

.feature-text h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.feature-text p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.feature-checklist {
    list-style: none;
    padding: 0;
}

.feature-checklist li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.feature-checklist li::before {
    content: '\2713';
    color: var(--success);
    font-weight: 800;
    font-size: 0.95rem;
}

.feature-visual {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-xl);
    padding: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    border: 1px solid var(--border-color);
}

.feature-visual .visual-mockup {
    font-size: 3.5rem;
    text-align: center;
}

.visual-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100%;
}

.visual-stat-box {
    background: var(--bg-primary);
    border-radius: var(--border-radius-md);
    padding: 18px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.visual-stat-box .vs-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-blue);
}

.visual-stat-box .vs-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* How it works */
.how-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.how-step {
    text-align: center;
}

.how-step-num {
    width: 44px;
    height: 44px;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    margin: 0 auto 14px;
}

.how-step h4 {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.how-step p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Pricing CTA */
.pricing-cta {
    padding: 80px 0;
    background: var(--bg-primary);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.pricing-cta h2 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.pricing-cta > .container > p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 920px;
    margin: 0 auto 36px;
}

.price-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 28px 24px;
    text-align: left;
    position: relative;
}

.price-card.popular {
    border-color: var(--primary-blue);
}

.price-card.popular::before {
    content: 'BEST';
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--primary-blue);
    color: white;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 100px;
}

.plan-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.plan-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.plan-price small {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
}

.plan-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
    line-height: 1.5;
}

.price-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.price-features li {
    font-size: 0.82rem;
    color: var(--text-primary);
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-features li::before {
    content: '\2713';
    color: var(--success);
    font-weight: 700;
}

.price-features li.disabled {
    color: var(--text-muted);
}

.price-features li.disabled::before {
    content: '\2715';
    color: var(--text-muted);
}

.btn-price {
    display: block;
    text-align: center;
    padding: 11px;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    margin-top: 18px;
    transition: background 0.15s, border-color 0.15s;
}

.btn-price-ghost {
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: transparent;
}

.btn-price-ghost:hover {
    border-color: var(--gray-300);
    color: var(--text-primary);
}

.btn-price-primary {
    background: var(--primary-blue);
    color: white;
    border: 1px solid var(--primary-blue);
}

.btn-price-primary:hover {
    background: var(--primary-blue-dark);
    border-color: var(--primary-blue-dark);
}

.pricing-footer {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.pricing-footer a {
    color: var(--primary-blue);
    text-decoration: none;
}

/* Quick Links */
.quick-links {
    padding: 40px 0;
    background: var(--bg-secondary);
}

.links-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.q-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    transition: border-color 0.15s;
}

.q-link:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

/* Landing Responsive - Tablet */
@media (max-width: 992px) {
    .landing-hero {
        padding: 64px 0 56px;
    }

    .landing-hero h1 {
        font-size: 2.6rem;
    }

    .feature-row {
        gap: 40px;
    }

    .how-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
}

/* Landing Responsive - Mobile */
@media (max-width: 768px) {
    .landing-hero {
        padding: 48px 0 44px;
    }

    .landing-hero h1 {
        font-size: 2rem;
        letter-spacing: -1px;
        line-height: 1.25;
    }

    .landing-hero .hero-desc {
        font-size: 0.95rem;
        margin-bottom: 28px;
    }

    .hero-eyebrow {
        font-size: 0.78rem;
        padding: 5px 12px;
        margin-bottom: 18px;
    }

    .cta-group {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .btn-cta {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        padding: 12px 24px;
        font-size: 0.88rem;
    }

    .trust-items {
        gap: 20px;
    }

    .pain-section {
        padding: 56px 0;
    }

    .pain-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .features-section {
        padding: 56px 0;
    }

    .feature-row {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .feature-row.reverse {
        direction: ltr;
    }

    .feature-visual {
        min-height: 180px;
        padding: 24px;
    }

    .feature-text h3 {
        font-size: 1.2rem;
    }

    .how-section {
        padding: 56px 0;
    }

    .how-steps {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .pricing-cta {
        padding: 56px 0;
    }

    .pricing-cta h2 {
        font-size: 1.5rem;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
        max-width: 360px;
        gap: 12px;
    }

    .quick-links {
        padding: 28px 0;
    }

    .q-link {
        font-size: 0.82rem;
        padding: 8px 14px;
    }

    .section-header {
        margin-bottom: 36px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }
}

/* Landing Responsive - Small Phone */
@media (max-width: 380px) {
    .landing-hero {
        padding: 36px 0;
    }

    .landing-hero h1 {
        font-size: 1.65rem;
    }

    .how-steps {
        grid-template-columns: 1fr;
    }

    .links-row {
        flex-direction: column;
        align-items: stretch;
    }

    .q-link {
        justify-content: center;
    }
}

/* ========== 나의 대시보드 ========== */
.my-dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    margin-top: 24px;
    padding-bottom: 40px;
}

/* 사이드바 */
.my-sidebar {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 80px;
    box-shadow: var(--shadow-sm);
}

.my-sidebar-header {
    margin-bottom: 16px;
}

.my-sidebar-header h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.my-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.my-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.my-sidebar-item:hover {
    background: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--text-primary);
}

.my-sidebar-item.active {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    font-weight: 600;
    border-color: #D5DEE9;
}

.my-sidebar-item svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.my-sidebar-item.active svg {
    opacity: 1;
    stroke: var(--primary-blue);
}

.sidebar-badge {
    margin-left: auto;
    background: var(--primary-blue);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 메인 콘텐츠 */
.my-content {
    min-width: 0;
}

.my-section {
    margin-bottom: 24px;
}

.my-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.my-section-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.my-section-link {
    font-size: 0.85rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.my-section-link:hover {
    text-decoration: underline;
}

/* 최근 추적 목록 */
.my-recent-list {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.my-tracking-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s;
}

.my-tracking-item:last-child {
    border-bottom: none;
}

.my-tracking-item:hover {
    background: var(--gray-50, #F9FAFB);
}

.my-tracking-stage {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 80px;
}

.stage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-400);
}

.stage-dot.stage-notice { background: var(--primary-blue); }
.stage-dot.stage-pre_notice { background: #f59e0b; }
.stage-dot.stage-plan { background: #8b5cf6; }
.stage-dot.stage-bid_result { background: #10b981; }
.stage-dot.stage-contract { background: #ef4444; }

.stage-text {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.my-tracking-info {
    flex: 1;
    min-width: 0;
}

.my-tracking-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-tracking-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.my-tracking-link {
    font-size: 0.8rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    transition: all 0.15s;
}

.my-tracking-link:hover {
    background: var(--primary-blue-light);
    border-color: var(--primary-blue);
}

/* 차트 그리드 */
.my-chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.my-chart-card {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--gray-200);
}

.my-chart-card h4 {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.my-chart-wrap {
    height: 200px;
    position: relative;
}

.my-chart-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-size: 0.85rem;
}

/* 알림 확인율 */
.my-notification-rate {
    background: var(--bg-primary);
    padding: 16px 20px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 12px;
}

.my-noti-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.my-noti-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
}

/* 빈 상태 */
.my-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.my-empty-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.my-empty-link:hover {
    text-decoration: underline;
}

.my-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 대시보드 반응형 */
@media (max-width: 992px) {
    .my-dashboard-layout {
        grid-template-columns: 1fr;
    }

    .my-sidebar {
        position: static;
        order: -1;
    }

    .my-sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 4px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .my-sidebar-item {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .my-sidebar-item svg {
        display: none;
    }
}

@media (max-width: 768px) {
    .my-chart-grid {
        grid-template-columns: 1fr;
    }

    .my-tracking-stage {
        min-width: auto;
    }
}


/* ===== 통합 검색 페이지 ===== */

.search-section-unified {
    margin-top: 24px;
}

.search-section-unified .search-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 28px 32px;
    box-shadow: var(--shadow-md);
    border: none;
}

.search-section-unified #search-input {
    padding: 15px 20px;
    font-size: 1.05rem;
    border-radius: var(--border-radius-md);
}

.search-section-unified .btn-search {
    padding: 15px 32px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--border-radius-md);
    white-space: nowrap;
}

/* 탭 카운트 뱃지 */
.search-tabs {
    margin-top: 8px;
    padding: 4px 0 10px;
    gap: 2px;
    border-bottom: 2px solid var(--gray-100);
}

.search-tabs .tab-item {
    padding: 12px 18px;
    font-size: 0.88rem;
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    transition: color 0.15s, background 0.15s;
}

.search-tabs .tab-item:hover {
    background: var(--gray-50, #F9FAFB);
}

.tab-count {
    display: inline-block;
    background: var(--gray-100);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 5px;
    vertical-align: middle;
    min-width: 20px;
    text-align: center;
}

.tab-item.active .tab-count {
    background: var(--primary-blue);
    color: #fff;
}

/* 소스 타입 뱃지 */
.source-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.source-notice { background: #EBF5FF; color: #1D4ED8; }
.source-pre-notice { background: #FEF3C7; color: #92400E; }
.source-plan { background: #DCFCE7; color: #166534; }
.source-bid-result { background: #FEE2E2; color: #B91C1C; }
.source-contract { background: #F3E8FF; color: #6B21A8; }

/* 통계 바 */
.search-stats-bar {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 4px;
}

.search-stats-bar strong {
    color: var(--text-primary);
}

/* 결과 카드 컨테이너 */
.search-results-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
}

/* 결과 카드 */
.search-result-card {
    display: block;
    background: #fff;
    border: 1px solid var(--gray-200, #E5E7EB);
    border-radius: var(--border-radius-lg, 12px);
    padding: 20px 24px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    text-decoration: none;
    color: inherit;
}

.search-result-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.08);
    transform: translateY(-1px);
}

.search-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.search-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-card-title mark {
    background: #FEF08A;
    color: inherit;
    padding: 1px 3px;
    border-radius: 3px;
}

.search-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.search-card-org {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.search-card-region {
    font-size: 0.72rem;
    color: var(--text-muted);
    background: var(--gray-100, #F1F5F9);
    padding: 3px 8px;
    border-radius: 4px;
}

.search-card-extra {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.search-card-extra::before {
    content: "·";
    margin-right: 8px;
    color: var(--gray-300);
}

.search-card-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.82rem;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100, #F3F4F6);
    margin-top: 2px;
}

.search-card-price {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 0.88rem;
}

.search-card-date {
    color: var(--text-muted);
    margin-left: auto;
}

/* 초기 상태 */
.search-initial-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.search-initial-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    opacity: 0.35;
}

.search-initial-state h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.search-initial-state p {
    margin: 0 0 28px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.search-shortcuts {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-shortcut-chip {
    padding: 10px 20px;
    border-radius: 24px;
    border: 1px solid var(--gray-200, #E5E7EB);
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.search-shortcut-chip:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: #F0F7FF;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.08);
}

/* 반응형 */
@media (max-width: 768px) {
    .search-section-unified .search-card {
        padding: 20px 16px;
        box-shadow: var(--shadow-sm);
    }

    .search-section-unified #search-input {
        padding: 13px 16px;
        font-size: 0.95rem;
    }

    .search-tabs .tab-item {
        padding: 10px 14px;
        font-size: 0.82rem;
    }

    .search-result-card {
        padding: 16px;
        border-radius: var(--border-radius-md, 10px);
    }

    .search-card-footer {
        flex-wrap: wrap;
        gap: 10px;
        padding-top: 10px;
    }

    .search-card-date {
        margin-left: 0;
    }

    .search-initial-state {
        padding: 56px 16px;
    }

    .search-card-title {
        font-size: 0.9rem;
    }

    .search-shortcuts {
        gap: 8px;
    }

    .search-shortcut-chip {
        padding: 8px 16px;
        font-size: 0.82rem;
    }
}
/* ── 발주기관 페이지 ──
   기관 단위 집계는 나라장터에 없는 내용이라 색인 가치가 있다.
   표는 공고 목록과 같은 .pub-table 을 그대로 쓰고, 여기선 설명 블록만 잡는다. */
.org-summary,
.org-block {
    margin-top: 32px;
}

.org-summary h2,
.org-block h2 {
    font-size: 1.15rem;
    color: var(--text-primary, #0F172A);
    margin: 0 0 12px;
}

.org-summary p {
    margin: 0 0 10px;
    color: var(--text-secondary, #475569);
    font-size: 0.95rem;
    line-height: 1.8;
}

.org-summary strong {
    color: var(--text-primary, #0F172A);
}

.org-more {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.org-more .btn-sm {
    padding: 9px 16px;
    font-size: 0.85rem;
}

.org-note {
    font-size: 0.82rem;
    color: var(--text-tertiary, #94A3B8);
    border-left: 2px solid var(--border-color, #E2E8F0);
    padding-left: 10px;
}

/* ── 공고 상세: 과거 개찰 기록 ──
   이 페이지는 검색 3~9위에 떠도 클릭이 거의 없었다. 나라장터 원문과 같은
   내용뿐이어서다. 여기서만 볼 수 있는 한 문장을 가장 크게 둔다. */
.insight {
    background: #fff;
    border: 1px solid var(--border-color, #E2E8F0);
    border-radius: 14px;
    padding: 26px 28px;
    margin-bottom: 24px;
}

.insight-head { margin-bottom: 22px; }

.insight-headline {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--primary-blue-dark, #1F3A63);
    word-break: keep-all;
}

.insight-sub {
    margin: 8px 0 0;
    font-size: 0.95rem;
    color: var(--text-secondary, #475569);
}

.insight-basis {
    margin: 10px 0 0;
    font-size: 0.82rem;
    color: var(--text-tertiary, #94A3B8);
}

.insight h3 {
    font-size: 1rem;
    color: var(--text-primary, #0F172A);
    margin: 0 0 12px;
}

.insight-guide,
.insight-cats,
.insight-cases,
.insight-winners { margin-top: 26px; }

/* 투찰가 가늠자 — 이 페이지에서 제일 실용적인 숫자다. */
.guide-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guide-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    padding: 13px 16px;
    border-radius: 10px;
    background: var(--bg-secondary, #F4F6F9);
    border: 1px solid transparent;
}

.guide-row-main {
    background: var(--primary-blue-light, #EEF3F8);
    border-color: var(--primary-blue, #2B4C7E);
}

.guide-tag {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary, #475569);
    min-width: 48px;
}

.guide-row-main .guide-tag { color: var(--primary-blue-dark, #1F3A63); }

.guide-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #0F172A);
}

.guide-row-main .guide-amount {
    font-size: 1.3rem;
    color: var(--primary-blue-dark, #1F3A63);
}

.guide-note {
    font-size: 0.8rem;
    color: var(--text-tertiary, #94A3B8);
    margin-left: auto;
}

/* 이 공고가 속한 분야를 표에서 바로 찾을 수 있게 한다. */
.pub-table tr.is-current { background: var(--primary-blue-light, #EEF3F8); }

.winner-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.winner-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-secondary, #F4F6F9);
    border-radius: 8px;
    font-size: 0.9rem;
}

.winner-name { color: var(--text-primary, #0F172A); }
.winner-count { color: var(--text-secondary, #475569); font-weight: 600; }

/* 추정치임을 숨기지 않는다. 숫자만 크게 띄우면 확정값으로 읽힌다. */
.insight-note {
    margin: 12px 0 0;
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--text-tertiary, #94A3B8);
    border-left: 2px solid var(--border-color, #E2E8F0);
    padding-left: 10px;
}

.insight-foot { margin: 24px 0 0; }

.insight-foot a,
.insight-link {
    color: var(--primary-blue, #2B4C7E);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.badge-free {
    background: var(--primary-blue-light, #EEF3F8);
    color: var(--primary-blue-dark, #1F3A63);
    padding: 3px 9px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-right: 6px;
}

@media (max-width: 640px) {
    .insight { padding: 20px 18px; }
    .insight-headline { font-size: 1.12rem; }
    .guide-note { margin-left: 0; width: 100%; }
}

/* 검색 일부 실패 표시. 조용히 0건으로 넘기면 '결과 없음' 과 구분이 안 된다. */
.search-partial {
    margin-left: 8px;
    font-size: 0.8rem;
    color: var(--warning-color, #B45309);
}

/* 두 글자 검색은 최근 구간만 본다는 안내. 숨기면 '왜 안 나오지' 가 된다. */
.search-hint {
    margin-left: 8px;
    font-size: 0.8rem;
    color: var(--text-tertiary, #94A3B8);
}

/* ===== 개찰결과: 오늘의 개찰 요약 ===== */
.daily-open {
    /* 히어로와 붙어 보이지 않게 — .search-section 과 같은 간격 */
    margin: 32px 0 20px;
    padding: 20px 22px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-light, #E2E8F0);
    border-radius: 14px;
}
.daily-open-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.daily-open-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #1E293B);
    margin: 0;
}
.daily-open-title strong { color: var(--primary-blue, #0066CC); }
.daily-open-sub {
    font-size: 0.85rem;
    color: var(--text-secondary, #64748B);
}
.daily-open-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}
.daily-card {
    display: block;
    padding: 14px 16px;
    background: var(--bg-section, #F8FAFC);
    border: 1px solid var(--border-light, #E2E8F0);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}
.daily-card:hover {
    border-color: var(--primary-blue, #0066CC);
    background: #F0F7FF;
}
.daily-card-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-blue, #0066CC);
    margin-bottom: 6px;
}
.daily-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #1E293B);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.daily-card-meta {
    font-size: 0.8rem;
    color: var(--text-secondary, #64748B);
}
.daily-card-meta strong { color: var(--text-primary, #1E293B); }

/* 낙찰업체 → 수주 이력 링크 */
.company-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed var(--border-medium, #CBD5E1);
}
.company-link:hover {
    color: var(--primary-blue, #0066CC);
    border-bottom-color: var(--primary-blue, #0066CC);
}

/* 단독입찰 배지 */
.badge-solo {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #B45309;
    background: #FEF3C7;
    white-space: nowrap;
}

.btn-detail.btn-detail-light {
    background: #F1F5F9;
    color: var(--text-primary, #334155);
}
.btn-detail.btn-detail-light:hover {
    background: var(--primary-blue, #0066CC);
    color: #fff;
}

/* 검색 카드의 보조(초기화) 버튼 */
.btn-search.btn-search-sub {
    background: #F1F5F9;
    color: var(--text-secondary, #64748B);
}
.btn-search.btn-search-sub:hover {
    background: #E2E8F0;
    color: var(--text-primary, #334155);
}

/* ===== 예상 경쟁 전망 배지 (공고 목록) ===== */
.comp-badge {
    display: inline-block;
    margin-left: 7px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: 1px;
}
.comp-low  { background: #ECFDF5; color: #047857; }
.comp-mid  { background: #F1F5F9; color: #64748B; }
.comp-high { background: #FFF1F2; color: #BE123C; }
.comp-solo { background: #FEF3C7; color: #92400E; }
@media (max-width: 768px) {
    .comp-badge { margin-left: 0; margin-top: 3px; display: inline-block; }
    .pub-table .td-org { display: flex; flex-wrap: wrap; gap: 4px 7px; align-items: center; }
}

.footer-logo-icon {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    vertical-align: -4px;
    margin-right: 2px;
}
