/* report-components.css — Report/governance UI component styles */

/* ─── Filter Bar ───────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.filter-item.filter-search {
    flex: 1;
    min-width: 180px;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-select,
.filter-input {
    padding: 6px 10px;
    font-size: 0.875rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color var(--transition);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

/* ─── Timeline ─────────────────────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding-bottom: 20px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    flex-shrink: 0;
    z-index: 1;
}

.dot-success { background: var(--success); }
.dot-warning { background: var(--warning); }
.dot-danger { background: var(--danger); }
.dot-info { background: var(--info); }
.dot-neutral { background: var(--text-muted); }

.timeline-content { flex: 1; }

.timeline-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.timeline-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.timeline-author::before {
    content: '\2014\00a0';
}

.timeline-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    padding: 6px 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

/* ─── Progress Bar ─────────────────────────────────────────── */
.progress-wrapper {
    margin-bottom: 12px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.progress-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.progress-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-track {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.progress-success { background: var(--success); }
.progress-warning { background: var(--warning); }
.progress-danger { background: var(--danger); }
.progress-info { background: var(--info); }
.progress-neutral { background: var(--text-muted); }

/* ─── Score Card ───────────────────────────────────────────── */
.score-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.score-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.score-success .score-value { color: var(--success); }
.score-warning .score-value { color: var(--warning); }
.score-danger .score-value { color: var(--danger); }
.score-info .score-value { color: var(--info); }
.score-neutral .score-value { color: var(--text-primary); }

.score-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}

.score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.score-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── Accordion ────────────────────────────────────────────── */
.accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.accordion-item + .accordion-item {
    border-top: 1px solid var(--border);
}

.accordion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-primary);
    text-align: left;
    transition: background var(--transition);
}

.accordion-header:hover { background: var(--bg-tertiary); }

.accordion-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    width: 14px;
    flex-shrink: 0;
    transition: transform var(--transition);
}

.accordion-title { flex: 1; }

.accordion-panel {
    padding: 12px 16px;
    overflow: hidden;
    max-height: 2000px;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-panel.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* ─── Tabs ─────────────────────────────────────────────────── */
.tabs-container {
    margin-bottom: 16px;
}

.tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 16px;
    overflow-x: auto;
}

.tab-btn {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    white-space: nowrap;
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.tab-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    min-height: 100px;
}

/* ─── Status Stepper ───────────────────────────────────────── */
.status-stepper {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    padding: 8px 0;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    text-align: center;
}

.stepper-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-completed .stepper-circle {
    background: var(--success);
    color: #fff;
}

.step-active .stepper-circle {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 3px var(--accent-light);
}

.step-pending .stepper-circle {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 2px solid var(--border);
}

.stepper-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 6px;
}

.step-active .stepper-label { color: var(--accent); font-weight: 600; }
.step-completed .stepper-label { color: var(--success); }

.stepper-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.stepper-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin-top: 15px;
    min-width: 24px;
}

.stepper-line.line-done { background: var(--success); }

/* ─── Tag List ─────────────────────────────────────────────── */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 12px;
}

.tag-success { background: var(--success-bg); color: var(--success); }
.tag-warning { background: var(--warning-bg); color: var(--warning); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-info { background: var(--info-bg); color: var(--info); }
.tag-neutral { background: var(--bg-tertiary); color: var(--text-secondary); }

.tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0 2px;
    color: inherit;
    opacity: 0.6;
    transition: opacity var(--transition);
}

.tag-remove:hover { opacity: 1; }

/* ─── Detail List ──────────────────────────────────────────── */
.detail-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    font-size: 0.875rem;
}

.detail-label {
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.detail-value {
    color: var(--text-primary);
    word-break: break-word;
}

/* text-success/warning/danger/info defined in main.css */
.text-neutral { color: var(--text-secondary); }

/* ─── Empty State ──────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.empty-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 360px;
}

/* ─── Section Header ───────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 8px;
}

/* ─── Structured Card (with header/body sections) ──────────── */
/* Extends base .card from main.css — adds header/body structure */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    margin: -20px -20px 16px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-actions {
    display: flex;
    gap: 6px;
}

/* Utilities defined in main.css — not duplicated here */
