.sidebar { width: 18%; min-width: 220px; text-align: center; }
.sidebar .inv-cards { flex-direction: column; align-items: center; }
.sidebar .inv-card { text-align: center; width: 100%; }
.sidebar h2 { text-align: center; }

.dn-source { margin-top: 1rem; padding: 0.75rem; background: #fff; border: 1px solid #E4E4E7; border-radius: 8px; text-align: left; }
.dn-source-title { font-size: 0.7rem; color: #71717A; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.6rem; text-align: center; }
.dn-source-item { margin-bottom: 0.6rem; padding-bottom: 0.6rem; border-bottom: 1px dashed #E4E4E7; }
.dn-source-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.dn-source-label { font-size: 0.72rem; color: #3F3F46; font-weight: 600; margin-bottom: 0.2rem; }
.dn-source-path { font-size: 0.68rem; color: #71717A; line-height: 1.35; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.dn-source-note { font-size: 0.68rem; color: #5B5BD6; margin-top: 0.2rem; }
.dn-source code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.66rem; background: #F4F4F5; padding: 1px 4px; border-radius: 3px; color: #18181B; }

.dn-controls { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; background: #F6F6F7; border-bottom: 1px solid #E4E4E7; flex-wrap: wrap; }
.dn-label { font-size: 0.72rem; color: #71717A; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.dn-select { width: auto; min-width: 5rem; padding: 0.3rem 0.5rem; font-size: 0.8rem; border: 1px solid #E4E4E7; border-radius: 5px; background: #fff; }
.dn-input { width: auto; padding: 0.3rem 0.5rem; font-size: 0.8rem; border: 1px solid #E4E4E7; border-radius: 5px; background: #fff; }
.dn-btn { width: auto; flex-shrink: 0; padding: 0.32rem 1rem; background: #5B5BD6; color: #fff; border: none; border-radius: 5px; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.dn-btn:hover { background: #4a4abf; }
.dn-row-count { font-size: 0.72rem; color: #A1A1AA; margin-left: 0.25rem; }

.dn-kpi-row { display: flex; gap: 12px; margin-bottom: 12px; }
.dn-kpi { flex: 1; background: #fff; border: 1px solid #E4E4E7; border-radius: 10px; padding: 12px 16px; }
.dn-kpi-label { font-size: 11px; color: #71717A; text-transform: uppercase; letter-spacing: 0.5px; }
.dn-kpi-value { font-size: 24px; font-weight: 700; color: #18181B; margin-top: 2px; }

.dn-chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dn-chart-card { background: #fff; border: 1px solid #E4E4E7; border-radius: 10px; padding: 12px 16px; }
.dn-chart-card h3 { font-size: 13px; font-weight: 600; color: #3F3F46; margin-bottom: 8px; }
.dn-chart-wrap { position: relative; height: 280px; }
.dn-chart-full { grid-column: 1 / -1; }

.dn-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.dn-table th { position: sticky; top: 0; z-index: 4; background: #F6F6F7; color: #3F3F46; font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid #E4E4E7; white-space: nowrap; }
.dn-table thead tr:nth-child(2) th { top: 1.7rem; }
.dn-table thead tr:nth-child(3) th { top: 3.0rem; }
.dn-table th.num, .dn-table td.num { text-align: right; }
.dn-table td { padding: 0.4rem 0.75rem; border-bottom: 1px solid #F4F4F5; white-space: nowrap; }
.dn-edit { width: 8rem; padding: 0.15rem 0.3rem; font-size: 0.75rem; border: 1px solid #E4E4E7; border-radius: 4px; background: #fff; }
.dn-edit:focus { border-color: #5B5BD6; outline: none; box-shadow: 0 0 0 2px rgba(91,91,214,0.15); }
.dn-table tbody tr:hover { background: #FAFAFE; }

.dn-invoice-summary { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; padding: 10px 12px; background: #fff; border-bottom: 1px solid #E4E4E7; }
.dn-invoice-card { border: 1px solid #E4E4E7; border-radius: 8px; padding: 10px 12px; background: #FAFAFA; min-width: 0; }
.dn-invoice-card .dn-kpi-value { font-size: 20px; }
.dn-invoice-note { padding: 7px 12px; font-size: 11.5px; color: #3F3F46; background: #F8FAFC; border-bottom: 1px solid #E4E4E7; }
.dn-status-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 1px solid transparent; white-space: nowrap; }
.dn-status-pill.ok { color: #166534; background: #DCFCE7; border-color: #BBF7D0; }
.dn-status-pill.warn { color: #92400E; background: #FEF3C7; border-color: #FDE68A; }
.dn-status-pill.bad { color: #991B1B; background: #FEE2E2; border-color: #FCA5A5; }

@media (max-width: 1100px) {
  .dn-invoice-summary { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}
