/* NGENI Admin - Custom Styles */

/* Sidebar brand */
.brand-link {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    padding: 0.8rem 0.5rem;
}

/* NGENI brand image (overrides AdminLTE's default 0.8 opacity / 33px height) */
.ngeni-brand-image {
    width: auto;
    height: 34px;
    max-height: 34px;
    margin-right: 0.5rem;
    opacity: 1;
}

/* Login page logo */
.login-logo {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 100px;
    margin: 0 auto;
}

.login-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748B;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Info box */
.small-box h3 {
    font-size: 2.2rem;
    font-weight: 700;
}

/* Status badges */
.badge.bg-orange {
    background-color: #fd7e14 !important;
}

/* Dependency graph container */
#dependency-graph {
    width: 100%;
    height: 600px;
    border: 1px solid #dee2e6;
    background-color: #fafbfc;
    border-radius: 4px;
}

/* DataTable row hover */
.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
}

/* Card header */
.card-header .card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Content wrapper min height */
.content-wrapper {
    min-height: calc(100vh - 57px - 56px);
}

/* Status badge colors for Thymeleaf-rendered badges */
.badge-status-SUCCESS { background-color: #28a745; color: #fff; }
.badge-status-FAILED { background-color: #dc3545; color: #fff; }
.badge-status-RUNNING { background-color: #ffc107; color: #212529; }
.badge-status-TIMEOUT { background-color: #fd7e14; color: #fff; }
.badge-status-RETRY { background-color: #17a2b8; color: #fff; }
.badge-status-READY { background-color: #007bff; color: #fff; }
.badge-status-WAITING { background-color: #6c757d; color: #fff; }
.badge-status-SKIPPED { background-color: #6c757d; color: #fff; }
.badge-status-PENDING { background-color: #e9ecef; color: #212529; }
.badge-status-MISSING { background-color: #9c202d; color: #fff; }

/* JSON parameter textarea */
.json-editor {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Responsive graph */
@media (max-width: 768px) {
    #dependency-graph {
        height: 400px;
    }
}

/* ===== Execution Timeline ===== */
#execution-timeline {
    width: 100%;
    height: 600px;
    border: 1px solid #dee2e6;
    background-color: #fafbfc;
    border-radius: 4px;
}

.vis-item.timeline-status-SUCCESS { background-color: #28a745; border-color: #1e7e34; }
.vis-item.timeline-status-SUCCESS .vis-item-content { color: #fff; }

.vis-item.timeline-status-FAILED { background-color: #dc3545; border-color: #bd2130; }
.vis-item.timeline-status-FAILED .vis-item-content { color: #fff; }

.vis-item.timeline-status-RUNNING { background-color: #ffc107; border-color: #d39e00; }
.vis-item.timeline-status-RUNNING .vis-item-content { color: #212529; }

.vis-item.timeline-status-TIMEOUT { background-color: #fd7e14; border-color: #e06d10; }
.vis-item.timeline-status-TIMEOUT .vis-item-content { color: #fff; }

.vis-item.timeline-status-RETRY { background-color: #17a2b8; border-color: #138496; }
.vis-item.timeline-status-RETRY .vis-item-content { color: #fff; }

.vis-item.timeline-status-READY { background-color: #007bff; border-color: #0069d9; }
.vis-item.timeline-status-READY .vis-item-content { color: #fff; }

.vis-item.timeline-status-WAITING { background-color: #6c757d; border-color: #5a6268; }
.vis-item.timeline-status-WAITING .vis-item-content { color: #fff; }

.vis-item.timeline-status-SKIPPED { background-color: #6c757d; border-color: #5a6268; }
.vis-item.timeline-status-SKIPPED .vis-item-content { color: #fff; }

.vis-item.timeline-status-PENDING { background-color: #e9ecef; border-color: #ced4da; }
.vis-item.timeline-status-PENDING .vis-item-content { color: #212529; }

.timeline-tooltip {
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 4px;
}

@media (max-width: 768px) {
    #execution-timeline {
        height: 400px;
    }
}


/* ===== 알림 수신자 카드 (jobs/detail.html 및 공통 뱃지) ===== */

/* 채널 타입 배지 */
.badge-type-EMAIL   { background-color: #17a2b8; color: #fff; font-size: 0.75rem; }
.badge-type-SLACK   { background-color: #4a154b; color: #fff; font-size: 0.75rem; }
.badge-type-WEBHOOK { background-color: #6c757d; color: #fff; font-size: 0.75rem; }
.badge-type-GITLAB  { background-color: #fc6d26; color: #fff; font-size: 0.75rem; }

/* 이벤트 인디케이터 (S/F/R/T 원형 배지) */
.badge-event {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    font-size: 10px; font-weight: 700; color: #fff;
}
.badge-event + .badge-event { margin-left: 2px; }
.badge-event-S   { background-color: #28a745; }
.badge-event-F   { background-color: #dc3545; }
.badge-event-R   { background-color: #ffc107; color: #212529; }
.badge-event-T   { background-color: #6f42c1; }
.badge-event-off { background-color: #dee2e6; color: #adb5bd; }

/* 수신자 목록 행 */
.noti-item { transition: background .12s ease; }
.noti-item:hover { background: #f8fffe; }

/* 수신 대상 텍스트 (monospace: EMAIL/WEBHOOK, plain: SLACK/GITLAB) */
.noti-target {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    font-size: 0.85rem; color: #e83e8c; font-weight: 600;
    word-break: break-all;
}
.noti-target-plain { font-size: 0.85rem; font-weight: 600; color: #212529; word-break: break-all; }

/* 채널 카운트 레이블 (알림 카드 헤더 "· N명") */
.noti-count-label { font-size: 0.85rem; font-weight: 400; }

/* 채널 요약 바 */
.noti-summary-bar {
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.83rem;
    background: #fafafa;
}

/* 채널 타입 요약 점 색상 */
.noti-dot-EMAIL   { background: #17a2b8; }
.noti-dot-SLACK   { background: #4a154b; }
.noti-dot-WEBHOOK { background: #6c757d; }
.noti-dot-GITLAB  { background: #fc6d26; }

/* 수신자 목록 행 내부 영역 */
.noti-item-header  { gap: 6px; margin-bottom: 4px; }
.noti-event-badges { gap: 4px; }
.noti-actions      { gap: 8px; flex-shrink: 0; }

/* 빈 상태 제목 */
.noti-empty-title { font-size: 0.95rem; font-weight: 500; }

/* 카드 하단 안내 */
.noti-card-footer { font-size: 0.78rem; color: #868e96; background: #fafafa; }

/* 채널 타입 원형 아이콘 */
.noti-type-icon {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: #fff; flex-shrink: 0;
}
.noti-icon-EMAIL   { background: #17a2b8; }
.noti-icon-SLACK   { background: #4a154b; }
.noti-icon-WEBHOOK { background: #6c757d; }
.noti-icon-GITLAB  { background: #fc6d26; }

/* 채널 요약 바 점 */
.noti-summary-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* 빈 상태 */
.noti-empty-state {
    padding: 48px 24px;
    text-align: center;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    margin: 16px;
    background: #fafafa;
}

/* 활성 토글 스위치 (녹색) */
.custom-switch-sm .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #28a745;
    border-color: #28a745;
}


/* ===== 알림 이력 검색 폼 (notifications/history.html) ===== */

/* 입력/버튼 높이 통일 (form-control-sm 기준) */
.noti-history-search .form-control-sm,
.noti-history-search .btn-group-sm > .btn,
.noti-history-search .btn-sm {
    height: calc(1.5em + 0.5rem + 2px);
}

/* 빠른 선택 버튼 - 선택 상태 강조 */
.noti-history-search .btn-quick-range.active {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15);
}