/* ========================================================================
   Burndown Chart — estilos
   ======================================================================== */

.bd-toolbar {
    display: flex; flex-wrap: wrap; gap: 1rem; align-items: end;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.bd-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 150px; }
.bd-field.grow { flex: 1; }
.bd-field label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.bd-input, .bd-select {
    padding: 0.5rem 0.75rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--t);
    width: 100%;
}
.bd-input:focus, .bd-select:focus { border-color: var(--accent); }
.bd-input[type="date"] { color-scheme: dark; font-variant-numeric: tabular-nums; }
.bd-input[type="number"] { font-variant-numeric: tabular-nums; }

.bd-add-today {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: var(--accent);
    color: white;
    border: 0;
    border-radius: 50px;
    padding: 0.55rem 1.2rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--t);
}
.bd-add-today:hover { background: var(--accent-hover); }
.bd-add-today svg { width: 14px; height: 14px; }

/* ===== CHART CARD ===== */
.bd-chart-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.bd-chart-head {
    display: flex; flex-wrap: wrap; gap: 1rem;
    justify-content: space-between; align-items: center;
    margin-bottom: 0.75rem;
}
.bd-chart-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.bd-chart-legend {
    display: flex; flex-wrap: wrap; gap: 1rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.bd-chart-legend .swatch {
    display: inline-block;
    width: 18px; height: 3px;
    margin-right: 0.45rem;
    vertical-align: middle;
    border-radius: 2px;
}
.bd-chart-legend .swatch.ideal {
    background: transparent;
    border-top: 2px dashed rgba(255,255,255,0.5);
    height: 0;
}
.bd-chart-legend .swatch.actual { background: var(--accent); }
.bd-chart-legend .swatch.actual.st-ahead { background: var(--green); }
.bd-chart-legend .swatch.actual.st-behind { background: var(--red); }
.bd-chart-legend .swatch.actual.st-on_track { background: var(--accent); }
.bd-chart-legend .swatch.today {
    background: rgba(255,255,255,0.4);
    width: 2px; height: 18px;
    margin-right: 0.45rem;
}

.bd-chart-svg {
    width: 100%;
    height: auto;
    max-height: 460px;
    display: block;
    background: #0a0a0a;
    border-radius: var(--radius-xs);
}
.bd-chart-svg .grid {
    stroke: rgba(255,255,255,0.08);
    stroke-width: 1;
    stroke-dasharray: 3 4;
}
.bd-chart-svg .axis {
    stroke: rgba(255,255,255,0.25);
    stroke-width: 1;
}
.bd-chart-svg .ideal-line {
    fill: none;
    stroke: rgba(255,255,255,0.5);
    stroke-width: 2;
    stroke-dasharray: 6 6;
}
.bd-chart-svg .actual-line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.bd-chart-svg .actual-line.st-ahead { stroke: var(--green); }
.bd-chart-svg .actual-line.st-behind { stroke: var(--red); }
.bd-chart-svg .actual-line.st-on_track { stroke: var(--accent); }
.bd-chart-svg .actual-dot {
    fill: var(--accent);
    stroke: #0a0a0a;
    stroke-width: 2;
    cursor: pointer;
}
.bd-chart-svg .actual-dot.st-ahead { fill: var(--green); }
.bd-chart-svg .actual-dot.st-behind { fill: var(--red); }
.bd-chart-svg .today-line {
    stroke: rgba(255,255,255,0.35);
    stroke-width: 1.5;
    stroke-dasharray: 2 4;
}
.bd-chart-svg .today-label {
    fill: rgba(255,255,255,0.55);
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
}
.bd-chart-svg text {
    fill: var(--text-muted);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
}
.bd-chart-svg .axis-title {
    fill: var(--text-secondary);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.bd-chart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-style: italic;
    border: 1px dashed var(--border);
    border-radius: var(--radius-xs);
}

/* ===== STATUS PANEL ===== */
.bd-status {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    display: flex; flex-wrap: wrap; gap: 1rem;
    align-items: center;
}
.bd-status-badge {
    display: inline-block;
    padding: 0.45rem 1rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: white;
    flex-shrink: 0;
}
.bd-status-badge.st-ahead { background: var(--green); }
.bd-status-badge.st-on_track { background: var(--accent); }
.bd-status-badge.st-behind { background: var(--red); }
.bd-status-badge.st-empty { background: rgba(255,255,255,0.1); color: var(--text-muted); }

.bd-status-text {
    flex: 1; min-width: 200px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
}
.bd-status-projection {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== ENTRIES TABLE ===== */
.bd-entries {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.bd-entries-head {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 0.85rem;
}
.bd-entries-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.bd-entries-table th {
    text-align: left;
    padding: 0.55rem 0.6rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.bd-entries-table th.right, .bd-entries-table td.right { text-align: right; }
.bd-entries-table td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}
.bd-entries-table tr:last-child td { border-bottom: 0; }
.bd-entries-table input.cell {
    width: 100%;
    padding: 0.35rem 0.45rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
}
.bd-entries-table input.cell:focus { border-color: var(--accent); }
.bd-entries-table input.cell[type="number"] { text-align: right; }
.bd-entries-table input.cell[type="date"] { color-scheme: dark; }
.bd-entries-table .delta.up { color: var(--red); }
.bd-entries-table .delta.down { color: var(--green); }
.bd-entries-table .delta.flat { color: var(--text-muted); }

.bd-entries-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    padding: 1rem;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: var(--radius-xs);
}

.bd-mini-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all var(--t);
}
.bd-mini-btn:hover {
    color: var(--red);
    border-color: rgba(239,68,68,0.4);
    background: rgba(239,68,68,0.08);
}
.bd-mini-btn svg { width: 12px; height: 12px; }

/* ===== ACTIONS ===== */
.bd-actions {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    justify-content: flex-end;
    margin-bottom: 2rem;
}
.bd-action-btn {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--t);
}
.bd-action-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.bd-action-btn.danger:hover { color: var(--red); border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.06); }
.bd-action-btn svg { width: 14px; height: 14px; }

.bd-error {
    padding: 0.6rem 0.9rem;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: var(--radius-xs);
    color: var(--red);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

@media (max-width: 700px) {
    .bd-add-today { margin-left: 0; width: 100%; justify-content: center; }
    .bd-entries-table { font-size: 0.82rem; }
    .bd-entries-table th, .bd-entries-table td { padding: 0.4rem; }
}
