/* ════════════════════════════════════════════════════════════
   Suntech USA — JIRA Dashboard CSS
   색상 체계: 이메일 브리핑 디자인 기반
   ════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic",
                 "Apple SD Gothic Neo", sans-serif;
    font-size: 13px;
    background: #eef0f3;
    color: #2c3e50;
    height: 100vh;
    overflow: hidden;
}

a {
    color: #2980b9;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── 레이아웃 ─────────────────────────────────────────────── */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── 사이드바 ─────────────────────────────────────────────── */
.sidebar {
    width: 220px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-header h1 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.sidebar-subtitle {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    margin-top: 3px;
}

.sidebar-nav {
    list-style: none;
    padding: 12px 0;
    flex: 1;
}

.sidebar-nav li a {
    display: block;
    padding: 11px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover {
    background: rgba(255,255,255,0.07);
    color: #ffffff;
    text-decoration: none;
}

.sidebar-nav li.active a {
    background: rgba(41, 128, 185, 0.25);
    color: #5dade2;
    border-left-color: #5dade2;
    font-weight: 600;
}

.sidebar-nav li.sidebar-section {
    padding: 18px 20px 6px;
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 10px;
    cursor: default;
}

.sidebar-nav li.sidebar-sub a {
    padding-left: 32px;
    font-size: 12.5px;
}

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    min-height: 60px;
}

.lang-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}
.lang-btn {
    flex: 1;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #3e5670;
    border-radius: 4px;
    background: transparent;
    color: #8ab4d4;
    cursor: pointer;
    transition: all 0.15s;
}
.lang-btn:hover {
    background: #1a2332;
    border-color: #5a8ab4;
}
.lang-btn.active {
    background: #2980b9;
    border-color: #2980b9;
    color: #fff;
}

.sync-status {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    line-height: 1.5;
}

.sync-label {
    display: block;
    margin-bottom: 2px;
}

.sync-time {
    display: block;
    color: rgba(255,255,255,0.65);
    font-size: 11px;
}

/* ── 메인 콘텐츠 ──────────────────────────────────────────── */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 32px;
    min-width: 0;
}

/* ── 페이지 헤더 ──────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid #dde1e7;
}

.page-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.header-date {
    font-size: 12px;
    color: #7f8c8d;
    background: #dde1e7;
    padding: 3px 9px;
    border-radius: 10px;
}

.page-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── 플래시 메시지 ────────────────────────────────────────── */
.flash-messages {
    margin-bottom: 14px;
}

.flash {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 6px;
}

.flash-success {
    background: #eafaf1;
    border: 1px solid #27ae60;
    color: #1e8449;
}

.flash-error {
    background: #fdf0f0;
    border: 1px solid #c0392b;
    color: #922b21;
}

/* ── 요약 바 ──────────────────────────────────────────────── */
.summary-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.summary-item {
    background: white;
    border-radius: 10px;
    padding: 14px 18px;
    flex: 1;
    min-width: 100px;
    border-top: 3px solid var(--item-color, #95a5a6);
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    text-align: center;
}

.summary-value {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: var(--item-color, #2c3e50);
    line-height: 1.1;
}

.summary-label {
    display: block;
    font-size: 11px;
    color: #7f8c8d;
    margin-top: 4px;
    white-space: nowrap;
}

/* ── 필터 바 ──────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    gap: 10px;
    flex-wrap: wrap;
}

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

.filter-select {
    padding: 5px 8px;
    border: 1px solid #dde1e7;
    border-radius: 5px;
    font-size: 12px;
    color: #2c3e50;
    background: #f8f9fa;
    cursor: pointer;
    outline: none;
}

.filter-select:focus {
    border-color: #2980b9;
    background: white;
}

.filter-input {
    padding: 5px 10px;
    border: 1px solid #dde1e7;
    border-radius: 5px;
    font-size: 12px;
    color: #2c3e50;
    background: #f8f9fa;
    width: 180px;
    outline: none;
}

.filter-input:focus {
    border-color: #2980b9;
    background: white;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Sync 정보 ────────────────────────────────────────────── */
.sync-info {
    font-size: 11px;
    color: #95a5a6;
    margin-bottom: 12px;
    padding-left: 4px;
}

.issue-count {
    font-size: 13px;
    font-weight: 600;
    color: #2980b9;
    background: #eaf3fb;
    padding: 3px 10px;
    border-radius: 10px;
}

/* ── 버튼 ─────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 5px;
    border: 1px solid #dde1e7;
    background: white;
    color: #2c3e50;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    background: #f0f3f7;
    text-decoration: none;
}

.btn-primary {
    background: #2980b9;
    color: white;
    border-color: #2471a3;
}

.btn-primary:hover {
    background: #2471a3;
    color: white;
}

.btn-secondary {
    background: #7f8c8d;
    color: white;
    border-color: #717d7e;
}

.btn-secondary:hover {
    background: #717d7e;
    color: white;
}
.btn-danger {
    background: #c0392b;
    color: white;
    border-color: #a93226;
}
.btn-danger:hover {
    background: #a93226;
    color: white;
}

.btn-sync {
    background: #1a1a2e;
    color: white;
    border-color: #16213e;
    font-size: 12px;
}

.btn-sync:hover {
    background: #16213e;
    color: white;
}

.btn-sync:disabled {
    background: #7f8c8d;
    border-color: #717d7e;
    cursor: not-allowed;
}

.btn-sm {
    padding: 3px 10px;
    font-size: 11px;
}

/* ── 이슈 카드 ────────────────────────────────────────────── */
.issue-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.issue-card {
    background: white;
    border-radius: 8px;
    border-left: 4px solid #95a5a6;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: box-shadow 0.15s;
}

.issue-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.11);
}

.issue-card.priority-critical {
    border-left-color: #c0392b;
}

.issue-card.priority-major {
    border-left-color: #e67e22;
}

.issue-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px 6px;
    background: #fafbfc;
    border-bottom: 1px solid #eef0f3;
}

.issue-key {
    font-weight: 700;
    font-size: 13px;
    color: #1a5276;
    letter-spacing: 0.3px;
}

.issue-key:hover {
    color: #2980b9;
    text-decoration: underline;
}

.issue-meta {
    font-size: 11px;
    color: #5d6d7e;
}

.issue-meta.dim {
    color: #95a5a6;
}

.issue-meta.customer {
    color: #5d6d7e;
    font-weight: 500;
}

.model-tag {
    display: inline-block;
    font-size: 10px;
    background: #1a1a2e;
    color: #ecf0f1;
    padding: 2px 7px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}

.issue-comment-count {
    font-size: 11px;
    color: #7f8c8d;
    margin-left: auto;
}

.issue-title {
    padding: 8px 14px 4px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
}

.issue-dates {
    padding: 4px 14px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: #7f8c8d;
    border-bottom: 1px solid #eef0f3;
}

/* ── 경과일 뱃지 ──────────────────────────────────────────── */
.age-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.age-green  { background: #eafaf1; color: #1e8449; }
.age-yellow { background: #fef9e7; color: #b7770d; }
.age-orange { background: #fef0e7; color: #a04000; }
.age-red    { background: #fdf0f0; color: #922b21; }

/* ── 이슈 바디 (요약 + Action 분할) ──────────────────────── */
.issue-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.issue-progress {
    padding: 10px 14px 12px;
    background: #fafbfc;
    border-right: 1px solid #eef0f3;
}

.issue-action {
    padding: 10px 14px 12px;
    background: #eaf4ff;
}

.section-label {
    font-size: 10px;
    font-weight: 700;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.section-content {
    font-size: 12px;
    color: #34495e;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* ── 뱃지 ─────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Priority 뱃지 */
.badge-priority-critical {
    background: #c0392b;
    color: white;
}

.badge-priority-major {
    background: #e67e22;
    color: white;
}

.badge-priority-minor {
    background: #7f8c8d;
    color: white;
}

/* Status 뱃지 */
.badge-status-open {
    background: #eaf3fb;
    color: #2471a3;
    border: 1px solid #aed6f1;
}

.badge-status-in-progress {
    background: #f5eef8;
    color: #7d3c98;
    border: 1px solid #d7bde2;
}

.badge-status-reopened {
    background: #fdf0f0;
    color: #922b21;
    border: 1px solid #f1948a;
}

.badge-status-resolved {
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid #82e0aa;
}

.badge-status-closed {
    background: #f2f3f4;
    color: #616a6b;
    border: 1px solid #aeb6bf;
}

/* 브리핑 타입 뱃지 */
.badge-type-daily {
    background: #2980b9;
    color: white;
}

.badge-type-weekly {
    background: #8e44ad;
    color: white;
}

/* 발송 상태 뱃지 */
.badge-sent {
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid #a9dfbf;
}

.badge-unsent {
    background: #fef9e7;
    color: #b7770d;
    border: 1px solid #f9e79f;
}

/* ── 데이터 테이블 ────────────────────────────────────────── */
.briefing-table-wrap {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th {
    background: #1a1a2e;
    color: #ecf0f1;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #eef0f3;
    vertical-align: middle;
    color: #2c3e50;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: #f8f9fa;
}

.briefing-subject {
    font-size: 12px;
    color: #2c3e50;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── 브리핑 미리보기 ──────────────────────────────────────── */
.briefing-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.briefing-meta strong {
    color: #2c3e50;
}

.briefing-preview {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    overflow: hidden;
}

.briefing-iframe {
    width: 100%;
    height: calc(100vh - 240px);
    border: none;
    display: block;
}

/* ── 설정 패널 ────────────────────────────────────────────── */
.settings-panel {
    max-width: 700px;
}

.settings-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    margin-bottom: 16px;
    overflow: hidden;
}

.settings-section h3 {
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 700;
    color: #ecf0f1;
    background: linear-gradient(90deg, #1a1a2e, #16213e);
    border-bottom: none;
}

.setting-row {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    border-bottom: 1px solid #eef0f3;
    gap: 16px;
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-row label {
    min-width: 140px;
    font-size: 12px;
    font-weight: 600;
    color: #5d6d7e;
}

.setting-value {
    font-size: 12px;
    color: #2c3e50;
    font-family: "Consolas", "Courier New", monospace;
}

.settings-note {
    font-size: 12px;
    color: #e67e22;
    margin-top: 8px;
    padding: 10px 14px;
    background: #fef9e7;
    border-radius: 6px;
    border-left: 3px solid #e67e22;
}

/* ── 설정 폼 입력 요소 ────────────────────────────────────── */
.setting-input {
    width: 100%;
    max-width: 400px;
    padding: 6px 10px;
    border: 1px solid #dde1e7;
    border-radius: 5px;
    font-size: 12px;
    color: #2c3e50;
    background: #f8f9fa;
    outline: none;
    font-family: inherit;
}

.setting-input:focus {
    border-color: #2980b9;
    background: white;
}

.setting-textarea {
    width: 100%;
    max-width: 400px;
    height: 60px;
    padding: 6px 10px;
    border: 1px solid #dde1e7;
    border-radius: 5px;
    font-size: 12px;
    color: #2c3e50;
    background: #f8f9fa;
    outline: none;
    resize: vertical;
    font-family: inherit;
}

.setting-textarea:focus {
    border-color: #2980b9;
    background: white;
}

.setting-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.setting-hint {
    font-size: 11px;
    color: #95a5a6;
    line-height: 1.4;
}

.setting-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 2px;
}

.setting-radio-label {
    font-size: 12px;
    font-weight: normal;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    min-width: auto;
}

.setting-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 2px;
}

.setting-checkbox-group label {
    font-weight: normal;
    min-width: auto;
    font-size: 12px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.settings-actions {
    padding: 12px 18px 14px;
    display: flex;
    gap: 8px;
    border-top: 1px solid #eef0f3;
    margin-top: 4px;
}

/* ── 모델별 현황 테이블 ──────────────────────────────────── */
.model-summary-wrap {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    margin-bottom: 16px;
    overflow: hidden;
}

.model-summary-table td {
    cursor: pointer;
    transition: background 0.12s;
}

.model-summary-row:hover td {
    background: #eaf3fb !important;
}

.model-tag-lg {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 4px;
}

/* ── View Tabs ───────────────────────────────────────────── */
.view-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}
.view-tab {
    padding: 8px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #7f8c8d;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}
.view-tab:hover {
    color: #2c3e50;
}
.view-tab.active {
    color: #2980b9;
    border-bottom-color: #2980b9;
}

/* ── Customer Tag ────────────────────────────────────────── */
.customer-tag {
    display: inline-block;
    font-size: 11px;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}
.customer-tag-lg {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 4px;
}

/* ── Launch Risk ──────────────────────────────────────────── */
.risk-timeline-wrap {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    margin-bottom: 16px;
    overflow: hidden;
}

.risk-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.risk-critical { background: #c0392b; color: white; }
.risk-overdue  { background: #8b0000; color: white; }
.risk-high     { background: #e67e22; color: white; }
.risk-medium   { background: #f39c12; color: #2c3e50; }
.risk-low      { background: #3498db; color: white; }
.risk-clear    { background: #27ae60; color: white; }

.risk-row { cursor: pointer; transition: background 0.12s; }
.risk-row:hover td { background: #f0f8ff !important; }

.risk-row-critical td { border-left: 3px solid #c0392b; }
.risk-row-overdue td  { border-left: 3px solid #8b0000; }
.risk-row-high td     { border-left: 3px solid #e67e22; }
.risk-row-medium td   { border-left: 3px solid #f39c12; }

.risk-detail-row td { background: #f8f9fa; }

.risk-detail-issues {
    padding: 8px 12px;
}

/* ── Launch Type 섹션 ─────────────────────────────────────── */
.launch-type-section {
    margin-bottom: 20px;
}

.launch-type-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: linear-gradient(90deg, #1a1a2e, #16213e);
    border-radius: 8px 8px 0 0;
}

.launch-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.3px;
}

.lt-new-model       { background: #8e44ad; }
.lt-bug-fix          { background: #c0392b; }
.lt-add-function     { background: #2980b9; }
.lt-certification    { background: #27ae60; }
.lt-sync-fw-features { background: #e67e22; }
.lt-odm              { background: #16a085; }
.lt-기타             { background: #7f8c8d; }

/* ── 인증 칩 ─────────────────────────────────────────────── */
.cert-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    margin: 1px;
    letter-spacing: 0.3px;
}
.cert-chip::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Sync Banner ─────────────────────────────────────────── */
.sync-banner {
    background: #ebf5fb;
    border: 1px solid #85c1e9;
    border-radius: 6px;
    padding: 8px 16px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #2471a3;
    text-align: center;
    animation: pulse-banner 1.5s ease-in-out infinite;
}
@keyframes pulse-banner {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.cert-done     { background: #d5f5e3; color: #145a32; border: 1px solid #27ae60; }
.cert-done::before     { background: #27ae60; }
.cert-progress { background: #d4effc; color: #1a5276; border: 1px solid #2e86c1; }
.cert-progress::before { background: #2e86c1; }
.cert-pending  { background: #fdebd0; color: #7e5109; border: 1px solid #e67e22; }
.cert-pending::before  { background: #e67e22; }
.cert-fail     { background: #fadbd8; color: #78281f; border: 1px solid #cb4335; }
.cert-fail::before     { background: #cb4335; }
.cert-na       { background: #eaecee; color: #626567; border: 1px solid #95a5a6; }
.cert-na::before       { background: #95a5a6; }

.cert-detail-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cert-detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}
.cert-detail-val {
    color: #5d6d7e;
    font-size: 11px;
}
.cert-detail-date {
    color: #7f8c8d;
    font-size: 10px;
}
.data-info-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px;
    margin-bottom: 8px;
    background: #fdfefe;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-size: 11px;
    color: #5d6d7e;
}
.data-info-bar strong {
    color: #2c3e50;
}

.cert-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}
.cert-legend-title {
    font-size: 11px;
    font-weight: 600;
    color: #5d6d7e;
    margin-right: 4px;
}
.issue-excluded {
    opacity: 0.4;
    text-decoration: line-through;
    background: #f8f8f8 !important;
}
.issue-excluded td {
    text-decoration: line-through;
}
.issue-excluded td:first-child {
    text-decoration: none;
}
.stp-total {
    font-size: 10px;
    color: #95a5a6;
    font-weight: 400;
}
.showstopper-check {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #c0392b;
}
.risk-comments-hint {
    font-size: 10px;
    color: #7f8c8d;
    margin-top: 2px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.delay-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 5px;
    margin-left: 4px;
    border-radius: 3px;
    background: #4a2f1a;
    color: #e67e22;
    border: 1px solid #6e4a2a;
    vertical-align: middle;
    cursor: help;
}

/* ── 상세 패널 ───────────────────────────────────────────── */
.risk-detail-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 100px;
}

.risk-detail-meta {
    padding: 12px 16px;
    background: #fafbfc;
    border-right: 1px solid #eef0f3;
}

.risk-detail-issues {
    padding: 8px 12px;
}

.risk-notes-wrap {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #dde1e6;
}
.risk-notes-hint {
    font-size: 10px;
    color: #95a5a6;
    font-weight: 400;
}
.risk-notes-input {
    width: 100%;
    min-height: 140px;
    max-height: 420px;
    margin-top: 4px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.55;
    border: 1px solid #dde1e6;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    color: #2c3e50;
    background: #fff;
    transition: border-color 0.2s;
}
.risk-notes-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.15);
}
.risk-notes-status {
    font-size: 10px;
    margin-top: 3px;
    height: 14px;
}
.notes-changed { color: #e67e22; }
.notes-saved { color: #27ae60; }
.notes-error { color: #c0392b; }

/* Read-only / admin-locked notes appearance */
.risk-notes-input[readonly],
.issue-notes-input[readonly] {
    background: #f5f6f8;
    color: #6b7480;
    cursor: not-allowed;
    border-style: dashed;
}
.showstopper-check:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* ── 이슈 노트 ─────────────────────────────────────────── */
.issue-notes-wrap {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #eef0f3;
}
.issue-notes-input {
    width: 100%;
    min-width: 180px;
    min-height: 70px;
    max-height: 240px;
    margin-top: 3px;
    padding: 7px 9px;
    font-size: 12px;
    line-height: 1.45;
    border: 1px solid #e0e3e8;
    resize: vertical;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
    color: #2c3e50;
    background: #fafbfc;
    transition: border-color 0.2s;
}
.issue-notes-input:focus {
    outline: none;
    border-color: #3498db;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.1);
}
.issue-notes-status {
    font-size: 10px;
    display: inline-block;
    margin-left: 4px;
}

/* ── 내보내기 모달 ──────────────────────────────────────── */
.export-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.export-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.export-customer-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #eef0f3;
}
.export-check-all,
.export-check-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
}
.export-check-all {
    padding-bottom: 6px;
    border-bottom: 1px solid #dde1e6;
    margin-bottom: 2px;
}
.export-check-item:hover {
    background: #eef0f3;
}

.detail-block {
    margin-bottom: 10px;
}

.detail-label {
    font-size: 11px;
    font-weight: 700;
    color: #5d6d7e;
    margin-bottom: 4px;
}

.detail-content {
    font-size: 12px;
    color: #2c3e50;
    line-height: 1.5;
}

.risk-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    font-size: 11px;
    color: #7f8c8d;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ── 모델 섹션 ───────────────────────────────────────────── */
.model-section {
    margin-bottom: 22px;
}

.model-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(90deg, #1a1a2e, #16213e);
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
}

.model-section-count {
    font-size: 13px;
    font-weight: 700;
    color: #ecf0f1;
}

.model-section-header .badge,
.model-section-header .age-badge {
    font-size: 11px;
}

/* ── 유틸 ─────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
    font-size: 13px;
    background: white;
    border-radius: 8px;
}

.empty-state p {
    line-height: 1.8;
}

/* 테이블 empty row */
td.empty-state {
    padding: 30px;
    background: white;
}

/* ══════════════════════════════════════════════════════════════
   Launch Timeline Page
   ══════════════════════════════════════════════════════════════ */

/* ── Animations ──────────────────────────────────────────── */
@keyframes cardEnter {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes rowEnter {
    from { opacity: 0; transform: translateX(-15px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes barGrow {
    from { width: 0; }
    to   { width: var(--delay-pct, 0); }
}
@keyframes ringFill {
    from { stroke-dasharray: 0 100; }
}
@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
@keyframes msEnter {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes warnPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
@keyframes cellPop {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

.tl-card-enter { animation: cardEnter 0.4s ease-out both; }
.tl-row-enter  { animation: rowEnter 0.3s ease-out both; }
.tl-ms-enter   { animation: msEnter 0.3s ease-out both; }
.cr-card-enter { animation: cardEnter 0.5s ease-out both; }
.cr-cell-enter { animation: cellPop 0.35s ease-out both; }
.cr-detail-enter { animation: cardEnter 0.4s ease-out both; }

.tl-mood-shake  { display: inline-block; animation: shake 0.8s ease-in-out infinite; }
.tl-mood-bounce { display: inline-block; animation: bounce 1s ease-in-out infinite; }
.cr-emoji-pulse { animation: pulse 2s ease-in-out infinite; }
.cr-emoji-bounce { display: inline-block; animation: bounce 1.5s ease-in-out infinite; }
.cr-warn-pulse  { animation: warnPulse 2s ease-in-out infinite; }

/* ── Themed Type Cards ──────────────────────────────────── */
.tl-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.tl-theme-card {
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
}
.tl-theme-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

/* Scene area */
.tl-scene {
    height: 80px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header */
.tl-theme-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 4px;
}
.tl-theme-icon { font-size: 22px; }
.tl-theme-title {
    font-size: 14px;
    font-weight: 700;
    color: #ecf0f1;
}
.tl-theme-sub {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    font-style: italic;
}

/* Stats row */
.tl-theme-stats {
    display: flex;
    justify-content: space-around;
    padding: 8px 10px;
}
.tl-theme-stat { text-align: center; }
.tl-stat-val {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}
.tl-stat-lbl {
    font-size: 9px;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Delay estimate */
.tl-theme-delay {
    padding: 6px 14px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}
.tl-delay-est { display: flex; align-items: center; gap: 6px; }
.tl-est-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.tl-est-ok     { background: rgba(39,174,96,0.2); color: #27ae60; }
.tl-est-warn   { background: rgba(243,156,18,0.2); color: #f39c12; }
.tl-est-danger { background: rgba(230,126,34,0.2); color: #e67e22; }
.tl-est-crit   { background: rgba(192,57,43,0.2); color: #e74c3c; }
.tl-est-pulse  { animation: pulse 2s ease-in-out infinite; }
.tl-src-badge {
    display: inline-block;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: middle;
    cursor: help;
}
.tl-src-history {
    background: rgba(52, 152, 219, 0.25);
    color: #85c1e9;
    border: 1px solid rgba(52, 152, 219, 0.4);
}
.tl-src-family {
    background: rgba(142, 68, 173, 0.25);
    color: #bb8fce;
    border: 1px solid rgba(142, 68, 173, 0.4);
}
.tl-src-global {
    background: rgba(149, 165, 166, 0.2);
    color: #b0bec5;
    border: 1px solid rgba(149, 165, 166, 0.3);
}
.tl-src-fallback {
    background: rgba(127, 140, 141, 0.2);
    color: #95a5a6;
    border: 1px dashed rgba(127, 140, 141, 0.3);
}
.tl-est-max {
    font-size: 9px;
    color: rgba(255,255,255,0.35);
}
.tl-theme-remaining {
    font-size: 11px;
    color: #8ab4d4;
}
.tl-mood {
    font-size: 16px;
    display: inline-block;
}

/* Progress bar */
.tl-theme-progress { padding: 4px 14px 12px; }
.tl-prog-bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
}
.tl-prog-seg {
    transition: width 1.2s ease;
}

/* Inline estimate in table */
.tl-est-inline {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}
.tl-type-mini {
    display: flex;
    align-items: center;
    gap: 3px;
}
.tl-type-emoji { font-size: 14px; }

/* keep old dots for customer page */
.tl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.tl-dot-ok    { background: #27ae60; }
.tl-dot-delay { background: #f39c12; }
.tl-dot-crit  { background: #c0392b; }

/* ══ Character Scene Animations ═══════════════════════════ */

/* --- Sports Car (New Model) --- */
@keyframes carDrive {
    0%   { transform: translateX(-30px); }
    100% { transform: translateX(30px); }
}
@keyframes carTurbo {
    0%   { transform: translateX(-40px) scaleX(1.1); }
    50%  { transform: translateX(0) scaleX(1); }
    100% { transform: translateX(40px) scaleX(1.1); }
}
@keyframes roadDash {
    0%   { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-60px); opacity: 0; }
}
@keyframes flagWave {
    0%, 100% { transform: rotate(-5deg); }
    50%      { transform: rotate(5deg); }
}
@keyframes smokeFloat {
    0%   { opacity: 0.8; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(20px) translateY(-10px); }
}

.sportscar-scene { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.sportscar-body {
    font-size: 36px;
    animation: carDrive 2s ease-in-out infinite alternate;
    filter: drop-shadow(0 4px 8px rgba(224,86,253,0.3));
    z-index: 2;
}
.sportscar-turbo { animation: carTurbo 1.2s ease-in-out infinite alternate; }
.sportscar-slow  { animation: carDrive 4s ease-in-out infinite alternate; filter: grayscale(0.5); }
.sportscar-road {
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
    display: flex;
    gap: 20px;
    justify-content: center;
}
.road-line {
    display: inline-block;
    width: 20px;
    height: 2px;
    background: rgba(255,255,255,0.15);
    animation: roadDash 0.8s linear infinite;
}
.road-line:nth-child(2) { animation-delay: 0.3s; }
.road-line:nth-child(3) { animation-delay: 0.6s; }
.sportscar-flag {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 24px;
    animation: flagWave 1s ease-in-out infinite;
}
.sportscar-smoke {
    position: absolute;
    left: 10px;
    font-size: 14px;
    animation: smokeFloat 1.5s ease-out infinite;
}

/* --- Bug (Bug Fix) --- */
@keyframes bugWalk {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25%      { transform: translateX(8px) rotate(5deg); }
    75%      { transform: translateX(-8px) rotate(-5deg); }
}
@keyframes bugPanic {
    0%, 100% { transform: translateX(0) rotate(0deg) scale(1); }
    25%      { transform: translateX(15px) rotate(15deg) scale(1.1); }
    50%      { transform: translateX(-10px) rotate(-10deg) scale(0.9); }
    75%      { transform: translateX(5px) rotate(5deg) scale(1.05); }
}
@keyframes bugSquish {
    0%   { transform: scaleY(1) scaleX(1); }
    50%  { transform: scaleY(0.3) scaleX(1.5); }
    100% { transform: scaleY(0.3) scaleX(1.5); opacity: 0.5; }
}
@keyframes hammerSmash {
    0%, 70% { transform: rotate(0deg) translateY(0); }
    80%     { transform: rotate(-30deg) translateY(-10px); }
    90%     { transform: rotate(5deg) translateY(2px); }
    100%    { transform: rotate(0deg) translateY(0); }
}
@keyframes swarmFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}

.bug-scene { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; }
.bug-char { font-size: 36px; z-index: 2; }
.bug-walk   { animation: bugWalk 1.5s ease-in-out infinite; }
.bug-panic  { animation: bugPanic 0.8s ease-in-out infinite; }
.bug-squished { animation: bugSquish 1s ease-out forwards; }
.bug-hammer {
    font-size: 24px;
    position: absolute;
    right: 30px;
    top: 8px;
    animation: hammerSmash 2s ease-in-out infinite;
}
.bug-swarm {
    font-size: 16px;
    position: absolute;
    top: 8px;
    right: 15px;
    animation: swarmFloat 1.2s ease-in-out infinite;
    letter-spacing: 4px;
}
.bug-status {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    position: absolute;
    bottom: 8px;
    font-weight: 700;
}

/* --- Ant (Add Function) --- */
@keyframes antMarch {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(12px); }
}
@keyframes antCelebrate {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%      { transform: translateY(-6px) rotate(-5deg); }
    75%      { transform: translateY(-6px) rotate(5deg); }
}

.ant-scene { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 2px; }
.ant-worker { font-size: 28px; z-index: 2; }
.ant-march     { animation: antMarch 1.5s ease-in-out infinite; }
.ant-celebrate { animation: antCelebrate 0.6s ease-in-out infinite; }
.ant-follower  { font-size: 20px; opacity: 0.7; animation: antMarch 1.5s ease-in-out infinite; }
.ant-cargo {
    position: absolute;
    top: 8px;
    right: 20px;
    font-size: 18px;
}

/* --- Doctor (Certification) --- */
@keyframes doctorThink {
    0%, 100% { transform: rotate(0deg); }
    50%      { transform: rotate(-3deg) translateY(-2px); }
}
@keyframes doctorHappy {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.1); }
}
@keyframes doctorWorried {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-3px); }
    75%      { transform: translateX(3px); }
}
@keyframes stampSlam {
    0%   { transform: translateY(-20px) rotate(-10deg); opacity: 0; }
    60%  { transform: translateY(2px) rotate(2deg); opacity: 1; }
    80%  { transform: translateY(-3px) rotate(0deg); }
    100% { transform: translateY(0) rotate(0deg); }
}
@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0); opacity: 0.8; }
    50%      { transform: translateY(-4px); opacity: 1; }
}

.doctor-scene { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; }
.doctor-char { font-size: 36px; z-index: 2; }
.doctor-thinking { animation: doctorThink 2s ease-in-out infinite; }
.doctor-happy   { animation: doctorHappy 1s ease-in-out infinite; }
.doctor-worried { animation: doctorWorried 0.5s ease-in-out infinite; }
.doctor-clipboard {
    font-size: 20px;
    position: absolute;
    left: 20px;
    bottom: 10px;
}
.doctor-stamp {
    font-size: 11px;
    font-weight: 900;
    color: #27ae60;
    position: absolute;
    right: 15px;
    top: 12px;
    padding: 3px 8px;
    border: 2px solid #27ae60;
    border-radius: 4px;
    transform-origin: center;
    animation: stampSlam 1.5s ease-out both;
    background: rgba(39,174,96,0.1);
}
.doctor-stamp-fail {
    color: #e74c3c;
    border-color: #e74c3c;
    background: rgba(231,76,60,0.1);
}
.doctor-bubble {
    font-size: 12px;
    position: absolute;
    right: 15px;
    top: 10px;
    color: rgba(255,255,255,0.6);
    animation: bubbleFloat 2s ease-in-out infinite;
}

/* --- Engineer (Sync FW) --- */
@keyframes gearSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes gearSlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes engineerWork {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}
@keyframes sparkle {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 1; }
}

.engineer-scene { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; }
.engineer-char { font-size: 36px; z-index: 2; }
.engineer-work  { animation: engineerWork 1.5s ease-in-out infinite; }
.engineer-chill { }
.engineer-stress { animation: shake 0.4s ease-in-out infinite; }
.engineer-gear {
    font-size: 28px;
    position: absolute;
    right: 20px;
    top: 10px;
}
.gear-spin { animation: gearSpin 1.5s linear infinite; }
.gear-slow { animation: gearSlow 4s linear infinite; }
.engineer-status {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    position: absolute;
    bottom: 10px;
    right: 15px;
}
.engineer-sparks {
    font-size: 14px;
    position: absolute;
    top: 8px;
    left: 15px;
    animation: sparkle 0.8s ease-in-out infinite;
}

/* --- Bread (기타) --- */
@keyframes breadBounce {
    0%, 100% { transform: rotate(0deg); }
    50%      { transform: rotate(-5deg) translateY(-3px); }
}
@keyframes crumbleFall {
    0%   { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(20px); opacity: 0; }
}

.bread-scene { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.bread-char { font-size: 36px; z-index: 2; }
.bread-happy   { animation: breadBounce 2s ease-in-out infinite; }
.bread-crumble { animation: shake 1s ease-in-out infinite; }
.bread-crumbs {
    position: absolute;
    bottom: 8px;
    display: flex;
    gap: 8px;
}
.crumb {
    font-size: 18px;
    color: rgba(212,160,83,0.6);
    animation: crumbleFall 2s ease-in infinite;
}
.crumb-2 { animation-delay: 0.7s; }
.crumb-3 { animation-delay: 1.4s; }
.bread-status {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    position: absolute;
    bottom: 10px;
}

/* ── Gantt Table ────────────────────────────────────────── */
.tl-gantt-section {
    margin-bottom: 20px;
}
.tl-gantt-container {
    background: white;
    border-radius: 0 0 8px 8px;
    overflow-x: auto;
}
.tl-gantt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.tl-gantt-table thead th {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
}
.tl-gantt-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #ecf0f1;
    vertical-align: middle;
}
.tl-gantt-row:hover td {
    background: #f0f8ff !important;
}

/* ── Delay Bar ──────────────────────────────────────────── */
.tl-delay-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tl-delay-bar {
    height: 10px;
    background: #ecf0f1;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}
.tl-delay-fill {
    height: 100%;
    border-radius: 5px;
    background: var(--delay-color, #27ae60);
    width: var(--delay-pct, 0);
    transition: width 1s ease;
}
.tl-delay-animate .tl-delay-fill {
    animation: barGrow 1.2s ease-out both;
}
.tl-delay-reasons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.tl-reason-chip {
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(231,76,60,0.1);
    color: #e74c3c;
    white-space: nowrap;
}
.tl-reason-ok {
    background: rgba(39,174,96,0.1);
    color: #27ae60;
}

/* ── Score Circle ───────────────────────────────────────── */
.tl-score-circle {
    width: 42px;
    height: 42px;
    margin: 0 auto;
}
.tl-score-svg {
    width: 100%;
    height: 100%;
}
.tl-score-bg {
    fill: none;
    stroke: #ecf0f1;
    stroke-width: 2.5;
}
.tl-score-fill {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease;
}
.tl-score-animate {
    animation: ringFill 1.5s ease-out both;
}
.tl-score-text {
    fill: #2c3e50;
    font-size: 10px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: central;
}

/* ── Milestone Track ────────────────────────────────────── */
.tl-milestone-row td {
    background: #f8f9fa !important;
    padding: 6px 10px !important;
}
.tl-milestone-track {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 4px 0;
    overflow-x: auto;
}
.tl-milestone-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    gap: 2px;
}
.tl-ms-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
}
.tl-ms-past   { background: #95a5a6; }
.tl-ms-soon   { background: #e74c3c; animation: pulse 1.5s infinite; }
.tl-ms-future { background: #27ae60; }
.tl-ms-label {
    font-size: 9px;
    color: #7f8c8d;
    font-weight: 600;
}
.tl-ms-date {
    font-size: 9px;
    color: #2c3e50;
    font-family: monospace;
}
.tl-ms-remain {
    font-size: 9px;
    font-weight: 700;
    color: #e67e22;
}
.tl-ms-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #bdc3c7, #ecf0f1);
    min-width: 20px;
    margin-top: -16px;
}

/* ══════════════════════════════════════════════════════════════
   Customer Risk Page
   ══════════════════════════════════════════════════════════════ */

/* ── Summary Cards ──────────────────────────────────────── */
.cr-summary-row {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.cr-summary-card {
    flex: 1;
    min-width: 140px;
    background: #1e2d3d;
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
    border: 1px solid #2c3e50;
    border-top: 3px solid var(--card-color, #95a5a6);
    transition: transform 0.2s;
}
.cr-summary-card:hover {
    transform: translateY(-3px);
}
.cr-card-emoji {
    font-size: 28px;
    margin-bottom: 4px;
}
.cr-card-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--card-color, #ecf0f1);
    line-height: 1;
}
.cr-card-label {
    font-size: 11px;
    color: #8ab4d4;
    margin-top: 4px;
    font-weight: 600;
}

/* ── Heatmap Grid ───────────────────────────────────────── */
.cr-heatmap-section {
    margin-bottom: 20px;
}
.cr-heatmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    padding: 14px;
    background: white;
    border-radius: 0 0 8px 8px;
}
.cr-heat-cell {
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}
.cr-heat-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.cr-cell-selected {
    outline: 3px solid #3498db;
    outline-offset: 2px;
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(52,152,219,0.35);
}
.cr-heat-critical { background: linear-gradient(135deg, #fdedec, #f5b7b1); border-color: #e74c3c; }
.cr-heat-high     { background: linear-gradient(135deg, #fef5e7, #f8c471); border-color: #e67e22; }
.cr-heat-medium   { background: linear-gradient(135deg, #fef9e7, #f9e79f); border-color: #f39c12; }
.cr-heat-low      { background: linear-gradient(135deg, #eaf2f8, #aed6f1); border-color: #3498db; }
.cr-heat-clear    { background: linear-gradient(135deg, #eafaf1, #a9dfbf); border-color: #27ae60; }

.cr-heat-emoji {
    font-size: 24px;
    margin-bottom: 4px;
}
.cr-heat-name {
    font-size: 12px;
    font-weight: 700;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
}
.cr-heat-score {
    width: 48px;
    height: 48px;
    margin: 0 auto 6px;
}
.cr-ring-svg { width: 100%; height: 100%; }
.cr-ring-bg {
    fill: none;
    stroke: rgba(0,0,0,0.1);
    stroke-width: 3;
}
.cr-ring-fill {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke: var(--card-color, #e74c3c);
}
.cr-heat-critical .cr-ring-fill { stroke: #c0392b; }
.cr-heat-high .cr-ring-fill     { stroke: #e67e22; }
.cr-heat-medium .cr-ring-fill   { stroke: #f39c12; }
.cr-heat-low .cr-ring-fill      { stroke: #3498db; }
.cr-heat-clear .cr-ring-fill    { stroke: #27ae60; }
.cr-ring-animate { animation: ringFill 1.5s ease-out both; }
.cr-ring-text {
    fill: #2c3e50;
    font-size: 10px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: central;
}
.cr-heat-badges {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 4px;
}
.cr-heat-meta {
    font-size: 9px;
    color: #7f8c8d;
}

/* ── Detail Cards ───────────────────────────────────────── */
.cr-detail-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cr-detail-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    animation: cardEnter 0.3s ease-out;
}
.cr-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    color: white;
}
.cr-detail-header.cr-detail-critical { background: linear-gradient(90deg, #c0392b, #e74c3c); }
.cr-detail-header.cr-detail-high     { background: linear-gradient(90deg, #d35400, #e67e22); }
.cr-detail-header.cr-detail-medium   { background: linear-gradient(90deg, #f39c12, #f1c40f); color: #2c3e50; }
.cr-detail-header.cr-detail-low      { background: linear-gradient(90deg, #2980b9, #3498db); }
.cr-detail-header.cr-detail-clear    { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.cr-detail-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cr-detail-emoji { font-size: 20px; }
.cr-detail-name  { font-size: 16px; font-weight: 700; }
.cr-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: inherit;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.cr-close-btn:hover { background: rgba(255,255,255,0.4); }

.cr-detail-body {
    padding: 14px 16px;
}

/* ── Stat Grid ──────────────────────────────────────────── */
.cr-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}
.cr-stat-item {
    text-align: center;
    padding: 8px 4px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid var(--stat-color, #3498db);
}
.cr-stat-num {
    font-size: 20px;
    font-weight: 700;
    color: var(--stat-color, #2c3e50);
}
.cr-stat-lbl {
    font-size: 10px;
    color: #7f8c8d;
}

/* ── Priority Breakdown ─────────────────────────────────── */
.cr-breakdown {
    margin-bottom: 12px;
}
.cr-breakdown-label {
    font-size: 11px;
    color: #7f8c8d;
    margin-bottom: 4px;
    font-weight: 600;
}
.cr-bar-track {
    display: flex;
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    background: #ecf0f1;
}
.cr-bar-seg {
    transition: width 1s ease;
    min-width: 0;
}
.cr-bar-animate {
    animation: barGrow 1s ease-out both;
}
.cr-bar-legend {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 10px;
    color: #7f8c8d;
}
.cr-bar-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cr-models-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding: 8px;
    background: #1e2d3d;
    border-radius: 6px;
}

.cr-launch-warn {
    background: rgba(231,76,60,0.1);
    border: 1px solid #e74c3c;
    color: #c0392b;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.cr-issues-wrap {
    margin-top: 8px;
}

/* ═════════════════════════════════════════════════════════════
   Light-theme override (v2 dashboard tone)
   Reskins sidebar + every dark surface to the cool-light palette
   used by the 3-view heatmap dashboard. Place AT END so it wins
   the cascade against the original dark rules above.
   Tokens:
     bg #f7f8fb · panel #ffffff · panel2 #f1f3f7
     border rgba(15,23,42,0.08) · ink #0f172a
     inkDim #475569 · inkMuted #94a3b8 · accent #2563eb
   ═════════════════════════════════════════════════════════════ */

body {
    background: #f7f8fb;
    color: #0f172a;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%);
    color: #0f172a;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
}

.sidebar-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.sidebar-header h1 {
    color: #0f172a;
}

.sidebar-subtitle {
    color: #94a3b8;
}

.sidebar-nav li a {
    color: #475569;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover {
    background: #f1f3f7;
    color: #0f172a;
}

.sidebar-nav li.active a {
    background: #eff6ff;
    color: #2563eb;
    border-left-color: #2563eb;
    font-weight: 600;
}

.sidebar-nav li.sidebar-section {
    color: #94a3b8;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.sidebar-footer {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.lang-btn {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: transparent;
    color: #475569;
}
.lang-btn:hover {
    background: #f1f3f7;
    border-color: rgba(15, 23, 42, 0.20);
}
.lang-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.sync-status {
    color: #94a3b8;
}

.sync-time {
    color: #475569;
}

/* Scheduler-status footer block in base.html (inline-styled) */
.scheduler-status {
    background: #f1f3f7 !important;
    color: #475569 !important;
}
.scheduler-status > div[style*="aecbeb"] {
    color: #0f172a !important;
}
.scheduler-status span[style*="6db3f2"] {
    color: #2563eb !important;
}
.scheduler-status span[style*="5a7a9a"],
.scheduler-status div[style*="5a7a9a"] {
    color: #94a3b8 !important;
}

/* base.html user display block (inline-styled dark colors) */
.sidebar-footer div[style*="7f8c8d"] {
    color: #94a3b8 !important;
}
.sidebar-footer div[style*="aecbeb"] {
    color: #0f172a !important;
}

/* Planner-admin sub-link inline colors (now removed from sidebar) */
.sidebar-nav a[style*="6db3f2"] {
    color: #2563eb !important;
}

/* ── Buttons that used dark navy ──────────────────────────── */
.btn-sync {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.12);
}
.btn-sync:hover {
    background: #f1f3f7;
    border-color: rgba(15, 23, 42, 0.22);
}

/* ── Data tables ──────────────────────────────────────────── */
.data-table th {
    background: #f1f3f7;
    color: #0f172a;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

/* ── Section headers that used dark gradient bands ────────── */
[style*="linear-gradient(90deg, #1a1a2e, #16213e)"],
.section-header,
.cr-section-header,
.lr-section-header {
    background: #f1f3f7 !important;
    color: #0f172a !important;
}

/* Override any remaining hard-coded dark backgrounds */
[style*="background: #1a1a2e"],
[style*="background:#1a1a2e"],
[style*="background: #16213e"],
[style*="background:#16213e"],
[style*="background: #1a2332"],
[style*="background:#1a2332"],
[style*="background: #1e2d3d"],
[style*="background:#1e2d3d"] {
    background: #f1f3f7 !important;
    color: #0f172a !important;
}

/* Make light-text bands readable on light bg */
.section-header *,
.cr-section-header *,
.lr-section-header * {
    color: #0f172a;
}

/* Page header bottom border softer */
.page-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.page-header h2 {
    color: #0f172a;
}

/* Flash messages */
.flash-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.flash-error,
.flash-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.flash-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.flash-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.flash {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 13px;
}
