/* Earnings page */

.earnings-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.earnings-toolbar select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #6b7280;
    background: #fff;
    outline: none;
}

.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    cursor: pointer;
    margin-left: auto;
    text-decoration: none;
}
.btn-export:hover { background: #059669; }

/* Earnings table */
.earnings-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow-x: auto;
}

.earnings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.earnings-table th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.earnings-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}
.earnings-table tr:last-child td { border-bottom: none; }
.earnings-table tr:hover td { background: #f8fafc; }

.amount-positive { color: #059669; font-weight: 500; }
.amount-negative { color: #dc2626; font-weight: 500; }

.badge-delivery { background: #ecfdf5; color: #065f46; }
.badge-bonus { background: #eff6ff; color: #1d4ed8; }
.badge-penalty { background: #fef2f2; color: #991b1b; }
.badge-commission { background: #fef3c7; color: #92400e; }
.badge-pending-e { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #dbeafe; color: #1e40af; }
.badge-paid { background: #ecfdf5; color: #065f46; }

/* Tabs */
.earnings-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.earnings-tab {
    padding: 10px 16px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.earnings-tab:hover { color: #3b82f6; }
.earnings-tab.active { color: #3b82f6; border-bottom-color: #3b82f6; }

/* Driver summary table */
.driver-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.driver-summary-table th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    text-transform: uppercase;
}

.driver-summary-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}
.driver-summary-table tr:last-child td { border-bottom: none; }

@media (max-width: 768px) {
    .earnings-toolbar { flex-direction: column; align-items: stretch; }
    .btn-export { margin-left: 0; }
}