/* Drivers page — service level */

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

.drivers-toolbar .search-input {
    flex: 1;
    min-width: 180px;
    max-width: 320px;
    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;
    outline: none;
    transition: border-color .15s;
}
.drivers-toolbar .search-input:focus {
    border-color: #3b82f6;
}

.drivers-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-add-driver {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #3b82f6;
    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;
    transition: background .15s;
    margin-left: auto;
}
.btn-add-driver:hover { background: #2563eb; }

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

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

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

.drivers-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.drivers-table tr:last-child td { border-bottom: none; }

.drivers-table tr:hover td { background: #f8fafc; }

.driver-name {
    font-weight: 500;
    color: #1e293b;
}

.driver-email {
    font-size: 12px;
    color: #94a3b8;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.badge-active { background: #ecfdf5; color: #065f46; }
.badge-inactive { background: #fef2f2; color: #991b1b; }
.badge-online { background: #ecfdf5; color: #065f46; }
.badge-offline { background: #f1f5f9; color: #64748b; }

.badge-vehicle {
    background: #eff6ff;
    color: #1d4ed8;
}

/* Action buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: all .15s;
}
.btn-action:hover { background: #f1f5f9; color: #334155; }
.btn-action-danger:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

.td-actions {
    display: flex;
    gap: 4px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
    font-size: 13px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 1rem;
}

.pagination button {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.pagination button:hover { background: #f1f5f9; }
.pagination button.active { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.pagination button:disabled { opacity: .4; cursor: default; }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility .2s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
    background: #fff;
    border-radius: 12px;
    width: 480px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.modal-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
}
.modal-close:hover { background: #f1f5f9; color: #334155; }

.modal-body {
    padding: 20px;
}

.modal-body .form-group {
    margin-bottom: 14px;
}

.modal-body label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 4px;
}

.modal-body input,
.modal-body select {
    width: 100%;
    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;
    outline: none;
    box-sizing: border-box;
}
.modal-body input:focus,
.modal-body select:focus { border-color: #3b82f6; }

.modal-body textarea {
    width: 100%;
    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;
    outline: none;
    box-sizing: border-box;
    resize: vertical;
    min-height: 60px;
}
.modal-body textarea:focus { border-color: #3b82f6; }

.form-row {
    display: flex;
    gap: 12px;
}
.form-row .form-group { flex: 1; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
}

.btn-modal-cancel {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.btn-modal-cancel:hover { background: #f1f5f9; }

.btn-modal-save {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.btn-modal-save:hover { background: #2563eb; }
.btn-modal-save:disabled { opacity: .5; cursor: default; }

.modal-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    margin-bottom: 12px;
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .drivers-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .drivers-toolbar .search-input { max-width: 100%; }
    .btn-add-driver { margin-left: 0; }
}