/* 정부 지원사업 모니터링 - Custom CSS */

/* 네비게이션 */
.navbar-brand {
    font-size: 1.1rem;
}
.nav-link.active {
    background-color: rgba(255,255,255,0.15);
    border-radius: 6px;
}

/* 카드 */
.card {
    border: none;
    border-radius: 10px;
}
.card-header {
    border-bottom: 1px solid #eee;
    border-radius: 10px 10px 0 0 !important;
}

/* 테이블 */
.table th {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}
.table td {
    font-size: 0.9rem;
    vertical-align: middle;
}
.table-hover tbody tr:hover {
    background-color: #f0f7ff;
}

/* 탭 */
.nav-tabs .nav-link {
    border: none;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 20px;
    transition: all 0.2s;
}
.nav-tabs .nav-link:hover {
    color: #0d6efd;
    background-color: #f8f9fa;
}
.nav-tabs .nav-link.active {
    color: #0d6efd;
    border-bottom: 3px solid #0d6efd;
    background-color: transparent;
}

/* NEW 뱃지 */
.badge-new {
    animation: pulse 2s infinite;
    font-size: 0.7rem;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 접수상태 뱃지 */
.status-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}
.status-open {
    background-color: #d4edda;
    color: #155724;
}
.status-closed {
    background-color: #f8d7da;
    color: #721c24;
}
.status-upcoming {
    background-color: #cce5ff;
    color: #004085;
}
.status-unknown {
    background-color: #e2e3e5;
    color: #383d41;
}

/* 개요 텍스트 */
.summary-text {
    font-size: 0.82rem;
    color: #555;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.summary-text:hover {
    max-height: none;
    -webkit-line-clamp: unset;
}

/* D-day 표시 */
.d-day {
    font-size: 0.75rem;
    font-weight: 700;
}
.d-day-urgent {
    color: #dc3545;
}
.d-day-ok {
    color: #28a745;
}
.d-day-passed {
    color: #999;
    text-decoration: line-through;
}

/* 바로가기 버튼 */
.btn-link-go {
    color: #0d6efd;
    font-size: 1.1rem;
    transition: transform 0.2s;
}
.btn-link-go:hover {
    transform: scale(1.2);
    color: #0a58ca;
}

/* 스크롤바 */
.table-responsive::-webkit-scrollbar {
    height: 6px;
}
.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

/* 정렬 가능한 컬럼 */
.sortable {
    cursor: pointer;
    user-select: none;
}
.sortable:hover {
    color: #0d6efd !important;
}
.sort-icon {
    font-size: 0.7rem;
    vertical-align: middle;
    transition: color 0.2s;
}

/* 크롤링 상태 패널 */
.crawl-source-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.crawl-source-card {
    padding: 6px 12px;
    border-radius: 6px;
    border-left: 3px solid #dee2e6;
    background: #f8f9fa;
    transition: all 0.3s;
}
.crawl-source-card.crawl-waiting {
    border-left-color: #adb5bd;
    background: #f8f9fa;
}
.crawl-source-card.crawl-active {
    border-left-color: #0d6efd;
    background: #e7f1ff;
}
.crawl-source-card.crawl-done {
    border-left-color: #28a745;
    background: #eafaef;
}
.crawl-source-card.crawl-error {
    border-left-color: #dc3545;
    background: #fdf0f0;
}

/* 토글 스위치 */
.form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

/* 북마크 별 */
.bookmark-star {
    transition: all 0.2s;
}
.bookmark-star:hover {
    transform: scale(1.3);
    color: #ffc107 !important;
}

/* Dashboard - 주요 공고 아이템 */
.dash-imp-item {
    transition: background-color 0.2s;
    border-left: 3px solid transparent;
}
.dash-imp-item:hover {
    border-left-color: #ffc107;
    background-color: #fffcf0 !important;
}

/* Dashboard - 기관별 카드 */
.dash-source-card {
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #eee;
}
.dash-source-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13,110,253,0.1);
    transform: translateY(-1px);
}

/* 파일 아이템 */
.file-item {
    transition: background-color 0.2s;
}
.file-item:hover {
    background-color: #f8f9fa;
}

/* 알람 모달 pulse 애니메이션 */
.alarm-icon-pulse {
    animation: alarm-pulse 1s ease-in-out infinite;
}
@keyframes alarm-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* 제출상태 */
.submission-pending { color: #6c757d; }
.submission-submitted { color: #28a745; }
.submission-cancelled { color: #ffc107; }

/* 반응형 */
@media (max-width: 768px) {
    .navbar-brand span {
        font-size: 0.9rem;
    }
    .card-header h5 {
        font-size: 1rem;
    }
}
