.by-dash { font-family: "Segoe UI", Roboto, Arial, sans-serif; }

/* KPI cards */
.by-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.by-kpi {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 10px rgba(30, 70, 40, 0.08);
    border-left: 4px solid #4caf50;
}

.by-kpi.by-warn   { border-left-color: #f9a825; }
.by-kpi.by-danger { border-left-color: #e53935; }
.by-kpi.by-info   { border-left-color: #0288d1; }

.by-kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #e8f5e9;
    color: #2e7d32;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.by-warn .by-kpi-icon   { background: #fff8e1; color: #f9a825; }
.by-danger .by-kpi-icon { background: #ffebee; color: #e53935; }
.by-info .by-kpi-icon   { background: #e1f5fe; color: #0288d1; }

.by-kpi-icon svg { width: 24px; height: 24px; }

.by-kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: #1f2d24;
    line-height: 1.2;
}

.by-kpi-label {
    font-size: 13px;
    color: #6b7f72;
    margin-top: 2px;
}

/* Panels */
.by-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.by-grid-2-1 { grid-template-columns: 2fr 1fr; }
.by-grid-1-1 { grid-template-columns: 1fr 1fr; }
.by-grid-3   { grid-template-columns: repeat(3, 1fr); }

.by-panel {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(30, 70, 40, 0.08);
}

.by-panel-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: #1b4332;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.by-panel-title a {
    font-size: 13px;
    font-weight: 500;
    color: #2e7d32;
    text-decoration: none;
}

.by-panel-title a:hover { text-decoration: underline; }

/* Monthly bar chart */
.by-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    height: 220px;
    padding-top: 10px;
    border-bottom: 1px solid #e3ede5;
}

.by-bar-col {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.by-bar-val {
    font-size: 12px;
    color: #6b7f72;
    margin-bottom: 4px;
}

.by-bar {
    width: 100%;
    max-width: 46px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, #66bb6a, #2e7d32);
}

.by-bar-labels {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.by-bar-labels span {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: #6b7f72;
}

/* Donut */
.by-donut-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.by-donut { width: 170px; height: 170px; }

.by-donut-total {
    font-size: 26px;
    font-weight: 700;
    fill: #1f2d24;
}

.by-donut-sub {
    font-size: 11px;
    fill: #6b7f72;
}

.by-legend {
    width: 100%;
    margin-top: 16px;
}

.by-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #3d5a45;
    padding: 5px 0;
}

.by-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

/* Horizontal bar rows */
.by-hrow { margin-bottom: 14px; }

.by-hrow-top {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #3d5a45;
    margin-bottom: 5px;
}

.by-hrow-top strong { color: #1f2d24; }

.by-hrow-track {
    height: 8px;
    border-radius: 8px;
    background: #e8f5e9;
    overflow: hidden;
}

.by-hrow-fill {
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, #81c784, #2e7d32);
}

.by-hrow-fill.by-amber { background: linear-gradient(90deg, #ffd54f, #f9a825); }
.by-hrow-fill.by-blue  { background: linear-gradient(90deg, #4fc3f7, #0288d1); }

/* Tables */
.by-table-wrap { overflow-x: auto; }

.by-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.by-table th {
    text-align: left;
    padding: 10px 12px;
    color: #6b7f72;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid #e3ede5;
    white-space: nowrap;
}

.by-table td {
    padding: 11px 12px;
    color: #2e4a37;
    border-bottom: 1px solid #f0f5f1;
    white-space: nowrap;
}

.by-table tr:last-child td { border-bottom: 0; }

.by-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.by-badge-completed { background: #e8f5e9; color: #2e7d32; }
.by-badge-pending   { background: #fff8e1; color: #b28704; }
.by-badge-cancelled { background: #ffebee; color: #c62828; }

.by-low { color: #e53935; font-weight: 700; }

/* Salesperson list */
.by-person {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f5f1;
}

.by-person:last-child { border-bottom: 0; }

.by-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.by-person-info { flex: 1; }
.by-person-name { font-size: 14px; font-weight: 600; color: #1f2d24; }
.by-person-meta { font-size: 12px; color: #6b7f72; }
.by-person-amt  { font-size: 14px; font-weight: 700; color: #2e7d32; }

/* Quick actions */
.by-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.by-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    background: #f4faf5;
    border: 1px solid #dcebdd;
    color: #2e4a37;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}

.by-action:hover {
    background: #e8f5e9;
    transform: translateY(-1px);
    color: #1b4332;
    text-decoration: none;
}

.by-action svg {
    width: 20px;
    height: 20px;
    color: #2e7d32;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1400px) {
    .by-kpi-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
    .by-grid-2-1,
    .by-grid-1-1,
    .by-grid-3 { grid-template-columns: 1fr; }
    .by-kpi-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
    .by-kpi-row { grid-template-columns: 1fr; }
    .by-actions { grid-template-columns: 1fr; }
    .by-bars { gap: 6px; }
}